Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dillonzq/LoveIt.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDillon <dillonzq@outlook.com>2020-05-29 09:13:45 +0300
committerDillon <dillonzq@outlook.com>2020-05-29 09:13:45 +0300
commitf787a4e5ad4edf60467658d10c286248dc5027a6 (patch)
treee9a11f8cee772c8446b0aaf7c6d741b856f6d303
parentdeab5ca4d763891c2a8df0e81da709e76cf8d929 (diff)
parent96cf051546c4058e7330cba7a1301014bc499ad2 (diff)
Merge branch 'develop'v0.2.10
-rw-r--r--assets/data/cdn/jsdelivr.yml38
-rw-r--r--assets/lib/VERSION16
-rw-r--r--assets/lib/echarts/echarts.min.js2
-rwxr-xr-xassets/lib/lazysizes/lazysizes.min.js5
-rw-r--r--assets/lib/lightgallery/lg-thumbnail.min.js4
-rw-r--r--assets/lib/lightgallery/lg-zoom.min.js4
-rw-r--r--assets/lib/lightgallery/lightgallery.min.css2
-rw-r--r--assets/lib/lightgallery/lightgallery.min.js4
-rw-r--r--assets/lib/mapbox-gl/mapbox-gl.min.js6
-rw-r--r--assets/lib/mermaid/mermaid.min.js19
-rw-r--r--assets/lib/mermaid/themes/flowchart.scss3
-rw-r--r--assets/lib/mermaid/themes/state.scss63
-rw-r--r--assets/lib/simple-icons/icons/adobecreativecloud.svg2
-rw-r--r--assets/lib/simple-icons/icons/cairometro.svg1
-rw-r--r--assets/lib/simple-icons/icons/counter-strike.svg1
-rw-r--r--assets/lib/simple-icons/icons/embarcadero.svg1
-rw-r--r--assets/lib/simple-icons/icons/fastify.svg1
-rw-r--r--assets/lib/simple-icons/icons/husqvarna.svg1
-rw-r--r--assets/lib/simple-icons/icons/insomnia.svg1
-rw-r--r--assets/lib/simple-icons/icons/jrgroup.svg1
-rw-r--r--assets/lib/simple-icons/icons/loom.svg1
-rw-r--r--assets/lib/simple-icons/icons/microsoftacademic.svg1
-rw-r--r--assets/lib/simple-icons/icons/musicbrainz.svg1
-rw-r--r--assets/lib/simple-icons/icons/newrelic.svg1
-rw-r--r--assets/lib/simple-icons/icons/pandas.svg1
-rw-r--r--assets/lib/simple-icons/icons/rancher.svg1
-rw-r--r--assets/lib/simple-icons/icons/runkit.svg1
-rw-r--r--assets/lib/simple-icons/icons/scopus.svg1
-rw-r--r--assets/lib/simple-icons/icons/slideshare.svg1
-rw-r--r--assets/lib/simple-icons/icons/snyk.svg2
-rw-r--r--assets/lib/simple-icons/icons/sqlite.svg1
-rw-r--r--assets/lib/simple-icons/icons/ssrn.svg1
-rw-r--r--assets/lib/simple-icons/icons/wistia.svg1
-rw-r--r--resources/_gen/assets/scss/lib/mermaid/mermaid.scss_43d09a0fb297c4cc88d4122515a2e889.content2
34 files changed, 135 insertions, 56 deletions
diff --git a/assets/data/cdn/jsdelivr.yml b/assets/data/cdn/jsdelivr.yml
index 8fb8f88a..03ae099d 100644
--- a/assets/data/cdn/jsdelivr.yml
+++ b/assets/data/cdn/jsdelivr.yml
@@ -1,7 +1,7 @@
prefix:
libFiles: https://cdn.jsdelivr.net/npm/
- # simple-icons@2.12.0 https://github.com/simple-icons/simple-icons
- simpleIcons: https://cdn.jsdelivr.net/npm/simple-icons@2.12.0/icons/
+ # simple-icons@2.14.0 https://github.com/simple-icons/simple-icons
+ simpleIcons: https://cdn.jsdelivr.net/npm/simple-icons@2.14.0/icons/
libFiles:
# normalize.css@8.0.1 https://github.com/necolas/normalize.css
normalizeCSS: normalize.css@8.0.1/normalize.min.css
@@ -17,19 +17,19 @@ libFiles:
lunrJS: lunr@2.3.8/lunr.min.js
# algoliasearch@4.2.0 https://github.com/algolia/algoliasearch-client-javascript
algoliasearchJS: algoliasearch@4.2.0/dist/algoliasearch-lite.umd.min.js
- # lazysizes@5.2.0 https://github.com/aFarkas/lazysizes
- lazysizesJS: lazysizes@5.2.0/lazysizes.min.js
+ # lazysizes@5.2.2 https://github.com/aFarkas/lazysizes
+ lazysizesJS: lazysizes@5.2.2/lazysizes.min.js
# object-fit-images@3.2.4 https://github.com/fregante/object-fit-images
objectFitImagesJS: object-fit-images@3.2.4/dist/ofi.min.js
# twemoji@13.0.0 https://github.com/twitter/twemoji
twemojiJS: twemoji@13.0.0/dist/twemoji.min.js
- # lightgallery.js@1.1.3 https://github.com/sachinchoolur/lightgallery.js
- # lg-thumbnail.js@1.1.0 https://github.com/sachinchoolur/lg-thumbnail.js
- # lg-zoom.js@1.0.1 https://github.com/sachinchoolur/lg-zoom.js
- lightgalleryCSS: lightgallery.js@1.1.3/dist/css/lightgallery.min.css
- lightgalleryJS: lightgallery.js@1.1.3/dist/js/lightgallery.min.js
- lightgalleryThumbnailJS: lg-thumbnail.js@1.1.0/dist/lg-thumbnail.min.js
- lightgalleryZoomJS: lg-zoom.js@1.0.1/dist/lg-zoom.min.js
+ # lightgallery.js@1.2.0 https://github.com/sachinchoolur/lightgallery.js
+ # lg-thumbnail.js@1.2.0 https://github.com/sachinchoolur/lg-thumbnail.js
+ # lg-zoom.js@1.2.0 https://github.com/sachinchoolur/lg-zoom.js
+ lightgalleryCSS: lightgallery.js@1.2.0/dist/css/lightgallery.min.css
+ lightgalleryJS: lightgallery.js@1.2.0/dist/js/lightgallery.min.js
+ lightgalleryThumbnailJS: lg-thumbnail.js@1.2.0/dist/lg-thumbnail.min.js
+ lightgalleryZoomJS: lg-zoom.js@1.2.0/dist/lg-zoom.min.js
# clipboard.js@2.0.6 https://github.com/zenorocha/clipboard.js
clipboardJS: clipboard@2.0.6/dist/clipboard.min.js
# sharer.js@0.4.0 https://github.com/ellisonleao/sharer.js
@@ -43,14 +43,14 @@ libFiles:
katexCopyTexCSS: katex@0.11.1/dist/contrib/copy-tex.min.css
katexCopyTexJS: katex@0.11.1/dist/contrib/copy-tex.min.js
katexMhchemJS: katex@0.11.1/dist/contrib/mhchem.min.js
- # mermaid@8.5.0 https://github.com/knsv/mermaid
- mermaidJS: mermaid@8.5.0/dist/mermaid.min.js
- # echarts@4.7.0 https://echarts.apache.org/
- echartsJS: echarts@4.7.0/dist/echarts.min.js
- echartsMacaronsJS: echarts@4.7.0/theme/macarons.min.js
- # mapbox-gl@1.10.0 https://docs.mapbox.com/mapbox-gl-js
- mapboxGLCSS: mapbox-gl@1.10.0/dist/mapbox-gl.min.css
- mapboxGLJS: mapbox-gl@1.10.0/dist/mapbox-gl.min.js
+ # mermaid@8.5.1 https://github.com/knsv/mermaid
+ mermaidJS: mermaid@8.5.1/dist/mermaid.min.js
+ # echarts@4.8.0 https://echarts.apache.org/
+ echartsJS: echarts@4.8.0/dist/echarts.min.js
+ echartsMacaronsJS: echarts@4.8.0/theme/macarons.min.js
+ # mapbox-gl@1.10.1 https://docs.mapbox.com/mapbox-gl-js
+ mapboxGLCSS: mapbox-gl@1.10.1/dist/mapbox-gl.min.css
+ mapboxGLJS: mapbox-gl@1.10.1/dist/mapbox-gl.min.js
# aplayer@1.10.1 https://github.com/MoePlayer/APlayer
aplayerCSS: aplayer@1.10.1/dist/APlayer.min.css
aplayerJS: aplayer@1.10.1/dist/APlayer.min.js
diff --git a/assets/lib/VERSION b/assets/lib/VERSION
index 347973f8..5a2318b5 100644
--- a/assets/lib/VERSION
+++ b/assets/lib/VERSION
@@ -1,24 +1,24 @@
normalize.css@8.0.1 https://github.com/necolas/normalize.css
fontawesome-free@5.13.0 https://fontawesome.com/
-simple-icons@2.12.0 https://github.com/simple-icons/simple-icons
+simple-icons@2.14.0 https://github.com/simple-icons/simple-icons
animate.css@3.7.2 https://github.com/daneden/animate.css
smooth-scroll@16.1.3 https://github.com/cferdinandi/smooth-scroll
autocomplete.js@0.37.1 https://github.com/algolia/autocomplete.js
lunr.js@2.3.8 https://lunrjs.com/
algoliasearch@4.2.0 https://github.com/algolia/algoliasearch-client-javascript
-lazysizes@5.2.0 https://github.com/aFarkas/lazysizes
+lazysizes@5.2.2 https://github.com/aFarkas/lazysizes
object-fit-images@3.2.4 https://github.com/fregante/object-fit-images
twemoji@13.0.0 https://github.com/twitter/twemoji
-lightgallery.js@1.1.3 https://github.com/sachinchoolur/lightgallery.js
-lg-thumbnail.js@1.1.0 https://github.com/sachinchoolur/lg-thumbnail.js
-lg-zoom.js@1.0.1 https://github.com/sachinchoolur/lg-zoom.js
+lightgallery.js@1.2.0 https://github.com/sachinchoolur/lightgallery.js
+lg-thumbnail.js@1.2.0 https://github.com/sachinchoolur/lg-thumbnail.js
+lg-zoom.js@1.2.0 https://github.com/sachinchoolur/lg-zoom.js
clipboard.js@2.0.6 https://github.com/zenorocha/clipboard.js
sharer.js@0.4.0 https://github.com/ellisonleao/sharer.js
typeit@7.0.4 https://github.com/alexmacarthur/typeit
katex@0.11.1 https://katex.org/
-mermaid@8.5.0 https://github.com/knsv/mermaid
-echarts@4.7.0 https://echarts.apache.org/
-mapbox-gl@1.10.0 https://github.com/mapbox/mapbox-gl-js
+mermaid@8.5.1 https://github.com/knsv/mermaid
+echarts@4.8.0 https://echarts.apache.org/
+mapbox-gl@1.10.1 https://github.com/mapbox/mapbox-gl-js
aplayer@1.10.1 https://github.com/MoePlayer/APlayer
meting@2.0.1 https://github.com/metowolf/MetingJS
gitalk@1.6.2 https://github.com/gitalk/gitalk
diff --git a/assets/lib/echarts/echarts.min.js b/assets/lib/echarts/echarts.min.js
index 35d375c9..dc78df64 100644
--- a/assets/lib/echarts/echarts.min.js
+++ b/assets/lib/echarts/echarts.min.js
@@ -19,4 +19,4 @@
*/
-!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.echarts={})}(this,function(t){"use strict";var e=2311,n=function(){return e++},v="object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?{browser:{},os:{},node:!1,wxa:!0,canvasSupported:!0,svgSupported:!1,touchEventsSupported:!0,domSupported:!1}:"undefined"==typeof document&&"undefined"!=typeof self?{browser:{},os:{},node:!1,worker:!0,canvasSupported:!0,domSupported:!1}:"undefined"==typeof navigator?{browser:{},os:{},node:!0,worker:!1,canvasSupported:!0,svgSupported:!0,domSupported:!1}:function(t){var e={},i=t.match(/Firefox\/([\d.]+)/),n=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),o=t.match(/Edge\/([\d.]+)/),a=/micromessenger/i.test(t);i&&(e.firefox=!0,e.version=i[1]);n&&(e.ie=!0,e.version=n[1]);o&&(e.edge=!0,e.version=o[1]);a&&(e.weChat=!0);return{browser:e,os:{},node:!1,canvasSupported:!!document.createElement("canvas").getContext,svgSupported:"undefined"!=typeof SVGRect,touchEventsSupported:"ontouchstart"in window&&!e.ie&&!e.edge,pointerEventsSupported:"onpointerdown"in window&&(e.edge||e.ie&&11<=e.version),domSupported:"undefined"!=typeof document}}(navigator.userAgent);var s={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},l={"[object Int8Array]":1,"[object Uint8Array]":1,"[object Uint8ClampedArray]":1,"[object Int16Array]":1,"[object Uint16Array]":1,"[object Int32Array]":1,"[object Uint32Array]":1,"[object Float32Array]":1,"[object Float64Array]":1},u=Object.prototype.toString,i=Array.prototype,r=i.forEach,h=i.filter,o=i.slice,c=i.map,d=i.reduce,a={};function f(t,e){"createCanvas"===t&&(y=null),a[t]=e}function L(t){if(null==t||"object"!=typeof t)return t;var e=t,i=u.call(t);if("[object Array]"===i){if(!$(t)){e=[];for(var n=0,o=t.length;n<o;n++)e[n]=L(t[n])}}else if(l[i]){if(!$(t)){var a=t.constructor;if(t.constructor.from)e=a.from(t);else{e=new a(t.length);for(n=0,o=t.length;n<o;n++)e[n]=L(t[n])}}}else if(!s[i]&&!$(t)&&!G(t))for(var r in e={},t)t.hasOwnProperty(r)&&(e[r]=L(t[r]));return e}function m(t,e,i){if(!z(e)||!z(t))return i?L(e):t;for(var n in e)if(e.hasOwnProperty(n)){var o=t[n],a=e[n];!z(a)||!z(o)||O(a)||O(o)||G(a)||G(o)||B(a)||B(o)||$(a)||$(o)?!i&&n in t||(t[n]=L(e[n])):m(o,a,i)}return t}function p(t,e){for(var i=t[0],n=1,o=t.length;n<o;n++)i=m(i,t[n],e);return i}function k(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);return t}function D(t,e,i){for(var n in e)e.hasOwnProperty(n)&&(i?null!=e[n]:null==t[n])&&(t[n]=e[n]);return t}function g(){return a.createCanvas()}var y;function x(){return y=y||g().getContext("2d")}function _(t,e){if(t){if(t.indexOf)return t.indexOf(e);for(var i=0,n=t.length;i<n;i++)if(t[i]===e)return i}return-1}function w(t,e){var i=t.prototype;function n(){}for(var o in n.prototype=e.prototype,t.prototype=new n,i)i.hasOwnProperty(o)&&(t.prototype[o]=i[o]);(t.prototype.constructor=t).superClass=e}function b(t,e,i){D(t="prototype"in t?t.prototype:t,e="prototype"in e?e.prototype:e,i)}function P(t){if(t)return"string"!=typeof t&&"number"==typeof t.length}function E(t,e,i){if(t&&e)if(t.forEach&&t.forEach===r)t.forEach(e,i);else if(t.length===+t.length)for(var n=0,o=t.length;n<o;n++)e.call(i,t[n],n,t);else for(var a in t)t.hasOwnProperty(a)&&e.call(i,t[a],a,t)}function N(t,e,i){if(t&&e){if(t.map&&t.map===c)return t.map(e,i);for(var n=[],o=0,a=t.length;o<a;o++)n.push(e.call(i,t[o],o,t));return n}}function S(t,e,i,n){if(t&&e){if(t.reduce&&t.reduce===d)return t.reduce(e,i,n);for(var o=0,a=t.length;o<a;o++)i=e.call(n,i,t[o],o,t);return i}}function M(t,e,i){if(t&&e){if(t.filter&&t.filter===h)return t.filter(e,i);for(var n=[],o=0,a=t.length;o<a;o++)e.call(i,t[o],o,t)&&n.push(t[o]);return n}}function I(t,e,i){if(t&&e)for(var n=0,o=t.length;n<o;n++)if(e.call(i,t[n],n,t))return t[n]}function A(t,e){var i=o.call(arguments,2);return function(){return t.apply(e,i.concat(o.call(arguments)))}}function T(t){var e=o.call(arguments,1);return function(){return t.apply(this,e.concat(o.call(arguments)))}}function O(t){return"[object Array]"===u.call(t)}function C(t){return"function"==typeof t}function R(t){return"[object String]"===u.call(t)}function z(t){var e=typeof t;return"function"==e||!!t&&"object"==e}function B(t){return!!s[u.call(t)]}function V(t){return!!l[u.call(t)]}function G(t){return"object"==typeof t&&"number"==typeof t.nodeType&&"object"==typeof t.ownerDocument}function F(t){return t!=t}function W(t){for(var e=0,i=arguments.length;e<i;e++)if(null!=arguments[e])return arguments[e]}function H(t,e){return null!=t?t:e}function Z(t,e,i){return null!=t?t:null!=e?e:i}function U(){return Function.call.apply(o,arguments)}function X(t){if("number"==typeof t)return[t,t,t,t];var e=t.length;return 2===e?[t[0],t[1],t[0],t[1]]:3===e?[t[0],t[1],t[2],t[1]]:t}function Y(t,e){if(!t)throw new Error(e)}function j(t){return null==t?null:"function"==typeof t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}a.createCanvas=function(){return document.createElement("canvas")};var q="__ec_primitive__";function K(t){t[q]=!0}function $(t){return t[q]}function J(t){var i=O(t);this.data={};var n=this;function e(t,e){i?n.set(t,e):n.set(e,t)}t instanceof J?t.each(e):t&&E(t,e)}function Q(t){return new J(t)}function tt(t,e){for(var i=new t.constructor(t.length+e.length),n=0;n<t.length;n++)i[n]=t[n];var o=t.length;for(n=0;n<e.length;n++)i[n+o]=e[n];return i}function et(){}J.prototype={constructor:J,get:function(t){return this.data.hasOwnProperty(t)?this.data[t]:null},set:function(t,e){return this.data[t]=e},each:function(t,e){for(var i in void 0!==e&&(t=A(t,e)),this.data)this.data.hasOwnProperty(i)&&t(this.data[i],i)},removeKey:function(t){delete this.data[t]}};var it=(Object.freeze||Object)({$override:f,clone:L,merge:m,mergeAll:p,extend:k,defaults:D,createCanvas:g,getContext:x,indexOf:_,inherits:w,mixin:b,isArrayLike:P,each:E,map:N,reduce:S,filter:M,find:I,bind:A,curry:T,isArray:O,isFunction:C,isString:R,isObject:z,isBuiltInObject:B,isTypedArray:V,isDom:G,eqNaN:F,retrieve:W,retrieve2:H,retrieve3:Z,slice:U,normalizeCssArray:X,assert:Y,trim:j,setAsPrimitive:K,isPrimitive:$,createHashMap:Q,concatArray:tt,noop:et}),nt="undefined"==typeof Float32Array?Array:Float32Array;function ot(t,e){var i=new nt(2);return null==t&&(t=0),null==e&&(e=0),i[0]=t,i[1]=e,i}function at(t,e){return t[0]=e[0],t[1]=e[1],t}function rt(t){var e=new nt(2);return e[0]=t[0],e[1]=t[1],e}function st(t,e,i){return t[0]=e,t[1]=i,t}function lt(t,e,i){return t[0]=e[0]+i[0],t[1]=e[1]+i[1],t}function ut(t,e,i,n){return t[0]=e[0]+i[0]*n,t[1]=e[1]+i[1]*n,t}function ht(t,e,i){return t[0]=e[0]-i[0],t[1]=e[1]-i[1],t}function ct(t){return Math.sqrt(ft(t))}var dt=ct;function ft(t){return t[0]*t[0]+t[1]*t[1]}var pt=ft;function gt(t,e,i){return t[0]=e[0]*i,t[1]=e[1]*i,t}function mt(t,e){var i=ct(e);return 0===i?(t[0]=0,t[1]=0):(t[0]=e[0]/i,t[1]=e[1]/i),t}function vt(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}var yt=vt;function xt(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])}var _t=xt;function wt(t,e,i,n){return t[0]=e[0]+n*(i[0]-e[0]),t[1]=e[1]+n*(i[1]-e[1]),t}function bt(t,e,i){var n=e[0],o=e[1];return t[0]=i[0]*n+i[2]*o+i[4],t[1]=i[1]*n+i[3]*o+i[5],t}function St(t,e,i){return t[0]=Math.min(e[0],i[0]),t[1]=Math.min(e[1],i[1]),t}function Mt(t,e,i){return t[0]=Math.max(e[0],i[0]),t[1]=Math.max(e[1],i[1]),t}var It=(Object.freeze||Object)({create:ot,copy:at,clone:rt,set:st,add:lt,scaleAndAdd:ut,sub:ht,len:ct,length:dt,lenSquare:ft,lengthSquare:pt,mul:function(t,e,i){return t[0]=e[0]*i[0],t[1]=e[1]*i[1],t},div:function(t,e,i){return t[0]=e[0]/i[0],t[1]=e[1]/i[1],t},dot:function(t,e){return t[0]*e[0]+t[1]*e[1]},scale:gt,normalize:mt,distance:vt,dist:yt,distanceSquare:xt,distSquare:_t,negate:function(t,e){return t[0]=-e[0],t[1]=-e[1],t},lerp:wt,applyTransform:bt,min:St,max:Mt});function Tt(){this.on("mousedown",this._dragStart,this),this.on("mousemove",this._drag,this),this.on("mouseup",this._dragEnd,this)}function At(t,e){return{target:t,topTarget:e&&e.topTarget}}Tt.prototype={constructor:Tt,_dragStart:function(t){for(var e=t.target;e&&!e.draggable;)e=e.parent;e&&((this._draggingTarget=e).dragging=!0,this._x=t.offsetX,this._y=t.offsetY,this.dispatchToElement(At(e,t),"dragstart",t.event))},_drag:function(t){var e=this._draggingTarget;if(e){var i=t.offsetX,n=t.offsetY,o=i-this._x,a=n-this._y;this._x=i,this._y=n,e.drift(o,a,t),this.dispatchToElement(At(e,t),"drag",t.event);var r=this.findHover(i,n,e).target,s=this._dropTarget;e!==(this._dropTarget=r)&&(s&&r!==s&&this.dispatchToElement(At(s,t),"dragleave",t.event),r&&r!==s&&this.dispatchToElement(At(r,t),"dragenter",t.event))}},_dragEnd:function(t){var e=this._draggingTarget;e&&(e.dragging=!1),this.dispatchToElement(At(e,t),"dragend",t.event),this._dropTarget&&this.dispatchToElement(At(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null}};var Dt=Array.prototype.slice,Ct=function(t){this._$handlers={},this._$eventProcessor=t};function Lt(t,e,i,n,o,a){var r=t._$handlers;if("function"==typeof i&&(o=n,n=i,i=null),!n||!e)return t;i=function(t,e){var i=t._$eventProcessor;return null!=e&&i&&i.normalizeQuery&&(e=i.normalizeQuery(e)),e}(t,i),r[e]||(r[e]=[]);for(var s=0;s<r[e].length;s++)if(r[e][s].h===n)return t;var l={h:n,one:a,query:i,ctx:o||t,callAtLast:n.zrEventfulCallAtLast},u=r[e].length-1,h=r[e][u];return h&&h.callAtLast?r[e].splice(u,0,l):r[e].push(l),t}Ct.prototype={constructor:Ct,one:function(t,e,i,n){return Lt(this,t,e,i,n,!0)},on:function(t,e,i,n){return Lt(this,t,e,i,n,!1)},isSilent:function(t){var e=this._$handlers;return!e[t]||!e[t].length},off:function(t,e){var i=this._$handlers;if(!t)return this._$handlers={},this;if(e){if(i[t]){for(var n=[],o=0,a=i[t].length;o<a;o++)i[t][o].h!==e&&n.push(i[t][o]);i[t]=n}i[t]&&0===i[t].length&&delete i[t]}else delete i[t];return this},trigger:function(t){var e=this._$handlers[t],i=this._$eventProcessor;if(e){var n=arguments,o=n.length;3<o&&(n=Dt.call(n,1));for(var a=e.length,r=0;r<a;){var s=e[r];if(i&&i.filter&&null!=s.query&&!i.filter(t,s.query))r++;else{switch(o){case 1:s.h.call(s.ctx);break;case 2:s.h.call(s.ctx,n[1]);break;case 3:s.h.call(s.ctx,n[1],n[2]);break;default:s.h.apply(s.ctx,n)}s.one?(e.splice(r,1),a--):r++}}}return i&&i.afterTrigger&&i.afterTrigger(t),this},triggerWithContext:function(t){var e=this._$handlers[t],i=this._$eventProcessor;if(e){var n=arguments,o=n.length;4<o&&(n=Dt.call(n,1,n.length-1));for(var a=n[n.length-1],r=e.length,s=0;s<r;){var l=e[s];if(i&&i.filter&&null!=l.query&&!i.filter(t,l.query))s++;else{switch(o){case 1:l.h.call(a);break;case 2:l.h.call(a,n[1]);break;case 3:l.h.call(a,n[1],n[2]);break;default:l.h.apply(a,n)}l.one?(e.splice(s,1),r--):s++}}}return i&&i.afterTrigger&&i.afterTrigger(t),this}};var kt=Math.log(2);function Pt(t,e,i,n,o,a){var r=n+"-"+o,s=t.length;if(a.hasOwnProperty(r))return a[r];if(1===e){var l=Math.round(Math.log((1<<s)-1&~o)/kt);return t[i][l]}for(var u=n|1<<i,h=i+1;n&1<<h;)h++;for(var c=0,d=0,f=0;d<s;d++){var p=1<<d;p&o||(c+=(f%2?-1:1)*t[i][d]*Pt(t,e-1,h,u,o|p,a),f++)}return a[r]=c}function Nt(t,e){var i=[[t[0],t[1],1,0,0,0,-e[0]*t[0],-e[0]*t[1]],[0,0,0,t[0],t[1],1,-e[1]*t[0],-e[1]*t[1]],[t[2],t[3],1,0,0,0,-e[2]*t[2],-e[2]*t[3]],[0,0,0,t[2],t[3],1,-e[3]*t[2],-e[3]*t[3]],[t[4],t[5],1,0,0,0,-e[4]*t[4],-e[4]*t[5]],[0,0,0,t[4],t[5],1,-e[5]*t[4],-e[5]*t[5]],[t[6],t[7],1,0,0,0,-e[6]*t[6],-e[6]*t[7]],[0,0,0,t[6],t[7],1,-e[7]*t[6],-e[7]*t[7]]],n={},o=Pt(i,8,0,0,0,n);if(0!==o){for(var a=[],r=0;r<8;r++)for(var s=0;s<8;s++)null==a[s]&&(a[s]=0),a[s]+=((r+s)%2?-1:1)*Pt(i,7,0===r?1:0,1<<r,1<<s,n)/o*e[r];return function(t,e,i){var n=e*a[6]+i*a[7]+1;t[0]=(e*a[0]+i*a[1]+a[2])/n,t[1]=(e*a[3]+i*a[4]+a[5])/n}}}var Ot="___zrEVENTSAVED",Et=[];function Rt(t,e,i,n,o){if(e.getBoundingClientRect&&v.domSupported&&!zt(e)){var a=e[Ot]||(e[Ot]={}),r=function(t,e,i){for(var n=i?"invTrans":"trans",o=e[n],a=e.srcCoords,r=!0,s=[],l=[],u=0;u<4;u++){var h=t[u].getBoundingClientRect(),c=2*u,d=h.left,f=h.top;s.push(d,f),r=r&&a&&d===a[c]&&f===a[1+c],l.push(t[u].offsetLeft,t[u].offsetTop)}return r&&o?o:(e.srcCoords=s,e[n]=i?Nt(l,s):Nt(s,l))}(function(t,e){var i=e.markers;if(i)return i;i=e.markers=[];for(var n=["left","right"],o=["top","bottom"],a=0;a<4;a++){var r=document.createElement("div"),s=r.style,l=a%2,u=(a>>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",n[l]+":0",o[u]+":0",n[1-l]+":auto",o[1-u]+":auto",""].join("!important;"),t.appendChild(r),i.push(r)}return i}(e,a),a,o);if(r)return r(t,i,n),!0}return!1}function zt(t){return"CANVAS"===t.nodeName.toUpperCase()}var Bt="undefined"!=typeof window&&!!window.addEventListener,Vt=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Gt=[];function Ft(t,e,i,n){return i=i||{},n||!v.canvasSupported?Wt(t,e,i):v.browser.firefox&&null!=e.layerX&&e.layerX!==e.offsetX?(i.zrX=e.layerX,i.zrY=e.layerY):null!=e.offsetX?(i.zrX=e.offsetX,i.zrY=e.offsetY):Wt(t,e,i),i}function Wt(t,e,i){if(v.domSupported&&t.getBoundingClientRect){var n=e.clientX,o=e.clientY;if(zt(t)){var a=t.getBoundingClientRect();return i.zrX=n-a.left,void(i.zrY=o-a.top)}if(Rt(Gt,t,n,o))return i.zrX=Gt[0],void(i.zrY=Gt[1])}i.zrX=i.zrY=0}function Ht(t){return t||window.event}function Zt(t,e,i){if(null!=(e=Ht(e)).zrX)return e;var n=e.type;if(n&&0<=n.indexOf("touch")){var o="touchend"!==n?e.targetTouches[0]:e.changedTouches[0];o&&Ft(t,o,e,i)}else Ft(t,e,e,i),e.zrDelta=e.wheelDelta?e.wheelDelta/120:-(e.detail||0)/3;var a=e.button;return null==e.which&&void 0!==a&&Vt.test(e.type)&&(e.which=1&a?1:2&a?3:4&a?2:0),e}function Ut(t,e,i,n){Bt?t.addEventListener(e,i,n):t.attachEvent("on"+e,i)}var Xt=Bt?function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0}:function(t){t.returnValue=!1,t.cancelBubble=!0};function Yt(t){return 2===t.which||3===t.which}function jt(){this._track=[]}function qt(t){var e=t[1][0]-t[0][0],i=t[1][1]-t[0][1];return Math.sqrt(e*e+i*i)}jt.prototype={constructor:jt,recognize:function(t,e,i){return this._doTrack(t,e,i),this._recognize(t)},clear:function(){return this._track.length=0,this},_doTrack:function(t,e,i){var n=t.touches;if(n){for(var o={points:[],touches:[],target:e,event:t},a=0,r=n.length;a<r;a++){var s=n[a],l=Ft(i,s,{});o.points.push([l.zrX,l.zrY]),o.touches.push(s)}this._track.push(o)}},_recognize:function(t){for(var e in Kt)if(Kt.hasOwnProperty(e)){var i=Kt[e](this._track,t);if(i)return i}}};var Kt={pinch:function(t,e){var i=t.length;if(i){var n=(t[i-1]||{}).points,o=(t[i-2]||{}).points||n;if(o&&1<o.length&&n&&1<n.length){var a=qt(n)/qt(o);isFinite(a)||(a=1),e.pinchScale=a;var r=function(t){return[(t[0][0]+t[1][0])/2,(t[0][1]+t[1][1])/2]}(n);return e.pinchX=r[0],e.pinchY=r[1],{type:"pinch",target:t[0].target,event:e}}}}},$t="silent";function Jt(){Xt(this.event)}function Qt(){}Qt.prototype.dispose=function(){};function te(t,e,i,n){Ct.call(this),this.storage=t,this.painter=e,this.painterRoot=n,i=i||new Qt,this.proxy=null,this._hovered={},this._lastTouchMoment,this._lastX,this._lastY,this._gestureMgr,Tt.call(this),this.setHandlerProxy(i)}var ee=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"];function ie(t,e,i){if(t[t.rectHover?"rectContain":"contain"](e,i)){for(var n,o=t;o;){if(o.clipPath&&!o.clipPath.contain(e,i))return!1;o.silent&&(n=!0),o=o.parent}return!n||$t}return!1}function ne(t,e,i){var n=t.painter;return e<0||e>n.getWidth()||i<0||i>n.getHeight()}te.prototype={constructor:te,setHandlerProxy:function(e){this.proxy&&this.proxy.dispose(),e&&(E(ee,function(t){e.on&&e.on(t,this[t],this)},this),e.handler=this),this.proxy=e},mousemove:function(t){var e=t.zrX,i=t.zrY,n=ne(this,e,i),o=this._hovered,a=o.target;a&&!a.__zr&&(a=(o=this.findHover(o.x,o.y)).target);var r=this._hovered=n?{x:e,y:i}:this.findHover(e,i),s=r.target,l=this.proxy;l.setCursor&&l.setCursor(s?s.cursor:"default"),a&&s!==a&&this.dispatchToElement(o,"mouseout",t),this.dispatchToElement(r,"mousemove",t),s&&s!==a&&this.dispatchToElement(r,"mouseover",t)},mouseout:function(t){var e=t.zrEventControl,i=t.zrIsToLocalDOM;"only_globalout"!==e&&this.dispatchToElement(this._hovered,"mouseout",t),"no_globalout"!==e&&(i||this.trigger("globalout",{type:"globalout",event:t}))},resize:function(t){this._hovered={}},dispatch:function(t,e){var i=this[t];i&&i.call(this,e)},dispose:function(){this.proxy.dispose(),this.storage=this.proxy=this.painter=null},setCursorStyle:function(t){var e=this.proxy;e.setCursor&&e.setCursor(t)},dispatchToElement:function(t,e,i){var n=(t=t||{}).target;if(!n||!n.silent){for(var o="on"+e,a=function(t,e,i){return{type:t,event:i,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:i.zrX,offsetY:i.zrY,gestureEvent:i.gestureEvent,pinchX:i.pinchX,pinchY:i.pinchY,pinchScale:i.pinchScale,wheelDelta:i.zrDelta,zrByTouch:i.zrByTouch,which:i.which,stop:Jt}}(e,t,i);n&&(n[o]&&(a.cancelBubble=n[o].call(n,a)),n.trigger(e,a),n=n.parent,!a.cancelBubble););a.cancelBubble||(this.trigger(e,a),this.painter&&this.painter.eachOtherLayer(function(t){"function"==typeof t[o]&&t[o].call(t,a),t.trigger&&t.trigger(e,a)}))}},findHover:function(t,e,i){for(var n=this.storage.getDisplayList(),o={x:t,y:e},a=n.length-1;0<=a;a--){var r;if(n[a]!==i&&!n[a].ignore&&(r=ie(n[a],t,e))&&(o.topTarget||(o.topTarget=n[a]),r!==$t)){o.target=n[a];break}}return o},processGesture:function(t,e){this._gestureMgr||(this._gestureMgr=new jt);var i=this._gestureMgr;"start"===e&&i.clear();var n=i.recognize(t,this.findHover(t.zrX,t.zrY,null).target,this.proxy.dom);if("end"===e&&i.clear(),n){var o=n.type;t.gestureEvent=o,this.dispatchToElement({target:n.target},o,n.event)}}},E(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(r){te.prototype[r]=function(t){var e,i,n=t.zrX,o=t.zrY,a=ne(this,n,o);if("mouseup"===r&&a||(i=(e=this.findHover(n,o)).target),"mousedown"===r)this._downEl=i,this._downPoint=[t.zrX,t.zrY],this._upEl=i;else if("mouseup"===r)this._upEl=i;else if("click"===r){if(this._downEl!==this._upEl||!this._downPoint||4<yt(this._downPoint,[t.zrX,t.zrY]))return;this._downPoint=null}this.dispatchToElement(e,r,t)}}),b(te,Ct),b(te,Tt);var oe="undefined"==typeof Float32Array?Array:Float32Array;function ae(){var t=new oe(6);return re(t),t}function re(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function se(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function le(t,e,i){var n=e[0]*i[0]+e[2]*i[1],o=e[1]*i[0]+e[3]*i[1],a=e[0]*i[2]+e[2]*i[3],r=e[1]*i[2]+e[3]*i[3],s=e[0]*i[4]+e[2]*i[5]+e[4],l=e[1]*i[4]+e[3]*i[5]+e[5];return t[0]=n,t[1]=o,t[2]=a,t[3]=r,t[4]=s,t[5]=l,t}function ue(t,e,i){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+i[0],t[5]=e[5]+i[1],t}function he(t,e,i){var n=e[0],o=e[2],a=e[4],r=e[1],s=e[3],l=e[5],u=Math.sin(i),h=Math.cos(i);return t[0]=n*h+r*u,t[1]=-n*u+r*h,t[2]=o*h+s*u,t[3]=-o*u+h*s,t[4]=h*a+u*l,t[5]=h*l-u*a,t}function ce(t,e,i){var n=i[0],o=i[1];return t[0]=e[0]*n,t[1]=e[1]*o,t[2]=e[2]*n,t[3]=e[3]*o,t[4]=e[4]*n,t[5]=e[5]*o,t}function de(t,e){var i=e[0],n=e[2],o=e[4],a=e[1],r=e[3],s=e[5],l=i*r-a*n;return l?(l=1/l,t[0]=r*l,t[1]=-a*l,t[2]=-n*l,t[3]=i*l,t[4]=(n*s-r*o)*l,t[5]=(a*o-i*s)*l,t):null}function fe(t){var e=ae();return se(e,t),e}var pe=(Object.freeze||Object)({create:ae,identity:re,copy:se,mul:le,translate:ue,rotate:he,scale:ce,invert:de,clone:fe}),ge=re;function me(t){return 5e-5<t||t<-5e-5}var ve=function(t){(t=t||{}).position||(this.position=[0,0]),null==t.rotation&&(this.rotation=0),t.scale||(this.scale=[1,1]),this.origin=this.origin||null},ye=ve.prototype;ye.transform=null,ye.needLocalTransform=function(){return me(this.rotation)||me(this.position[0])||me(this.position[1])||me(this.scale[0]-1)||me(this.scale[1]-1)};var xe=[];ye.updateTransform=function(){var t=this.parent,e=t&&t.transform,i=this.needLocalTransform(),n=this.transform;if(i||e){n=n||ae(),i?this.getLocalTransform(n):ge(n),e&&(i?le(n,t.transform,n):se(n,t.transform)),this.transform=n;var o=this.globalScaleRatio;if(null!=o&&1!==o){this.getGlobalScale(xe);var a=xe[0]<0?-1:1,r=xe[1]<0?-1:1,s=((xe[0]-a)*o+a)/xe[0]||0,l=((xe[1]-r)*o+r)/xe[1]||0;n[0]*=s,n[1]*=s,n[2]*=l,n[3]*=l}this.invTransform=this.invTransform||ae(),de(this.invTransform,n)}else n&&ge(n)},ye.getLocalTransform=function(t){return ve.getLocalTransform(this,t)},ye.setTransform=function(t){var e=this.transform,i=t.dpr||1;e?t.setTransform(i*e[0],i*e[1],i*e[2],i*e[3],i*e[4],i*e[5]):t.setTransform(i,0,0,i,0,0)},ye.restoreTransform=function(t){var e=t.dpr||1;t.setTransform(e,0,0,e,0,0)};var _e=[],we=ae();ye.setLocalTransform=function(t){if(t){var e=t[0]*t[0]+t[1]*t[1],i=t[2]*t[2]+t[3]*t[3],n=this.position,o=this.scale;me(e-1)&&(e=Math.sqrt(e)),me(i-1)&&(i=Math.sqrt(i)),t[0]<0&&(e=-e),t[3]<0&&(i=-i),n[0]=t[4],n[1]=t[5],o[0]=e,o[1]=i,this.rotation=Math.atan2(-t[1]/i,t[0]/e)}},ye.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(le(_e,t.invTransform,e),e=_e);var i=this.origin;i&&(i[0]||i[1])&&(we[4]=i[0],we[5]=i[1],le(_e,e,we),_e[4]-=i[0],_e[5]-=i[1],e=_e),this.setLocalTransform(e)}},ye.getGlobalScale=function(t){var e=this.transform;return t=t||[],e?(t[0]=Math.sqrt(e[0]*e[0]+e[1]*e[1]),t[1]=Math.sqrt(e[2]*e[2]+e[3]*e[3]),e[0]<0&&(t[0]=-t[0]),e[3]<0&&(t[1]=-t[1])):(t[0]=1,t[1]=1),t},ye.transformCoordToLocal=function(t,e){var i=[t,e],n=this.invTransform;return n&&bt(i,i,n),i},ye.transformCoordToGlobal=function(t,e){var i=[t,e],n=this.transform;return n&&bt(i,i,n),i},ve.getLocalTransform=function(t,e){ge(e=e||[]);var i=t.origin,n=t.scale||[1,1],o=t.rotation||0,a=t.position||[0,0];return i&&(e[4]-=i[0],e[5]-=i[1]),ce(e,e,n),o&&he(e,e,o),i&&(e[4]+=i[0],e[5]+=i[1]),e[4]+=a[0],e[5]+=a[1],e};var be={linear:function(t){return t},quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},quarticIn:function(t){return t*t*t*t},quarticOut:function(t){return 1- --t*t*t*t},quarticInOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},quinticIn:function(t){return t*t*t*t*t},quinticOut:function(t){return--t*t*t*t*t+1},quinticInOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},sinusoidalIn:function(t){return 1-Math.cos(t*Math.PI/2)},sinusoidalOut:function(t){return Math.sin(t*Math.PI/2)},sinusoidalInOut:function(t){return.5*(1-Math.cos(Math.PI*t))},exponentialIn:function(t){return 0===t?0:Math.pow(1024,t-1)},exponentialOut:function(t){return 1===t?1:1-Math.pow(2,-10*t)},exponentialInOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(2-Math.pow(2,-10*(t-1)))},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e,i=.1;return 0===t?0:1===t?1:(e=!i||i<1?(i=1,.1):.4*Math.asin(1/i)/(2*Math.PI),-i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4))},elasticOut:function(t){var e,i=.1;return 0===t?0:1===t?1:(e=!i||i<1?(i=1,.1):.4*Math.asin(1/i)/(2*Math.PI),i*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/.4)+1)},elasticInOut:function(t){var e,i=.1;return 0===t?0:1===t?1:(e=!i||i<1?(i=1,.1):.4*Math.asin(1/i)/(2*Math.PI),(t*=2)<1?i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4)*-.5:i*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4)*.5+1)},backIn:function(t){return t*t*(2.70158*t-1.70158)},backOut:function(t){return--t*t*(2.70158*t+1.70158)+1},backInOut:function(t){var e=2.5949095;return(t*=2)<1?t*t*((1+e)*t-e)*.5:.5*((t-=2)*t*((1+e)*t+e)+2)},bounceIn:function(t){return 1-be.bounceOut(1-t)},bounceOut:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bounceInOut:function(t){return t<.5?.5*be.bounceIn(2*t):.5*be.bounceOut(2*t-1)+.5}};function Se(t){this._target=t.target,this._life=t.life||1e3,this._delay=t.delay||0,this._initialized=!1,this.loop=null!=t.loop&&t.loop,this.gap=t.gap||0,this.easing=t.easing||"Linear",this.onframe=t.onframe,this.ondestroy=t.ondestroy,this.onrestart=t.onrestart,this._pausedTime=0,this._paused=!1}Se.prototype={constructor:Se,step:function(t,e){if(this._initialized||(this._startTime=t+this._delay,this._initialized=!0),this._paused)this._pausedTime+=e;else{var i=(t-this._startTime-this._pausedTime)/this._life;if(!(i<0)){i=Math.min(i,1);var n=this.easing,o="string"==typeof n?be[n]:n,a="function"==typeof o?o(i):i;return this.fire("frame",a),1===i?this.loop?(this.restart(t),"restart"):(this._needsRemove=!0,"destroy"):null}}},restart:function(t){var e=(t-this._startTime-this._pausedTime)%this._life;this._startTime=t-e+this.gap,this._pausedTime=0,this._needsRemove=!1},fire:function(t,e){this[t="on"+t]&&this[t](this._target,e)},pause:function(){this._paused=!0},resume:function(){this._paused=!1}};function Me(){this.head=null,this.tail=null,this._len=0}var Ie=Me.prototype;Ie.insert=function(t){var e=new Ae(t);return this.insertEntry(e),e},Ie.insertEntry=function(t){this.head?((this.tail.next=t).prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},Ie.remove=function(t){var e=t.prev,i=t.next;e?e.next=i:this.head=i,i?i.prev=e:this.tail=e,t.next=t.prev=null,this._len--},Ie.len=function(){return this._len},Ie.clear=function(){this.head=this.tail=null,this._len=0};function Te(t){this._list=new Me,this._map={},this._maxSize=t||10,this._lastRemovedEntry=null}var Ae=function(t){this.value=t,this.next,this.prev},De=Te.prototype;De.put=function(t,e){var i=this._list,n=this._map,o=null;if(null==n[t]){var a=i.len(),r=this._lastRemovedEntry;if(a>=this._maxSize&&0<a){var s=i.head;i.remove(s),delete n[s.key],o=s.value,this._lastRemovedEntry=s}r?r.value=e:r=new Ae(e),r.key=t,i.insertEntry(r),n[t]=r}return o},De.get=function(t){var e=this._map[t],i=this._list;if(null!=e)return e!==i.tail&&(i.remove(e),i.insertEntry(e)),e.value},De.clear=function(){this._list.clear(),this._map={}};var Ce={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function Le(t){return(t=Math.round(t))<0?0:255<t?255:t}function ke(t){return t<0?0:1<t?1:t}function Pe(t){return t.length&&"%"===t.charAt(t.length-1)?Le(parseFloat(t)/100*255):Le(parseInt(t,10))}function Ne(t){return t.length&&"%"===t.charAt(t.length-1)?ke(parseFloat(t)/100):ke(parseFloat(t))}function Oe(t,e,i){return i<0?i+=1:1<i&&(i-=1),6*i<1?t+(e-t)*i*6:2*i<1?e:3*i<2?t+(e-t)*(2/3-i)*6:t}function Ee(t,e,i){return t+(e-t)*i}function Re(t,e,i,n,o){return t[0]=e,t[1]=i,t[2]=n,t[3]=o,t}function ze(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var Be=new Te(20),Ve=null;function Ge(t,e){Ve&&ze(Ve,e),Ve=Be.put(t,Ve||e.slice())}function Fe(t,e){if(t){e=e||[];var i=Be.get(t);if(i)return ze(e,i);var n,o=(t+="").replace(/ /g,"").toLowerCase();if(o in Ce)return ze(e,Ce[o]),Ge(t,e),e;if("#"===o.charAt(0))return 4===o.length?0<=(n=parseInt(o.substr(1),16))&&n<=4095?(Re(e,(3840&n)>>4|(3840&n)>>8,240&n|(240&n)>>4,15&n|(15&n)<<4,1),Ge(t,e),e):void Re(e,0,0,0,1):7===o.length?0<=(n=parseInt(o.substr(1),16))&&n<=16777215?(Re(e,(16711680&n)>>16,(65280&n)>>8,255&n,1),Ge(t,e),e):void Re(e,0,0,0,1):void 0;var a=o.indexOf("("),r=o.indexOf(")");if(-1!==a&&r+1===o.length){var s=o.substr(0,a),l=o.substr(a+1,r-(a+1)).split(","),u=1;switch(s){case"rgba":if(4!==l.length)return void Re(e,0,0,0,1);u=Ne(l.pop());case"rgb":return 3!==l.length?void Re(e,0,0,0,1):(Re(e,Pe(l[0]),Pe(l[1]),Pe(l[2]),u),Ge(t,e),e);case"hsla":return 4!==l.length?void Re(e,0,0,0,1):(l[3]=Ne(l[3]),We(l,e),Ge(t,e),e);case"hsl":return 3!==l.length?void Re(e,0,0,0,1):(We(l,e),Ge(t,e),e);default:return}}Re(e,0,0,0,1)}}function We(t,e){var i=(parseFloat(t[0])%360+360)%360/360,n=Ne(t[1]),o=Ne(t[2]),a=o<=.5?o*(n+1):o+n-o*n,r=2*o-a;return Re(e=e||[],Le(255*Oe(r,a,i+1/3)),Le(255*Oe(r,a,i)),Le(255*Oe(r,a,i-1/3)),1),4===t.length&&(e[3]=t[3]),e}function He(t,e){var i=Fe(t);if(i){for(var n=0;n<3;n++)i[n]=e<0?i[n]*(1-e)|0:(255-i[n])*e+i[n]|0,255<i[n]?i[n]=255:t[n]<0&&(i[n]=0);return $e(i,4===i.length?"rgba":"rgb")}}function Ze(t){var e=Fe(t);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1)}function Ue(t,e,i){if(e&&e.length&&0<=t&&t<=1){i=i||[];var n=t*(e.length-1),o=Math.floor(n),a=Math.ceil(n),r=e[o],s=e[a],l=n-o;return i[0]=Le(Ee(r[0],s[0],l)),i[1]=Le(Ee(r[1],s[1],l)),i[2]=Le(Ee(r[2],s[2],l)),i[3]=ke(Ee(r[3],s[3],l)),i}}var Xe=Ue;function Ye(t,e,i){if(e&&e.length&&0<=t&&t<=1){var n=t*(e.length-1),o=Math.floor(n),a=Math.ceil(n),r=Fe(e[o]),s=Fe(e[a]),l=n-o,u=$e([Le(Ee(r[0],s[0],l)),Le(Ee(r[1],s[1],l)),Le(Ee(r[2],s[2],l)),ke(Ee(r[3],s[3],l))],"rgba");return i?{color:u,leftIndex:o,rightIndex:a,value:n}:u}}var je=Ye;function qe(t,e,i,n){if(t=Fe(t))return t=function(t){if(t){var e,i,n=t[0]/255,o=t[1]/255,a=t[2]/255,r=Math.min(n,o,a),s=Math.max(n,o,a),l=s-r,u=(s+r)/2;if(0==l)i=e=0;else{i=u<.5?l/(s+r):l/(2-s-r);var h=((s-n)/6+l/2)/l,c=((s-o)/6+l/2)/l,d=((s-a)/6+l/2)/l;n===s?e=d-c:o===s?e=1/3+h-d:a===s&&(e=2/3+c-h),e<0&&(e+=1),1<e&&(e-=1)}var f=[360*e,i,u];return null!=t[3]&&f.push(t[3]),f}}(t),null!=e&&(t[0]=function(t){return(t=Math.round(t))<0?0:360<t?360:t}(e)),null!=i&&(t[1]=Ne(i)),null!=n&&(t[2]=Ne(n)),$e(We(t),"rgba")}function Ke(t,e){if((t=Fe(t))&&null!=e)return t[3]=ke(e),$e(t,"rgba")}function $e(t,e){if(t&&t.length){var i=t[0]+","+t[1]+","+t[2];return"rgba"!==e&&"hsva"!==e&&"hsla"!==e||(i+=","+t[3]),e+"("+i+")"}}var Je=(Object.freeze||Object)({parse:Fe,lift:He,toHex:Ze,fastLerp:Ue,fastMapToColor:Xe,lerp:Ye,mapToColor:je,modifyHSL:qe,modifyAlpha:Ke,stringify:$e}),Qe=Array.prototype.slice;function ti(t,e){return t[e]}function ei(t,e,i){t[e]=i}function ii(t,e,i){return(e-t)*i+t}function ni(t,e,i){return.5<i?e:t}function oi(t,e,i,n,o){var a=t.length;if(1===o)for(var r=0;r<a;r++)n[r]=ii(t[r],e[r],i);else{var s=a&&t[0].length;for(r=0;r<a;r++)for(var l=0;l<s;l++)n[r][l]=ii(t[r][l],e[r][l],i)}}function ai(t,e,i){var n=t.length,o=e.length;if(n!==o)if(o<n)t.length=o;else for(var a=n;a<o;a++)t.push(1===i?e[a]:Qe.call(e[a]));var r=t[0]&&t[0].length;for(a=0;a<t.length;a++)if(1===i)isNaN(t[a])&&(t[a]=e[a]);else for(var s=0;s<r;s++)isNaN(t[a][s])&&(t[a][s]=e[a][s])}function ri(t,e,i){if(t===e)return!0;var n=t.length;if(n!==e.length)return!1;if(1===i){for(var o=0;o<n;o++)if(t[o]!==e[o])return!1}else{var a=t[0].length;for(o=0;o<n;o++)for(var r=0;r<a;r++)if(t[o][r]!==e[o][r])return!1}return!0}function si(t,e,i,n,o,a,r,s,l){var u=t.length;if(1===l)for(var h=0;h<u;h++)s[h]=li(t[h],e[h],i[h],n[h],o,a,r);else{var c=t[0].length;for(h=0;h<u;h++)for(var d=0;d<c;d++)s[h][d]=li(t[h][d],e[h][d],i[h][d],n[h][d],o,a,r)}}function li(t,e,i,n,o,a,r){var s=.5*(i-t),l=.5*(n-e);return(2*(e-i)+s+l)*r+(-3*(e-i)-2*s-l)*a+s*o+e}function ui(t){if(P(t)){var e=t.length;if(P(t[0])){for(var i=[],n=0;n<e;n++)i.push(Qe.call(t[n]));return i}return Qe.call(t)}return t}function hi(t){return t[0]=Math.floor(t[0]),t[1]=Math.floor(t[1]),t[2]=Math.floor(t[2]),"rgba("+t.join(",")+")"}function ci(t,e,i,n,a,o){var r=t._getter,s=t._setter,l="spline"===e,u=n.length;if(u){var h,c=P(n[0].value),d=!1,f=!1,p=c?function(t){var e=t[t.length-1].value;return P(e&&e[0])?2:1}(n):0;n.sort(function(t,e){return t.time-e.time}),h=n[u-1].time;for(var g=[],m=[],v=n[0].value,y=!0,x=0;x<u;x++){g.push(n[x].time/h);var _=n[x].value;if(c&&ri(_,v,p)||!c&&_===v||(y=!1),"string"==typeof(v=_)){var w=Fe(_);w?(_=w,d=!0):f=!0}m.push(_)}if(o||!y){var b=m[u-1];for(x=0;x<u-1;x++)c?ai(m[x],b,p):!isNaN(m[x])||isNaN(b)||f||d||(m[x]=b);c&&ai(r(t._target,a),b,p);var S,M,I,T,A,D=0,C=0;if(d)var L=[0,0,0,0];var k=new Se({target:t._target,life:h,loop:t._loop,delay:t._delay,onframe:function(t,e){var i;if(e<0)i=0;else if(e<C){for(i=Math.min(D+1,u-1);0<=i&&!(g[i]<=e);i--);i=Math.min(i,u-2)}else{for(i=D;i<u&&!(g[i]>e);i++);i=Math.min(i-1,u-2)}C=e;var n=g[(D=i)+1]-g[i];if(0!=n)if(S=(e-g[i])/n,l)if(I=m[i],M=m[0===i?i:i-1],T=m[u-2<i?u-1:i+1],A=m[u-3<i?u-1:i+2],c)si(M,I,T,A,S,S*S,S*S*S,r(t,a),p);else{if(d)o=si(M,I,T,A,S,S*S,S*S*S,L,1),o=hi(L);else{if(f)return ni(I,T,S);o=li(M,I,T,A,S,S*S,S*S*S)}s(t,a,o)}else if(c)oi(m[i],m[i+1],S,r(t,a),p);else{var o;if(d)oi(m[i],m[i+1],S,L,1),o=hi(L);else{if(f)return ni(m[i],m[i+1],S);o=ii(m[i],m[i+1],S)}s(t,a,o)}},ondestroy:i});return e&&"spline"!==e&&(k.easing=e),k}}}function di(t,e,i,n){this._tracks={},this._target=t,this._loop=e||!1,this._getter=i||ti,this._setter=n||ei,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]}di.prototype={when:function(t,e){var i=this._tracks;for(var n in e)if(e.hasOwnProperty(n)){if(!i[n]){i[n]=[];var o=this._getter(this._target,n);if(null==o)continue;0!==t&&i[n].push({time:0,value:ui(o)})}i[n].push({time:t,value:e[n]})}return this},during:function(t){return this._onframeList.push(t),this},pause:function(){for(var t=0;t<this._clipList.length;t++)this._clipList[t].pause();this._paused=!0},resume:function(){for(var t=0;t<this._clipList.length;t++)this._clipList[t].resume();this._paused=!1},isPaused:function(){return!!this._paused},_doneCallback:function(){this._tracks={},this._clipList.length=0;for(var t=this._doneList,e=t.length,i=0;i<e;i++)t[i].call(this)},start:function(t,e){function i(){--a||o._doneCallback()}var n,o=this,a=0;for(var r in this._tracks)if(this._tracks.hasOwnProperty(r)){var s=ci(this,t,i,this._tracks[r],r,e);s&&(this._clipList.push(s),a++,this.animation&&this.animation.addClip(s),n=s)}if(n){var l=n.onframe;n.onframe=function(t,e){l(t,e);for(var i=0;i<o._onframeList.length;i++)o._onframeList[i](t,e)}}return a||this._doneCallback(),this},stop:function(t){for(var e=this._clipList,i=this.animation,n=0;n<e.length;n++){var o=e[n];t&&o.onframe(this._target,1),i&&i.removeClip(o)}e.length=0},delay:function(t){return this._delay=t,this},done:function(t){return t&&this._doneList.push(t),this},getClips:function(){return this._clipList}};var fi=1;"undefined"!=typeof window&&(fi=Math.max(window.devicePixelRatio||1,1));var pi=fi,gi=function(){};function mi(){this.animators=[]}var vi=gi;function yi(t,e,i,n,o,a,r,s){R(n)?(a=o,o=n,n=0):C(o)?(a=o,o="linear",n=0):C(n)?(a=n,n=0):i=C(i)?(a=i,500):i||500,t.stopAnimation(),function t(e,i,n,o,a,r,s){var l={};var u=0;for(var h in o)o.hasOwnProperty(h)&&(null!=n[h]?z(o[h])&&!P(o[h])?t(e,i?i+"."+h:h,n[h],o[h],a,r,s):(s?(l[h]=n[h],xi(e,i,h,o[h])):l[h]=o[h],u++):null==o[h]||s||xi(e,i,h,o[h]));0<u&&e.animate(i,!1).when(null==a?500:a,l).delay(r||0)}(t,"",t,e,i,n,s);var l=t.animators.slice(),u=l.length;function h(){--u||a&&a()}u||a&&a();for(var c=0;c<l.length;c++)l[c].done(h).start(o,r)}function xi(t,e,i,n){if(e){var o={};o[e]={},o[e][i]=n,t.attr(o)}else t.attr(i,n)}mi.prototype={constructor:mi,animate:function(t,e){var i,n=!1,o=this,a=this.__zr;if(t){var r=t.split("."),s=o;n="shape"===r[0];for(var l=0,u=r.length;l<u;l++)s=s&&s[r[l]];s&&(i=s)}else i=o;if(i){var h=o.animators,c=new di(i,e);return c.during(function(t){o.dirty(n)}).done(function(){h.splice(_(h,c),1)}),h.push(c),a&&a.animation.addAnimator(c),c}vi('Property "'+t+'" is not existed in element '+o.id)},stopAnimation:function(t){for(var e=this.animators,i=e.length,n=0;n<i;n++)e[n].stop(t);return e.length=0,this},animateTo:function(t,e,i,n,o,a){yi(this,t,e,i,n,o,a)},animateFrom:function(t,e,i,n,o,a){yi(this,t,e,i,n,o,a,!0)}};var _i=function(t){ve.call(this,t),Ct.call(this,t),mi.call(this,t),this.id=t.id||n()};_i.prototype={type:"element",name:"",__zr:null,ignore:!1,clipPath:null,isGroup:!1,drift:function(t,e){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0}var i=this.transform;(i=i||(this.transform=[1,0,0,1,0,0]))[4]+=t,i[5]+=e,this.decomposeTransform(),this.dirty(!1)},beforeUpdate:function(){},afterUpdate:function(){},update:function(){this.updateTransform()},traverse:function(t,e){},attrKV:function(t,e){if("position"===t||"scale"===t||"origin"===t){if(e){var i=this[t];(i=i||(this[t]=[]))[0]=e[0],i[1]=e[1]}}else this[t]=e},hide:function(){this.ignore=!0,this.__zr&&this.__zr.refresh()},show:function(){this.ignore=!1,this.__zr&&this.__zr.refresh()},attr:function(t,e){if("string"==typeof t)this.attrKV(t,e);else if(z(t))for(var i in t)t.hasOwnProperty(i)&&this.attrKV(i,t[i]);return this.dirty(!1),this},setClipPath:function(t){var e=this.__zr;e&&t.addSelfToZr(e),this.clipPath&&this.clipPath!==t&&this.removeClipPath(),(this.clipPath=t).__zr=e,(t.__clipTarget=this).dirty(!1)},removeClipPath:function(){var t=this.clipPath;t&&(t.__zr&&t.removeSelfFromZr(t.__zr),t.__zr=null,t.__clipTarget=null,this.clipPath=null,this.dirty(!1))},addSelfToZr:function(t){this.__zr=t;var e=this.animators;if(e)for(var i=0;i<e.length;i++)t.animation.addAnimator(e[i]);this.clipPath&&this.clipPath.addSelfToZr(t)},removeSelfFromZr:function(t){this.__zr=null;var e=this.animators;if(e)for(var i=0;i<e.length;i++)t.animation.removeAnimator(e[i]);this.clipPath&&this.clipPath.removeSelfFromZr(t)}},b(_i,mi),b(_i,ve),b(_i,Ct);var wi,bi,Si,Mi,Ii=bt,Ti=Math.min,Ai=Math.max;function Di(t,e,i,n){i<0&&(t+=i,i=-i),n<0&&(e+=n,n=-n),this.x=t,this.y=e,this.width=i,this.height=n}Di.prototype={constructor:Di,union:function(t){var e=Ti(t.x,this.x),i=Ti(t.y,this.y);this.width=Ai(t.x+t.width,this.x+this.width)-e,this.height=Ai(t.y+t.height,this.y+this.height)-i,this.x=e,this.y=i},applyTransform:(wi=[],bi=[],Si=[],Mi=[],function(t){if(t){wi[0]=Si[0]=this.x,wi[1]=Mi[1]=this.y,bi[0]=Mi[0]=this.x+this.width,bi[1]=Si[1]=this.y+this.height,Ii(wi,wi,t),Ii(bi,bi,t),Ii(Si,Si,t),Ii(Mi,Mi,t),this.x=Ti(wi[0],bi[0],Si[0],Mi[0]),this.y=Ti(wi[1],bi[1],Si[1],Mi[1]);var e=Ai(wi[0],bi[0],Si[0],Mi[0]),i=Ai(wi[1],bi[1],Si[1],Mi[1]);this.width=e-this.x,this.height=i-this.y}}),calculateTransform:function(t){var e=t.width/this.width,i=t.height/this.height,n=ae();return ue(n,n,[-this.x,-this.y]),ce(n,n,[e,i]),ue(n,n,[t.x,t.y]),n},intersect:function(t){if(!t)return!1;t instanceof Di||(t=Di.create(t));var e=this,i=e.x,n=e.x+e.width,o=e.y,a=e.y+e.height,r=t.x,s=t.x+t.width,l=t.y,u=t.y+t.height;return!(n<r||s<i||a<l||u<o)},contain:function(t,e){var i=this;return t>=i.x&&t<=i.x+i.width&&e>=i.y&&e<=i.y+i.height},clone:function(){return new Di(this.x,this.y,this.width,this.height)},copy:function(t){this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height},plain:function(){return{x:this.x,y:this.y,width:this.width,height:this.height}}},Di.create=function(t){return new Di(t.x,t.y,t.width,t.height)};var Ci=function(t){for(var e in t=t||{},_i.call(this,t),t)t.hasOwnProperty(e)&&(this[e]=t[e]);this._children=[],this.__storage=null,this.__dirty=!0};Ci.prototype={constructor:Ci,isGroup:!0,type:"group",silent:!1,children:function(){return this._children.slice()},childAt:function(t){return this._children[t]},childOfName:function(t){for(var e=this._children,i=0;i<e.length;i++)if(e[i].name===t)return e[i]},childCount:function(){return this._children.length},add:function(t){return t&&t!==this&&t.parent!==this&&(this._children.push(t),this._doAdd(t)),this},addBefore:function(t,e){if(t&&t!==this&&t.parent!==this&&e&&e.parent===this){var i=this._children,n=i.indexOf(e);0<=n&&(i.splice(n,0,t),this._doAdd(t))}return this},_doAdd:function(t){t.parent&&t.parent.remove(t);var e=(t.parent=this).__storage,i=this.__zr;e&&e!==t.__storage&&(e.addToStorage(t),t instanceof Ci&&t.addChildrenToStorage(e)),i&&i.refresh()},remove:function(t){var e=this.__zr,i=this.__storage,n=this._children,o=_(n,t);return o<0||(n.splice(o,1),t.parent=null,i&&(i.delFromStorage(t),t instanceof Ci&&t.delChildrenFromStorage(i)),e&&e.refresh()),this},removeAll:function(){var t,e,i=this._children,n=this.__storage;for(e=0;e<i.length;e++)t=i[e],n&&(n.delFromStorage(t),t instanceof Ci&&t.delChildrenFromStorage(n)),t.parent=null;return i.length=0,this},eachChild:function(t,e){for(var i=this._children,n=0;n<i.length;n++){var o=i[n];t.call(e,o,n)}return this},traverse:function(t,e){for(var i=0;i<this._children.length;i++){var n=this._children[i];t.call(e,n),"group"===n.type&&n.traverse(t,e)}return this},addChildrenToStorage:function(t){for(var e=0;e<this._children.length;e++){var i=this._children[e];t.addToStorage(i),i instanceof Ci&&i.addChildrenToStorage(t)}},delChildrenFromStorage:function(t){for(var e=0;e<this._children.length;e++){var i=this._children[e];t.delFromStorage(i),i instanceof Ci&&i.delChildrenFromStorage(t)}},dirty:function(){return this.__dirty=!0,this.__zr&&this.__zr.refresh(),this},getBoundingRect:function(t){for(var e=null,i=new Di(0,0,0,0),n=t||this._children,o=[],a=0;a<n.length;a++){var r=n[a];if(!r.ignore&&!r.invisible){var s=r.getBoundingRect(),l=r.getLocalTransform(o);l?(i.copy(s),i.applyTransform(l),(e=e||i.clone()).union(i)):(e=e||s.clone()).union(s)}}return e||i}},w(Ci,_i);var Li=32,ki=7;function Pi(t,e,i,n){var o=e+1;if(o===i)return 1;if(n(t[o++],t[e])<0){for(;o<i&&n(t[o],t[o-1])<0;)o++;!function(t,e,i){i--;for(;e<i;){var n=t[e];t[e++]=t[i],t[i--]=n}}(t,e,o)}else for(;o<i&&0<=n(t[o],t[o-1]);)o++;return o-e}function Ni(t,e,i,n,o){for(n===e&&n++;n<i;n++){for(var a,r=t[n],s=e,l=n;s<l;)o(r,t[a=s+l>>>1])<0?l=a:s=1+a;var u=n-s;switch(u){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;0<u;)t[s+u]=t[s+u-1],u--}t[s]=r}}function Oi(t,e,i,n,o,a){var r=0,s=0,l=1;if(0<a(t,e[i+o])){for(s=n-o;l<s&&0<a(t,e[i+o+l]);)(l=1+((r=l)<<1))<=0&&(l=s);s<l&&(l=s),r+=o,l+=o}else{for(s=o+1;l<s&&a(t,e[i+o-l])<=0;)(l=1+((r=l)<<1))<=0&&(l=s);s<l&&(l=s);var u=r;r=o-l,l=o-u}for(r++;r<l;){var h=r+(l-r>>>1);0<a(t,e[i+h])?r=h+1:l=h}return l}function Ei(t,e,i,n,o,a){var r=0,s=0,l=1;if(a(t,e[i+o])<0){for(s=o+1;l<s&&a(t,e[i+o-l])<0;)(l=1+((r=l)<<1))<=0&&(l=s);s<l&&(l=s);var u=r;r=o-l,l=o-u}else{for(s=n-o;l<s&&0<=a(t,e[i+o+l]);)(l=1+((r=l)<<1))<=0&&(l=s);s<l&&(l=s),r+=o,l+=o}for(r++;r<l;){var h=r+(l-r>>>1);a(t,e[i+h])<0?l=h:r=h+1}return l}function Ri(p,g){var r,s,m=ki,l=0,v=[];function e(t){var e=r[t],i=s[t],n=r[t+1],o=s[t+1];s[t]=i+o,t===l-3&&(r[t+1]=r[t+2],s[t+1]=s[t+2]),l--;var a=Ei(p[n],p,e,i,0,g);e+=a,0!==(i-=a)&&0!==(o=Oi(p[e+i-1],p,n,o,o-1,g))&&(i<=o?function(t,e,i,n){var o=0;for(o=0;o<e;o++)v[o]=p[t+o];var a=0,r=i,s=t;if(p[s++]=p[r++],0==--n){for(o=0;o<e;o++)p[s+o]=v[a+o];return}if(1===e){for(o=0;o<n;o++)p[s+o]=p[r+o];return p[s+n]=v[a]}var l,u,h,c=m;for(;;){u=l=0,h=!1;do{if(g(p[r],v[a])<0){if(p[s++]=p[r++],u++,(l=0)==--n){h=!0;break}}else if(p[s++]=v[a++],l++,u=0,1==--e){h=!0;break}}while((l|u)<c);if(h)break;do{if(0!==(l=Ei(p[r],v,a,e,0,g))){for(o=0;o<l;o++)p[s+o]=v[a+o];if(s+=l,a+=l,(e-=l)<=1){h=!0;break}}if(p[s++]=p[r++],0==--n){h=!0;break}if(0!==(u=Oi(v[a],p,r,n,0,g))){for(o=0;o<u;o++)p[s+o]=p[r+o];if(s+=u,r+=u,0===(n-=u)){h=!0;break}}if(p[s++]=v[a++],1==--e){h=!0;break}c--}while(ki<=l||ki<=u);if(h)break;c<0&&(c=0),c+=2}if((m=c)<1&&(m=1),1===e){for(o=0;o<n;o++)p[s+o]=p[r+o];p[s+n]=v[a]}else{if(0===e)throw new Error;for(o=0;o<e;o++)p[s+o]=v[a+o]}}(e,i,n,o):function(t,e,i,n){var o=0;for(o=0;o<n;o++)v[o]=p[i+o];var a=t+e-1,r=n-1,s=i+n-1,l=0,u=0;if(p[s--]=p[a--],0==--e){for(l=s-(n-1),o=0;o<n;o++)p[l+o]=v[o];return}if(1===n){for(u=(s-=e)+1,l=(a-=e)+1,o=e-1;0<=o;o--)p[u+o]=p[l+o];return p[s]=v[r]}var h=m;for(;;){var c=0,d=0,f=!1;do{if(g(v[r],p[a])<0){if(p[s--]=p[a--],c++,(d=0)==--e){f=!0;break}}else if(p[s--]=v[r--],d++,c=0,1==--n){f=!0;break}}while((c|d)<h);if(f)break;do{if(0!==(c=e-Ei(v[r],p,t,e,e-1,g))){for(e-=c,u=(s-=c)+1,l=(a-=c)+1,o=c-1;0<=o;o--)p[u+o]=p[l+o];if(0===e){f=!0;break}}if(p[s--]=v[r--],1==--n){f=!0;break}if(0!==(d=n-Oi(p[a],v,0,n,n-1,g))){for(n-=d,u=(s-=d)+1,l=(r-=d)+1,o=0;o<d;o++)p[u+o]=v[l+o];if(n<=1){f=!0;break}}if(p[s--]=p[a--],0==--e){f=!0;break}h--}while(ki<=c||ki<=d);if(f)break;h<0&&(h=0),h+=2}(m=h)<1&&(m=1);if(1===n){for(u=(s-=e)+1,l=(a-=e)+1,o=e-1;0<=o;o--)p[u+o]=p[l+o];p[s]=v[r]}else{if(0===n)throw new Error;for(l=s-(n-1),o=0;o<n;o++)p[l+o]=v[o]}}(e,i,n,o))}r=[],s=[],this.mergeRuns=function(){for(;1<l;){var t=l-2;if(1<=t&&s[t-1]<=s[t]+s[t+1]||2<=t&&s[t-2]<=s[t]+s[t-1])s[t-1]<s[t+1]&&t--;else if(s[t]>s[t+1])break;e(t)}},this.forceMergeRuns=function(){for(;1<l;){var t=l-2;0<t&&s[t-1]<s[t+1]&&t--,e(t)}},this.pushRun=function(t,e){r[l]=t,s[l]=e,l+=1}}function zi(t,e,i,n){i=i||0;var o=(n=n||t.length)-i;if(!(o<2)){var a=0;if(o<Li)Ni(t,i,n,i+(a=Pi(t,i,n,e)),e);else{var r=new Ri(t,e),s=function(t){for(var e=0;Li<=t;)e|=1&t,t>>=1;return t+e}(o);do{if((a=Pi(t,i,n,e))<s){var l=o;s<l&&(l=s),Ni(t,i,i+l,i+a,e),a=l}r.pushRun(i,a),r.mergeRuns(),o-=a,i+=a}while(0!==o);r.forceMergeRuns()}}}function Bi(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}function Vi(){this._roots=[],this._displayList=[],this._displayListLen=0}Vi.prototype={constructor:Vi,traverse:function(t,e){for(var i=0;i<this._roots.length;i++)this._roots[i].traverse(t,e)},getDisplayList:function(t,e){return e=e||!1,t&&this.updateDisplayList(e),this._displayList},updateDisplayList:function(t){this._displayListLen=0;for(var e=this._roots,i=this._displayList,n=0,o=e.length;n<o;n++)this._updateAndAddDisplayable(e[n],null,t);i.length=this._displayListLen,v.canvasSupported&&zi(i,Bi)},_updateAndAddDisplayable:function(t,e,i){if(!t.ignore||i){t.beforeUpdate(),t.__dirty&&t.update(),t.afterUpdate();var n=t.clipPath;if(n){e=e?e.slice():[];for(var o=n,a=t;o;)o.parent=a,o.updateTransform(),e.push(o),o=(a=o).clipPath}if(t.isGroup){for(var r=t._children,s=0;s<r.length;s++){var l=r[s];t.__dirty&&(l.__dirty=!0),this._updateAndAddDisplayable(l,e,i)}t.__dirty=!1}else t.__clipPaths=e,this._displayList[this._displayListLen++]=t}},addRoot:function(t){t.__storage!==this&&(t instanceof Ci&&t.addChildrenToStorage(this),this.addToStorage(t),this._roots.push(t))},delRoot:function(t){if(null==t){for(var e=0;e<this._roots.length;e++){var i=this._roots[e];i instanceof Ci&&i.delChildrenFromStorage(this)}return this._roots=[],this._displayList=[],void(this._displayListLen=0)}if(t instanceof Array){e=0;for(var n=t.length;e<n;e++)this.delRoot(t[e])}else{var o=_(this._roots,t);0<=o&&(this.delFromStorage(t),this._roots.splice(o,1),t instanceof Ci&&t.delChildrenFromStorage(this))}},addToStorage:function(t){return t&&(t.__storage=this,t.dirty(!1)),this},delFromStorage:function(t){return t&&(t.__storage=null),this},dispose:function(){this._renderList=this._roots=null},displayableSortFunc:Bi};var Gi={shadowBlur:1,shadowOffsetX:1,shadowOffsetY:1,textShadowBlur:1,textShadowOffsetX:1,textShadowOffsetY:1,textBoxShadowBlur:1,textBoxShadowOffsetX:1,textBoxShadowOffsetY:1},Fi=function(t,e,i){return Gi.hasOwnProperty(e)?i*t.dpr:i},Wi={NONE:0,STYLE_BIND:1,PLAIN_TEXT:2},Hi=9,Zi=[["shadowBlur",0],["shadowOffsetX",0],["shadowOffsetY",0],["shadowColor","#000"],["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]],Ui=function(t){this.extendFrom(t,!1)};function Xi(t,e,i){var n=null==e.x?0:e.x,o=null==e.x2?1:e.x2,a=null==e.y?0:e.y,r=null==e.y2?0:e.y2;return e.global||(n=n*i.width+i.x,o=o*i.width+i.x,a=a*i.height+i.y,r=r*i.height+i.y),n=isNaN(n)?0:n,o=isNaN(o)?1:o,a=isNaN(a)?0:a,r=isNaN(r)?0:r,t.createLinearGradient(n,a,o,r)}function Yi(t,e,i){var n=i.width,o=i.height,a=Math.min(n,o),r=null==e.x?.5:e.x,s=null==e.y?.5:e.y,l=null==e.r?.5:e.r;return e.global||(r=r*n+i.x,s=s*o+i.y,l*=a),t.createRadialGradient(r,s,0,r,s,l)}Ui.prototype={constructor:Ui,fill:"#000",stroke:null,opacity:1,fillOpacity:null,strokeOpacity:null,lineDash:null,lineDashOffset:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,lineWidth:1,strokeNoScale:!1,text:null,font:null,textFont:null,fontStyle:null,fontWeight:null,fontSize:null,fontFamily:null,textTag:null,textFill:"#000",textStroke:null,textWidth:null,textHeight:null,textStrokeWidth:0,textLineHeight:null,textPosition:"inside",textRect:null,textOffset:null,textAlign:null,textVerticalAlign:null,textDistance:5,textShadowColor:"transparent",textShadowBlur:0,textShadowOffsetX:0,textShadowOffsetY:0,textBoxShadowColor:"transparent",textBoxShadowBlur:0,textBoxShadowOffsetX:0,textBoxShadowOffsetY:0,transformText:!1,textRotation:0,textOrigin:null,textBackgroundColor:null,textBorderColor:null,textBorderWidth:0,textBorderRadius:0,textPadding:null,rich:null,truncate:null,blend:null,bind:function(t,e,i){var n=this,o=i&&i.style,a=!o||t.__attrCachedBy!==Wi.STYLE_BIND;t.__attrCachedBy=Wi.STYLE_BIND;for(var r=0;r<Zi.length;r++){var s=Zi[r],l=s[0];!a&&n[l]===o[l]||(t[l]=Fi(t,l,n[l]||s[1]))}if(!a&&n.fill===o.fill||(t.fillStyle=n.fill),!a&&n.stroke===o.stroke||(t.strokeStyle=n.stroke),!a&&n.opacity===o.opacity||(t.globalAlpha=null==n.opacity?1:n.opacity),!a&&n.blend===o.blend||(t.globalCompositeOperation=n.blend||"source-over"),this.hasStroke()){var u=n.lineWidth;t.lineWidth=u/(this.strokeNoScale&&e&&e.getLineScale?e.getLineScale():1)}},hasFill:function(){var t=this.fill;return null!=t&&"none"!==t},hasStroke:function(){var t=this.stroke;return null!=t&&"none"!==t&&0<this.lineWidth},extendFrom:function(t,e){if(t)for(var i in t)!t.hasOwnProperty(i)||!0!==e&&(!1===e?this.hasOwnProperty(i):null==t[i])||(this[i]=t[i])},set:function(t,e){"string"==typeof t?this[t]=e:this.extendFrom(t,!0)},clone:function(){var t=new this.constructor;return t.extendFrom(this,!0),t},getGradient:function(t,e,i){for(var n=("radial"===e.type?Yi:Xi)(t,e,i),o=e.colorStops,a=0;a<o.length;a++)n.addColorStop(o[a].offset,o[a].color);return n}};for(var ji=Ui.prototype,qi=0;qi<Zi.length;qi++){var Ki=Zi[qi];Ki[0]in ji||(ji[Ki[0]]=Ki[1])}Ui.getGradient=ji.getGradient;function $i(t,e){this.image=t,this.repeat=e,this.type="pattern"}function Ji(){return!1}function Qi(t,e,i){var n=g(),o=e.getWidth(),a=e.getHeight(),r=n.style;return r&&(r.position="absolute",r.left=0,r.top=0,r.width=o+"px",r.height=a+"px",n.setAttribute("data-zr-dom-id",t)),n.width=o*i,n.height=a*i,n}function tn(t,e,i){var n;i=i||pi,"string"==typeof t?n=Qi(t,e,i):z(t)&&(t=(n=t).id),this.id=t;var o=(this.dom=n).style;o&&(n.onselectstart=Ji,o["-webkit-user-select"]="none",o["user-select"]="none",o["-webkit-touch-callout"]="none",o["-webkit-tap-highlight-color"]="rgba(0,0,0,0)",o.padding=0,o.margin=0,o["border-width"]=0),this.domBack=null,this.ctxBack=null,this.painter=e,this.config=null,this.clearColor=0,this.motionBlur=!1,this.lastFrameAlpha=.7,this.dpr=i}tn.prototype={constructor:tn,__dirty:!0,__used:!($i.prototype.getCanvasPattern=function(t){return t.createPattern(this.image,this.repeat||"repeat")}),__drawIndex:0,__startIndex:0,__endIndex:0,incremental:!1,getElementCount:function(){return this.__endIndex-this.__startIndex},initContext:function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},createBackBuffer:function(){var t=this.dpr;this.domBack=Qi("back-"+this.id,this.painter,t),this.ctxBack=this.domBack.getContext("2d"),1!==t&&this.ctxBack.scale(t,t)},resize:function(t,e){var i=this.dpr,n=this.dom,o=n.style,a=this.domBack;o&&(o.width=t+"px",o.height=e+"px"),n.width=t*i,n.height=e*i,a&&(a.width=t*i,a.height=e*i,1!==i&&this.ctxBack.scale(i,i))},clear:function(t,e){var i,n=this.dom,o=this.ctx,a=n.width,r=n.height,s=(e=e||this.clearColor,this.motionBlur&&!t),l=this.lastFrameAlpha,u=this.dpr;s&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(n,0,0,a/u,r/u)),o.clearRect(0,0,a,r),e&&"transparent"!==e&&(e.colorStops?(i=e.__canvasGradient||Ui.getGradient(o,e,{x:0,y:0,width:a,height:r}),e.__canvasGradient=i):e.image&&(i=$i.prototype.getCanvasPattern.call(e,o)),o.save(),o.fillStyle=i||e,o.fillRect(0,0,a,r),o.restore());if(s){var h=this.domBack;o.save(),o.globalAlpha=l,o.drawImage(h,0,0,a,r),o.restore()}}};var en="undefined"!=typeof window&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){setTimeout(t,16)},nn=new Te(50);function on(t){if("string"!=typeof t)return t;var e=nn.get(t);return e&&e.image}function an(t,e,i,n,o){if(t){if("string"!=typeof t)return t;if(e&&e.__zrImageSrc===t||!i)return e;var a=nn.get(t),r={hostEl:i,cb:n,cbPayload:o};return a?sn(e=a.image)||a.pending.push(r):((e=new Image).onload=e.onerror=rn,nn.put(t,e.__cachedImgObj={image:e,pending:[r]}),e.src=e.__zrImageSrc=t),e}return e}function rn(){var t=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e<t.pending.length;e++){var i=t.pending[e],n=i.cb;n&&n(this,i.cbPayload),i.hostEl.dirty()}t.pending.length=0}function sn(t){return t&&t.width&&t.height}var ln={},un=0,hn=5e3,cn=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g,dn="12px sans-serif",fn={};function pn(t,e){var i=t+":"+(e=e||dn);if(ln[i])return ln[i];for(var n,o,a=(t+"").split("\n"),r=0,s=0,l=a.length;s<l;s++)r=Math.max((n=a[s],o=e,fn.measureText(n,o)).width,r);return hn<un&&(un=0,ln={}),un++,ln[i]=r}function gn(t,e,i,n,o,a,r,s){return r?function(t,e,i,n,o,a,r,s){var l=In(t,{rich:r,truncate:s,font:e,textAlign:i,textPadding:o,textLineHeight:a}),u=l.outerWidth,h=l.outerHeight,c=mn(0,u,i),d=vn(0,h,n);return new Di(c,d,u,h)}(t,e,i,n,o,a,r,s):function(t,e,i,n,o,a,r){var s=Mn(t,e,o,a,r),l=pn(t,e);o&&(l+=o[1]+o[3]);var u=s.outerHeight,h=mn(0,l,i),c=vn(0,u,n),d=new Di(h,c,l,u);return d.lineHeight=s.lineHeight,d}(t,e,i,n,o,a,s)}function mn(t,e,i){return"right"===i?t-=e:"center"===i&&(t-=e/2),t}function vn(t,e,i){return"middle"===i?t-=e/2:"bottom"===i&&(t-=e),t}function yn(t,e,i){var n=e.textPosition,o=e.textDistance,a=i.x,r=i.y;o=o||0;var s=i.height,l=i.width,u=s/2,h="left",c="top";switch(n){case"left":a-=o,r+=u,h="right",c="middle";break;case"right":a+=o+l,r+=u,c="middle";break;case"top":a+=l/2,r-=o,h="center",c="bottom";break;case"bottom":a+=l/2,r+=s+o,h="center";break;case"inside":a+=l/2,r+=u,h="center",c="middle";break;case"insideLeft":a+=o,r+=u,c="middle";break;case"insideRight":a+=l-o,r+=u,h="right",c="middle";break;case"insideTop":a+=l/2,r+=o,h="center";break;case"insideBottom":a+=l/2,r+=s-o,h="center",c="bottom";break;case"insideTopLeft":a+=o,r+=o;break;case"insideTopRight":a+=l-o,r+=o,h="right";break;case"insideBottomLeft":a+=o,r+=s-o,c="bottom";break;case"insideBottomRight":a+=l-o,r+=s-o,h="right",c="bottom"}return(t=t||{}).x=a,t.y=r,t.textAlign=h,t.textVerticalAlign=c,t}function xn(t,e,i,n,o){if(!e)return"";var a=(t+"").split("\n");o=_n(e,i,n,o);for(var r=0,s=a.length;r<s;r++)a[r]=wn(a[r],o);return a.join("\n")}function _n(t,e,i,n){(n=k({},n)).font=e;i=H(i,"...");n.maxIterations=H(n.maxIterations,2);var o=n.minChar=H(n.minChar,0);n.cnCharWidth=pn("国",e);var a=n.ascCharWidth=pn("a",e);n.placeholder=H(n.placeholder,"");for(var r=t=Math.max(0,t-1),s=0;s<o&&a<=r;s++)r-=a;var l=pn(i,e);return r<l&&(i="",l=0),r=t-l,n.ellipsis=i,n.ellipsisWidth=l,n.contentWidth=r,n.containerWidth=t,n}function wn(t,e){var i=e.containerWidth,n=e.font,o=e.contentWidth;if(!i)return"";var a=pn(t,n);if(a<=i)return t;for(var r=0;;r++){if(a<=o||r>=e.maxIterations){t+=e.ellipsis;break}var s=0===r?bn(t,o,e.ascCharWidth,e.cnCharWidth):0<a?Math.floor(t.length*o/a):0;a=pn(t=t.substr(0,s),n)}return""===t&&(t=e.placeholder),t}function bn(t,e,i,n){for(var o=0,a=0,r=t.length;a<r&&o<e;a++){var s=t.charCodeAt(a);o+=0<=s&&s<=127?i:n}return a}function Sn(t){return pn("国",t)}function Mn(t,e,i,n,o){null!=t&&(t+="");var a=H(n,Sn(e)),r=t?t.split("\n"):[],s=r.length*a,l=s,u=!0;if(i&&(l+=i[0]+i[2]),t&&o){u=!1;var h=o.outerHeight,c=o.outerWidth;if(null!=h&&h<l)t="",r=[];else if(null!=c)for(var d=_n(c-(i?i[1]+i[3]:0),e,o.ellipsis,{minChar:o.minChar,placeholder:o.placeholder}),f=0,p=r.length;f<p;f++)r[f]=wn(r[f],d)}return{lines:r,height:s,outerHeight:l,lineHeight:a,canCacheByTextString:u}}function In(t,e){var i={lines:[],width:0,height:0};if(null!=t&&(t+=""),!t)return i;for(var n,o=cn.lastIndex=0;null!=(n=cn.exec(t));){var a=n.index;o<a&&Tn(i,t.substring(o,a)),Tn(i,n[2],n[1]),o=cn.lastIndex}o<t.length&&Tn(i,t.substring(o,t.length));var r=i.lines,s=0,l=0,u=[],h=e.textPadding,c=e.truncate,d=c&&c.outerWidth,f=c&&c.outerHeight;h&&(null!=d&&(d-=h[1]+h[3]),null!=f&&(f-=h[0]+h[2]));for(var p=0;p<r.length;p++){for(var g=r[p],m=0,v=0,y=0;y<g.tokens.length;y++){var x=(C=g.tokens[y]).styleName&&e.rich[C.styleName]||{},_=C.textPadding=x.textPadding,w=C.font=x.font||e.font,b=C.textHeight=H(x.textHeight,Sn(w));if(_&&(b+=_[0]+_[2]),C.height=b,C.lineHeight=Z(x.textLineHeight,e.textLineHeight,b),C.textAlign=x&&x.textAlign||e.textAlign,C.textVerticalAlign=x&&x.textVerticalAlign||"middle",null!=f&&s+C.lineHeight>f)return{lines:[],width:0,height:0};C.textWidth=pn(C.text,w);var S=x.textWidth,M=null==S||"auto"===S;if("string"==typeof S&&"%"===S.charAt(S.length-1))C.percentWidth=S,u.push(C),S=0;else{if(M){S=C.textWidth;var I=x.textBackgroundColor,T=I&&I.image;T&&sn(T=on(T))&&(S=Math.max(S,T.width*b/T.height))}var A=_?_[1]+_[3]:0;S+=A;var D=null!=d?d-v:null;null!=D&&D<S&&(!M||D<A?(C.text="",C.textWidth=S=0):(C.text=xn(C.text,D-A,w,c.ellipsis,{minChar:c.minChar}),C.textWidth=pn(C.text,w),S=C.textWidth+A))}v+=C.width=S,x&&(m=Math.max(m,C.lineHeight))}g.width=v,s+=g.lineHeight=m,l=Math.max(l,v)}i.outerWidth=i.width=H(e.textWidth,l),i.outerHeight=i.height=H(e.textHeight,s),h&&(i.outerWidth+=h[1]+h[3],i.outerHeight+=h[0]+h[2]);for(p=0;p<u.length;p++){var C,L=(C=u[p]).percentWidth;C.width=parseInt(L,10)/100*l}return i}function Tn(t,e,i){for(var n=""===e,o=e.split("\n"),a=t.lines,r=0;r<o.length;r++){var s=o[r],l={styleName:i,text:s,isLineHolder:!s&&!n};if(r)a.push({tokens:[l]});else{var u=(a[a.length-1]||(a[0]={tokens:[]})).tokens,h=u.length;1===h&&u[0].isLineHolder?u[0]=l:!s&&h&&!n||u.push(l)}}}function An(t){var e=(t.fontSize||t.fontFamily)&&[t.fontStyle,t.fontWeight,(t.fontSize||12)+"px",t.fontFamily||"sans-serif"].join(" ");return e&&j(e)||t.textFont||t.font}function Dn(t,e){var i,n,o,a,r,s=e.x,l=e.y,u=e.width,h=e.height,c=e.r;u<0&&(s+=u,u=-u),h<0&&(l+=h,h=-h),"number"==typeof c?i=n=o=a=c:c instanceof Array?1===c.length?i=n=o=a=c[0]:2===c.length?(i=o=c[0],n=a=c[1]):3===c.length?(i=c[0],n=a=c[1],o=c[2]):(i=c[0],n=c[1],o=c[2],a=c[3]):i=n=o=a=0,u<i+n&&(i*=u/(r=i+n),n*=u/r),u<o+a&&(o*=u/(r=o+a),a*=u/r),h<n+o&&(n*=h/(r=n+o),o*=h/r),h<i+a&&(i*=h/(r=i+a),a*=h/r),t.moveTo(s+i,l),t.lineTo(s+u-n,l),0!==n&&t.arc(s+u-n,l+n,n,-Math.PI/2,0),t.lineTo(s+u,l+h-o),0!==o&&t.arc(s+u-o,l+h-o,o,0,Math.PI/2),t.lineTo(s+a,l+h),0!==a&&t.arc(s+a,l+h-a,a,Math.PI/2,Math.PI),t.lineTo(s,l+i),0!==i&&t.arc(s+i,l+i,i,Math.PI,1.5*Math.PI)}fn.measureText=function(t,e){var i=x();return i.font=e||dn,i.measureText(t)};var Cn=dn,Ln={left:1,right:1,center:1},kn={top:1,bottom:1,middle:1},Pn=[["textShadowBlur","shadowBlur",0],["textShadowOffsetX","shadowOffsetX",0],["textShadowOffsetY","shadowOffsetY",0],["textShadowColor","shadowColor","transparent"]],Nn={},On={};function En(t){return Rn(t),E(t.rich,Rn),t}function Rn(t){if(t){t.font=An(t);var e=t.textAlign;"middle"===e&&(e="center"),t.textAlign=null==e||Ln[e]?e:"left";var i=t.textVerticalAlign||t.textBaseline;"center"===i&&(i="middle"),t.textVerticalAlign=null==i||kn[i]?i:"top",t.textPadding&&(t.textPadding=X(t.textPadding))}}function zn(t,e,i,n,o,a){n.rich?function(t,e,i,n,o,a){a!==Hi&&(e.__attrCachedBy=Wi.NONE);var r=t.__textCotentBlock;r&&!t.__dirtyText||(r=t.__textCotentBlock=In(i,n));!function(t,e,i,n,o){var a=i.width,r=i.outerWidth,s=i.outerHeight,l=n.textPadding,u=Hn(On,t,n,o),h=u.baseX,c=u.baseY,d=u.textAlign,f=u.textVerticalAlign;Bn(e,n,o,h,c);var p=mn(h,r,d),g=vn(c,s,f),m=p,v=g;l&&(m+=l[3],v+=l[0]);var y=m+a;Gn(n)&&Fn(t,e,n,p,g,r,s);for(var x=0;x<i.lines.length;x++){for(var _,w=i.lines[x],b=w.tokens,S=b.length,M=w.lineHeight,I=w.width,T=0,A=m,D=y,C=S-1;T<S&&(!(_=b[T]).textAlign||"left"===_.textAlign);)Vn(t,e,_,n,M,v,A,"left"),I-=_.width,A+=_.width,T++;for(;0<=C&&"right"===(_=b[C]).textAlign;)Vn(t,e,_,n,M,v,D,"right"),I-=_.width,D-=_.width,C--;for(A+=(a-(A-m)-(y-D)-I)/2;T<=C;)_=b[T],Vn(t,e,_,n,M,v,A+_.width/2,"center"),A+=_.width,T++;v+=M}}(t,e,r,n,o)}(t,e,i,n,o,a):function(t,e,i,n,o,a){var r,s=Gn(n),l=!1,u=e.__attrCachedBy===Wi.PLAIN_TEXT;a!==Hi?(a&&(r=a.style,l=!s&&u&&r),e.__attrCachedBy=s?Wi.NONE:Wi.PLAIN_TEXT):u&&(e.__attrCachedBy=Wi.NONE);var h=n.font||Cn;l&&h===(r.font||Cn)||(e.font=h);var c=t.__computedFont;t.__styleFont!==h&&(t.__styleFont=h,c=t.__computedFont=e.font);var d=n.textPadding,f=n.textLineHeight,p=t.__textCotentBlock;p&&!t.__dirtyText||(p=t.__textCotentBlock=Mn(i,c,d,f,n.truncate));var g=p.outerHeight,m=p.lines,v=p.lineHeight,y=Hn(On,t,n,o),x=y.baseX,_=y.baseY,w=y.textAlign||"left",b=y.textVerticalAlign;Bn(e,n,o,x,_);var S=vn(_,g,b),M=x,I=S;if(s||d){var T=pn(i,c);d&&(T+=d[1]+d[3]);var A=mn(x,T,w);s&&Fn(t,e,n,A,S,T,g),d&&(M=jn(x,w,d),I+=d[0])}e.textAlign=w,e.textBaseline="middle",e.globalAlpha=n.opacity||1;for(var D=0;D<Pn.length;D++){var C=Pn[D],L=C[0],k=C[1],P=n[L];l&&P===r[L]||(e[k]=Fi(e,k,P||C[2]))}I+=v/2;var N=n.textStrokeWidth,O=l?r.textStrokeWidth:null,E=!l||N!==O,R=!l||E||n.textStroke!==r.textStroke,z=Un(n.textStroke,N),B=Xn(n.textFill);z&&(E&&(e.lineWidth=N),R&&(e.strokeStyle=z));B&&(l&&n.textFill===r.textFill||(e.fillStyle=B));if(1===m.length)z&&e.strokeText(m[0],M,I),B&&e.fillText(m[0],M,I);else for(D=0;D<m.length;D++)z&&e.strokeText(m[D],M,I),B&&e.fillText(m[D],M,I),I+=v}(t,e,i,n,o,a)}function Bn(t,e,i,n,o){if(i&&e.textRotation){var a=e.textOrigin;"center"===a?(n=i.width/2+i.x,o=i.height/2+i.y):a&&(n=a[0]+i.x,o=a[1]+i.y),t.translate(n,o),t.rotate(-e.textRotation),t.translate(-n,-o)}}function Vn(t,e,i,n,o,a,r,s){var l=n.rich[i.styleName]||{};l.text=i.text;var u=i.textVerticalAlign,h=a+o/2;"top"===u?h=a+i.height/2:"bottom"===u&&(h=a+o-i.height/2),!i.isLineHolder&&Gn(l)&&Fn(t,e,l,"right"===s?r-i.width:"center"===s?r-i.width/2:r,h-i.height/2,i.width,i.height);var c=i.textPadding;c&&(r=jn(r,s,c),h-=i.height/2-c[2]-i.textHeight/2),Zn(e,"shadowBlur",Z(l.textShadowBlur,n.textShadowBlur,0)),Zn(e,"shadowColor",l.textShadowColor||n.textShadowColor||"transparent"),Zn(e,"shadowOffsetX",Z(l.textShadowOffsetX,n.textShadowOffsetX,0)),Zn(e,"shadowOffsetY",Z(l.textShadowOffsetY,n.textShadowOffsetY,0)),Zn(e,"textAlign",s),Zn(e,"textBaseline","middle"),Zn(e,"font",i.font||Cn);var d=Un(l.textStroke||n.textStroke,p),f=Xn(l.textFill||n.textFill),p=H(l.textStrokeWidth,n.textStrokeWidth);d&&(Zn(e,"lineWidth",p),Zn(e,"strokeStyle",d),e.strokeText(i.text,r,h)),f&&(Zn(e,"fillStyle",f),e.fillText(i.text,r,h))}function Gn(t){return!!(t.textBackgroundColor||t.textBorderWidth&&t.textBorderColor)}function Fn(t,e,i,n,o,a,r){var s=i.textBackgroundColor,l=i.textBorderWidth,u=i.textBorderColor,h=R(s);if(Zn(e,"shadowBlur",i.textBoxShadowBlur||0),Zn(e,"shadowColor",i.textBoxShadowColor||"transparent"),Zn(e,"shadowOffsetX",i.textBoxShadowOffsetX||0),Zn(e,"shadowOffsetY",i.textBoxShadowOffsetY||0),h||l&&u){e.beginPath();var c=i.textBorderRadius;c?Dn(e,{x:n,y:o,width:a,height:r,r:c}):e.rect(n,o,a,r),e.closePath()}if(h)if(Zn(e,"fillStyle",s),null!=i.fillOpacity){var d=e.globalAlpha;e.globalAlpha=i.fillOpacity*i.opacity,e.fill(),e.globalAlpha=d}else e.fill();else if(z(s)){var f=s.image;(f=an(f,null,t,Wn,s))&&sn(f)&&e.drawImage(f,n,o,a,r)}if(l&&u)if(Zn(e,"lineWidth",l),Zn(e,"strokeStyle",u),null!=i.strokeOpacity){d=e.globalAlpha;e.globalAlpha=i.strokeOpacity*i.opacity,e.stroke(),e.globalAlpha=d}else e.stroke()}function Wn(t,e){e.image=t}function Hn(t,e,i,n){var o=i.x||0,a=i.y||0,r=i.textAlign,s=i.textVerticalAlign;if(n){var l=i.textPosition;if(l instanceof Array)o=n.x+Yn(l[0],n.width),a=n.y+Yn(l[1],n.height);else{var u=e&&e.calculateTextPosition?e.calculateTextPosition(Nn,i,n):yn(Nn,i,n);o=u.x,a=u.y,r=r||u.textAlign,s=s||u.textVerticalAlign}var h=i.textOffset;h&&(o+=h[0],a+=h[1])}return(t=t||{}).baseX=o,t.baseY=a,t.textAlign=r,t.textVerticalAlign=s,t}function Zn(t,e,i){return t[e]=Fi(t,e,i),t[e]}function Un(t,e){return null==t||e<=0||"transparent"===t||"none"===t?null:t.image||t.colorStops?"#000":t}function Xn(t){return null==t||"none"===t?null:t.image||t.colorStops?"#000":t}function Yn(t,e){return"string"==typeof t?0<=t.lastIndexOf("%")?parseFloat(t)/100*e:parseFloat(t):t}function jn(t,e,i){return"right"===e?t-i[1]:"center"===e?t+i[3]/2-i[1]/2:t+i[3]}function qn(t,e){return null!=t&&(t||e.textBackgroundColor||e.textBorderWidth&&e.textBorderColor||e.textPadding)}function Kn(){}var $n=new Di;function Jn(t){for(var e in t=t||{},_i.call(this,t),t)t.hasOwnProperty(e)&&"style"!==e&&(this[e]=t[e]);this.style=new Ui(t.style,this),this._rect=null,this.__clipPaths=null}function Qn(t){Jn.call(this,t)}Jn.prototype={constructor:Jn,type:"displayable",__dirty:!0,invisible:!(Kn.prototype={constructor:Kn,drawRectText:function(t,e){var i=this.style;e=i.textRect||e,this.__dirty&&En(i);var n=i.text;if(null!=n&&(n+=""),qn(n,i)){t.save();var o=this.transform;i.transformText?this.setTransform(t):o&&($n.copy(e),$n.applyTransform(o),e=$n),zn(this,t,n,i,e,Hi),t.restore()}}}),z:0,z2:0,zlevel:0,draggable:!1,dragging:!1,silent:!1,culling:!1,cursor:"pointer",rectHover:!1,progressive:!1,incremental:!1,globalScaleRatio:1,beforeBrush:function(t){},afterBrush:function(t){},brush:function(t,e){},getBoundingRect:function(){},contain:function(t,e){return this.rectContain(t,e)},traverse:function(t,e){t.call(e,this)},rectContain:function(t,e){var i=this.transformCoordToLocal(t,e);return this.getBoundingRect().contain(i[0],i[1])},dirty:function(){this.__dirty=this.__dirtyText=!0,this._rect=null,this.__zr&&this.__zr.refresh()},animateStyle:function(t){return this.animate("style",t)},attrKV:function(t,e){"style"!==t?_i.prototype.attrKV.call(this,t,e):this.style.set(e)},setStyle:function(t,e){return this.style.set(t,e),this.dirty(!1),this},useStyle:function(t){return this.style=new Ui(t,this),this.dirty(!1),this},calculateTextPosition:null},w(Jn,_i),b(Jn,Kn),Qn.prototype={constructor:Qn,type:"image",brush:function(t,e){var i=this.style,n=i.image;i.bind(t,this,e);var o=this._image=an(n,this._image,this,this.onload);if(o&&sn(o)){var a=i.x||0,r=i.y||0,s=i.width,l=i.height,u=o.width/o.height;if(null==s&&null!=l?s=l*u:null==l&&null!=s?l=s/u:null==s&&null==l&&(s=o.width,l=o.height),this.setTransform(t),i.sWidth&&i.sHeight){var h=i.sx||0,c=i.sy||0;t.drawImage(o,h,c,i.sWidth,i.sHeight,a,r,s,l)}else if(i.sx&&i.sy){var d=s-(h=i.sx),f=l-(c=i.sy);t.drawImage(o,h,c,d,f,a,r,s,l)}else t.drawImage(o,a,r,s,l);null!=i.text&&(this.restoreTransform(t),this.drawRectText(t,this.getBoundingRect()))}},getBoundingRect:function(){var t=this.style;return this._rect||(this._rect=new Di(t.x||0,t.y||0,t.width||0,t.height||0)),this._rect}},w(Qn,Jn);var to=314159;function eo(t){return parseInt(t,10)}var io=new Di(0,0,0,0),no=new Di(0,0,0,0);function oo(t,e,i){this.type="canvas";var n=!t.nodeName||"CANVAS"===t.nodeName.toUpperCase();this._opts=i=k({},i||{}),this.dpr=i.devicePixelRatio||pi,this._singleCanvas=n;var o=(this.root=t).style;o&&(o["-webkit-tap-highlight-color"]="transparent",o["-webkit-user-select"]=o["user-select"]=o["-webkit-touch-callout"]="none",t.innerHTML=""),this.storage=e;var a=this._zlevelList=[],r=this._layers={};if(this._layerConfig={},this._needsManuallyCompositing=!1,n){var s=t.width,l=t.height;null!=i.width&&(s=i.width),null!=i.height&&(l=i.height),this.dpr=i.devicePixelRatio||1,t.width=s*this.dpr,t.height=l*this.dpr,this._width=s,this._height=l;var u=new tn(t,this,this.dpr);u.__builtin__=!0,u.initContext(),(r[to]=u).zlevel=to,a.push(to),this._domRoot=t}else{this._width=this._getSize(0),this._height=this._getSize(1);var h=this._domRoot=function(t,e){var i=document.createElement("div");return i.style.cssText=["position:relative","width:"+t+"px","height:"+e+"px","padding:0","margin:0","border-width:0"].join(";")+";",i}(this._width,this._height);t.appendChild(h)}this._hoverlayer=null,this._hoverElements=[]}oo.prototype={constructor:oo,getType:function(){return"canvas"},isSingleCanvas:function(){return this._singleCanvas},getViewportRoot:function(){return this._domRoot},getViewportRootOffset:function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},refresh:function(t){var e=this.storage.getDisplayList(!0),i=this._zlevelList;this._redrawId=Math.random(),this._paintList(e,t,this._redrawId);for(var n=0;n<i.length;n++){var o=i[n],a=this._layers[o];if(!a.__builtin__&&a.refresh){var r=0===n?this._backgroundColor:null;a.refresh(r)}}return this.refreshHover(),this},addHover:function(t,e){if(!t.__hoverMir){var i=new t.constructor({style:t.style,shape:t.shape,z:t.z,z2:t.z2,silent:t.silent});return(i.__from=t).__hoverMir=i,e&&i.setStyle(e),this._hoverElements.push(i),i}},removeHover:function(t){var e=t.__hoverMir,i=this._hoverElements,n=_(i,e);0<=n&&i.splice(n,1),t.__hoverMir=null},clearHover:function(t){for(var e=this._hoverElements,i=0;i<e.length;i++){var n=e[i].__from;n&&(n.__hoverMir=null)}e.length=0},refreshHover:function(){var t=this._hoverElements,e=t.length,i=this._hoverlayer;if(i&&i.clear(),e){zi(t,this.storage.displayableSortFunc);var n={};(i=i||(this._hoverlayer=this.getLayer(1e5))).ctx.save();for(var o=0;o<e;){var a=t[o],r=a.__from;r&&r.__zr?(o++,r.invisible||(a.transform=r.transform,a.invTransform=r.invTransform,a.__clipPaths=r.__clipPaths,this._doPaintEl(a,i,!0,n))):(t.splice(o,1),r.__hoverMir=null,e--)}i.ctx.restore()}},getHoverLayer:function(){return this.getLayer(1e5)},_paintList:function(t,e,i){if(this._redrawId===i){e=e||!1,this._updateLayerStatus(t);var n=this._doPaintList(t,e);if(this._needsManuallyCompositing&&this._compositeManually(),!n){var o=this;en(function(){o._paintList(t,e,i)})}}},_compositeManually:function(){var e=this.getLayer(to).ctx,i=this._domRoot.width,n=this._domRoot.height;e.clearRect(0,0,i,n),this.eachBuiltinLayer(function(t){t.virtual&&e.drawImage(t.dom,0,0,i,n)})},_doPaintList:function(t,e){for(var i=[],n=0;n<this._zlevelList.length;n++){var o=this._zlevelList[n];(s=this._layers[o]).__builtin__&&s!==this._hoverlayer&&(s.__dirty||e)&&i.push(s)}for(var a=!0,r=0;r<i.length;r++){var s,l=(s=i[r]).ctx,u={};l.save();var h=e?s.__startIndex:s.__drawIndex,c=!e&&s.incremental&&Date.now,d=c&&Date.now(),f=s.zlevel===this._zlevelList[0]?this._backgroundColor:null;if(s.__startIndex===s.__endIndex)s.clear(!1,f);else if(h===s.__startIndex){var p=t[h];p.incremental&&p.notClear&&!e||s.clear(!1,f)}-1===h&&(console.error("For some unknown reason. drawIndex is -1"),h=s.__startIndex);for(var g=h;g<s.__endIndex;g++){var m=t[g];if(this._doPaintEl(m,s,e,u),m.__dirty=m.__dirtyText=!1,c)if(15<Date.now()-d)break}s.__drawIndex=g,s.__drawIndex<s.__endIndex&&(a=!1),u.prevElClipPaths&&l.restore(),l.restore()}return v.wxa&&E(this._layers,function(t){t&&t.ctx&&t.ctx.draw&&t.ctx.draw()}),a},_doPaintEl:function(t,e,i,n){var o=e.ctx,a=t.transform;if((e.__dirty||i)&&!t.invisible&&0!==t.style.opacity&&(!a||a[0]||a[3])&&(!t.culling||!function(t,e,i){return io.copy(t.getBoundingRect()),t.transform&&io.applyTransform(t.transform),no.width=e,no.height=i,!io.intersect(no)}(t,this._width,this._height))){var r=t.__clipPaths,s=n.prevElClipPaths;s&&!function(t,e){if(t===e)return!1;if(!t||!e||t.length!==e.length)return!0;for(var i=0;i<t.length;i++)if(t[i]!==e[i])return!0;return!1}(r,s)||(s&&(o.restore(),n.prevElClipPaths=null,n.prevEl=null),r&&(o.save(),function(t,e){for(var i=0;i<t.length;i++){var n=t[i];n.setTransform(e),e.beginPath(),n.buildPath(e,n.shape),e.clip(),n.restoreTransform(e)}}(r,o),n.prevElClipPaths=r)),t.beforeBrush&&t.beforeBrush(o),t.brush(o,n.prevEl||null),(n.prevEl=t).afterBrush&&t.afterBrush(o)}},getLayer:function(t,e){this._singleCanvas&&!this._needsManuallyCompositing&&(t=to);var i=this._layers[t];return i||((i=new tn("zr_"+t,this,this.dpr)).zlevel=t,i.__builtin__=!0,this._layerConfig[t]&&m(i,this._layerConfig[t],!0),e&&(i.virtual=e),this.insertLayer(t,i),i.initContext()),i},insertLayer:function(t,e){var i=this._layers,n=this._zlevelList,o=n.length,a=null,r=-1,s=this._domRoot;if(i[t])vi("ZLevel "+t+" has been used already");else if(function(t){return!!t&&(!!t.__builtin__||"function"==typeof t.resize&&"function"==typeof t.refresh)}(e)){if(0<o&&t>n[0]){for(r=0;r<o-1&&!(n[r]<t&&n[r+1]>t);r++);a=i[n[r]]}if(n.splice(r+1,0,t),!(i[t]=e).virtual)if(a){var l=a.dom;l.nextSibling?s.insertBefore(e.dom,l.nextSibling):s.appendChild(e.dom)}else s.firstChild?s.insertBefore(e.dom,s.firstChild):s.appendChild(e.dom)}else vi("Layer of zlevel "+t+" is not valid")},eachLayer:function(t,e){var i,n,o=this._zlevelList;for(n=0;n<o.length;n++)i=o[n],t.call(e,this._layers[i],i)},eachBuiltinLayer:function(t,e){var i,n,o,a=this._zlevelList;for(o=0;o<a.length;o++)n=a[o],(i=this._layers[n]).__builtin__&&t.call(e,i,n)},eachOtherLayer:function(t,e){var i,n,o,a=this._zlevelList;for(o=0;o<a.length;o++)n=a[o],(i=this._layers[n]).__builtin__||t.call(e,i,n)},getLayers:function(){return this._layers},_updateLayerStatus:function(t){function e(t){n&&(n.__endIndex!==t&&(n.__dirty=!0),n.__endIndex=t)}if(this.eachBuiltinLayer(function(t,e){t.__dirty=t.__used=!1}),this._singleCanvas)for(var i=1;i<t.length;i++){if((a=t[i]).zlevel!==t[i-1].zlevel||a.incremental){this._needsManuallyCompositing=!0;break}}var n=null,o=0;for(i=0;i<t.length;i++){var a,r,s=(a=t[i]).zlevel;a.incremental?((r=this.getLayer(s+.001,this._needsManuallyCompositing)).incremental=!0,o=1):r=this.getLayer(s+(0<o?.01:0),this._needsManuallyCompositing),r.__builtin__||vi("ZLevel "+s+" has been used by unkown layer "+r.id),r!==n&&(r.__used=!0,r.__startIndex!==i&&(r.__dirty=!0),r.__startIndex=i,r.incremental?r.__drawIndex=-1:r.__drawIndex=i,e(i),n=r),a.__dirty&&(r.__dirty=!0,r.incremental&&r.__drawIndex<0&&(r.__drawIndex=i))}e(i),this.eachBuiltinLayer(function(t,e){!t.__used&&0<t.getElementCount()&&(t.__dirty=!0,t.__startIndex=t.__endIndex=t.__drawIndex=0),t.__dirty&&t.__drawIndex<0&&(t.__drawIndex=t.__startIndex)})},clear:function(){return this.eachBuiltinLayer(this._clearLayer),this},_clearLayer:function(t){t.clear()},setBackgroundColor:function(t){this._backgroundColor=t},configLayer:function(t,e){if(e){var i=this._layerConfig;i[t]?m(i[t],e,!0):i[t]=e;for(var n=0;n<this._zlevelList.length;n++){var o=this._zlevelList[n];if(o===t||o===t+.01)m(this._layers[o],i[t],!0)}}},delLayer:function(t){var e=this._layers,i=this._zlevelList,n=e[t];n&&(n.dom.parentNode.removeChild(n.dom),delete e[t],i.splice(_(i,t),1))},resize:function(e,i){if(this._domRoot.style){var t=this._domRoot;t.style.display="none";var n=this._opts;if(null!=e&&(n.width=e),null!=i&&(n.height=i),e=this._getSize(0),i=this._getSize(1),t.style.display="",this._width!==e||i!==this._height){for(var o in t.style.width=e+"px",t.style.height=i+"px",this._layers)this._layers.hasOwnProperty(o)&&this._layers[o].resize(e,i);E(this._progressiveLayers,function(t){t.resize(e,i)}),this.refresh(!0)}this._width=e,this._height=i}else{if(null==e||null==i)return;this._width=e,this._height=i,this.getLayer(to).resize(e,i)}return this},clearLayer:function(t){var e=this._layers[t];e&&e.clear()},dispose:function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},getRenderedCanvas:function(t){if(t=t||{},this._singleCanvas&&!this._compositeManually)return this._layers[to].dom;var e=new tn("image",this,t.pixelRatio||this.dpr);if(e.initContext(),e.clear(!1,t.backgroundColor||this._backgroundColor),t.pixelRatio<=this.dpr){this.refresh();var i=e.dom.width,n=e.dom.height,o=e.ctx;this.eachLayer(function(t){t.__builtin__?o.drawImage(t.dom,0,0,i,n):t.renderToCanvas&&(e.ctx.save(),t.renderToCanvas(e.ctx),e.ctx.restore())})}else for(var a={},r=this.storage.getDisplayList(!0),s=0;s<r.length;s++){var l=r[s];this._doPaintEl(l,e,!0,a)}return e.dom},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(t){var e=this._opts,i=["width","height"][t],n=["clientWidth","clientHeight"][t],o=["paddingLeft","paddingTop"][t],a=["paddingRight","paddingBottom"][t];if(null!=e[i]&&"auto"!==e[i])return parseFloat(e[i]);var r=this.root,s=document.defaultView.getComputedStyle(r);return(r[n]||eo(s[i])||eo(r.style[i]))-(eo(s[o])||0)-(eo(s[a])||0)|0},pathToImage:function(t,e){e=e||this.dpr;var i=document.createElement("canvas"),n=i.getContext("2d"),o=t.getBoundingRect(),a=t.style,r=a.shadowBlur*e,s=a.shadowOffsetX*e,l=a.shadowOffsetY*e,u=a.hasStroke()?a.lineWidth:0,h=Math.max(u/2,r-s),c=Math.max(u/2,s+r),d=Math.max(u/2,r-l),f=Math.max(u/2,l+r),p=o.width+h+c,g=o.height+d+f;i.width=p*e,i.height=g*e,n.scale(e,e),n.clearRect(0,0,p,g),n.dpr=e;var m={position:t.position,rotation:t.rotation,scale:t.scale};t.position=[h-o.x,d-o.y],t.rotation=0,t.scale=[1,1],t.updateTransform(),t&&t.brush(n);var v=new Qn({style:{x:0,y:0,image:i}});return null!=m.position&&(v.position=t.position=m.position),null!=m.rotation&&(v.rotation=t.rotation=m.rotation),null!=m.scale&&(v.scale=t.scale=m.scale),v}};function ao(t){t=t||{},this.stage=t.stage||{},this.onframe=t.onframe||function(){},this._clips=[],this._running=!1,this._time,this._pausedTime,this._pauseStart,this._paused=!1,Ct.call(this)}ao.prototype={constructor:ao,addClip:function(t){this._clips.push(t)},addAnimator:function(t){t.animation=this;for(var e=t.getClips(),i=0;i<e.length;i++)this.addClip(e[i])},removeClip:function(t){var e=_(this._clips,t);0<=e&&this._clips.splice(e,1)},removeAnimator:function(t){for(var e=t.getClips(),i=0;i<e.length;i++)this.removeClip(e[i]);t.animation=null},_update:function(){for(var t=(new Date).getTime()-this._pausedTime,e=t-this._time,i=this._clips,n=i.length,o=[],a=[],r=0;r<n;r++){var s=i[r],l=s.step(t,e);l&&(o.push(l),a.push(s))}for(r=0;r<n;)i[r]._needsRemove?(i[r]=i[n-1],i.pop(),n--):r++;n=o.length;for(r=0;r<n;r++)a[r].fire(o[r]);this._time=t,this.onframe(e),this.trigger("frame",e),this.stage.update&&this.stage.update()},_startLoop:function(){var e=this;this._running=!0,en(function t(){e._running&&(en(t),e._paused||e._update())})},start:function(){this._time=(new Date).getTime(),this._pausedTime=0,this._startLoop()},stop:function(){this._running=!1},pause:function(){this._paused||(this._pauseStart=(new Date).getTime(),this._paused=!0)},resume:function(){this._paused&&(this._pausedTime+=(new Date).getTime()-this._pauseStart,this._paused=!1)},clear:function(){this._clips=[]},isFinished:function(){return!this._clips.length},animate:function(t,e){var i=new di(t,(e=e||{}).loop,e.getter,e.setter);return this.addAnimator(i),i}},b(ao,Ct);var ro,so,lo=v.domSupported,uo=(so={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},{mouse:ro=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],touch:["touchstart","touchend","touchmove"],pointer:N(ro,function(t){var e=t.replace("mouse","pointer");return so.hasOwnProperty(e)?e:t})}),ho={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]};function co(t){return"mousewheel"===t&&v.browser.firefox?"DOMMouseScroll":t}function fo(t){var e=t.pointerType;return"pen"===e||"touch"===e}function po(t){t&&(t.zrByTouch=!0)}function go(t,e){for(var i=e,n=!1;i&&9!==i.nodeType&&!(n=i.domBelongToZr||i!==e&&i===t.painterRoot);)i=i.parentNode;return n}function mo(t,e){this.type=e.type,this.target=this.currentTarget=t.dom,this.pointerType=e.pointerType,this.clientX=e.clientX,this.clientY=e.clientY}var vo=mo.prototype;vo.stopPropagation=vo.stopImmediatePropagation=vo.preventDefault=et;var yo={mousedown:function(t){t=Zt(this.dom,t),this._mayPointerCapture=[t.zrX,t.zrY],this.trigger("mousedown",t)},mousemove:function(t){t=Zt(this.dom,t);var e=this._mayPointerCapture;!e||t.zrX===e[0]&&t.zrY===e[1]||Mo(this,!0),this.trigger("mousemove",t)},mouseup:function(t){t=Zt(this.dom,t),Mo(this,!1),this.trigger("mouseup",t)},mouseout:function(t){t=Zt(this.dom,t),this._pointerCapturing&&(t.zrEventControl="no_globalout");var e=t.toElement||t.relatedTarget;t.zrIsToLocalDOM=go(this,e),this.trigger("mouseout",t)},touchstart:function(t){po(t=Zt(this.dom,t)),this._lastTouchMoment=new Date,this.handler.processGesture(t,"start"),yo.mousemove.call(this,t),yo.mousedown.call(this,t)},touchmove:function(t){po(t=Zt(this.dom,t)),this.handler.processGesture(t,"change"),yo.mousemove.call(this,t)},touchend:function(t){po(t=Zt(this.dom,t)),this.handler.processGesture(t,"end"),yo.mouseup.call(this,t),+new Date-this._lastTouchMoment<300&&yo.click.call(this,t)},pointerdown:function(t){yo.mousedown.call(this,t)},pointermove:function(t){fo(t)||yo.mousemove.call(this,t)},pointerup:function(t){yo.mouseup.call(this,t)},pointerout:function(t){fo(t)||yo.mouseout.call(this,t)}};E(["click","mousewheel","dblclick","contextmenu"],function(e){yo[e]=function(t){t=Zt(this.dom,t),this.trigger(e,t)}});var xo={pointermove:function(t){fo(t)||xo.mousemove.call(this,t)},pointerup:function(t){xo.mouseup.call(this,t)},mousemove:function(t){this.trigger("mousemove",t)},mouseup:function(t){var e=this._pointerCapturing;Mo(this,!1),this.trigger("mouseup",t),e&&(t.zrEventControl="only_globalout",this.trigger("mouseout",t))}};function _o(i,n){var o=n.domHandlers;v.pointerEventsSupported?E(uo.pointer,function(e){bo(n,e,function(t){o[e].call(i,t)})}):(v.touchEventsSupported&&E(uo.touch,function(e){bo(n,e,function(t){o[e].call(i,t),function(t){t.touching=!0,null!=t.touchTimer&&(clearTimeout(t.touchTimer),t.touchTimer=null),t.touchTimer=setTimeout(function(){t.touching=!1,t.touchTimer=null},700)}(n)})}),E(uo.mouse,function(e){bo(n,e,function(t){t=Ht(t),n.touching||o[e].call(i,t)})}))}function wo(i,n){function t(e){bo(n,e,function(t){t=Ht(t),go(i,t.target)||(t=function(t,e){return Zt(t.dom,new mo(t,e),!0)}(i,t),n.domHandlers[e].call(i,t))},{capture:!0})}v.pointerEventsSupported?E(ho.pointer,t):v.touchEventsSupported||E(ho.mouse,t)}function bo(t,e,i,n){t.mounted[e]=i,t.listenerOpts[e]=n,Ut(t.domTarget,co(e),i,n)}function So(t){var e,i,n,o,a=t.mounted;for(var r in a)a.hasOwnProperty(r)&&(e=t.domTarget,i=co(r),n=a[r],o=t.listenerOpts[r],Bt?e.removeEventListener(i,n,o):e.detachEvent("on"+i,n));t.mounted={}}function Mo(t,e){if(t._mayPointerCapture=null,lo&&t._pointerCapturing^e){t._pointerCapturing=e;var i=t._globalHandlerScope;e?wo(t,i):So(i)}}function Io(t,e){this.domTarget=t,this.domHandlers=e,this.mounted={},this.listenerOpts={},this.touchTimer=null,this.touching=!1}function To(t,e){Ct.call(this),this.dom=t,this.painterRoot=e,this._localHandlerScope=new Io(t,yo),lo&&(this._globalHandlerScope=new Io(document,xo)),this._pointerCapturing=!1,this._mayPointerCapture=null,_o(this,this._localHandlerScope)}var Ao=To.prototype;Ao.dispose=function(){So(this._localHandlerScope),lo&&So(this._globalHandlerScope)},Ao.setCursor=function(t){this.dom.style&&(this.dom.style.cursor=t||"default")},b(To,Ct);var Do=!v.canvasSupported,Co={canvas:oo},Lo={};function ko(t,e){var i=new No(n(),t,e);return Lo[i.id]=i}function Po(t,e){Co[t]=e}var No=function(t,e,i){i=i||{},this.dom=e,this.id=t;var n=this,o=new Vi,a=i.renderer;if(Do){if(!Co.vml)throw new Error("You need to require 'zrender/vml/vml' to support IE8");a="vml"}else a&&Co[a]||(a="canvas");var r=new Co[a](e,o,i,t);this.storage=o,this.painter=r;var s=v.node||v.worker?null:new To(r.getViewportRoot(),r.root);this.handler=new te(o,r,s,r.root),this.animation=new ao({stage:{update:A(this.flush,this)}}),this.animation.start(),this._needsRefresh;var l=o.delFromStorage,u=o.addToStorage;o.delFromStorage=function(t){l.call(o,t),t&&t.removeSelfFromZr(n)},o.addToStorage=function(t){u.call(o,t),t.addSelfToZr(n)}};No.prototype={constructor:No,getId:function(){return this.id},add:function(t){this.storage.addRoot(t),this._needsRefresh=!0},remove:function(t){this.storage.delRoot(t),this._needsRefresh=!0},configLayer:function(t,e){this.painter.configLayer&&this.painter.configLayer(t,e),this._needsRefresh=!0},setBackgroundColor:function(t){this.painter.setBackgroundColor&&this.painter.setBackgroundColor(t),this._needsRefresh=!0},refreshImmediately:function(){this._needsRefresh=this._needsRefreshHover=!1,this.painter.refresh(),this._needsRefresh=this._needsRefreshHover=!1},refresh:function(){this._needsRefresh=!0},flush:function(){var t;this._needsRefresh&&(t=!0,this.refreshImmediately()),this._needsRefreshHover&&(t=!0,this.refreshHoverImmediately()),t&&this.trigger("rendered")},addHover:function(t,e){if(this.painter.addHover){var i=this.painter.addHover(t,e);return this.refreshHover(),i}},removeHover:function(t){this.painter.removeHover&&(this.painter.removeHover(t),this.refreshHover())},clearHover:function(){this.painter.clearHover&&(this.painter.clearHover(),this.refreshHover())},refreshHover:function(){this._needsRefreshHover=!0},refreshHoverImmediately:function(){this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.refreshHover()},resize:function(t){t=t||{},this.painter.resize(t.width,t.height),this.handler.resize()},clearAnimation:function(){this.animation.clear()},getWidth:function(){return this.painter.getWidth()},getHeight:function(){return this.painter.getHeight()},pathToImage:function(t,e){return this.painter.pathToImage(t,e)},setCursorStyle:function(t){this.handler.setCursorStyle(t)},findHover:function(t,e){return this.handler.findHover(t,e)},on:function(t,e,i){this.handler.on(t,e,i)},off:function(t,e){this.handler.off(t,e)},trigger:function(t,e){this.handler.trigger(t,e)},clear:function(){this.storage.delRoot(),this.painter.clear()},dispose:function(){this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,function(t){delete Lo[t]}(this.id)}};var Oo=(Object.freeze||Object)({version:"4.3.0",init:ko,dispose:function(t){if(t)t.dispose();else{for(var e in Lo)Lo.hasOwnProperty(e)&&Lo[e].dispose();Lo={}}return this},getInstance:function(t){return Lo[t]},registerPainter:Po}),Eo=E,Ro=z,zo=O,Bo="series\0";function Vo(t){return t instanceof Array?t:null==t?[]:[t]}function Go(t,e,i){if(t){t[e]=t[e]||{},t.emphasis=t.emphasis||{},t.emphasis[e]=t.emphasis[e]||{};for(var n=0,o=i.length;n<o;n++){var a=i[n];!t.emphasis[e].hasOwnProperty(a)&&t[e].hasOwnProperty(a)&&(t.emphasis[e][a]=t[e][a])}}}var Fo=["fontStyle","fontWeight","fontSize","fontFamily","rich","tag","color","textBorderColor","textBorderWidth","width","height","lineHeight","align","verticalAlign","baseline","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY","backgroundColor","borderColor","borderWidth","borderRadius","padding"];function Wo(t){return!Ro(t)||zo(t)||t instanceof Date?t:t.value}function Ho(t,o){o=(o||[]).slice();var a=N(t||[],function(t,e){return{exist:t}});return Eo(o,function(t,e){if(Ro(t)){for(var i=0;i<a.length;i++)if(!a[i].option&&null!=t.id&&a[i].exist.id===t.id+"")return a[i].option=t,void(o[e]=null);for(i=0;i<a.length;i++){var n=a[i].exist;if(!(a[i].option||null!=n.id&&null!=t.id||null==t.name||Xo(t)||Xo(n)||n.name!==t.name+""))return a[i].option=t,void(o[e]=null)}}}),Eo(o,function(t,e){if(Ro(t)){for(var i=0;i<a.length;i++){var n=a[i].exist;if(!a[i].option&&!Xo(n)&&null==t.id){a[i].option=t;break}}i>=a.length&&a.push({option:t})}}),a}function Zo(t){var r=Q();Eo(t,function(t,e){var i=t.exist;i&&r.set(i.id,t)}),Eo(t,function(t,e){var i=t.option;Y(!i||null==i.id||!r.get(i.id)||r.get(i.id)===t,"id duplicates: "+(i&&i.id)),i&&null!=i.id&&r.set(i.id,t),t.keyInfo||(t.keyInfo={})}),Eo(t,function(t,e){var i=t.exist,n=t.option,o=t.keyInfo;if(Ro(n)){if(o.name=null!=n.name?n.name+"":i?i.name:Bo+e,i)o.id=i.id;else if(null!=n.id)o.id=n.id+"";else for(var a=0;o.id="\0"+o.name+"\0"+a++,r.get(o.id););r.set(o.id,t)}})}function Uo(t){var e=t.name;return!(!e||!e.indexOf(Bo))}function Xo(t){return Ro(t)&&t.id&&0===(t.id+"").indexOf("\0_ec_\0")}function Yo(e,t){return null!=t.dataIndexInside?t.dataIndexInside:null!=t.dataIndex?O(t.dataIndex)?N(t.dataIndex,function(t){return e.indexOfRawIndex(t)}):e.indexOfRawIndex(t.dataIndex):null!=t.name?O(t.name)?N(t.name,function(t){return e.indexOfName(t)}):e.indexOfName(t.name):void 0}function jo(){var e="__\0ec_inner_"+qo+++"_"+Math.random().toFixed(5);return function(t){return t[e]||(t[e]={})}}var qo=0;function Ko(s,l,u){if(R(l)){var t={};t[l+"Index"]=0,l=t}var e=u&&u.defaultMainType;!e||$o(l,e+"Index")||$o(l,e+"Id")||$o(l,e+"Name")||(l[e+"Index"]=0);var h={};return Eo(l,function(t,e){t=l[e];if("dataIndex"!==e&&"dataIndexInside"!==e){var i=e.match(/^(\w+)(Index|Id|Name)$/)||[],n=i[1],o=(i[2]||"").toLowerCase();if(!(!n||!o||null==t||"index"===o&&"none"===t||u&&u.includeMainTypes&&_(u.includeMainTypes,n)<0)){var a={mainType:n};"index"===o&&"all"===t||(a[o]=t);var r=s.queryComponents(a);h[n+"Models"]=r,h[n+"Model"]=r[0]}}else h[e]=t}),h}function $o(t,e){return t&&t.hasOwnProperty(e)}function Jo(t,e,i){t.setAttribute?t.setAttribute(e,i):t[e]=i}function Qo(t){return"auto"===t?v.domSupported?"html":"richText":t||"html"}function ta(t,i){var n=Q(),o=[];return E(t,function(t){var e=i(t);(n.get(e)||(o.push(e),n.set(e,[]))).push(t)}),{keys:o,buckets:n}}var ea=".",ia="___EC__COMPONENT__CONTAINER___";function na(t){var e={main:"",sub:""};return t&&(t=t.split(ea),e.main=t[0]||"",e.sub=t[1]||""),e}function oa(t){(t.$constructor=t).extend=function(t){function e(){t.$constructor?t.$constructor.apply(this,arguments):i.apply(this,arguments)}var i=this;return k(e.prototype,t),e.extend=this.extend,e.superCall=sa,e.superApply=la,w(e,this),e.superClass=i,e}}var aa=0;function ra(t){var e=["__\0is_clz",aa++,Math.random().toFixed(3)].join("_");t.prototype[e]=!0,t.isInstance=function(t){return!(!t||!t[e])}}function sa(t,e){var i=U(arguments,2);return this.superClass.prototype[e].apply(t,i)}function la(t,e,i){return this.superClass.prototype[e].apply(t,i)}function ua(i,t){t=t||{};var o={};if(i.registerClass=function(t,e){if(e)if(function(t){Y(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(t),'componentType "'+t+'" illegal')}(e),(e=na(e)).sub){if(e.sub!==ia){(function(t){var e=o[t.main];e&&e[ia]||((e=o[t.main]={})[ia]=!0);return e})(e)[e.sub]=t}}else o[e.main]=t;return t},i.getClass=function(t,e,i){var n=o[t];if(n&&n[ia]&&(n=e?n[e]:null),i&&!n)throw new Error(e?"Component "+t+"."+(e||"")+" not exists. Load it first.":t+".type should be specified.");return n},i.getClassesByMainType=function(t){t=na(t);var i=[],e=o[t.main];return e&&e[ia]?E(e,function(t,e){e!==ia&&i.push(t)}):i.push(e),i},i.hasClass=function(t){return t=na(t),!!o[t.main]},i.getAllClassMainTypes=function(){var i=[];return E(o,function(t,e){i.push(e)}),i},i.hasSubTypes=function(t){t=na(t);var e=o[t.main];return e&&e[ia]},i.parseClassType=na,t.registerWhenExtend){var n=i.extend;n&&(i.extend=function(t){var e=n.call(this,t);return i.registerClass(e,t.type)})}return i}function ha(s){for(var t=0;t<s.length;t++)s[t][1]||(s[t][1]=s[t][0]);return function(t,e,i){for(var n={},o=0;o<s.length;o++){var a=s[o][1];if(!(e&&0<=_(e,a)||i&&_(i,a)<0)){var r=t.getShallow(a);null!=r&&(n[s[o][0]]=r)}}return n}}var ca=ha([["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),da={getLineStyle:function(t){var e=ca(this,t);return e.lineDash=this.getLineDash(e.lineWidth),e},getLineDash:function(t){null==t&&(t=1);var e=this.get("type"),i=Math.max(t,2),n=4*t;return"solid"!==e&&null!=e&&("dashed"===e?[n,n]:[i,i])}},fa=ha([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),pa={getAreaStyle:function(t,e){return fa(this,t,e)}},ga=Math.pow,ma=Math.sqrt,va=1e-8,ya=1e-4,xa=ma(3),_a=1/3,wa=ot(),ba=ot(),Sa=ot();function Ma(t){return-va<t&&t<va}function Ia(t){return va<t||t<-va}function Ta(t,e,i,n,o){var a=1-o;return a*a*(a*t+3*o*e)+o*o*(o*n+3*a*i)}function Aa(t,e,i,n,o){var a=1-o;return 3*(((e-t)*a+2*(i-e)*o)*a+(n-i)*o*o)}function Da(t,e,i,n,o){var a=6*i-12*e+6*t,r=9*e+3*n-3*t-9*i,s=3*e-3*t,l=0;if(Ma(r)){if(Ia(a))0<=(h=-s/a)&&h<=1&&(o[l++]=h)}else{var u=a*a-4*r*s;if(Ma(u))o[0]=-a/(2*r);else if(0<u){var h,c=ma(u),d=(-a-c)/(2*r);0<=(h=(-a+c)/(2*r))&&h<=1&&(o[l++]=h),0<=d&&d<=1&&(o[l++]=d)}}return l}function Ca(t,e,i,n,o,a){var r=(e-t)*o+t,s=(i-e)*o+e,l=(n-i)*o+i,u=(s-r)*o+r,h=(l-s)*o+s,c=(h-u)*o+u;a[0]=t,a[1]=r,a[2]=u,a[3]=c,a[4]=c,a[5]=h,a[6]=l,a[7]=n}function La(t,e,i,n){var o=1-n;return o*(o*t+2*n*e)+n*n*i}function ka(t,e,i,n){return 2*((1-n)*(e-t)+n*(i-e))}function Pa(t,e,i){var n=t+i-2*e;return 0==n?.5:(t-e)/n}function Na(t,e,i,n,o){var a=(e-t)*n+t,r=(i-e)*n+e,s=(r-a)*n+a;o[0]=t,o[1]=a,o[2]=s,o[3]=s,o[4]=r,o[5]=i}var Oa=Math.min,Ea=Math.max,Ra=Math.sin,za=Math.cos,Ba=2*Math.PI,Va=ot(),Ga=ot(),Fa=ot();function Wa(t,e,i){if(0!==t.length){var n,o=t[0],a=o[0],r=o[0],s=o[1],l=o[1];for(n=1;n<t.length;n++)o=t[n],a=Oa(a,o[0]),r=Ea(r,o[0]),s=Oa(s,o[1]),l=Ea(l,o[1]);e[0]=a,e[1]=s,i[0]=r,i[1]=l}}function Ha(t,e,i,n,o,a){o[0]=Oa(t,i),o[1]=Oa(e,n),a[0]=Ea(t,i),a[1]=Ea(e,n)}var Za=[],Ua=[];function Xa(t,e,i,n,o,a,r,s,l,u){var h,c=Da,d=Ta,f=c(t,i,o,r,Za);for(l[0]=1/0,l[1]=1/0,u[0]=-1/0,u[1]=-1/0,h=0;h<f;h++){var p=d(t,i,o,r,Za[h]);l[0]=Oa(p,l[0]),u[0]=Ea(p,u[0])}for(f=c(e,n,a,s,Ua),h=0;h<f;h++){var g=d(e,n,a,s,Ua[h]);l[1]=Oa(g,l[1]),u[1]=Ea(g,u[1])}l[0]=Oa(t,l[0]),u[0]=Ea(t,u[0]),l[0]=Oa(r,l[0]),u[0]=Ea(r,u[0]),l[1]=Oa(e,l[1]),u[1]=Ea(e,u[1]),l[1]=Oa(s,l[1]),u[1]=Ea(s,u[1])}function Ya(t,e,i,n,o,a,r,s,l){var u=St,h=Mt,c=Math.abs(o-a);if(c%Ba<1e-4&&1e-4<c)return s[0]=t-i,s[1]=e-n,l[0]=t+i,void(l[1]=e+n);if(Va[0]=za(o)*i+t,Va[1]=Ra(o)*n+e,Ga[0]=za(a)*i+t,Ga[1]=Ra(a)*n+e,u(s,Va,Ga),h(l,Va,Ga),(o%=Ba)<0&&(o+=Ba),(a%=Ba)<0&&(a+=Ba),a<o&&!r?a+=Ba:o<a&&r&&(o+=Ba),r){var d=a;a=o,o=d}for(var f=0;f<a;f+=Math.PI/2)o<f&&(Fa[0]=za(f)*i+t,Fa[1]=Ra(f)*n+e,u(s,Fa,s),h(l,Fa,l))}var ja={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},qa=[],Ka=[],$a=[],Ja=[],Qa=Math.min,tr=Math.max,er=Math.cos,ir=Math.sin,nr=Math.sqrt,or=Math.abs,ar="undefined"!=typeof Float32Array,rr=function(t){this._saveData=!t,this._saveData&&(this.data=[]),this._ctx=null};function sr(t,e,i,n,o,a,r){if(0===o)return!1;var s=o,l=0;if(e+s<r&&n+s<r||r<e-s&&r<n-s||t+s<a&&i+s<a||a<t-s&&a<i-s)return!1;if(t===i)return Math.abs(a-t)<=s/2;var u=(l=(e-n)/(t-i))*a-r+(t*n-i*e)/(t-i);return u*u/(l*l+1)<=s/2*s/2}function lr(t,e,i,n,o,a,r,s,l,u,h){if(0===l)return!1;var c=l;return!(e+c<h&&n+c<h&&a+c<h&&s+c<h||h<e-c&&h<n-c&&h<a-c&&h<s-c||t+c<u&&i+c<u&&o+c<u&&r+c<u||u<t-c&&u<i-c&&u<o-c&&u<r-c)&&function(t,e,i,n,o,a,r,s,l,u,h){var c,d,f,p,g,m=.005,v=1/0;wa[0]=l,wa[1]=u;for(var y=0;y<1;y+=.05)ba[0]=Ta(t,i,o,r,y),ba[1]=Ta(e,n,a,s,y),(p=_t(wa,ba))<v&&(c=y,v=p);v=1/0;for(var x=0;x<32&&!(m<ya);x++)d=c-m,f=c+m,ba[0]=Ta(t,i,o,r,d),ba[1]=Ta(e,n,a,s,d),p=_t(ba,wa),0<=d&&p<v?(c=d,v=p):(Sa[0]=Ta(t,i,o,r,f),Sa[1]=Ta(e,n,a,s,f),g=_t(Sa,wa),f<=1&&g<v?(c=f,v=g):m*=.5);return h&&(h[0]=Ta(t,i,o,r,c),h[1]=Ta(e,n,a,s,c)),ma(v)}(t,e,i,n,o,a,r,s,u,h,null)<=c/2}function ur(t,e,i,n,o,a,r,s,l){if(0===r)return!1;var u=r;return!(e+u<l&&n+u<l&&a+u<l||l<e-u&&l<n-u&&l<a-u||t+u<s&&i+u<s&&o+u<s||s<t-u&&s<i-u&&s<o-u)&&function(t,e,i,n,o,a,r,s,l){var u,h=.005,c=1/0;wa[0]=r,wa[1]=s;for(var d=0;d<1;d+=.05){ba[0]=La(t,i,o,d),ba[1]=La(e,n,a,d),(m=_t(wa,ba))<c&&(u=d,c=m)}c=1/0;for(var f=0;f<32&&!(h<ya);f++){var p=u-h,g=u+h;ba[0]=La(t,i,o,p),ba[1]=La(e,n,a,p);var m=_t(ba,wa);if(0<=p&&m<c)u=p,c=m;else{Sa[0]=La(t,i,o,g),Sa[1]=La(e,n,a,g);var v=_t(Sa,wa);g<=1&&v<c?(u=g,c=v):h*=.5}}return l&&(l[0]=La(t,i,o,u),l[1]=La(e,n,a,u)),ma(c)}(t,e,i,n,o,a,s,l,null)<=u/2}rr.prototype={constructor:rr,_xi:0,_yi:0,_x0:0,_y0:0,_ux:0,_uy:0,_len:0,_lineDash:null,_dashOffset:0,_dashIdx:0,_dashSum:0,setScale:function(t,e,i){i=i||0,this._ux=or(i/pi/t)||0,this._uy=or(i/pi/e)||0},getContext:function(){return this._ctx},beginPath:function(t){return(this._ctx=t)&&t.beginPath(),t&&(this.dpr=t.dpr),this._saveData&&(this._len=0),this._lineDash&&(this._lineDash=null,this._dashOffset=0),this},moveTo:function(t,e){return this.addData(ja.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},lineTo:function(t,e){var i=or(t-this._xi)>this._ux||or(e-this._yi)>this._uy||this._len<5;return this.addData(ja.L,t,e),this._ctx&&i&&(this._needsDash()?this._dashedLineTo(t,e):this._ctx.lineTo(t,e)),i&&(this._xi=t,this._yi=e),this},bezierCurveTo:function(t,e,i,n,o,a){return this.addData(ja.C,t,e,i,n,o,a),this._ctx&&(this._needsDash()?this._dashedBezierTo(t,e,i,n,o,a):this._ctx.bezierCurveTo(t,e,i,n,o,a)),this._xi=o,this._yi=a,this},quadraticCurveTo:function(t,e,i,n){return this.addData(ja.Q,t,e,i,n),this._ctx&&(this._needsDash()?this._dashedQuadraticTo(t,e,i,n):this._ctx.quadraticCurveTo(t,e,i,n)),this._xi=i,this._yi=n,this},arc:function(t,e,i,n,o,a){return this.addData(ja.A,t,e,i,i,n,o-n,0,a?0:1),this._ctx&&this._ctx.arc(t,e,i,n,o,a),this._xi=er(o)*i+t,this._yi=ir(o)*i+e,this},arcTo:function(t,e,i,n,o){return this._ctx&&this._ctx.arcTo(t,e,i,n,o),this},rect:function(t,e,i,n){return this._ctx&&this._ctx.rect(t,e,i,n),this.addData(ja.R,t,e,i,n),this},closePath:function(){this.addData(ja.Z);var t=this._ctx,e=this._x0,i=this._y0;return t&&(this._needsDash()&&this._dashedLineTo(e,i),t.closePath()),this._xi=e,this._yi=i,this},fill:function(t){t&&t.fill(),this.toStatic()},stroke:function(t){t&&t.stroke(),this.toStatic()},setLineDash:function(t){if(t instanceof Array){this._lineDash=t;for(var e=this._dashIdx=0,i=0;i<t.length;i++)e+=t[i];this._dashSum=e}return this},setLineDashOffset:function(t){return this._dashOffset=t,this},len:function(){return this._len},setData:function(t){var e=t.length;this.data&&this.data.length===e||!ar||(this.data=new Float32Array(e));for(var i=0;i<e;i++)this.data[i]=t[i];this._len=e},appendPath:function(t){t instanceof Array||(t=[t]);for(var e=t.length,i=0,n=this._len,o=0;o<e;o++)i+=t[o].len();ar&&this.data instanceof Float32Array&&(this.data=new Float32Array(n+i));for(o=0;o<e;o++)for(var a=t[o].data,r=0;r<a.length;r++)this.data[n++]=a[r];this._len=n},addData:function(t){if(this._saveData){var e=this.data;this._len+arguments.length>e.length&&(this._expandData(),e=this.data);for(var i=0;i<arguments.length;i++)e[this._len++]=arguments[i];this._prevCmd=t}},_expandData:function(){if(!(this.data instanceof Array)){for(var t=[],e=0;e<this._len;e++)t[e]=this.data[e];this.data=t}},_needsDash:function(){return this._lineDash},_dashedLineTo:function(t,e){var i,n,o=this._dashSum,a=this._dashOffset,r=this._lineDash,s=this._ctx,l=this._xi,u=this._yi,h=t-l,c=e-u,d=nr(h*h+c*c),f=l,p=u,g=r.length;for(a<0&&(a=o+a),f-=(a%=o)*(h/=d),p-=a*(c/=d);0<h&&f<=t||h<0&&t<=f||0===h&&(0<c&&p<=e||c<0&&e<=p);)f+=h*(i=r[n=this._dashIdx]),p+=c*i,this._dashIdx=(n+1)%g,0<h&&f<l||h<0&&l<f||0<c&&p<u||c<0&&u<p||s[n%2?"moveTo":"lineTo"](0<=h?Qa(f,t):tr(f,t),0<=c?Qa(p,e):tr(p,e));h=f-t,c=p-e,this._dashOffset=-nr(h*h+c*c)},_dashedBezierTo:function(t,e,i,n,o,a){var r,s,l,u,h,c=this._dashSum,d=this._dashOffset,f=this._lineDash,p=this._ctx,g=this._xi,m=this._yi,v=Ta,y=0,x=this._dashIdx,_=f.length,w=0;for(d<0&&(d=c+d),d%=c,r=0;r<1;r+=.1)s=v(g,t,i,o,r+.1)-v(g,t,i,o,r),l=v(m,e,n,a,r+.1)-v(m,e,n,a,r),y+=nr(s*s+l*l);for(;x<_&&!(d<(w+=f[x]));x++);for(r=(w-d)/y;r<=1;)u=v(g,t,i,o,r),h=v(m,e,n,a,r),x%2?p.moveTo(u,h):p.lineTo(u,h),r+=f[x]/y,x=(x+1)%_;x%2!=0&&p.lineTo(o,a),s=o-u,l=a-h,this._dashOffset=-nr(s*s+l*l)},_dashedQuadraticTo:function(t,e,i,n){var o=i,a=n;i=(i+2*t)/3,n=(n+2*e)/3,t=(this._xi+2*t)/3,e=(this._yi+2*e)/3,this._dashedBezierTo(t,e,i,n,o,a)},toStatic:function(){var t=this.data;t instanceof Array&&(t.length=this._len,ar&&(this.data=new Float32Array(t)))},getBoundingRect:function(){qa[0]=qa[1]=$a[0]=$a[1]=Number.MAX_VALUE,Ka[0]=Ka[1]=Ja[0]=Ja[1]=-Number.MAX_VALUE;for(var t,e,i,n,o,a,r,s,l,u,h,c,d,f,p=this.data,g=0,m=0,v=0,y=0,x=0;x<p.length;){var _=p[x++];switch(1===x&&(v=g=p[x],y=m=p[x+1]),_){case ja.M:g=v=p[x++],m=y=p[x++],$a[0]=v,$a[1]=y,Ja[0]=v,Ja[1]=y;break;case ja.L:Ha(g,m,p[x],p[x+1],$a,Ja),g=p[x++],m=p[x++];break;case ja.C:Xa(g,m,p[x++],p[x++],p[x++],p[x++],p[x],p[x+1],$a,Ja),g=p[x++],m=p[x++];break;case ja.Q:t=g,e=m,i=p[x++],n=p[x++],o=p[x],a=p[x+1],r=$a,s=Ja,u=l=void 0,u=La,h=Ea(Oa((l=Pa)(t,i,o),1),0),c=Ea(Oa(l(e,n,a),1),0),d=u(t,i,o,h),f=u(e,n,a,c),r[0]=Oa(t,o,d),r[1]=Oa(e,a,f),s[0]=Ea(t,o,d),s[1]=Ea(e,a,f),g=p[x++],m=p[x++];break;case ja.A:var w=p[x++],b=p[x++],S=p[x++],M=p[x++],I=p[x++],T=p[x++]+I;x+=1;var A=1-p[x++];1===x&&(v=er(I)*S+w,y=ir(I)*M+b),Ya(w,b,S,M,I,T,A,$a,Ja),g=er(T)*S+w,m=ir(T)*M+b;break;case ja.R:Ha(v=g=p[x++],y=m=p[x++],v+p[x++],y+p[x++],$a,Ja);break;case ja.Z:g=v,m=y}St(qa,qa,$a),Mt(Ka,Ka,Ja)}return 0===x&&(qa[0]=qa[1]=Ka[0]=Ka[1]=0),new Di(qa[0],qa[1],Ka[0]-qa[0],Ka[1]-qa[1])},rebuildPath:function(t){for(var e,i,n,o,a,r,s=this.data,l=this._ux,u=this._uy,h=this._len,c=0;c<h;){var d=s[c++];switch(1===c&&(e=n=s[c],i=o=s[c+1]),d){case ja.M:e=n=s[c++],i=o=s[c++],t.moveTo(n,o);break;case ja.L:a=s[c++],r=s[c++],(or(a-n)>l||or(r-o)>u||c===h-1)&&(t.lineTo(a,r),n=a,o=r);break;case ja.C:t.bezierCurveTo(s[c++],s[c++],s[c++],s[c++],s[c++],s[c++]),n=s[c-2],o=s[c-1];break;case ja.Q:t.quadraticCurveTo(s[c++],s[c++],s[c++],s[c++]),n=s[c-2],o=s[c-1];break;case ja.A:var f=s[c++],p=s[c++],g=s[c++],m=s[c++],v=s[c++],y=s[c++],x=s[c++],_=s[c++],w=m<g?g:m,b=m<g?1:g/m,S=m<g?m/g:1,M=v+y;.001<Math.abs(g-m)?(t.translate(f,p),t.rotate(x),t.scale(b,S),t.arc(0,0,w,v,M,1-_),t.scale(1/b,1/S),t.rotate(-x),t.translate(-f,-p)):t.arc(f,p,w,v,M,1-_),1===c&&(e=er(v)*g+f,i=ir(v)*m+p),n=er(M)*g+f,o=ir(M)*m+p;break;case ja.R:e=n=s[c],i=o=s[c+1],t.rect(s[c++],s[c++],s[c++],s[c++]);break;case ja.Z:t.closePath(),n=e,o=i}}}},rr.CMD=ja;var hr=2*Math.PI;function cr(t){return(t%=hr)<0&&(t+=hr),t}var dr=2*Math.PI;function fr(t,e,i,n,o,a,r,s,l){if(0===r)return!1;var u=r;s-=t,l-=e;var h=Math.sqrt(s*s+l*l);if(i<h-u||h+u<i)return!1;if(Math.abs(n-o)%dr<1e-4)return!0;if(a){var c=n;n=cr(o),o=cr(c)}else n=cr(n),o=cr(o);o<n&&(o+=dr);var d=Math.atan2(l,s);return d<0&&(d+=dr),n<=d&&d<=o||n<=d+dr&&d+dr<=o}function pr(t,e,i,n,o,a){if(e<a&&n<a||a<e&&a<n)return 0;if(n===e)return 0;var r=n<e?1:-1,s=(a-e)/(n-e);1!=s&&0!=s||(r=n<e?.5:-.5);var l=s*(i-t)+t;return l===o?1/0:o<l?r:0}var gr=rr.CMD,mr=2*Math.PI,vr=1e-4;var yr=[-1,-1,-1],xr=[-1,-1];function _r(t,e,i,n,o,a,r,s,l,u){if(e<u&&n<u&&a<u&&s<u||u<e&&u<n&&u<a&&u<s)return 0;var h,c=function(t,e,i,n,o,a){var r=n+3*(e-i)-t,s=3*(i-2*e+t),l=3*(e-t),u=t-o,h=s*s-3*r*l,c=s*l-9*r*u,d=l*l-3*s*u,f=0;if(Ma(h)&&Ma(c)){if(Ma(s))a[0]=0;else 0<=(M=-l/s)&&M<=1&&(a[f++]=M)}else{var p=c*c-4*h*d;if(Ma(p)){var g=c/h,m=-g/2;0<=(M=-s/r+g)&&M<=1&&(a[f++]=M),0<=m&&m<=1&&(a[f++]=m)}else if(0<p){var v=ma(p),y=h*s+1.5*r*(-c+v),x=h*s+1.5*r*(-c-v);0<=(M=(-s-((y=y<0?-ga(-y,_a):ga(y,_a))+(x=x<0?-ga(-x,_a):ga(x,_a))))/(3*r))&&M<=1&&(a[f++]=M)}else{var _=(2*h*s-3*r*c)/(2*ma(h*h*h)),w=Math.acos(_)/3,b=ma(h),S=Math.cos(w),M=(-s-2*b*S)/(3*r),I=(m=(-s+b*(S+xa*Math.sin(w)))/(3*r),(-s+b*(S-xa*Math.sin(w)))/(3*r));0<=M&&M<=1&&(a[f++]=M),0<=m&&m<=1&&(a[f++]=m),0<=I&&I<=1&&(a[f++]=I)}}return f}(e,n,a,s,u,yr);if(0===c)return 0;for(var d,f,p=0,g=-1,m=0;m<c;m++){var v=yr[m],y=0===v||1===v?.5:1;Ta(t,i,o,r,v)<l||(g<0&&(g=Da(e,n,a,s,xr),xr[1]<xr[0]&&1<g&&(void 0,h=xr[0],xr[0]=xr[1],xr[1]=h),d=Ta(e,n,a,s,xr[0]),1<g&&(f=Ta(e,n,a,s,xr[1]))),2===g?v<xr[0]?p+=d<e?y:-y:v<xr[1]?p+=f<d?y:-y:p+=s<f?y:-y:v<xr[0]?p+=d<e?y:-y:p+=s<d?y:-y)}return p}function wr(t,e,i,n,o,a,r,s){if(e<s&&n<s&&a<s||s<e&&s<n&&s<a)return 0;var l=function(t,e,i,n,o){var a=t-2*e+i,r=2*(e-t),s=t-n,l=0;if(Ma(a)){if(Ia(r))0<=(h=-s/r)&&h<=1&&(o[l++]=h)}else{var u=r*r-4*a*s;if(Ma(u))0<=(h=-r/(2*a))&&h<=1&&(o[l++]=h);else if(0<u){var h,c=ma(u),d=(-r-c)/(2*a);0<=(h=(-r+c)/(2*a))&&h<=1&&(o[l++]=h),0<=d&&d<=1&&(o[l++]=d)}}return l}(e,n,a,s,yr);if(0===l)return 0;var u=Pa(e,n,a);if(0<=u&&u<=1){for(var h=0,c=La(e,n,a,u),d=0;d<l;d++){var f=0===yr[d]||1===yr[d]?.5:1;La(t,i,o,yr[d])<r||(yr[d]<u?h+=c<e?f:-f:h+=a<c?f:-f)}return h}f=0===yr[0]||1===yr[0]?.5:1;return La(t,i,o,yr[0])<r?0:a<e?f:-f}function br(t,e,i,n,o,a,r,s){if(i<(s-=e)||s<-i)return 0;var l=Math.sqrt(i*i-s*s);yr[0]=-l,yr[1]=l;var u=Math.abs(n-o);if(u<1e-4)return 0;if(u%mr<1e-4){o=mr;var h=a?1:-1;return r>=yr[n=0]+t&&r<=yr[1]+t?h:0}if(a){l=n;n=cr(o),o=cr(l)}else n=cr(n),o=cr(o);o<n&&(o+=mr);for(var c=0,d=0;d<2;d++){var f=yr[d];if(r<f+t){var p=Math.atan2(s,f);h=a?1:-1;p<0&&(p=mr+p),(n<=p&&p<=o||n<=p+mr&&p+mr<=o)&&(p>Math.PI/2&&p<1.5*Math.PI&&(h=-h),c+=h)}}return c}function Sr(t,e,i,n,o){for(var a=0,r=0,s=0,l=0,u=0,h=0;h<t.length;){var c=t[h++];switch(c===gr.M&&1<h&&(i||(a+=pr(r,s,l,u,n,o))),1===h&&(l=r=t[h],u=s=t[h+1]),c){case gr.M:r=l=t[h++],s=u=t[h++];break;case gr.L:if(i){if(sr(r,s,t[h],t[h+1],e,n,o))return!0}else a+=pr(r,s,t[h],t[h+1],n,o)||0;r=t[h++],s=t[h++];break;case gr.C:if(i){if(lr(r,s,t[h++],t[h++],t[h++],t[h++],t[h],t[h+1],e,n,o))return!0}else a+=_r(r,s,t[h++],t[h++],t[h++],t[h++],t[h],t[h+1],n,o)||0;r=t[h++],s=t[h++];break;case gr.Q:if(i){if(ur(r,s,t[h++],t[h++],t[h],t[h+1],e,n,o))return!0}else a+=wr(r,s,t[h++],t[h++],t[h],t[h+1],n,o)||0;r=t[h++],s=t[h++];break;case gr.A:var d=t[h++],f=t[h++],p=t[h++],g=t[h++],m=t[h++],v=t[h++];h+=1;var y=1-t[h++],x=Math.cos(m)*p+d,_=Math.sin(m)*g+f;1<h?a+=pr(r,s,x,_,n,o):(l=x,u=_);var w=(n-d)*g/p+d;if(i){if(fr(d,f,g,m,m+v,y,e,w,o))return!0}else a+=br(d,f,g,m,m+v,y,w,o);r=Math.cos(m+v)*p+d,s=Math.sin(m+v)*g+f;break;case gr.R:l=r=t[h++],u=s=t[h++];x=l+t[h++],_=u+t[h++];if(i){if(sr(l,u,x,u,e,n,o)||sr(x,u,x,_,e,n,o)||sr(x,_,l,_,e,n,o)||sr(l,_,l,u,e,n,o))return!0}else a+=pr(x,u,x,_,n,o),a+=pr(l,_,l,u,n,o);break;case gr.Z:if(i){if(sr(r,s,l,u,e,n,o))return!0}else a+=pr(r,s,l,u,n,o);r=l,s=u}}return i||function(t,e){return Math.abs(t-e)<vr}(s,u)||(a+=pr(r,s,l,u,n,o)||0),0!==a}var Mr=$i.prototype.getCanvasPattern,Ir=Math.abs,Tr=new rr(!0);function Ar(t){Jn.call(this,t),this.path=null}Ar.prototype={constructor:Ar,type:"path",__dirtyPath:!0,strokeContainThreshold:5,segmentIgnoreThreshold:0,subPixelOptimize:!1,brush:function(t,e){var i,n=this.style,o=this.path||Tr,a=n.hasStroke(),r=n.hasFill(),s=n.fill,l=n.stroke,u=r&&!!s.colorStops,h=a&&!!l.colorStops,c=r&&!!s.image,d=a&&!!l.image;n.bind(t,this,e),this.setTransform(t),this.__dirty&&(u&&(i=i||this.getBoundingRect(),this._fillGradient=n.getGradient(t,s,i)),h&&(i=i||this.getBoundingRect(),this._strokeGradient=n.getGradient(t,l,i)));u?t.fillStyle=this._fillGradient:c&&(t.fillStyle=Mr.call(s,t)),h?t.strokeStyle=this._strokeGradient:d&&(t.strokeStyle=Mr.call(l,t));var f=n.lineDash,p=n.lineDashOffset,g=!!t.setLineDash,m=this.getGlobalScale();if(o.setScale(m[0],m[1],this.segmentIgnoreThreshold),this.__dirtyPath||f&&!g&&a?(o.beginPath(t),f&&!g&&(o.setLineDash(f),o.setLineDashOffset(p)),this.buildPath(o,this.shape,!1),this.path&&(this.__dirtyPath=!1)):(t.beginPath(),this.path.rebuildPath(t)),r)if(null!=n.fillOpacity){var v=t.globalAlpha;t.globalAlpha=n.fillOpacity*n.opacity,o.fill(t),t.globalAlpha=v}else o.fill(t);if(f&&g&&(t.setLineDash(f),t.lineDashOffset=p),a)if(null!=n.strokeOpacity){v=t.globalAlpha;t.globalAlpha=n.strokeOpacity*n.opacity,o.stroke(t),t.globalAlpha=v}else o.stroke(t);f&&g&&t.setLineDash([]),null!=n.text&&(this.restoreTransform(t),this.drawRectText(t,this.getBoundingRect()))},buildPath:function(t,e,i){},createPathProxy:function(){this.path=new rr},getBoundingRect:function(){var t=this._rect,e=this.style,i=!t;if(i){var n=this.path;n=n||(this.path=new rr),this.__dirtyPath&&(n.beginPath(),this.buildPath(n,this.shape,!1)),t=n.getBoundingRect()}if(this._rect=t,e.hasStroke()){var o=this._rectWithStroke||(this._rectWithStroke=t.clone());if(this.__dirty||i){o.copy(t);var a=e.lineWidth,r=e.strokeNoScale?this.getLineScale():1;e.hasFill()||(a=Math.max(a,this.strokeContainThreshold||4)),1e-10<r&&(o.width+=a/r,o.height+=a/r,o.x-=a/r/2,o.y-=a/r/2)}return o}return t},contain:function(t,e){var i=this.transformCoordToLocal(t,e),n=this.getBoundingRect(),o=this.style;if(t=i[0],e=i[1],n.contain(t,e)){var a=this.path.data;if(o.hasStroke()){var r=o.lineWidth,s=o.strokeNoScale?this.getLineScale():1;if(1e-10<s&&(o.hasFill()||(r=Math.max(r,this.strokeContainThreshold)),function(t,e,i,n){return Sr(t,e,!0,i,n)}(a,r/s,t,e)))return!0}if(o.hasFill())return function(t,e,i){return Sr(t,0,!1,e,i)}(a,t,e)}return!1},dirty:function(t){null==t&&(t=!0),t&&(this.__dirtyPath=t,this._rect=null),this.__dirty=this.__dirtyText=!0,this.__zr&&this.__zr.refresh(),this.__clipTarget&&this.__clipTarget.dirty()},animateShape:function(t){return this.animate("shape",t)},attrKV:function(t,e){"shape"===t?(this.setShape(e),this.__dirtyPath=!0,this._rect=null):Jn.prototype.attrKV.call(this,t,e)},setShape:function(t,e){var i=this.shape;if(i){if(z(t))for(var n in t)t.hasOwnProperty(n)&&(i[n]=t[n]);else i[t]=e;this.dirty(!0)}return this},getLineScale:function(){var t=this.transform;return t&&1e-10<Ir(t[0]-1)&&1e-10<Ir(t[3]-1)?Math.sqrt(Ir(t[0]*t[3]-t[2]*t[1])):1}},Ar.extend=function(o){function t(t){Ar.call(this,t),o.style&&this.style.extendFrom(o.style,!1);var e=o.shape;if(e){this.shape=this.shape||{};var i=this.shape;for(var n in e)!i.hasOwnProperty(n)&&e.hasOwnProperty(n)&&(i[n]=e[n])}o.init&&o.init.call(this,t)}for(var e in w(t,Ar),o)"style"!==e&&"shape"!==e&&(t.prototype[e]=o[e]);return t},w(Ar,Jn);function Dr(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}var Cr=rr.CMD,Lr=[[],[],[]],kr=Math.sqrt,Pr=Math.atan2,Nr=function(t,e){var i,n,o,a,r,s=t.data,l=Cr.M,u=Cr.C,h=Cr.L,c=Cr.R,d=Cr.A,f=Cr.Q;for(a=o=0;o<s.length;){switch(i=s[o++],a=o,n=0,i){case l:case h:n=1;break;case u:n=3;break;case f:n=2;break;case d:var p=e[4],g=e[5],m=kr(e[0]*e[0]+e[1]*e[1]),v=kr(e[2]*e[2]+e[3]*e[3]),y=Pr(-e[1]/v,e[0]/m);s[o]*=m,s[o++]+=p,s[o]*=v,s[o++]+=g,s[o++]*=m,s[o++]*=v,s[o++]+=y,s[o++]+=y,a=o+=2;break;case c:x[0]=s[o++],x[1]=s[o++],bt(x,x,e),s[a++]=x[0],s[a++]=x[1],x[0]+=s[o++],x[1]+=s[o++],bt(x,x,e),s[a++]=x[0],s[a++]=x[1]}for(r=0;r<n;r++){var x;(x=Lr[r])[0]=s[o++],x[1]=s[o++],bt(x,x,e),s[a++]=x[0],s[a++]=x[1]}}},Or=Math.sqrt,Er=Math.sin,Rr=Math.cos,zr=Math.PI,Br=function(t,e){return(t[0]*e[0]+t[1]*e[1])/(Dr(t)*Dr(e))},Vr=function(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(Br(t,e))};function Gr(t,e,i,n,o,a,r,s,l,u,h){var c=l*(zr/180),d=Rr(c)*(t-i)/2+Er(c)*(e-n)/2,f=-1*Er(c)*(t-i)/2+Rr(c)*(e-n)/2,p=d*d/(r*r)+f*f/(s*s);1<p&&(r*=Or(p),s*=Or(p));var g=(o===a?-1:1)*Or((r*r*(s*s)-r*r*(f*f)-s*s*(d*d))/(r*r*(f*f)+s*s*(d*d)))||0,m=g*r*f/s,v=g*-s*d/r,y=(t+i)/2+Rr(c)*m-Er(c)*v,x=(e+n)/2+Er(c)*m+Rr(c)*v,_=Vr([1,0],[(d-m)/r,(f-v)/s]),w=[(d-m)/r,(f-v)/s],b=[(-1*d-m)/r,(-1*f-v)/s],S=Vr(w,b);Br(w,b)<=-1&&(S=zr),1<=Br(w,b)&&(S=0),0===a&&0<S&&(S-=2*zr),1===a&&S<0&&(S+=2*zr),h.addData(u,y,x,r,s,_,S,c,a)}var Fr=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,Wr=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function Hr(t,e){var i=function(t){if(!t)return new rr;for(var e,i=0,n=0,o=i,a=n,r=new rr,s=rr.CMD,l=t.match(Fr),u=0;u<l.length;u++){for(var h,c=l[u],d=c.charAt(0),f=c.match(Wr)||[],p=f.length,g=0;g<p;g++)f[g]=parseFloat(f[g]);for(var m=0;m<p;){var v,y,x,_,w,b,S,M=i,I=n;switch(d){case"l":i+=f[m++],n+=f[m++],h=s.L,r.addData(h,i,n);break;case"L":i=f[m++],n=f[m++],h=s.L,r.addData(h,i,n);break;case"m":i+=f[m++],n+=f[m++],h=s.M,r.addData(h,i,n),o=i,a=n,d="l";break;case"M":i=f[m++],n=f[m++],h=s.M,r.addData(h,i,n),o=i,a=n,d="L";break;case"h":i+=f[m++],h=s.L,r.addData(h,i,n);break;case"H":i=f[m++],h=s.L,r.addData(h,i,n);break;case"v":n+=f[m++],h=s.L,r.addData(h,i,n);break;case"V":n=f[m++],h=s.L,r.addData(h,i,n);break;case"C":h=s.C,r.addData(h,f[m++],f[m++],f[m++],f[m++],f[m++],f[m++]),i=f[m-2],n=f[m-1];break;case"c":h=s.C,r.addData(h,f[m++]+i,f[m++]+n,f[m++]+i,f[m++]+n,f[m++]+i,f[m++]+n),i+=f[m-2],n+=f[m-1];break;case"S":v=i,y=n;var T=r.len(),A=r.data;e===s.C&&(v+=i-A[T-4],y+=n-A[T-3]),h=s.C,M=f[m++],I=f[m++],i=f[m++],n=f[m++],r.addData(h,v,y,M,I,i,n);break;case"s":v=i,y=n;T=r.len(),A=r.data;e===s.C&&(v+=i-A[T-4],y+=n-A[T-3]),h=s.C,M=i+f[m++],I=n+f[m++],i+=f[m++],n+=f[m++],r.addData(h,v,y,M,I,i,n);break;case"Q":M=f[m++],I=f[m++],i=f[m++],n=f[m++],h=s.Q,r.addData(h,M,I,i,n);break;case"q":M=f[m++]+i,I=f[m++]+n,i+=f[m++],n+=f[m++],h=s.Q,r.addData(h,M,I,i,n);break;case"T":v=i,y=n;T=r.len(),A=r.data;e===s.Q&&(v+=i-A[T-4],y+=n-A[T-3]),i=f[m++],n=f[m++],h=s.Q,r.addData(h,v,y,i,n);break;case"t":v=i,y=n;T=r.len(),A=r.data;e===s.Q&&(v+=i-A[T-4],y+=n-A[T-3]),i+=f[m++],n+=f[m++],h=s.Q,r.addData(h,v,y,i,n);break;case"A":x=f[m++],_=f[m++],w=f[m++],b=f[m++],S=f[m++],Gr(M=i,I=n,i=f[m++],n=f[m++],b,S,x,_,w,h=s.A,r);break;case"a":x=f[m++],_=f[m++],w=f[m++],b=f[m++],S=f[m++],Gr(M=i,I=n,i+=f[m++],n+=f[m++],b,S,x,_,w,h=s.A,r)}}"z"!==d&&"Z"!==d||(h=s.Z,r.addData(h),i=o,n=a),e=h}return r.toStatic(),r}(t);return(e=e||{}).buildPath=function(t){if(t.setData){t.setData(i.data),(e=t.getContext())&&t.rebuildPath(e)}else{var e=t;i.rebuildPath(e)}},e.applyTransform=function(t){Nr(i,t),this.dirty(!0)},e}function Zr(t,e){return new Ar(Hr(t,e))}var Ur=function(t){Jn.call(this,t)};Ur.prototype={constructor:Ur,type:"text",brush:function(t,e){var i=this.style;this.__dirty&&En(i),i.fill=i.stroke=i.shadowBlur=i.shadowColor=i.shadowOffsetX=i.shadowOffsetY=null;var n=i.text;null!=n&&(n+=""),qn(n,i)?(this.setTransform(t),zn(this,t,n,i,null,e),this.restoreTransform(t)):t.__attrCachedBy=Wi.NONE},getBoundingRect:function(){var t=this.style;if(this.__dirty&&En(t),!this._rect){var e=t.text;null!=e?e+="":e="";var i=gn(t.text+"",t.font,t.textAlign,t.textVerticalAlign,t.textPadding,t.textLineHeight,t.rich);if(i.x+=t.x||0,i.y+=t.y||0,Un(t.textStroke,t.textStrokeWidth)){var n=t.textStrokeWidth;i.x-=n/2,i.y-=n/2,i.width+=n,i.height+=n}this._rect=i}return this._rect}},w(Ur,Jn);function Xr(l){return v.browser.ie&&11<=v.browser.version?function(){var t,e=this.__clipPaths,i=this.style;if(e)for(var n=0;n<e.length;n++){var o=e[n],a=o&&o.shape,r=o&&o.type;if(a&&("sector"===r&&a.startAngle===a.endAngle||"rect"===r&&(!a.width||!a.height))){for(var s=0;s<jr.length;s++)jr[s][2]=i[jr[s][0]],i[jr[s][0]]=jr[s][1];t=!0;break}}if(l.apply(this,arguments),t)for(s=0;s<jr.length;s++)i[jr[s][0]]=jr[s][2]}:l}var Yr=Ar.extend({type:"circle",shape:{cx:0,cy:0,r:0},buildPath:function(t,e,i){i&&t.moveTo(e.cx+e.r,e.cy),t.arc(e.cx,e.cy,e.r,0,2*Math.PI,!0)}}),jr=[["shadowBlur",0],["shadowColor","#000"],["shadowOffsetX",0],["shadowOffsetY",0]],qr=Ar.extend({type:"sector",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},brush:Xr(Ar.prototype.brush),buildPath:function(t,e){var i=e.cx,n=e.cy,o=Math.max(e.r0||0,0),a=Math.max(e.r,0),r=e.startAngle,s=e.endAngle,l=e.clockwise,u=Math.cos(r),h=Math.sin(r);t.moveTo(u*o+i,h*o+n),t.lineTo(u*a+i,h*a+n),t.arc(i,n,a,r,s,!l),t.lineTo(Math.cos(s)*o+i,Math.sin(s)*o+n),0!==o&&t.arc(i,n,o,s,r,l),t.closePath()}}),Kr=Ar.extend({type:"ring",shape:{cx:0,cy:0,r:0,r0:0},buildPath:function(t,e){var i=e.cx,n=e.cy,o=2*Math.PI;t.moveTo(i+e.r,n),t.arc(i,n,e.r,0,o,!1),t.moveTo(i+e.r0,n),t.arc(i,n,e.r0,0,o,!0)}});function $r(t,e,i,n,o,a,r){var s=.5*(i-t),l=.5*(n-e);return(2*(e-i)+s+l)*r+(-3*(e-i)-2*s-l)*a+s*o+e}function Jr(t,e,i){var n=e.points,o=e.smooth;if(n&&2<=n.length){if(o&&"spline"!==o){var a=function(t,e,i,n){var o,a,r,s,l=[],u=[],h=[],c=[];if(n){r=[1/0,1/0],s=[-1/0,-1/0];for(var d=0,f=t.length;d<f;d++)St(r,r,t[d]),Mt(s,s,t[d]);St(r,r,n[0]),Mt(s,s,n[1])}for(d=0,f=t.length;d<f;d++){var p=t[d];if(i)o=t[d?d-1:f-1],a=t[(d+1)%f];else{if(0===d||d===f-1){l.push(rt(t[d]));continue}o=t[d-1],a=t[d+1]}ht(u,a,o),gt(u,u,e);var g=vt(p,o),m=vt(p,a),v=g+m;0!==v&&(g/=v,m/=v),gt(h,u,-g),gt(c,u,m);var y=lt([],p,h),x=lt([],p,c);n&&(Mt(y,y,r),St(y,y,s),Mt(x,x,r),St(x,x,s)),l.push(y),l.push(x)}return i&&l.push(l.shift()),l}(n,o,i,e.smoothConstraint);t.moveTo(n[0][0],n[0][1]);for(var r=n.length,s=0;s<(i?r:r-1);s++){var l=a[2*s],u=a[2*s+1],h=n[(s+1)%r];t.bezierCurveTo(l[0],l[1],u[0],u[1],h[0],h[1])}}else{"spline"===o&&(n=function(t,e){for(var i=t.length,n=[],o=0,a=1;a<i;a++)o+=vt(t[a-1],t[a]);var r=o/2;r=r<i?i:r;for(a=0;a<r;a++){var s,l,u,h=a/(r-1)*(e?i:i-1),c=Math.floor(h),d=h-c,f=t[c%i];u=e?(s=t[(c-1+i)%i],l=t[(c+1)%i],t[(c+2)%i]):(s=t[0===c?c:c-1],l=t[i-2<c?i-1:c+1],t[i-3<c?i-1:c+2]);var p=d*d,g=d*p;n.push([$r(s[0],f[0],l[0],u[0],d,p,g),$r(s[1],f[1],l[1],u[1],d,p,g)])}return n}(n,i)),t.moveTo(n[0][0],n[0][1]);s=1;for(var c=n.length;s<c;s++)t.lineTo(n[s][0],n[s][1])}i&&t.closePath()}}var Qr=Ar.extend({type:"polygon",shape:{points:null,smooth:!1,smoothConstraint:null},buildPath:function(t,e){Jr(t,e,!0)}}),ts=Ar.extend({type:"polyline",shape:{points:null,smooth:!1,smoothConstraint:null},style:{stroke:"#000",fill:null},buildPath:function(t,e){Jr(t,e,!1)}}),es=Math.round;function is(t,e,i){if(e){var n=e.x1,o=e.x2,a=e.y1,r=e.y2;t.x1=n,t.x2=o,t.y1=a,t.y2=r;var s=i&&i.lineWidth;s&&(es(2*n)===es(2*o)&&(t.x1=t.x2=os(n,s,!0)),es(2*a)===es(2*r)&&(t.y1=t.y2=os(a,s,!0)))}}function ns(t,e,i){if(e){var n=e.x,o=e.y,a=e.width,r=e.height;t.x=n,t.y=o,t.width=a,t.height=r;var s=i&&i.lineWidth;s&&(t.x=os(n,s,!0),t.y=os(o,s,!0),t.width=Math.max(os(n+a,s,!1)-t.x,0===a?0:1),t.height=Math.max(os(o+r,s,!1)-t.y,0===r?0:1))}}function os(t,e,i){if(!e)return t;var n=es(2*t);return(n+es(e))%2==0?n/2:(n+(i?1:-1))/2}var as={},rs=Ar.extend({type:"rect",shape:{r:0,x:0,y:0,width:0,height:0},buildPath:function(t,e){var i,n,o,a;this.subPixelOptimize?(ns(as,e,this.style),i=as.x,n=as.y,o=as.width,a=as.height,as.r=e.r,e=as):(i=e.x,n=e.y,o=e.width,a=e.height),e.r?Dn(t,e):t.rect(i,n,o,a),t.closePath()}}),ss={},ls=Ar.extend({type:"line",shape:{x1:0,y1:0,x2:0,y2:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(t,e){var i,n,o,a;a=this.subPixelOptimize?(is(ss,e,this.style),i=ss.x1,n=ss.y1,o=ss.x2,ss.y2):(i=e.x1,n=e.y1,o=e.x2,e.y2);var r=e.percent;0!==r&&(t.moveTo(i,n),r<1&&(o=i*(1-r)+o*r,a=n*(1-r)+a*r),t.lineTo(o,a))},pointAt:function(t){var e=this.shape;return[e.x1*(1-t)+e.x2*t,e.y1*(1-t)+e.y2*t]}}),us=[];function hs(t,e,i){var n=t.cpx2,o=t.cpy2;return null===n||null===o?[(i?Aa:Ta)(t.x1,t.cpx1,t.cpx2,t.x2,e),(i?Aa:Ta)(t.y1,t.cpy1,t.cpy2,t.y2,e)]:[(i?ka:La)(t.x1,t.cpx1,t.x2,e),(i?ka:La)(t.y1,t.cpy1,t.y2,e)]}function cs(t){this.colorStops=t||[]}var ds=Ar.extend({type:"bezier-curve",shape:{x1:0,y1:0,x2:0,y2:0,cpx1:0,cpy1:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(t,e){var i=e.x1,n=e.y1,o=e.x2,a=e.y2,r=e.cpx1,s=e.cpy1,l=e.cpx2,u=e.cpy2,h=e.percent;0!==h&&(t.moveTo(i,n),null==l||null==u?(h<1&&(Na(i,r,o,h,us),r=us[1],o=us[2],Na(n,s,a,h,us),s=us[1],a=us[2]),t.quadraticCurveTo(r,s,o,a)):(h<1&&(Ca(i,r,l,o,h,us),r=us[1],l=us[2],o=us[3],Ca(n,s,u,a,h,us),s=us[1],u=us[2],a=us[3]),t.bezierCurveTo(r,s,l,u,o,a)))},pointAt:function(t){return hs(this.shape,t,!1)},tangentAt:function(t){var e=hs(this.shape,t,!0);return mt(e,e)}}),fs=Ar.extend({type:"arc",shape:{cx:0,cy:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},style:{stroke:"#000",fill:null},buildPath:function(t,e){var i=e.cx,n=e.cy,o=Math.max(e.r,0),a=e.startAngle,r=e.endAngle,s=e.clockwise,l=Math.cos(a),u=Math.sin(a);t.moveTo(l*o+i,u*o+n),t.arc(i,n,o,a,r,!s)}}),ps=Ar.extend({type:"compound",shape:{paths:null},_updatePathDirty:function(){for(var t=this.__dirtyPath,e=this.shape.paths,i=0;i<e.length;i++)t=t||e[i].__dirtyPath;this.__dirtyPath=t,this.__dirty=this.__dirty||t},beforeBrush:function(){this._updatePathDirty();for(var t=this.shape.paths||[],e=this.getGlobalScale(),i=0;i<t.length;i++)t[i].path||t[i].createPathProxy(),t[i].path.setScale(e[0],e[1],t[i].segmentIgnoreThreshold)},buildPath:function(t,e){for(var i=e.paths||[],n=0;n<i.length;n++)i[n].buildPath(t,i[n].shape,!0)},afterBrush:function(){for(var t=this.shape.paths||[],e=0;e<t.length;e++)t[e].__dirtyPath=!1},getBoundingRect:function(){return this._updatePathDirty(),Ar.prototype.getBoundingRect.call(this)}});cs.prototype={constructor:cs,addColorStop:function(t,e){this.colorStops.push({offset:t,color:e})}};function gs(t,e,i,n,o,a){this.x=null==t?0:t,this.y=null==e?0:e,this.x2=null==i?1:i,this.y2=null==n?0:n,this.type="linear",this.global=a||!1,cs.call(this,o)}gs.prototype={constructor:gs},w(gs,cs);function ms(t,e,i,n,o){this.x=null==t?.5:t,this.y=null==e?.5:e,this.r=null==i?.5:i,this.type="radial",this.global=o||!1,cs.call(this,n)}function vs(t){Jn.call(this,t),this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.notClear=!0}ms.prototype={constructor:ms},w(ms,cs),vs.prototype.incremental=!0,vs.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.dirty(),this.notClear=!1},vs.prototype.addDisplayable=function(t,e){e?this._temporaryDisplayables.push(t):this._displayables.push(t),this.dirty()},vs.prototype.addDisplayables=function(t,e){e=e||!1;for(var i=0;i<t.length;i++)this.addDisplayable(t[i],e)},vs.prototype.eachPendingDisplayable=function(t){for(var e=this._cursor;e<this._displayables.length;e++)t&&t(this._displayables[e]);for(e=0;e<this._temporaryDisplayables.length;e++)t&&t(this._temporaryDisplayables[e])},vs.prototype.update=function(){this.updateTransform();for(var t=this._cursor;t<this._displayables.length;t++){(e=this._displayables[t]).parent=this,e.update(),e.parent=null}for(t=0;t<this._temporaryDisplayables.length;t++){var e;(e=this._temporaryDisplayables[t]).parent=this,e.update(),e.parent=null}},vs.prototype.brush=function(t,e){for(var i=this._cursor;i<this._displayables.length;i++){(n=this._displayables[i]).beforeBrush&&n.beforeBrush(t),n.brush(t,i===this._cursor?null:this._displayables[i-1]),n.afterBrush&&n.afterBrush(t)}this._cursor=i;for(i=0;i<this._temporaryDisplayables.length;i++){var n;(n=this._temporaryDisplayables[i]).beforeBrush&&n.beforeBrush(t),n.brush(t,0===i?null:this._temporaryDisplayables[i-1]),n.afterBrush&&n.afterBrush(t)}this._temporaryDisplayables=[],this.notClear=!0};var ys=[];vs.prototype.getBoundingRect=function(){if(!this._rect){for(var t=new Di(1/0,1/0,-1/0,-1/0),e=0;e<this._displayables.length;e++){var i=this._displayables[e],n=i.getBoundingRect().clone();i.needLocalTransform()&&n.applyTransform(i.getLocalTransform(ys)),t.union(n)}this._rect=t}return this._rect},vs.prototype.contain=function(t,e){var i=this.transformCoordToLocal(t,e);if(this.getBoundingRect().contain(i[0],i[1]))for(var n=0;n<this._displayables.length;n++){if(this._displayables[n].contain(t,e))return!0}return!1},w(vs,Jn);var xs=Math.max,_s=Math.min,ws={},bs=1,Ss={color:"textFill",textBorderColor:"textStroke",textBorderWidth:"textStrokeWidth"},Ms="emphasis",Is="normal",Ts=1,As={},Ds={};function Cs(t){return Ar.extend(t)}function Ls(t,e){Ds[t]=e}function ks(t){if(Ds.hasOwnProperty(t))return Ds[t]}function Ps(t,e,i,n){var o=Zr(t,e);return i&&("center"===n&&(i=Os(i,o.getBoundingRect())),Rs(o,i)),o}function Ns(t,i,n){var o=new Qn({style:{image:t,x:i.x,y:i.y,width:i.width,height:i.height},onload:function(t){if("center"===n){var e={width:t.width,height:t.height};o.setStyle(Os(i,e))}}});return o}function Os(t,e){var i,n=e.width/e.height,o=t.height*n;return i=o<=t.width?t.height:(o=t.width)/n,{x:t.x+t.width/2-o/2,y:t.y+t.height/2-i/2,width:o,height:i}}var Es=function(t,e){for(var i=[],n=t.length,o=0;o<n;o++){var a=t[o];a.path||a.createPathProxy(),a.__dirtyPath&&a.buildPath(a.path,a.shape,!0),i.push(a.path)}var r=new Ar(e);return r.createPathProxy(),r.buildPath=function(t){t.appendPath(i);var e=t.getContext();e&&t.rebuildPath(e)},r};function Rs(t,e){if(t.applyTransform){var i=t.getBoundingRect().calculateTransform(e);t.applyTransform(i)}}var zs=os;function Bs(t){return null!=t&&"none"!==t}var Vs=Q(),Gs=0;function Fs(t){var e=t.__hoverStl;if(e&&!t.__highlighted){var i=t.__zr,n=t.useHoverLayer&&i&&"canvas"===i.painter.type;if(t.__highlighted=n?"layer":"plain",!(t.isGroup||!i&&t.useHoverLayer)){var o=t,a=t.style;n&&(a=(o=i.addHover(t)).style),ll(a),n||function(t){if(t.__hoverStlDirty){t.__hoverStlDirty=!1;var e=t.__hoverStl;if(e){var i=t.__cachedNormalStl={};t.__cachedNormalZ2=t.z2;var n=t.style;for(var o in e)null!=e[o]&&(i[o]=n[o]);i.fill=n.fill,i.stroke=n.stroke}else t.__cachedNormalStl=t.__cachedNormalZ2=null}}(o),a.extendFrom(e),Ws(a,e,"fill"),Ws(a,e,"stroke"),sl(a),n||(t.dirty(!1),t.z2+=bs)}}}function Ws(t,e,i){!Bs(e[i])&&Bs(t[i])&&(t[i]=function(t){if("string"!=typeof t)return t;var e=Vs.get(t);return e||(e=He(t,-.1),Gs<1e4&&(Vs.set(t,e),Gs++)),e}(t[i]))}function Hs(t){var e=t.__highlighted;if(e&&(t.__highlighted=!1,!t.isGroup))if("layer"===e)t.__zr&&t.__zr.removeHover(t);else{var i=t.style,n=t.__cachedNormalStl;n&&(ll(i),t.setStyle(n),sl(i));var o=t.__cachedNormalZ2;null!=o&&t.z2-o===bs&&(t.z2=o)}}function Zs(t,e,i){var n,o=Is,a=Is;t.__highlighted&&(o=Ms,n=!0),e(t,i),t.__highlighted&&(a=Ms,n=!0),t.isGroup&&t.traverse(function(t){t.isGroup||e(t,i)}),n&&t.__highDownOnUpdate&&t.__highDownOnUpdate(o,a)}function Us(t,e){e=t.__hoverStl=!1!==e&&(t.hoverStyle||e||{}),t.__hoverStlDirty=!0,t.__highlighted&&(t.__cachedNormalStl=null,Hs(t),Fs(t))}function Xs(t){Ks(this,t)||this.__highByOuter||Zs(this,Fs)}function Ys(t){Ks(this,t)||this.__highByOuter||Zs(this,Hs)}function js(t){this.__highByOuter|=1<<(t||0),Zs(this,Fs)}function qs(t){(this.__highByOuter&=~(1<<(t||0)))||Zs(this,Hs)}function Ks(t,e){return t.__highDownSilentOnTouch&&e.zrByTouch}function $s(t,e){Js(t,!0),Zs(t,Us,e)}function Js(t,e){var i=!1===e;if(t.__highDownSilentOnTouch=t.highDownSilentOnTouch,t.__highDownOnUpdate=t.highDownOnUpdate,!i||t.__highDownDispatcher){var n=i?"off":"on";t[n]("mouseover",Xs)[n]("mouseout",Ys),t[n]("emphasis",js)[n]("normal",qs),t.__highByOuter=t.__highByOuter||0,t.__highDownDispatcher=!i}}function Qs(t){return!(!t||!t.__highDownDispatcher)}function tl(t){var e=As[t];return null==e&&Ts<=32&&(e=As[t]=Ts++),e}function el(t,e,i,n,o,a,r){var s,l=(o=o||ws).labelFetcher,u=o.labelDataIndex,h=o.labelDimIndex,c=i.getShallow("show"),d=n.getShallow("show");(c||d)&&(l&&(s=l.getFormattedLabel(u,"normal",null,h)),null==s&&(s=C(o.defaultText)?o.defaultText(u,o):o.defaultText));var f=c?s:null,p=d?H(l?l.getFormattedLabel(u,"emphasis",null,h):null,s):null;null==f&&null==p||(nl(t,i,a,o),nl(e,n,r,o,!0)),t.text=f,e.text=p}function il(t,e,i){var n=t.style;e&&(ll(n),t.setStyle(e),sl(n)),n=t.__hoverStl,i&&n&&(ll(n),k(n,i),sl(n))}function nl(t,e,i,n,o){return ol(t,e,n,o),i&&k(t,i),t}function ol(t,e,i,n){if((i=i||ws).isRectText){var o;i.getTextPosition?o=i.getTextPosition(e,n):"outside"===(o=e.getShallow("position")||(n?null:"inside"))&&(o="top"),t.textPosition=o,t.textOffset=e.getShallow("offset");var a=e.getShallow("rotate");null!=a&&(a*=Math.PI/180),t.textRotation=a,t.textDistance=H(e.getShallow("distance"),n?null:5)}var r,s=e.ecModel,l=s&&s.option.textStyle,u=function(t){var e;for(;t&&t!==t.ecModel;){var i=(t.option||ws).rich;if(i)for(var n in e=e||{},i)i.hasOwnProperty(n)&&(e[n]=1);t=t.parentModel}return e}(e);if(u)for(var h in r={},u)if(u.hasOwnProperty(h)){var c=e.getModel(["rich",h]);al(r[h]={},c,l,i,n)}return t.rich=r,al(t,e,l,i,n,!0),i.forceRich&&!i.textStyle&&(i.textStyle={}),t}function al(t,e,i,n,o,a){i=!o&&i||ws,t.textFill=rl(e.getShallow("color"),n)||i.color,t.textStroke=rl(e.getShallow("textBorderColor"),n)||i.textBorderColor,t.textStrokeWidth=H(e.getShallow("textBorderWidth"),i.textBorderWidth),o||(a&&(t.insideRollbackOpt=n,sl(t)),null==t.textFill&&(t.textFill=n.autoColor)),t.fontStyle=e.getShallow("fontStyle")||i.fontStyle,t.fontWeight=e.getShallow("fontWeight")||i.fontWeight,t.fontSize=e.getShallow("fontSize")||i.fontSize,t.fontFamily=e.getShallow("fontFamily")||i.fontFamily,t.textAlign=e.getShallow("align"),t.textVerticalAlign=e.getShallow("verticalAlign")||e.getShallow("baseline"),t.textLineHeight=e.getShallow("lineHeight"),t.textWidth=e.getShallow("width"),t.textHeight=e.getShallow("height"),t.textTag=e.getShallow("tag"),a&&n.disableBox||(t.textBackgroundColor=rl(e.getShallow("backgroundColor"),n),t.textPadding=e.getShallow("padding"),t.textBorderColor=rl(e.getShallow("borderColor"),n),t.textBorderWidth=e.getShallow("borderWidth"),t.textBorderRadius=e.getShallow("borderRadius"),t.textBoxShadowColor=e.getShallow("shadowColor"),t.textBoxShadowBlur=e.getShallow("shadowBlur"),t.textBoxShadowOffsetX=e.getShallow("shadowOffsetX"),t.textBoxShadowOffsetY=e.getShallow("shadowOffsetY")),t.textShadowColor=e.getShallow("textShadowColor")||i.textShadowColor,t.textShadowBlur=e.getShallow("textShadowBlur")||i.textShadowBlur,t.textShadowOffsetX=e.getShallow("textShadowOffsetX")||i.textShadowOffsetX,t.textShadowOffsetY=e.getShallow("textShadowOffsetY")||i.textShadowOffsetY}function rl(t,e){return"auto"!==t?t:e&&e.autoColor?e.autoColor:null}function sl(t){var e,i=t.textPosition,n=t.insideRollbackOpt;if(n&&null==t.textFill){var o=n.autoColor,a=n.isRectText,r=n.useInsideStyle,s=!1!==r&&(!0===r||a&&i&&"string"==typeof i&&0<=i.indexOf("inside")),l=!s&&null!=o;(s||l)&&(e={textFill:t.textFill,textStroke:t.textStroke,textStrokeWidth:t.textStrokeWidth}),s&&(t.textFill="#fff",null==t.textStroke&&(t.textStroke=o,null==t.textStrokeWidth&&(t.textStrokeWidth=2))),l&&(t.textFill=o)}t.insideRollback=e}function ll(t){var e=t.insideRollback;e&&(t.textFill=e.textFill,t.textStroke=e.textStroke,t.textStrokeWidth=e.textStrokeWidth,t.insideRollback=null)}function ul(t,e){var i=e&&e.getModel("textStyle");return j([t.fontStyle||i&&i.getShallow("fontStyle")||"",t.fontWeight||i&&i.getShallow("fontWeight")||"",(t.fontSize||i&&i.getShallow("fontSize")||12)+"px",t.fontFamily||i&&i.getShallow("fontFamily")||"sans-serif"].join(" "))}function hl(t,e,i,n,o,a){if("function"==typeof o&&(a=o,o=null),n&&n.isAnimationEnabled()){var r=t?"Update":"",s=n.getShallow("animationDuration"+r),l=n.getShallow("animationEasing"+r),u=n.getShallow("animationDelay"+r);"function"==typeof u&&(u=u(o,n.getAnimationDelayParams?n.getAnimationDelayParams(e,o):null)),"function"==typeof s&&(s=s(o)),0<s?e.animateTo(i,s,u||0,l,a,!!a):(e.stopAnimation(),e.attr(i),a&&a())}else e.stopAnimation(),e.attr(i),a&&a()}function cl(t,e,i,n,o){hl(!0,t,e,i,n,o)}function dl(t,e,i,n,o){hl(!1,t,e,i,n,o)}function fl(t,e){for(var i=re([]);t&&t!==e;)le(i,t.getLocalTransform(),i),t=t.parent;return i}function pl(t,e,i){return e&&!P(e)&&(e=ve.getLocalTransform(e)),i&&(e=de([],e)),bt([],t,e)}function gl(t,e,i){var n=0===e[4]||0===e[5]||0===e[0]?1:Math.abs(2*e[4]/e[0]),o=0===e[4]||0===e[5]||0===e[2]?1:Math.abs(2*e[4]/e[2]),a=["left"===t?-n:"right"===t?n:0,"top"===t?-o:"bottom"===t?o:0];return a=pl(a,e,i),Math.abs(a[0])>Math.abs(a[1])?0<a[0]?"right":"left":0<a[1]?"bottom":"top"}function ml(t,e,n,i){if(t&&e){var o,a=(o={},t.traverse(function(t){!t.isGroup&&t.anid&&(o[t.anid]=t)}),o);e.traverse(function(t){if(!t.isGroup&&t.anid){var e=a[t.anid];if(e){var i=r(t);t.attr(r(e)),cl(t,i,n,t.dataIndex)}}})}function r(t){var e={position:rt(t.position),rotation:t.rotation};return t.shape&&(e.shape=k({},t.shape)),e}}function vl(t,n){return N(t,function(t){var e=t[0];e=xs(e,n.x),e=_s(e,n.x+n.width);var i=t[1];return i=xs(i,n.y),[e,i=_s(i,n.y+n.height)]})}function yl(t,e,i){var n=(e=k({rectHover:!0},e)).style={strokeNoScale:!0};if(i=i||{x:-1,y:-1,width:2,height:2},t)return 0===t.indexOf("image://")?(n.image=t.slice(8),D(n,i),new Qn(e)):Ps(t.replace("path://",""),e,i,"center")}function xl(t,e,i,n,o){for(var a=0,r=o[o.length-1];a<o.length;a++){var s=o[a];if(_l(t,e,i,n,s[0],s[1],r[0],r[1]))return!0;r=s}}function _l(t,e,i,n,o,a,r,s){var l=i-t,u=n-e,h=r-o,c=s-a,d=wl(h,c,l,u);if(function(t){return t<=1e-6&&-1e-6<=t}(d))return!1;var f=t-o,p=e-a,g=wl(f,p,l,u)/d;if(g<0||1<g)return!1;var m=wl(f,p,h,c)/d;return!(m<0||1<m)}function wl(t,e,i,n){return t*n-i*e}Ls("circle",Yr),Ls("sector",qr),Ls("ring",Kr),Ls("polygon",Qr),Ls("polyline",ts),Ls("rect",rs),Ls("line",ls),Ls("bezierCurve",ds),Ls("arc",fs);var bl=(Object.freeze||Object)({Z2_EMPHASIS_LIFT:bs,CACHED_LABEL_STYLE_PROPERTIES:Ss,extendShape:Cs,extendPath:function(t,e){return function(t,e){return Ar.extend(Hr(t,e))}(t,e)},registerShape:Ls,getShapeClass:ks,makePath:Ps,makeImage:Ns,mergePath:Es,resizePath:Rs,subPixelOptimizeLine:function(t){return is(t.shape,t.shape,t.style),t},subPixelOptimizeRect:function(t){return ns(t.shape,t.shape,t.style),t},subPixelOptimize:zs,setElementHoverStyle:Us,setHoverStyle:$s,setAsHighDownDispatcher:Js,isHighDownDispatcher:Qs,getHighlightDigit:tl,setLabelStyle:el,modifyLabelStyle:il,setTextStyle:nl,setText:function(t,e,i){var n,o={isRectText:!0};!1===i?n=!0:o.autoColor=i,ol(t,e,o,n)},getFont:ul,updateProps:cl,initProps:dl,getTransform:fl,applyTransform:pl,transformDirection:gl,groupTransition:ml,clipPointsByRect:vl,clipRectByRect:function(t,e){var i=xs(t.x,e.x),n=_s(t.x+t.width,e.x+e.width),o=xs(t.y,e.y),a=_s(t.y+t.height,e.y+e.height);if(i<=n&&o<=a)return{x:i,y:o,width:n-i,height:a-o}},createIcon:yl,linePolygonIntersect:xl,lineLineIntersect:_l,Group:Ci,Image:Qn,Text:Ur,Circle:Yr,Sector:qr,Ring:Kr,Polygon:Qr,Polyline:ts,Rect:rs,Line:ls,BezierCurve:ds,Arc:fs,IncrementalDisplayable:vs,CompoundPath:ps,LinearGradient:gs,RadialGradient:ms,BoundingRect:Di}),Sl=["textStyle","color"],Ml={getTextColor:function(t){var e=this.ecModel;return this.getShallow("color")||(!t&&e?e.get(Sl):null)},getFont:function(){return ul({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},getTextRect:function(t){return gn(t,this.getFont(),this.getShallow("align"),this.getShallow("verticalAlign")||this.getShallow("baseline"),this.getShallow("padding"),this.getShallow("lineHeight"),this.getShallow("rich"),this.getShallow("truncateText"))}},Il=ha([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["textPosition"],["textAlign"]]),Tl={getItemStyle:function(t,e){var i=Il(this,t,e),n=this.getBorderLineDash();return n&&(i.lineDash=n),i},getBorderLineDash:function(){var t=this.get("borderType");return"solid"===t||null==t?null:"dashed"===t?[5,5]:[1,1]}},Al=b,Dl=jo();function Cl(t,e,i){this.parentModel=e,this.ecModel=i,this.option=t}function Ll(t,e,i){for(var n=0;n<e.length&&(!e[n]||null!=(t=t&&"object"==typeof t?t[e[n]]:null));n++);return null==t&&i&&(t=i.get(e)),t}function kl(t,e){var i=Dl(t).getParent;return i?i.call(t,e):t.parentModel}Cl.prototype={constructor:Cl,init:null,mergeOption:function(t){m(this.option,t,!0)},get:function(t,e){return null==t?this.option:Ll(this.option,this.parsePath(t),!e&&kl(this,t))},getShallow:function(t,e){var i=this.option,n=null==i?i:i[t],o=!e&&kl(this,t);return null==n&&o&&(n=o.getShallow(t)),n},getModel:function(t,e){var i;return new Cl(null==t?this.option:Ll(this.option,t=this.parsePath(t)),e=e||(i=kl(this,t))&&i.getModel(t),this.ecModel)},isEmpty:function(){return null==this.option},restoreData:function(){},clone:function(){return new this.constructor(L(this.option))},setReadOnly:function(t){},parsePath:function(t){return"string"==typeof t&&(t=t.split(".")),t},customizeGetParent:function(t){Dl(this).getParent=t},isAnimationEnabled:function(){if(!v.node){if(null!=this.option.animation)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}}},oa(Cl),ra(Cl),Al(Cl,da),Al(Cl,pa),Al(Cl,Ml),Al(Cl,Tl);var Pl=0;function Nl(t){return[t||"",Pl++,Math.random().toFixed(5)].join("_")}var Ol=1e-4;function El(t,e,i,n){var o=e[1]-e[0],a=i[1]-i[0];if(0==o)return 0==a?i[0]:(i[0]+i[1])/2;if(n)if(0<o){if(t<=e[0])return i[0];if(t>=e[1])return i[1]}else{if(t>=e[0])return i[0];if(t<=e[1])return i[1]}else{if(t===e[0])return i[0];if(t===e[1])return i[1]}return(t-e[0])/o*a+i[0]}function Rl(t,e){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%"}return"string"==typeof t?function(t){return t.replace(/^\s+|\s+$/g,"")}(t).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?NaN:+t}function zl(t,e,i){return null==e&&(e=10),e=Math.min(Math.max(0,e),20),t=(+t).toFixed(e),i?t:+t}function Bl(t){return t.sort(function(t,e){return t-e}),t}function Vl(t){if(t=+t,isNaN(t))return 0;for(var e=1,i=0;Math.round(t*e)/e!==t;)e*=10,i++;return i}function Gl(t){var e=t.toString(),i=e.indexOf("e");if(0<i){var n=+e.slice(i+1);return n<0?-n:0}var o=e.indexOf(".");return o<0?0:e.length-1-o}function Fl(t,e){var i=Math.log,n=Math.LN10,o=Math.floor(i(t[1]-t[0])/n),a=Math.round(i(Math.abs(e[1]-e[0]))/n),r=Math.min(Math.max(-o+a,0),20);return isFinite(r)?r:20}function Wl(t,e,i){if(!t[e])return 0;var n=S(t,function(t,e){return t+(isNaN(e)?0:e)},0);if(0===n)return 0;for(var o=Math.pow(10,i),a=N(t,function(t){return(isNaN(t)?0:t)/n*o*100}),r=100*o,s=N(a,function(t){return Math.floor(t)}),l=S(s,function(t,e){return t+e},0),u=N(a,function(t,e){return t-s[e]});l<r;){for(var h=Number.NEGATIVE_INFINITY,c=null,d=0,f=u.length;d<f;++d)u[d]>h&&(h=u[d],c=d);++s[c],u[c]=0,++l}return s[e]/o}var Hl=9007199254740991;function Zl(t){var e=2*Math.PI;return(t%e+e)%e}function Ul(t){return-Ol<t&&t<Ol}var Xl=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d\d)(?::(\d\d)(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function Yl(t){if(t instanceof Date)return t;if("string"!=typeof t)return null==t?new Date(NaN):new Date(Math.round(t));var e=Xl.exec(t);if(!e)return new Date(NaN);if(e[8]){var i=+e[4]||0;return"Z"!==e[8].toUpperCase()&&(i-=e[8].slice(0,3)),new Date(Date.UTC(+e[1],+(e[2]||1)-1,+e[3]||1,i,+(e[5]||0),+e[6]||0,+e[7]||0))}return new Date(+e[1],+(e[2]||1)-1,+e[3]||1,+e[4]||0,+(e[5]||0),+e[6]||0,+e[7]||0)}function jl(t){return Math.pow(10,ql(t))}function ql(t){if(0===t)return 0;var e=Math.floor(Math.log(t)/Math.LN10);return 10<=t/Math.pow(10,e)&&e++,e}function Kl(t,e){var i=ql(t),n=Math.pow(10,i),o=t/n;return t=(e?o<1.5?1:o<2.5?2:o<4?3:o<7?5:10:o<1?1:o<2?2:o<3?3:o<5?5:10)*n,-20<=i?+t.toFixed(i<0?-i:0):t}function $l(t){t.sort(function(t,e){return function t(e,i,n){return e.interval[n]<i.interval[n]||e.interval[n]===i.interval[n]&&(e.close[n]-i.close[n]==(n?-1:1)||!n&&t(e,i,1))}(t,e,0)?-1:1});for(var e=-1/0,i=1,n=0;n<t.length;){for(var o=t[n].interval,a=t[n].close,r=0;r<2;r++)o[r]<=e&&(o[r]=e,a[r]=r?1:1-i),e=o[r],i=a[r];o[0]===o[1]&&a[0]*a[1]!=1?t.splice(n,1):n++}return t}function Jl(t){return 0<=t-parseFloat(t)}var Ql=(Object.freeze||Object)({linearMap:El,parsePercent:Rl,round:zl,asc:Bl,getPrecision:Vl,getPrecisionSafe:Gl,getPixelPrecision:Fl,getPercentWithPrecision:Wl,MAX_SAFE_INTEGER:Hl,remRadian:Zl,isRadianAroundZero:Ul,parseDate:Yl,quantity:jl,quantityExponent:ql,nice:Kl,quantile:function(t,e){var i=(t.length-1)*e+1,n=Math.floor(i),o=+t[n-1],a=i-n;return a?o+a*(t[n]-o):o},reformIntervals:$l,isNumeric:Jl});function tu(t){return isNaN(t)?"-":(t=(t+"").split("."))[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(1<t.length?"."+t[1]:"")}function eu(t,e){return t=(t||"").toLowerCase().replace(/-(.)/g,function(t,e){return e.toUpperCase()}),e&&t&&(t=t.charAt(0).toUpperCase()+t.slice(1)),t}var iu=X,nu=/([&<>"'])/g,ou={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function au(t){return null==t?"":(t+"").replace(nu,function(t,e){return ou[e]})}function ru(t,e){return"{"+t+(null==e?"":e)+"}"}var su=["a","b","c","d","e","f","g"];function lu(t,e,i){O(e)||(e=[e]);var n=e.length;if(!n)return"";for(var o=e[0].$vars||[],a=0;a<o.length;a++){var r=su[a];t=t.replace(ru(r),ru(r,0))}for(var s=0;s<n;s++)for(var l=0;l<o.length;l++){var u=e[s][o[l]];t=t.replace(ru(su[l],s),i?au(u):u)}return t}function uu(i,t,n){return E(t,function(t,e){i=i.replace("{"+e+"}",n?au(t):t)}),i}function hu(t,e){var i=(t=R(t)?{color:t,extraCssText:e}:t||{}).color,n=t.type,o=(e=t.extraCssText,t.renderMode||"html"),a=t.markerId||"X";return i?"html"===o?"subItem"===n?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+au(i)+";"+(e||"")+'"></span>':'<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:'+au(i)+";"+(e||"")+'"></span>':{renderMode:o,content:"{marker"+a+"|} ",style:{color:i}}:""}function cu(t,e){return"0000".substr(0,e-(t+="").length)+t}function du(t,e,i){"week"!==t&&"month"!==t&&"quarter"!==t&&"half-year"!==t&&"year"!==t||(t="MM-dd\nyyyy");var n=Yl(e),o=i?"UTC":"",a=n["get"+o+"FullYear"](),r=n["get"+o+"Month"]()+1,s=n["get"+o+"Date"](),l=n["get"+o+"Hours"](),u=n["get"+o+"Minutes"](),h=n["get"+o+"Seconds"](),c=n["get"+o+"Milliseconds"]();return t=t.replace("MM",cu(r,2)).replace("M",r).replace("yyyy",a).replace("yy",a%100).replace("dd",cu(s,2)).replace("d",s).replace("hh",cu(l,2)).replace("h",l).replace("mm",cu(u,2)).replace("m",u).replace("ss",cu(h,2)).replace("s",h).replace("SSS",cu(c,3))}function fu(t){return t?t.charAt(0).toUpperCase()+t.substr(1):t}var pu=xn;var gu=(Object.freeze||Object)({addCommas:tu,toCamelCase:eu,normalizeCssArray:iu,encodeHTML:au,formatTpl:lu,formatTplSimple:uu,getTooltipMarker:hu,formatTime:du,capitalFirst:fu,truncateText:pu,getTextBoundingRect:function(t){return gn(t.text,t.font,t.textAlign,t.textVerticalAlign,t.textPadding,t.textLineHeight,t.rich,t.truncate)},getTextRect:function(t,e,i,n,o,a,r,s){return gn(t,e,i,n,o,s,a,r)}}),mu=E,vu=["left","right","top","bottom","width","height"],yu=[["width","left","right"],["height","top","bottom"]];function xu(h,c,d,f,p){var g=0,m=0;null==f&&(f=1/0),null==p&&(p=1/0);var v=0;c.eachChild(function(t,e){var i,n,o=t.position,a=t.getBoundingRect(),r=c.childAt(e+1),s=r&&r.getBoundingRect();if("horizontal"===h){var l=a.width+(s?-s.x+a.x:0);v=f<(i=g+l)||t.newline?(g=0,i=l,m+=v+d,a.height):Math.max(v,a.height)}else{var u=a.height+(s?-s.y+a.y:0);v=p<(n=m+u)||t.newline?(g+=v+d,m=0,n=u,a.width):Math.max(v,a.width)}t.newline||(o[0]=g,o[1]=m,"horizontal"===h?g=i+d:m=n+d)})}var _u=xu;T(xu,"vertical"),T(xu,"horizontal");function wu(t,e,i){i=iu(i||0);var n=e.width,o=e.height,a=Rl(t.left,n),r=Rl(t.top,o),s=Rl(t.right,n),l=Rl(t.bottom,o),u=Rl(t.width,n),h=Rl(t.height,o),c=i[2]+i[0],d=i[1]+i[3],f=t.aspect;switch(isNaN(u)&&(u=n-s-d-a),isNaN(h)&&(h=o-l-c-r),null!=f&&(isNaN(u)&&isNaN(h)&&(n/o<f?u=.8*n:h=.8*o),isNaN(u)&&(u=f*h),isNaN(h)&&(h=u/f)),isNaN(a)&&(a=n-s-u-d),isNaN(r)&&(r=o-l-h-c),t.left||t.right){case"center":a=n/2-u/2-i[3];break;case"right":a=n-u-d}switch(t.top||t.bottom){case"middle":case"center":r=o/2-h/2-i[0];break;case"bottom":r=o-h-c}a=a||0,r=r||0,isNaN(u)&&(u=n-d-a-(s||0)),isNaN(h)&&(h=o-c-r-(l||0));var p=new Di(a+i[3],r+i[0],u,h);return p.margin=i,p}function bu(t,e,i,n,o){var a=!o||!o.hv||o.hv[0],r=!o||!o.hv||o.hv[1],s=o&&o.boundingMode||"all";if(a||r){var l;if("raw"===s)l="group"===t.type?new Di(0,0,+e.width||0,+e.height||0):t.getBoundingRect();else if(l=t.getBoundingRect(),t.needLocalTransform()){var u=t.getLocalTransform();(l=l.clone()).applyTransform(u)}e=wu(D({width:l.width,height:l.height},e),i,n);var h=t.position,c=a?e.x-l.x:0,d=r?e.y-l.y:0;t.attr("position","raw"===s?[c,d]:[h[0]+c,h[1]+d])}}function Su(l,u,t){z(t)||(t={});var h=t.ignoreSize;O(h)||(h=[h,h]);var e=n(yu[0],0),i=n(yu[1],1);function n(t,e){var i={},n=0,o={},a=0;if(mu(t,function(t){o[t]=l[t]}),mu(t,function(t){c(u,t)&&(i[t]=o[t]=u[t]),d(i,t)&&n++,d(o,t)&&a++}),h[e])return d(u,t[1])?o[t[2]]=null:d(u,t[2])&&(o[t[1]]=null),o;if(2!==a&&n){if(2<=n)return i;for(var r=0;r<t.length;r++){var s=t[r];if(!c(i,s)&&c(l,s)){i[s]=l[s];break}}return i}return o}function c(t,e){return t.hasOwnProperty(e)}function d(t,e){return null!=t[e]&&"auto"!==t[e]}function o(t,e,i){mu(t,function(t){e[t]=i[t]})}o(yu[0],l,e),o(yu[1],l,i)}function Mu(t){return Iu({},t)}function Iu(e,i){return i&&e&&mu(vu,function(t){i.hasOwnProperty(t)&&(e[t]=i[t])}),e}var Tu,Au,Du,Cu=jo(),Lu=Cl.extend({type:"component",id:"",name:"",mainType:"",subType:"",componentIndex:0,defaultOption:null,ecModel:null,dependentModels:[],uid:null,layoutMode:null,$constructor:function(t,e,i,n){Cl.call(this,t,e,i,n),this.uid=Nl("ec_cpt_model")},init:function(t,e,i,n){this.mergeDefaultAndTheme(t,i)},mergeDefaultAndTheme:function(t,e){var i=this.layoutMode,n=i?Mu(t):{};m(t,e.getTheme().get(this.mainType)),m(t,this.getDefaultOption()),i&&Su(t,n,i)},mergeOption:function(t,e){m(this.option,t,!0);var i=this.layoutMode;i&&Su(this.option,t,i)},optionUpdated:function(t,e){},getDefaultOption:function(){var t=Cu(this);if(!t.defaultOption){for(var e=[],i=this.constructor;i;){var n=i.prototype.defaultOption;n&&e.push(n),i=i.superClass}for(var o={},a=e.length-1;0<=a;a--)o=m(o,e[a],!0);t.defaultOption=o}return t.defaultOption},getReferringComponents:function(t){return this.ecModel.queryComponents({mainType:t,index:this.get(t+"Index",!0),id:this.get(t+"Id",!0)})}});function ku(t,e){return t[e]||(t[e]={predecessor:[],successor:[]}),t[e]}ua(Lu,{registerWhenExtend:!0}),Au={},(Tu=Lu).registerSubTypeDefaulter=function(t,e){t=na(t),Au[t.main]=e},Tu.determineSubType=function(t,e){var i=e.type;if(!i){var n=na(t).main;Tu.hasSubTypes(t)&&Au[n]&&(i=Au[n](e))}return i},Du=function(t){var e=[];E(Lu.getClassesByMainType(t),function(t){e=e.concat(t.prototype.dependencies||[])}),e=N(e,function(t){return na(t).main}),"dataset"!==t&&_(e,"dataset")<=0&&e.unshift("dataset");return e},Lu.topologicalTravel=function(t,e,i,n){if(t.length){var o=function(e){var o={},a=[];return E(e,function(i){var n=ku(o,i),t=function(t,e){var i=[];return E(t,function(t){0<=_(e,t)&&i.push(t)}),i}(n.originalDeps=Du(i),e);n.entryCount=t.length,0===n.entryCount&&a.push(i),E(t,function(t){_(n.predecessor,t)<0&&n.predecessor.push(t);var e=ku(o,t);_(e.successor,t)<0&&e.successor.push(i)})}),{graph:o,noEntryList:a}}(e),a=o.graph,r=o.noEntryList,s={};for(E(t,function(t){s[t]=!0});r.length;){var l=r.pop(),u=a[l],h=!!s[l];h&&(i.call(n,l,u.originalDeps.slice()),delete s[l]),E(u.successor,h?d:c)}E(s,function(){throw new Error("Circle dependency may exists")})}function c(t){a[t].entryCount--,0===a[t].entryCount&&r.push(t)}function d(t){s[t]=!0,c(t)}},b(Lu,{getBoxLayoutParams:function(){return{left:this.get("left"),top:this.get("top"),right:this.get("right"),bottom:this.get("bottom"),width:this.get("width"),height:this.get("height")}}});var Pu="";"undefined"!=typeof navigator&&(Pu=navigator.platform||"");var Nu={color:["#c23531","#2f4554","#61a0a8","#d48265","#91c7ae","#749f83","#ca8622","#bda29a","#6e7074","#546570","#c4ccd3"],gradientColor:["#f6efa6","#d88273","#bf444c"],textStyle:{fontFamily:Pu.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,animation:"auto",animationDuration:1e3,animationDurationUpdate:300,animationEasing:"exponentialOut",animationEasingUpdate:"cubicOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1},Ou=jo();var Eu={clearColorPalette:function(){Ou(this).colorIdx=0,Ou(this).colorNameMap={}},getColorFromPalette:function(t,e,i){var n=Ou(e=e||this),o=n.colorIdx||0,a=n.colorNameMap=n.colorNameMap||{};if(a.hasOwnProperty(t))return a[t];var r=Vo(this.get("color",!0)),s=this.get("colorLayer",!0),l=null!=i&&s?function(t,e){for(var i=t.length,n=0;n<i;n++)if(t[n].length>e)return t[n];return t[i-1]}(s,i):r;if((l=l||r)&&l.length){var u=l[o];return t&&(a[t]=u),n.colorIdx=(o+1)%l.length,u}}},Ru="original",zu="arrayRows",Bu="objectRows",Vu="keyedColumns",Gu="unknown",Fu="typedArray",Wu="column",Hu="row";function Zu(t){this.fromDataset=t.fromDataset,this.data=t.data||(t.sourceFormat===Vu?{}:[]),this.sourceFormat=t.sourceFormat||Gu,this.seriesLayoutBy=t.seriesLayoutBy||Wu,this.dimensionsDefine=t.dimensionsDefine,this.encodeDefine=t.encodeDefine&&Q(t.encodeDefine),this.startIndex=t.startIndex||0,this.dimensionsDetectCount=t.dimensionsDetectCount}Zu.seriesDataToSource=function(t){return new Zu({data:t,sourceFormat:V(t)?Fu:Ru,fromDataset:!1})},ra(Zu);var Uu={Must:1,Might:2,Not:3},Xu=jo();function Yu(t){var e=t.option,i=e.data,n=V(i)?Fu:Ru,o=!1,a=e.seriesLayoutBy,r=e.sourceHeader,s=e.dimensions,l=Ju(t);if(l){var u=l.option;i=u.source,n=Xu(l).sourceFormat,o=!0,a=a||u.seriesLayoutBy,null==r&&(r=u.sourceHeader),s=s||u.dimensions}var h=function(t,e,i,n,o){if(!t)return{dimensionsDefine:ju(o)};var a,r;if(e===zu)"auto"===n||null==n?qu(function(t){null!=t&&"-"!==t&&(R(t)?null==r&&(r=1):r=0)},i,t,10):r=n?1:0,o||1!==r||(o=[],qu(function(t,e){o[e]=null!=t?t:""},i,t)),a=o?o.length:i===Hu?t.length:t[0]?t[0].length:null;else if(e===Bu)o=o||function(t){var e,i=0;for(;i<t.length&&!(e=t[i++]););if(e){var n=[];return E(e,function(t,e){n.push(e)}),n}}(t);else if(e===Vu)o||(o=[],E(t,function(t,e){o.push(e)}));else if(e===Ru){var s=Wo(t[0]);a=O(s)&&s.length||1}return{startIndex:r,dimensionsDefine:ju(o),dimensionsDetectCount:a}}(i,n,a,r,s);Xu(t).source=new Zu({data:i,fromDataset:o,seriesLayoutBy:a,sourceFormat:n,dimensionsDefine:h.dimensionsDefine,startIndex:h.startIndex,dimensionsDetectCount:h.dimensionsDetectCount,encodeDefine:e.encode})}function ju(t){if(t){var n=Q();return N(t,function(t,e){if(null==(t=k({},z(t)?t:{name:t})).name)return t;t.name+="",null==t.displayName&&(t.displayName=t.name);var i=n.get(t.name);return i?t.name+="-"+i.count++:n.set(t.name,{count:1}),t})}}function qu(t,e,i,n){if(null==n&&(n=1/0),e===Hu)for(var o=0;o<i.length&&o<n;o++)t(i[o]?i[o][0]:null,o);else{var a=i[0]||[];for(o=0;o<a.length&&o<n;o++)t(a[o],o)}}function Ku(i,t,e){var a={},n=Ju(t);if(!n||!i)return a;var r,o,s=[],l=[],u=t.ecModel,h=Xu(u).datasetMap,c=n.uid+"_"+e.seriesLayoutBy;E(i=i.slice(),function(t,e){z(t)||(i[e]={name:t}),"ordinal"===t.type&&null==r&&(o=p(i[r=e])),a[t.name]=[]});var d=h.get(c)||h.set(c,{categoryWayDim:o,valueWayDim:0});function f(t,e,i){for(var n=0;n<i;n++)t.push(e+n)}function p(t){var e=t.dimsDef;return e?e.length:1}return E(i,function(t,e){var i=t.name,n=p(t);if(null==r){var o=d.valueWayDim;f(a[i],o,n),f(l,o,n),d.valueWayDim+=n}else if(r===e)f(a[i],0,n),f(s,0,n);else{o=d.categoryWayDim;f(a[i],o,n),f(l,o,n),d.categoryWayDim+=n}}),s.length&&(a.itemName=s),l.length&&(a.seriesName=l),a}function $u(t,l,u){var e={};if(!Ju(t))return e;var h,c=l.sourceFormat,d=l.dimensionsDefine;c!==Bu&&c!==Vu||E(d,function(t,e){"name"===(z(t)?t.name:t)&&(h=e)});var i=function(){for(var t={},e={},i=[],n=0,o=Math.min(5,u);n<o;n++){var a=Qu(l.data,c,l.seriesLayoutBy,d,l.startIndex,n);i.push(a);var r=a===Uu.Not;if(r&&null==t.v&&n!==h&&(t.v=n),null!=t.n&&t.n!==t.v&&(r||i[t.n]!==Uu.Not)||(t.n=n),s(t)&&i[t.n]!==Uu.Not)return t;r||(a===Uu.Might&&null==e.v&&n!==h&&(e.v=n),null!=e.n&&e.n!==e.v||(e.n=n))}function s(t){return null!=t.v&&null!=t.n}return s(t)?t:s(e)?e:null}();if(i){e.value=i.v;var n=null!=h?h:i.n;e.itemName=[n],e.seriesName=[n]}return e}function Ju(t){var e=t.option;if(!e.data)return t.ecModel.getComponent("dataset",e.datasetIndex||0)}function Qu(t,e,i,n,o,a){var r,s,l;if(V(t))return Uu.Not;if(n){var u=n[a];z(u)?(s=u.name,l=u.type):R(u)&&(s=u)}if(null!=l)return"ordinal"===l?Uu.Must:Uu.Not;if(e===zu)if(i===Hu){for(var h=t[a],c=0;c<(h||[]).length&&c<5;c++)if(null!=(r=g(h[o+c])))return r}else for(c=0;c<t.length&&c<5;c++){var d=t[o+c];if(d&&null!=(r=g(d[a])))return r}else if(e===Bu){if(!s)return Uu.Not;for(c=0;c<t.length&&c<5;c++){if((f=t[c])&&null!=(r=g(f[s])))return r}}else if(e===Vu){if(!s)return Uu.Not;if(!(h=t[s])||V(h))return Uu.Not;for(c=0;c<h.length&&c<5;c++)if(null!=(r=g(h[c])))return r}else if(e===Ru)for(c=0;c<t.length&&c<5;c++){var f,p=Wo(f=t[c]);if(!O(p))return Uu.Not;if(null!=(r=g(p[a])))return r}function g(t){var e=R(t);return null!=t&&isFinite(t)&&""!==t?e?Uu.Might:Uu.Not:e&&"-"!==t?Uu.Must:void 0}return Uu.Not}var th="\0_ec_inner",eh=Cl.extend({init:function(t,e,i,n){i=i||{},this.option=null,this._theme=new Cl(i),this._optionManager=n},setOption:function(t,e){Y(!(th in t),"please use chart.getOption()"),this._optionManager.setOption(t,e),this.resetOption(null)},resetOption:function(t){var e=!1,i=this._optionManager;if(!t||"recreate"===t){var n=i.mountOption("recreate"===t);this.option&&"recreate"!==t?(this.restoreData(),this.mergeOption(n)):function(t){t=t,this.option={},this.option[th]=1,this._componentsMap=Q({series:[]}),this._seriesIndices,this._seriesIndicesMap,function(i,t){var n=i.color&&!i.colorLayer;E(t,function(t,e){"colorLayer"===e&&n||Lu.hasClass(e)||("object"==typeof t?i[e]=i[e]?m(i[e],t,!1):L(t):null==i[e]&&(i[e]=t))})}(t,this._theme.option),m(t,Nu,!1),this.mergeOption(t)}.call(this,n),e=!0}if("timeline"!==t&&"media"!==t||this.restoreData(),!t||"recreate"===t||"timeline"===t){var o=i.getTimelineOption(this);o&&(this.mergeOption(o),e=!0)}if(!t||"recreate"===t||"media"===t){var a=i.getMediaOption(this,this._api);a.length&&E(a,function(t){this.mergeOption(t,e=!0)},this)}return e},mergeOption:function(n){var l=this.option,u=this._componentsMap,i=[];!function(t){Xu(t).datasetMap=Q()}(this),E(n,function(t,e){null!=t&&(Lu.hasClass(e)?e&&i.push(e):l[e]=null==l[e]?L(t):m(l[e],t,!0))}),Lu.topologicalTravel(i,Lu.getAllClassMainTypes(),function(r,t){var e=Vo(n[r]),i=Ho(u.get(r),e);Zo(i),E(i,function(t,e){var i=t.option;z(i)&&(t.keyInfo.mainType=r,t.keyInfo.subType=function(t,e,i){return e.type?e.type:i?i.subType:Lu.determineSubType(t,e)}(r,i,t.exist))});var s=function(e,t){O(t)||(t=t?[t]:[]);var i={};return E(t,function(t){i[t]=(e.get(t)||[]).slice()}),i}(u,t);l[r]=[],u.set(r,[]),E(i,function(t,e){var i=t.exist,n=t.option;if(Y(z(n)||i,"Empty component definition"),n){var o=Lu.getClass(r,t.keyInfo.subType,!0);if(i&&i.constructor===o)i.name=t.keyInfo.name,i.mergeOption(n,this),i.optionUpdated(n,!1);else{var a=k({dependentModels:s,componentIndex:e},t.keyInfo);k(i=new o(n,this,this,a),a),i.init(n,this,this,a),i.optionUpdated(null,!0)}}else i.mergeOption({},this),i.optionUpdated({},!1);u.get(r)[e]=i,l[r][e]=i.option},this),"series"===r&&ih(this,u.get("series"))},this),this._seriesIndicesMap=Q(this._seriesIndices=this._seriesIndices||[])},getOption:function(){var n=L(this.option);return E(n,function(t,e){if(Lu.hasClass(e)){for(var i=(t=Vo(t)).length-1;0<=i;i--)Xo(t[i])&&t.splice(i,1);n[e]=t}}),delete n[th],n},getTheme:function(){return this._theme},getComponent:function(t,e){var i=this._componentsMap.get(t);if(i)return i[e||0]},queryComponents:function(t){var e=t.mainType;if(!e)return[];var i,n=t.index,o=t.id,a=t.name,r=this._componentsMap.get(e);if(!r||!r.length)return[];if(null!=n)O(n)||(n=[n]),i=M(N(n,function(t){return r[t]}),function(t){return!!t});else if(null!=o){var s=O(o);i=M(r,function(t){return s&&0<=_(o,t.id)||!s&&t.id===o})}else if(null!=a){var l=O(a);i=M(r,function(t){return l&&0<=_(a,t.name)||!l&&t.name===a})}else i=r.slice();return nh(i,t)},findComponents:function(t){var e,i,n,o,a,r=t.query,s=t.mainType,l=(i=s+"Index",n=s+"Id",o=s+"Name",!(e=r)||null==e[i]&&null==e[n]&&null==e[o]?null:{mainType:s,index:e[i],id:e[n],name:e[o]}),u=l?this.queryComponents(l):this._componentsMap.get(s);return a=nh(u,t),t.filter?M(a,t.filter):a},eachComponent:function(t,n,o){var e=this._componentsMap;if("function"==typeof t)o=n,n=t,e.each(function(t,i){E(t,function(t,e){n.call(o,i,t,e)})});else if(R(t))E(e.get(t),n,o);else if(z(t)){E(this.findComponents(t),n,o)}},getSeriesByName:function(e){return M(this._componentsMap.get("series"),function(t){return t.name===e})},getSeriesByIndex:function(t){return this._componentsMap.get("series")[t]},getSeriesByType:function(e){return M(this._componentsMap.get("series"),function(t){return t.subType===e})},getSeries:function(){return this._componentsMap.get("series").slice()},getSeriesCount:function(){return this._componentsMap.get("series").length},eachSeries:function(i,n){E(this._seriesIndices,function(t){var e=this._componentsMap.get("series")[t];i.call(n,e,t)},this)},eachRawSeries:function(t,e){E(this._componentsMap.get("series"),t,e)},eachSeriesByType:function(i,n,o){E(this._seriesIndices,function(t){var e=this._componentsMap.get("series")[t];e.subType===i&&n.call(o,e,t)},this)},eachRawSeriesByType:function(t,e,i){return E(this.getSeriesByType(t),e,i)},isSeriesFiltered:function(t){return null==this._seriesIndicesMap.get(t.componentIndex)},getCurrentSeriesIndices:function(){return(this._seriesIndices||[]).slice()},filterSeries:function(t,e){var i=M(this._componentsMap.get("series"),t,e);ih(this,i)},restoreData:function(i){var n=this._componentsMap;ih(this,n.get("series"));var o=[];n.each(function(t,e){o.push(e)}),Lu.topologicalTravel(o,Lu.getAllClassMainTypes(),function(e,t){E(n.get(e),function(t){"series"===e&&function(t,e){if(e){var i=e.seiresIndex,n=e.seriesId,o=e.seriesName;return null!=i&&t.componentIndex!==i||null!=n&&t.id!==n||null!=o&&t.name!==o}}(t,i)||t.restoreData()})})}});function ih(t,e){t._seriesIndicesMap=Q(t._seriesIndices=N(e,function(t){return t.componentIndex})||[])}function nh(t,e){return e.hasOwnProperty("subType")?M(t,function(t){return t.subType===e.subType}):t}b(eh,Eu);var oh=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isDisposed","on","off","getDataURL","getConnectedDataURL","getModel","getOption","getViewOfComponentModel","getViewOfSeriesModel"];function ah(e){E(oh,function(t){this[t]=A(e[t],e)},this)}var rh={};function sh(){this._coordinateSystems=[]}sh.prototype={constructor:sh,create:function(n,o){var a=[];E(rh,function(t,e){var i=t.create(n,o);a=a.concat(i||[])}),this._coordinateSystems=a},update:function(e,i){E(this._coordinateSystems,function(t){t.update&&t.update(e,i)})},getCoordinateSystems:function(){return this._coordinateSystems.slice()}},sh.register=function(t,e){rh[t]=e},sh.get=function(t){return rh[t]};var lh=E,uh=L,hh=N,ch=m,dh=/^(min|max)?(.+)$/;function fh(t){this._api=t,this._timelineOptions=[],this._mediaList=[],this._mediaDefault,this._currentMediaIndices=[],this._optionBackup,this._newBaseOption}function ph(t,e,i){var a={width:e,height:i,aspectratio:e/i},r=!0;return E(t,function(t,e){var i=e.match(dh);if(i&&i[1]&&i[2]){var n=i[1],o=i[2].toLowerCase();!function(t,e,i){return"min"===i?e<=t:"max"===i?t<=e:t===e}(a[o],t,n)&&(r=!1)}}),r}fh.prototype={constructor:fh,setOption:function(t,e){t&&E(Vo(t.series),function(t){t&&t.data&&V(t.data)&&K(t.data)}),t=uh(t);var i=this._optionBackup,n=function(t,i,n){var e,o,a=[],r=[],s=t.timeline;t.baseOption&&(o=t.baseOption);(s||t.options)&&(o=o||{},a=(t.options||[]).slice());if(t.media){o=o||{};var l=t.media;lh(l,function(t){t&&t.option&&(t.query?r.push(t):e=e||t)})}o=o||t;o.timeline||(o.timeline=s);return lh([o].concat(a).concat(N(r,function(t){return t.option})),function(e){lh(i,function(t){t(e,n)})}),{baseOption:o,timelineOptions:a,mediaDefault:e,mediaList:r}}.call(this,t,e,!i);this._newBaseOption=n.baseOption,i?(function(o,t){lh(t=t||{},function(t,e){if(null!=t){var i=o[e];if(Lu.hasClass(e)){t=Vo(t);var n=Ho(i=Vo(i),t);o[e]=hh(n,function(t){return t.option&&t.exist?ch(t.exist,t.option,!0):t.exist||t.option})}else o[e]=ch(i,t,!0)}})}(i.baseOption,n.baseOption),n.timelineOptions.length&&(i.timelineOptions=n.timelineOptions),n.mediaList.length&&(i.mediaList=n.mediaList),n.mediaDefault&&(i.mediaDefault=n.mediaDefault)):this._optionBackup=n},mountOption:function(t){var e=this._optionBackup;return this._timelineOptions=hh(e.timelineOptions,uh),this._mediaList=hh(e.mediaList,uh),this._mediaDefault=uh(e.mediaDefault),this._currentMediaIndices=[],uh(t?e.baseOption:this._newBaseOption)},getTimelineOption:function(t){var e,i=this._timelineOptions;if(i.length){var n=t.getComponent("timeline");n&&(e=uh(i[n.getCurrentIndex()],!0))}return e},getMediaOption:function(t){var e=this._api.getWidth(),i=this._api.getHeight(),n=this._mediaList,o=this._mediaDefault,a=[],r=[];if(!n.length&&!o)return r;for(var s=0,l=n.length;s<l;s++)ph(n[s].query,e,i)&&a.push(s);return!a.length&&o&&(a=[-1]),a.length&&!function(t,e){return t.join(",")===e.join(",")}(a,this._currentMediaIndices)&&(r=hh(a,function(t){return uh(-1===t?o.option:n[t].option)})),this._currentMediaIndices=a,r}};var gh=E,mh=z,vh=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function yh(t){var e=t&&t.itemStyle;if(e)for(var i=0,n=vh.length;i<n;i++){var o=vh[i],a=e.normal,r=e.emphasis;a&&a[o]&&(t[o]=t[o]||{},t[o].normal?m(t[o].normal,a[o]):t[o].normal=a[o],a[o]=null),r&&r[o]&&(t[o]=t[o]||{},t[o].emphasis?m(t[o].emphasis,r[o]):t[o].emphasis=r[o],r[o]=null)}}function xh(t,e,i){if(t&&t[e]&&(t[e].normal||t[e].emphasis)){var n=t[e].normal,o=t[e].emphasis;n&&(i?(t[e].normal=t[e].emphasis=null,D(t[e],n)):t[e]=n),o&&(t.emphasis=t.emphasis||{},t.emphasis[e]=o)}}function _h(t){xh(t,"itemStyle"),xh(t,"lineStyle"),xh(t,"areaStyle"),xh(t,"label"),xh(t,"labelLine"),xh(t,"upperLabel"),xh(t,"edgeLabel")}function wh(t,e){var i=mh(t)&&t[e],n=mh(i)&&i.textStyle;if(n)for(var o=0,a=Fo.length;o<a;o++){e=Fo[o];n.hasOwnProperty(e)&&(i[e]=n[e])}}function bh(t){t&&(_h(t),wh(t,"label"),t.emphasis&&wh(t.emphasis,"label"))}function Sh(t){return O(t)?t:t?[t]:[]}function Mh(t){return(O(t)?t[0]:t)||{}}function Ih(e,t){gh(Sh(e.series),function(t){mh(t)&&function(t){if(mh(t)){yh(t),_h(t),wh(t,"label"),wh(t,"upperLabel"),wh(t,"edgeLabel"),t.emphasis&&(wh(t.emphasis,"label"),wh(t.emphasis,"upperLabel"),wh(t.emphasis,"edgeLabel")),(i=t.markPoint)&&(yh(i),bh(i)),(n=t.markLine)&&(yh(n),bh(n));var e=t.markArea;e&&bh(e);var i,n,o=t.data;if("graph"===t.type){o=o||t.nodes;var a=t.links||t.edges;if(a&&!V(a))for(var r=0;r<a.length;r++)bh(a[r]);E(t.categories,function(t){_h(t)})}if(o&&!V(o))for(r=0;r<o.length;r++)bh(o[r]);if((i=t.markPoint)&&i.data){var s=i.data;for(r=0;r<s.length;r++)bh(s[r])}if((n=t.markLine)&&n.data){var l=n.data;for(r=0;r<l.length;r++)O(l[r])?(bh(l[r][0]),bh(l[r][1])):bh(l[r])}"gauge"===t.type?(wh(t,"axisLabel"),wh(t,"title"),wh(t,"detail")):"treemap"===t.type?(xh(t.breadcrumb,"itemStyle"),E(t.levels,function(t){_h(t)})):"tree"===t.type&&_h(t.leaves)}}(t)});var i=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];t&&i.push("valueAxis","categoryAxis","logAxis","timeAxis"),gh(i,function(t){gh(Sh(e[t]),function(t){t&&(wh(t,"axisLabel"),wh(t.axisPointer,"label"))})}),gh(Sh(e.parallel),function(t){var e=t&&t.parallelAxisDefault;wh(e,"axisLabel"),wh(e&&e.axisPointer,"label")}),gh(Sh(e.calendar),function(t){xh(t,"itemStyle"),wh(t,"dayLabel"),wh(t,"monthLabel"),wh(t,"yearLabel")}),gh(Sh(e.radar),function(t){wh(t,"name")}),gh(Sh(e.geo),function(t){mh(t)&&(bh(t),gh(Sh(t.regions),function(t){bh(t)}))}),gh(Sh(e.timeline),function(t){bh(t),xh(t,"label"),xh(t,"itemStyle"),xh(t,"controlStyle",!0);var e=t.data;O(e)&&E(e,function(t){z(t)&&(xh(t,"label"),xh(t,"itemStyle"))})}),gh(Sh(e.toolbox),function(t){xh(t,"iconStyle"),gh(t.feature,function(t){xh(t,"iconStyle")})}),wh(Mh(e.axisPointer),"label"),wh(Mh(e.tooltip).axisPointer,"label")}function Th(e){E(Ah,function(t){t[0]in e&&!(t[1]in e)&&(e[t[1]]=e[t[0]])})}var Ah=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],Dh=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],Ch=function(i,t){Ih(i,t),i.series=Vo(i.series),E(i.series,function(t){if(z(t)){var e=t.type;if("line"===e)null!=t.clipOverflow&&(t.clip=t.clipOverflow);else if("pie"===e||"gauge"===e)null!=t.clockWise&&(t.clockwise=t.clockWise);else if("gauge"===e){var i=function(t,e){e=e.split(",");for(var i=t,n=0;n<e.length&&null!=(i=i&&i[e[n]]);n++);return i}(t,"pointer.color");null!=i&&function(t,e,i,n){e=e.split(",");for(var o,a=t,r=0;r<e.length-1;r++)null==a[o=e[r]]&&(a[o]={}),a=a[o];!n&&null!=a[e[r]]||(a[e[r]]=i)}(t,"itemStyle.color",i)}Th(t)}}),i.dataRange&&(i.visualMap=i.dataRange),E(Dh,function(t){var e=i[t];e&&(O(e)||(e=[e]),E(e,function(t){Th(t)}))})};function Lh(m){E(m,function(h,c){var d=[],f=[NaN,NaN],t=[h.stackResultDimension,h.stackedOverDimension],p=h.data,g=h.isStackedByIndex,e=p.map(t,function(t,e,i){var n,o,a=p.get(h.stackedDimension,i);if(isNaN(a))return f;g?o=p.getRawIndex(i):n=p.get(h.stackedByDimension,i);for(var r=NaN,s=c-1;0<=s;s--){var l=m[s];if(g||(o=l.data.rawIndexOf(l.stackedByDimension,n)),0<=o){var u=l.data.getByRawIndex(l.stackResultDimension,o);if(0<=a&&0<u||a<=0&&u<0){a+=u,r=u;break}}}return d[0]=a,d[1]=r,d});p.hostModel.setData(e),h.data=e})}function kh(t,e){Zu.isInstance(t)||(t=Zu.seriesDataToSource(t)),this._source=t;var i=this._data=t.data,n=t.sourceFormat;n===Fu&&(this._offset=0,this._dimSize=e,this._data=i),k(this,Nh[n===zu?n+"_"+t.seriesLayoutBy:n])}var Ph=kh.prototype;Ph.pure=!1;var Nh={arrayRows_column:{pure:Ph.persistent=!0,count:function(){return Math.max(0,this._data.length-this._source.startIndex)},getItem:function(t){return this._data[t+this._source.startIndex]},appendData:Rh},arrayRows_row:{pure:!0,count:function(){var t=this._data[0];return t?Math.max(0,t.length-this._source.startIndex):0},getItem:function(t){t+=this._source.startIndex;for(var e=[],i=this._data,n=0;n<i.length;n++){var o=i[n];e.push(o?o[t]:null)}return e},appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},objectRows:{pure:!0,count:Oh,getItem:Eh,appendData:Rh},keyedColumns:{pure:!0,count:function(){var t=this._source.dimensionsDefine[0].name,e=this._data[t];return e?e.length:0},getItem:function(t){for(var e=[],i=this._source.dimensionsDefine,n=0;n<i.length;n++){var o=this._data[i[n].name];e.push(o?o[t]:null)}return e},appendData:function(t){var o=this._data;E(t,function(t,e){for(var i=o[e]||(o[e]=[]),n=0;n<(t||[]).length;n++)i.push(t[n])})}},original:{count:Oh,getItem:Eh,appendData:Rh},typedArray:{persistent:!(Ph.getSource=function(){return this._source}),pure:!0,count:function(){return this._data?this._data.length/this._dimSize:0},getItem:function(t,e){t-=this._offset,e=e||[];for(var i=this._dimSize*t,n=0;n<this._dimSize;n++)e[n]=this._data[i+n];return e},appendData:function(t){this._data=t},clean:function(){this._offset+=this.count(),this._data=null}}};function Oh(){return this._data.length}function Eh(t){return this._data[t]}function Rh(t){for(var e=0;e<t.length;e++)this._data.push(t[e])}var zh={arrayRows:Bh,objectRows:function(t,e,i,n){return null!=i?t[n]:t},keyedColumns:Bh,original:function(t,e,i,n){var o=Wo(t);return null!=i&&o instanceof Array?o[i]:o},typedArray:Bh};function Bh(t,e,i,n){return null!=i?t[i]:t}var Vh={arrayRows:Gh,objectRows:function(t,e,i,n){return Fh(t[e],this._dimensionInfos[e])},keyedColumns:Gh,original:function(t,e,i,n){var o=t&&(null==t.value?t:t.value);return!this._rawData.pure&&function(t){return Ro(t)&&!(t instanceof Array)}(t)&&(this.hasItemOption=!0),Fh(o instanceof Array?o[n]:o,this._dimensionInfos[e])},typedArray:function(t,e,i,n){return t[n]}};function Gh(t,e,i,n){return Fh(t[n],this._dimensionInfos[e])}function Fh(t,e){var i=e&&e.type;if("ordinal"!==i)return"time"===i&&"number"!=typeof t&&null!=t&&"-"!==t&&(t=+Yl(t)),null==t||""===t?NaN:+t;var n=e&&e.ordinalMeta;return n?n.parseAndCollect(t):t}function Wh(t,e,i){if(t){var n=t.getRawDataItem(e);if(null!=n){var o,a,r=t.getProvider().getSource().sourceFormat,s=t.getDimensionInfo(i);return s&&(o=s.name,a=s.index),zh[r](n,e,a,o)}}}function Hh(t,e,i){if(t){var n=t.getProvider().getSource().sourceFormat;if(n===Ru||n===Bu){var o=t.getRawDataItem(e);return n!==Ru||z(o)||(o=null),o?o[i]:void 0}}}var Zh=/\{@(.+?)\}/g,Uh={getDataParams:function(t,e){var i=this.getData(e),n=this.getRawValue(t,e),o=i.getRawIndex(t),a=i.getName(t),r=i.getRawDataItem(t),s=i.getItemVisual(t,"color"),l=i.getItemVisual(t,"borderColor"),u=this.ecModel.getComponent("tooltip"),h=Qo(u&&u.get("renderMode")),c=this.mainType,d="series"===c,f=i.userOutput;return{componentType:c,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:d?this.subType:null,seriesIndex:this.seriesIndex,seriesId:d?this.id:null,seriesName:d?this.name:null,name:a,dataIndex:o,data:r,dataType:e,value:n,color:s,borderColor:l,dimensionNames:f?f.dimensionNames:null,encode:f?f.encode:null,marker:hu({color:s,renderMode:h}),$vars:["seriesName","name","value"]}},getFormattedLabel:function(n,t,e,i,o){t=t||"normal";var a=this.getData(e),r=a.getItemModel(n),s=this.getDataParams(n,e);null!=i&&s.value instanceof Array&&(s.value=s.value[i]);var l=r.get("normal"===t?[o||"label","formatter"]:[t,o||"label","formatter"]);return"function"==typeof l?(s.status=t,s.dimensionIndex=i,l(s)):"string"==typeof l?lu(l,s).replace(Zh,function(t,e){var i=e.length;return"["===e.charAt(0)&&"]"===e.charAt(i-1)&&(e=+e.slice(1,i-1)),Wh(a,n,e)}):void 0},getRawValue:function(t,e){return Wh(this.getData(e),t)},formatTooltip:function(){}};function Xh(t){return new Yh(t)}function Yh(t){t=t||{},this._reset=t.reset,this._plan=t.plan,this._count=t.count,this._onDirty=t.onDirty,this._dirty=!0,this.context}var jh=Yh.prototype;jh.perform=function(t){var e,i=this._upstream,n=t&&t.skip;if(this._dirty&&i){var o=this.context;o.data=o.outputData=i.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this),this._plan&&!n&&(e=this._plan(this.context));var a,r=h(this._modBy),s=this._modDataCount||0,l=h(t&&t.modBy),u=t&&t.modDataCount||0;function h(t){return 1<=t||(t=1),t}r===l&&s===u||(e="reset"),!this._dirty&&"reset"!==e||(this._dirty=!1,a=function(t,e){var i,n;t._dueIndex=t._outputDueEnd=t._dueEnd=0,t._settedOutputEnd=null,!e&&t._reset&&((i=t._reset(t.context))&&i.progress&&(n=i.forceFirstProgress,i=i.progress),O(i)&&!i.length&&(i=null));t._progress=i,t._modBy=t._modDataCount=null;var o=t._downstream;return o&&o.dirty(),n}(this,n)),this._modBy=l,this._modDataCount=u;var c=t&&t.step;if(this._dueEnd=i?i._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var d=this._dueIndex,f=Math.min(null!=c?this._dueIndex+c:1/0,this._dueEnd);if(!n&&(a||d<f)){var p=this._progress;if(O(p))for(var g=0;g<p.length;g++)oc(this,p[g],d,f,l,u);else oc(this,p,d,f,l,u)}this._dueIndex=f;var m=null!=this._settedOutputEnd?this._settedOutputEnd:f;this._outputDueEnd=m}else this._dueIndex=this._outputDueEnd=null!=this._settedOutputEnd?this._settedOutputEnd:this._dueEnd;return this.unfinished()};var qh,Kh,$h,Jh,Qh,tc,ec=tc={reset:function(t,e,i,n){Kh=t,qh=e,$h=i,Jh=n,Qh=Math.ceil(Jh/$h),tc.next=1<$h&&0<Jh?nc:ic}};function ic(){return Kh<qh?Kh++:null}function nc(){var t=Kh%Qh*$h+Math.ceil(Kh/Qh),e=qh<=Kh?null:t<Jh?t:Kh;return Kh++,e}function oc(t,e,i,n,o,a){ec.reset(i,n,o,a),t._callingProgress=e,t._callingProgress({start:i,end:n,count:n-i,next:ec.next},t.context)}jh.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},jh.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},jh.pipe=function(t){this._downstream===t&&!this._dirty||((this._downstream=t)._upstream=this,t.dirty())},jh.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},jh.getUpstream=function(){return this._upstream},jh.getDownstream=function(){return this._downstream},jh.setOutputEnd=function(t){this._outputDueEnd=this._settedOutputEnd=t};var ac=jo(),rc=Lu.extend({type:"series.__base__",seriesIndex:0,coordinateSystem:null,defaultOption:null,legendVisualProvider:null,visualColorAccessPath:"itemStyle.color",visualBorderColorAccessPath:"itemStyle.borderColor",layoutMode:null,init:function(t,e,i,n){this.seriesIndex=this.componentIndex,this.dataTask=Xh({count:lc,reset:uc}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,i),Yu(this);var o=this.getInitialData(t,i);cc(o,this),this.dataTask.context.data=o,ac(this).dataBeforeProcessed=o,sc(this)},mergeDefaultAndTheme:function(t,e){var i=this.layoutMode,n=i?Mu(t):{},o=this.subType;Lu.hasClass(o)&&(o+="Series"),m(t,e.getTheme().get(this.subType)),m(t,this.getDefaultOption()),Go(t,"label",["show"]),this.fillDataTextStyle(t.data),i&&Su(t,n,i)},mergeOption:function(t,e){t=m(this.option,t,!0),this.fillDataTextStyle(t.data);var i=this.layoutMode;i&&Su(this.option,t,i),Yu(this);var n=this.getInitialData(t,e);cc(n,this),this.dataTask.dirty(),this.dataTask.context.data=n,ac(this).dataBeforeProcessed=n,sc(this)},fillDataTextStyle:function(t){if(t&&!V(t))for(var e=["show"],i=0;i<t.length;i++)t[i]&&t[i].label&&Go(t[i],"label",e)},getInitialData:function(){},appendData:function(t){this.getRawData().appendData(t.data)},getData:function(t){var e=fc(this);if(e){var i=e.context.data;return null==t?i:i.getLinkedData(t)}return ac(this).data},setData:function(t){var e=fc(this);if(e){var i=e.context;i.data!==t&&e.modifyOutputEnd&&e.setOutputEnd(t.count()),i.outputData=t,e!==this.dataTask&&(i.data=t)}ac(this).data=t},getSource:function(){return function(t){return Xu(t).source}(this)},getRawData:function(){return ac(this).dataBeforeProcessed},getBaseAxis:function(){var t=this.coordinateSystem;return t&&t.getBaseAxis&&t.getBaseAxis()},formatTooltip:function(o,h,t,c){var d=this,e="html"===(c=c||"html")?"<br/>":"\n",f="richText"===c,p={},g=0;function i(t){return{renderMode:c,content:au(tu(t)),style:p}}var m=this.getData(),a=m.mapDimension("defaultedTooltip",!0),n=a.length,r=this.getRawValue(o),s=O(r),v=m.getItemVisual(o,"color");z(v)&&v.colorStops&&(v=(v.colorStops[0]||{}).color),v=v||"transparent";var l=(1<n||s&&!n?function(t){var l=S(t,function(t,e,i){var n=m.getDimensionInfo(i);return t|(n&&!1!==n.tooltip&&null!=n.displayName)},0),u=[];function e(t,e){var i=m.getDimensionInfo(e);if(i&&!1!==i.otherDims.tooltip){var n=i.type,o="sub"+d.seriesIndex+"at"+g,a=hu({color:v,type:"subItem",renderMode:c,markerId:o}),r="string"==typeof a?a:a.content,s=(l?r+au(i.displayName||"-")+": ":"")+au("ordinal"===n?t+"":"time"===n?h?"":du("yyyy/MM/dd hh:mm:ss",t):tu(t));s&&u.push(s),f&&(p[o]=v,++g)}}a.length?E(a,function(t){e(Wh(m,o,t),t)}):E(t,e);var i=l?f?"\n":"<br/>":"",n=i+u.join(i||", ");return{renderMode:c,content:n,style:p}}(r):i(n?Wh(m,o,a[0]):s?r[0]:r)).content,u=d.seriesIndex+"at"+g,y=hu({color:v,type:"item",renderMode:c,markerId:u});p[u]=v,++g;var x=m.getName(o),_=this.name;Uo(this)||(_=""),_=_?au(_)+(h?": ":e):"";var w="string"==typeof y?y:y.content;return{html:h?w+_+l:_+w+(x?au(x)+": "+l:l),markers:p}},isAnimationEnabled:function(){if(v.node)return!1;var t=this.getShallow("animation");return t&&this.getData().count()>this.getShallow("animationThreshold")&&(t=!1),t},restoreData:function(){this.dataTask.dirty()},getColorFromPalette:function(t,e,i){var n=this.ecModel,o=Eu.getColorFromPalette.call(this,t,e,i);return o=o||n.getColorFromPalette(t,e,i)},coordDimToDataDim:function(t){return this.getRawData().mapDimension(t,!0)},getProgressive:function(){return this.get("progressive")},getProgressiveThreshold:function(){return this.get("progressiveThreshold")},getAxisTooltipData:null,getTooltipPosition:null,pipeTask:null,preventIncremental:null,pipelineContext:null});function sc(t){var e=t.name;Uo(t)||(t.name=function(t){var i=t.getRawData(),e=i.mapDimension("seriesName",!0),n=[];return E(e,function(t){var e=i.getDimensionInfo(t);e.displayName&&n.push(e.displayName)}),n.join(" ")}(t)||e)}function lc(t){return t.model.getRawData().count()}function uc(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),hc}function hc(t,e){t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function cc(e,i){E(e.CHANGABLE_METHODS,function(t){e.wrapMethod(t,T(dc,i))})}function dc(t){var e=fc(t);e&&e.setOutputEnd(this.count())}function fc(t){var e=(t.ecModel||{}).scheduler,i=e&&e.getPipeline(t.uid);if(i){var n=i.currentTask;if(n){var o=n.agentStubMap;o&&(n=o.get(t.uid))}return n}}b(rc,Uh),b(rc,Eu);var pc=function(){this.group=new Ci,this.uid=Nl("viewComponent")};pc.prototype={constructor:pc,init:function(t,e){},render:function(t,e,i,n){},dispose:function(){},filterForExposedEvent:null};var gc=pc.prototype;gc.updateView=gc.updateLayout=gc.updateVisual=function(t,e,i,n){},oa(pc),ua(pc,{registerWhenExtend:!0});function mc(){var s=jo();return function(t){var e=s(t),i=t.pipelineContext,n=e.large,o=e.progressiveRender,a=e.large=i&&i.large,r=e.progressiveRender=i&&i.progressiveRender;return!!(n^a||o^r)&&"reset"}}var vc=jo(),yc=mc();function xc(){this.group=new Ci,this.uid=Nl("viewChart"),this.renderTask=Xh({plan:Sc,reset:Mc}),this.renderTask.context={view:this}}var _c=xc.prototype={type:"chart",init:function(t,e){},render:function(t,e,i,n){},highlight:function(t,e,i,n){bc(t.getData(),n,"emphasis")},downplay:function(t,e,i,n){bc(t.getData(),n,"normal")},remove:function(t,e){this.group.removeAll()},dispose:function(){},incrementalPrepareRender:null,incrementalRender:null,updateTransform:null,filterForExposedEvent:null};function wc(t,e,i){if(t&&(t.trigger(e,i),t.isGroup&&!Qs(t)))for(var n=0,o=t.childCount();n<o;n++)wc(t.childAt(n),e,i)}function bc(e,t,i){var n=Yo(e,t),o=t&&null!=t.highlightKey?tl(t.highlightKey):null;null!=n?E(Vo(n),function(t){wc(e.getItemGraphicEl(t),i,o)}):e.eachItemGraphicEl(function(t){wc(t,i,o)})}function Sc(t){return yc(t.model)}function Mc(t){var e=t.model,i=t.ecModel,n=t.api,o=t.payload,a=e.pipelineContext.progressiveRender,r=t.view,s=o&&vc(o).updateMethod,l=a?"incrementalPrepareRender":s&&r[s]?s:"render";return"render"!==l&&r[l](e,i,n,o),Ic[l]}_c.updateView=_c.updateLayout=_c.updateVisual=function(t,e,i,n){this.render(t,e,i,n)},oa(xc),ua(xc,{registerWhenExtend:!0}),xc.markUpdateMethod=function(t,e){vc(t).updateMethod=e};var Ic={incrementalPrepareRender:{progress:function(t,e){e.view.incrementalRender(t,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(t,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}},Tc="\0__throttleOriginMethod",Ac="\0__throttleRate",Dc="\0__throttleType";function Cc(t,i,n){var o,a,r,s,l,u=0,h=0,c=null;function d(){h=(new Date).getTime(),c=null,t.apply(r,s||[])}i=i||0;function e(){o=(new Date).getTime(),r=this,s=arguments;var t=l||i,e=l||n;l=null,a=o-(e?u:h)-t,clearTimeout(c),e?c=setTimeout(d,t):0<=a?d():c=setTimeout(d,-a),u=o}return e.clear=function(){c&&(clearTimeout(c),c=null)},e.debounceNextCall=function(t){l=t},e}function Lc(t,e,i,n){var o=t[e];if(o){var a=o[Tc]||o,r=o[Dc];if(o[Ac]!==i||r!==n){if(null==i||!n)return t[e]=a;(o=t[e]=Cc(a,i,"debounce"===n))[Tc]=a,o[Dc]=n,o[Ac]=i}return o}}function kc(t,e){var i=t[e];i&&i[Tc]&&(t[e]=i[Tc])}var Pc={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var i=e.getData(),a=(e.visualColorAccessPath||"itemStyle.color").split("."),n=e.get(a),o=!C(n)||n instanceof cs?null:n;n&&!o||(n=e.getColorFromPalette(e.name,null,t.getSeriesCount())),i.setVisual("color",n);var r=(e.visualBorderColorAccessPath||"itemStyle.borderColor").split("."),s=e.get(r);if(i.setVisual("borderColor",s),!t.isSeriesFiltered(e)){o&&i.each(function(t){i.setItemVisual(t,"color",o(e.getDataParams(t)))});return{dataEach:i.hasItemOption?function(t,e){var i=t.getItemModel(e),n=i.get(a,!0),o=i.get(r,!0);null!=n&&t.setItemVisual(e,"color",n),null!=o&&t.setItemVisual(e,"borderColor",o)}:null}}}},Nc={legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType},",withoutName:"第{seriesId}个系列是一个{seriesType},",separator:{middle:";",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:",",end:""}}}},Oc=function(t,e){var a=e.getModel("aria");if(a.get("show"))if(a.get("description"))t.setAttribute("aria-label",a.get("description"));else{var h=0;e.eachSeries(function(t,e){++h},this);var i,c=a.get("data.maxCount")||10,n=a.get("series.maxCount")||10,d=Math.min(h,n);if(!(h<1)){var o=function(){var t=e.getModel("title").option;t&&t.length&&(t=t[0]);return t&&t.text}();i=o?p(g("general.withTitle"),{title:o}):g("general.withoutTitle");var f=[];i+=p(g(1<h?"series.multiple.prefix":"series.single.prefix"),{seriesCount:h}),e.eachSeries(function(t,e){if(e<d){var i,n=t.get("name"),o="series."+(1<h?"multiple":"single")+".";i=p(i=g(n?o+"withName":o+"withoutName"),{seriesId:t.seriesIndex,seriesName:t.get("name"),seriesType:function(t){return Nc.series.typeNames[t]||"自定义图"}(t.subType)});var a=t.getData();(window.data=a).count()>c?i+=p(g("data.partialData"),{displayCnt:c}):i+=g("data.allData");for(var r=[],s=0;s<a.count();s++)if(s<c){var l=a.getName(s),u=Wh(a,s);r.push(p(g(l?"data.withName":"data.withoutName"),{name:l,value:u}))}i+=r.join(g("data.separator.middle"))+g("data.separator.end"),f.push(i)}}),i+=f.join(g("series.multiple.separator.middle"))+g("series.multiple.separator.end"),t.setAttribute("aria-label",i)}}function p(t,e){if("string"!=typeof t)return t;var i=t;return E(e,function(t,e){i=i.replace(new RegExp("\\{\\s*"+e+"\\s*\\}","g"),t)}),i}function g(t){var e=a.get(t);if(null!=e)return e;for(var i=t.split("."),n=Nc.aria,o=0;o<i.length;++o)n=n[i[o]];return n}},Ec=Math.PI;function Rc(t,e,i,n){this.ecInstance=t,this.api=e,this.unfinished;i=this._dataProcessorHandlers=i.slice(),n=this._visualHandlers=n.slice();this._allHandlers=i.concat(n),this._stageTaskMap=Q()}var zc=Rc.prototype;function Bc(l,t,u,h,c){var d;function f(t,e){return t.setDirty&&(!t.dirtyMap||t.dirtyMap.get(e.__pipeline.id))}c=c||{},E(t,function(n,t){if(!c.visualType||c.visualType===n.visualType){var e=l._stageTaskMap.get(n.uid),i=e.seriesTaskMap,o=e.overallTask;if(o){var a,r=o.agentStubMap;r.each(function(t){f(c,t)&&(t.dirty(),a=!0)}),a&&o.dirty(),Vc(o,h);var s=l.getPerformArgs(o,c.block);r.each(function(t){t.perform(s)}),d|=o.perform(s)}else i&&i.each(function(t,e){f(c,t)&&t.dirty();var i=l.getPerformArgs(t,c.block);i.skip=!n.performRawSeries&&u.isSeriesFiltered(t.context.model),Vc(t,h),d|=t.perform(i)})}}),l.unfinished|=d}zc.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each(function(t){var e=t.overallTask;e&&e.dirty()})},zc.getPerformArgs=function(t,e){if(t.__pipeline){var i=this._pipelineMap.get(t.__pipeline.id),n=i.context,o=!e&&i.progressiveEnabled&&(!n||n.progressiveRender)&&t.__idxInPipeline>i.blockIndex?i.step:null,a=n&&n.modDataCount;return{step:o,modBy:null!=a?Math.ceil(a/o):null,modDataCount:a}}},zc.getPipeline=function(t){return this._pipelineMap.get(t)},zc.updateStreamModes=function(t,e){var i=this._pipelineMap.get(t.uid),n=t.getData().count(),o=i.progressiveEnabled&&e.incrementalPrepareRender&&n>=i.threshold,a=t.get("large")&&n>=t.get("largeThreshold"),r="mod"===t.get("progressiveChunkMode")?n:null;t.pipelineContext=i.context={progressiveRender:o,modDataCount:r,large:a}},zc.restorePipelines=function(t){var n=this,o=n._pipelineMap=Q();t.eachSeries(function(t){var e=t.getProgressive(),i=t.uid;o.set(i,{id:i,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:e&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(e||700),count:0}),qc(n,t,t.dataTask)})},zc.prepareStageTasks=function(){var i=this._stageTaskMap,n=this.ecInstance.getModel(),o=this.api;E(this._allHandlers,function(t){var e=i.get(t.uid)||i.set(t.uid,[]);t.reset&&function(n,o,t,a,r){var s=t.seriesTaskMap||(t.seriesTaskMap=Q()),e=o.seriesType,i=o.getTargetSeries;o.createOnAllSeries?a.eachRawSeries(l):e?a.eachRawSeriesByType(e,l):i&&i(a,r).each(l);function l(t){var e=t.uid,i=s.get(e)||s.set(e,Xh({plan:Zc,reset:Uc,count:jc}));i.context={model:t,ecModel:a,api:r,useClearVisual:o.isVisual&&!o.isLayout,plan:o.plan,reset:o.reset,scheduler:n},qc(n,t,i)}var u=n._pipelineMap;s.each(function(t,e){u.get(e)||(t.dispose(),s.removeKey(e))})}(this,t,e,n,o),t.overallReset&&function(n,t,e,i,o){var a=e.overallTask=e.overallTask||Xh({reset:Gc});a.context={ecModel:i,api:o,overallReset:t.overallReset,scheduler:n};var r=a.agentStubMap=a.agentStubMap||Q(),s=t.seriesType,l=t.getTargetSeries,u=!0,h=t.modifyOutputEnd;s?i.eachRawSeriesByType(s,c):l?l(i,o).each(c):(u=!1,E(i.getSeries(),c));function c(t){var e=t.uid,i=r.get(e);i||(i=r.set(e,Xh({reset:Fc,onDirty:Hc})),a.dirty()),i.context={model:t,overallProgress:u,modifyOutputEnd:h},i.agent=a,i.__block=u,qc(n,t,i)}var d=n._pipelineMap;r.each(function(t,e){d.get(e)||(t.dispose(),a.dirty(),r.removeKey(e))})}(this,t,e,n,o)},this)},zc.prepareView=function(t,e,i,n){var o=t.renderTask,a=o.context;a.model=e,a.ecModel=i,a.api=n,o.__block=!t.incrementalPrepareRender,qc(this,e,o)},zc.performDataProcessorTasks=function(t,e){Bc(this,this._dataProcessorHandlers,t,e,{block:!0})},zc.performVisualTasks=function(t,e,i){Bc(this,this._visualHandlers,t,e,i)},zc.performSeriesTasks=function(t){var e;t.eachSeries(function(t){e|=t.dataTask.perform()}),this.unfinished|=e},zc.plan=function(){this._pipelineMap.each(function(t){var e=t.tail;do{if(e.__block){t.blockIndex=e.__idxInPipeline;break}e=e.getUpstream()}while(e)})};var Vc=zc.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)};function Gc(t){t.overallReset(t.ecModel,t.api,t.payload)}function Fc(t,e){return t.overallProgress&&Wc}function Wc(){this.agent.dirty(),this.getDownstream().dirty()}function Hc(){this.agent&&this.agent.dirty()}function Zc(t){return t.plan&&t.plan(t.model,t.ecModel,t.api,t.payload)}function Uc(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=Vo(t.reset(t.model,t.ecModel,t.api,t.payload));return 1<e.length?N(e,function(t,e){return Yc(e)}):Xc}var Xc=Yc(0);function Yc(a){return function(t,e){var i=e.data,n=e.resetDefines[a];if(n&&n.dataEach)for(var o=t.start;o<t.end;o++)n.dataEach(i,o);else n&&n.progress&&n.progress(t,i)}}function jc(t){return t.data.count()}function qc(t,e,i){var n=e.uid,o=t._pipelineMap.get(n);o.head||(o.head=i),o.tail&&o.tail.pipe(i),(o.tail=i).__idxInPipeline=o.count++,i.__pipeline=o}Rc.wrapStageHandler=function(t,e){return C(t)&&(t={overallReset:t,seriesType:function(t){Kc=null;try{t($c,Jc)}catch(t){}return Kc}(t)}),t.uid=Nl("stageHandler"),e&&(t.visualType=e),t};var Kc,$c={},Jc={};function Qc(t,e){for(var i in e.prototype)t[i]=et}Qc($c,eh),Qc(Jc,ah),$c.eachSeriesByType=$c.eachRawSeriesByType=function(t){Kc=t},$c.eachComponent=function(t){"series"===t.mainType&&t.subType&&(Kc=t.subType)};function td(){return{axisLine:{lineStyle:{color:nd}},axisTick:{lineStyle:{color:nd}},axisLabel:{textStyle:{color:nd}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:nd}}}}var ed=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"],id={color:ed,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],ed]},nd="#eee",od=["#dd6b66","#759aa0","#e69d87","#8dc1a9","#ea7e53","#eedd78","#73a373","#73b9bc","#7289ab","#91ca8c","#f49f42"],ad={color:od,backgroundColor:"#333",tooltip:{axisPointer:{lineStyle:{color:nd},crossStyle:{color:nd},label:{color:"#000"}}},legend:{textStyle:{color:nd}},textStyle:{color:nd},title:{textStyle:{color:nd}},toolbox:{iconStyle:{normal:{borderColor:nd}}},dataZoom:{textStyle:{color:nd}},visualMap:{textStyle:{color:nd}},timeline:{lineStyle:{color:nd},itemStyle:{normal:{color:od[1]}},label:{normal:{textStyle:{color:nd}}},controlStyle:{normal:{color:nd,borderColor:nd}}},timeAxis:td(),logAxis:td(),valueAxis:td(),categoryAxis:td(),line:{symbol:"circle"},graph:{color:od},gauge:{title:{textStyle:{color:nd}}},candlestick:{itemStyle:{normal:{color:"#FD1050",color0:"#0CF49B",borderColor:"#FD1050",borderColor0:"#0CF49B"}}}};ad.categoryAxis.splitLine.show=!1,Lu.extend({type:"dataset",defaultOption:{seriesLayoutBy:Wu,sourceHeader:null,dimensions:null,source:null},optionUpdated:function(){!function(t){var e=t.option.source,i=Gu;if(V(e))i=Fu;else if(O(e)){0===e.length&&(i=zu);for(var n=0,o=e.length;n<o;n++){var a=e[n];if(null!=a){if(O(a)){i=zu;break}if(z(a)){i=Bu;break}}}}else if(z(e)){for(var r in e)if(e.hasOwnProperty(r)&&P(e[r])){i=Vu;break}}else if(null!=e)throw new Error("Invalid data");Xu(t).sourceFormat=i}(this)}}),pc.extend({type:"dataset"});var rd=Ar.extend({type:"ellipse",shape:{cx:0,cy:0,rx:0,ry:0},buildPath:function(t,e){var i=e.cx,n=e.cy,o=e.rx,a=e.ry,r=.5522848*o,s=.5522848*a;t.moveTo(i-o,n),t.bezierCurveTo(i-o,n-s,i-r,n-a,i,n-a),t.bezierCurveTo(i+r,n-a,i+o,n-s,i+o,n),t.bezierCurveTo(i+o,n+s,i+r,n+a,i,n+a),t.bezierCurveTo(i-r,n+a,i-o,n+s,i-o,n),t.closePath()}}),sd=/[\s,]+/;function ld(t){R(t)&&(t=(new DOMParser).parseFromString(t,"text/xml"));for(9===t.nodeType&&(t=t.firstChild);"svg"!==t.nodeName.toLowerCase()||1!==t.nodeType;)t=t.nextSibling;return t}function ud(){this._defs={},this._root=null,this._isDefine=!1,this._isText=!1}ud.prototype.parse=function(t,e){e=e||{};var i=ld(t);if(!i)throw new Error("Illegal svg");var n=new Ci;this._root=n;var o=i.getAttribute("viewBox")||"",a=parseFloat(i.getAttribute("width")||e.width),r=parseFloat(i.getAttribute("height")||e.height);isNaN(a)&&(a=null),isNaN(r)&&(r=null),gd(i,n,null,!0);for(var s,l,u=i.firstChild;u;)this._parseNode(u,n),u=u.nextSibling;if(o){var h=j(o).split(sd);4<=h.length&&(s={x:parseFloat(h[0]||0),y:parseFloat(h[1]||0),width:parseFloat(h[2]),height:parseFloat(h[3])})}if(s&&null!=a&&null!=r&&(l=_d(s,a,r),!e.ignoreViewBox)){var c=n;(n=new Ci).add(c),c.scale=l.scale.slice(),c.position=l.position.slice()}return e.ignoreRootClip||null==a||null==r||n.setClipPath(new rs({shape:{x:0,y:0,width:a,height:r}})),{root:n,width:a,height:r,viewBoxRect:s,viewBoxTransform:l}},ud.prototype._parseNode=function(t,e){var i,n,o=t.nodeName.toLowerCase();if("defs"===o?this._isDefine=!0:"text"===o&&(this._isText=!0),this._isDefine){if(n=cd[o]){var a=n.call(this,t),r=t.getAttribute("id");r&&(this._defs[r]=a)}}else(n=hd[o])&&(i=n.call(this,t,e),e.add(i));for(var s=t.firstChild;s;)1===s.nodeType&&this._parseNode(s,i),3===s.nodeType&&this._isText&&this._parseText(s,i),s=s.nextSibling;"defs"===o?this._isDefine=!1:"text"===o&&(this._isText=!1)},ud.prototype._parseText=function(t,e){if(1===t.nodeType){var i=t.getAttribute("dx")||0,n=t.getAttribute("dy")||0;this._textX+=parseFloat(i),this._textY+=parseFloat(n)}var o=new Ur({style:{text:t.textContent,transformText:!0},position:[this._textX||0,this._textY||0]});dd(e,o),gd(t,o,this._defs);var a=o.style.fontSize;a&&a<9&&(o.style.fontSize=9,o.scale=o.scale||[1,1],o.scale[0]*=a/9,o.scale[1]*=a/9);var r=o.getBoundingRect();return this._textX+=r.width,e.add(o),o};var hd={g:function(t,e){var i=new Ci;return dd(e,i),gd(t,i,this._defs),i},rect:function(t,e){var i=new rs;return dd(e,i),gd(t,i,this._defs),i.setShape({x:parseFloat(t.getAttribute("x")||0),y:parseFloat(t.getAttribute("y")||0),width:parseFloat(t.getAttribute("width")||0),height:parseFloat(t.getAttribute("height")||0)}),i},circle:function(t,e){var i=new Yr;return dd(e,i),gd(t,i,this._defs),i.setShape({cx:parseFloat(t.getAttribute("cx")||0),cy:parseFloat(t.getAttribute("cy")||0),r:parseFloat(t.getAttribute("r")||0)}),i},line:function(t,e){var i=new ls;return dd(e,i),gd(t,i,this._defs),i.setShape({x1:parseFloat(t.getAttribute("x1")||0),y1:parseFloat(t.getAttribute("y1")||0),x2:parseFloat(t.getAttribute("x2")||0),y2:parseFloat(t.getAttribute("y2")||0)}),i},ellipse:function(t,e){var i=new rd;return dd(e,i),gd(t,i,this._defs),i.setShape({cx:parseFloat(t.getAttribute("cx")||0),cy:parseFloat(t.getAttribute("cy")||0),rx:parseFloat(t.getAttribute("rx")||0),ry:parseFloat(t.getAttribute("ry")||0)}),i},polygon:function(t,e){var i=t.getAttribute("points");i=i&&fd(i);var n=new Qr({shape:{points:i||[]}});return dd(e,n),gd(t,n,this._defs),n},polyline:function(t,e){var i=new Ar;dd(e,i),gd(t,i,this._defs);var n=t.getAttribute("points");return n=n&&fd(n),new ts({shape:{points:n||[]}})},image:function(t,e){var i=new Qn;return dd(e,i),gd(t,i,this._defs),i.setStyle({image:t.getAttribute("xlink:href"),x:t.getAttribute("x"),y:t.getAttribute("y"),width:t.getAttribute("width"),height:t.getAttribute("height")}),i},text:function(t,e){var i=t.getAttribute("x")||0,n=t.getAttribute("y")||0,o=t.getAttribute("dx")||0,a=t.getAttribute("dy")||0;this._textX=parseFloat(i)+parseFloat(o),this._textY=parseFloat(n)+parseFloat(a);var r=new Ci;return dd(e,r),gd(t,r,this._defs),r},tspan:function(t,e){var i=t.getAttribute("x"),n=t.getAttribute("y");null!=i&&(this._textX=parseFloat(i)),null!=n&&(this._textY=parseFloat(n));var o=t.getAttribute("dx")||0,a=t.getAttribute("dy")||0,r=new Ci;return dd(e,r),gd(t,r,this._defs),this._textX+=o,this._textY+=a,r},path:function(t,e){var i=Zr(t.getAttribute("d")||"");return dd(e,i),gd(t,i,this._defs),i}},cd={lineargradient:function(t){var e=parseInt(t.getAttribute("x1")||0,10),i=parseInt(t.getAttribute("y1")||0,10),n=parseInt(t.getAttribute("x2")||10,10),o=parseInt(t.getAttribute("y2")||0,10),a=new gs(e,i,n,o);return function(t,e){var i=t.firstChild;for(;i;){if(1===i.nodeType){var n=i.getAttribute("offset");n=0<n.indexOf("%")?parseInt(n,10)/100:n?parseFloat(n):0;var o=i.getAttribute("stop-color")||"#000000";e.addColorStop(n,o)}i=i.nextSibling}}(t,a),a},radialgradient:function(t){}};function dd(t,e){t&&t.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),D(e.__inheritedStyle,t.__inheritedStyle))}function fd(t){for(var e=j(t).split(sd),i=[],n=0;n<e.length;n+=2){var o=parseFloat(e[n]),a=parseFloat(e[n+1]);i.push([o,a])}return i}var pd={fill:"fill",stroke:"stroke","stroke-width":"lineWidth",opacity:"opacity","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterLimit","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","text-align":"textAlign","alignment-baseline":"textBaseline"};function gd(t,e,i,n){var o=e.__inheritedStyle||{},a="text"===e.type;if(1===t.nodeType&&(function(t,e){var i=t.getAttribute("transform");if(i){i=i.replace(/,/g," ");var n=null,o=[];i.replace(yd,function(t,e,i){o.push(e,i)});for(var a=o.length-1;0<a;a-=2){var r=o[a],s=o[a-1];switch(n=n||ae(),s){case"translate":r=j(r).split(sd),ue(n,n,[parseFloat(r[0]),parseFloat(r[1]||0)]);break;case"scale":r=j(r).split(sd),ce(n,n,[parseFloat(r[0]),parseFloat(r[1]||r[0])]);break;case"rotate":r=j(r).split(sd),he(n,n,parseFloat(r[0]));break;case"skew":r=j(r).split(sd),console.warn("Skew transform is not supported yet");break;case"matrix":r=j(r).split(sd);n[0]=parseFloat(r[0]),n[1]=parseFloat(r[1]),n[2]=parseFloat(r[2]),n[3]=parseFloat(r[3]),n[4]=parseFloat(r[4]),n[5]=parseFloat(r[5])}}e.setLocalTransform(n)}}(t,e),k(o,function(t){var e=t.getAttribute("style"),i={};if(!e)return i;var n,o={};xd.lastIndex=0;for(;null!=(n=xd.exec(e));)o[n[1]]=n[2];for(var a in pd)pd.hasOwnProperty(a)&&null!=o[a]&&(i[pd[a]]=o[a]);return i}(t)),!n))for(var r in pd)if(pd.hasOwnProperty(r)){var s=t.getAttribute(r);null!=s&&(o[pd[r]]=s)}var l=a?"textFill":"fill",u=a?"textStroke":"stroke";e.style=e.style||new Ui;var h=e.style;null!=o.fill&&h.set(l,vd(o.fill,i)),null!=o.stroke&&h.set(u,vd(o.stroke,i)),E(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],function(t){var e="lineWidth"===t&&a?"textStrokeWidth":t;null!=o[t]&&h.set(e,parseFloat(o[t]))}),o.textBaseline&&"auto"!==o.textBaseline||(o.textBaseline="alphabetic"),"alphabetic"===o.textBaseline&&(o.textBaseline="bottom"),"start"===o.textAlign&&(o.textAlign="left"),"end"===o.textAlign&&(o.textAlign="right"),E(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign","textBaseline"],function(t){null!=o[t]&&h.set(t,o[t])}),o.lineDash&&(e.style.lineDash=j(o.lineDash).split(sd)),h[u]&&"none"!==h[u]&&(e[u]=!0),e.__inheritedStyle=o}var md=/url\(\s*#(.*?)\)/;function vd(t,e){var i=e&&t&&t.match(md);return i?e[j(i[1])]:t}var yd=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.e,]*)\)/g;var xd=/([^\s:;]+)\s*:\s*([^:;]+)/g;function _d(t,e,i){var n=e/t.width,o=i/t.height,a=Math.min(n,o);return{scale:[a,a],position:[-(t.x+t.width/2)*a+e/2,-(t.y+t.height/2)*a+i/2]}}var wd=Q(),bd={registerMap:function(t,e,i){var n;return E(n=O(e)?e:e.svg?[{type:"svg",source:e.svg,specialAreas:e.specialAreas}]:(e.geoJson&&!e.features&&(i=e.specialAreas,e=e.geoJson),[{type:"geoJSON",source:e,specialAreas:i}]),function(t){var e=t.type;"geoJson"===e&&(e=t.type="geoJSON"),(0,Sd[e])(t)}),wd.set(t,n)},retrieveMap:function(t){return wd.get(t)}},Sd={geoJSON:function(t){var e=t.source;t.geoJSON=R(e)?"undefined"!=typeof JSON&&JSON.parse?JSON.parse(e):new Function("return ("+e+");")():e},svg:function(t){t.svgXML=ld(t.source)}},Md=Y,Id=E,Td=C,Ad=z,Dd=Lu.parseClassType,Cd={PROCESSOR:{FILTER:1e3,SERIES_FILTER:800,STATISTIC:5e3},VISUAL:{LAYOUT:1e3,PROGRESSIVE_LAYOUT:1100,GLOBAL:2e3,CHART:3e3,POST_CHART_LAYOUT:3500,COMPONENT:4e3,BRUSH:5e3}},Ld="__flagInMainProcess",kd="__optionUpdated",Pd=/^[a-zA-Z0-9_]+$/;function Nd(n,o){return function(t,e,i){!o&&this._disposed||(t=t&&t.toLowerCase(),Ct.prototype[n].call(this,t,e,i))}}function Od(){Ct.call(this)}function Ed(t,e,i){i=i||{},"string"==typeof e&&(e=rf[e]),this.id,this.group,this._dom=t;var n=this._zr=ko(t,{renderer:i.renderer||"canvas",devicePixelRatio:i.devicePixelRatio,width:i.width,height:i.height});this._throttledZrFlush=Cc(A(n.flush,n),17),(e=L(e))&&Ch(e,!0),this._theme=e,this._chartsViews=[],this._chartsMap={},this._componentsViews=[],this._componentsMap={},this._coordSysMgr=new sh;var o=this._api=function(i){var t=i._coordSysMgr;return k(new ah(i),{getCoordinateSystems:A(t.getCoordinateSystems,t),getComponentByElement:function(t){for(;t;){var e=t.__ecComponentInfo;if(null!=e)return i._model.getComponent(e.mainType,e.index);t=t.parent}}})}(this);function a(t,e){return t.__prio-e.__prio}zi(af,a),zi(ef,a),this._scheduler=new Rc(this,o,ef,af),Ct.call(this,this._ecEventProcessor=new Jd),this._messageCenter=new Od,this._initEvents(),this.resize=A(this.resize,this),this._pendingActions=[],n.animation.on("frame",this._onframe,this),function(t,e){t.on("rendered",function(){e.trigger("rendered"),!t.animation.isFinished()||e[kd]||e._scheduler.unfinished||e._pendingActions.length||e.trigger("finished")})}(n,this),K(this)}Od.prototype.on=Nd("on",!0),Od.prototype.off=Nd("off",!0),Od.prototype.one=Nd("one",!0),b(Od,Ct);var Rd=Ed.prototype;function zd(t,e,i){if(!this._disposed){var n,o=this._model,a=this._coordSysMgr.getCoordinateSystems();e=Ko(o,e);for(var r=0;r<a.length;r++){var s=a[r];if(s[t]&&null!=(n=s[t](o,e,i)))return n}}}Rd._onframe=function(){if(!this._disposed){var t=this._scheduler;if(this[kd]){var e=this[kd].silent;this[Ld]=!0,Vd(this),Bd.update.call(this),this[Ld]=!1,this[kd]=!1,Hd.call(this,e),Zd.call(this,e)}else if(t.unfinished){var i=1,n=this._model,o=this._api;t.unfinished=!1;do{var a=+new Date;t.performSeriesTasks(n),t.performDataProcessorTasks(n),Fd(this,n),t.performVisualTasks(n),jd(this,this._model,o,"remain"),i-=+new Date-a}while(0<i&&t.unfinished);t.unfinished||this._zr.flush()}}},Rd.getDom=function(){return this._dom},Rd.getZr=function(){return this._zr},Rd.setOption=function(t,e,i){if(!this._disposed){var n;if(Ad(e)&&(i=e.lazyUpdate,n=e.silent,e=e.notMerge),this[Ld]=!0,!this._model||e){var o=new fh(this._api),a=this._theme,r=this._model=new eh;r.scheduler=this._scheduler,r.init(null,null,a,o)}this._model.setOption(t,nf),i?(this[kd]={silent:n},this[Ld]=!1):(Vd(this),Bd.update.call(this),this._zr.flush(),this[kd]=!1,this[Ld]=!1,Hd.call(this,n),Zd.call(this,n))}},Rd.setTheme=function(){console.error("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},Rd.getModel=function(){return this._model},Rd.getOption=function(){return this._model&&this._model.getOption()},Rd.getWidth=function(){return this._zr.getWidth()},Rd.getHeight=function(){return this._zr.getHeight()},Rd.getDevicePixelRatio=function(){return this._zr.painter.dpr||window.devicePixelRatio||1},Rd.getRenderedCanvas=function(t){if(v.canvasSupported)return(t=t||{}).pixelRatio=t.pixelRatio||1,t.backgroundColor=t.backgroundColor||this._model.get("backgroundColor"),this._zr.painter.getRenderedCanvas(t)},Rd.getSvgDataUrl=function(){if(v.svgSupported){var t=this._zr;return E(t.storage.getDisplayList(),function(t){t.stopAnimation(!0)}),t.painter.pathToDataUrl()}},Rd.getDataURL=function(t){if(!this._disposed){var e=(t=t||{}).excludeComponents,i=this._model,n=[],o=this;Id(e,function(t){i.eachComponent({mainType:t},function(t){var e=o._componentsMap[t.__viewId];e.group.ignore||(n.push(e),e.group.ignore=!0)})});var a="svg"===this._zr.painter.getType()?this.getSvgDataUrl():this.getRenderedCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return Id(n,function(t){t.group.ignore=!1}),a}},Rd.getConnectedDataURL=function(o){if(!this._disposed&&v.canvasSupported){var a=this.group,r=Math.min,s=Math.max;if(uf[a]){var l=1/0,u=1/0,h=-1/0,c=-1/0,d=[],i=o&&o.pixelRatio||1;E(lf,function(t,e){if(t.group===a){var i=t.getRenderedCanvas(L(o)),n=t.getDom().getBoundingClientRect();l=r(n.left,l),u=r(n.top,u),h=s(n.right,h),c=s(n.bottom,c),d.push({dom:i,left:n.left,top:n.top})}});var t=(h*=i)-(l*=i),e=(c*=i)-(u*=i),n=g();n.width=t,n.height=e;var f=ko(n);return o.connectedBackgroundColor&&f.add(new rs({shape:{x:0,y:0,width:t,height:e},style:{fill:o.connectedBackgroundColor}})),Id(d,function(t){var e=new Qn({style:{x:t.left*i-l,y:t.top*i-u,image:t.dom}});f.add(e)}),f.refreshImmediately(),n.toDataURL("image/"+(o&&o.type||"png"))}return this.getDataURL(o)}},Rd.convertToPixel=T(zd,"convertToPixel"),Rd.convertFromPixel=T(zd,"convertFromPixel"),Rd.containPixel=function(t,o){var a;if(!this._disposed)return E(t=Ko(this._model,t),function(t,n){0<=n.indexOf("Models")&&E(t,function(t){var e=t.coordinateSystem;if(e&&e.containPoint)a|=!!e.containPoint(o);else if("seriesModels"===n){var i=this._chartsMap[t.__viewId];i&&i.containPoint&&(a|=i.containPoint(o,t))}},this)},this),!!a},Rd.getVisual=function(t,e){var i=(t=Ko(this._model,t,{defaultMainType:"series"})).seriesModel.getData(),n=t.hasOwnProperty("dataIndexInside")?t.dataIndexInside:t.hasOwnProperty("dataIndex")?i.indexOfRawIndex(t.dataIndex):null;return null!=n?i.getItemVisual(n,e):i.getVisual(e)},Rd.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},Rd.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]};var Bd={prepareAndUpdate:function(t){Vd(this),Bd.update.call(this,t)},update:function(t){var e=this._model,i=this._api,n=this._zr,o=this._coordSysMgr,a=this._scheduler;if(e){a.restoreData(e,t),a.performSeriesTasks(e),o.create(e,i),a.performDataProcessorTasks(e,t),Fd(this,e),o.update(e,i),Xd(e),a.performVisualTasks(e,t),Yd(this,e,i,t);var r=e.get("backgroundColor")||"transparent";if(v.canvasSupported)n.setBackgroundColor(r);else{var s=Fe(r);r=$e(s,"rgb"),0===s[3]&&(r="transparent")}qd(e,i)}},updateTransform:function(o){var a=this._model,r=this,s=this._api;if(a){var l=[];a.eachComponent(function(t,e){var i=r.getViewOfComponentModel(e);if(i&&i.__alive)if(i.updateTransform){var n=i.updateTransform(e,a,s,o);n&&n.update&&l.push(i)}else l.push(i)});var n=Q();a.eachSeries(function(t){var e=r._chartsMap[t.__viewId];if(e.updateTransform){var i=e.updateTransform(t,a,s,o);i&&i.update&&n.set(t.uid,1)}else n.set(t.uid,1)}),Xd(a),this._scheduler.performVisualTasks(a,o,{setDirty:!0,dirtyMap:n}),jd(r,a,s,o,n),qd(a,this._api)}},updateView:function(t){var e=this._model;e&&(xc.markUpdateMethod(t,"updateView"),Xd(e),this._scheduler.performVisualTasks(e,t,{setDirty:!0}),Yd(this,this._model,this._api,t),qd(e,this._api))},updateVisual:function(t){Bd.update.call(this,t)},updateLayout:function(t){Bd.update.call(this,t)}};function Vd(t){var e=t._model,i=t._scheduler;i.restorePipelines(e),i.prepareStageTasks(),Ud(t,"component",e,i),Ud(t,"chart",e,i),i.plan()}function Gd(e,i,n,o,t){var a=e._model;if(o){var r={};r[o+"Id"]=n[o+"Id"],r[o+"Index"]=n[o+"Index"],r[o+"Name"]=n[o+"Name"];var s={mainType:o,query:r};t&&(s.subType=t);var l=n.excludeSeriesId;null!=l&&(l=Q(Vo(l))),a&&a.eachComponent(s,function(t){l&&null!=l.get(t.id)||u(e["series"===o?"_chartsMap":"_componentsMap"][t.__viewId])},e)}else Id(e._componentsViews.concat(e._chartsViews),u);function u(t){t&&t.__alive&&t[i]&&t[i](t.__model,a,e._api,n)}}function Fd(t,e){var i=t._chartsMap,n=t._scheduler;e.eachSeries(function(t){n.updateStreamModes(t,i[t.__viewId])})}function Wd(e,t){var i=e.type,n=e.escapeConnect,o=Qd[i],a=o.actionInfo,r=(a.update||"update").split(":"),s=r.pop();r=null!=r[0]&&Dd(r[0]),this[Ld]=!0;var l=[e],u=!1;e.batch&&(u=!0,l=N(e.batch,function(t){return(t=D(k({},t),e)).batch=null,t}));var h,c=[],d="highlight"===i||"downplay"===i;Id(l,function(t){(h=(h=o.action(t,this._model,this._api))||k({},t)).type=a.event||h.type,c.push(h),d?Gd(this,s,t,"series"):r&&Gd(this,s,t,r.main,r.sub)},this),"none"===s||d||r||(this[kd]?(Vd(this),Bd.update.call(this,e),this[kd]=!1):Bd[s].call(this,e)),h=u?{type:a.event||i,escapeConnect:n,batch:c}:c[0],this[Ld]=!1,t||this._messageCenter.trigger(h.type,h)}function Hd(t){for(var e=this._pendingActions;e.length;){var i=e.shift();Wd.call(this,i,t)}}function Zd(t){t||this.trigger("updated")}function Ud(t,e,o,a){for(var r="component"===e,s=r?t._componentsViews:t._chartsViews,l=r?t._componentsMap:t._chartsMap,u=t._zr,h=t._api,i=0;i<s.length;i++)s[i].__alive=!1;function n(t){var e="_ec_"+t.id+"_"+t.type,i=l[e];if(!i){var n=Dd(t.type);(i=new(r?pc.getClass(n.main,n.sub):xc.getClass(n.sub))).init(o,h),l[e]=i,s.push(i),u.add(i.group)}t.__viewId=i.__id=e,i.__alive=!0,i.__model=t,i.group.__ecComponentInfo={mainType:t.mainType,index:t.componentIndex},r||a.prepareView(i,t,o,h)}r?o.eachComponent(function(t,e){"series"!==t&&n(e)}):o.eachSeries(n);for(i=0;i<s.length;){var c=s[i];c.__alive?i++:(r||c.renderTask.dispose(),u.remove(c.group),c.dispose(o,h),s.splice(i,1),delete l[c.__id],c.__id=c.group.__ecComponentInfo=null)}}function Xd(t){t.clearColorPalette(),t.eachSeries(function(t){t.clearColorPalette()})}function Yd(t,e,i,n){!function(t,i,n,o,e){Id(e||t._componentsViews,function(t){var e=t.__model;t.render(e,i,n,o),$d(e,t)})}(t,e,i,n),Id(t._chartsViews,function(t){t.__alive=!1}),jd(t,e,i,n),Id(t._chartsViews,function(t){t.__alive||t.remove(e,i)})}function jd(n,t,e,o,a){var r,s=n._scheduler;t.eachSeries(function(t){var e=n._chartsMap[t.__viewId];e.__alive=!0;var i=e.renderTask;s.updatePayload(i,o),a&&a.get(t.uid)&&i.dirty(),r|=i.perform(s.getPerformArgs(i)),e.group.silent=!!t.get("silent"),$d(t,e),function(t,e){var i=t.get("blendMode")||null;e.group.traverse(function(t){t.isGroup||t.style.blend!==i&&t.setStyle("blend",i),t.eachPendingDisplayable&&t.eachPendingDisplayable(function(t){t.setStyle("blend",i)})})}(t,e)}),s.unfinished|=r,function(i,t){var e=i._zr.storage,n=0;e.traverse(function(t){n++}),n>t.get("hoverLayerThreshold")&&!v.node&&t.eachSeries(function(t){if(!t.preventUsingHoverLayer){var e=i._chartsMap[t.__viewId];e.__alive&&e.group.traverse(function(t){t.useHoverLayer=!0})}})}(n,t),Oc(n._zr.dom,t)}function qd(e,i){Id(of,function(t){t(e,i)})}Rd.resize=function(t){if(!this._disposed){this._zr.resize(t);var e=this._model;if(this._loadingFX&&this._loadingFX.resize(),e){var i=e.resetOption("media"),n=t&&t.silent;this[Ld]=!0,i&&Vd(this),Bd.update.call(this),this[Ld]=!1,Hd.call(this,n),Zd.call(this,n)}}},Rd.showLoading=function(t,e){if(!this._disposed&&(Ad(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),sf[t])){var i=sf[t](this._api,e),n=this._zr;this._loadingFX=i,n.add(i)}},Rd.hideLoading=function(){this._disposed||(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},Rd.makeActionFromEvent=function(t){var e=k({},t);return e.type=tf[t.type],e},Rd.dispatchAction=function(t,e){this._disposed||(Ad(e)||(e={silent:!!e}),Qd[t.type]&&this._model&&(this[Ld]?this._pendingActions.push(t):(Wd.call(this,t,e.silent),e.flush?this._zr.flush(!0):!1!==e.flush&&v.browser.weChat&&this._throttledZrFlush(),Hd.call(this,e.silent),Zd.call(this,e.silent))))},Rd.appendData=function(t){if(!this._disposed){var e=t.seriesIndex;this.getModel().getSeriesByIndex(e).appendData(t),this._scheduler.unfinished=!0}},Rd.on=Nd("on",!1),Rd.off=Nd("off",!1),Rd.one=Nd("one",!1);var Kd=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];function $d(t,e){var i=t.get("z"),n=t.get("zlevel");e.group.traverse(function(t){"group"!==t.type&&(null!=i&&(t.z=i),null!=n&&(t.zlevel=n))})}function Jd(){this.eventInfo}Rd._initEvents=function(){Id(Kd,function(u){function t(t){var e,i=this.getModel(),n=t.target;if("globalout"===u)e={};else if(n&&null!=n.dataIndex){var o=n.dataModel||i.getSeriesByIndex(n.seriesIndex);e=o&&o.getDataParams(n.dataIndex,n.dataType,n)||{}}else n&&n.eventData&&(e=k({},n.eventData));if(e){var a=e.componentType,r=e.componentIndex;"markLine"!==a&&"markPoint"!==a&&"markArea"!==a||(a="series",r=e.seriesIndex);var s=a&&null!=r&&i.getComponent(a,r),l=s&&this["series"===s.mainType?"_chartsMap":"_componentsMap"][s.__viewId];e.event=t,e.type=u,this._ecEventProcessor.eventInfo={targetEl:n,packedEvent:e,model:s,view:l},this.trigger(u,e)}}t.zrEventfulCallAtLast=!0,this._zr.on(u,t,this)},this),Id(tf,function(t,e){this._messageCenter.on(e,function(t){this.trigger(e,t)},this)},this)},Rd.isDisposed=function(){return this._disposed},Rd.clear=function(){this._disposed||this.setOption({series:[]},!0)},Rd.dispose=function(){if(!this._disposed){this._disposed=!0,Jo(this.getDom(),df,"");var e=this._api,i=this._model;Id(this._componentsViews,function(t){t.dispose(i,e)}),Id(this._chartsViews,function(t){t.dispose(i,e)}),this._zr.dispose(),delete lf[this.id]}},b(Ed,Ct),Jd.prototype={constructor:Jd,normalizeQuery:function(t){var s={},l={},u={};if(R(t)){var e=Dd(t);s.mainType=e.main||null,s.subType=e.sub||null}else{var h=["Index","Name","Id"],c={name:1,dataIndex:1,dataType:1};E(t,function(t,e){for(var i=!1,n=0;n<h.length;n++){var o=h[n],a=e.lastIndexOf(o);if(0<a&&a===e.length-o.length){var r=e.slice(0,a);"data"!==r&&(s.mainType=r,s[o.toLowerCase()]=t,i=!0)}}c.hasOwnProperty(e)&&(l[e]=t,i=!0),i||(u[e]=t)})}return{cptQuery:s,dataQuery:l,otherQuery:u}},filter:function(t,e,i){var n=this.eventInfo;if(!n)return!0;var o=n.targetEl,a=n.packedEvent,r=n.model,s=n.view;if(!r||!s)return!0;var l=e.cptQuery,u=e.dataQuery;return h(l,r,"mainType")&&h(l,r,"subType")&&h(l,r,"index","componentIndex")&&h(l,r,"name")&&h(l,r,"id")&&h(u,a,"name")&&h(u,a,"dataIndex")&&h(u,a,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(t,e.otherQuery,o,a));function h(t,e,i,n){return null==t[i]||e[n||i]===t[i]}},afterTrigger:function(){this.eventInfo=null}};var Qd={},tf={},ef=[],nf=[],of=[],af=[],rf={},sf={},lf={},uf={},hf=new Date-0,cf=new Date-0,df="_echarts_instance_";function ff(t){uf[t]=!1}var pf=ff;function gf(t){return lf[function(t,e){return t.getAttribute?t.getAttribute(e):t[e]}(t,df)]}function mf(t,e){rf[t]=e}function vf(t){nf.push(t)}function yf(t,e){Sf(ef,t,e,1e3)}function xf(t,e,i){"function"==typeof e&&(i=e,e="");var n=Ad(t)?t.type:[t,t={event:e}][0];t.event=(t.event||n).toLowerCase(),e=t.event,Md(Pd.test(n)&&Pd.test(e)),Qd[n]||(Qd[n]={action:i,actionInfo:t}),tf[e]=n}function _f(t,e){sh.register(t,e)}function wf(t,e){Sf(af,t,e,1e3,"layout")}function bf(t,e){Sf(af,t,e,3e3,"visual")}function Sf(t,e,i,n,o){(Td(e)||Ad(e))&&(i=e,e=n);var a=Rc.wrapStageHandler(i,o);return a.__prio=e,a.__raw=i,t.push(a),a}function Mf(t,e){sf[t]=e}function If(t){return Lu.extend(t)}function Tf(t){return pc.extend(t)}function Af(t){return rc.extend(t)}function Df(t){return xc.extend(t)}bf(2e3,Pc),vf(Ch),yf(900,function(t){var a=Q();t.eachSeries(function(t){var e=t.get("stack");if(e){var i=a.get(e)||a.set(e,[]),n=t.getData(),o={stackResultDimension:n.getCalculationInfo("stackResultDimension"),stackedOverDimension:n.getCalculationInfo("stackedOverDimension"),stackedDimension:n.getCalculationInfo("stackedDimension"),stackedByDimension:n.getCalculationInfo("stackedByDimension"),isStackedByIndex:n.getCalculationInfo("isStackedByIndex"),data:n,seriesModel:t};if(!o.stackedDimension||!o.isStackedByIndex&&!o.stackedByDimension)return;i.length&&n.setCalculationInfo("stackedOnSeries",i[i.length-1].seriesModel),i.push(o)}}),a.each(Lh)}),Mf("default",function(n,t){D(t=t||{},{text:"loading",color:"#c23531",textColor:"#000",maskColor:"rgba(255, 255, 255, 0.8)",zlevel:0});var o=new rs({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4}),a=new fs({shape:{startAngle:-Ec/2,endAngle:-Ec/2+.1,r:10},style:{stroke:t.color,lineCap:"round",lineWidth:5},zlevel:t.zlevel,z:10001}),r=new rs({style:{fill:"none",text:t.text,textPosition:"right",textDistance:10,textFill:t.textColor},zlevel:t.zlevel,z:10001});a.animateShape(!0).when(1e3,{endAngle:3*Ec/2}).start("circularInOut"),a.animateShape(!0).when(1e3,{startAngle:3*Ec/2}).delay(300).start("circularInOut");var e=new Ci;return e.add(a),e.add(r),e.add(o),e.resize=function(){var t=n.getWidth()/2,e=n.getHeight()/2;a.setShape({cx:t,cy:e});var i=a.shape.r;r.setShape({x:t-i,y:e-i,width:2*i,height:2*i}),o.setShape({x:0,y:0,width:n.getWidth(),height:n.getHeight()})},e.resize(),e}),xf({type:"highlight",event:"highlight",update:"highlight"},et),xf({type:"downplay",event:"downplay",update:"downplay"},et),mf("light",id),mf("dark",ad);function Cf(t){return t}function Lf(t,e,i,n,o){this._old=t,this._new=e,this._oldKeyGetter=i||Cf,this._newKeyGetter=n||Cf,this.context=o}function kf(t,e,i,n,o){for(var a=0;a<t.length;a++){var r="_ec_"+o[n](t[a],a),s=e[r];null==s?(i.push(r),e[r]=a):(s.length||(e[r]=s=[s]),s.push(a))}}Lf.prototype={constructor:Lf,add:function(t){return this._add=t,this},update:function(t){return this._update=t,this},remove:function(t){return this._remove=t,this},execute:function(){var t=this._old,e=this._new,i={},n=[],o=[];for(kf(t,{},n,"_oldKeyGetter",this),kf(e,i,o,"_newKeyGetter",this),a=0;a<t.length;a++){if(null!=(s=i[r=n[a]]))(u=s.length)?(1===u&&(i[r]=null),s=s.shift()):i[r]=null,this._update&&this._update(s,a);else this._remove&&this._remove(a)}for(var a=0;a<o.length;a++){var r=o[a];if(i.hasOwnProperty(r)){var s;if(null==(s=i[r]))continue;if(s.length)for(var l=0,u=s.length;l<u;l++)this._add&&this._add(s[l]);else this._add&&this._add(s)}}}};var Pf=Q(["tooltip","label","itemName","itemId","seriesName"]);function Nf(t,e){return t.hasOwnProperty(e)||(t[e]=[]),t[e]}function Of(t){return"category"===t?"ordinal":"time"===t?"time":"float"}function Ef(t){null!=t&&k(this,t),this.otherDims={}}var Rf=z,zf="undefined",Bf={float:typeof Float64Array==zf?Array:Float64Array,int:typeof Int32Array==zf?Array:Int32Array,ordinal:Array,number:Array,time:Array},Vf=typeof Uint32Array==zf?Array:Uint32Array,Gf=typeof Int32Array==zf?Array:Int32Array,Ff=typeof Uint16Array==zf?Array:Uint16Array;function Wf(t){return 65535<t._rawCount?Vf:Ff}var Hf=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_rawData","_chunkSize","_chunkCount","_dimValueGetter","_count","_rawCount","_nameDimIdx","_idDimIdx"],Zf=["_extent","_approximateExtent","_rawExtent"];function Uf(e,i){E(Hf.concat(i.__wrappedMethods||[]),function(t){i.hasOwnProperty(t)&&(e[t]=i[t])}),e.__wrappedMethods=i.__wrappedMethods,E(Zf,function(t){e[t]=L(i[t])}),e._calculationInfo=k(i._calculationInfo)}var Xf=function(t,e){t=t||["x","y"];for(var i={},n=[],o={},a=0;a<t.length;a++){var r=t[a];R(r)?r=new Ef({name:r}):r instanceof Ef||(r=new Ef(r));var s=r.name;r.type=r.type||"float",r.coordDim||(r.coordDim=s,r.coordDimIndex=0),r.otherDims=r.otherDims||{},n.push(s),(i[s]=r).index=a,r.createInvertedIndices&&(o[s]=[])}this.dimensions=n,this._dimensionInfos=i,this.hostModel=e,this.dataType,this._indices=null,this._count=0,this._rawCount=0,this._storage={},this._nameList=[],this._idList=[],this._optionModels=[],this._visual={},this._layout={},this._itemVisuals=[],this.hasItemVisual={},this._itemLayouts=[],this._graphicEls=[],this._chunkSize=1e5,this._chunkCount=0,this._rawData,this._rawExtent={},this._extent={},this._approximateExtent={},this._dimensionsSummary=function(n){var t={},a=t.encode={},r=Q(),s=[],l=[],u=t.userOutput={dimensionNames:n.dimensions.slice(),encode:{}};E(n.dimensions,function(t){var o=n.getDimensionInfo(t),e=o.coordDim;if(e){var i=o.coordDimIndex;Nf(a,e)[i]=t,o.isExtraCoord||(r.set(e,1),function(t){return!("ordinal"===t||"time"===t)}(o.type)&&(s[0]=t),Nf(u.encode,e)[i]=o.index),o.defaultTooltip&&l.push(t)}Pf.each(function(t,e){var i=Nf(a,e),n=o.otherDims[e];null!=n&&!1!==n&&(i[n]=o.name)})});var o=[],h={};r.each(function(t,e){var i=a[e];h[e]=i[0],o=o.concat(i)}),t.dataDimsOnCoord=o,t.encodeFirstDimNotExtra=h;var e=a.label;e&&e.length&&(s=e.slice());var i=a.tooltip;return i&&i.length?l=i.slice():l.length||(l=s.slice()),a.defaultedLabel=s,a.defaultedTooltip=l,t}(this),this._invertedIndicesMap=o,this._calculationInfo={},this.userOutput=this._dimensionsSummary.userOutput},Yf=Xf.prototype;function jf(t,e,i,n,o){var a=Bf[e.type],r=n-1,s=e.name,l=t[s][r];if(l&&l.length<i){for(var u=new a(Math.min(o-r*i,i)),h=0;h<l.length;h++)u[h]=l[h];t[s][r]=u}for(var c=n*i;c<o;c+=i)t[s].push(new a(Math.min(o-c,i)))}function qf(o){var a=o._invertedIndicesMap;E(a,function(t,e){var i=o._dimensionInfos[e].ordinalMeta;if(i){t=a[e]=new Gf(i.categories.length);for(var n=0;n<t.length;n++)t[n]=-1;for(n=0;n<o._count;n++)t[o.get(e,n)]=n}})}function Kf(t,e,i){var n;if(null!=e){var o=t._chunkSize,a=Math.floor(i/o),r=i%o,s=t.dimensions[e],l=t._storage[s][a];if(l){n=l[r];var u=t._dimensionInfos[s].ordinalMeta;u&&u.categories.length&&(n=u.categories[n])}}return n}function $f(t){return t}function Jf(t){return t<this._count&&0<=t?this._indices[t]:-1}function Qf(t,e){var i=t._idList[e];return null==i&&(i=Kf(t,t._idDimIdx,e)),null==i&&(i="e\0\0"+e),i}function tp(t){return O(t)||(t=[t]),t}function ep(t,e){var i=t.dimensions,n=new Xf(N(i,t.getDimensionInfo,t),t.hostModel);Uf(n,t);for(var o=n._storage={},a=t._storage,r=0;r<i.length;r++){var s=i[r];a[s]&&(0<=_(e,s)?(o[s]=ip(a[s]),n._rawExtent[s]=np(),n._extent[s]=null):o[s]=a[s])}return n}function ip(t){for(var e,i,n=new Array(t.length),o=0;o<t.length;o++)n[o]=(e=t[o],i=void 0,(i=e.constructor)===Array?e.slice():new i(e));return n}function np(){return[1/0,-1/0]}Yf.type="list",Yf.hasItemOption=!0,Yf.getDimension=function(t){return"number"!=typeof t&&(isNaN(t)||this._dimensionInfos.hasOwnProperty(t))||(t=this.dimensions[t]),t},Yf.getDimensionInfo=function(t){return this._dimensionInfos[this.getDimension(t)]},Yf.getDimensionsOnCoord=function(){return this._dimensionsSummary.dataDimsOnCoord.slice()},Yf.mapDimension=function(t,e){var i=this._dimensionsSummary;if(null==e)return i.encodeFirstDimNotExtra[t];var n=i.encode[t];return!0===e?(n||[]).slice():n&&n[e]},Yf.initData=function(t,e,i){(Zu.isInstance(t)||P(t))&&(t=new kh(t,this.dimensions.length)),this._rawData=t,this._storage={},this._indices=null,this._nameList=e||[],this._idList=[],this._nameRepeatCount={},i||(this.hasItemOption=!1),this.defaultDimValueGetter=Vh[this._rawData.getSource().sourceFormat],this._dimValueGetter=i=i||this.defaultDimValueGetter,this._dimValueGetterArrayRows=Vh.arrayRows,this._rawExtent={},this._initDataFromProvider(0,t.count()),t.pure&&(this.hasItemOption=!1)},Yf.getProvider=function(){return this._rawData},Yf.appendData=function(t){var e=this._rawData,i=this.count();e.appendData(t);var n=e.count();e.persistent||(n+=i),this._initDataFromProvider(i,n)},Yf.appendValues=function(t,e){for(var i=this._chunkSize,n=this._storage,o=this.dimensions,a=o.length,r=this._rawExtent,s=this.count(),l=s+Math.max(t.length,e?e.length:0),u=this._chunkCount,h=0;h<a;h++){r[v=o[h]]||(r[v]=np()),n[v]||(n[v]=[]),jf(n,this._dimensionInfos[v],i,u,l),this._chunkCount=n[v].length}for(var c=new Array(a),d=s;d<l;d++){for(var f=d-s,p=Math.floor(d/i),g=d%i,m=0;m<a;m++){var v=o[m],y=this._dimValueGetterArrayRows(t[f]||c,v,f,m);n[v][p][g]=y;var x=r[v];y<x[0]&&(x[0]=y),y>x[1]&&(x[1]=y)}e&&(this._nameList[d]=e[f])}this._rawCount=this._count=l,this._extent={},qf(this)},Yf._initDataFromProvider=function(t,e){if(!(e<=t)){for(var i,n=this._chunkSize,o=this._rawData,a=this._storage,r=this.dimensions,s=r.length,l=this._dimensionInfos,u=this._nameList,h=this._idList,c=this._rawExtent,d=this._nameRepeatCount={},f=this._chunkCount,p=0;p<s;p++){c[w=r[p]]||(c[w]=np());var g=l[w];0===g.otherDims.itemName&&(i=this._nameDimIdx=p),0===g.otherDims.itemId&&(this._idDimIdx=p),a[w]||(a[w]=[]),jf(a,g,n,f,e),this._chunkCount=a[w].length}for(var m=new Array(s),v=t;v<e;v++){m=o.getItem(v,m);for(var y=Math.floor(v/n),x=v%n,_=0;_<s;_++){var w,b=a[w=r[_]][y],S=this._dimValueGetter(m,w,v,_);b[x]=S;var M=c[w];S<M[0]&&(M[0]=S),S>M[1]&&(M[1]=S)}if(!o.pure){var I=u[v];if(m&&null==I)if(null!=m.name)u[v]=I=m.name;else if(null!=i){var T=r[i],A=a[T][y];if(A){I=A[x];var D=l[T].ordinalMeta;D&&D.categories.length&&(I=D.categories[I])}}var C=null==m?null:m.id;null==C&&null!=I&&(d[I]=d[I]||0,0<d[C=I]&&(C+="__ec__"+d[I]),d[I]++),null!=C&&(h[v]=C)}}!o.persistent&&o.clean&&o.clean(),this._rawCount=this._count=e,this._extent={},qf(this)}},Yf.count=function(){return this._count},Yf.getIndices=function(){var t=this._indices;if(t){var e=t.constructor,i=this._count;if(e===Array){o=new e(i);for(var n=0;n<i;n++)o[n]=t[n]}else o=new e(t.buffer,0,i)}else{var o=new(e=Wf(this))(this.count());for(n=0;n<o.length;n++)o[n]=n}return o},Yf.get=function(t,e){if(!(0<=e&&e<this._count))return NaN;var i=this._storage;if(!i[t])return NaN;e=this.getRawIndex(e);var n=Math.floor(e/this._chunkSize),o=e%this._chunkSize;return i[t][n][o]},Yf.getByRawIndex=function(t,e){if(!(0<=e&&e<this._rawCount))return NaN;var i=this._storage[t];if(!i)return NaN;var n=Math.floor(e/this._chunkSize),o=e%this._chunkSize;return i[n][o]},Yf._getFast=function(t,e){var i=Math.floor(e/this._chunkSize),n=e%this._chunkSize;return this._storage[t][i][n]},Yf.getValues=function(t,e){var i=[];O(t)||(e=t,t=this.dimensions);for(var n=0,o=t.length;n<o;n++)i.push(this.get(t[n],e));return i},Yf.hasValue=function(t){for(var e=this._dimensionsSummary.dataDimsOnCoord,i=0,n=e.length;i<n;i++)if(isNaN(this.get(e[i],t)))return!1;return!0},Yf.getDataExtent=function(t){t=this.getDimension(t);var e=this._storage[t],i=np();if(!e)return i;var n,o=this.count();if(!this._indices)return this._rawExtent[t].slice();if(n=this._extent[t])return n.slice();for(var a=(n=i)[0],r=n[1],s=0;s<o;s++){var l=this._getFast(t,this.getRawIndex(s));l<a&&(a=l),r<l&&(r=l)}return n=[a,r],this._extent[t]=n},Yf.getApproximateExtent=function(t){return t=this.getDimension(t),this._approximateExtent[t]||this.getDataExtent(t)},Yf.setApproximateExtent=function(t,e){e=this.getDimension(e),this._approximateExtent[e]=t.slice()},Yf.getCalculationInfo=function(t){return this._calculationInfo[t]},Yf.setCalculationInfo=function(t,e){Rf(t)?k(this._calculationInfo,t):this._calculationInfo[t]=e},Yf.getSum=function(t){var e=0;if(this._storage[t])for(var i=0,n=this.count();i<n;i++){var o=this.get(t,i);isNaN(o)||(e+=o)}return e},Yf.getMedian=function(t){var i=[];this.each(t,function(t,e){isNaN(t)||i.push(t)});var e=[].concat(i).sort(function(t,e){return t-e}),n=this.count();return 0===n?0:n%2==1?e[(n-1)/2]:(e[n/2]+e[n/2-1])/2},Yf.rawIndexOf=function(t,e){var i=(t&&this._invertedIndicesMap[t])[e];return null==i||isNaN(i)?-1:i},Yf.indexOfName=function(t){for(var e=0,i=this.count();e<i;e++)if(this.getName(e)===t)return e;return-1},Yf.indexOfRawIndex=function(t){if(t>=this._rawCount||t<0)return-1;if(!this._indices)return t;var e=this._indices,i=e[t];if(null!=i&&i<this._count&&i===t)return t;for(var n=0,o=this._count-1;n<=o;){var a=(n+o)/2|0;if(e[a]<t)n=1+a;else{if(!(e[a]>t))return a;o=a-1}}return-1},Yf.indicesOfNearest=function(t,e,i){var n=[];if(!this._storage[t])return n;null==i&&(i=1/0);for(var o=1/0,a=-1,r=0,s=0,l=this.count();s<l;s++){var u=e-this.get(t,s),h=Math.abs(u);h<=i&&((h<o||h===o&&0<=u&&a<0)&&(o=h,a=u,r=0),u===a&&(n[r++]=s))}return n.length=r,n},Yf.getRawIndex=$f,Yf.getRawDataItem=function(t){if(this._rawData.persistent)return this._rawData.getItem(this.getRawIndex(t));for(var e=[],i=0;i<this.dimensions.length;i++){var n=this.dimensions[i];e.push(this.get(n,t))}return e},Yf.getName=function(t){var e=this.getRawIndex(t);return this._nameList[e]||Kf(this,this._nameDimIdx,e)||""},Yf.getId=function(t){return Qf(this,this.getRawIndex(t))},Yf.each=function(t,e,i,n){if(this._count){"function"==typeof t&&(n=i,i=e,e=t,t=[]),i=i||n||this;for(var o=(t=N(tp(t),this.getDimension,this)).length,a=0;a<this.count();a++)switch(o){case 0:e.call(i,a);break;case 1:e.call(i,this.get(t[0],a),a);break;case 2:e.call(i,this.get(t[0],a),this.get(t[1],a),a);break;default:for(var r=0,s=[];r<o;r++)s[r]=this.get(t[r],a);s[r]=a,e.apply(i,s)}}},Yf.filterSelf=function(t,e,i,n){if(this._count){"function"==typeof t&&(n=i,i=e,e=t,t=[]),i=i||n||this,t=N(tp(t),this.getDimension,this);for(var o=this.count(),a=new(Wf(this))(o),r=[],s=t.length,l=0,u=t[0],h=0;h<o;h++){var c,d=this.getRawIndex(h);if(0===s)c=e.call(i,h);else if(1===s){var f=this._getFast(u,d);c=e.call(i,f,h)}else{for(var p=0;p<s;p++)r[p]=this._getFast(u,d);r[p]=h,c=e.apply(i,r)}c&&(a[l++]=d)}return l<o&&(this._indices=a),this._count=l,this._extent={},this.getRawIndex=this._indices?Jf:$f,this}},Yf.selectRange=function(t){if(this._count){var e=[];for(var i in t)t.hasOwnProperty(i)&&e.push(i);var n=e.length;if(n){var o=this.count(),a=new(Wf(this))(o),r=0,s=e[0],l=t[s][0],u=t[s][1],h=!1;if(!this._indices){var c=0;if(1===n){for(var d=this._storage[e[0]],f=0;f<this._chunkCount;f++)for(var p=d[f],g=Math.min(this._count-f*this._chunkSize,this._chunkSize),m=0;m<g;m++){(l<=(w=p[m])&&w<=u||isNaN(w))&&(a[r++]=c),c++}h=!0}else if(2===n){d=this._storage[s];var v=this._storage[e[1]],y=t[e[1]][0],x=t[e[1]][1];for(f=0;f<this._chunkCount;f++){p=d[f];var _=v[f];for(g=Math.min(this._count-f*this._chunkSize,this._chunkSize),m=0;m<g;m++){var w=p[m],b=_[m];(l<=w&&w<=u||isNaN(w))&&(y<=b&&b<=x||isNaN(b))&&(a[r++]=c),c++}}h=!0}}if(!h)if(1===n)for(m=0;m<o;m++){var S=this.getRawIndex(m);(l<=(w=this._getFast(s,S))&&w<=u||isNaN(w))&&(a[r++]=S)}else for(m=0;m<o;m++){var M=!0;for(S=this.getRawIndex(m),f=0;f<n;f++){var I=e[f];((w=this._getFast(i,S))<t[I][0]||w>t[I][1])&&(M=!1)}M&&(a[r++]=this.getRawIndex(m))}return r<o&&(this._indices=a),this._count=r,this._extent={},this.getRawIndex=this._indices?Jf:$f,this}}},Yf.mapArray=function(t,e,i,n){"function"==typeof t&&(n=i,i=e,e=t,t=[]),i=i||n||this;var o=[];return this.each(t,function(){o.push(e&&e.apply(this,arguments))},i),o},Yf.map=function(t,e,i,n){i=i||n||this;var o=ep(this,t=N(tp(t),this.getDimension,this));o._indices=this._indices,o.getRawIndex=o._indices?Jf:$f;for(var a=o._storage,r=[],s=this._chunkSize,l=t.length,u=this.count(),h=[],c=o._rawExtent,d=0;d<u;d++){for(var f=0;f<l;f++)h[f]=this.get(t[f],d);h[l]=d;var p=e&&e.apply(i,h);if(null!=p){"object"!=typeof p&&(r[0]=p,p=r);for(var g=this.getRawIndex(d),m=Math.floor(g/s),v=g%s,y=0;y<p.length;y++){var x=t[y],_=p[y],w=c[x],b=a[x];b&&(b[m][v]=_),_<w[0]&&(w[0]=_),_>w[1]&&(w[1]=_)}}}return o},Yf.downSample=function(t,e,i,n){for(var o=ep(this,[t]),a=o._storage,r=[],s=Math.floor(1/e),l=a[t],u=this.count(),h=this._chunkSize,c=o._rawExtent[t],d=new(Wf(this))(u),f=0,p=0;p<u;p+=s){u-p<s&&(s=u-p,r.length=s);for(var g=0;g<s;g++){var m=this.getRawIndex(p+g),v=Math.floor(m/h),y=m%h;r[g]=l[v][y]}var x=i(r),_=this.getRawIndex(Math.min(p+n(r,x)||0,u-1)),w=_%h;(l[Math.floor(_/h)][w]=x)<c[0]&&(c[0]=x),x>c[1]&&(c[1]=x),d[f++]=_}return o._count=f,o._indices=d,o.getRawIndex=Jf,o},Yf.getItemModel=function(t){var e=this.hostModel;return new Cl(this.getRawDataItem(t),e,e&&e.ecModel)},Yf.diff=function(e){var i=this;return new Lf(e?e.getIndices():[],this.getIndices(),function(t){return Qf(e,t)},function(t){return Qf(i,t)})},Yf.getVisual=function(t){var e=this._visual;return e&&e[t]},Yf.setVisual=function(t,e){if(Rf(t))for(var i in t)t.hasOwnProperty(i)&&this.setVisual(i,t[i]);else this._visual=this._visual||{},this._visual[t]=e},Yf.setLayout=function(t,e){if(Rf(t))for(var i in t)t.hasOwnProperty(i)&&this.setLayout(i,t[i]);else this._layout[t]=e},Yf.getLayout=function(t){return this._layout[t]},Yf.getItemLayout=function(t){return this._itemLayouts[t]},Yf.setItemLayout=function(t,e,i){this._itemLayouts[t]=i?k(this._itemLayouts[t]||{},e):e},Yf.clearItemLayouts=function(){this._itemLayouts.length=0},Yf.getItemVisual=function(t,e,i){var n=this._itemVisuals[t],o=n&&n[e];return null!=o||i?o:this.getVisual(e)},Yf.setItemVisual=function(t,e,i){var n=this._itemVisuals[t]||{},o=this.hasItemVisual;if(this._itemVisuals[t]=n,Rf(e))for(var a in e)e.hasOwnProperty(a)&&(n[a]=e[a],o[a]=!0);else n[e]=i,o[e]=!0},Yf.clearAllVisual=function(){this._visual={},this._itemVisuals=[],this.hasItemVisual={}};function op(t){t.seriesIndex=this.seriesIndex,t.dataIndex=this.dataIndex,t.dataType=this.dataType}function ap(t,e,i){Zu.isInstance(e)||(e=Zu.seriesDataToSource(e)),i=i||{},t=(t||[]).slice();for(var n=(i.dimsDef||[]).slice(),o=Q(),a=Q(),l=[],r=function(t,e,i,n){var o=Math.max(t.dimensionsDetectCount||1,e.length,i.length,n||0);return E(e,function(t){var e=t.dimsDef;e&&(o=Math.max(o,e.length))}),o}(e,t,n,i.dimCount),s=0;s<r;s++){var u=n[s]=k({},z(n[s])?n[s]:{name:n[s]}),h=u.name,c=l[s]=new Ef;null!=h&&null==o.get(h)&&(c.name=c.displayName=h,o.set(h,s)),null!=u.type&&(c.type=u.type),null!=u.displayName&&(c.displayName=u.displayName)}var d=i.encodeDef;!d&&i.encodeDefaulter&&(d=i.encodeDefaulter(e,r)),(d=Q(d)).each(function(t,i){if(1===(t=Vo(t).slice()).length&&!R(t[0])&&t[0]<0)d.set(i,!1);else{var n=d.set(i,[]);E(t,function(t,e){R(t)&&(t=o.get(t)),null!=t&&t<r&&(n[e]=t,p(l[t],i,e))})}});var f=0;function p(t,e,i){null!=Pf.get(e)?t.otherDims[e]=i:(t.coordDim=e,t.coordDimIndex=i,a.set(e,!0))}E(t,function(o,t){var a,r,s;if(R(o))a=o,o={};else{a=o.name;var e=o.ordinalMeta;o.ordinalMeta=null,(o=L(o)).ordinalMeta=e,r=o.dimsDef,s=o.otherDims,o.name=o.coordDim=o.coordDimIndex=o.dimsDef=o.otherDims=null}if(!1!==(i=d.get(a))){var i;if(!(i=Vo(i)).length)for(var n=0;n<(r&&r.length||1);n++){for(;f<l.length&&null!=l[f].coordDim;)f++;f<l.length&&i.push(f++)}E(i,function(t,e){var i=l[t];if(p(D(i,o),a,e),null==i.name&&r){var n=r[e];z(n)||(n={name:n}),i.name=i.displayName=n.name,i.defaultTooltip=n.defaultTooltip}s&&D(i.otherDims,s)})}});var g=i.generateCoord,m=i.generateCoordCount,v=null!=m;m=g?m||1:0;for(var y,x,_=g||"value",w=0;w<r;w++){null==(c=l[w]=l[w]||new Ef).coordDim&&(c.coordDim=rp(_,a,v),c.coordDimIndex=0,(!g||m<=0)&&(c.isExtraCoord=!0),m--),null==c.name&&(c.name=rp(c.coordDim,o)),null==c.type&&(y=e,x=w,c.name,Qu(y.data,y.sourceFormat,y.seriesLayoutBy,y.dimensionsDefine,y.startIndex,x)===Uu.Must||c.isExtraCoord&&(null!=c.otherDims.itemName||null!=c.otherDims.seriesName))&&(c.type="ordinal")}return l}function rp(t,e,i){if(i||null!=e.get(t)){for(var n=0;null!=e.get(t+n);)n++;t+=n}return e.set(t,!0),t}Yf.setItemGraphicEl=function(t,e){var i=this.hostModel;e&&(e.dataIndex=t,e.dataType=this.dataType,e.seriesIndex=i&&i.seriesIndex,"group"===e.type&&e.traverse(op,e)),this._graphicEls[t]=e},Yf.getItemGraphicEl=function(t){return this._graphicEls[t]},Yf.eachItemGraphicEl=function(i,n){E(this._graphicEls,function(t,e){t&&i&&i.call(n,t,e)})},Yf.cloneShallow=function(t){if(!t){var e=N(this.dimensions,this.getDimensionInfo,this);t=new Xf(e,this.hostModel)}if(t._storage=this._storage,Uf(t,this),this._indices){var i=this._indices.constructor;t._indices=new i(this._indices)}else t._indices=null;return t.getRawIndex=t._indices?Jf:$f,t},Yf.wrapMethod=function(t,e){var i=this[t];"function"==typeof i&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var t=i.apply(this,arguments);return e.apply(this,[t].concat(U(arguments)))})},Yf.TRANSFERABLE_METHODS=["cloneShallow","downSample","map"],Yf.CHANGABLE_METHODS=["filterSelf","selectRange"];var sp=function(t,e){return ap((e=e||{}).coordDimensions||[],t,{dimsDef:e.dimensionsDefine||t.dimensionsDefine,encodeDef:e.encodeDefine||t.encodeDefine,dimCount:e.dimensionsCount,encodeDefaulter:e.encodeDefaulter,generateCoord:e.generateCoord,generateCoordCount:e.generateCoordCount})};function lp(t){this.coordSysName=t,this.coordSysDims=[],this.axisMap=Q(),this.categoryAxisMap=Q(),this.firstCategoryDimIndex=null}var up={cartesian2d:function(t,e,i,n){var o=t.getReferringComponents("xAxis")[0],a=t.getReferringComponents("yAxis")[0];e.coordSysDims=["x","y"],i.set("x",o),i.set("y",a),hp(o)&&(n.set("x",o),e.firstCategoryDimIndex=0),hp(a)&&(n.set("y",a),e.firstCategoryDimIndex,e.firstCategoryDimIndex=1)},singleAxis:function(t,e,i,n){var o=t.getReferringComponents("singleAxis")[0];e.coordSysDims=["single"],i.set("single",o),hp(o)&&(n.set("single",o),e.firstCategoryDimIndex=0)},polar:function(t,e,i,n){var o=t.getReferringComponents("polar")[0],a=o.findAxisModel("radiusAxis"),r=o.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],i.set("radius",a),i.set("angle",r),hp(a)&&(n.set("radius",a),e.firstCategoryDimIndex=0),hp(r)&&(n.set("angle",r),null==e.firstCategoryDimIndex&&(e.firstCategoryDimIndex=1))},geo:function(t,e,i,n){e.coordSysDims=["lng","lat"]},parallel:function(t,o,a,r){var s=t.ecModel,e=s.getComponent("parallel",t.get("parallelIndex")),l=o.coordSysDims=e.dimensions.slice();E(e.parallelAxisIndex,function(t,e){var i=s.getComponent("parallelAxis",t),n=l[e];a.set(n,i),hp(i)&&null==o.firstCategoryDimIndex&&(r.set(n,i),o.firstCategoryDimIndex=e)})}};function hp(t){return"category"===t.get("type")}function cp(t,i,e){var n,o,a,r,s=(e=e||{}).byIndex,l=e.stackedCoordDimension,u=!(!t||!t.get("stack"));if(E(i,function(t,e){R(t)&&(i[e]=t={name:t}),u&&!t.isExtraCoord&&(s||n||!t.ordinalMeta||(n=t),o||"ordinal"===t.type||"time"===t.type||l&&l!==t.coordDim||(o=t))}),!o||s||n||(s=!0),o){a="__\0ecstackresult",r="__\0ecstackedover",n&&(n.createInvertedIndices=!0);var h=o.coordDim,c=o.type,d=0;E(i,function(t){t.coordDim===h&&d++}),i.push({name:a,coordDim:h,coordDimIndex:d,type:c,isExtraCoord:!0,isCalculationCoord:!0}),d++,i.push({name:r,coordDim:r,coordDimIndex:d,type:c,isExtraCoord:!0,isCalculationCoord:!0})}return{stackedDimension:o&&o.name,stackedByDimension:n&&n.name,isStackedByIndex:s,stackedOverDimension:r,stackResultDimension:a}}function dp(t,e){return!!e&&e===t.getCalculationInfo("stackedDimension")}function fp(t,e){return dp(t,e)?t.getCalculationInfo("stackResultDimension"):e}function pp(t,e,i){i=i||{},Zu.isInstance(t)||(t=Zu.seriesDataToSource(t));var n,o=e.get("coordinateSystem"),a=sh.get(o),r=function(t){var e=t.get("coordinateSystem"),i=new lp(e),n=up[e];if(n)return n(t,i,i.axisMap,i.categoryAxisMap),i}(e);r&&(n=N(r.coordSysDims,function(t){var e={name:t},i=r.axisMap.get(t);if(i){var n=i.get("type");e.type=Of(n)}return e})),n=n||(a&&(a.getDimensionsInfo?a.getDimensionsInfo():a.dimensions.slice())||["x","y"]);var s,l,u=sp(t,{coordDimensions:n,generateCoord:i.generateCoord,encodeDefaulter:i.useEncodeDefaulter?T(Ku,n,e):null});r&&E(u,function(t,e){var i=t.coordDim,n=r.categoryAxisMap.get(i);n&&(null==s&&(s=e),t.ordinalMeta=n.getOrdinalMeta()),null!=t.otherDims.itemName&&(l=!0)}),l||null==s||(u[s].otherDims.itemName=0);var h=cp(e,u),c=new Xf(u,e);c.setCalculationInfo(h);var d=null!=s&&function(t){if(t.sourceFormat===Ru){var e=function(t){var e=0;for(;e<t.length&&null==t[e];)e++;return t[e]}(t.data||[]);return null!=e&&!O(Wo(e))}}(t)?function(t,e,i,n){return n===s?i:this.defaultDimValueGetter(t,e,i,n)}:null;return c.hasItemOption=!1,c.initData(t,null,d),c}function gp(t){this._setting=t||{},this._extent=[1/0,-1/0],this._interval=0,this.init&&this.init.apply(this,arguments)}function mp(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this._map}gp.prototype.parse=function(t){return t},gp.prototype.getSetting=function(t){return this._setting[t]},gp.prototype.contain=function(t){var e=this._extent;return t>=e[0]&&t<=e[1]},gp.prototype.normalize=function(t){var e=this._extent;return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])},gp.prototype.scale=function(t){var e=this._extent;return t*(e[1]-e[0])+e[0]},gp.prototype.unionExtent=function(t){var e=this._extent;t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1])},gp.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},gp.prototype.getExtent=function(){return this._extent.slice()},gp.prototype.setExtent=function(t,e){var i=this._extent;isNaN(t)||(i[0]=t),isNaN(e)||(i[1]=e)},gp.prototype.isBlank=function(){return this._isBlank},gp.prototype.setBlank=function(t){this._isBlank=t},gp.prototype.getLabel=null,oa(gp),ua(gp,{registerWhenExtend:!0}),mp.createByAxisModel=function(t){var e=t.option,i=e.data,n=i&&N(i,xp);return new mp({categories:n,needCollect:!n,deduplication:!1!==e.dedplication})};var vp=mp.prototype;function yp(t){return t._map||(t._map=Q(t.categories))}function xp(t){return z(t)&&null!=t.value?t.value:t+""}vp.getOrdinal=function(t){return yp(this).get(t)},vp.parseAndCollect=function(t){var e,i=this._needCollect;if("string"!=typeof t&&!i)return t;if(i&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,e;var n=yp(this);return null==(e=n.get(t))&&(i?(e=this.categories.length,this.categories[e]=t,n.set(t,e)):e=NaN),e};var _p=gp.prototype,wp=gp.extend({type:"ordinal",init:function(t,e){t&&!O(t)||(t=new mp({categories:t})),this._ordinalMeta=t,this._extent=e||[0,t.categories.length-1]},parse:function(t){return"string"==typeof t?this._ordinalMeta.getOrdinal(t):Math.round(t)},contain:function(t){return t=this.parse(t),_p.contain.call(this,t)&&null!=this._ordinalMeta.categories[t]},normalize:function(t){return _p.normalize.call(this,this.parse(t))},scale:function(t){return Math.round(_p.scale.call(this,t))},getTicks:function(){for(var t=[],e=this._extent,i=e[0];i<=e[1];)t.push(i),i++;return t},getLabel:function(t){if(!this.isBlank())return this._ordinalMeta.categories[t]},count:function(){return this._extent[1]-this._extent[0]+1},unionExtentFromData:function(t,e){this.unionExtent(t.getApproximateExtent(e))},getOrdinalMeta:function(){return this._ordinalMeta},niceTicks:et,niceExtent:et});wp.create=function(){return new wp};var bp=zl;function Sp(t){return Gl(t)+2}function Mp(t,e,i){t[e]=Math.max(Math.min(t[e],i[1]),i[0])}function Ip(t,e){isFinite(t[0])||(t[0]=e[0]),isFinite(t[1])||(t[1]=e[1]),Mp(t,0,e),Mp(t,1,e),t[0]>t[1]&&(t[0]=t[1])}var Tp=zl,Ap=gp.extend({type:"interval",_interval:0,_intervalPrecision:2,setExtent:function(t,e){var i=this._extent;isNaN(t)||(i[0]=parseFloat(t)),isNaN(e)||(i[1]=parseFloat(e))},unionExtent:function(t){var e=this._extent;t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1]),Ap.prototype.setExtent.call(this,e[0],e[1])},getInterval:function(){return this._interval},setInterval:function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=Sp(t)},getTicks:function(t){var e=this._interval,i=this._extent,n=this._niceExtent,o=this._intervalPrecision,a=[];if(!e)return a;i[0]<n[0]&&(t?a.push(Tp(n[0]-e,o)):a.push(i[0]));for(var r=n[0];r<=n[1]&&(a.push(r),(r=Tp(r+e,o))!==a[a.length-1]);)if(1e4<a.length)return[];var s=a.length?a[a.length-1]:n[1];return i[1]>s&&(t?a.push(Tp(s+e,o)):a.push(i[1])),a},getMinorTicks:function(t){for(var e=this.getTicks(!0),i=[],n=this.getExtent(),o=1;o<e.length;o++){for(var a=e[o],r=e[o-1],s=0,l=[],u=(a-r)/t;s<t-1;){var h=zl(r+(s+1)*u);h>n[0]&&h<n[1]&&l.push(h),s++}i.push(l)}return i},getLabel:function(t,e){if(null==t)return"";var i=e&&e.precision;return null==i?i=Gl(t)||0:"auto"===i&&(i=this._intervalPrecision),tu(t=Tp(t,i,!0))},niceTicks:function(t,e,i){t=t||5;var n=this._extent,o=n[1]-n[0];if(isFinite(o)){o<0&&(o=-o,n.reverse());var a=function(t,e,i,n){var o={},a=t[1]-t[0],r=o.interval=Kl(a/e,!0);null!=i&&r<i&&(r=o.interval=i),null!=n&&n<r&&(r=o.interval=n);var s=o.intervalPrecision=Sp(r);return Ip(o.niceTickExtent=[bp(Math.ceil(t[0]/r)*r,s),bp(Math.floor(t[1]/r)*r,s)],t),o}(n,t,e,i);this._intervalPrecision=a.intervalPrecision,this._interval=a.interval,this._niceExtent=a.niceTickExtent}},niceExtent:function(t){var e=this._extent;if(e[0]===e[1])if(0!==e[0]){var i=e[0];t.fixMax||(e[1]+=i/2),e[0]-=i/2}else e[1]=1;var n=e[1]-e[0];isFinite(n)||(e[0]=0,e[1]=1),this.niceTicks(t.splitNumber,t.minInterval,t.maxInterval);var o=this._interval;t.fixMin||(e[0]=Tp(Math.floor(e[0]/o)*o)),t.fixMax||(e[1]=Tp(Math.ceil(e[1]/o)*o))}});Ap.create=function(){return new Ap};var Dp="__ec_stack_",Cp="undefined"!=typeof Float32Array?Float32Array:Array;function Lp(t){return t.get("stack")||Dp+t.seriesIndex}function kp(t){return t.dim+t.index}function Pp(t,e){var i=[];return e.eachSeriesByType(t,function(t){Bp(t)&&!Vp(t)&&i.push(t)}),i}function Np(t){var g=function(t){var l={};E(t,function(t){var e=t.coordinateSystem.getBaseAxis();if("time"===e.type||"value"===e.type)for(var i=t.getData(),n=e.dim+"_"+e.index,o=i.mapDimension(e.dim),a=0,r=i.count();a<r;++a){var s=i.get(o,a);l[n]?l[n].push(s):l[n]=[s]}});var e=[];for(var i in l)if(l.hasOwnProperty(i)){var n=l[i];if(n){n.sort(function(t,e){return t-e});for(var o=null,a=1;a<n.length;++a){var r=n[a]-n[a-1];0<r&&(o=null===o?r:Math.min(o,r))}e[i]=o}}return e}(t),m=[];return E(t,function(t){var e,i=t.coordinateSystem.getBaseAxis(),n=i.getExtent();if("category"===i.type)e=i.getBandWidth();else if("value"===i.type||"time"===i.type){var o=i.dim+"_"+i.index,a=g[o],r=Math.abs(n[1]-n[0]),s=i.scale.getExtent(),l=Math.abs(s[1]-s[0]);e=a?r/l*a:r}else{var u=t.getData();e=Math.abs(n[1]-n[0])/u.count()}var h=Rl(t.get("barWidth"),e),c=Rl(t.get("barMaxWidth"),e),d=Rl(t.get("barMinWidth")||1,e),f=t.get("barGap"),p=t.get("barCategoryGap");m.push({bandWidth:e,barWidth:h,barMaxWidth:c,barMinWidth:d,barGap:f,barCategoryGap:p,axisKey:kp(i),stackId:Lp(t)})}),Op(m)}function Op(t){var d={};E(t,function(t,e){var i=t.axisKey,n=t.bandWidth,o=d[i]||{bandWidth:n,remainedWidth:n,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},a=o.stacks;d[i]=o;var r=t.stackId;a[r]||o.autoWidthCount++,a[r]=a[r]||{width:0,maxWidth:0};var s=t.barWidth;s&&!a[r].width&&(a[r].width=s,s=Math.min(o.remainedWidth,s),o.remainedWidth-=s);var l=t.barMaxWidth;l&&(a[r].maxWidth=l);var u=t.barMinWidth;u&&(a[r].minWidth=u);var h=t.barGap;null!=h&&(o.gap=h);var c=t.barCategoryGap;null!=c&&(o.categoryGap=c)});var f={};return E(d,function(t,i){f[i]={};var e=t.stacks,n=t.bandWidth,o=Rl(t.categoryGap,n),a=Rl(t.gap,1),r=t.remainedWidth,s=t.autoWidthCount,l=(r-o)/(s+(s-1)*a);l=Math.max(l,0),E(e,function(t){var e=t.maxWidth,i=t.minWidth;if(t.width){n=t.width;e&&(n=Math.min(n,e)),i&&(n=Math.max(n,i)),t.width=n,r-=n+a*n,s--}else{var n=l;e&&e<n&&(n=Math.min(e,r)),i&&n<i&&(n=i),n!==l&&(t.width=n,r-=n+a*n,s--)}}),l=(r-o)/(s+(s-1)*a),l=Math.max(l,0);var u,h=0;E(e,function(t,e){t.width||(t.width=l),h+=(u=t).width*(1+a)}),u&&(h-=u.width*a);var c=-h/2;E(e,function(t,e){f[i][e]=f[i][e]||{bandWidth:n,offset:c,width:t.width},c+=t.width*(1+a)})}),f}function Ep(t,e,i){if(t&&e){var n=t[kp(e)];return null!=n&&null!=i&&(n=n[Lp(i)]),n}}function Rp(t,e){var i=Pp(t,e),T=Np(i),A={};E(i,function(t){var e=t.getData(),i=t.coordinateSystem,n=i.getBaseAxis(),o=Lp(t),a=T[kp(n)][o],r=a.offset,s=a.width,l=i.getOtherAxis(n),u=t.get("barMinHeight")||0;A[o]=A[o]||[],e.setLayout({bandWidth:a.bandWidth,offset:r,size:s});for(var h=e.mapDimension(l.dim),c=e.mapDimension(n.dim),d=dp(e,h),f=l.isHorizontal(),p=Gp(n,l,d),g=0,m=e.count();g<m;g++){var v,y,x,_,w,b=e.get(h,g),S=e.get(c,g),M=0<=b?"p":"n",I=p;if(d&&(A[o][S]||(A[o][S]={p:p,n:p}),I=A[o][S][M]),f)v=I,y=(w=i.dataToPoint([b,S]))[1]+r,x=w[0]-p,_=s,Math.abs(x)<u&&(x=(x<0?-1:1)*u),isNaN(x)||d&&(A[o][S][M]+=x);else v=(w=i.dataToPoint([S,b]))[0]+r,y=I,x=s,_=w[1]-p,Math.abs(_)<u&&(_=(_<=0?-1:1)*u),isNaN(_)||d&&(A[o][S][M]+=_);e.setItemLayout(g,{x:v,y:y,width:x,height:_})}},this)}var zp={seriesType:"bar",plan:mc(),reset:function(t){if(Bp(t)&&Vp(t)){var e=t.getData(),c=t.coordinateSystem,d=c.grid.getRect(),f=c.getBaseAxis(),p=c.getOtherAxis(f),g=e.mapDimension(p.dim),m=e.mapDimension(f.dim),v=p.isHorizontal(),y=v?0:1,x=Ep(Np([t]),f,t).width;return.5<x||(x=.5),{progress:function(t,e){var i,n=t.count,o=new Cp(2*n),a=new Cp(2*n),r=new Cp(n),s=[],l=[],u=0,h=0;for(;null!=(i=t.next());)l[y]=e.get(g,i),l[1-y]=e.get(m,i),s=c.dataToPoint(l,null,s),a[u]=v?d.x+d.width:s[0],o[u++]=s[0],a[u]=v?s[1]:d.y+d.height,o[u++]=s[1],r[h++]=i;e.setLayout({largePoints:o,largeDataIndices:r,largeBackgroundPoints:a,barWidth:x,valueAxisStart:Gp(f,p,!1),backgroundStart:v?d.x:d.y,valueAxisHorizontal:v})}}}}};function Bp(t){return t.coordinateSystem&&"cartesian2d"===t.coordinateSystem.type}function Vp(t){return t.pipelineContext&&t.pipelineContext.large}function Gp(t,e){return e.toGlobalCoord(e.dataToCoord("log"===e.type?1:0))}var Fp=Ap.prototype,Wp=Math.ceil,Hp=Math.floor,Zp=36e5,Up=864e5,Xp=Ap.extend({type:"time",getLabel:function(t){var e=this._stepLvl,i=new Date(t);return du(e[0],i,this.getSetting("useUTC"))},niceExtent:function(t){var e=this._extent;if(e[0]===e[1]&&(e[0]-=Up,e[1]+=Up),e[1]===-1/0&&e[0]===1/0){var i=new Date;e[1]=+new Date(i.getFullYear(),i.getMonth(),i.getDate()),e[0]=e[1]-Up}this.niceTicks(t.splitNumber,t.minInterval,t.maxInterval);var n=this._interval;t.fixMin||(e[0]=zl(Hp(e[0]/n)*n)),t.fixMax||(e[1]=zl(Wp(e[1]/n)*n))},niceTicks:function(t,e,i){t=t||10;var n=this._extent,o=n[1]-n[0],a=o/t;null!=e&&a<e&&(a=e),null!=i&&i<a&&(a=i);var r=Yp.length,s=function(t,e,i,n){for(;i<n;){var o=i+n>>>1;t[o][1]<e?i=1+o:n=o}return i}(Yp,a,0,r),l=Yp[Math.min(s,r-1)],u=l[1];"year"===l[0]&&(u*=Kl(o/u/t,!0));var h=this.getSetting("useUTC")?0:60*new Date(+n[0]||+n[1]).getTimezoneOffset()*1e3,c=[Math.round(Wp((n[0]-h)/u)*u+h),Math.round(Hp((n[1]-h)/u)*u+h)];Ip(c,n),this._stepLvl=l,this._interval=u,this._niceExtent=c},parse:function(t){return+Yl(t)}});E(["contain","normalize"],function(e){Xp.prototype[e]=function(t){return Fp[e].call(this,this.parse(t))}});var Yp=[["hh:mm:ss",1e3],["hh:mm:ss",5e3],["hh:mm:ss",1e4],["hh:mm:ss",15e3],["hh:mm:ss",3e4],["hh:mm\nMM-dd",6e4],["hh:mm\nMM-dd",3e5],["hh:mm\nMM-dd",6e5],["hh:mm\nMM-dd",9e5],["hh:mm\nMM-dd",18e5],["hh:mm\nMM-dd",Zp],["hh:mm\nMM-dd",72e5],["hh:mm\nMM-dd",6*Zp],["hh:mm\nMM-dd",432e5],["MM-dd\nyyyy",Up],["MM-dd\nyyyy",2*Up],["MM-dd\nyyyy",3*Up],["MM-dd\nyyyy",4*Up],["MM-dd\nyyyy",5*Up],["MM-dd\nyyyy",6*Up],["week",7*Up],["MM-dd\nyyyy",864e6],["week",14*Up],["week",21*Up],["month",31*Up],["week",42*Up],["month",62*Up],["week",70*Up],["quarter",95*Up],["month",31*Up*4],["month",13392e6],["half-year",16416e6],["month",31*Up*8],["month",26784e6],["year",380*Up]];Xp.create=function(t){return new Xp({useUTC:t.ecModel.get("useUTC")})};var jp=gp.prototype,qp=Ap.prototype,Kp=Gl,$p=zl,Jp=Math.floor,Qp=Math.ceil,tg=Math.pow,eg=Math.log,ig=gp.extend({type:"log",base:10,$constructor:function(){gp.apply(this,arguments),this._originalScale=new Ap},getTicks:function(t){var i=this._originalScale,n=this._extent,o=i.getExtent();return N(qp.getTicks.call(this,t),function(t){var e=zl(tg(this.base,t));return e=t===n[0]&&i.__fixMin?ng(e,o[0]):e,e=t===n[1]&&i.__fixMax?ng(e,o[1]):e},this)},getMinorTicks:qp.getMinorTicks,getLabel:qp.getLabel,scale:function(t){return t=jp.scale.call(this,t),tg(this.base,t)},setExtent:function(t,e){var i=this.base;t=eg(t)/eg(i),e=eg(e)/eg(i),qp.setExtent.call(this,t,e)},getExtent:function(){var t=this.base,e=jp.getExtent.call(this);e[0]=tg(t,e[0]),e[1]=tg(t,e[1]);var i=this._originalScale,n=i.getExtent();return i.__fixMin&&(e[0]=ng(e[0],n[0])),i.__fixMax&&(e[1]=ng(e[1],n[1])),e},unionExtent:function(t){this._originalScale.unionExtent(t);var e=this.base;t[0]=eg(t[0])/eg(e),t[1]=eg(t[1])/eg(e),jp.unionExtent.call(this,t)},unionExtentFromData:function(t,e){this.unionExtent(t.getApproximateExtent(e))},niceTicks:function(t){t=t||10;var e=this._extent,i=e[1]-e[0];if(!(i==1/0||i<=0)){var n=jl(i);for(t/i*n<=.5&&(n*=10);!isNaN(n)&&Math.abs(n)<1&&0<Math.abs(n);)n*=10;var o=[zl(Qp(e[0]/n)*n),zl(Jp(e[1]/n)*n)];this._interval=n,this._niceExtent=o}},niceExtent:function(t){qp.niceExtent.call(this,t);var e=this._originalScale;e.__fixMin=t.fixMin,e.__fixMax=t.fixMax}});function ng(t,e){return $p(t,Kp(e))}function og(t,e){var i,n,o,a=t.type,r=e.getMin(),s=e.getMax(),l=null!=r,u=null!=s,h=t.getExtent();"ordinal"===a?i=e.getCategories().length:(O(n=e.get("boundaryGap"))||(n=[n||0,n||0]),"boolean"==typeof n[0]&&(n=[0,0]),n[0]=Rl(n[0],1),n[1]=Rl(n[1],1),o=h[1]-h[0]||Math.abs(h[0])),null==r&&(r="ordinal"===a?i?0:NaN:h[0]-n[0]*o),null==s&&(s="ordinal"===a?i?i-1:NaN:h[1]+n[1]*o),"dataMin"===r?r=h[0]:"function"==typeof r&&(r=r({min:h[0],max:h[1]})),"dataMax"===s?s=h[1]:"function"==typeof s&&(s=s({min:h[0],max:h[1]})),null!=r&&isFinite(r)||(r=NaN),null!=s&&isFinite(s)||(s=NaN),t.setBlank(F(r)||F(s)||"ordinal"===a&&!t.getOrdinalMeta().categories.length),e.getNeedCrossZero()&&(0<r&&0<s&&!l&&(r=0),r<0&&s<0&&!u&&(s=0));var c=e.ecModel;if(c&&"time"===a){var d,f=Pp("bar",c);if(E(f,function(t){d|=t.getBaseAxis()===e.axis}),d){var p=Np(f),g=function(t,e,i,n){var o=i.axis.getExtent(),a=o[1]-o[0],r=Ep(n,i.axis);if(void 0===r)return{min:t,max:e};var s=1/0;E(r,function(t){s=Math.min(t.offset,s)});var l=-1/0;E(r,function(t){l=Math.max(t.offset+t.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,h=e-t,c=h/(1-(s+l)/a)-h;return{min:t-=s/u*c,max:e+=l/u*c}}(r,s,e,p);r=g.min,s=g.max}}return[r,s]}function ag(t,e){var i=og(t,e),n=null!=e.getMin(),o=null!=e.getMax(),a=e.get("splitNumber");"log"===t.type&&(t.base=e.get("logBase"));var r=t.type;t.setExtent(i[0],i[1]),t.niceExtent({splitNumber:a,fixMin:n,fixMax:o,minInterval:"interval"===r||"time"===r?e.get("minInterval"):null,maxInterval:"interval"===r||"time"===r?e.get("maxInterval"):null});var s=e.get("interval");null!=s&&t.setInterval&&t.setInterval(s)}function rg(t,e){if(e=e||t.get("type"))switch(e){case"category":return new wp(t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),[1/0,-1/0]);case"value":return new Ap;default:return(gp.getClass(e)||Ap).create(t)}}function sg(i){var e,n=i.getLabelModel().get("formatter"),o="category"===i.type?i.scale.getExtent()[0]:null;return"string"==typeof n?(e=n,n=function(t){return t=i.scale.getLabel(t),e.replace("{value}",null!=t?t:"")}):"function"==typeof n?function(t,e){return null!=o&&(e=t-o),n(lg(i,t),e)}:function(t){return i.scale.getLabel(t)}}function lg(t,e){return"category"===t.type?t.scale.getLabel(e):e}function ug(t){var e=t.get("interval");return null==e?"auto":e}function hg(t){return"category"===t.type&&0===ug(t.getLabelModel())}E(["contain","normalize"],function(e){ig.prototype[e]=function(t){return t=eg(t)/eg(this.base),jp[e].call(this,t)}}),ig.create=function(){return new ig};var cg={getMin:function(t){var e=this.option,i=t||null==e.rangeStart?e.min:e.rangeStart;return this.axis&&null!=i&&"dataMin"!==i&&"function"!=typeof i&&!F(i)&&(i=this.axis.scale.parse(i)),i},getMax:function(t){var e=this.option,i=t||null==e.rangeEnd?e.max:e.rangeEnd;return this.axis&&null!=i&&"dataMax"!==i&&"function"!=typeof i&&!F(i)&&(i=this.axis.scale.parse(i)),i},getNeedCrossZero:function(){var t=this.option;return null==t.rangeStart&&null==t.rangeEnd&&!t.scale},getCoordSysModel:et,setRange:function(t,e){this.option.rangeStart=t,this.option.rangeEnd=e},resetRange:function(){this.option.rangeStart=this.option.rangeEnd=null}},dg=Cs({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var i=e.cx,n=e.cy,o=e.width/2,a=e.height/2;t.moveTo(i,n-a),t.lineTo(i+o,n+a),t.lineTo(i-o,n+a),t.closePath()}}),fg=Cs({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var i=e.cx,n=e.cy,o=e.width/2,a=e.height/2;t.moveTo(i,n-a),t.lineTo(i+o,n),t.lineTo(i,n+a),t.lineTo(i-o,n),t.closePath()}}),pg=Cs({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var i=e.x,n=e.y,o=e.width/5*3,a=Math.max(o,e.height),r=o/2,s=r*r/(a-r),l=n-a+r+s,u=Math.asin(s/r),h=Math.cos(u)*r,c=Math.sin(u),d=Math.cos(u),f=.6*r,p=.7*r;t.moveTo(i-h,l+s),t.arc(i,l,r,Math.PI-u,2*Math.PI+u),t.bezierCurveTo(i+h-c*f,l+s+d*f,i,n-p,i,n),t.bezierCurveTo(i,n-p,i-h+c*f,l+s+d*f,i-h,l+s),t.closePath()}}),gg=Cs({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var i=e.height,n=e.width,o=e.x,a=e.y,r=n/3*2;t.moveTo(o,a),t.lineTo(o+r,a+i),t.lineTo(o,a+i/4*3),t.lineTo(o-r,a+i),t.lineTo(o,a),t.closePath()}}),mg={line:function(t,e,i,n,o){o.x1=t,o.y1=e+n/2,o.x2=t+i,o.y2=e+n/2},rect:function(t,e,i,n,o){o.x=t,o.y=e,o.width=i,o.height=n},roundRect:function(t,e,i,n,o){o.x=t,o.y=e,o.width=i,o.height=n,o.r=Math.min(i,n)/4},square:function(t,e,i,n,o){var a=Math.min(i,n);o.x=t,o.y=e,o.width=a,o.height=a},circle:function(t,e,i,n,o){o.cx=t+i/2,o.cy=e+n/2,o.r=Math.min(i,n)/2},diamond:function(t,e,i,n,o){o.cx=t+i/2,o.cy=e+n/2,o.width=i,o.height=n},pin:function(t,e,i,n,o){o.x=t+i/2,o.y=e+n/2,o.width=i,o.height=n},arrow:function(t,e,i,n,o){o.x=t+i/2,o.y=e+n/2,o.width=i,o.height=n},triangle:function(t,e,i,n,o){o.cx=t+i/2,o.cy=e+n/2,o.width=i,o.height=n}},vg={};E({line:ls,rect:rs,roundRect:rs,square:rs,circle:Yr,diamond:fg,pin:pg,arrow:gg,triangle:dg},function(t,e){vg[e]=new t});var yg=Cs({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(t,e,i){var n=yn(t,e,i),o=this.shape;return o&&"pin"===o.symbolType&&"inside"===e.textPosition&&(n.y=i.y+.4*i.height),n},buildPath:function(t,e,i){var n=e.symbolType;if("none"!==n){var o=vg[n];o=o||vg[n="rect"],mg[n](e.x,e.y,e.width,e.height,o.shape),o.buildPath(t,o.shape,i)}}});function xg(t,e){if("image"!==this.type){var i=this.style,n=this.shape;n&&"line"===n.symbolType?i.stroke=t:this.__isEmptyBrush?(i.stroke=t,i.fill=e||"#fff"):(i.fill&&(i.fill=t),i.stroke&&(i.stroke=t)),this.dirty(!1)}}function _g(t,e,i,n,o,a,r){var s,l=0===t.indexOf("empty");return l&&(t=t.substr(5,1).toLowerCase()+t.substr(6)),(s=0===t.indexOf("image://")?Ns(t.slice(8),new Di(e,i,n,o),r?"center":"cover"):0===t.indexOf("path://")?Ps(t.slice(7),{},new Di(e,i,n,o),r?"center":"cover"):new yg({shape:{symbolType:t,x:e,y:i,width:n,height:o}})).__isEmptyBrush=l,s.setColor=xg,s.setColor(a),s}var wg={isDimensionStacked:dp,enableDataStack:cp,getStackedDimension:fp};var bg=(Object.freeze||Object)({createList:function(t){return pp(t.getSource(),t)},getLayoutRect:wu,dataStack:wg,createScale:function(t,e){var i=e;Cl.isInstance(e)||b(i=new Cl(e),cg);var n=rg(i);return n.setExtent(t[0],t[1]),ag(n,i),n},mixinAxisModelCommonMethods:function(t){b(t,cg)},completeDimensions:ap,createDimensions:sp,createSymbol:_g}),Sg=1e-8;function Mg(t,e){return Math.abs(t-e)<Sg}function Ig(t,e,i){var n=0,o=t[0];if(!o)return!1;for(var a=1;a<t.length;a++){var r=t[a];n+=pr(o[0],o[1],r[0],r[1],e,i),o=r}var s=t[0];return Mg(o[0],s[0])&&Mg(o[1],s[1])||(n+=pr(o[0],o[1],s[0],s[1],e,i)),0!==n}function Tg(t,e,i){if(this.name=t,this.geometries=e,i)i=[i[0],i[1]];else{var n=this.getBoundingRect();i=[n.x+n.width/2,n.y+n.height/2]}this.center=i}function Ag(t,e,i){for(var n=[],o=e[0],a=e[1],r=0;r<t.length;r+=2){var s=t.charCodeAt(r)-64,l=t.charCodeAt(r+1)-64;s=s>>1^-(1&s),l=l>>1^-(1&l),o=s+=o,a=l+=a,n.push([s/i,l/i])}return n}Tg.prototype={constructor:Tg,properties:null,getBoundingRect:function(){var t=this._rect;if(t)return t;for(var e=Number.MAX_VALUE,i=[e,e],n=[-e,-e],o=[],a=[],r=this.geometries,s=0;s<r.length;s++){if("polygon"===r[s].type)Wa(r[s].exterior,o,a),St(i,i,o),Mt(n,n,a)}return 0===s&&(i[0]=i[1]=n[0]=n[1]=0),this._rect=new Di(i[0],i[1],n[0]-i[0],n[1]-i[1])},contain:function(t){var e=this.getBoundingRect(),i=this.geometries;if(!e.contain(t[0],t[1]))return!1;t:for(var n=0,o=i.length;n<o;n++)if("polygon"===i[n].type){var a=i[n].exterior,r=i[n].interiors;if(Ig(a,t[0],t[1])){for(var s=0;s<(r?r.length:0);s++)if(Ig(r[s]))continue t;return!0}}return!1},transformTo:function(t,e,i,n){var o=this.getBoundingRect(),a=o.width/o.height;i?n=n||i/a:i=a*n;for(var r=new Di(t,e,i,n),s=o.calculateTransform(r),l=this.geometries,u=0;u<l.length;u++)if("polygon"===l[u].type){for(var h=l[u].exterior,c=l[u].interiors,d=0;d<h.length;d++)bt(h[d],h[d],s);for(var f=0;f<(c?c.length:0);f++)for(d=0;d<c[f].length;d++)bt(c[f][d],c[f][d],s)}(o=this._rect).copy(r),this.center=[o.x+o.width/2,o.y+o.height/2]},cloneShallow:function(t){null==t&&(t=this.name);var e=new Tg(t,this.geometries,this.center);return e._rect=this._rect,e.transformTo=null,e}};function Dg(t){return function(t){if(!t.UTF8Encoding)return;var e=t.UTF8Scale;null==e&&(e=1024);for(var i=t.features,n=0;n<i.length;n++)for(var o=i[n].geometry,a=o.coordinates,r=o.encodeOffsets,s=0;s<a.length;s++){var l=a[s];if("Polygon"===o.type)a[s]=Ag(l,r[s],e);else if("MultiPolygon"===o.type)for(var u=0;u<l.length;u++){var h=l[u];l[u]=Ag(h,r[s][u],e)}}t.UTF8Encoding=!1}(t),N(M(t.features,function(t){return t.geometry&&t.properties&&0<t.geometry.coordinates.length}),function(t){var e=t.properties,i=t.geometry,n=i.coordinates,o=[];"Polygon"===i.type&&o.push({type:"polygon",exterior:n[0],interiors:n.slice(1)}),"MultiPolygon"===i.type&&E(n,function(t){t[0]&&o.push({type:"polygon",exterior:t[0],interiors:t.slice(1)})});var a=new Tg(e.name,o,e.cp);return a.properties=e,a})}var Cg=jo();function Lg(t){return"category"===t.type?function(t){var e=t.getLabelModel(),i=Pg(t,e);return!e.get("show")||t.scale.isBlank()?{labels:[],labelCategoryInterval:i.labelCategoryInterval}:i}(t):function(i){var t=i.scale.getTicks(),n=sg(i);return{labels:N(t,function(t,e){return{formattedLabel:n(t,e),rawLabel:i.scale.getLabel(t),tickValue:t}})}}(t)}function kg(t,e){return"category"===t.type?function(t,e){var i,n,o=Ng(t,"ticks"),a=ug(e),r=Og(o,a);if(r)return r;e.get("show")&&!t.scale.isBlank()||(i=[]);if(C(a))i=zg(t,a,!0);else if("auto"===a){var s=Pg(t,t.getLabelModel());n=s.labelCategoryInterval,i=N(s.labels,function(t){return t.tickValue})}else i=Rg(t,n=a,!0);return Eg(o,a,{ticks:i,tickCategoryInterval:n})}(t,e):{ticks:t.scale.getTicks()}}function Pg(t,e){var i,n=Ng(t,"labels"),o=ug(e),a=Og(n,o);return a||Eg(n,o,{labels:C(o)?zg(t,o):Rg(t,i="auto"===o?function(t){var e=Cg(t).autoInterval;return null!=e?e:Cg(t).autoInterval=t.calculateCategoryInterval()}(t):o),labelCategoryInterval:i})}function Ng(t,e){return Cg(t)[e]||(Cg(t)[e]=[])}function Og(t,e){for(var i=0;i<t.length;i++)if(t[i].key===e)return t[i].value}function Eg(t,e,i){return t.push({key:e,value:i}),i}function Rg(t,e,i){var n=sg(t),o=t.scale,a=o.getExtent(),r=t.getLabelModel(),s=[],l=Math.max((e||0)+1,1),u=a[0],h=o.count();0!==u&&1<l&&2<h/l&&(u=Math.round(Math.ceil(u/l)*l));var c=hg(t),d=r.get("showMinLabel")||c,f=r.get("showMaxLabel")||c;d&&u!==a[0]&&g(a[0]);for(var p=u;p<=a[1];p+=l)g(p);function g(t){s.push(i?t:{formattedLabel:n(t),rawLabel:o.getLabel(t),tickValue:t})}return f&&p-l!==a[1]&&g(a[1]),s}function zg(t,i,n){var o=t.scale,a=sg(t),r=[];return E(o.getTicks(),function(t){var e=o.getLabel(t);i(t,e)&&r.push(n?t:{formattedLabel:a(t),rawLabel:e,tickValue:t})}),r}var Bg=[0,1],Vg=function(t,e,i){this.dim=t,this.scale=e,this._extent=i||[0,0],this.inverse=!1,this.onBand=!1};function Gg(t,e){var i=(t[1]-t[0])/e/2;t[0]+=i,t[1]-=i}Vg.prototype={constructor:Vg,contain:function(t){var e=this._extent,i=Math.min(e[0],e[1]),n=Math.max(e[0],e[1]);return i<=t&&t<=n},containData:function(t){return this.scale.contain(t)},getExtent:function(){return this._extent.slice()},getPixelPrecision:function(t){return Fl(t||this.scale.getExtent(),this._extent)},setExtent:function(t,e){var i=this._extent;i[0]=t,i[1]=e},dataToCoord:function(t,e){var i=this._extent,n=this.scale;return t=n.normalize(t),this.onBand&&"ordinal"===n.type&&Gg(i=i.slice(),n.count()),El(t,Bg,i,e)},coordToData:function(t,e){var i=this._extent,n=this.scale;this.onBand&&"ordinal"===n.type&&Gg(i=i.slice(),n.count());var o=El(t,i,Bg,e);return this.scale.scale(o)},pointToData:function(t,e){},getTicksCoords:function(t){var e=(t=t||{}).tickModel||this.getTickModel(),i=N(kg(this,e).ticks,function(t){return{coord:this.dataToCoord(t),tickValue:t}},this);return function(t,e,i,n){var o=e.length;if(!t.onBand||i||!o)return;var a,r,s=t.getExtent();if(1===o)e[0].coord=s[0],a=e[1]={coord:s[0]};else{var l=e[o-1].tickValue-e[0].tickValue,u=(e[o-1].coord-e[0].coord)/l;E(e,function(t){t.coord-=u/2});var h=t.scale.getExtent();r=1+h[1]-e[o-1].tickValue,a={coord:e[o-1].coord+u*r},e.push(a)}var c=s[0]>s[1];d(e[0].coord,s[0])&&(n?e[0].coord=s[0]:e.shift());n&&d(s[0],e[0].coord)&&e.unshift({coord:s[0]});d(s[1],a.coord)&&(n?a.coord=s[1]:e.pop());n&&d(a.coord,s[1])&&e.push({coord:s[1]});function d(t,e){return t=zl(t),e=zl(e),c?e<t:t<e}}(this,i,e.get("alignWithLabel"),t.clamp),i},getMinorTicksCoords:function(){if("ordinal"===this.scale.type)return[];var t=this.model.getModel("minorTick").get("splitNumber");return 0<t&&t<100||(t=5),N(this.scale.getMinorTicks(t),function(t){return N(t,function(t){return{coord:this.dataToCoord(t),tickValue:t}},this)},this)},getViewLabels:function(){return Lg(this).labels},getLabelModel:function(){return this.model.getModel("axisLabel")},getTickModel:function(){return this.model.getModel("axisTick")},getBandWidth:function(){var t=this._extent,e=this.scale.getExtent(),i=e[1]-e[0]+(this.onBand?1:0);0===i&&(i=1);var n=Math.abs(t[1]-t[0]);return Math.abs(n)/i},isHorizontal:null,getRotate:null,calculateCategoryInterval:function(){return function(t){var e=function(t){var e=t.getLabelModel();return{axisRotate:t.getRotate?t.getRotate():t.isHorizontal&&!t.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}(t),i=sg(t),n=(e.axisRotate-e.labelRotate)/180*Math.PI,o=t.scale,a=o.getExtent(),r=o.count();if(a[1]-a[0]<1)return 0;var s=1;40<r&&(s=Math.max(1,Math.floor(r/40)));for(var l=a[0],u=t.dataToCoord(l+1)-t.dataToCoord(l),h=Math.abs(u*Math.cos(n)),c=Math.abs(u*Math.sin(n)),d=0,f=0;l<=a[1];l+=s){var p,g,m=gn(i(l),e.font,"center","top");p=1.3*m.width,g=1.3*m.height,d=Math.max(d,p,7),f=Math.max(f,g,7)}var v=d/h,y=f/c;isNaN(v)&&(v=1/0),isNaN(y)&&(y=1/0);var x=Math.max(0,Math.floor(Math.min(v,y))),_=Cg(t.model),w=t.getExtent(),b=_.lastAutoInterval,S=_.lastTickCount;return null!=b&&null!=S&&Math.abs(b-x)<=1&&Math.abs(S-r)<=1&&x<b&&_.axisExtend0===w[0]&&_.axisExtend1===w[1]?x=b:(_.lastTickCount=r,_.lastAutoInterval=x,_.axisExtend0=w[0],_.axisExtend1=w[1]),x}(this)}};var Fg=Dg,Wg={};E(["map","each","filter","indexOf","inherits","reduce","filter","bind","curry","isArray","isString","isObject","isFunction","extend","defaults","clone","merge"],function(t){Wg[t]=it[t]});var Hg={};function Zg(t,e){var i=t.mapDimension("defaultedLabel",!0),n=i.length;if(1===n)return Wh(t,e,i[0]);if(n){for(var o=[],a=0;a<i.length;a++){var r=Wh(t,e,i[a]);o.push(r)}return o.join(" ")}}function Ug(t,e,i){Ci.call(this),this.updateData(t,e,i)}E(["extendShape","extendPath","makePath","makeImage","mergePath","resizePath","createIcon","setHoverStyle","setLabelStyle","setTextStyle","setText","getFont","updateProps","initProps","getTransform","clipPointsByRect","clipRectByRect","registerShape","getShapeClass","Group","Image","Text","Circle","Sector","Ring","Polygon","Polyline","Rect","Line","BezierCurve","Arc","IncrementalDisplayable","CompoundPath","LinearGradient","RadialGradient","BoundingRect"],function(t){Hg[t]=bl[t]}),rc.extend({type:"series.line",dependencies:["grid","polar"],getInitialData:function(t,e){return pp(this.getSource(),this,{useEncodeDefaulter:!0})},defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,clip:!0,label:{position:"top"},lineStyle:{width:2,type:"solid"},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0}});var Xg=Ug.prototype,Yg=Ug.getSymbolSize=function(t,e){var i=t.getItemVisual(e,"symbolSize");return i instanceof Array?i.slice():[+i,+i]};function jg(t){return[t[0]/2,t[1]/2]}function qg(t,e){this.parent.drift(t,e)}Xg._createSymbol=function(t,e,i,n,o){this.removeAll();var a=_g(t,-1,-1,2,2,e.getItemVisual(i,"color"),o);a.attr({z2:100,culling:!0,scale:jg(n)}),a.drift=qg,this._symbolType=t,this.add(a)},Xg.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(t)},Xg.getSymbolPath=function(){return this.childAt(0)},Xg.getScale=function(){return this.childAt(0).scale},Xg.highlight=function(){this.childAt(0).trigger("emphasis")},Xg.downplay=function(){this.childAt(0).trigger("normal")},Xg.setZ=function(t,e){var i=this.childAt(0);i.zlevel=t,i.z=e},Xg.setDraggable=function(t){var e=this.childAt(0);e.draggable=t,e.cursor=t?"move":e.cursor},Xg.updateData=function(t,e,i){this.silent=!1;var n=t.getItemVisual(e,"symbol")||"circle",o=t.hostModel,a=Yg(t,e),r=n!==this._symbolType;if(r){var s=t.getItemVisual(e,"symbolKeepAspect");this._createSymbol(n,t,e,a,s)}else{(l=this.childAt(0)).silent=!1,cl(l,{scale:jg(a)},o,e)}if(this._updateCommon(t,e,a,i),r){var l=this.childAt(0),u=i&&i.fadeIn,h={scale:l.scale.slice()};u&&(h.style={opacity:l.style.opacity}),l.scale=[0,0],u&&(l.style.opacity=0),dl(l,h,o,e)}this._seriesModel=o};var Kg=["itemStyle"],$g=["emphasis","itemStyle"],Jg=["label"],Qg=["emphasis","label"];function tm(t,e){if(!this.incremental&&!this.useHoverLayer)if("emphasis"===e){var i=this.__symbolOriginalScale,n=i[1]/i[0],o={scale:[Math.max(1.1*i[0],i[0]+3),Math.max(1.1*i[1],i[1]+3*n)]};this.animateTo(o,400,"elasticOut")}else"normal"===e&&this.animateTo({scale:this.__symbolOriginalScale},400,"elasticOut")}function em(t){this.group=new Ci,this._symbolCtor=t||Ug}Xg._updateCommon=function(i,t,e,n){var o=this.childAt(0),a=i.hostModel,r=i.getItemVisual(t,"color");"image"!==o.type?o.useStyle({strokeNoScale:!0}):o.setStyle({opacity:null,shadowBlur:null,shadowOffsetX:null,shadowOffsetY:null,shadowColor:null});var s=n&&n.itemStyle,l=n&&n.hoverItemStyle,u=n&&n.symbolRotate,h=n&&n.symbolOffset,c=n&&n.labelModel,d=n&&n.hoverLabelModel,f=n&&n.hoverAnimation,p=n&&n.cursorStyle;if(!n||i.hasItemOption){var g=n&&n.itemModel?n.itemModel:i.getItemModel(t);s=g.getModel(Kg).getItemStyle(["color"]),l=g.getModel($g).getItemStyle(),u=g.getShallow("symbolRotate"),h=g.getShallow("symbolOffset"),c=g.getModel(Jg),d=g.getModel(Qg),f=g.getShallow("hoverAnimation"),p=g.getShallow("cursor")}else l=k({},l);var m=o.style;o.attr("rotation",(u||0)*Math.PI/180||0),h&&o.attr("position",[Rl(h[0],e[0]),Rl(h[1],e[1])]),p&&o.attr("cursor",p),o.setColor(r,n&&n.symbolInnerColor),o.setStyle(s);var v=i.getItemVisual(t,"opacity");null!=v&&(m.opacity=v);var y=i.getItemVisual(t,"liftZ"),x=o.__z2Origin;null!=y?null==x&&(o.__z2Origin=o.z2,o.z2+=y):null!=x&&(o.z2=x,o.__z2Origin=null);var _=n&&n.useNameLabel;el(m,l,c,d,{labelFetcher:a,labelDataIndex:t,defaultText:function(t,e){return _?i.getName(t):Zg(i,t)},isRectText:!0,autoColor:r}),o.__symbolOriginalScale=jg(e),o.hoverStyle=l,o.highDownOnUpdate=f&&a.isAnimationEnabled()?tm:null,$s(o)},Xg.fadeOut=function(t,e){var i=this.childAt(0);this.silent=i.silent=!0,e&&e.keepLabel||(i.style.text=null),cl(i,{style:{opacity:0},scale:[0,0]},this._seriesModel,this.dataIndex,t)},w(Ug,Ci);var im=em.prototype;function nm(t,e,i,n){return e&&!isNaN(e[0])&&!isNaN(e[1])&&!(n.isIgnore&&n.isIgnore(i))&&!(n.clipShape&&!n.clipShape.contain(e[0],e[1]))&&"none"!==t.getItemVisual(i,"symbol")}function om(t){return null==t||z(t)||(t={isIgnore:t}),t||{}}function am(t){var e=t.hostModel;return{itemStyle:e.getModel("itemStyle").getItemStyle(["color"]),hoverItemStyle:e.getModel("emphasis.itemStyle").getItemStyle(),symbolRotate:e.get("symbolRotate"),symbolOffset:e.get("symbolOffset"),hoverAnimation:e.get("hoverAnimation"),labelModel:e.getModel("label"),hoverLabelModel:e.getModel("emphasis.label"),cursorStyle:e.get("cursor")}}function rm(t,e,i){var n,o=t.getBaseAxis(),a=t.getOtherAxis(o),r=function(t,e){var i=0,n=t.scale.getExtent();"start"===e?i=n[0]:"end"===e?i=n[1]:0<n[0]?i=n[0]:n[1]<0&&(i=n[1]);return i}(a,i),s=o.dim,l=a.dim,u=e.mapDimension(l),h=e.mapDimension(s),c="x"===l||"radius"===l?1:0,d=N(t.dimensions,function(t){return e.mapDimension(t)}),f=e.getCalculationInfo("stackResultDimension");return(n|=dp(e,d[0]))&&(d[0]=f),(n|=dp(e,d[1]))&&(d[1]=f),{dataDimsForPoint:d,valueStart:r,valueAxisDim:l,baseAxisDim:s,stacked:!!n,valueDim:u,baseDim:h,baseDataOffset:c,stackedOverDimension:e.getCalculationInfo("stackedOverDimension")}}function sm(t,e,i,n){var o=NaN;t.stacked&&(o=i.get(i.getCalculationInfo("stackedOverDimension"),n)),isNaN(o)&&(o=t.valueStart);var a=t.baseDataOffset,r=[];return r[a]=i.get(t.baseDim,n),r[1-a]=o,e.dataToPoint(r)}im.updateData=function(o,a){a=om(a);var r=this.group,s=o.hostModel,l=this._data,u=this._symbolCtor,h=am(o);l||r.removeAll(),o.diff(l).add(function(t){var e=o.getItemLayout(t);if(nm(o,e,t,a)){var i=new u(o,t,h);i.attr("position",e),o.setItemGraphicEl(t,i),r.add(i)}}).update(function(t,e){var i=l.getItemGraphicEl(e),n=o.getItemLayout(t);nm(o,n,t,a)?(i?(i.updateData(o,t,h),cl(i,{position:n},s)):(i=new u(o,t)).attr("position",n),r.add(i),o.setItemGraphicEl(t,i)):r.remove(i)}).remove(function(t){var e=l.getItemGraphicEl(t);e&&e.fadeOut(function(){r.remove(e)})}).execute(),this._data=o},im.isPersistent=function(){return!0},im.updateLayout=function(){var n=this._data;n&&n.eachItemGraphicEl(function(t,e){var i=n.getItemLayout(e);t.attr("position",i)})},im.incrementalPrepareUpdate=function(t){this._seriesScope=am(t),this._data=null,this.group.removeAll()},im.incrementalUpdate=function(t,e,i){function n(t){t.isGroup||(t.incremental=t.useHoverLayer=!0)}i=om(i);for(var o=t.start;o<t.end;o++){var a=e.getItemLayout(o);if(nm(e,a,o,i)){var r=new this._symbolCtor(e,o,this._seriesScope);r.traverse(n),r.attr("position",a),this.group.add(r),e.setItemGraphicEl(o,r)}}},im.remove=function(t){var e=this.group,i=this._data;i&&t?i.eachItemGraphicEl(function(t){t.fadeOut(function(){e.remove(t)})}):e.removeAll()};var lm=St,um=Mt,hm=ut,cm=at,dm=[],fm=[],pm=[];function gm(t){return isNaN(t[0])||isNaN(t[1])}function mm(t,e,i,n,o,a,r,s,l,u){return"none"!==u&&u?function(t,e,i,n,o,a,r,s,l,u,h){for(var c=0,d=i,f=0;f<n;f++){var p=e[d];if(o<=d||d<0)break;if(gm(p)){if(h){d+=a;continue}break}if(d===i)t[0<a?"moveTo":"lineTo"](p[0],p[1]);else if(0<l){var g=e[c],m="y"===u?1:0,v=(p[m]-g[m])*l;cm(fm,g),fm[m]=g[m]+v,cm(pm,p),pm[m]=p[m]-v,t.bezierCurveTo(fm[0],fm[1],pm[0],pm[1],p[0],p[1])}else t.lineTo(p[0],p[1]);c=d,d+=a}return f}.apply(this,arguments):function(t,e,i,n,o,a,r,s,l,u,h){for(var c=0,d=i,f=0;f<n;f++){var p=e[d];if(o<=d||d<0)break;if(gm(p)){if(h){d+=a;continue}break}if(d===i)t[0<a?"moveTo":"lineTo"](p[0],p[1]),cm(fm,p);else if(0<l){var g=d+a,m=e[g];if(h)for(;m&&gm(e[g]);)m=e[g+=a];var v=.5,y=e[c];if(!(m=e[g])||gm(m))cm(pm,p);else{var x,_;if(gm(m)&&!h&&(m=p),ht(dm,m,y),"x"===u||"y"===u){var w="x"===u?0:1;x=Math.abs(p[w]-y[w]),_=Math.abs(p[w]-m[w])}else x=yt(p,y),_=yt(p,m);hm(pm,p,dm,-l*(1-(v=_/(_+x))))}lm(fm,fm,s),um(fm,fm,r),lm(pm,pm,s),um(pm,pm,r),t.bezierCurveTo(fm[0],fm[1],pm[0],pm[1],p[0],p[1]),hm(fm,p,dm,l*v)}else t.lineTo(p[0],p[1]);c=d,d+=a}return f}.apply(this,arguments)}function vm(t,e){var i=[1/0,1/0],n=[-1/0,-1/0];if(e)for(var o=0;o<t.length;o++){var a=t[o];a[0]<i[0]&&(i[0]=a[0]),a[1]<i[1]&&(i[1]=a[1]),a[0]>n[0]&&(n[0]=a[0]),a[1]>n[1]&&(n[1]=a[1])}return{min:e?i:n,max:e?n:i}}var ym=Ar.extend({type:"ec-polyline",shape:{points:[],smooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},style:{fill:null,stroke:"#000"},brush:Xr(Ar.prototype.brush),buildPath:function(t,e){var i=e.points,n=0,o=i.length,a=vm(i,e.smoothConstraint);if(e.connectNulls){for(;0<o&&gm(i[o-1]);o--);for(;n<o&&gm(i[n]);n++);}for(;n<o;)n+=mm(t,i,n,o,o,1,a.min,a.max,e.smooth,e.smoothMonotone,e.connectNulls)+1}}),xm=Ar.extend({type:"ec-polygon",shape:{points:[],stackedOnPoints:[],smooth:0,stackedOnSmooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},brush:Xr(Ar.prototype.brush),buildPath:function(t,e){var i=e.points,n=e.stackedOnPoints,o=0,a=i.length,r=e.smoothMonotone,s=vm(i,e.smoothConstraint),l=vm(n,e.smoothConstraint);if(e.connectNulls){for(;0<a&&gm(i[a-1]);a--);for(;o<a&&gm(i[o]);o++);}for(;o<a;){var u=mm(t,i,o,a,a,1,s.min,s.max,e.smooth,r,e.connectNulls);mm(t,n,o+u-1,u,a,-1,l.min,l.max,e.stackedOnSmooth,r,e.connectNulls),o+=u+1,t.closePath()}}});function _m(t,e,i){var n=t.getArea(),o=t.getBaseAxis().isHorizontal(),a=n.x,r=n.y,s=n.width,l=n.height,u=i.get("lineStyle.width")||2,h=new rs({shape:{x:a-=u/2,y:r-=u/2,width:s+=u,height:l+=u}});return e&&(h.shape[o?"width":"height"]=0,dl(h,{shape:{width:s,height:l}},i)),h}function wm(t,e,i){var n=t.getArea(),o=new qr({shape:{cx:zl(t.cx,1),cy:zl(t.cy,1),r0:zl(n.r0,1),r:zl(n.r,1),startAngle:n.startAngle,endAngle:n.endAngle,clockwise:n.clockwise}});return e&&(o.shape.endAngle=n.startAngle,dl(o,{shape:{endAngle:n.endAngle}},i)),o}function bm(t,e,i){return t?"polar"===t.type?wm(t,e,i):"cartesian2d"===t.type?_m(t,e,i):null:null}function Sm(t,e){if(t.length===e.length){for(var i=0;i<t.length;i++){var n=t[i],o=e[i];if(n[0]!==o[0]||n[1]!==o[1])return}return!0}}function Mm(t){return"number"==typeof t?t:t?.5:0}function Im(t,e,i){for(var n=e.getBaseAxis(),o="x"===n.dim||"radius"===n.dim?0:1,a=[],r=0;r<t.length-1;r++){var s=t[r+1],l=t[r];a.push(l);var u=[];switch(i){case"end":u[o]=s[o],u[1-o]=l[1-o],a.push(u);break;case"middle":var h=(l[o]+s[o])/2,c=[];u[o]=c[o]=h,u[1-o]=l[1-o],c[1-o]=s[1-o],a.push(u),a.push(c);break;default:u[o]=l[o],u[1-o]=s[1-o],a.push(u)}}return t[r]&&a.push(t[r]),a}function Tm(t,e,i){var n=t.get("showAllSymbol"),o="auto"===n;if(!n||o){var a=i.getAxesByScale("ordinal")[0];if(a&&(!o||!function(t,e){var i=t.getExtent(),n=Math.abs(i[1]-i[0])/t.scale.count();isNaN(n)&&(n=0);for(var o=e.count(),a=Math.max(1,Math.round(o/5)),r=0;r<o;r+=a)if(1.5*Ug.getSymbolSize(e,r)[t.isHorizontal()?1:0]>n)return!1;return!0}(a,e))){var r=e.mapDimension(a.dim),s={};return E(a.getViewLabels(),function(t){s[t.tickValue]=1}),function(t){return!s.hasOwnProperty(e.get(r,t))}}}}function Am(t,e,i){if("cartesian2d"!==t.type)return wm(t,e,i);var n=t.getBaseAxis().isHorizontal(),o=_m(t,e,i);if(!i.get("clip",!0)){var a=o.shape,r=Math.max(a.width,a.height);n?(a.y-=r,a.height+=2*r):(a.x-=r,a.width+=2*r)}return o}xc.extend({type:"line",init:function(){var t=new Ci,e=new em;this.group.add(e.group),this._symbolDraw=e,this._lineGroup=t},render:function(t,e,i){var n=t.coordinateSystem,o=this.group,a=t.getData(),r=t.getModel("lineStyle"),s=t.getModel("areaStyle"),l=a.mapArray(a.getItemLayout),u="polar"===n.type,h=this._coordSys,c=this._symbolDraw,d=this._polyline,f=this._polygon,p=this._lineGroup,g=t.get("animation"),m=!s.isEmpty(),v=s.get("origin"),y=function(t,e,i){if(!i.valueDim)return[];for(var n=[],o=0,a=e.count();o<a;o++)n.push(sm(i,t,e,o));return n}(n,a,rm(n,a,v)),x=t.get("showSymbol"),_=x&&!u&&Tm(t,a,n),w=this._data;w&&w.eachItemGraphicEl(function(t,e){t.__temp&&(o.remove(t),w.setItemGraphicEl(e,null))}),x||c.remove(),o.add(p);var b,S=!u&&t.get("step");n&&n.getArea&&t.get("clip",!0)&&(null!=(b=n.getArea()).width?(b.x-=.1,b.y-=.1,b.width+=.2,b.height+=.2):b.r0&&(b.r0-=.5,b.r1+=.5)),this._clipShapeForSymbol=b,d&&h.type===n.type&&S===this._step?(m&&!f?f=this._newPolygon(l,y,n,g):f&&!m&&(p.remove(f),f=this._polygon=null),p.setClipPath(Am(n,!1,t)),x&&c.updateData(a,{isIgnore:_,clipShape:b}),a.eachItemGraphicEl(function(t){t.stopAnimation(!0)}),Sm(this._stackedOnPoints,y)&&Sm(this._points,l)||(g?this._updateAnimation(a,y,n,i,S,v):(S&&(l=Im(l,n,S),y=Im(y,n,S)),d.setShape({points:l}),f&&f.setShape({points:l,stackedOnPoints:y})))):(x&&c.updateData(a,{isIgnore:_,clipShape:b}),S&&(l=Im(l,n,S),y=Im(y,n,S)),d=this._newPolyline(l,n,g),m&&(f=this._newPolygon(l,y,n,g)),p.setClipPath(Am(n,!0,t)));var M=function(t,e){var i=t.getVisual("visualMeta");if(i&&i.length&&t.count()&&"cartesian2d"===e.type){for(var n,o,a=i.length-1;0<=a;a--){var r=i[a].dimension,s=t.dimensions[r],l=t.getDimensionInfo(s);if("x"===(n=l&&l.coordDim)||"y"===n){o=i[a];break}}if(o){var u=e.getAxis(n),h=N(o.stops,function(t){return{coord:u.toGlobalCoord(u.dataToCoord(t.value)),color:t.color}}),c=h.length,d=o.outerColors.slice();c&&h[0].coord>h[c-1].coord&&(h.reverse(),d.reverse());var f=h[0].coord-10,p=h[c-1].coord+10,g=p-f;if(g<.001)return"transparent";E(h,function(t){t.offset=(t.coord-f)/g}),h.push({offset:c?h[c-1].offset:.5,color:d[1]||"transparent"}),h.unshift({offset:c?h[0].offset:.5,color:d[0]||"transparent"});var m=new gs(0,0,0,0,h,!0);return m[n]=f,m[n+"2"]=p,m}}}(a,n)||a.getVisual("color");d.useStyle(D(r.getLineStyle(),{fill:"none",stroke:M,lineJoin:"bevel"}));var I=t.get("smooth");if(I=Mm(t.get("smooth")),d.setShape({smooth:I,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")}),f){var T=a.getCalculationInfo("stackedOnSeries"),A=0;f.useStyle(D(s.getAreaStyle(),{fill:M,opacity:.7,lineJoin:"bevel"})),T&&(A=Mm(T.get("smooth"))),f.setShape({smooth:I,stackedOnSmooth:A,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")})}this._data=a,this._coordSys=n,this._stackedOnPoints=y,this._points=l,this._step=S,this._valueOrigin=v},dispose:function(){},highlight:function(t,e,i,n){var o=t.getData(),a=Yo(o,n);if(!(a instanceof Array)&&null!=a&&0<=a){var r=o.getItemGraphicEl(a);if(!r){var s=o.getItemLayout(a);if(!s)return;if(this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(s[0],s[1]))return;(r=new Ug(o,a)).position=s,r.setZ(t.get("zlevel"),t.get("z")),r.ignore=isNaN(s[0])||isNaN(s[1]),r.__temp=!0,o.setItemGraphicEl(a,r),r.stopSymbolAnimation(!0),this.group.add(r)}r.highlight()}else xc.prototype.highlight.call(this,t,e,i,n)},downplay:function(t,e,i,n){var o=t.getData(),a=Yo(o,n);if(null!=a&&0<=a){var r=o.getItemGraphicEl(a);r&&(r.__temp?(o.setItemGraphicEl(a,null),this.group.remove(r)):r.downplay())}else xc.prototype.downplay.call(this,t,e,i,n)},_newPolyline:function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new ym({shape:{points:t},silent:!0,z2:10}),this._lineGroup.add(e),this._polyline=e},_newPolygon:function(t,e){var i=this._polygon;return i&&this._lineGroup.remove(i),i=new xm({shape:{points:t,stackedOnPoints:e},silent:!0}),this._lineGroup.add(i),this._polygon=i},_updateAnimation:function(t,e,i,n,o,a){var r=this._polyline,s=this._polygon,l=t.hostModel,u=function(t,e,i,n,o,a,r,s){for(var l=function(t,e){var i=[];return e.diff(t).add(function(t){i.push({cmd:"+",idx:t})}).update(function(t,e){i.push({cmd:"=",idx:e,idx1:t})}).remove(function(t){i.push({cmd:"-",idx:t})}).execute(),i}(t,e),u=[],h=[],c=[],d=[],f=[],p=[],g=[],m=rm(o,e,r),v=rm(a,t,s),y=0;y<l.length;y++){var x=l[y],_=!0;switch(x.cmd){case"=":var w=t.getItemLayout(x.idx),b=e.getItemLayout(x.idx1);(isNaN(w[0])||isNaN(w[1]))&&(w=b.slice()),u.push(w),h.push(b),c.push(i[x.idx]),d.push(n[x.idx1]),g.push(e.getRawIndex(x.idx1));break;case"+":var S=x.idx;u.push(o.dataToPoint([e.get(m.dataDimsForPoint[0],S),e.get(m.dataDimsForPoint[1],S)])),h.push(e.getItemLayout(S).slice()),c.push(sm(m,o,e,S)),d.push(n[S]),g.push(e.getRawIndex(S));break;case"-":S=x.idx;var M=t.getRawIndex(S);M!==S?(u.push(t.getItemLayout(S)),h.push(a.dataToPoint([t.get(v.dataDimsForPoint[0],S),t.get(v.dataDimsForPoint[1],S)])),c.push(i[S]),d.push(sm(v,a,t,S)),g.push(M)):_=!1}_&&(f.push(x),p.push(p.length))}p.sort(function(t,e){return g[t]-g[e]});var I=[],T=[],A=[],D=[],C=[];for(y=0;y<p.length;y++){S=p[y];I[y]=u[S],T[y]=h[S],A[y]=c[S],D[y]=d[S],C[y]=f[S]}return{current:I,next:T,stackedOnCurrent:A,stackedOnNext:D,status:C}}(this._data,t,this._stackedOnPoints,e,this._coordSys,i,this._valueOrigin,a),h=u.current,c=u.stackedOnCurrent,d=u.next,f=u.stackedOnNext;o&&(h=Im(u.current,i,o),c=Im(u.stackedOnCurrent,i,o),d=Im(u.next,i,o),f=Im(u.stackedOnNext,i,o)),r.shape.__points=u.current,r.shape.points=h,cl(r,{shape:{points:d}},l),s&&(s.setShape({points:h,stackedOnPoints:c}),cl(s,{shape:{points:d,stackedOnPoints:f}},l));for(var p=[],g=u.status,m=0;m<g.length;m++){if("="===g[m].cmd){var v=t.getItemGraphicEl(g[m].idx1);v&&p.push({el:v,ptIdx:m})}}r.animators&&r.animators.length&&r.animators[0].during(function(){for(var t=0;t<p.length;t++){p[t].el.attr("position",r.shape.__points[p[t].ptIdx])}})},remove:function(t){var i=this.group,n=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),n&&n.eachItemGraphicEl(function(t,e){t.__temp&&(i.remove(t),n.setItemGraphicEl(e,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._data=null}});function Dm(t,r,s){return{seriesType:t,performRawSeries:!0,reset:function(l,t,e){var i=l.getData(),u=l.get("symbol"),h=l.get("symbolSize"),n=l.get("symbolKeepAspect"),c=C(u),d=C(h),f=c||d,o=!c&&u?u:r,a=d?null:h;if(i.setVisual({legendSymbol:s||o,symbol:o,symbolSize:a,symbolKeepAspect:n}),!t.isSeriesFiltered(l))return{dataEach:i.hasItemOption||f?function(t,e){if(f){var i=l.getRawValue(e),n=l.getDataParams(e);c&&t.setItemVisual(e,"symbol",u(i,n)),d&&t.setItemVisual(e,"symbolSize",h(i,n))}if(t.hasItemOption){var o=t.getItemModel(e),a=o.getShallow("symbol",!0),r=o.getShallow("symbolSize",!0),s=o.getShallow("symbolKeepAspect",!0);null!=a&&t.setItemVisual(e,"symbol",a),null!=r&&t.setItemVisual(e,"symbolSize",r),null!=s&&t.setItemVisual(e,"symbolKeepAspect",s)}}:null}}}}function Cm(t){return{seriesType:t,plan:mc(),reset:function(t){var e=t.getData(),c=t.coordinateSystem,d=t.pipelineContext.large;if(c){var f=N(c.dimensions,function(t){return e.mapDimension(t)}).slice(0,2),p=f.length,i=e.getCalculationInfo("stackResultDimension");return dp(e,f[0])&&(f[0]=i),dp(e,f[1])&&(f[1]=i),p&&{progress:function(t,e){for(var i=t.end-t.start,n=d&&new Float32Array(i*p),o=t.start,a=0,r=[],s=[];o<t.end;o++){var l;if(1===p){var u=e.get(f[0],o);l=!isNaN(u)&&c.dataToPoint(u,null,s)}else{u=r[0]=e.get(f[0],o);var h=r[1]=e.get(f[1],o);l=!isNaN(u)&&!isNaN(h)&&c.dataToPoint(r,null,s)}d?(n[a++]=l?l[0]:NaN,n[a++]=l?l[1]:NaN):e.setItemLayout(o,l&&l.slice()||[NaN,NaN])}d&&e.setLayout("symbolPoints",n)}}}}}}function Lm(t,e){return Math.round(t.length/2)}var km={average:function(t){for(var e=0,i=0,n=0;n<t.length;n++)isNaN(t[n])||(e+=t[n],i++);return 0===i?NaN:e/i},sum:function(t){for(var e=0,i=0;i<t.length;i++)e+=t[i]||0;return e},max:function(t){for(var e=-1/0,i=0;i<t.length;i++)t[i]>e&&(e=t[i]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,i=0;i<t.length;i++)t[i]<e&&(e=t[i]);return isFinite(e)?e:NaN},nearest:function(t){return t[0]}};function Pm(t){return this._axes[t]}function Nm(t){this._axes={},this._dimList=[],this.name=t||""}function Om(t){Nm.call(this,t)}Nm.prototype={constructor:Nm,type:"cartesian",getAxis:function(t){return this._axes[t]},getAxes:function(){return N(this._dimList,Pm,this)},getAxesByScale:function(e){return e=e.toLowerCase(),M(this.getAxes(),function(t){return t.scale.type===e})},addAxis:function(t){var e=t.dim;this._axes[e]=t,this._dimList.push(e)},dataToCoord:function(t){return this._dataCoordConvert(t,"dataToCoord")},coordToData:function(t){return this._dataCoordConvert(t,"coordToData")},_dataCoordConvert:function(t,e){for(var i=this._dimList,n=t instanceof Array?[]:{},o=0;o<i.length;o++){var a=i[o],r=this._axes[a];n[a]=r[e](t[a])}return n}},Om.prototype={constructor:Om,type:"cartesian2d",dimensions:["x","y"],getBaseAxis:function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},containPoint:function(t){var e=this.getAxis("x"),i=this.getAxis("y");return e.contain(e.toLocalCoord(t[0]))&&i.contain(i.toLocalCoord(t[1]))},containData:function(t){return this.getAxis("x").containData(t[0])&&this.getAxis("y").containData(t[1])},dataToPoint:function(t,e,i){var n=this.getAxis("x"),o=this.getAxis("y");return(i=i||[])[0]=n.toGlobalCoord(n.dataToCoord(t[0])),i[1]=o.toGlobalCoord(o.dataToCoord(t[1])),i},clampData:function(t,e){var i=this.getAxis("x").scale,n=this.getAxis("y").scale,o=i.getExtent(),a=n.getExtent(),r=i.parse(t[0]),s=n.parse(t[1]);return(e=e||[])[0]=Math.min(Math.max(Math.min(o[0],o[1]),r),Math.max(o[0],o[1])),e[1]=Math.min(Math.max(Math.min(a[0],a[1]),s),Math.max(a[0],a[1])),e},pointToData:function(t,e){var i=this.getAxis("x"),n=this.getAxis("y");return(e=e||[])[0]=i.coordToData(i.toLocalCoord(t[0])),e[1]=n.coordToData(n.toLocalCoord(t[1])),e},getOtherAxis:function(t){return this.getAxis("x"===t.dim?"y":"x")},getArea:function(){var t=this.getAxis("x").getGlobalExtent(),e=this.getAxis("y").getGlobalExtent(),i=Math.min(t[0],t[1]),n=Math.min(e[0],e[1]);return new Di(i,n,Math.max(t[0],t[1])-i,Math.max(e[0],e[1])-n)}},w(Om,Nm);function Em(t,e,i,n,o){Vg.call(this,t,e,i),this.type=n||"value",this.position=o||"bottom"}Em.prototype={constructor:Em,index:0,getAxesOnZeroOf:null,model:null,isHorizontal:function(){var t=this.position;return"top"===t||"bottom"===t},getGlobalExtent:function(t){var e=this.getExtent();return e[0]=this.toGlobalCoord(e[0]),e[1]=this.toGlobalCoord(e[1]),t&&e[0]>e[1]&&e.reverse(),e},getOtherAxis:function(){this.grid.getOtherAxis()},pointToData:function(t,e){return this.coordToData(this.toLocalCoord(t["x"===this.dim?0:1]),e)},toLocalCoord:null,toGlobalCoord:null},w(Em,Vg);var Rm={show:!0,zlevel:0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#333",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,lineStyle:{color:["#ccc"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.3)","rgba(200,200,200,0.3)"]}}},zm={};zm.categoryAxis=m({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},Rm),zm.valueAxis=m({boundaryGap:[0,0],splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#eee",width:1}}},Rm),zm.timeAxis=D({scale:!0,min:"dataMin",max:"dataMax"},zm.valueAxis),zm.logAxis=D({scale:!0,logBase:10},zm.valueAxis);function Bm(a,t,r,e){E(Vm,function(o){t.extend({type:a+"Axis."+o,mergeDefaultAndTheme:function(t,e){var i=this.layoutMode,n=i?Mu(t):{};m(t,e.getTheme().get(o+"Axis")),m(t,this.getDefaultOption()),t.type=r(a,t),i&&Su(t,n,i)},optionUpdated:function(){"category"===this.option.type&&(this.__ordinalMeta=mp.createByAxisModel(this))},getCategories:function(t){var e=this.option;if("category"===e.type)return t?e.data:this.__ordinalMeta.categories},getOrdinalMeta:function(){return this.__ordinalMeta},defaultOption:p([{},zm[o+"Axis"],e],!0)})}),Lu.registerSubTypeDefaulter(a+"Axis",T(r,a))}var Vm=["value","category","time","log"],Gm=Lu.extend({type:"cartesian2dAxis",axis:null,init:function(){Gm.superApply(this,"init",arguments),this.resetRange()},mergeOption:function(){Gm.superApply(this,"mergeOption",arguments),this.resetRange()},restoreData:function(){Gm.superApply(this,"restoreData",arguments),this.resetRange()},getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"grid",index:this.option.gridIndex,id:this.option.gridId})[0]}});function Fm(t,e){return e.type||(e.data?"category":"value")}m(Gm.prototype,cg);var Wm={offset:0};function Hm(t,e){return t.getCoordSysModel()===e}function Zm(t,e,i){this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this._initCartesian(t,e,i),this.model=t}Bm("x",Gm,Fm,Wm),Bm("y",Gm,Fm,Wm),Lu.extend({type:"grid",dependencies:["xAxis","yAxis"],layoutMode:"box",coordinateSystem:null,defaultOption:{show:!1,zlevel:0,z:0,left:"10%",top:60,right:"10%",bottom:60,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"}});var Um=Zm.prototype;function Xm(t,e,i,n){i.getAxesOnZeroOf=function(){return o?[o]:[]};var o,a=t[e],r=i.model,s=r.get("axisLine.onZero"),l=r.get("axisLine.onZeroAxisIndex");if(s){if(null!=l)Ym(a[l])&&(o=a[l]);else for(var u in a)if(a.hasOwnProperty(u)&&Ym(a[u])&&!n[h(a[u])]){o=a[u];break}o&&(n[h(o)]=!0)}function h(t){return t.dim+"_"+t.index}}function Ym(t){return t&&"category"!==t.type&&"time"!==t.type&&function(t){var e=t.scale.getExtent(),i=e[0],n=e[1];return!(0<i&&0<n||i<0&&n<0)}(t)}Um.type="grid",Um.axisPointerEnabled=!0,Um.getRect=function(){return this._rect},Um.update=function(t,e){var i=this._axesMap;this._updateScale(t,this.model),E(i.x,function(t){ag(t.scale,t.model)}),E(i.y,function(t){ag(t.scale,t.model)});var n={};E(i.x,function(t){Xm(i,"y",t,n)}),E(i.y,function(t){Xm(i,"x",t,n)}),this.resize(this.model,e)},Um.resize=function(t,e,i){var o=wu(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()});this._rect=o;var n=this._axesList;function a(){E(n,function(t){var e=t.isHorizontal(),i=e?[0,o.width]:[0,o.height],n=t.inverse?1:0;t.setExtent(i[n],i[1-n]),function(t,e){var i=t.getExtent(),n=i[0]+i[1];t.toGlobalCoord="x"===t.dim?function(t){return t+e}:function(t){return n-t+e},t.toLocalCoord="x"===t.dim?function(t){return t-e}:function(t){return n-t+e}}(t,e?o.x:o.y)})}a(),!i&&t.get("containLabel")&&(E(n,function(t){if(!t.model.get("axisLabel.inside")){var e=function(t){var e=t.model,i=t.scale;if(e.get("axisLabel.show")&&!i.isBlank()){var n,o,a="category"===t.type,r=i.getExtent();o=a?i.count():(n=i.getTicks()).length;var s,l,u,h,c,d,f,p,g,m=t.getLabelModel(),v=sg(t),y=1;40<o&&(y=Math.ceil(o/40));for(var x=0;x<o;x+=y){var _=v(n?n[x]:r[0]+x),w=m.getTextRect(_),b=(l=w,u=m.get("rotate")||0,void 0,h=u*Math.PI/180,c=l.plain(),d=c.width,f=c.height,p=d*Math.cos(h)+f*Math.sin(h),g=d*Math.sin(h)+f*Math.cos(h),new Di(c.x,c.y,p,g));s?s.union(b):s=b}return s}}(t);if(e){var i=t.isHorizontal()?"height":"width",n=t.model.get("axisLabel.margin");o[i]-=e[i]+n,"top"===t.position?o.y+=e.height+n:"left"===t.position&&(o.x+=e.width+n)}}}),a())},Um.getAxis=function(t,e){var i=this._axesMap[t];if(null!=i){if(null==e)for(var n in i)if(i.hasOwnProperty(n))return i[n];return i[e]}},Um.getAxes=function(){return this._axesList.slice()},Um.getCartesian=function(t,e){if(null!=t&&null!=e){var i="x"+t+"y"+e;return this._coordsMap[i]}z(t)&&(e=t.yAxisIndex,t=t.xAxisIndex);for(var n=0,o=this._coordsList;n<o.length;n++)if(o[n].getAxis("x").index===t||o[n].getAxis("y").index===e)return o[n]},Um.getCartesians=function(){return this._coordsList.slice()},Um.convertToPixel=function(t,e,i){var n=this._findConvertTarget(t,e);return n.cartesian?n.cartesian.dataToPoint(i):n.axis?n.axis.toGlobalCoord(n.axis.dataToCoord(i)):null},Um.convertFromPixel=function(t,e,i){var n=this._findConvertTarget(t,e);return n.cartesian?n.cartesian.pointToData(i):n.axis?n.axis.coordToData(n.axis.toLocalCoord(i)):null},Um._findConvertTarget=function(t,e){var i,n,o=e.seriesModel,a=e.xAxisModel||o&&o.getReferringComponents("xAxis")[0],r=e.yAxisModel||o&&o.getReferringComponents("yAxis")[0],s=e.gridModel,l=this._coordsList;if(o)_(l,i=o.coordinateSystem)<0&&(i=null);else if(a&&r)i=this.getCartesian(a.componentIndex,r.componentIndex);else if(a)n=this.getAxis("x",a.componentIndex);else if(r)n=this.getAxis("y",r.componentIndex);else if(s){s.coordinateSystem===this&&(i=this._coordsList[0])}return{cartesian:i,axis:n}},Um.containPoint=function(t){var e=this._coordsList[0];if(e)return e.containPoint(t)},Um._initCartesian=function(r,t,e){var s={left:!1,right:!1,top:!1,bottom:!1},l={x:{},y:{}},u={x:0,y:0};if(t.eachComponent("xAxis",i("x"),this),t.eachComponent("yAxis",i("y"),this),!u.x||!u.y)return this._axesMap={},void(this._axesList=[]);function i(a){return function(t,e){if(Hm(t,r)){var i=t.get("position");"x"===a?"top"!==i&&"bottom"!==i&&(i=s.bottom?"top":"bottom"):"left"!==i&&"right"!==i&&(i=s.left?"right":"left"),s[i]=!0;var n=new Em(a,rg(t),[0,0],t.get("type"),i),o="category"===n.type;n.onBand=o&&t.get("boundaryGap"),n.inverse=t.get("inverse"),(t.axis=n).model=t,n.grid=this,n.index=e,this._axesList.push(n),l[a][e]=n,u[a]++}}}E((this._axesMap=l).x,function(o,a){E(l.y,function(t,e){var i="x"+a+"y"+e,n=new Om(i);n.grid=this,n.model=r,this._coordsMap[i]=n,this._coordsList.push(n),n.addAxis(o),n.addAxis(t)},this)},this)},Um._updateScale=function(l,u){function h(e,i){E(e.mapDimension(i.dim,!0),function(t){i.scale.unionExtentFromData(e,fp(e,t))})}E(this._axesList,function(t){t.scale.setExtent(1/0,-1/0)}),l.eachSeries(function(t){if(Km(t)){var e=qm(t,l),i=e[0],n=e[1];if(!Hm(i,u)||!Hm(n,u))return;var o=this.getCartesian(i.componentIndex,n.componentIndex),a=t.getData(),r=o.getAxis("x"),s=o.getAxis("y");"list"===a.type&&(h(a,r,t),h(a,s,t))}},this)},Um.getTooltipAxes=function(n){var o=[],a=[];return E(this.getCartesians(),function(t){var e=null!=n&&"auto"!==n?t.getAxis(n):t.getBaseAxis(),i=t.getOtherAxis(e);_(o,e)<0&&o.push(e),_(a,i)<0&&a.push(i)}),{baseAxes:o,otherAxes:a}};var jm=["xAxis","yAxis"];function qm(e){return N(jm,function(t){return e.getReferringComponents(t)[0]})}function Km(t){return"cartesian2d"===t.get("coordinateSystem")}Zm.create=function(n,o){var a=[];return n.eachComponent("grid",function(t,e){var i=new Zm(t,n,o);i.name="grid_"+e,i.resize(t,o,!0),t.coordinateSystem=i,a.push(i)}),n.eachSeries(function(t){if(Km(t)){var e=qm(t),i=e[0],n=e[1],o=i.getCoordSysModel().coordinateSystem;t.coordinateSystem=o.getCartesian(i.componentIndex,n.componentIndex)}}),a},Zm.dimensions=Zm.prototype.dimensions=Om.prototype.dimensions,sh.register("cartesian2d",Zm);function $m(t,e){this.opt=e,this.axisModel=t,D(e,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0}),this.group=new Ci;var i=new Ci({position:e.position.slice(),rotation:e.rotation});i.updateTransform(),this._transform=i.transform,this._dumbGroup=i}var Jm=Math.PI;$m.prototype={constructor:$m,hasBuilder:function(t){return!!Qm[t]},add:function(t){Qm[t].call(this)},getGroup:function(){return this.group}};var Qm={axisLine:function(){var a=this.opt,t=this.axisModel;if(t.get("axisLine.show")){var e=this.axisModel.axis.getExtent(),i=this._transform,r=[e[0],0],n=[e[1],0];i&&(bt(r,r,i),bt(n,n,i));var s=k({lineCap:"round"},t.getModel("axisLine.lineStyle").getLineStyle());this.group.add(new ls({anid:"line",subPixelOptimize:!0,shape:{x1:r[0],y1:r[1],x2:n[0],y2:n[1]},style:s,strokeContainThreshold:a.strokeContainThreshold||5,silent:!0,z2:1}));var l=t.get("axisLine.symbol"),o=t.get("axisLine.symbolSize"),u=t.get("axisLine.symbolOffset")||0;if("number"==typeof u&&(u=[u,u]),null!=l){"string"==typeof l&&(l=[l,l]),"string"!=typeof o&&"number"!=typeof o||(o=[o,o]);var h=o[0],c=o[1];E([{rotate:a.rotation+Math.PI/2,offset:u[0],r:0},{rotate:a.rotation-Math.PI/2,offset:u[1],r:Math.sqrt((r[0]-n[0])*(r[0]-n[0])+(r[1]-n[1])*(r[1]-n[1]))}],function(t,e){if("none"!==l[e]&&null!=l[e]){var i=_g(l[e],-h/2,-c/2,h,c,s.stroke,!0),n=t.r+t.offset,o=[r[0]+n*Math.cos(a.rotation),r[1]-n*Math.sin(a.rotation)];i.attr({rotation:t.rotate,position:o,silent:!0,z2:11}),this.group.add(i)}},this)}}},axisTickLabel:function(){var t=this.axisModel,e=this.opt,i=function(t,e,i){var n=e.axis,o=e.getModel("axisTick");if(!o.get("show")||n.scale.isBlank())return;for(var a=o.getModel("lineStyle"),r=i.tickDirection*o.get("length"),s=rv(n.getTicksCoords(),t._transform,r,D(a.getLineStyle(),{stroke:e.get("axisLine.lineStyle.color")}),"ticks"),l=0;l<s.length;l++)t.group.add(s[l]);return s}(this,t,e);!function(t,e,i){if(hg(t.axis))return;var n=t.get("axisLabel.showMinLabel"),o=t.get("axisLabel.showMaxLabel");i=i||[];var a=(e=e||[])[0],r=e[1],s=e[e.length-1],l=e[e.length-2],u=i[0],h=i[1],c=i[i.length-1],d=i[i.length-2];!1===n?(nv(a),nv(u)):ov(a,r)&&(n?(nv(r),nv(h)):(nv(a),nv(u)));!1===o?(nv(s),nv(c)):ov(l,s)&&(o?(nv(l),nv(d)):(nv(s),nv(c)))}(t,function(u,h,c){var d=h.axis;if(!W(c.axisLabelShow,h.get("axisLabel.show"))||d.scale.isBlank())return;var f=h.getModel("axisLabel"),p=f.get("margin"),t=d.getViewLabels(),e=(W(c.labelRotate,f.get("rotate"))||0)*Jm/180,g=ev(c.rotation,e,c.labelDirection),m=h.getCategories&&h.getCategories(!0),v=[],y=iv(h),x=h.get("triggerEvent");return E(t,function(t,e){var i=t.tickValue,n=t.formattedLabel,o=t.rawLabel,a=f;m&&m[i]&&m[i].textStyle&&(a=new Cl(m[i].textStyle,f,h.ecModel));var r=a.getTextColor()||h.get("axisLine.lineStyle.color"),s=[d.dataToCoord(i),c.labelOffset+c.labelDirection*p],l=new Ur({anid:"label_"+i,position:s,rotation:g.rotation,silent:y,z2:10});nl(l.style,a,{text:n,textAlign:a.getShallow("align",!0)||g.textAlign,textVerticalAlign:a.getShallow("verticalAlign",!0)||a.getShallow("baseline",!0)||g.textVerticalAlign,textFill:"function"==typeof r?r("category"===d.type?o:"value"===d.type?i+"":i,e):r}),x&&(l.eventData=tv(h),l.eventData.targetType="axisLabel",l.eventData.value=o),u._dumbGroup.add(l),l.updateTransform(),v.push(l),u.group.add(l),l.decomposeTransform()}),v}(this,t,e),i),function(t,e,i){var n=e.axis,o=e.getModel("minorTick");if(!o.get("show")||n.scale.isBlank())return;var a=n.getMinorTicksCoords();if(!a.length)return;for(var r=o.getModel("lineStyle"),s=i.tickDirection*o.get("length"),l=D(r.getLineStyle(),D(e.getModel("axisTick").getLineStyle(),{stroke:e.get("axisLine.lineStyle.color")})),u=0;u<a.length;u++)for(var h=rv(a[u],t._transform,s,l,"minorticks_"+u),c=0;c<h.length;c++)t.group.add(h[c])}(this,t,e)},axisName:function(){var t=this.opt,e=this.axisModel,i=W(t.axisName,e.get("name"));if(i){var n,o,a=e.get("nameLocation"),r=t.nameDirection,s=e.getModel("nameTextStyle"),l=e.get("nameGap")||0,u=this.axisModel.axis.getExtent(),h=u[0]>u[1]?-1:1,c=["start"===a?u[0]-h*l:"end"===a?u[1]+h*l:(u[0]+u[1])/2,av(a)?t.labelOffset+r*l:0],d=e.get("nameRotate");null!=d&&(d=d*Jm/180),av(a)?n=ev(t.rotation,null!=d?d:t.rotation,r):(n=function(t,e,i,n){var o,a,r=Zl(i-t.rotation),s=n[0]>n[1],l="start"===e&&!s||"start"!==e&&s;o=Ul(r-Jm/2)?(a=l?"bottom":"top","center"):Ul(r-1.5*Jm)?(a=l?"top":"bottom","center"):(a="middle",r<1.5*Jm&&Jm/2<r?l?"left":"right":l?"right":"left");return{rotation:r,textAlign:o,textVerticalAlign:a}}(t,a,d||0,u),null!=(o=t.axisNameAvailableWidth)&&(o=Math.abs(o/Math.sin(n.rotation)),isFinite(o)||(o=null)));var f=s.getFont(),p=e.get("nameTruncate",!0)||{},g=p.ellipsis,m=W(t.nameTruncateMaxWidth,p.maxWidth,o),v=null!=g&&null!=m?pu(i,m,f,g,{minChar:2,placeholder:p.placeholder}):i,y=e.get("tooltip",!0),x=e.mainType,_={componentType:x,name:i,$vars:["name"]};_[x+"Index"]=e.componentIndex;var w=new Ur({anid:"name",__fullText:i,__truncatedText:v,position:c,rotation:n.rotation,silent:iv(e),z2:1,tooltip:y&&y.show?k({content:i,formatter:function(){return i},formatterParams:_},y):null});nl(w.style,s,{text:v,textFont:f,textFill:s.getTextColor()||e.get("axisLine.lineStyle.color"),textAlign:s.get("align")||n.textAlign,textVerticalAlign:s.get("verticalAlign")||n.textVerticalAlign}),e.get("triggerEvent")&&(w.eventData=tv(e),w.eventData.targetType="axisName",w.eventData.name=i),this._dumbGroup.add(w),w.updateTransform(),this.group.add(w),w.decomposeTransform()}}},tv=$m.makeAxisEventDataBase=function(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e},ev=$m.innerTextLayout=function(t,e,i){var n,o=Zl(e-t);return{rotation:o,textAlign:Ul(o)?(n=0<i?"top":"bottom","center"):Ul(o-Jm)?(n=0<i?"bottom":"top","center"):(n="middle",0<o&&o<Jm?0<i?"right":"left":0<i?"left":"right"),textVerticalAlign:n}};var iv=$m.isLabelSilent=function(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)};function nv(t){t&&(t.ignore=!0)}function ov(t,e){var i=t&&t.getBoundingRect().clone(),n=e&&e.getBoundingRect().clone();if(i&&n){var o=re([]);return he(o,o,-t.rotation),i.applyTransform(le([],o,t.getLocalTransform())),n.applyTransform(le([],o,e.getLocalTransform())),i.intersect(n)}}function av(t){return"middle"===t||"center"===t}function rv(t,e,i,n,o){for(var a=[],r=[],s=[],l=0;l<t.length;l++){var u=t[l].coord;r[0]=u,s[r[1]=0]=u,s[1]=i,e&&(bt(r,r,e),bt(s,s,e));var h=new ls({anid:o+"_"+t[l].tickValue,subPixelOptimize:!0,shape:{x1:r[0],y1:r[1],x2:s[0],y2:s[1]},style:n,z2:2,silent:!0});a.push(h)}return a}var sv=E,lv=T;function uv(t,e){var i={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return function(p,g,t){var a=g.getComponent("tooltip"),m=g.getComponent("axisPointer"),v=m.get("link",!0)||[],y=[];sv(t.getCoordinateSystems(),function(c){if(c.axisPointerEnabled){var t=fv(c.model),d=p.coordSysAxesInfo[t]={},f=(p.coordSysMap[t]=c).model.getModel("tooltip",a);if(sv(c.getAxes(),lv(o,!1,null)),c.getTooltipAxes&&a&&f.get("show")){var e="axis"===f.get("trigger"),i="cross"===f.get("axisPointer.type"),n=c.getTooltipAxes(f.get("axisPointer.axis"));(e||i)&&sv(n.baseAxes,lv(o,!i||"cross",e)),i&&sv(n.otherAxes,lv(o,"cross",!1))}}function o(t,e,i){var n=i.model.getModel("axisPointer",m),o=n.get("show");if(o&&("auto"!==o||t||dv(n))){null==e&&(e=n.get("triggerTooltip"));var a=(n=t?function(t,e,i,n,o,a){var r=e.getModel("axisPointer"),s={};sv(["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],function(t){s[t]=L(r.get(t))}),s.snap="category"!==t.type&&!!a,"cross"===r.get("type")&&(s.type="line");var l=s.label||(s.label={});if(null==l.show&&(l.show=!1),"cross"===o){var u=r.get("label.show");if(l.show=null==u||u,!a){var h=s.lineStyle=r.get("crossStyle");h&&D(l,h.textStyle)}}return t.model.getModel("axisPointer",new Cl(s,i,n))}(i,f,m,g,t,e):n).get("snap"),r=fv(i.model),s=e||a||"category"===i.type,l=p.axesInfo[r]={key:r,axis:i,coordSys:c,axisPointerModel:n,triggerTooltip:e,involveSeries:s,snap:a,useHandle:dv(n),seriesModels:[]};d[r]=l,p.seriesInvolved|=s;var u=function(t,e){for(var i=e.model,n=e.dim,o=0;o<t.length;o++){var a=t[o]||{};if(hv(a[n+"AxisId"],i.id)||hv(a[n+"AxisIndex"],i.componentIndex)||hv(a[n+"AxisName"],i.name))return o}}(v,i);if(null!=u){var h=y[u]||(y[u]={axesInfo:{}});h.axesInfo[r]=l,h.mapper=v[u].mapper,l.linkGroup=h}}}})}(i,t,e),i.seriesInvolved&&function(o,t){t.eachSeries(function(i){var n=i.coordinateSystem,t=i.get("tooltip.trigger",!0),e=i.get("tooltip.show",!0);n&&"none"!==t&&!1!==t&&"item"!==t&&!1!==e&&!1!==i.get("axisPointer.show",!0)&&sv(o.coordSysAxesInfo[fv(n.model)],function(t){var e=t.axis;n.getAxis(e.dim)===e&&(t.seriesModels.push(i),null==t.seriesDataCount&&(t.seriesDataCount=0),t.seriesDataCount+=i.getData().count())})},this)}(i,t),i}function hv(t,e){return"all"===t||O(t)&&0<=_(t,e)||t===e}function cv(t){var e=(t.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return e&&e.axesInfo[fv(t)]}function dv(t){return!!t.get("handle.show")}function fv(t){return t.type+"||"+t.id}var pv=Tf({type:"axis",_axisPointer:null,axisPointerClass:null,render:function(t,e,i,n){this.axisPointerClass&&function(t){var e=cv(t);if(e){var i=e.axisPointerModel,n=e.axis.scale,o=i.option,a=i.get("status"),r=i.get("value");null!=r&&(r=n.parse(r));var s=dv(i);null==a&&(o.status=s?"show":"hide");var l=n.getExtent().slice();l[0]>l[1]&&l.reverse(),(null==r||r>l[1])&&(r=l[1]),r<l[0]&&(r=l[0]),o.value=r,s&&(o.status=e.axis.scale.isBlank()?"hide":"show")}}(t),pv.superApply(this,"render",arguments),gv(this,t,e,i,n,!0)},updateAxisPointer:function(t,e,i,n,o){gv(this,t,e,i,n,!1)},remove:function(t,e){var i=this._axisPointer;i&&i.remove(e),pv.superApply(this,"remove",arguments)},dispose:function(t,e){mv(this,e),pv.superApply(this,"dispose",arguments)}});function gv(t,e,i,n,o,a){var r=pv.getAxisPointerClass(t.axisPointerClass);if(r){var s=function(t){var e=cv(t);return e&&e.axisPointerModel}(e);s?(t._axisPointer||(t._axisPointer=new r)).render(e,s,n,a):mv(t,n)}}function mv(t,e,i){var n=t._axisPointer;n&&n.dispose(e,i),t._axisPointer=null}var vv=[];function yv(t,e,i){i=i||{};var n=t.coordinateSystem,o=e.axis,a={},r=o.getAxesOnZeroOf()[0],s=o.position,l=r?"onZero":s,u=o.dim,h=n.getRect(),c=[h.x,h.x+h.width,h.y,h.y+h.height],d={left:0,right:1,top:0,bottom:1,onZero:2},f=e.get("offset")||0,p="x"===u?[c[2]-f,c[3]+f]:[c[0]-f,c[1]+f];if(r){var g=r.toGlobalCoord(r.dataToCoord(0));p[d.onZero]=Math.max(Math.min(g,p[1]),p[0])}a.position=["y"===u?p[d[l]]:c[0],"x"===u?p[d[l]]:c[3]],a.rotation=Math.PI/2*("x"===u?0:1);a.labelDirection=a.tickDirection=a.nameDirection={top:-1,bottom:1,left:-1,right:1}[s],a.labelOffset=r?p[d[s]]-p[d.onZero]:0,e.get("axisTick.inside")&&(a.tickDirection=-a.tickDirection),W(i.labelInside,e.get("axisLabel.inside"))&&(a.labelDirection=-a.labelDirection);var m=e.get("axisLabel.rotate");return a.labelRotate="top"===l?-m:m,a.z2=1,a}function xv(t,e,i,n){var o=i.axis;if(!o.scale.isBlank()){var a=i.getModel("splitArea"),r=a.getModel("areaStyle"),s=r.get("color"),l=n.coordinateSystem.getRect(),u=o.getTicksCoords({tickModel:a,clamp:!0});if(u.length){var h=s.length,c=t.__splitAreaColors,d=Q(),f=0;if(c)for(var p=0;p<u.length;p++){var g=c.get(u[p].tickValue);if(null!=g){f=(g+(h-1)*p)%h;break}}var m=o.toGlobalCoord(u[0].coord),v=r.getAreaStyle();s=O(s)?s:[s];for(p=1;p<u.length;p++){var y,x,_,w,b=o.toGlobalCoord(u[p].coord);m=o.isHorizontal()?(y=m,x=l.y,_=b-y,w=l.height,y+_):(y=l.x,x=m,_=l.width,x+(w=b-x));var S=u[p-1].tickValue;null!=S&&d.set(S,f),e.add(new rs({anid:null!=S?"area_"+S:null,shape:{x:y,y:x,width:_,height:w},style:D({fill:s[f]},v),silent:!0})),f=(f+1)%h}t.__splitAreaColors=d}}}function _v(t){t.__splitAreaColors=null}pv.registerAxisPointerClass=function(t,e){vv[t]=e},pv.getAxisPointerClass=function(t){return t&&vv[t]};var wv=["axisLine","axisTickLabel","axisName"],bv=["splitArea","splitLine","minorSplitLine"],Sv=pv.extend({type:"cartesianAxis",axisPointerClass:"CartesianAxisPointer",render:function(e,t,i,n){this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new Ci,this.group.add(this._axisGroup),e.get("show")){var a=e.getCoordSysModel(),r=yv(a,e),s=new $m(e,r);E(wv,s.add,s),this._axisGroup.add(s.getGroup()),E(bv,function(t){e.get(t+".show")&&this["_"+t](e,a)},this),ml(o,this._axisGroup,e),Sv.superCall(this,"render",e,t,i,n)}},remove:function(){_v(this)},_splitLine:function(t,e){var i=t.axis;if(!i.scale.isBlank()){var n=t.getModel("splitLine"),o=n.getModel("lineStyle"),a=o.get("color");a=O(a)?a:[a];for(var r=e.coordinateSystem.getRect(),s=i.isHorizontal(),l=0,u=i.getTicksCoords({tickModel:n}),h=[],c=[],d=o.getLineStyle(),f=0;f<u.length;f++){var p=i.toGlobalCoord(u[f].coord);s?(h[0]=p,h[1]=r.y,c[0]=p,c[1]=r.y+r.height):(h[0]=r.x,h[1]=p,c[0]=r.x+r.width,c[1]=p);var g=l++%a.length,m=u[f].tickValue;this._axisGroup.add(new ls({anid:null!=m?"line_"+u[f].tickValue:null,subPixelOptimize:!0,shape:{x1:h[0],y1:h[1],x2:c[0],y2:c[1]},style:D({stroke:a[g]},d),silent:!0}))}}},_minorSplitLine:function(t,e){var i=t.axis,n=t.getModel("minorSplitLine").getModel("lineStyle"),o=e.coordinateSystem.getRect(),a=i.isHorizontal(),r=i.getMinorTicksCoords();if(r.length)for(var s=[],l=[],u=n.getLineStyle(),h=0;h<r.length;h++)for(var c=0;c<r[h].length;c++){var d=i.toGlobalCoord(r[h][c].coord);a?(s[0]=d,s[1]=o.y,l[0]=d,l[1]=o.y+o.height):(s[0]=o.x,s[1]=d,l[0]=o.x+o.width,l[1]=d),this._axisGroup.add(new ls({anid:"minor_line_"+r[h][c].tickValue,subPixelOptimize:!0,shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:u,silent:!0}))}},_splitArea:function(t,e){xv(this,this._axisGroup,t,e)}});Sv.extend({type:"xAxis"}),Sv.extend({type:"yAxis"}),Tf({type:"grid",render:function(t,e){this.group.removeAll(),t.get("show")&&this.group.add(new rs({shape:t.coordinateSystem.getRect(),style:D({fill:t.get("backgroundColor")},t.getItemStyle()),silent:!0,z2:-1}))}}),vf(function(t){t.xAxis&&t.yAxis&&!t.grid&&(t.grid={})}),bf(Dm("line","circle","line")),wf(Cm("line")),yf(Cd.PROCESSOR.STATISTIC,{seriesType:"line",modifyOutputEnd:!0,reset:function(t,e,i){var n=t.getData(),o=t.get("sampling"),a=t.coordinateSystem;if("cartesian2d"===a.type&&o){var r,s=a.getBaseAxis(),l=a.getOtherAxis(s),u=s.getExtent(),h=u[1]-u[0],c=Math.round(n.count()/h);1<c&&("string"==typeof o?r=km[o]:"function"==typeof o&&(r=o),r&&t.setData(n.downSample(n.mapDimension(l.dim),1/c,r,Lm)))}}});var Mv=rc.extend({type:"series.__base_bar__",getInitialData:function(t,e){return pp(this.getSource(),this,{useEncodeDefaulter:!0})},getMarkerPosition:function(t){var e=this.coordinateSystem;if(e){var i=e.dataToPoint(e.clampData(t)),n=this.getData(),o=n.getLayout("offset"),a=n.getLayout("size");return i[e.getBaseAxis().isHorizontal()?0:1]+=o+a/2,i}return[NaN,NaN]},defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod",itemStyle:{},emphasis:{}}});function Iv(t,e,i,n,o,a){el(t,e,i.getModel("label"),i.getModel("emphasis.label"),{labelFetcher:o,labelDataIndex:a,defaultText:Zg(o.getData(),a),isRectText:!0,autoColor:n}),Tv(t),Tv(e)}function Tv(t,e){"outside"===t.textPosition&&(t.textPosition=e)}Mv.extend({type:"series.bar",dependencies:["grid","polar"],brushSelector:"rect",getProgressive:function(){return!!this.get("large")&&this.get("progressive")},getProgressiveThreshold:function(){var t=this.get("progressiveThreshold"),e=this.get("largeThreshold");return t<e&&(t=e),t},defaultOption:{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1}}});var Av=ha([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["stroke","barBorderColor"],["lineWidth","barBorderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),Dv={getBarItemStyle:function(t){var e=Av(this,t);if(this.getBorderLineDash){var i=this.getBorderLineDash();i&&(e.lineDash=i)}return e}},Cv=Cs({type:"sausage",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},buildPath:function(t,e){var i=e.cx,n=e.cy,o=Math.max(e.r0||0,0),a=Math.max(e.r,0),r=.5*(a-o),s=o+r,l=e.startAngle,u=e.endAngle,h=e.clockwise,c=Math.cos(l),d=Math.sin(l),f=Math.cos(u),p=Math.sin(u);(h?u-l<2*Math.PI:l-u<2*Math.PI)&&(t.moveTo(c*o+i,d*o+n),t.arc(c*s+i,d*s+n,r,-Math.PI+l,l,!h)),t.arc(i,n,a,l,u,!h),t.moveTo(f*a+i,p*a+n),t.arc(f*s+i,p*s+n,r,u-2*Math.PI,u-Math.PI,!h),0!==o&&(t.arc(i,n,o,u,l,h),t.moveTo(c*o+i,p*o+n)),t.closePath()}}),Lv=["itemStyle","barBorderWidth"],kv=[0,0];k(Cl.prototype,Dv),Df({type:"bar",render:function(t,e,i){this._updateDrawMode(t);var n=t.get("coordinateSystem");return"cartesian2d"!==n&&"polar"!==n||(this._isLargeDraw?this._renderLarge(t,e,i):this._renderNormal(t,e,i)),this.group},incrementalPrepareRender:function(t,e,i){this._clear(),this._updateDrawMode(t)},incrementalRender:function(t,e,i,n){this._incrementalRenderLarge(t,e)},_updateDrawMode:function(t){var e=t.pipelineContext.large;(null==this._isLargeDraw||e^this._isLargeDraw)&&(this._isLargeDraw=e,this._clear())},_renderNormal:function(r,t,e){var s,l=this.group,u=r.getData(),h=this._data,c=r.coordinateSystem,i=c.getBaseAxis();"cartesian2d"===c.type?s=i.isHorizontal():"polar"===c.type&&(s="angle"===i.dim);var d=r.isAnimationEnabled()?r:null,f=r.get("clip",!0),p=function(t,e){var i=t.getArea&&t.getArea();if("cartesian2d"===t.type){var n=t.getBaseAxis();if("category"!==n.type||!n.onBand){var o=e.getLayout("bandWidth");n.isHorizontal()?(i.x-=o,i.width+=2*o):(i.y-=o,i.height+=2*o)}}return i}(c,u);l.removeClipPath();var g=r.get("roundCap",!0),m=r.get("showBackground",!0),v=r.getModel("backgroundStyle"),y=[],x=this._backgroundEls||[];u.diff(h).add(function(t){var e=u.getItemModel(t),i=Bv[c.type](u,t,e);if(m){var n=function(t,e,i){return new("polar"===t.type?qr:rs)({shape:Zv(e,i,t),silent:!0,z2:0})}(c,s,i);n.useStyle(v.getBarItemStyle()),y[t]=n}if(u.hasValue(t)){if(f)if(Ov[c.type](p,i))return void l.remove(o);var o=Ev[c.type](t,i,s,d,!1,g);u.setItemGraphicEl(t,o),l.add(o),Gv(o,u,t,e,i,r,s,"polar"===c.type)}}).update(function(t,e){var i=u.getItemModel(t),n=Bv[c.type](u,t,i);if(m){var o=x[e];o.useStyle(v.getBarItemStyle()),cl(y[t]=o,{shape:Zv(s,n,c)},d,t)}var a=h.getItemGraphicEl(e);if(u.hasValue(t)){if(f)if(Ov[c.type](p,n))return void l.remove(a);a?cl(a,{shape:n},d,t):a=Ev[c.type](t,n,s,d,!0,g),u.setItemGraphicEl(t,a),l.add(a),Gv(a,u,t,i,n,r,s,"polar"===c.type)}else l.remove(a)}).remove(function(t){var e=h.getItemGraphicEl(t);"cartesian2d"===c.type?e&&Rv(t,d,e):e&&zv(t,d,e)}).execute();var n=this._backgroundGroup||(this._backgroundGroup=new Ci);n.removeAll();for(var o=0;o<y.length;++o)n.add(y[o]);l.add(n),this._backgroundEls=y,this._data=u},_renderLarge:function(t,e,i){this._clear(),Wv(t,this.group);var n=t.get("clip",!0)?bm(t.coordinateSystem,!1,t):null;n?this.group.setClipPath(n):this.group.removeClipPath()},_incrementalRenderLarge:function(t,e){this._removeBackground(),Wv(e,this.group,!0)},dispose:et,remove:function(t){this._clear(t)},_clear:function(e){var t=this.group,i=this._data;e&&e.get("animation")&&i&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],i.eachItemGraphicEl(function(t){"sector"===t.type?zv(t.dataIndex,e,t):Rv(t.dataIndex,e,t)})):t.removeAll(),this._data=null},_removeBackground:function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null}});var Pv=Math.max,Nv=Math.min,Ov={cartesian2d:function(t,e){var i=e.width<0?-1:1,n=e.height<0?-1:1;i<0&&(e.x+=e.width,e.width=-e.width),n<0&&(e.y+=e.height,e.height=-e.height);var o=Pv(e.x,t.x),a=Nv(e.x+e.width,t.x+t.width),r=Pv(e.y,t.y),s=Nv(e.y+e.height,t.y+t.height);e.x=o,e.y=r,e.width=a-o,e.height=s-r;var l=e.width<0||e.height<0;return i<0&&(e.x+=e.width,e.width=-e.width),n<0&&(e.y+=e.height,e.height=-e.height),l},polar:function(t){return!1}},Ev={cartesian2d:function(t,e,i,n,o){var a=new rs({shape:k({},e),z2:1});if(a.name="item",n){var r=i?"height":"width",s={};a.shape[r]=0,s[r]=e[r],bl[o?"updateProps":"initProps"](a,{shape:s},n,t)}return a},polar:function(t,e,i,n,o,a){var r=e.startAngle<e.endAngle,s=new(!i&&a?Cv:qr)({shape:D({clockwise:r},e),z2:1});if(s.name="item",n){var l=i?"r":"endAngle",u={};s.shape[l]=i?0:e.startAngle,u[l]=e[l],bl[o?"updateProps":"initProps"](s,{shape:u},n,t)}return s}};function Rv(t,e,i){i.style.text=null,cl(i,{shape:{width:0}},e,t,function(){i.parent&&i.parent.remove(i)})}function zv(t,e,i){i.style.text=null,cl(i,{shape:{r:i.shape.r0}},e,t,function(){i.parent&&i.parent.remove(i)})}var Bv={cartesian2d:function(t,e,i){var n=t.getItemLayout(e),o=function(t,e){var i=t.get(Lv)||0,n=isNaN(e.width)?Number.MAX_VALUE:Math.abs(e.width),o=isNaN(e.height)?Number.MAX_VALUE:Math.abs(e.height);return Math.min(i,n,o)}(i,n),a=0<n.width?1:-1,r=0<n.height?1:-1;return{x:n.x+a*o/2,y:n.y+r*o/2,width:n.width-a*o,height:n.height-r*o}},polar:function(t,e,i){var n=t.getItemLayout(e);return{cx:n.cx,cy:n.cy,r0:n.r0,r:n.r,startAngle:n.startAngle,endAngle:n.endAngle}}};function Vv(t){return null!=t.startAngle&&null!=t.endAngle&&t.startAngle===t.endAngle}function Gv(t,e,i,n,o,a,r,s){var l=e.getItemVisual(i,"color"),u=e.getItemVisual(i,"opacity"),h=e.getVisual("borderColor"),c=n.getModel("itemStyle"),d=n.getModel("emphasis.itemStyle").getBarItemStyle();s||t.setShape("r",c.get("barBorderRadius")||0),t.useStyle(D({stroke:Vv(o)?"none":h,fill:Vv(o)?"none":l,opacity:u},c.getBarItemStyle()));var f=n.getShallow("cursor");f&&t.attr("cursor",f);r?o.height:o.width;s||Iv(t.style,d,n,l,a,i),Vv(o)&&(d.fill=d.stroke="none"),$s(t,d)}var Fv=Ar.extend({type:"largeBar",shape:{points:[]},buildPath:function(t,e){for(var i=e.points,n=this.__startPoint,o=this.__baseDimIdx,a=0;a<i.length;a+=2)n[o]=i[a+o],t.moveTo(n[0],n[1]),t.lineTo(i[a],i[a+1])}});function Wv(t,e,i){var n=t.getData(),o=[],a=n.getLayout("valueAxisHorizontal")?1:0;o[1-a]=n.getLayout("valueAxisStart");var r=n.getLayout("largeDataIndices"),s=n.getLayout("barWidth"),l=t.getModel("backgroundStyle");if(t.get("showBackground",!0)){var u=n.getLayout("largeBackgroundPoints"),h=[];h[1-a]=n.getLayout("backgroundStart");var c=new Fv({shape:{points:u},incremental:!!i,__startPoint:h,__baseDimIdx:a,__largeDataIndices:r,__barWidth:s,silent:!0,z2:0});!function(t,e,i){var n=e.get("borderColor")||e.get("color"),o=e.getItemStyle(["color","borderColor"]);t.useStyle(o),t.style.fill=null,t.style.stroke=n,t.style.lineWidth=i.getLayout("barWidth")}(c,l,n),e.add(c)}var d=new Fv({shape:{points:n.getLayout("largePoints")},incremental:!!i,__startPoint:o,__baseDimIdx:a,__largeDataIndices:r,__barWidth:s});e.add(d),function(t,e,i){var n=i.getVisual("borderColor")||i.getVisual("color"),o=e.getModel("itemStyle").getItemStyle(["color","borderColor"]);t.useStyle(o),t.style.fill=null,t.style.stroke=n,t.style.lineWidth=i.getLayout("barWidth")}(d,t,n),d.seriesIndex=t.seriesIndex,t.get("silent")||(d.on("mousedown",Hv),d.on("mousemove",Hv))}var Hv=Cc(function(t){var e=function(t,e,i){var n=t.__baseDimIdx,o=1-n,a=t.shape.points,r=t.__largeDataIndices,s=Math.abs(t.__barWidth/2),l=t.__startPoint[o];kv[0]=e,kv[1]=i;for(var u=kv[n],h=kv[1-n],c=u-s,d=u+s,f=0,p=a.length/2;f<p;f++){var g=2*f,m=a[g+n],v=a[g+o];if(c<=m&&m<=d&&(l<=v?l<=h&&h<=v:v<=h&&h<=l))return r[f]}return-1}(this,t.offsetX,t.offsetY);this.dataIndex=0<=e?e:null},30,!1);function Zv(t,e,i){var n,o="polar"===i.type;return n=o?i.getArea():i.grid.getRect(),o?{cx:n.cx,cy:n.cy,r0:t?n.r0:e.r0,r:t?n.r:e.r,startAngle:t?e.startAngle:0,endAngle:t?e.endAngle:2*Math.PI}:{x:t?e.x:n.x,y:t?n.y:e.y,width:t?e.width:n.width,height:t?n.height:e.height}}wf(Cd.VISUAL.LAYOUT,T(Rp,"bar")),wf(Cd.VISUAL.PROGRESSIVE_LAYOUT,zp),bf({seriesType:"bar",reset:function(t){t.getData().setVisual("legendSymbol","roundRect")}});function Uv(t,e,i){e=O(e)&&{coordDimensions:e}||k({},e);var n=t.getSource(),o=sp(n,e),a=new Xf(o,t);return a.initData(n,i),a}var Xv={updateSelectedMap:function(t){this._targetList=O(t)?t.slice():[],this._selectTargetMap=S(t||[],function(t,e){return t.set(e.name,e),t},Q())},select:function(t,e){var i=null!=e?this._targetList[e]:this._selectTargetMap.get(t);"single"===this.get("selectedMode")&&this._selectTargetMap.each(function(t){t.selected=!1}),i&&(i.selected=!0)},unSelect:function(t,e){var i=null!=e?this._targetList[e]:this._selectTargetMap.get(t);i&&(i.selected=!1)},toggleSelected:function(t,e){var i=null!=e?this._targetList[e]:this._selectTargetMap.get(t);if(null!=i)return this[i.selected?"unSelect":"select"](t,e),i.selected},isSelected:function(t,e){var i=null!=e?this._targetList[e]:this._selectTargetMap.get(t);return i&&i.selected}};function Yv(i,e){this.getAllNames=function(){var t=e();return t.mapArray(t.getName)},this.containName=function(t){return 0<=e().indexOfName(t)},this.indexOfName=function(t){return i().indexOfName(t)},this.getItemVisual=function(t,e){return i().getItemVisual(t,e)}}var jv=Af({type:"series.pie",init:function(t){jv.superApply(this,"init",arguments),this.legendVisualProvider=new Yv(A(this.getData,this),A(this.getRawData,this)),this.updateSelectedMap(this._createSelectableList()),this._defaultLabelLine(t)},mergeOption:function(t){jv.superCall(this,"mergeOption",t),this.updateSelectedMap(this._createSelectableList())},getInitialData:function(t,e){return Uv(this,{coordDimensions:["value"],encodeDefaulter:T($u,this)})},_createSelectableList:function(){for(var t=this.getRawData(),e=t.mapDimension("value"),i=[],n=0,o=t.count();n<o;n++)i.push({name:t.getName(n),value:t.get(e,n),selected:Hh(t,n,"selected")});return i},getDataParams:function(t){var e=this.getData(),i=jv.superCall(this,"getDataParams",t),n=[];return e.each(e.mapDimension("value"),function(t){n.push(t)}),i.percent=Wl(n,t,e.hostModel.get("percentPrecision")),i.$vars.push("percent"),i},_defaultLabelLine:function(t){Go(t,"labelLine",["show"]);var e=t.labelLine,i=t.emphasis.labelLine;e.show=e.show&&t.label.show,i.show=i.show&&t.emphasis.label.show},defaultOption:{zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,minShowLabelAngle:0,selectedOffset:10,hoverOffset:10,avoidLabelOverlap:!0,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:!1,show:!0,position:"outer",alignTo:"none",margin:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1},animationType:"expansion",animationTypeUpdate:"transition",animationEasing:"cubicOut"}});function qv(t,e,i,n){var o=e.getData(),a=this.dataIndex,r=o.getName(a),s=e.get("selectedOffset");n.dispatchAction({type:"pieToggleSelect",from:t,name:r,seriesId:e.id}),o.each(function(t){Kv(o.getItemGraphicEl(t),o.getItemLayout(t),e.isSelected(o.getName(t)),s,i)})}function Kv(t,e,i,n,o){var a=(e.startAngle+e.endAngle)/2,r=i?n:0,s=[Math.cos(a)*r,Math.sin(a)*r];o?t.animate().when(200,{position:s}).start("bounceOut"):t.attr("position",s)}function $v(t,e){Ci.call(this);var i=new qr({z2:2}),n=new ts,o=new Ur;this.add(i),this.add(n),this.add(o),this.updateData(t,e,!0)}b(jv,Xv);var Jv=$v.prototype;Jv.updateData=function(t,e,i){var n=this.childAt(0),o=this.childAt(1),a=this.childAt(2),r=t.hostModel,s=t.getItemModel(e),l=t.getItemLayout(e),u=k({},l);u.label=null;var h=r.getShallow("animationTypeUpdate");i?(n.setShape(u),"scale"===r.getShallow("animationType")?(n.shape.r=l.r0,dl(n,{shape:{r:l.r}},r,e)):(n.shape.endAngle=l.startAngle,cl(n,{shape:{endAngle:l.endAngle}},r,e))):"expansion"===h?n.setShape(u):cl(n,{shape:u},r,e);var c=t.getItemVisual(e,"color");n.useStyle(D({lineJoin:"bevel",fill:c},s.getModel("itemStyle").getItemStyle())),n.hoverStyle=s.getModel("emphasis.itemStyle").getItemStyle();var d=s.getShallow("cursor");d&&n.attr("cursor",d),Kv(this,t.getItemLayout(e),r.isSelected(t.getName(e)),r.get("selectedOffset"),r.get("animation"));var f=!i&&"transition"===h;this._updateLabel(t,e,f),this.highDownOnUpdate=s.get("hoverAnimation")&&r.isAnimationEnabled()?function(t,e){"emphasis"===e?(o.ignore=o.hoverIgnore,a.ignore=a.hoverIgnore,n.stopAnimation(!0),n.animateTo({shape:{r:l.r+r.get("hoverOffset")}},300,"elasticOut")):(o.ignore=o.normalIgnore,a.ignore=a.normalIgnore,n.stopAnimation(!0),n.animateTo({shape:{r:l.r}},300,"elasticOut"))}:null,$s(this)},Jv._updateLabel=function(t,e,i){var n=this.childAt(1),o=this.childAt(2),a=t.hostModel,r=t.getItemModel(e),s=t.getItemLayout(e).label,l=t.getItemVisual(e,"color");if(!s||isNaN(s.x)||isNaN(s.y))o.ignore=o.normalIgnore=o.hoverIgnore=n.ignore=n.normalIgnore=n.hoverIgnore=!0;else{var u={points:s.linePoints||[[s.x,s.y],[s.x,s.y],[s.x,s.y]]},h={x:s.x,y:s.y};i?(cl(n,{shape:u},a,e),cl(o,{style:h},a,e)):(n.attr({shape:u}),o.attr({style:h})),o.attr({rotation:s.rotation,origin:[s.x,s.y],z2:10});var c=r.getModel("label"),d=r.getModel("emphasis.label"),f=r.getModel("labelLine"),p=r.getModel("emphasis.labelLine");l=t.getItemVisual(e,"color");el(o.style,o.hoverStyle={},c,d,{labelFetcher:t.hostModel,labelDataIndex:e,defaultText:s.text,autoColor:l,useInsideStyle:!!s.inside},{textAlign:s.textAlign,textVerticalAlign:s.verticalAlign,opacity:t.getItemVisual(e,"opacity")}),o.ignore=o.normalIgnore=!c.get("show"),o.hoverIgnore=!d.get("show"),n.ignore=n.normalIgnore=!f.get("show"),n.hoverIgnore=!p.get("show"),n.setStyle({stroke:l,opacity:t.getItemVisual(e,"opacity")}),n.setStyle(f.getModel("lineStyle").getLineStyle()),n.hoverStyle=p.getModel("lineStyle").getLineStyle();var g=f.get("smooth");g&&!0===g&&(g=.4),n.setShape({smooth:g})}},w($v,Ci);function Qv(i,t){E(t,function(a){a.update="updateView",xf(a,function(t,e){var o={};return e.eachComponent({mainType:"series",subType:i,query:t},function(i){i[a.method]&&i[a.method](t.name,t.dataIndex);var n=i.getData();n.each(function(t){var e=n.getName(t);o[e]=i.isSelected(e)||!1})}),{name:t.name,selected:o,seriesId:t.seriesId}})})}function ty(n){return{getTargetSeries:function(t){var e={},i=Q();return t.eachSeriesByType(n,function(t){t.__paletteScope=e,i.set(t.uid,t)}),i},reset:function(s,t){var l=s.getRawData(),u={},h=s.getData();h.each(function(t){var e=h.getRawIndex(t);u[e]=t}),l.each(function(t){var e,i=u[t],n=null!=i&&h.getItemVisual(i,"color",!0),o=null!=i&&h.getItemVisual(i,"borderColor",!0);if(n&&o||(e=l.getItemModel(t)),!n){var a=e.get("itemStyle.color")||s.getColorFromPalette(l.getName(t)||t+"",s.__paletteScope,l.count());null!=i&&h.setItemVisual(i,"color",a)}if(!o){var r=e.get("itemStyle.borderColor");null!=i&&h.setItemVisual(i,"borderColor",r)}})}}}xc.extend({type:"pie",init:function(){var t=new Ci;this._sectorGroup=t},render:function(t,e,i,n){if(!n||n.from!==this.uid){var o=t.getData(),a=this._data,r=this.group,s=e.get("animation"),l=!a,u=t.get("animationType"),h=t.get("animationTypeUpdate"),c=T(qv,this.uid,t,s,i),d=t.get("selectedMode");if(o.diff(a).add(function(t){var e=new $v(o,t);l&&"scale"!==u&&e.eachChild(function(t){t.stopAnimation(!0)}),d&&e.on("click",c),o.setItemGraphicEl(t,e),r.add(e)}).update(function(t,e){var i=a.getItemGraphicEl(e);l||"transition"===h||i.eachChild(function(t){t.stopAnimation(!0)}),i.updateData(o,t),i.off("click"),d&&i.on("click",c),r.add(i),o.setItemGraphicEl(t,i)}).remove(function(t){var e=a.getItemGraphicEl(t);r.remove(e)}).execute(),s&&0<o.count()&&(l?"scale"!==u:"transition"!==h)){for(var f=o.getItemLayout(0),p=1;isNaN(f.startAngle)&&p<o.count();++p)f=o.getItemLayout(p);var g=Math.max(i.getWidth(),i.getHeight())/2,m=A(r.removeClipPath,r);r.setClipPath(this._createClipPath(f.cx,f.cy,g,f.startAngle,f.clockwise,m,t,l))}else r.removeClipPath();this._data=o}},dispose:function(){},_createClipPath:function(t,e,i,n,o,a,r,s){var l=new qr({shape:{cx:t,cy:e,r0:0,r:i,startAngle:n,endAngle:n,clockwise:o}});return(s?dl:cl)(l,{shape:{endAngle:n+(o?1:-1)*Math.PI*2}},r,a),l},containPoint:function(t,e){var i=e.getData().getItemLayout(0);if(i){var n=t[0]-i.cx,o=t[1]-i.cy,a=Math.sqrt(n*n+o*o);return a<=i.r&&a>=i.r0}}});var ey=Math.PI/180;function iy(o,t,e,i,n,a,r,s,l,u){function h(t,e,i){for(var n=t;n<e&&!(o[n].y+i>l+r);n++)if(o[n].y+=i,t<n&&n+1<e&&o[n+1].y>o[n].y+o[n].height)return void c(n,i/2);c(e-1,i/2)}function c(t,e){for(var i=t;0<=i&&!(o[i].y-e<l)&&(o[i].y-=e,!(0<i&&o[i].y>o[i-1].y+o[i-1].height));i--);}function d(t,e,i,n,o,a){for(var r=e?Number.MAX_VALUE:0,s=0,l=t.length;s<l;s++)if("none"===t[s].labelAlignTo){var u=Math.abs(t[s].y-n),h=t[s].len,c=t[s].len2,d=u<o+h?Math.sqrt((o+h+c)*(o+h+c)-u*u):Math.abs(t[s].x-i);e&&r<=d&&(d=r-10),!e&&d<=r&&(d=r+10),t[s].x=i+d*a,r=d}}o.sort(function(t,e){return t.y-e.y});for(var f,p=0,g=o.length,m=[],v=[],y=0;y<g;y++){if("outer"===o[y].position&&"labelLine"===o[y].labelAlignTo){var x=o[y].x-u;o[y].linePoints[1][0]+=x,o[y].x=u}(f=o[y].y-p)<0&&h(y,g,-f),p=o[y].y+o[y].height}r-p<0&&c(g-1,p-r);for(y=0;y<g;y++)o[y].y>=e?v.push(o[y]):m.push(o[y]);d(m,!1,t,e,i,n),d(v,!0,t,e,i,n)}function ny(t){return"center"===t.position}function oy(L,k,P,t,N,e){var O,E,R=L.getData(),z=[],B=!1,V=(L.get("minShowLabelAngle")||0)*ey;R.each(function(t){var e=R.getItemLayout(t),i=R.getItemModel(t),n=i.getModel("label"),o=n.get("position")||i.get("emphasis.label.position"),a=n.get("distanceToLabelLine"),r=n.get("alignTo"),s=Rl(n.get("margin"),P),l=n.get("bleedMargin"),u=n.getFont(),h=i.getModel("labelLine"),c=h.get("length");c=Rl(c,P);var d=h.get("length2");if(d=Rl(d,P),!(e.angle<V)){var f,p,g,m,v=(e.startAngle+e.endAngle)/2,y=Math.cos(v),x=Math.sin(v);O=e.cx,E=e.cy;var _,w=L.getFormattedLabel(t,"normal")||R.getName(t),b=gn(w,u,m,"top"),S="inside"===o||"inner"===o;if("center"===o)f=e.cx,p=e.cy,m="center";else{var M=(S?(e.r+e.r0)/2*y:e.r*y)+O,I=(S?(e.r+e.r0)/2*x:e.r*x)+E;if(f=M+3*y,p=I+3*x,!S){var T=M+y*(c+k-e.r),A=I+x*(c+k-e.r),D=T+(y<0?-1:1)*d;f="edge"===r?y<0?N+s:N+P-s:D+(y<0?-a:a),g=[[M,I],[T,A],[D,p=A]]}m=S?"center":"edge"===r?0<y?"right":"left":0<y?"left":"right"}var C=n.get("rotate");_="number"==typeof C?C*(Math.PI/180):C?y<0?-v+Math.PI:-v:0,B=!!_,e.label={x:f,y:p,position:o,height:b.height,len:c,len2:d,linePoints:g,textAlign:m,verticalAlign:"middle",rotation:_,inside:S,labelDistance:a,labelAlignTo:r,labelMargin:s,bleedMargin:l,textRect:b,text:w,font:u},S||z.push(e.label)}}),!B&&L.get("avoidLabelOverlap")&&function(t,e,i,n,o,a,r,s){for(var l=[],u=[],h=Number.MAX_VALUE,c=-Number.MAX_VALUE,d=0;d<t.length;d++)ny(t[d])||(t[d].x<e?(h=Math.min(h,t[d].x),l.push(t[d])):(c=Math.max(c,t[d].x),u.push(t[d])));for(iy(u,e,i,n,1,0,a,0,s,c),iy(l,e,i,n,-1,0,a,0,s,h),d=0;d<t.length;d++){var f=t[d];if(!ny(f)){var p=f.linePoints;if(p){var g,m="edge"===f.labelAlignTo,v=f.textRect.width;(g=m?f.x<e?p[2][0]-f.labelDistance-r-f.labelMargin:r+o-f.labelMargin-p[2][0]-f.labelDistance:f.x<e?f.x-r-f.bleedMargin:r+o-f.x-f.bleedMargin)<f.textRect.width&&(f.text=xn(f.text,g,f.font),"edge"===f.labelAlignTo&&(v=pn(f.text,f.font)));var y=p[1][0]-p[2][0];m?f.x<e?p[2][0]=r+f.labelMargin+v+f.labelDistance:p[2][0]=r+o-f.labelMargin-v-f.labelDistance:(f.x<e?p[2][0]=f.x+f.labelDistance:p[2][0]=f.x-f.labelDistance,p[1][0]=p[2][0]+y),p[1][1]=p[2][1]=f.y}}}}(z,O,E,k,P,t,N,e)}var ay=2*Math.PI,ry=Math.PI/180;function sy(t){return{seriesType:t,reset:function(t,e){var n=e.findComponents({mainType:"legend"});if(n&&n.length){var o=t.getData();o.filterSelf(function(t){for(var e=o.getName(t),i=0;i<n.length;i++)if(!n[i].isSelected(e))return!1;return!0})}}}}Qv("pie",[{type:"pieToggleSelect",event:"pieselectchanged",method:"toggleSelected"},{type:"pieSelect",event:"pieselected",method:"select"},{type:"pieUnSelect",event:"pieunselected",method:"unSelect"}]),bf(ty("pie")),wf(T(function(t,e,A,i){e.eachSeriesByType(t,function(t){var o=t.getData(),e=o.mapDimension("value"),a=function(t,e){return wu(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,A),i=t.get("center"),n=t.get("radius");O(n)||(n=[0,n]),O(i)||(i=[i,i]);var r=Rl(a.width,A.getWidth()),s=Rl(a.height,A.getHeight()),l=Math.min(r,s),u=Rl(i[0],r)+a.x,h=Rl(i[1],s)+a.y,c=Rl(n[0],l/2),d=Rl(n[1],l/2),f=-t.get("startAngle")*ry,p=t.get("minAngle")*ry,g=0;o.each(e,function(t){isNaN(t)||g++});var m=o.getSum(e),v=Math.PI/(m||g)*2,y=t.get("clockwise"),x=t.get("roseType"),_=t.get("stillShowZeroSum"),w=o.getDataExtent(e);w[0]=0;var b=ay,S=0,M=f,I=y?1:-1;if(o.each(e,function(t,e){var i;if(isNaN(t))o.setItemLayout(e,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:y,cx:u,cy:h,r0:c,r:x?NaN:d,viewRect:a});else{(i="area"!==x?0===m&&_?v:t*v:ay/g)<p?b-=i=p:S+=t;var n=M+I*i;o.setItemLayout(e,{angle:i,startAngle:M,endAngle:n,clockwise:y,cx:u,cy:h,r0:c,r:x?El(t,w,[c,d]):d,viewRect:a}),M=n}}),b<ay&&g)if(b<=.001){var T=ay/g;o.each(e,function(t,e){if(!isNaN(t)){var i=o.getItemLayout(e);i.angle=T,i.startAngle=f+I*e*T,i.endAngle=f+I*(e+1)*T}})}else v=b/S,M=f,o.each(e,function(t,e){if(!isNaN(t)){var i=o.getItemLayout(e),n=i.angle===p?p:t*v;i.startAngle=M,i.endAngle=M+I*n,M+=I*n}});oy(t,d,a.width,a.height,a.x,a.y)})},"pie")),yf(sy("pie")),rc.extend({type:"series.scatter",dependencies:["grid","polar","geo","singleAxis","calendar"],getInitialData:function(t,e){return pp(this.getSource(),this,{useEncodeDefaulter:!0})},brushSelector:"point",getProgressive:function(){var t=this.option.progressive;return null==t?this.option.large?5e3:this.get("progressive"):t},getProgressiveThreshold:function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?1e4:this.get("progressiveThreshold"):t},defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},clip:!0}});var ly=Cs({shape:{points:null},symbolProxy:null,softClipShape:null,buildPath:function(t,e){var i=e.points,n=e.size,o=this.symbolProxy,a=o.shape;if(!((t.getContext?t.getContext():t)&&n[0]<4))for(var r=0;r<i.length;){var s=i[r++],l=i[r++];isNaN(s)||isNaN(l)||this.softClipShape&&!this.softClipShape.contain(s,l)||(a.x=s-n[0]/2,a.y=l-n[1]/2,a.width=n[0],a.height=n[1],o.buildPath(t,a,!0))}},afterBrush:function(t){var e=this.shape,i=e.points,n=e.size;if(n[0]<4){this.setTransform(t);for(var o=0;o<i.length;){var a=i[o++],r=i[o++];isNaN(a)||isNaN(r)||this.softClipShape&&!this.softClipShape.contain(a,r)||t.fillRect(a-n[0]/2,r-n[1]/2,n[0],n[1])}this.restoreTransform(t)}},findDataIndex:function(t,e){for(var i=this.shape,n=i.points,o=i.size,a=Math.max(o[0],4),r=Math.max(o[1],4),s=n.length/2-1;0<=s;s--){var l=2*s,u=n[l]-a/2,h=n[1+l]-r/2;if(u<=t&&h<=e&&t<=u+a&&e<=h+r)return s}return-1}});function uy(){this.group=new Ci}var hy=uy.prototype;function cy(t,e,i){Vg.call(this,t,e,i),this.type="value",this.angle=0,this.name="",this.model}function dy(t,e,i){this._model=t,this.dimensions=[],this._indicatorAxes=N(t.getIndicatorModels(),function(t,e){var i="indicator_"+e,n=new cy(i,"log"===t.get("axisType")?new ig:new Ap);return n.name=t.get("name"),(n.model=t).axis=n,this.dimensions.push(i),n},this),this.resize(t,i),this.cx,this.cy,this.r,this.r0,this.startAngle}hy.isPersistent=function(){return!this._incremental},hy.updateData=function(t,e){this.group.removeAll();var i=new ly({rectHover:!0,cursor:"default"});i.setShape({points:t.getLayout("symbolPoints")}),this._setCommon(i,t,!1,e),this.group.add(i),this._incremental=null},hy.updateLayout=function(t){if(!this._incremental){var n=t.getLayout("symbolPoints");this.group.eachChild(function(t){if(null!=t.startIndex){var e=2*(t.endIndex-t.startIndex),i=4*t.startIndex*2;n=new Float32Array(n.buffer,i,e)}t.setShape("points",n)})}},hy.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clearIncremental(),2e6<t.count()?(this._incremental||(this._incremental=new vs({silent:!0})),this.group.add(this._incremental)):this._incremental=null},hy.incrementalUpdate=function(t,e,i){var n;this._incremental?(n=new ly,this._incremental.addDisplayable(n,!0)):((n=new ly({rectHover:!0,cursor:"default",startIndex:t.start,endIndex:t.end})).incremental=!0,this.group.add(n)),n.setShape({points:e.getLayout("symbolPoints")}),this._setCommon(n,e,!!this._incremental,i)},hy._setCommon=function(i,t,e,n){var o=t.hostModel;n=n||{};var a=t.getVisual("symbolSize");i.setShape("size",a instanceof Array?a:[a,a]),i.softClipShape=n.clipShape||null,i.symbolProxy=_g(t.getVisual("symbol"),0,0,0,0),i.setColor=i.symbolProxy.setColor;var r=i.shape.size[0]<4;i.useStyle(o.getModel("itemStyle").getItemStyle(r?["color","shadowBlur","shadowColor"]:["color"]));var s=t.getVisual("color");s&&i.setColor(s),e||(i.seriesIndex=o.seriesIndex,i.on("mousemove",function(t){i.dataIndex=null;var e=i.findDataIndex(t.offsetX,t.offsetY);0<=e&&(i.dataIndex=e+(i.startIndex||0))}))},hy.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},hy._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()},Df({type:"scatter",render:function(t,e,i){var n=t.getData();this._updateSymbolDraw(n,t).updateData(n,{clipShape:this._getClipShape(t)}),this._finished=!0},incrementalPrepareRender:function(t,e,i){var n=t.getData();this._updateSymbolDraw(n,t).incrementalPrepareUpdate(n),this._finished=!1},incrementalRender:function(t,e,i){this._symbolDraw.incrementalUpdate(t,e.getData(),{clipShape:this._getClipShape(e)}),this._finished=t.end===e.getData().count()},updateTransform:function(t,e,i){var n=t.getData();if(this.group.dirty(),!this._finished||1e4<n.count()||!this._symbolDraw.isPersistent())return{update:!0};var o=Cm().reset(t);o.progress&&o.progress({start:0,end:n.count()},n),this._symbolDraw.updateLayout(n)},_getClipShape:function(t){var e=t.coordinateSystem,i=e&&e.getArea&&e.getArea();return t.get("clip",!0)?i:null},_updateSymbolDraw:function(t,e){var i=this._symbolDraw,n=e.pipelineContext.large;return i&&n===this._isLargeDraw||(i&&i.remove(),i=this._symbolDraw=n?new uy:new em,this._isLargeDraw=n,this.group.removeAll()),this.group.add(i.group),i},remove:function(t,e){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},dispose:function(){}}),bf(Dm("scatter","circle")),wf(Cm("scatter")),w(cy,Vg),dy.prototype.getIndicatorAxes=function(){return this._indicatorAxes},dy.prototype.dataToPoint=function(t,e){var i=this._indicatorAxes[e];return this.coordToPoint(i.dataToCoord(t),e)},dy.prototype.coordToPoint=function(t,e){var i=this._indicatorAxes[e].angle;return[this.cx+t*Math.cos(i),this.cy-t*Math.sin(i)]},dy.prototype.pointToData=function(t){var e=t[0]-this.cx,i=t[1]-this.cy,n=Math.sqrt(e*e+i*i);e/=n,i/=n;for(var o,a=Math.atan2(-i,e),r=1/0,s=-1,l=0;l<this._indicatorAxes.length;l++){var u=this._indicatorAxes[l],h=Math.abs(a-u.angle);h<r&&(o=u,s=l,r=h)}return[s,+(o&&o.coordToData(n))]},dy.prototype.resize=function(t,e){var i=t.get("center"),n=e.getWidth(),o=e.getHeight(),a=Math.min(n,o)/2;this.cx=Rl(i[0],n),this.cy=Rl(i[1],o),this.startAngle=t.get("startAngle")*Math.PI/180;var r=t.get("radius");"string"!=typeof r&&"number"!=typeof r||(r=[0,r]),this.r0=Rl(r[0],a),this.r=Rl(r[1],a),E(this._indicatorAxes,function(t,e){t.setExtent(this.r0,this.r);var i=this.startAngle+e*Math.PI*2/this._indicatorAxes.length;i=Math.atan2(Math.sin(i),Math.cos(i)),t.angle=i},this)},dy.prototype.update=function(n,t){var o=this._indicatorAxes,a=this._model;E(o,function(t){t.scale.setExtent(1/0,-1/0)}),n.eachSeriesByType("radar",function(t,e){if("radar"===t.get("coordinateSystem")&&n.getComponent("radar",t.get("radarIndex"))===a){var i=t.getData();E(o,function(t){t.scale.unionExtentFromData(i,i.mapDimension(t.dim))})}},this);var c=a.get("splitNumber");function d(t){var e=Math.pow(10,Math.floor(Math.log(t)/Math.LN10)),i=t/e;return 2===i?i=5:i*=2,i*e}E(o,function(t,e){var i=og(t.scale,t.model);ag(t.scale,t.model);var n=t.model,o=t.scale,a=n.getMin(),r=n.getMax(),s=o.getInterval();if(null!=a&&null!=r)o.setExtent(+a,+r),o.setInterval((r-a)/c);else if(null!=a)for(;u=a+s*c,o.setExtent(+a,u),o.setInterval(s),s=d(s),u<i[1]&&isFinite(u)&&isFinite(i[1]););else if(null!=r)for(;h=r-s*c,o.setExtent(h,+r),o.setInterval(s),s=d(s),h>i[0]&&isFinite(h)&&isFinite(i[0]););else{var l=o.getTicks().length-1;c<l&&(s=d(s));var u,h=zl((u=Math.ceil(i[1]/s)*s)-s*c);o.setExtent(h,u),o.setInterval(s)}})},dy.dimensions=[],dy.create=function(i,n){var o=[];return i.eachComponent("radar",function(t){var e=new dy(t,i,n);o.push(e),t.coordinateSystem=e}),i.eachSeriesByType("radar",function(t){"radar"===t.get("coordinateSystem")&&(t.coordinateSystem=o[t.get("radarIndex")||0])}),o},sh.register("radar",dy);var fy=zm.valueAxis;function py(t,e){return D({show:e},t)}If({type:"radar",optionUpdated:function(){var o=this.get("boundaryGap"),a=this.get("splitNumber"),r=this.get("scale"),s=this.get("axisLine"),l=this.get("axisTick"),u=this.get("axisType"),h=this.get("axisLabel"),c=this.get("name"),d=this.get("name.show"),f=this.get("name.formatter"),p=this.get("nameGap"),g=this.get("triggerEvent"),t=N(this.get("indicator")||[],function(t){null!=t.max&&0<t.max&&!t.min?t.min=0:null!=t.min&&t.min<0&&!t.max&&(t.max=0);var e=c;if(null!=t.color&&(e=D({color:t.color},c)),t=m(L(t),{boundaryGap:o,splitNumber:a,scale:r,axisLine:s,axisTick:l,axisType:u,axisLabel:h,name:t.text,nameLocation:"end",nameGap:p,nameTextStyle:e,triggerEvent:g},!1),d||(t.name=""),"string"==typeof f){var i=t.name;t.name=f.replace("{value}",null!=i?i:"")}else"function"==typeof f&&(t.name=f(t.name,t));var n=k(new Cl(t,null,this.ecModel),cg);return n.mainType="radar",n.componentIndex=this.componentIndex,n},this);this.getIndicatorModels=function(){return t}},defaultOption:{zlevel:0,z:0,center:["50%","50%"],radius:"75%",startAngle:90,name:{show:!0},boundaryGap:[0,0],splitNumber:5,nameGap:15,scale:!1,shape:"polygon",axisLine:m({lineStyle:{color:"#bbb"}},fy.axisLine),axisLabel:py(fy.axisLabel,!1),axisTick:py(fy.axisTick,!1),axisType:"interval",splitLine:py(fy.splitLine,!0),splitArea:py(fy.splitArea,!0),indicator:[]}});var gy=["axisLine","axisTickLabel","axisName"];Tf({type:"radar",render:function(t,e,i){this.group.removeAll(),this._buildAxes(t),this._buildSplitLineAndArea(t)},_buildAxes:function(t){var e=t.coordinateSystem;E(N(e.getIndicatorAxes(),function(t){return new $m(t.model,{position:[e.cx,e.cy],rotation:t.angle,labelDirection:-1,tickDirection:-1,nameDirection:1})}),function(t){E(gy,t.add,t),this.group.add(t.getGroup())},this)},_buildSplitLineAndArea:function(t){var n=t.coordinateSystem,e=n.getIndicatorAxes();if(e.length){var i=t.get("shape"),o=t.getModel("splitLine"),a=t.getModel("splitArea"),r=o.getModel("lineStyle"),s=a.getModel("areaStyle"),l=o.get("show"),u=a.get("show"),h=r.get("color"),c=s.get("color");h=O(h)?h:[h],c=O(c)?c:[c];var d=[],f=[];if("circle"===i)for(var p=e[0].getTicksCoords(),g=n.cx,m=n.cy,v=0;v<p.length;v++){if(l)d[I(d,h,v)].push(new Yr({shape:{cx:g,cy:m,r:p[v].coord}}));if(u&&v<p.length-1)f[I(f,c,v)].push(new Kr({shape:{cx:g,cy:m,r0:p[v].coord,r:p[v+1].coord}}))}else{var y,x=N(e,function(t,e){var i=t.getTicksCoords();return y=null==y?i.length-1:Math.min(i.length-1,y),N(i,function(t){return n.coordToPoint(t.coord,e)})}),_=[];for(v=0;v<=y;v++){for(var w=[],b=0;b<e.length;b++)w.push(x[b][v]);if(w[0]&&w.push(w[0].slice()),l)d[I(d,h,v)].push(new ts({shape:{points:w}}));if(u&&_)f[I(f,c,v-1)].push(new Qr({shape:{points:w.concat(_)}}));_=w.slice().reverse()}}var S=r.getLineStyle(),M=s.getAreaStyle();E(f,function(t,e){this.group.add(Es(t,{style:D({stroke:"none",fill:c[e%c.length]},M),silent:!0}))},this),E(d,function(t,e){this.group.add(Es(t,{style:D({fill:"none",stroke:h[e%h.length]},S),silent:!0}))},this)}function I(t,e,i){var n=i%e.length;return t[n]=t[n]||[],n}}});var my=rc.extend({type:"series.radar",dependencies:["radar"],init:function(t){my.superApply(this,"init",arguments),this.legendVisualProvider=new Yv(A(this.getData,this),A(this.getRawData,this))},getInitialData:function(t,e){return Uv(this,{generateCoord:"indicator_",generateCoordCount:1/0})},formatTooltip:function(n){var o=this.getData(),t=this.coordinateSystem.getIndicatorAxes(),e=this.getData().getName(n);return au(""===e?this.name:e)+"<br/>"+N(t,function(t,e){var i=o.get(o.mapDimension(t.dim),n);return au(t.name+" : "+i)}).join("<br />")},getTooltipPosition:function(t){if(null!=t)for(var e=this.getData(),i=this.coordinateSystem,n=e.getValues(N(i.dimensions,function(t){return e.mapDimension(t)}),t,!0),o=0,a=n.length;o<a;o++)if(!isNaN(n[o])){var r=i.getIndicatorAxes();return i.coordToPoint(r[o].dataToCoord(n[o]),o)}},defaultOption:{zlevel:0,z:2,coordinateSystem:"radar",legendHoverLink:!0,radarIndex:0,lineStyle:{width:2,type:"solid"},label:{position:"top"},symbol:"emptyCircle",symbolSize:4}});Df({type:"radar",render:function(l,t,e){var i=l.coordinateSystem,g=this.group,m=l.getData(),s=this._data;function u(t,e){var i=t.getItemVisual(e,"symbol")||"circle",n=t.getItemVisual(e,"color");if("none"!==i){var o=function(t){return O(t)||(t=[+t,+t]),t}(t.getItemVisual(e,"symbolSize")),a=_g(i,-1,-1,2,2,n);return a.attr({style:{strokeNoScale:!0},z2:100,scale:[o[0]/2,o[1]/2]}),a}}function h(t,e,i,n,o,a){i.removeAll();for(var r=0;r<e.length-1;r++){var s=u(n,o);s&&(t[s.__dimIdx=r]?(s.attr("position",t[r]),bl[a?"initProps":"updateProps"](s,{position:e[r]},l,o)):s.attr("position",e[r]),i.add(s))}}function c(t){return N(t,function(t){return[i.cx,i.cy]})}m.diff(s).add(function(t){var e=m.getItemLayout(t);if(e){var i=new Qr,n=new ts,o={shape:{points:e}};i.shape.points=c(e),n.shape.points=c(e),dl(i,o,l,t),dl(n,o,l,t);var a=new Ci,r=new Ci;a.add(n),a.add(i),a.add(r),h(n.shape.points,e,r,m,t,!0),m.setItemGraphicEl(t,a)}}).update(function(t,e){var i=s.getItemGraphicEl(e),n=i.childAt(0),o=i.childAt(1),a=i.childAt(2),r={shape:{points:m.getItemLayout(t)}};r.shape.points&&(h(n.shape.points,r.shape.points,a,m,t,!1),cl(n,r,l),cl(o,r,l),m.setItemGraphicEl(t,i))}).remove(function(t){g.remove(s.getItemGraphicEl(t))}).execute(),m.eachItemGraphicEl(function(t,i){var e=m.getItemModel(i),n=t.childAt(0),o=t.childAt(1),a=t.childAt(2),r=m.getItemVisual(i,"color");g.add(t),n.useStyle(D(e.getModel("lineStyle").getLineStyle(),{fill:"none",stroke:r})),n.hoverStyle=e.getModel("emphasis.lineStyle").getLineStyle();var s=e.getModel("areaStyle"),l=e.getModel("emphasis.areaStyle"),u=s.isEmpty()&&s.parentModel.isEmpty(),h=l.isEmpty()&&l.parentModel.isEmpty();h=h&&u,o.ignore=u,o.useStyle(D(s.getAreaStyle(),{fill:r,opacity:.7})),o.hoverStyle=l.getAreaStyle();var c=e.getModel("itemStyle").getItemStyle(["color"]),d=e.getModel("emphasis.itemStyle").getItemStyle(),f=e.getModel("label"),p=e.getModel("emphasis.label");a.eachChild(function(t){t.setStyle(c),t.hoverStyle=L(d);var e=m.get(m.dimensions[t.__dimIdx],i);null!=e&&!isNaN(e)||(e=""),el(t.style,t.hoverStyle,f,p,{labelFetcher:m.hostModel,labelDataIndex:i,labelDimIndex:t.__dimIdx,defaultText:e,autoColor:r,isRectText:!0})}),t.highDownOnUpdate=function(t,e){o.attr("ignore","emphasis"===e?h:u)},$s(t)}),this._data=m},remove:function(){this.group.removeAll(),this._data=null},dispose:function(){}});function vy(t){return!isNaN(t[0])&&!isNaN(t[1])}function yy(t){return[t.cx,t.cy]}bf(ty("radar")),bf(Dm("radar","circle")),wf(function(t){t.eachSeriesByType("radar",function(t){var i=t.getData(),o=[],a=t.coordinateSystem;if(a){var e=a.getIndicatorAxes();E(e,function(t,n){i.each(i.mapDimension(e[n].dim),function(t,e){o[e]=o[e]||[];var i=a.dataToPoint(t,n);o[e][n]=vy(i)?i:yy(a)})}),i.each(function(t){var e=I(o[t],function(t){return vy(t)})||yy(a);o[t].push(e.slice()),i.setItemLayout(t,o[t])})}})}),yf(sy("radar")),vf(function(i){var t=i.polar;if(t){O(t)||(t=[t]);var n=[];E(t,function(t,e){t.indicator?(t.type&&!t.shape&&(t.shape=t.type),i.radar=i.radar||[],O(i.radar)||(i.radar=[i.radar]),i.radar.push(t)):n.push(t)}),i.polar=n}E(i.series,function(t){t&&"radar"===t.type&&t.polarIndex&&(t.radarIndex=t.polarIndex)})});for(var xy=[126,25],_y=[[[0,3.5],[7,11.2],[15,11.9],[30,7],[42,.7],[52,.7],[56,7.7],[59,.7],[64,.7],[64,0],[5,0],[0,3.5]],[[13,16.1],[19,14.7],[16,21.7],[11,23.1],[13,16.1]],[[12,32.2],[14,38.5],[15,38.5],[13,32.2],[12,32.2]],[[16,47.6],[12,53.2],[13,53.2],[18,47.6],[16,47.6]],[[6,64.4],[8,70],[9,70],[8,64.4],[6,64.4]],[[23,82.6],[29,79.8],[30,79.8],[25,82.6],[23,82.6]],[[37,70.7],[43,62.3],[44,62.3],[39,70.7],[37,70.7]],[[48,51.1],[51,45.5],[53,45.5],[50,51.1],[48,51.1]],[[51,35],[51,28.7],[53,28.7],[53,35],[51,35]],[[52,22.4],[55,17.5],[56,17.5],[53,22.4],[52,22.4]],[[58,12.6],[62,7],[63,7],[60,12.6],[58,12.6]],[[0,3.5],[0,93.1],[64,93.1],[64,0],[63,0],[63,92.4],[1,92.4],[1,3.5],[0,3.5]]],wy=0;wy<_y.length;wy++)for(var by=0;by<_y[wy].length;by++)_y[wy][by][0]/=10.5,_y[wy][by][1]/=-14,_y[wy][by][0]+=xy[0],_y[wy][by][1]+=xy[1];var Sy={"南海诸岛":[32,80],"广东":[0,-10],"香港":[10,5],"澳门":[-10,10],"天津":[5,5]},My={Russia:[100,60],"United States":[-99,38],"United States of America":[-99,38]},Iy=[[[123.45165252685547,25.73527164402261],[123.49731445312499,25.73527164402261],[123.49731445312499,25.750734064600884],[123.45165252685547,25.750734064600884],[123.45165252685547,25.73527164402261]]],Ty=jo(),Ay={load:function(n,t){var e=Ty(t).parsed;if(e)return e;var i,o=t.specialAreas||{},a=t.geoJSON;try{i=a?Dg(a):[]}catch(t){throw new Error("Invalid geoJson format\n"+t.message)}return function(t,e){"china"===t&&e.push(new Tg("南海诸岛",N(_y,function(t){return{type:"polygon",exterior:t}}),xy))}(n,i),E(i,function(t){var e=t.name;!function(t,e){if("china"===t){var i=Sy[e.name];if(i){var n=e.center;n[0]+=i[0]/10.5,n[1]+=-i[1]/14}}}(n,t),function(t,e){if("world"===t){var i=My[e.name];if(i){var n=e.center;n[0]=i[0],n[1]=i[1]}}}(n,t),function(t,e){"china"===t&&"台湾"===e.name&&e.geometries.push({type:"polygon",exterior:Iy[0]})}(n,t);var i=o[e];i&&t.transformTo(i.left,i.top,i.width,i.height)}),Ty(t).parsed={regions:i,boundingRect:function(t){for(var e,i=0;i<t.length;i++){var n=t[i].getBoundingRect();(e=e||n.clone()).union(n)}return e}(i)}}};var Dy=jo();function Cy(t,e){var i,n,o=t.svgXML;try{Y(null!=(n=(i=o&&function(t,e){return(new ud).parse(t,e)}(o,{ignoreViewBox:!0,ignoreRootClip:!0})||{}).root))}catch(t){throw new Error("Invalid svg format\n"+t.message)}var a=i.width,r=i.height,s=i.viewBoxRect;if(e||(e=null==a||null==r?n.getBoundingRect():new Di(0,0,0,0),null!=a&&(e.width=a),null!=r&&(e.height=r)),s){var l=_d(s,e.width,e.height),u=n;(n=new Ci).add(u),u.scale=l.scale,u.position=l.position}return n.setClipPath(new rs({shape:e.plain()})),{root:n,boundingRect:e}}var Ly={geoJSON:Ay,svg:{load:function(t,e){var i=Dy(e).originRoot;if(i)return{root:i,boundingRect:Dy(e).boundingRect};var n=Cy(e);return Dy(e).originRoot=n.root,Dy(e).boundingRect=n.boundingRect,n},makeGraphic:function(t,e,i){var n=Dy(e),o=n.rootMap||(n.rootMap=Q()),a=o.get(i);if(a)return a;var r=n.originRoot,s=n.boundingRect;return a=n.originRootHostKey?Cy(e,s).root:(n.originRootHostKey=i,r),o.set(i,a)},removeGraphic:function(t,e,i){var n=Dy(e),o=n.rootMap;o&&o.removeKey(i),i===n.originRootHostKey&&(n.originRootHostKey=null)}}},ky={load:function(n,o){var a,r=[],s=Q(),l=Q();return E(Ny(n),function(t){var e=Ly[t.type].load(n,t);E(e.regions,function(t){var e=t.name;o&&o.hasOwnProperty(e)&&(t=t.cloneShallow(e=o[e])),r.push(t),s.set(e,t),l.set(e,t.center)});var i=e.boundingRect;i&&(a?a.union(i):a=i.clone())}),{regions:r,regionsMap:s,nameCoordMap:l,boundingRect:a||new Di(0,0,0,0)}},makeGraphic:Py("makeGraphic"),removeGraphic:Py("removeGraphic")};function Py(a){return function(i,n){var t=Ny(i),o=[];return E(t,function(t){var e=Ly[t.type][a];e&&o.push(e(i,t,n))}),o}}function Ny(t){return bd.retrieveMap(t)||[]}b(rc.extend({type:"series.map",dependencies:["geo"],layoutMode:"box",needsDrawMap:!1,seriesGroup:[],getInitialData:function(t){for(var e=Uv(this,{coordDimensions:["value"],encodeDefaulter:T($u,this)}),i=e.mapDimension("value"),n=Q(),o=[],a=[],r=0,s=e.count();r<s;r++){var l=e.getName(r);n.set(l,!0),o.push({name:l,value:e.get(i,r),selected:Hh(e,r,"selected")})}return E(ky.load(this.getMapType(),this.option.nameMap).regions,function(t){var e=t.name;n.get(e)||(o.push({name:e}),a.push(e))}),this.updateSelectedMap(o),e.appendValues([],a),e},getHostGeoModel:function(){var t=this.option.geoIndex;return null!=t?this.dependentModels.geo[t]:null},getMapType:function(){return(this.getHostGeoModel()||this).option.map},getRawValue:function(t){var e=this.getData();return e.get(e.mapDimension("value"),t)},getRegionModel:function(t){var e=this.getData();return e.getItemModel(e.indexOfName(t))},formatTooltip:function(t){for(var e=this.getData(),i=tu(this.getRawValue(t)),n=e.getName(t),o=this.seriesGroup,a=[],r=0;r<o.length;r++){var s=o[r].originalData.indexOfName(n),l=e.mapDimension("value");isNaN(o[r].originalData.get(l,s))||a.push(au(o[r].name))}return a.join(", ")+"<br />"+au(n+" : "+i)},getTooltipPosition:function(t){if(null!=t){var e=this.getData().getName(t),i=this.coordinateSystem,n=i.getRegion(e);return n&&i.dataToPoint(n.center)}},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},defaultOption:{zlevel:0,z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:.75,showLegendSymbol:!0,dataRangeHoverLink:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}}}}),Xv);var Oy="\0_ec_interaction_mutex";function Ey(t,e){return!!Ry(t)[e]}function Ry(t){return t[Oy]||(t[Oy]={})}function zy(i){this.pointerChecker,this._zr=i,this._opt={};var t=A,n=t(By,this),o=t(Vy,this),a=t(Gy,this),r=t(Fy,this),s=t(Wy,this);Ct.call(this),this.setPointerChecker=function(t){this.pointerChecker=t},this.enable=function(t,e){this.disable(),this._opt=D(L(e)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),null==t&&(t=!0),!0!==t&&"move"!==t&&"pan"!==t||(i.on("mousedown",n),i.on("mousemove",o),i.on("mouseup",a)),!0!==t&&"scale"!==t&&"zoom"!==t||(i.on("mousewheel",r),i.on("pinch",s))},this.disable=function(){i.off("mousedown",n),i.off("mousemove",o),i.off("mouseup",a),i.off("mousewheel",r),i.off("pinch",s)},this.dispose=this.disable,this.isDragging=function(){return this._dragging},this.isPinching=function(){return this._pinching}}function By(t){if(!(Yt(t)||t.target&&t.target.draggable)){var e=t.offsetX,i=t.offsetY;this.pointerChecker&&this.pointerChecker(t,e,i)&&(this._x=e,this._y=i,this._dragging=!0)}}function Vy(t){if(this._dragging&&Uy("moveOnMouseMove",t,this._opt)&&"pinch"!==t.gestureEvent&&!Ey(this._zr,"globalPan")){var e=t.offsetX,i=t.offsetY,n=this._x,o=this._y,a=e-n,r=i-o;this._x=e,this._y=i,this._opt.preventDefaultMouseMove&&Xt(t.event),Zy(this,"pan","moveOnMouseMove",t,{dx:a,dy:r,oldX:n,oldY:o,newX:e,newY:i})}}function Gy(t){Yt(t)||(this._dragging=!1)}function Fy(t){var e=Uy("zoomOnMouseWheel",t,this._opt),i=Uy("moveOnMouseWheel",t,this._opt),n=t.wheelDelta,o=Math.abs(n),a=t.offsetX,r=t.offsetY;if(0!==n&&(e||i)){if(e){var s=3<o?1.4:1<o?1.2:1.1;Hy(this,"zoom","zoomOnMouseWheel",t,{scale:0<n?s:1/s,originX:a,originY:r})}if(i){var l=Math.abs(n);Hy(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:(0<n?1:-1)*(3<l?.4:1<l?.15:.05),originX:a,originY:r})}}}function Wy(t){Ey(this._zr,"globalPan")||Hy(this,"zoom",null,t,{scale:1<t.pinchScale?1.1:1/1.1,originX:t.pinchX,originY:t.pinchY})}function Hy(t,e,i,n,o){t.pointerChecker&&t.pointerChecker(n,o.originX,o.originY)&&(Xt(n.event),Zy(t,e,i,n,o))}function Zy(t,e,i,n,o){o.isAvailableBehavior=A(Uy,null,i,n),t.trigger(e,o)}function Uy(t,e,i){var n=i[t];return!t||n&&(!R(n)||e.event[n+"Key"])}function Xy(t,e,i){var n=t.target,o=n.position;o[0]+=e,o[1]+=i,n.dirty()}function Yy(t,e,i,n){var o=t.target,a=t.zoomLimit,r=o.position,s=o.scale,l=t.zoom=t.zoom||1;if(l*=e,a){var u=a.min||0,h=a.max||1/0;l=Math.max(Math.min(h,l),u)}var c=l/t.zoom;t.zoom=l,r[0]-=(i-r[0])*(c-1),r[1]-=(n-r[1])*(c-1),s[0]*=c,s[1]*=c,o.dirty()}xf({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},function(){}),b(zy,Ct);var jy={axisPointer:1,tooltip:1,brush:1};function qy(t,e,i){var n=e.getComponentByElement(t.topTarget),o=n&&n.coordinateSystem;return n&&n!==i&&!jy[n.mainType]&&o&&o.model!==i}function Ky(t){var e=t.getItemStyle(),i=t.get("areaColor");return null!=i&&(e.fill=i),e}function $y(i,t){t.eachChild(function(e){E(e.__regions,function(t){e.trigger(i.isSelected(t.name)?"emphasis":"normal")})})}function Jy(t,e){var i=new Ci;this.uid=Nl("ec_map_draw"),this._controller=new zy(t.getZr()),this._controllerHost={target:e?i:null},this.group=i,this._updateGroup=e,this._mouseDownFlag,this._mapName,this._initialized,i.add(this._regionsGroup=new Ci),i.add(this._backgroundGroup=new Ci)}Jy.prototype={constructor:Jy,draw:function(_,t,e,i,n){var w="geo"===_.mainType,b=_.getData&&_.getData();w&&t.eachComponent({mainType:"series",subType:"map"},function(t){b||t.getHostGeoModel()!==_||(b=t.getData())});var o=_.coordinateSystem;this._updateBackground(o);var S=this._regionsGroup,M=this.group,a=o.getTransformInfo();M.transform=a.roamTransform,M.decomposeTransform(),M.dirty();var I=a.rawScale,T=a.rawPosition;S.removeAll();var A=["itemStyle"],D=["emphasis","itemStyle"],C=["label"],L=["emphasis","label"],k=Q();E(o.regions,function(t){var e=k.get(t.name)||k.set(t.name,new Ci),a=new ps({segmentIgnoreThreshold:1,shape:{paths:[]}});e.add(a);var i,n=(x=_.getRegionModel(t.name)||_).getModel(A),o=x.getModel(D),r=Ky(n),s=Ky(o),l=x.getModel(C),u=x.getModel(L);if(b){i=b.indexOfName(t.name);var h=b.getItemVisual(i,"color",!0);h&&(r.fill=h)}function c(t){return[t[0]*I[0]+T[0],t[1]*I[1]+T[1]]}E(t.geometries,function(t){if("polygon"===t.type){for(var e=[],i=0;i<t.exterior.length;++i)e.push(c(t.exterior[i]));a.shape.paths.push(new Qr({segmentIgnoreThreshold:1,shape:{points:e}}));for(i=0;i<(t.interiors?t.interiors.length:0);++i){for(var n=t.interiors[i],o=(e=[],0);o<n.length;++o)e.push(c(n[o]));a.shape.paths.push(new Qr({segmentIgnoreThreshold:1,shape:{points:e}}))}}}),a.setStyle(r),a.style.strokeNoScale=!0,a.culling=!0;var d=l.get("show"),f=u.get("show"),p=b&&isNaN(b.get(b.mapDimension("value"),i)),g=b&&b.getItemLayout(i);if(w||p&&(d||f)||g&&g.showLabel){var m,v=w?t.name:i;(!b||0<=i)&&(m=_);var y=new Ur({position:c(t.center.slice()),scale:[1/M.scale[0],1/M.scale[1]],z2:10,silent:!0});el(y.style,y.hoverStyle={},l,u,{labelFetcher:m,labelDataIndex:v,defaultText:t.name,useInsideStyle:!1},{textAlign:"center",textVerticalAlign:"middle"}),e.add(y)}if(b)b.setItemGraphicEl(i,e);else{var x=_.getRegionModel(t.name);a.eventData={componentType:"geo",componentIndex:_.componentIndex,geoIndex:_.componentIndex,name:t.name,region:x&&x.option||{}}}(e.__regions||(e.__regions=[])).push(t),e.highDownSilentOnTouch=!!_.get("selectedMode"),$s(e,s),S.add(e)}),this._updateController(_,t,e),function(n,o,a,r,s){a.off("click"),a.off("mousedown"),o.get("selectedMode")&&(a.on("mousedown",function(){n._mouseDownFlag=!0}),a.on("click",function(t){if(n._mouseDownFlag){n._mouseDownFlag=!1;for(var e=t.target;!e.__regions;)e=e.parent;if(e){var i={type:("geo"===o.mainType?"geo":"map")+"ToggleSelect",batch:N(e.__regions,function(t){return{name:t.name,from:s.uid}})};i[o.mainType+"Id"]=o.id,r.dispatchAction(i),$y(o,a)}}}))}(this,_,S,e,i),$y(_,S)},remove:function(){this._regionsGroup.removeAll(),this._backgroundGroup.removeAll(),this._controller.dispose(),this._mapName&&ky.removeGraphic(this._mapName,this.uid),this._mapName=null,this._controllerHost={}},_updateBackground:function(t){var e=t.map;this._mapName!==e&&E(ky.makeGraphic(e,this.uid),function(t){this._backgroundGroup.add(t)},this),this._mapName=e},_updateController:function(n,t,o){var a=n.coordinateSystem,e=this._controller,i=this._controllerHost;i.zoomLimit=n.get("scaleLimit"),i.zoom=a.getZoom(),e.enable(n.get("roam")||!1);var r=n.mainType;function s(){var t={type:"geoRoam",componentType:r};return t[r+"Id"]=n.id,t}e.off("pan").on("pan",function(t){this._mouseDownFlag=!1,Xy(i,t.dx,t.dy),o.dispatchAction(k(s(),{dx:t.dx,dy:t.dy}))},this),e.off("zoom").on("zoom",function(t){if(this._mouseDownFlag=!1,Yy(i,t.scale,t.originX,t.originY),o.dispatchAction(k(s(),{zoom:t.scale,originX:t.originX,originY:t.originY})),this._updateGroup){var e=this.group.scale;this._regionsGroup.traverse(function(t){"text"===t.type&&t.attr("scale",[1/e[0],1/e[1]])})}},this),e.setPointerChecker(function(t,e,i){return a.getViewRectAfterRoam().contain(e,i)&&!qy(t,o,n)})}};var Qy="__seriesMapHighDown",tx="__seriesMapCallKey";function ex(t){var e=this[Qy];e&&e.recordVersion===this[tx]&&ix(e,t)}function ix(t,e){var i=t.circle,n=t.labelModel,o=t.hoverLabelModel,a=t.emphasisText,r=t.normalText;e?(i.style.extendFrom(nl({},o,{text:o.get("show")?a:null},{isRectText:!0,useInsideStyle:!1},!0)),i.__mapOriginalZ2=i.z2,i.z2+=bs):(nl(i.style,n,{text:n.get("show")?r:null,textPosition:n.getShallow("position")||"bottom"},{isRectText:!0,useInsideStyle:!1}),i.dirty(!1),null!=i.__mapOriginalZ2&&(i.z2=i.__mapOriginalZ2,i.__mapOriginalZ2=null))}function nx(t,e,i){var n=t.getZoom(),o=t.getCenter(),a=e.zoom,r=t.dataToPoint(o);if(null!=e.dx&&null!=e.dy){r[0]-=e.dx,r[1]-=e.dy;o=t.pointToData(r);t.setCenter(o)}if(null!=a){if(i){var s=i.min||0,l=i.max||1/0;a=Math.max(Math.min(n*a,l),s)/n}t.scale[0]*=a,t.scale[1]*=a;var u=t.position,h=(e.originX-u[0])*(a-1),c=(e.originY-u[1])*(a-1);u[0]-=h,u[1]-=c,t.updateTransform();o=t.pointToData(r);t.setCenter(o),t.setZoom(a*n)}return{center:t.getCenter(),zoom:t.getZoom()}}Df({type:"map",render:function(t,e,i,n){if(!n||"mapToggleSelect"!==n.type||n.from!==this.uid){var o=this.group;if(o.removeAll(),!t.getHostGeoModel()){if(n&&"geoRoam"===n.type&&"series"===n.componentType&&n.seriesId===t.id)(a=this._mapDraw)&&o.add(a.group);else if(t.needsDrawMap){var a=this._mapDraw||new Jy(i,!0);o.add(a.group),a.draw(t,e,i,this,n),this._mapDraw=a}else this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;t.get("showLegendSymbol")&&e.getComponent("legend")&&this._renderSymbols(t,e,i)}}},remove:function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null,this.group.removeAll()},dispose:function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null},_renderSymbols:function(x,t,e){var _=x.originalData,w=this.group;_.each(_.mapDimension("value"),function(t,e){if(!isNaN(t)){var i=_.getItemLayout(e);if(i&&i.point){var n=i.point,o=i.offset,a=new Yr({style:{fill:x.getData().getVisual("color")},shape:{cx:n[0]+9*o,cy:n[1],r:3},silent:!0,z2:8+(o?0:bs+1)});if(!o){var r=x.mainSeries.getData(),s=_.getName(e),l=r.indexOfName(s),u=_.getItemModel(e),h=u.getModel("label"),c=u.getModel("emphasis.label"),d=r.getItemGraphicEl(l),f=H(x.getFormattedLabel(l,"normal"),s),p=H(x.getFormattedLabel(l,"emphasis"),f),g=d[Qy],m=Math.random();if(!g){g=d[Qy]={};var v=T(ex,!0),y=T(ex,!1);d.on("mouseover",v).on("mouseout",y).on("emphasis",v).on("normal",y)}k(g,{recordVersion:d[tx]=m,circle:a,labelModel:h,hoverLabelModel:c,emphasisText:p,normalText:f}),ix(g,!1)}w.add(a)}}})}}),xf({type:"geoRoam",event:"geoRoam",update:"updateTransform"},function(n,t){var o=n.componentType||"series";t.eachComponent({mainType:o,query:n},function(t){var e=t.coordinateSystem;if("geo"===e.type){var i=nx(e,n,t.get("scaleLimit"));t.setCenter&&t.setCenter(i.center),t.setZoom&&t.setZoom(i.zoom),"series"===o&&E(t.seriesGroup,function(t){t.setCenter(i.center),t.setZoom(i.zoom)})}})});var ox=bt;function ax(){ve.call(this)}function rx(t){this.name=t,this.zoomLimit,ve.call(this),this._roamTransformable=new ax,this._rawTransformable=new ax,this._center,this._zoom}function sx(t,e,i,n){var o=i.seriesModel,a=o?o.coordinateSystem:null;return a===this?a[t](n):null}function lx(t,e,i,n){rx.call(this,t),this.map=e;var o=ky.load(e,i);this._nameCoordMap=o.nameCoordMap,this._regionsMap=o.regionsMap,this._invertLongitute=null==n||n,this.regions=o.regions,this._rect=o.boundingRect}function ux(t,e,i,n){var o=i.geoModel,a=i.seriesModel,r=o?o.coordinateSystem:a?a.coordinateSystem||(a.getReferringComponents("geo")[0]||{}).coordinateSystem:null;return r===this?r[t](n):null}function hx(t,e){var i=t.get("boundingCoords");if(null!=i){var n=i[0],o=i[1];isNaN(n[0])||isNaN(n[1])||isNaN(o[0])||isNaN(o[1])||this.setBoundingRect(n[0],n[1],o[0]-n[0],o[1]-n[1])}var a,r=this.getBoundingRect(),s=t.get("layoutCenter"),l=t.get("layoutSize"),u=e.getWidth(),h=e.getHeight(),c=r.width/r.height*this.aspectScale,d=!1;if(s&&l&&(s=[Rl(s[0],u),Rl(s[1],h)],l=Rl(l,Math.min(u,h)),isNaN(s[0])||isNaN(s[1])||isNaN(l)||(d=!0)),d){var f={};1<c?(f.width=l,f.height=l/c):(f.height=l,f.width=l*c),f.y=s[1]-f.height/2,f.x=s[0]-f.width/2}else(a=t.getBoxLayoutParams()).aspect=c,f=wu(a,{width:u,height:h});this.setViewRect(f.x,f.y,f.width,f.height),this.setCenter(t.get("center")),this.setZoom(t.get("zoom"))}function cx(i,t){E(t.get("geoCoord"),function(t,e){i.addGeoCoord(e,t)})}b(ax,ve),rx.prototype={constructor:rx,type:"view",dimensions:["x","y"],setBoundingRect:function(t,e,i,n){return this._rect=new Di(t,e,i,n),this._rect},getBoundingRect:function(){return this._rect},setViewRect:function(t,e,i,n){this.transformTo(t,e,i,n),this._viewRect=new Di(t,e,i,n)},transformTo:function(t,e,i,n){var o=this.getBoundingRect(),a=this._rawTransformable;a.transform=o.calculateTransform(new Di(t,e,i,n)),a.decomposeTransform(),this._updateTransform()},setCenter:function(t){t&&(this._center=t,this._updateCenterAndZoom())},setZoom:function(t){t=t||1;var e=this.zoomLimit;e&&(null!=e.max&&(t=Math.min(e.max,t)),null!=e.min&&(t=Math.max(e.min,t))),this._zoom=t,this._updateCenterAndZoom()},getDefaultCenter:function(){var t=this.getBoundingRect();return[t.x+t.width/2,t.y+t.height/2]},getCenter:function(){return this._center||this.getDefaultCenter()},getZoom:function(){return this._zoom||1},getRoamTransform:function(){return this._roamTransformable.getLocalTransform()},_updateCenterAndZoom:function(){var t=this._rawTransformable.getLocalTransform(),e=this._roamTransformable,i=this.getDefaultCenter(),n=this.getCenter(),o=this.getZoom();n=bt([],n,t),i=bt([],i,t),e.origin=n,e.position=[i[0]-n[0],i[1]-n[1]],e.scale=[o,o],this._updateTransform()},_updateTransform:function(){var t=this._roamTransformable,e=this._rawTransformable;(e.parent=t).updateTransform(),e.updateTransform(),se(this.transform||(this.transform=[]),e.transform||ae()),this._rawTransform=e.getLocalTransform(),this.invTransform=this.invTransform||[],de(this.invTransform,this.transform),this.decomposeTransform()},getTransformInfo:function(){var t=this._roamTransformable.transform,e=this._rawTransformable;return{roamTransform:t?U(t):ae(),rawScale:U(e.scale),rawPosition:U(e.position)}},getViewRect:function(){return this._viewRect},getViewRectAfterRoam:function(){var t=this.getBoundingRect().clone();return t.applyTransform(this.transform),t},dataToPoint:function(t,e,i){var n=e?this._rawTransform:this.transform;return i=i||[],n?ox(i,t,n):at(i,t)},pointToData:function(t){var e=this.invTransform;return e?ox([],t,e):[t[0],t[1]]},convertToPixel:T(sx,"dataToPoint"),convertFromPixel:T(sx,"pointToData"),containPoint:function(t){return this.getViewRectAfterRoam().contain(t[0],t[1])}},b(rx,ve),lx.prototype={constructor:lx,type:"geo",dimensions:["lng","lat"],containCoord:function(t){for(var e=this.regions,i=0;i<e.length;i++)if(e[i].contain(t))return!0;return!1},transformTo:function(t,e,i,n){var o=this.getBoundingRect(),a=this._invertLongitute;o=o.clone(),a&&(o.y=-o.y-o.height);var r=this._rawTransformable;if(r.transform=o.calculateTransform(new Di(t,e,i,n)),r.decomposeTransform(),a){var s=r.scale;s[1]=-s[1]}r.updateTransform(),this._updateTransform()},getRegion:function(t){return this._regionsMap.get(t)},getRegionByCoord:function(t){for(var e=this.regions,i=0;i<e.length;i++)if(e[i].contain(t))return e[i]},addGeoCoord:function(t,e){this._nameCoordMap.set(t,e)},getGeoCoord:function(t){return this._nameCoordMap.get(t)},getBoundingRect:function(){return this._rect},dataToPoint:function(t,e,i){if("string"==typeof t&&(t=this.getGeoCoord(t)),t)return rx.prototype.dataToPoint.call(this,t,e,i)},convertToPixel:T(ux,"dataToPoint"),convertFromPixel:T(ux,"pointToData")},b(lx,rx);var dx={dimensions:lx.prototype.dimensions,create:function(t,s){var l=[];t.eachComponent("geo",function(t,e){var i=t.get("map"),n=t.get("aspectScale"),o=!0,a=bd.retrieveMap(i);a&&a[0]&&"svg"===a[0].type?(null==n&&(n=1),o=!1):null==n&&(n=.75);var r=new lx(i+e,i,t.get("nameMap"),o);r.aspectScale=n,r.zoomLimit=t.get("scaleLimit"),l.push(r),cx(r,t),(t.coordinateSystem=r).model=t,r.resize=hx,r.resize(t,s)}),t.eachSeries(function(t){if("geo"===t.get("coordinateSystem")){var e=t.get("geoIndex")||0;t.coordinateSystem=l[e]}});var i={};return t.eachSeriesByType("map",function(t){if(!t.getHostGeoModel()){var e=t.getMapType();i[e]=i[e]||[],i[e].push(t)}}),E(i,function(t,e){var i=new lx(e,e,p(N(t,function(t){return t.get("nameMap")})));i.zoomLimit=W.apply(null,N(t,function(t){return t.get("scaleLimit")})),l.push(i),i.resize=hx,i.aspectScale=t[0].get("aspectScale"),i.resize(t[0],s),E(t,function(t){cx(t.coordinateSystem=i,t)})}),l},getFilledRegions:function(t,e,i){for(var n=(t||[]).slice(),o=Q(),a=0;a<n.length;a++)o.set(n[a].name,n[a]);return E(ky.load(e,i).regions,function(t){var e=t.name;o.get(e)||n.push({name:e})}),n}};_f("geo",dx);wf(function(i){var o={};i.eachSeriesByType("map",function(t){var e=t.getMapType();if(!t.getHostGeoModel()&&!o[e]){var l={};E(t.seriesGroup,function(t){var r=t.coordinateSystem,s=t.originalData;t.get("showLegendSymbol")&&i.getComponent("legend")&&s.each(s.mapDimension("value"),function(t,e){var i=s.getName(e),n=r.getRegion(i);if(n&&!isNaN(t)){var o=l[i]||0,a=r.dataToPoint(n.center);l[i]=o+1,s.setItemLayout(e,{point:a,offset:o})}})});var n=t.getData();n.each(function(t){var e=n.getName(t),i=n.getItemLayout(t)||{};i.showLabel=!l[e],n.setItemLayout(t,i)}),o[e]=!0}})}),bf(function(t){t.eachSeriesByType("map",function(t){var e=t.get("color"),i=t.getModel("itemStyle"),n=i.get("areaColor"),o=i.get("color")||e[t.seriesIndex%e.length];t.getData().setVisual({areaColor:n,color:o})})}),yf(Cd.PROCESSOR.STATISTIC,function(t){var n={};t.eachSeriesByType("map",function(t){var e=t.getHostGeoModel(),i=e?"o"+e.id:"i"+t.getMapType();(n[i]=n[i]||[]).push(t)}),E(n,function(t,e){for(var i=function(u,h){var c={};return E(u,function(n){n.each(n.mapDimension("value"),function(t,e){var i="ec-"+n.getName(e);c[i]=c[i]||[],isNaN(t)||c[i].push(t)})}),u[0].map(u[0].mapDimension("value"),function(t,e){for(var i,n="ec-"+u[0].getName(e),o=0,a=1/0,r=-1/0,s=c[n].length,l=0;l<s;l++)a=Math.min(a,c[n][l]),r=Math.max(r,c[n][l]),o+=c[n][l];return i="min"===h?a:"max"===h?r:"average"===h?o/s:o,0===s?NaN:i})}(N(t,function(t){return t.getData()}),t[0].get("mapValueCalculation")),n=0;n<t.length;n++)t[n].originalData=t[n].getData();for(n=0;n<t.length;n++)(t[n].seriesGroup=t)[n].needsDrawMap=0===n&&!t[n].getHostGeoModel(),t[n].setData(i.cloneShallow()),t[n].mainSeries=t[0]})}),vf(function(t){var e=[];E(t.series,function(t){t&&"map"===t.type&&(e.push(t),t.map=t.map||t.mapType,D(t,t.mapLocation))})}),Qv("map",[{type:"mapToggleSelect",event:"mapselectchanged",method:"toggleSelected"},{type:"mapSelect",event:"mapselected",method:"select"},{type:"mapUnSelect",event:"mapunselected",method:"unSelect"}]);var fx=E,px="\0__link_datas",gx="\0__link_mainData";function mx(i){var n=i.mainData,t=i.datas;t||(t={main:n},i.datasAttr={main:"data"}),i.datas=i.mainData=null,bx(n,t,i),fx(t,function(e){fx(n.TRANSFERABLE_METHODS,function(t){e.wrapMethod(t,T(vx,i))})}),n.wrapMethod("cloneShallow",T(xx,i)),fx(n.CHANGABLE_METHODS,function(t){n.wrapMethod(t,T(yx,i))}),Y(t[n.dataType]===n)}function vx(t,e){if(function(t){return t[gx]===t}(this)){var i=k({},this[px]);bx(i[this.dataType]=e,i,t)}else Sx(e,this.dataType,this[gx],t);return e}function yx(t,e){return t.struct&&t.struct.update(this),e}function xx(i,n){return fx(n[px],function(t,e){t!==n&&Sx(t.cloneShallow(),e,n,i)}),n}function _x(t){var e=this[gx];return null==t||null==e?e:e[px][t]}function bx(i,t,n){i[px]={},fx(t,function(t,e){Sx(t,e,i,n)})}function Sx(t,e,i,n){(i[px][e]=t)[gx]=i,t.dataType=e,n.struct&&(t[n.structAttr]=n.struct,n.struct[n.datasAttr[e]]=t),t.getLinkedData=_x}function Mx(t,e){this.name=t||"",this.depth=0,this.height=0,this.parentNode=null,this.dataIndex=-1,this.children=[],this.viewChildren=[],this.hostTree=e}function Ix(e,t,i){this.root,this.data,this._nodes=[],this.hostModel=e,this.levelModels=N(t||[],function(t){return new Cl(t,e,e.ecModel)}),this.leavesModel=new Cl(i||{},e,e.ecModel)}function Tx(t,e){var i=e.children;t.parentNode!==e&&(i.push(t),t.parentNode=e)}function Ax(t,e){var i=t.isExpand?t.children:[],n=t.parentNode.children,o=t.hierNode.i?n[t.hierNode.i-1]:null;if(i.length){!function(t){var e=t.children,i=e.length,n=0,o=0;for(;0<=--i;){var a=e[i];a.hierNode.prelim+=n,a.hierNode.modifier+=n,o+=a.hierNode.change,n+=a.hierNode.shift+o}}(t);var a=(i[0].hierNode.prelim+i[i.length-1].hierNode.prelim)/2;o?(t.hierNode.prelim=o.hierNode.prelim+e(t,o),t.hierNode.modifier=t.hierNode.prelim-a):t.hierNode.prelim=a}else o&&(t.hierNode.prelim=o.hierNode.prelim+e(t,o));t.parentNode.hierNode.defaultAncestor=function(t,e,i,n){if(e){for(var o=t,a=t,r=a.parentNode.children[0],s=e,l=o.hierNode.modifier,u=a.hierNode.modifier,h=r.hierNode.modifier,c=s.hierNode.modifier;s=kx(s),a=Px(a),s&&a;){o=kx(o),r=Px(r),o.hierNode.ancestor=t;var d=s.hierNode.prelim+c-a.hierNode.prelim-u+n(s,a);0<d&&(Nx((p=t,g=i,(f=s).hierNode.ancestor.parentNode===p.parentNode?f.hierNode.ancestor:g),t,d),u+=d,l+=d),c+=s.hierNode.modifier,u+=a.hierNode.modifier,l+=o.hierNode.modifier,h+=r.hierNode.modifier}s&&!kx(o)&&(o.hierNode.thread=s,o.hierNode.modifier+=c-l),a&&!Px(r)&&(r.hierNode.thread=a,r.hierNode.modifier+=u-h,i=t)}var f,p,g;return i}(t,o,t.parentNode.hierNode.defaultAncestor||n[0],e)}function Dx(t){var e=t.hierNode.prelim+t.parentNode.hierNode.modifier;t.setLayout({x:e},!0),t.hierNode.modifier+=t.parentNode.hierNode.modifier}function Cx(t){return arguments.length?t:Ox}function Lx(t,e){var i={};return t-=Math.PI/2,i.x=e*Math.cos(t),i.y=e*Math.sin(t),i}function kx(t){var e=t.children;return e.length&&t.isExpand?e[e.length-1]:t.hierNode.thread}function Px(t){var e=t.children;return e.length&&t.isExpand?e[0]:t.hierNode.thread}function Nx(t,e,i){var n=i/(e.hierNode.i-t.hierNode.i);e.hierNode.change-=n,e.hierNode.shift+=i,e.hierNode.modifier+=i,e.hierNode.prelim+=i,t.hierNode.change+=n}function Ox(t,e){return t.parentNode===e.parentNode?1:2}Mx.prototype={constructor:Mx,isRemoved:function(){return this.dataIndex<0},eachNode:function(t,e,i){"function"==typeof t&&(i=e,e=t,t=null),R(t=t||{})&&(t={order:t});var n,o=t.order||"preorder",a=this[t.attr||"children"];"preorder"===o&&(n=e.call(i,this));for(var r=0;!n&&r<a.length;r++)a[r].eachNode(t,e,i);"postorder"===o&&e.call(i,this)},updateDepthAndHeight:function(t){var e=0;this.depth=t;for(var i=0;i<this.children.length;i++){var n=this.children[i];n.updateDepthAndHeight(t+1),n.height>e&&(e=n.height)}this.height=e+1},getNodeById:function(t){if(this.getId()===t)return this;for(var e=0,i=this.children,n=i.length;e<n;e++){var o=i[e].getNodeById(t);if(o)return o}},contains:function(t){if(t===this)return!0;for(var e=0,i=this.children,n=i.length;e<n;e++){var o=i[e].contains(t);if(o)return o}},getAncestors:function(t){for(var e=[],i=t?this:this.parentNode;i;)e.push(i),i=i.parentNode;return e.reverse(),e},getValue:function(t){var e=this.hostTree.data;return e.get(e.getDimension(t||"value"),this.dataIndex)},setLayout:function(t,e){0<=this.dataIndex&&this.hostTree.data.setItemLayout(this.dataIndex,t,e)},getLayout:function(){return this.hostTree.data.getItemLayout(this.dataIndex)},getModel:function(t){if(!(this.dataIndex<0)){var e,i=this.hostTree,n=i.data.getItemModel(this.dataIndex),o=this.getLevelModel();return o||0!==this.children.length&&(0===this.children.length||!1!==this.isExpand)||(e=this.getLeavesModel()),n.getModel(t,(o||e||i.hostModel).getModel(t))}},getLevelModel:function(){return(this.hostTree.levelModels||[])[this.depth]},getLeavesModel:function(){return this.hostTree.leavesModel},setVisual:function(t,e){0<=this.dataIndex&&this.hostTree.data.setItemVisual(this.dataIndex,t,e)},getVisual:function(t,e){return this.hostTree.data.getItemVisual(this.dataIndex,t,e)},getRawIndex:function(){return this.hostTree.data.getRawIndex(this.dataIndex)},getId:function(){return this.hostTree.data.getId(this.dataIndex)},isAncestorOf:function(t){for(var e=t.parentNode;e;){if(e===this)return!0;e=e.parentNode}return!1},isDescendantOf:function(t){return t!==this&&t.isAncestorOf(this)}},Ix.prototype={constructor:Ix,type:"tree",eachNode:function(t,e,i){this.root.eachNode(t,e,i)},getNodeByDataIndex:function(t){var e=this.data.getRawIndex(t);return this._nodes[e]},getNodeByName:function(t){return this.root.getNodeByName(t)},update:function(){for(var t=this.data,e=this._nodes,i=0,n=e.length;i<n;i++)e[i].dataIndex=-1;for(i=0,n=t.count();i<n;i++)e[t.getRawIndex(i)].dataIndex=i},clearLayouts:function(){this.data.clearItemLayouts()}},Ix.createTree=function(t,e,i,n){var s=new Ix(e,i.levels,i.leaves),l=[],u=1;!function t(e,i){var n=e.value;u=Math.max(u,O(n)?n.length:1);l.push(e);var o=new Mx(e.name,s);i?Tx(o,i):s.root=o;s._nodes.push(o);var a=e.children;if(a)for(var r=0;r<a.length;r++)t(a[r],o)}(t),s.root.updateDepthAndHeight(0);var o=sp(l,{coordDimensions:["value"],dimensionsCount:u}),a=new Xf(o,e);return a.initData(l),mx({mainData:a,struct:s,structAttr:"tree"}),s.update(),n&&n(a),s},rc.extend({type:"series.tree",layoutInfo:null,layoutMode:"box",getInitialData:function(t){var e={name:t.name,children:t.data},i=t.leaves||{},n={};n.leaves=i;var o=Ix.createTree(e,this,n,function(t){t.wrapMethod("getItemModel",function(t,e){var i=o.getNodeByDataIndex(e),n=i.getLeavesModel();return i.children.length&&i.isExpand||(t.parentModel=n),t})});var a=0;o.eachNode("preorder",function(t){t.depth>a&&(a=t.depth)});var r=t.expandAndCollapse&&0<=t.initialTreeDepth?t.initialTreeDepth:a;return o.root.eachNode("preorder",function(t){var e=t.hostTree.data.getRawDataItem(t.dataIndex);t.isExpand=e&&null!=e.collapsed?!e.collapsed:t.depth<=r}),o.data},getOrient:function(){var t=this.get("orient");return"horizontal"===t?t="LR":"vertical"===t&&(t="TB"),t},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},formatTooltip:function(t){for(var e=this.getData().tree,i=e.root.children[0],n=e.getNodeByDataIndex(t),o=n.getValue(),a=n.name;n&&n!==i;)a=n.parentNode.name+"."+a,n=n.parentNode;return au(a+(isNaN(o)||null==o?"":" : "+o))},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderColor:"#c23531",borderWidth:1.5},label:{show:!0,color:"#555"},leaves:{label:{show:!0}},animationEasing:"linear",animationDuration:700,animationDurationUpdate:1e3}});var Ex=Cs({shape:{parentPoint:[],childPoints:[],orient:"",forkPosition:""},style:{stroke:"#000",fill:null},buildPath:function(t,e){var i=e.childPoints,n=i.length,o=e.parentPoint,a=i[0],r=i[n-1];if(1===n)return t.moveTo(o[0],o[1]),void t.lineTo(a[0],a[1]);var s=e.orient,l="TB"===s||"BT"===s?0:1,u=1-l,h=Rl(e.forkPosition,1),c=[];c[l]=o[l],c[u]=o[u]+(r[u]-o[u])*h,t.moveTo(o[0],o[1]),t.lineTo(c[0],c[1]),t.moveTo(a[0],a[1]),c[l]=a[l],t.lineTo(c[0],c[1]),c[l]=r[l],t.lineTo(c[0],c[1]),t.lineTo(r[0],r[1]);for(var d=1;d<n-1;d++){var f=i[d];t.moveTo(f[0],f[1]),c[l]=f[l],t.lineTo(c[0],c[1])}}});function Rx(t,e){var i=t.getItemLayout(e);return i&&!isNaN(i.x)&&!isNaN(i.y)&&"none"!==t.getItemVisual(e,"symbol")}function zx(t,e,i){return i.itemModel=e,i.itemStyle=e.getModel("itemStyle").getItemStyle(),i.hoverItemStyle=e.getModel("emphasis.itemStyle").getItemStyle(),i.lineStyle=e.getModel("lineStyle").getLineStyle(),i.labelModel=e.getModel("label"),i.hoverLabelModel=e.getModel("emphasis.label"),!1===t.isExpand&&0!==t.children.length?i.symbolInnerColor=i.itemStyle.fill:i.symbolInnerColor="#fff",i}function Bx(t,e,i,n,o,a){var r=!i,s=t.tree.getNodeByDataIndex(e),l=s.getModel(),u=(a=zx(s,l,a),t.tree.root),h=s.parentNode===u?s:s.parentNode||s,c=t.getItemGraphicEl(h.dataIndex),d=h.getLayout(),f=c?{x:c.position[0],y:c.position[1],rawX:c.__radialOldRawX,rawY:c.__radialOldRawY}:d,p=s.getLayout();r?(i=new Ug(t,e,a)).attr("position",[f.x,f.y]):i.updateData(t,e,a),i.__radialOldRawX=i.__radialRawX,i.__radialOldRawY=i.__radialRawY,i.__radialRawX=p.rawX,i.__radialRawY=p.rawY,n.add(i),t.setItemGraphicEl(e,i),cl(i,{position:[p.x,p.y]},o);var g=i.getSymbolPath();if("radial"===a.layout){var m,v,y=u.children[0],x=y.getLayout(),_=y.children.length;if(p.x===x.x&&!0===s.isExpand){var w={};w.x=(y.children[0].getLayout().x+y.children[_-1].getLayout().x)/2,w.y=(y.children[0].getLayout().y+y.children[_-1].getLayout().y)/2,(m=Math.atan2(w.y-x.y,w.x-x.x))<0&&(m=2*Math.PI+m),(v=w.x<x.x)&&(m-=Math.PI)}else(m=Math.atan2(p.y-x.y,p.x-x.x))<0&&(m=2*Math.PI+m),0===s.children.length||0!==s.children.length&&!1===s.isExpand?(v=p.x<x.x)&&(m-=Math.PI):(v=p.x>x.x)||(m-=Math.PI);var b=v?"left":"right",S=a.labelModel.get("rotate"),M=S*(Math.PI/180);g.setStyle({textPosition:a.labelModel.get("position")||b,textRotation:null==S?-m:M,textOrigin:"center",verticalAlign:"middle"})}!function(t,e,i,n,o,a,r,s,l){var u=l.edgeShape,h=n.__edge;if("curve"===u)e.parentNode&&e.parentNode!==i&&cl(h=h||(n.__edge=new ds({shape:Gx(l,o,o),style:D({opacity:0,strokeNoScale:!0},l.lineStyle)})),{shape:Gx(l,a,r),style:{opacity:1}},t);else if("polyline"===u&&"orthogonal"===l.layout&&e!==i&&e.children&&0!==e.children.length&&!0===e.isExpand){for(var c=e.children,d=[],f=0;f<c.length;f++){var p=c[f].getLayout();d.push([p.x,p.y])}cl(h=h||(n.__edge=new Ex({shape:{parentPoint:[r.x,r.y],childPoints:[[r.x,r.y]],orient:l.orient,forkPosition:l.edgeForkPosition},style:D({opacity:0,strokeNoScale:!0},l.lineStyle)})),{shape:{parentPoint:[r.x,r.y],childPoints:d},style:{opacity:1}},t)}s.add(h)}(o,s,u,i,f,d,p,n,a)}function Vx(t,e,i,n,o,a){for(var r,s=t.tree.getNodeByDataIndex(e),l=t.tree.root,u=s.getModel(),h=(a=zx(s,u,a),s.parentNode===l?s:s.parentNode||s),c=a.edgeShape;null==(r=h.getLayout());)h=h.parentNode===l?h:h.parentNode||h;cl(i,{position:[r.x+1,r.y+1]},o,function(){n.remove(i),t.setItemGraphicEl(e,null)}),i.fadeOut(null,{keepLabel:!0});var d=t.getItemGraphicEl(h.dataIndex).__edge,f=i.__edge||(!1===h.isExpand||1===h.children.length?d:void 0);c=a.edgeShape;f&&("curve"===c?cl(f,{shape:Gx(a,r,r),style:{opacity:0}},o,function(){n.remove(f)}):"polyline"===c&&"orthogonal"===a.layout&&cl(f,{shape:{parentPoint:[r.x,r.y],childPoints:[[r.x,r.y]]},style:{opacity:0}},o,function(){n.remove(f)}))}function Gx(t,e,i){var n,o,a,r,s,l,u,h,c=t.orient;if("radial"!==t.layout)return s=e.x,u=e.y,l=i.x,h=i.y,"LR"!==c&&"RL"!==c||(n=s+(l-s)*t.curvature,o=u,a=l+(s-l)*t.curvature,r=h),"TB"!==c&&"BT"!==c||(n=s,o=u+(h-u)*t.curvature,a=l,r=h+(u-h)*t.curvature),{x1:s,y1:u,x2:l,y2:h,cpx1:n,cpy1:o,cpx2:a,cpy2:r};s=e.rawX,u=e.rawY,l=i.rawX,h=i.rawY;var d=Lx(s,u),f=Lx(s,u+(h-u)*t.curvature),p=Lx(l,h+(u-h)*t.curvature),g=Lx(l,h);return{x1:d.x,y1:d.y,x2:g.x,y2:g.y,cpx1:f.x,cpy1:f.y,cpx2:p.x,cpy2:p.y}}function Fx(t,e){for(var i,n=[t];i=n.pop();)if(e(i),i.isExpand){var o=i.children;if(o.length)for(var a=o.length-1;0<=a;a--)n.push(o[a])}}Df({type:"tree",init:function(t,e){this._oldTree,this._mainGroup=new Ci,this._controller=new zy(e.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},render:function(n,t,i,e){var o=n.getData(),a=n.layoutInfo,r=this._mainGroup,s=n.get("layout");"radial"===s?r.attr("position",[a.x+a.width/2,a.y+a.height/2]):r.attr("position",[a.x,a.y]),this._updateViewCoordSys(n,a,s),this._updateController(n,t,i);var l=this._data,u={expandAndCollapse:n.get("expandAndCollapse"),layout:s,edgeShape:n.get("edgeShape"),edgeForkPosition:n.get("edgeForkPosition"),orient:n.getOrient(),curvature:n.get("lineStyle.curveness"),symbolRotate:n.get("symbolRotate"),symbolOffset:n.get("symbolOffset"),hoverAnimation:n.get("hoverAnimation"),useNameLabel:!0,fadeIn:!0};o.diff(l).add(function(t){Rx(o,t)&&Bx(o,t,null,r,n,u)}).update(function(t,e){var i=l.getItemGraphicEl(e);Rx(o,t)?Bx(o,t,i,r,n,u):i&&Vx(l,e,i,r,n,u)}).remove(function(t){var e=l.getItemGraphicEl(t);e&&Vx(l,t,e,r,n,u)}).execute(),this._nodeScaleRatio=n.get("nodeScaleRatio"),this._updateNodeAndLinkScale(n),!0===u.expandAndCollapse&&o.eachItemGraphicEl(function(t,e){t.off("click").on("click",function(){i.dispatchAction({type:"treeExpandAndCollapse",seriesId:n.id,dataIndex:e})})}),this._data=o},_updateViewCoordSys:function(t){var i=t.getData(),n=[];i.each(function(t){var e=i.getItemLayout(t);!e||isNaN(e.x)||isNaN(e.y)||n.push([+e.x,+e.y])});var e=[],o=[];Wa(n,e,o);var a=this._min,r=this._max;o[0]-e[0]==0&&(e[0]=a?a[0]:e[0]-1,o[0]=r?r[0]:o[0]+1),o[1]-e[1]==0&&(e[1]=a?a[1]:e[1]-1,o[1]=r?r[1]:o[1]+1);var s=t.coordinateSystem=new rx;s.zoomLimit=t.get("scaleLimit"),s.setBoundingRect(e[0],e[1],o[0]-e[0],o[1]-e[1]),s.setCenter(t.get("center")),s.setZoom(t.get("zoom")),this.group.attr({position:s.position,scale:s.scale}),this._viewCoordSys=s,this._min=e,this._max=o},_updateController:function(o,t,a){var e=this._controller,i=this._controllerHost,r=this.group;e.setPointerChecker(function(t,e,i){var n=r.getBoundingRect();return n.applyTransform(r.transform),n.contain(e,i)&&!qy(t,a,o)}),e.enable(o.get("roam")),i.zoomLimit=o.get("scaleLimit"),i.zoom=o.coordinateSystem.getZoom(),e.off("pan").off("zoom").on("pan",function(t){Xy(i,t.dx,t.dy),a.dispatchAction({seriesId:o.id,type:"treeRoam",dx:t.dx,dy:t.dy})},this).on("zoom",function(t){Yy(i,t.scale,t.originX,t.originY),a.dispatchAction({seriesId:o.id,type:"treeRoam",zoom:t.scale,originX:t.originX,originY:t.originY}),this._updateNodeAndLinkScale(o)},this)},_updateNodeAndLinkScale:function(t){var e=t.getData(),i=this._getNodeGlobalScale(t),n=[i,i];e.eachItemGraphicEl(function(t,e){t.attr("scale",n)})},_getNodeGlobalScale:function(t){var e=t.coordinateSystem;if("view"!==e.type)return 1;var i=this._nodeScaleRatio,n=e.scale,o=n&&n[0]||1;return((e.getZoom()-1)*i+1)/o},dispose:function(){this._controller&&this._controller.dispose(),this._controllerHost={}},remove:function(){this._mainGroup.removeAll(),this._data=null}}),xf({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(n,t){t.eachComponent({mainType:"series",subType:"tree",query:n},function(t){var e=n.dataIndex,i=t.getData().tree.getNodeByDataIndex(e);i.isExpand=!i.isExpand})}),xf({type:"treeRoam",event:"treeRoam",update:"none"},function(i,t){t.eachComponent({mainType:"series",subType:"tree",query:i},function(t){var e=nx(t.coordinateSystem,i);t.setCenter&&t.setCenter(e.center),t.setZoom&&t.setZoom(e.zoom)})});function Wx(t,e,i){if(t&&0<=_(e,t.type)){var n=i.getData().tree.root,o=t.targetNode;if("string"==typeof o&&(o=n.getNodeById(o)),o&&n.contains(o))return{node:o};var a=t.targetNodeId;if(null!=a&&(o=n.getNodeById(a)))return{node:o}}}function Hx(t){for(var e=[];t;)(t=t.parentNode)&&e.push(t);return e.reverse()}function Zx(t,e){return 0<=_(Hx(t),e)}function Ux(t,e){for(var i=[];t;){var n=t.dataIndex;i.push({name:t.name,dataIndex:n,value:e.getRawValue(n)}),t=t.parentNode}return i.reverse(),i}bf(Dm("tree","circle")),wf(function(t,e){t.eachSeriesByType("tree",function(t){!function(t,e){var i=function(t,e){return wu(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,e);t.layoutInfo=i;var n=t.get("layout"),o=0,a=0,r=null;r="radial"===n?(o=2*Math.PI,a=Math.min(i.height,i.width)/2,Cx(function(t,e){return(t.parentNode===e.parentNode?1:2)/t.depth})):(o=i.width,a=i.height,Cx());var s=t.getData().tree.root,l=s.children[0];if(l){!function(t){t.hierNode={defaultAncestor:null,ancestor:t,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var e,i,n=[t];e=n.pop();)if(i=e.children,e.isExpand&&i.length)for(var o=i.length-1;0<=o;o--){var a=i[o];a.hierNode={defaultAncestor:null,ancestor:a,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},n.push(a)}}(s),function(t,e,i){for(var n,o=[t],a=[];n=o.pop();)if(a.push(n),n.isExpand){var r=n.children;if(r.length)for(var s=0;s<r.length;s++)o.push(r[s])}for(;n=a.pop();)e(n,i)}(l,Ax,r),s.hierNode.modifier=-l.hierNode.prelim,Fx(l,Dx);var u=l,h=l,c=l;Fx(l,function(t){var e=t.getLayout().x;e<u.getLayout().x&&(u=t),e>h.getLayout().x&&(h=t),t.depth>c.depth&&(c=t)});var d=u===h?1:r(u,h)/2,f=d-u.getLayout().x,p=0,g=0,m=0,v=0;if("radial"===n)p=o/(h.getLayout().x+d+f),g=a/(c.depth-1||1),Fx(l,function(t){m=(t.getLayout().x+f)*p,v=(t.depth-1)*g;var e=Lx(m,v);t.setLayout({x:e.x,y:e.y,rawX:m,rawY:v},!0)});else{var y=t.getOrient();"RL"===y||"LR"===y?(g=a/(h.getLayout().x+d+f),p=o/(c.depth-1||1),Fx(l,function(t){v=(t.getLayout().x+f)*g,m="LR"===y?(t.depth-1)*p:o-(t.depth-1)*p,t.setLayout({x:m,y:v},!0)})):"TB"!==y&&"BT"!==y||(p=o/(h.getLayout().x+d+f),g=a/(c.depth-1||1),Fx(l,function(t){m=(t.getLayout().x+f)*p,v="TB"===y?(t.depth-1)*g:a-(t.depth-1)*g,t.setLayout({x:m,y:v},!0)}))}}}(t,e)})}),rc.extend({type:"series.treemap",layoutMode:"box",dependencies:["grid","polar"],preventUsingHoverLayer:!0,_viewRoot:null,defaultOption:{progressive:0,left:"center",top:"middle",right:null,bottom:null,width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.1024,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",borderColor:"rgba(255,255,255,0.7)",borderWidth:1,shadowColor:"rgba(150,150,150,1)",shadowBlur:3,shadowOffsetX:0,shadowOffsetY:0,textStyle:{color:"#fff"}},emphasis:{textStyle:{}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",ellipsis:!0},upperLabel:{show:!1,position:[0,"50%"],height:20,color:"#fff",ellipsis:!0,verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],color:"#fff",ellipsis:!0,verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},getInitialData:function(t,e){var i={name:t.name,children:t.data};!function i(t){var n=0;E(t.children,function(t){i(t);var e=t.value;O(e)&&(e=e[0]),n+=e});var e=t.value;O(e)&&(e=e[0]);null!=e&&!isNaN(e)||(e=n);e<0&&(e=0);O(t.value)?t.value[0]=e:t.value=e}(i);var n=t.levels||[];n=t.levels=function(t,e){var n,i=e.get("color");if(!i)return;if(E(t=t||[],function(t){var e=new Cl(t),i=e.get("color");(e.get("itemStyle.color")||i&&"none"!==i)&&(n=!0)}),!n){(t[0]||(t[0]={})).color=i.slice()}return t}(n,e);var o={};return o.levels=n,Ix.createTree(i,this,o).data},optionUpdated:function(){this.resetViewRoot()},formatTooltip:function(t){var e=this.getData(),i=this.getRawValue(t),n=O(i)?tu(i[0]):tu(i);return au(e.getName(t)+": "+n)},getDataParams:function(t){var e=rc.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(t);return e.treePathInfo=Ux(i,this),e},setLayoutInfo:function(t){this.layoutInfo=this.layoutInfo||{},k(this.layoutInfo,t)},mapIdToIndex:function(t){var e=this._idIndexMap;e||(e=this._idIndexMap=Q(),this._idIndexMapCount=0);var i=e.get(t);return null==i&&e.set(t,i=this._idIndexMapCount++),i},getViewRoot:function(){return this._viewRoot},resetViewRoot:function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getRawData().tree.root;t&&(t===e||e.contains(t))||(this._viewRoot=e)}});var Xx=5;function Yx(t){this.group=new Ci,t.add(this.group)}function jx(t,e,i,n,o,a){var r=[[o?t:t-Xx,e],[t+i,e],[t+i,e+n],[o?t:t-Xx,e+n]];return a||r.splice(2,0,[t+i+Xx,e+n/2]),o||r.push([t,e+n/2]),r}Yx.prototype={constructor:Yx,render:function(t,e,i,n){var o=t.getModel("breadcrumb"),a=this.group;if(a.removeAll(),o.get("show")&&i){var r=o.getModel("itemStyle"),s=r.getModel("textStyle"),l={pos:{left:o.get("left"),right:o.get("right"),top:o.get("top"),bottom:o.get("bottom")},box:{width:e.getWidth(),height:e.getHeight()},emptyItemWidth:o.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(i,l,s),this._renderContent(t,l,r,s,n),bu(a,l.pos,l.box)}},_prepare:function(t,e,i){for(var n=t;n;n=n.parentNode){var o=n.getModel().get("name"),a=i.getTextRect(o),r=Math.max(a.width+16,e.emptyItemWidth);e.totalWidth+=r+8,e.renderList.push({node:n,text:o,width:r})}},_renderContent:function(t,e,i,n,o){for(var a,r,s=0,l=e.emptyItemWidth,u=t.get("breadcrumb.height"),h=function(t,e,i){var n=e.width,o=e.height,a=Rl(t.x,n),r=Rl(t.y,o),s=Rl(t.x2,n),l=Rl(t.y2,o);return(isNaN(a)||isNaN(parseFloat(t.x)))&&(a=0),(isNaN(s)||isNaN(parseFloat(t.x2)))&&(s=n),(isNaN(r)||isNaN(parseFloat(t.y)))&&(r=0),(isNaN(l)||isNaN(parseFloat(t.y2)))&&(l=o),i=iu(i||0),{width:Math.max(s-a-i[1]-i[3],0),height:Math.max(l-r-i[0]-i[2],0)}}(e.pos,e.box),c=e.totalWidth,d=e.renderList,f=d.length-1;0<=f;f--){var p=d[f],g=p.node,m=p.width,v=p.text;c>h.width&&(c-=m-l,m=l,v=null);var y=new Qr({shape:{points:jx(s,0,m,u,f===d.length-1,0===f)},style:D(i.getItemStyle(),{lineJoin:"bevel",text:v,textFill:n.getTextColor(),textFont:n.getFont()}),z:10,onclick:T(o,g)});this.group.add(y),a=t,r=g,y.eventData={componentType:"series",componentSubType:"treemap",componentIndex:a.componentIndex,seriesIndex:a.componentIndex,seriesName:a.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:r&&r.dataIndex,name:r&&r.name},treePathInfo:r&&Ux(r,a)},s+=m+8}},remove:function(){this.group.removeAll()}};function qx(t){var e=a_(t);return e.stroke=e.fill=e.lineWidth=null,e}var Kx=A,$x=Ci,Jx=rs,Qx=E,t_=["label"],e_=["emphasis","label"],i_=["upperLabel"],n_=["emphasis","upperLabel"],o_=10,a_=ha([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]);function r_(c,r,s,l,u,e,d,t,i,n){if(d){var f=d.getLayout(),o=c.getData();if(o.setItemGraphicEl(d.dataIndex,null),f&&f.isInView){var h=f.width,p=f.height,g=f.borderWidth,m=f.invisible,v=d.getRawIndex(),y=t&&t.getRawIndex(),a=d.viewChildren,x=f.upperHeight,_=a&&a.length,w=d.getModel("itemStyle"),b=d.getModel("emphasis.itemStyle"),S=C("nodeGroup",$x);if(S){if(i.add(S),S.attr("position",[f.x||0,f.y||0]),S.__tmNodeWidth=h,S.__tmNodeHeight=p,f.isAboveViewRoot)return S;var M=d.getModel(),I=C("background",Jx,n,1);if(I&&function(t,e,i){if(e.dataIndex=d.dataIndex,e.seriesIndex=c.seriesIndex,e.setShape({x:0,y:0,width:h,height:p}),m)A(e);else{e.invisible=!1;var n=d.getVisual("borderColor",!0),o=b.get("borderColor"),a=qx(w);a.fill=n;var r=a_(b);if(r.fill=o,i){var s=h-2*g;D(a,r,n,s,x,{x:g,y:0,width:s,height:x})}else a.text=r.text=null;e.setStyle(a),Us(e,r)}t.add(e)}(S,I,_&&f.upperHeight),_)Qs(S)&&Js(S,!1),I&&(Js(I,!0),o.setItemGraphicEl(d.dataIndex,I));else{var T=C("content",Jx,n,2);T&&function(t,e){e.dataIndex=d.dataIndex,e.seriesIndex=c.seriesIndex;var i=Math.max(h-2*g,0),n=Math.max(p-2*g,0);if(e.culling=!0,e.setShape({x:g,y:g,width:i,height:n}),m)A(e);else{e.invisible=!1;var o=d.getVisual("color",!0),a=qx(w);a.fill=o;var r=a_(b);D(a,r,o,i,n),e.setStyle(a),Us(e,r)}t.add(e)}(S,T),I&&Qs(I)&&Js(I,!1),Js(S,!0),o.setItemGraphicEl(d.dataIndex,S)}return S}}}function A(t){t.invisible||e.push(t)}function D(t,e,i,n,o,a){var r=W(c.getFormattedLabel(d.dataIndex,"normal",null,null,a?"upperLabel":"label"),M.get("name"));if(!a&&f.isLeafRoot){var s=c.get("drillDownIcon",!0);r=s?s+" "+r:r}var l=M.getModel(a?i_:t_),u=M.getModel(a?n_:e_),h=l.getShallow("show");el(t,e,l,u,{defaultText:h?r:null,autoColor:i,isRectText:!0}),a&&(t.textRect=L(a)),t.truncate=h&&l.get("ellipsis")?{outerWidth:n,outerHeight:o,minChar:2}:null}function C(t,e,i,n){var o=null!=y&&s[t][y],a=u[t];return o?(s[t][y]=null,function(t,e,i){(t[v]={}).old="nodeGroup"===i?e.position.slice():k({},e.shape)}(a,o,t)):m||((o=new e({z:function(t,e){var i=t*o_+e;return(i-1)/i}(i,n)})).__tmDepth=i,function(t,e,i){var n=t[v]={},o=d.parentNode;if(o&&(!l||"drillDown"===l.direction)){var a=0,r=0,s=u.background[o.getRawIndex()];!l&&s&&s.old&&(a=s.old.width,r=s.old.height),n.old="nodeGroup"===i?[0,r]:{x:a,y:r,width:0,height:0}}n.fadein="nodeGroup"!==i}(a,0,o.__tmStorageName=t)),r[t][v]=o}}Df({type:"treemap",init:function(t,e){this._containerGroup,this._storage={nodeGroup:[],background:[],content:[]},this._oldTree,this._breadcrumb,this._controller,this._state="ready"},render:function(t,e,i,n){if(!(_(e.findComponents({mainType:"series",subType:"treemap",query:n}),t)<0)){this.seriesModel=t,this.api=i,this.ecModel=e;var o=Wx(n,["treemapZoomToNode","treemapRootToNode"],t),a=n&&n.type,r=t.layoutInfo,s=!this._oldTree,l=this._storage,u="treemapRootToNode"===a&&o&&l?{rootNodeGroup:l.nodeGroup[o.node.getRawIndex()],direction:n.direction}:null,h=this._giveContainerGroup(r),c=this._doRender(h,t,u);s||a&&"treemapZoomToNode"!==a&&"treemapRootToNode"!==a?c.renderFinally():this._doAnimation(h,c,t,u),this._resetController(i),this._renderBreadcrumb(t,i,o)}},_giveContainerGroup:function(t){var e=this._containerGroup;return e||(e=this._containerGroup=new $x,this._initEvents(e),this.group.add(e)),e.attr("position",[t.x,t.y]),e},_doRender:function(t,e,i){var n=e.getData().tree,o=this._oldTree,a={nodeGroup:[],background:[],content:[]},r={nodeGroup:[],background:[],content:[]},s=this._storage,l=[],c=T(r_,e,r,s,i,a,l);!function a(r,s,l,u,h){u?Qx(s=r,function(t,e){t.isRemoved()||i(e,e)}):new Lf(s,r,t,t).add(i).update(i).remove(T(i,null)).execute();function t(t){return t.getId()}function i(t,e){var i=null!=t?r[t]:null,n=null!=e?s[e]:null,o=c(i,n,l,h);o&&a(i&&i.viewChildren||[],n&&n.viewChildren||[],o,u,h+1)}}(n.root?[n.root]:[],o&&o.root?[o.root]:[],t,n===o||!o,0);var u,h,d=(h={nodeGroup:[],background:[],content:[]},(u=s)&&Qx(u,function(t,e){var i=h[e];Qx(t,function(t){t&&(i.push(t),t.__tmWillDelete=1)})}),h);return this._oldTree=n,this._storage=r,{lastsForAnimation:a,willDeleteEls:d,renderFinally:function(){Qx(d,function(t){Qx(t,function(t){t.parent&&t.parent.remove(t)})}),Qx(l,function(t){t.invisible=!0,t.dirty()})}}},_doAnimation:function(t,a,e,s){if(e.get("animation")){var l=e.get("animationDurationUpdate"),u=e.get("animationEasing"),h=function(){var a,r=[],s={};return{add:function(t,e,i,n,o){return R(n)&&(o=n,n=0),!s[t.id]&&(s[t.id]=1,r.push({el:t,target:e,time:i,delay:n,easing:o}),!0)},done:function(t){return a=t,this},start:function(){for(var t=r.length,e=0,i=r.length;e<i;e++){var n=r[e];n.el.animateTo(n.target,n.time,n.delay,n.easing,o)}return this;function o(){--t||(r.length=0,s={},a&&a())}}}}();Qx(a.willDeleteEls,function(t,r){Qx(t,function(t,e){if(!t.invisible){var i,n=t.parent;if(s&&"drillDown"===s.direction)i=n===s.rootNodeGroup?{shape:{x:0,y:0,width:n.__tmNodeWidth,height:n.__tmNodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var o=0,a=0;n.__tmWillDelete||(o=n.__tmNodeWidth/2,a=n.__tmNodeHeight/2),i="nodeGroup"===r?{position:[o,a],style:{opacity:0}}:{shape:{x:o,y:a,width:0,height:0},style:{opacity:0}}}i&&h.add(t,i,l,u)}})}),Qx(this._storage,function(t,o){Qx(t,function(t,e){var i=a.lastsForAnimation[o][e],n={};i&&("nodeGroup"===o?i.old&&(n.position=t.position.slice(),t.attr("position",i.old)):(i.old&&(n.shape=k({},t.shape),t.setShape(i.old)),i.fadein?(t.setStyle("opacity",0),n.style={opacity:1}):1!==t.style.opacity&&(n.style={opacity:1})),h.add(t,n,l,u))})},this),this._state="animating",h.done(Kx(function(){this._state="ready",a.renderFinally()},this)).start()}},_resetController:function(t){var e=this._controller;e||((e=this._controller=new zy(t.getZr())).enable(this.seriesModel.get("roam")),e.on("pan",Kx(this._onPan,this)),e.on("zoom",Kx(this._onZoom,this)));var n=new Di(0,0,t.getWidth(),t.getHeight());e.setPointerChecker(function(t,e,i){return n.contain(e,i)})},_clearController:function(){var t=this._controller;t&&(t.dispose(),t=null)},_onPan:function(t){if("animating"!==this._state&&(3<Math.abs(t.dx)||3<Math.abs(t.dy))){var e=this.seriesModel.getData().tree.root;if(!e)return;var i=e.getLayout();if(!i)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:i.x+t.dx,y:i.y+t.dy,width:i.width,height:i.height}})}},_onZoom:function(t){var e=t.originX,i=t.originY;if("animating"!==this._state){var n=this.seriesModel.getData().tree.root;if(!n)return;var o=n.getLayout();if(!o)return;var a=new Di(o.x,o.y,o.width,o.height),r=this.seriesModel.layoutInfo;e-=r.x,i-=r.y;var s=ae();ue(s,s,[-e,-i]),ce(s,s,[t.scale,t.scale]),ue(s,s,[e,i]),a.applyTransform(s),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:a.x,y:a.y,width:a.width,height:a.height}})}},_initEvents:function(t){t.on("click",function(t){if("ready"===this._state){var e=this.seriesModel.get("nodeClick",!0);if(e){var i=this.findTarget(t.offsetX,t.offsetY);if(i){var n=i.node;if(n.getLayout().isLeafRoot)this._rootToNode(i);else if("zoomToNode"===e)this._zoomToNode(i);else if("link"===e){var o=n.hostTree.data.getItemModel(n.dataIndex),a=o.get("link",!0),r=o.get("target",!0)||"blank";a&&window.open(a,r)}}}}},this)},_renderBreadcrumb:function(e,t,i){i=i||((i=null!=e.get("leafDepth",!0)?{node:e.getViewRoot()}:this.findTarget(t.getWidth()/2,t.getHeight()/2))||{node:e.getData().tree.root}),(this._breadcrumb||(this._breadcrumb=new Yx(this.group))).render(e,t,i.node,Kx(function(t){"animating"!==this._state&&(Zx(e.getViewRoot(),t)?this._rootToNode({node:t}):this._zoomToNode({node:t}))},this))},remove:function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage={nodeGroup:[],background:[],content:[]},this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},dispose:function(){this._clearController()},_zoomToNode:function(t){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},_rootToNode:function(t){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},findTarget:function(o,a){var r;return this.seriesModel.getViewRoot().eachNode({attr:"viewChildren",order:"preorder"},function(t){var e=this._storage.background[t.getRawIndex()];if(e){var i=e.transformCoordToLocal(o,a),n=e.shape;if(!(n.x<=i[0]&&i[0]<=n.x+n.width&&n.y<=i[1]&&i[1]<=n.y+n.height))return!1;r={node:t,offsetX:i[0],offsetY:i[1]}}},this),r}});for(var s_=function(){},l_=["treemapZoomToNode","treemapRender","treemapMove"],u_=0;u_<l_.length;u_++)xf({type:l_[u_],update:"updateView"},s_);xf({type:"treemapRootToNode",update:"updateView"},function(o,t){t.eachComponent({mainType:"series",subType:"treemap",query:o},function(t,e){var i=Wx(o,["treemapZoomToNode","treemapRootToNode"],t);if(i){var n=t.getViewRoot();n&&(o.direction=Zx(n,i.node)?"rollUp":"drillDown"),t.resetViewRoot(i.node)}})});var h_=E,c_=z,d_=-1,f_=function(t){var e=t.mappingMethod,i=t.type,n=this.option=L(t);this.type=i,this.mappingMethod=e,this._normalizeData=M_[e];var o=p_[i];this.applyVisual=o.applyVisual,this.getColorMapper=o.getColorMapper,this._doMap=o._doMap[e],"piecewise"===e?(g_(n),function(i){var t=i.pieceList;i.hasSpecialVisual=!1,E(t,function(t,e){t.originIndex=e,null!=t.visual&&(i.hasSpecialVisual=!0)})}(n)):"category"===e?n.categories?function(t){var e=t.categories,i=t.visual,n=t.categoryMap={};if(h_(e,function(t,e){n[t]=e}),!O(i)){var o=[];z(i)?h_(i,function(t,e){var i=n[e];o[null!=i?i:d_]=t}):o[d_]=i,i=S_(t,o)}for(var a=e.length-1;0<=a;a--)null==i[a]&&(delete n[e[a]],e.pop())}(n):g_(n,!0):(Y("linear"!==e||n.dataExtent),g_(n))};f_.prototype={constructor:f_,mapValueToVisual:function(t){var e=this._normalizeData(t);return this._doMap(e,t)},getNormalizer:function(){return A(this._normalizeData,this)}};var p_=f_.visualHandlers={color:{applyVisual:y_("color"),getColorMapper:function(){var o=this.option;return A("category"===o.mappingMethod?function(t,e){return e||(t=this._normalizeData(t)),x_.call(this,t)}:function(t,e,i){var n=!!i;return e||(t=this._normalizeData(t)),i=Ue(t,o.parsedVisual,i),n?i:$e(i,"rgba")},this)},_doMap:{linear:function(t){return $e(Ue(t,this.option.parsedVisual),"rgba")},category:x_,piecewise:function(t,e){var i=b_.call(this,e);return null==i&&(i=$e(Ue(t,this.option.parsedVisual),"rgba")),i},fixed:__}},colorHue:m_(function(t,e){return qe(t,e)}),colorSaturation:m_(function(t,e){return qe(t,null,e)}),colorLightness:m_(function(t,e){return qe(t,null,null,e)}),colorAlpha:m_(function(t,e){return Ke(t,e)}),opacity:{applyVisual:y_("opacity"),_doMap:w_([0,1])},liftZ:{applyVisual:y_("liftZ"),_doMap:{linear:__,category:__,piecewise:__,fixed:__}},symbol:{applyVisual:function(t,e,i){var n=this.mapValueToVisual(t);if(R(n))i("symbol",n);else if(c_(n))for(var o in n)n.hasOwnProperty(o)&&i(o,n[o])},_doMap:{linear:v_,category:x_,piecewise:function(t,e){var i=b_.call(this,e);return null==i&&(i=v_.call(this,t)),i},fixed:__}},symbolSize:{applyVisual:y_("symbolSize"),_doMap:w_([0,1])}};function g_(t,e){var i=t.visual,n=[];z(i)?h_(i,function(t){n.push(t)}):null!=i&&n.push(i);e||1!==n.length||{color:1,symbol:1}.hasOwnProperty(t.type)||(n[1]=n[0]),S_(t,n)}function m_(n){return{applyVisual:function(t,e,i){t=this.mapValueToVisual(t),i("color",n(e("color"),t))},_doMap:w_([0,1])}}function v_(t){var e=this.option.visual;return e[Math.round(El(t,[0,1],[0,e.length-1],!0))]||{}}function y_(n){return function(t,e,i){i(n,this.mapValueToVisual(t))}}function x_(t){var e=this.option.visual;return e[this.option.loop&&t!==d_?t%e.length:t]}function __(){return this.option.visual[0]}function w_(n){return{linear:function(t){return El(t,n,this.option.visual,!0)},category:x_,piecewise:function(t,e){var i=b_.call(this,e);return null==i&&(i=El(t,n,this.option.visual,!0)),i},fixed:__}}function b_(t){var e=this.option,i=e.pieceList;if(e.hasSpecialVisual){var n=i[f_.findPieceIndex(t,i)];if(n&&n.visual)return n.visual[this.type]}}function S_(t,e){return t.visual=e,"color"===t.type&&(t.parsedVisual=N(e,function(t){return Fe(t)})),e}var M_={linear:function(t){return El(t,this.option.dataExtent,[0,1],!0)},piecewise:function(t){var e=this.option.pieceList,i=f_.findPieceIndex(t,e,!0);if(null!=i)return El(i,[0,e.length-1],[0,1],!0)},category:function(t){var e=this.option.categories?this.option.categoryMap[t]:t;return null==e?d_:e},fixed:et};function I_(t,e,i){return t?e<=i:e<i}f_.listVisualTypes=function(){var i=[];return E(p_,function(t,e){i.push(e)}),i},f_.addVisualHandler=function(t,e){p_[t]=e},f_.isValidType=function(t){return p_.hasOwnProperty(t)},f_.eachVisual=function(t,e,i){z(t)?E(t,e,i):e.call(i,t)},f_.mapVisual=function(t,n,o){var a,r=O(t)?[]:z(t)?{}:(a=!0,null);return f_.eachVisual(t,function(t,e){var i=n.call(o,t,e);a?r=i:r[e]=i}),r},f_.retrieveVisuals=function(i){var n,o={};return i&&h_(p_,function(t,e){i.hasOwnProperty(e)&&(o[e]=i[e],n=!0)}),n?o:null},f_.prepareVisualTypes=function(t){if(c_(t)){var i=[];h_(t,function(t,e){i.push(e)}),t=i}else{if(!O(t))return[];t=t.slice()}return t.sort(function(t,e){return"color"===e&&"color"!==t&&0===t.indexOf("color")?1:-1}),t},f_.dependsOn=function(t,e){return"color"===e?!(!t||0!==t.indexOf(e)):t===e},f_.findPieceIndex=function(n,t,e){for(var o,a=1/0,i=0,r=t.length;i<r;i++){var s=t[i].value;if(null!=s){if(s===n||"string"==typeof s&&s===n+"")return i;e&&c(s,i)}}for(i=0,r=t.length;i<r;i++){var l=t[i],u=l.interval,h=l.close;if(u){if(u[0]===-1/0){if(I_(h[1],n,u[1]))return i}else if(u[1]===1/0){if(I_(h[0],u[0],n))return i}else if(I_(h[0],u[0],n)&&I_(h[1],n,u[1]))return i;e&&c(u[0],i),e&&c(u[1],i)}}if(e)return n===1/0?t.length-1:n===-1/0?0:o;function c(t,e){var i=Math.abs(t-n);i<a&&(a=i,o=e)}};var T_=O,A_="itemStyle",D_={seriesType:"treemap",reset:function(t,e,i,n){var o=t.getData().tree,a=o.root,r=t.getModel(A_);a.isRemoved()||!function n(t,e,o,a,r,s){var l=t.getModel();var i=t.getLayout();if(!i||i.invisible||!i.isInView)return;var u=t.getModel(A_);var h=o[t.depth];var c=C_(u,e,h,a);var d=u.get("borderColor");var f=u.get("borderColorSaturation");var p;null!=f&&(p=L_(c),g=f,d=null!=(m=p)?qe(m,null,null,g):null);var g,m;t.setVisual("borderColor",d);var v=t.viewChildren;if(v&&v.length){var y=P_(t,l,i,u,c,v);E(v,function(t,e){if(t.depth>=r.length||t===r[t.depth]){var i=O_(l,c,t,e,y,s);n(t,i,o,a,r,s)}})}else p=L_(c),t.setVisual("color",p)}(a,{},N(o.levelModels,function(t){return t?t.get(A_):null}),r,t.getViewRoot().getAncestors(),t)}};function C_(i,n,o,a){var r=k({},n);return E(["color","colorAlpha","colorSaturation"],function(t){var e=i.get(t,!0);null==e&&o&&(e=o[t]),null==e&&(e=n[t]),null==e&&(e=a.get(t)),null!=e&&(r[t]=e)}),r}function L_(t){var e=k_(t,"color");if(e){var i=k_(t,"colorAlpha"),n=k_(t,"colorSaturation");return n&&(e=qe(e,null,null,n)),i&&(e=Ke(e,i)),e}}function k_(t,e){var i=t[e];if(null!=i&&"none"!==i)return i}function P_(t,e,i,n,o,a){if(a&&a.length){var r=N_(e,"color")||null!=o.color&&"none"!==o.color&&(N_(e,"colorAlpha")||N_(e,"colorSaturation"));if(r){var s=e.get("visualMin"),l=e.get("visualMax"),u=i.dataExtent.slice();null!=s&&s<u[0]&&(u[0]=s),null!=l&&l>u[1]&&(u[1]=l);var h=e.get("colorMappingBy"),c={type:r.name,dataExtent:u,visual:r.range};"color"!==c.type||"index"!==h&&"id"!==h?c.mappingMethod="linear":(c.mappingMethod="category",c.loop=!0);var d=new f_(c);return d.__drColorMappingBy=h,d}}}function N_(t,e){var i=t.get(e);return T_(i)&&i.length?{name:e,range:i}:null}function O_(t,e,i,n,o,a){var r=k({},e);if(o){var s=o.type,l="color"===s&&o.__drColorMappingBy,u="index"===l?n:"id"===l?a.mapIdToIndex(i.getId()):i.getValue(t.get("visualDimension"));r[s]=o.mapValueToVisual(u)}return r}var E_=Math.max,R_=Math.min,z_=W,B_=E,V_=["itemStyle","borderWidth"],G_=["itemStyle","gapWidth"],F_=["upperLabel","show"],W_=["upperLabel","height"],H_={seriesType:"treemap",reset:function(t,e,i,n){var o=i.getWidth(),a=i.getHeight(),r=t.option,s=wu(t.getBoxLayoutParams(),{width:i.getWidth(),height:i.getHeight()}),l=r.size||[],u=Rl(z_(s.width,l[0]),o),h=Rl(z_(s.height,l[1]),a),c=n&&n.type,d=Wx(n,["treemapZoomToNode","treemapRootToNode"],t),f="treemapRender"===c||"treemapMove"===c?n.rootRect:null,p=t.getViewRoot(),g=Hx(p);if("treemapMove"!==c){var m="treemapZoomToNode"===c?function(t,e,i,n,o){var a,r=(e||{}).node,s=[n,o];if(!r||r===i)return s;var l=n*o,u=l*t.option.zoomToNodeRatio;for(;a=r.parentNode;){for(var h=0,c=a.children,d=0,f=c.length;d<f;d++)h+=c[d].getValue();var p=r.getValue();if(0===p)return s;u*=h/p;var g=a.getModel(),m=g.get(V_),v=Math.max(m,Y_(g));u+=4*m*m+(3*m+v)*Math.pow(u,.5),Hl<u&&(u=Hl),r=a}u<l&&(u=l);var y=Math.pow(u/l,.5);return[n*y,o*y]}(t,d,p,u,h):f?[f.width,f.height]:[u,h],v=r.sort;v&&"asc"!==v&&"desc"!==v&&(v="desc");var y={squareRatio:r.squareRatio,sort:v,leafDepth:r.leafDepth};p.hostTree.clearLayouts();var x={x:0,y:0,width:m[0],height:m[1],area:m[0]*m[1]};p.setLayout(x),function t(e,i,n,o){var a;var r;if(e.isRemoved())return;var s=e.getLayout();a=s.width;r=s.height;var l=e.getModel();var u=l.get(V_);var h=l.get(G_)/2;var c=Y_(l);var d=Math.max(u,c);var f=u-h;var p=d-h;var l=e.getModel();e.setLayout({borderWidth:u,upperHeight:d,upperLabelHeight:c},!0);a=E_(a-2*f,0);r=E_(r-f-p,0);var g=a*r;var m=Z_(e,l,g,i,n,o);if(!m.length)return;var v={x:f,y:p,width:a,height:r};var y=R_(a,r);var x=1/0;var _=[];_.area=0;for(var w=0,b=m.length;w<b;){var S=m[w];_.push(S),_.area+=S.getLayout().area;var M=U_(_,y,i.squareRatio);x=M<=x?(w++,M):(_.area-=_.pop().getLayout().area,X_(_,y,v,h,!1),y=R_(v.width,v.height),_.length=_.area=0,1/0)}_.length&&X_(_,y,v,h,!0);if(!n){var I=l.get("childrenVisibleMin");null!=I&&g<I&&(n=!0)}for(var w=0,b=m.length;w<b;w++)t(m[w],i,n,o+1)}(p,y,!1,0);x=p.getLayout();B_(g,function(t,e){var i=(g[e+1]||p).getValue();t.setLayout(k({dataExtent:[i,i],borderWidth:0,upperHeight:0},x))})}var _=t.getData().tree.root;_.setLayout(function(t,e,i){if(e)return{x:e.x,y:e.y};var n={x:0,y:0};if(!i)return n;var o=i.node,a=o.getLayout();if(!a)return n;var r=[a.width/2,a.height/2],s=o;for(;s;){var l=s.getLayout();r[0]+=l.x,r[1]+=l.y,s=s.parentNode}return{x:t.width/2-r[0],y:t.height/2-r[1]}}(s,f,d),!0),t.setLayoutInfo(s),function e(t,i,n,o,a){var r=t.getLayout();var s=n[a];var l=s&&s===t;if(s&&!l||a===n.length&&t!==o)return;t.setLayout({isInView:!0,invisible:!l&&!i.intersect(r),isAboveViewRoot:l},!0);var u=new Di(i.x-r.x,i.y-r.y,i.width,i.height);B_(t.viewChildren||[],function(t){e(t,u,n,o,a+1)})}(_,new Di(-s.x,-s.y,o,a),g,p,0)}};function Z_(t,e,i,n,o,a){var r=t.children||[],s=n.sort;"asc"!==s&&"desc"!==s&&(s=null);var l=null!=n.leafDepth&&n.leafDepth<=a;if(o&&!l)return t.viewChildren=[];!function(t,n){n&&t.sort(function(t,e){var i="asc"===n?t.getValue()-e.getValue():e.getValue()-t.getValue();return 0==i?"asc"===n?t.dataIndex-e.dataIndex:e.dataIndex-t.dataIndex:i})}(r=M(r,function(t){return!t.isRemoved()}),s);var u=function(t,e,i){for(var n=0,o=0,a=e.length;o<a;o++)n+=e[o].getValue();var r=t.get("visualDimension");if(e&&e.length)if("value"===r&&i)s=[e[e.length-1].getValue(),e[0].getValue()],"asc"===i&&s.reverse();else{var s=[1/0,-1/0];B_(e,function(t){var e=t.getValue(r);e<s[0]&&(s[0]=e),e>s[1]&&(s[1]=e)})}else s=[NaN,NaN];return{sum:n,dataExtent:s}}(e,r,s);if(0===u.sum)return t.viewChildren=[];if(u.sum=function(t,e,i,n,o){if(!n)return i;for(var a=t.get("visibleMin"),r=o.length,s=r,l=r-1;0<=l;l--){var u=o["asc"===n?r-l-1:l].getValue();u/i*e<a&&(s=l,i-=u)}return"asc"===n?o.splice(0,r-s):o.splice(s,r-s),i}(e,i,u.sum,s,r),0===u.sum)return t.viewChildren=[];for(var h=0,c=r.length;h<c;h++){var d=r[h].getValue()/u.sum*i;r[h].setLayout({area:d})}return l&&(r.length&&t.setLayout({isLeafRoot:!0},!0),r.length=0),t.viewChildren=r,t.setLayout({dataExtent:u.dataExtent},!0),r}function U_(t,e,i){for(var n,o=0,a=1/0,r=0,s=t.length;r<s;r++)(n=t[r].getLayout().area)&&(n<a&&(a=n),o<n&&(o=n));var l=t.area*t.area,u=e*e*i;return l?E_(u*o/l,l/(u*a)):1/0}function X_(t,e,i,n,o){var a=e===i.width?0:1,r=1-a,s=["x","y"],l=["width","height"],u=i[s[a]],h=e?t.area/e:0;(o||h>i[l[r]])&&(h=i[l[r]]);for(var c=0,d=t.length;c<d;c++){var f=t[c],p={},g=h?f.getLayout().area/h:0,m=p[l[r]]=E_(h-2*n,0),v=i[s[a]]+i[l[a]]-u,y=c===d-1||v<g?v:g,x=p[l[a]]=E_(y-2*n,0);p[s[r]]=i[s[r]]+R_(n,m/2),p[s[a]]=u+R_(n,x/2),u+=y,f.setLayout(p,!0)}i[s[r]]+=h,i[l[r]]-=h}function Y_(t){return t.get(F_)?t.get(W_):0}function j_(t){return"_EC_"+t}bf(D_),wf(H_);function q_(t){this._directed=t||!1,this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this.data,this.edgeData}var K_=q_.prototype;function $_(t,e){this.id=null==t?"":t,this.inEdges=[],this.outEdges=[],this.edges=[],this.hostGraph,this.dataIndex=null==e?-1:e}function J_(t,e,i){this.node1=t,this.node2=e,this.dataIndex=null==i?-1:i}K_.type="graph",K_.isDirected=function(){return this._directed},K_.addNode=function(t,e){t=null==t?""+e:""+t;var i=this._nodesMap;if(!i[j_(t)]){var n=new $_(t,e);return(n.hostGraph=this).nodes.push(n),i[j_(t)]=n}},K_.getNodeByIndex=function(t){var e=this.data.getRawIndex(t);return this.nodes[e]},K_.getNodeById=function(t){return this._nodesMap[j_(t)]},K_.addEdge=function(t,e,i){var n=this._nodesMap,o=this._edgesMap;if("number"==typeof t&&(t=this.nodes[t]),"number"==typeof e&&(e=this.nodes[e]),$_.isInstance(t)||(t=n[j_(t)]),$_.isInstance(e)||(e=n[j_(e)]),t&&e){var a=t.id+"-"+e.id;if(!o[a]){var r=new J_(t,e,i);return(r.hostGraph=this)._directed&&(t.outEdges.push(r),e.inEdges.push(r)),t.edges.push(r),t!==e&&e.edges.push(r),this.edges.push(r),o[a]=r}}},K_.getEdgeByIndex=function(t){var e=this.edgeData.getRawIndex(t);return this.edges[e]},K_.getEdge=function(t,e){$_.isInstance(t)&&(t=t.id),$_.isInstance(e)&&(e=e.id);var i=this._edgesMap;return this._directed?i[t+"-"+e]:i[t+"-"+e]||i[e+"-"+t]},K_.eachNode=function(t,e){for(var i=this.nodes,n=i.length,o=0;o<n;o++)0<=i[o].dataIndex&&t.call(e,i[o],o)},K_.eachEdge=function(t,e){for(var i=this.edges,n=i.length,o=0;o<n;o++)0<=i[o].dataIndex&&0<=i[o].node1.dataIndex&&0<=i[o].node2.dataIndex&&t.call(e,i[o],o)},K_.breadthFirstTraverse=function(t,e,i,n){if($_.isInstance(e)||(e=this._nodesMap[j_(e)]),e){for(var o="out"===i?"outEdges":"in"===i?"inEdges":"edges",a=0;a<this.nodes.length;a++)this.nodes[a].__visited=!1;if(!t.call(n,e,null))for(var r=[e];r.length;){var s=r.shift(),l=s[o];for(a=0;a<l.length;a++){var u=l[a],h=u.node1===s?u.node2:u.node1;if(!h.__visited){if(t.call(n,h,s))return;r.push(h),h.__visited=!0}}}}},K_.update=function(){for(var t=this.data,i=this.edgeData,e=this.nodes,n=this.edges,o=0,a=e.length;o<a;o++)e[o].dataIndex=-1;for(o=0,a=t.count();o<a;o++)e[t.getRawIndex(o)].dataIndex=o;i.filterSelf(function(t){var e=n[i.getRawIndex(t)];return 0<=e.node1.dataIndex&&0<=e.node2.dataIndex});for(o=0,a=n.length;o<a;o++)n[o].dataIndex=-1;for(o=0,a=i.count();o<a;o++)n[i.getRawIndex(o)].dataIndex=o},K_.clone=function(){for(var t=new q_(this._directed),e=this.nodes,i=this.edges,n=0;n<e.length;n++)t.addNode(e[n].id,e[n].dataIndex);for(n=0;n<i.length;n++){var o=i[n];t.addEdge(o.node1.id,o.node2.id,o.dataIndex)}return t},$_.prototype={constructor:$_,degree:function(){return this.edges.length},inDegree:function(){return this.inEdges.length},outDegree:function(){return this.outEdges.length},getModel:function(t){if(!(this.dataIndex<0))return this.hostGraph.data.getItemModel(this.dataIndex).getModel(t)}},J_.prototype.getModel=function(t){if(!(this.dataIndex<0))return this.hostGraph.edgeData.getItemModel(this.dataIndex).getModel(t)};function Q_(i,n){return{getValue:function(t){var e=this[i][n];return e.get(e.getDimension(t||"value"),this.dataIndex)},setVisual:function(t,e){0<=this.dataIndex&&this[i][n].setItemVisual(this.dataIndex,t,e)},getVisual:function(t,e){return this[i][n].getItemVisual(this.dataIndex,t,e)},setLayout:function(t,e){0<=this.dataIndex&&this[i][n].setItemLayout(this.dataIndex,t,e)},getLayout:function(){return this[i][n].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[i][n].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[i][n].getRawIndex(this.dataIndex)}}}b($_,Q_("hostGraph","data")),b(J_,Q_("hostGraph","edgeData")),q_.Node=$_,q_.Edge=J_,ra($_),ra(J_);function tw(t,e,i,n,o){for(var a=new q_(n),r=0;r<t.length;r++)a.addNode(W(t[r].id,t[r].name,r),r);var s=[],l=[],u=0;for(r=0;r<e.length;r++){var h=e[r],c=h.source,d=h.target;a.addEdge(c,d,u)&&(l.push(h),s.push(W(h.id,c+" > "+d)),u++)}var f,p=i.get("coordinateSystem");if("cartesian2d"===p||"polar"===p)f=pp(t,i);else{var g=sh.get(p),m=g&&"view"!==g.type&&g.dimensions||[];_(m,"value")<0&&m.concat(["value"]);var v=sp(t,{coordDimensions:m});(f=new Xf(v,i)).initData(t)}var y=new Xf(["value"],i);return y.initData(l,s),o&&o(f,y),mx({mainData:f,struct:a,structAttr:"graph",datas:{node:f,edge:y},datasAttr:{node:"data",edge:"edgeData"}}),a.update(),a}var ew=Af({type:"series.graph",init:function(t){ew.superApply(this,"init",arguments);var e=this;function i(){return e._categoriesData}this.legendVisualProvider=new Yv(i,i),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},mergeOption:function(t){ew.superApply(this,"mergeOption",arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},mergeDefaultAndTheme:function(t){ew.superApply(this,"mergeDefaultAndTheme",arguments),Go(t,["edgeLabel"],["show"])},getInitialData:function(t,s){var e=t.edges||t.links||[],i=t.data||t.nodes||[],l=this;if(i&&e)return tw(i,e,this,!0,function(t,e){t.wrapMethod("getItemModel",function(t){var e=l._categoriesModels[t.getShallow("category")];return e&&(e.parentModel=t.parentModel,t.parentModel=e),t});var i=l.getModel("edgeLabel"),n=new Cl({label:i.option},i.parentModel,s),o=l.getModel("emphasis.edgeLabel"),a=new Cl({emphasis:{label:o.option}},o.parentModel,s);function r(t){return(t=this.parsePath(t))&&"label"===t[0]?n:t&&"emphasis"===t[0]&&"label"===t[1]?a:this.parentModel}e.wrapMethod("getItemModel",function(t){return t.customizeGetParent(r),t})}).data},getGraph:function(){return this.getData().graph},getEdgeData:function(){return this.getGraph().edgeData},getCategoriesData:function(){return this._categoriesData},formatTooltip:function(t,e,i){if("edge"!==i)return ew.superApply(this,"formatTooltip",arguments);var n=this.getData(),o=this.getDataParams(t,i),a=n.graph.getEdgeByIndex(t),r=n.getName(a.node1.dataIndex),s=n.getName(a.node2.dataIndex),l=[];return null!=r&&l.push(r),null!=s&&l.push(s),l=au(l.join(" > ")),o.value&&(l+=" : "+au(o.value)),l},_updateCategoriesData:function(){var t=N(this.option.categories||[],function(t){return null!=t.value?t:k({value:0},t)}),e=new Xf(["value"],this);e.initData(t),this._categoriesData=e,this._categoriesModels=e.mapArray(function(t){return e.getItemModel(t,!0)})},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},isAnimationEnabled:function(){return ew.superCall(this,"isAnimationEnabled")&&!("force"===this.get("layout")&&this.get("force.layoutAnimation"))},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",legendHoverLink:!0,hoverAnimation:!0,layout:null,focusNodeAdjacency:!1,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,curveness:0,opacity:.5},emphasis:{label:{show:!0}}}}),iw=ls.prototype,nw=ds.prototype;function ow(t){return isNaN(+t.cpx1)||isNaN(+t.cpy1)}var aw=Cs({type:"ec-line",style:{stroke:"#000",fill:null},shape:{x1:0,y1:0,x2:0,y2:0,percent:1,cpx1:null,cpy1:null},buildPath:function(t,e){this[ow(e)?"_buildPathLine":"_buildPathCurve"](t,e)},_buildPathLine:iw.buildPath,_buildPathCurve:nw.buildPath,pointAt:function(t){return this[ow(this.shape)?"_pointAtLine":"_pointAtCurve"](t)},_pointAtLine:iw.pointAt,_pointAtCurve:nw.pointAt,tangentAt:function(t){var e=this.shape,i=ow(e)?[e.x2-e.x1,e.y2-e.y1]:this._tangentAtCurve(t);return mt(i,i)},_tangentAtCurve:nw.tangentAt}),rw=["fromSymbol","toSymbol"];function sw(t){return"_"+t+"Type"}function lw(t,e,i){var n=e.getItemVisual(i,"color"),o=e.getItemVisual(i,t),a=e.getItemVisual(i,t+"Size");if(o&&"none"!==o){O(a)||(a=[a,a]);var r=_g(o,-a[0]/2,-a[1]/2,a[0],a[1],n);return r.name=t,r}}function uw(t,e){t.x1=e[0][0],t.y1=e[0][1],t.x2=e[1][0],t.y2=e[1][1],t.percent=1;var i=e[2];i?(t.cpx1=i[0],t.cpy1=i[1]):(t.cpx1=NaN,t.cpy1=NaN)}function hw(t,e,i){Ci.call(this),this._createLine(t,e,i)}var cw=hw.prototype;function dw(t){this._ctor=t||hw,this.group=new Ci}cw.beforeUpdate=function(){var t=this.childOfName("fromSymbol"),e=this.childOfName("toSymbol"),i=this.childOfName("label");if(t||e||!i.ignore){for(var n=1,o=this.parent;o;)o.scale&&(n/=o.scale[0]),o=o.parent;var a=this.childOfName("line");if(this.__dirty||a.__dirty){var r=a.shape.percent,s=a.pointAt(0),l=a.pointAt(r),u=ht([],l,s);if(mt(u,u),t){t.attr("position",s);var h=a.tangentAt(0);t.attr("rotation",Math.PI/2-Math.atan2(h[1],h[0])),t.attr("scale",[n*r,n*r])}if(e){e.attr("position",l);h=a.tangentAt(1);e.attr("rotation",-Math.PI/2-Math.atan2(h[1],h[0])),e.attr("scale",[n*r,n*r])}if(!i.ignore){var c,d,f,p;i.attr("position",l);var g=i.__labelDistance,m=g[0]*n,v=g[1]*n,y=r/2,x=[(h=a.tangentAt(y))[1],-h[0]],_=a.pointAt(y);0<x[1]&&(x[0]=-x[0],x[1]=-x[1]);var w,b=h[0]<0?-1:1;if("start"!==i.__position&&"end"!==i.__position){var S=-Math.atan2(h[1],h[0]);l[0]<s[0]&&(S=Math.PI+S),i.attr("rotation",S)}switch(i.__position){case"insideStartTop":case"insideMiddleTop":case"insideEndTop":case"middle":w=-v,f="bottom";break;case"insideStartBottom":case"insideMiddleBottom":case"insideEndBottom":w=v,f="top";break;default:w=0,f="middle"}switch(i.__position){case"end":c=[u[0]*m+l[0],u[1]*v+l[1]],d=.8<u[0]?"left":u[0]<-.8?"right":"center",f=.8<u[1]?"top":u[1]<-.8?"bottom":"middle";break;case"start":c=[-u[0]*m+s[0],-u[1]*v+s[1]],d=.8<u[0]?"right":u[0]<-.8?"left":"center",f=.8<u[1]?"bottom":u[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":c=[m*b+s[0],s[1]+w],d=h[0]<0?"right":"left",p=[-m*b,-w];break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":c=[_[0],_[1]+w],d="center",p=[0,-w];break;case"insideEndTop":case"insideEnd":case"insideEndBottom":c=[-m*b+l[0],l[1]+w],d=0<=h[0]?"right":"left",p=[m*b,-w]}i.attr({style:{textVerticalAlign:i.__verticalAlign||f,textAlign:i.__textAlign||d},position:c,scale:[n,n],origin:p})}}}},cw._createLine=function(i,n,t){var e=i.hostModel,o=function(t){var e=new aw({name:"line",subPixelOptimize:!0});return uw(e.shape,t),e}(i.getItemLayout(n));o.shape.percent=0,dl(o,{shape:{percent:1}},e,n),this.add(o);var a=new Ur({name:"label",lineLabelOriginalOpacity:1});this.add(a),E(rw,function(t){var e=lw(t,i,n);this.add(e),this[sw(t)]=i.getItemVisual(n,t)},this),this._updateCommonStl(i,n,t)},cw.updateData=function(o,a,t){var e=o.hostModel,i=this.childOfName("line"),n=o.getItemLayout(a),r={shape:{}};uw(r.shape,n),cl(i,r,e,a),E(rw,function(t){var e=o.getItemVisual(a,t),i=sw(t);if(this[i]!==e){this.remove(this.childOfName(t));var n=lw(t,o,a);this.add(n)}this[i]=e},this),this._updateCommonStl(o,a,t)},cw._updateCommonStl=function(t,e,i){var n=t.hostModel,o=this.childOfName("line"),a=i&&i.lineStyle,r=i&&i.hoverLineStyle,s=i&&i.labelModel,l=i&&i.hoverLabelModel;if(!i||t.hasItemOption){var u=t.getItemModel(e);a=u.getModel("lineStyle").getLineStyle(),r=u.getModel("emphasis.lineStyle").getLineStyle(),s=u.getModel("label"),l=u.getModel("emphasis.label")}var h=t.getItemVisual(e,"color"),c=Z(t.getItemVisual(e,"opacity"),a.opacity,1);o.useStyle(D({strokeNoScale:!0,fill:"none",stroke:h,opacity:c},a)),o.hoverStyle=r,E(rw,function(t){var e=this.childOfName(t);e&&(e.setColor(h),e.setStyle({opacity:c}))},this);var d,f,p=s.getShallow("show"),g=l.getShallow("show"),m=this.childOfName("label");if((p||g)&&(d=h||"#000",null==(f=n.getFormattedLabel(e,"normal",t.dataType)))){var v=n.getRawValue(e);f=null==v?t.getName(e):isFinite(v)?zl(v):v}var y=p?f:null,x=g?H(n.getFormattedLabel(e,"emphasis",t.dataType),f):null,_=m.style;if(null!=y||null!=x){nl(m.style,s,{text:y},{autoColor:d}),m.__textAlign=_.textAlign,m.__verticalAlign=_.textVerticalAlign,m.__position=s.get("position")||"middle";var w=s.get("distance");O(w)||(w=[w,w]),m.__labelDistance=w}m.hoverStyle=null!=x?{text:x,textFill:l.getTextColor(!0),fontStyle:l.getShallow("fontStyle"),fontWeight:l.getShallow("fontWeight"),fontSize:l.getShallow("fontSize"),fontFamily:l.getShallow("fontFamily")}:{text:null},m.ignore=!p&&!g,$s(this)},cw.highlight=function(){this.trigger("emphasis")},cw.downplay=function(){this.trigger("normal")},cw.updateLayout=function(t,e){this.setLinePoints(t.getItemLayout(e))},cw.setLinePoints=function(t){var e=this.childOfName("line");uw(e.shape,t),e.dirty()},w(hw,Ci);var fw=dw.prototype;function pw(t){var e=t.hostModel;return{lineStyle:e.getModel("lineStyle").getLineStyle(),hoverLineStyle:e.getModel("emphasis.lineStyle").getLineStyle(),labelModel:e.getModel("label"),hoverLabelModel:e.getModel("emphasis.label")}}function gw(t){return isNaN(t[0])||isNaN(t[1])}function mw(t){return!gw(t[0])&&!gw(t[1])}function vw(t){var e=t.coordinateSystem;if("view"!==e.type)return 1;var i=t.option.nodeScaleRatio,n=e.scale,o=n&&n[0]||1;return((e.getZoom()-1)*i+1)/o}function yw(t){var e=t.getVisual("symbolSize");return e instanceof Array&&(e=(e[0]+e[1])/2),+e}fw.isPersistent=function(){return!0},fw.updateData=function(i){var n=this,e=n.group,o=n._lineData;n._lineData=i,o||e.removeAll();var a=pw(i);i.diff(o).add(function(t){!function(t,e,i,n){if(!mw(e.getItemLayout(i)))return;var o=new t._ctor(e,i,n);e.setItemGraphicEl(i,o),t.group.add(o)}(n,i,t,a)}).update(function(t,e){!function(t,e,i,n,o,a){var r=e.getItemGraphicEl(n);if(!mw(i.getItemLayout(o)))return t.group.remove(r);r?r.updateData(i,o,a):r=new t._ctor(i,o,a);i.setItemGraphicEl(o,r),t.group.add(r)}(n,o,i,e,t,a)}).remove(function(t){e.remove(o.getItemGraphicEl(t))}).execute()},fw.updateLayout=function(){var i=this._lineData;i&&i.eachItemGraphicEl(function(t,e){t.updateLayout(i,e)},this)},fw.incrementalPrepareUpdate=function(t){this._seriesScope=pw(t),this._lineData=null,this.group.removeAll()},fw.incrementalUpdate=function(t,e){function i(t){t.isGroup||(t.incremental=t.useHoverLayer=!0)}for(var n=t.start;n<t.end;n++){if(mw(e.getItemLayout(n))){var o=new this._ctor(e,n,this._seriesScope);o.traverse(i),this.group.add(o),e.setItemGraphicEl(n,o)}}},fw.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},fw._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()};var xw=[],_w=[],ww=[],bw=La,Sw=_t,Mw=Math.abs;function Iw(t,e,i){for(var n,o=t[0],a=t[1],r=t[2],s=1/0,l=i*i,u=.1,h=.1;h<=.9;h+=.1){xw[0]=bw(o[0],a[0],r[0],h),xw[1]=bw(o[1],a[1],r[1],h),(f=Mw(Sw(xw,e)-l))<s&&(s=f,n=h)}for(var c=0;c<32;c++){var d=n+u;_w[0]=bw(o[0],a[0],r[0],n),_w[1]=bw(o[1],a[1],r[1],n),ww[0]=bw(o[0],a[0],r[0],d),ww[1]=bw(o[1],a[1],r[1],d);var f=Sw(_w,e)-l;if(Mw(f)<.01)break;var p=Sw(ww,e)-l;u/=2,f<0?0<=p?n+=u:n-=u:0<=p?n-=u:n+=u}return n}function Tw(t,l){var u=[],h=Na,c=[[],[],[]],d=[[],[]],f=[];l/=2,t.eachEdge(function(t,e){var i=t.getLayout(),n=t.getVisual("fromSymbol"),o=t.getVisual("toSymbol");i.__original||(i.__original=[rt(i[0]),rt(i[1])],i[2]&&i.__original.push(rt(i[2])));var a=i.__original;if(null!=i[2]){if(at(c[0],a[0]),at(c[1],a[2]),at(c[2],a[1]),n&&"none"!==n){var r=yw(t.node1),s=Iw(c,a[0],r*l);h(c[0][0],c[1][0],c[2][0],s,u),c[0][0]=u[3],c[1][0]=u[4],h(c[0][1],c[1][1],c[2][1],s,u),c[0][1]=u[3],c[1][1]=u[4]}if(o&&"none"!==o){r=yw(t.node2),s=Iw(c,a[1],r*l);h(c[0][0],c[1][0],c[2][0],s,u),c[1][0]=u[1],c[2][0]=u[2],h(c[0][1],c[1][1],c[2][1],s,u),c[1][1]=u[1],c[2][1]=u[2]}at(i[0],c[0]),at(i[1],c[2]),at(i[2],c[1])}else{if(at(d[0],a[0]),at(d[1],a[1]),ht(f,d[1],d[0]),mt(f,f),n&&"none"!==n){r=yw(t.node1);ut(d[0],d[0],f,r*l)}if(o&&"none"!==o){r=yw(t.node2);ut(d[1],d[1],f,-r*l)}at(i[0],d[0]),at(i[1],d[1])}})}var Aw="__focusNodeAdjacency",Dw="__unfocusNodeAdjacency",Cw=["itemStyle","opacity"],Lw=["lineStyle","opacity"];function kw(t,e){var i=t.getVisual("opacity");return null!=i?i:t.getModel().get(e)}function Pw(t,e,i){var n=t.getGraphicEl(),o=kw(t,e);null!=i&&(null==o&&(o=1),o*=i),n.downplay&&n.downplay(),n.traverse(function(t){if(!t.isGroup){var e=t.lineLabelOriginalOpacity;null!=e&&null==i||(e=o),t.setStyle("opacity",e)}})}function Nw(t,e){var i=kw(t,e),n=t.getGraphicEl();n.traverse(function(t){t.isGroup||t.setStyle("opacity",i)}),n.highlight&&n.highlight()}Df({type:"graph",init:function(t,e){var i=new em,n=new dw,o=this.group;this._controller=new zy(e.getZr()),this._controllerHost={target:o},o.add(i.group),o.add(n.group),this._symbolDraw=i,this._lineDraw=n,this._firstRender=!0},render:function(o,t,a){var r=this,e=o.coordinateSystem;this._model=o;var i=this._symbolDraw,n=this._lineDraw,s=this.group;if("view"===e.type){var l={position:e.position,scale:e.scale};this._firstRender?s.attr(l):cl(s,l,o)}Tw(o.getGraph(),vw(o));var u=o.getData();i.updateData(u);var h=o.getEdgeData();n.updateData(h),this._updateNodeAndLinkScale(),this._updateController(o,t,a),clearTimeout(this._layoutTimeout);var c=o.forceLayout,d=o.get("force.layoutAnimation");c&&this._startForceLayoutIteration(c,d),u.eachItemGraphicEl(function(t,e){var i=u.getItemModel(e);t.off("drag").off("dragend");var n=i.get("draggable");n&&t.on("drag",function(){c&&(c.warmUp(),this._layouting||this._startForceLayoutIteration(c,d),c.setFixed(e),u.setItemLayout(e,t.position))},this).on("dragend",function(){c&&c.setUnfixed(e)},this),t.setDraggable(n&&c),t[Aw]&&t.off("mouseover",t[Aw]),t[Dw]&&t.off("mouseout",t[Dw]),i.get("focusNodeAdjacency")&&(t.on("mouseover",t[Aw]=function(){r._clearTimer(),a.dispatchAction({type:"focusNodeAdjacency",seriesId:o.id,dataIndex:t.dataIndex})}),t.on("mouseout",t[Dw]=function(){r._dispatchUnfocus(a)}))},this),u.graph.eachEdge(function(t){var e=t.getGraphicEl();e[Aw]&&e.off("mouseover",e[Aw]),e[Dw]&&e.off("mouseout",e[Dw]),t.getModel().get("focusNodeAdjacency")&&(e.on("mouseover",e[Aw]=function(){r._clearTimer(),a.dispatchAction({type:"focusNodeAdjacency",seriesId:o.id,edgeDataIndex:t.dataIndex})}),e.on("mouseout",e[Dw]=function(){r._dispatchUnfocus(a)}))});var f="circular"===o.get("layout")&&o.get("circular.rotateLabel"),p=u.getLayout("cx"),g=u.getLayout("cy");u.eachItemGraphicEl(function(t,e){var i=u.getItemModel(e).get("label.rotate")||0,n=t.getSymbolPath();if(f){var o=u.getItemLayout(e),a=Math.atan2(o[1]-g,o[0]-p);a<0&&(a=2*Math.PI+a);var r=o[0]<p;r&&(a-=Math.PI);var s=r?"left":"right";il(n,{textRotation:-a,textPosition:s,textOrigin:"center"},{textPosition:s})}else il(n,{textRotation:i*=Math.PI/180})}),this._firstRender=!1},dispose:function(){this._controller&&this._controller.dispose(),this._controllerHost={},this._clearTimer()},_dispatchUnfocus:function(t,e){var i=this;this._clearTimer(),this._unfocusDelayTimer=setTimeout(function(){i._unfocusDelayTimer=null,t.dispatchAction({type:"unfocusNodeAdjacency",seriesId:i._model.id})},500)},_clearTimer:function(){this._unfocusDelayTimer&&(clearTimeout(this._unfocusDelayTimer),this._unfocusDelayTimer=null)},focusNodeAdjacency:function(t,e,i,n){var o=t.getData().graph,a=n.dataIndex,r=n.edgeDataIndex,s=o.getNodeByIndex(a),l=o.getEdgeByIndex(r);(s||l)&&(o.eachNode(function(t){Pw(t,Cw,.1)}),o.eachEdge(function(t){Pw(t,Lw,.1)}),s&&(Nw(s,Cw),E(s.edges,function(t){t.dataIndex<0||(Nw(t,Lw),Nw(t.node1,Cw),Nw(t.node2,Cw))})),l&&(Nw(l,Lw),Nw(l.node1,Cw),Nw(l.node2,Cw)))},unfocusNodeAdjacency:function(t,e,i,n){var o=t.getData().graph;o.eachNode(function(t){Pw(t,Cw)}),o.eachEdge(function(t){Pw(t,Lw)})},_startForceLayoutIteration:function(t,i){var n=this;!function e(){t.step(function(t){n.updateLayout(n._model),(n._layouting=!t)&&(i?n._layoutTimeout=setTimeout(e,16):e())})}()},_updateController:function(o,t,a){var e=this._controller,i=this._controllerHost,r=this.group;e.setPointerChecker(function(t,e,i){var n=r.getBoundingRect();return n.applyTransform(r.transform),n.contain(e,i)&&!qy(t,a,o)}),"view"===o.coordinateSystem.type?(e.enable(o.get("roam")),i.zoomLimit=o.get("scaleLimit"),i.zoom=o.coordinateSystem.getZoom(),e.off("pan").off("zoom").on("pan",function(t){Xy(i,t.dx,t.dy),a.dispatchAction({seriesId:o.id,type:"graphRoam",dx:t.dx,dy:t.dy})}).on("zoom",function(t){Yy(i,t.scale,t.originX,t.originY),a.dispatchAction({seriesId:o.id,type:"graphRoam",zoom:t.scale,originX:t.originX,originY:t.originY}),this._updateNodeAndLinkScale(),Tw(o.getGraph(),vw(o)),this._lineDraw.updateLayout()},this)):e.disable()},_updateNodeAndLinkScale:function(){var t=this._model,e=t.getData(),i=vw(t),n=[i,i];e.eachItemGraphicEl(function(t,e){t.attr("scale",n)})},updateLayout:function(t){Tw(t.getGraph(),vw(t)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},remove:function(t,e){this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()}}),xf({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},function(){}),xf({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},function(){});xf({type:"graphRoam",event:"graphRoam",update:"none"},function(i,t){t.eachComponent({mainType:"series",query:i},function(t){var e=nx(t.coordinateSystem,i);t.setCenter&&t.setCenter(e.center),t.setZoom&&t.setZoom(e.zoom)})});function Ow(t){return t instanceof Array||(t=[t,t]),t}function Ew(t){var e=t.coordinateSystem;if(!e||"view"===e.type){var i=t.getGraph();i.eachNode(function(t){var e=t.getModel();t.setLayout([+e.get("x"),+e.get("y")])}),Rw(i)}}function Rw(t){t.eachEdge(function(t){var e=t.getModel().get("lineStyle.curveness")||0,i=rt(t.node1.getLayout()),n=rt(t.node2.getLayout()),o=[i,n];+e&&o.push([(i[0]+n[0])/2-(i[1]-n[1])*e,(i[1]+n[1])/2-(n[0]-i[0])*e]),t.setLayout(o)})}var zw=Math.PI,Bw=[];function Vw(t,e){var i=t.coordinateSystem;if(!i||"view"===i.type){var n=i.getBoundingRect(),o=t.getData(),a=o.graph,s=n.width/2+n.x,l=n.height/2+n.y,r=Math.min(n.width,n.height)/2,u=o.count();o.setLayout({cx:s,cy:l}),u&&(Gw[e](t,i,a,o,r,s,l,u),a.eachEdge(function(t){var e,i=t.getModel().get("lineStyle.curveness")||0,n=rt(t.node1.getLayout()),o=rt(t.node2.getLayout()),a=(n[0]+o[0])/2,r=(n[1]+o[1])/2;+i&&(e=[s*(i*=3)+a*(1-i),l*i+r*(1-i)]),t.setLayout([n,o,e])}))}}var Gw={value:function(t,e,i,n,o,a,r,s){var l=0,u=n.getSum("value"),h=2*Math.PI/(u||s);i.eachNode(function(t){var e=t.getValue("value"),i=h*(u?e:1)/2;l+=i,t.setLayout([o*Math.cos(l)+a,o*Math.sin(l)+r]),l+=i})},symbolSize:function(t,e,i,n,o,a,r,s){var l=0;Bw.length=s;var u=vw(t);i.eachNode(function(t){var e=yw(t);isNaN(e)&&(e=2),e<0&&(e=0),e*=u;var i=Math.asin(e/2/o);isNaN(i)&&(i=zw/2),Bw[t.dataIndex]=i,l+=2*i});var h=(2*zw-l)/s/2,c=0;i.eachNode(function(t){var e=h+Bw[t.dataIndex];c+=e,t.setLayout([o*Math.cos(c)+a,o*Math.sin(c)+r]),c+=e})}},Fw=ut;yf(function(t){var a=t.findComponents({mainType:"legend"});a&&a.length&&t.eachSeriesByType("graph",function(t){var e=t.getCategoriesData(),n=t.getGraph().data,o=e.mapArray(e.getName);n.filterSelf(function(t){var e=n.getItemModel(t).getShallow("category");if(null!=e){"number"==typeof e&&(e=o[e]);for(var i=0;i<a.length;i++)if(!a[i].isSelected(e))return!1}return!0})},this)}),bf(Dm("graph","circle",null)),bf(function(t){var h={};t.eachSeriesByType("graph",function(s){var l=s.getCategoriesData(),o=s.getData(),u={};l.each(function(t){var e=l.getName(t);u["ec-"+e]=t;var i=l.getItemModel(t),n=i.get("itemStyle.color")||s.getColorFromPalette(e,h);l.setItemVisual(t,"color",n);for(var o=["opacity","symbol","symbolSize","symbolKeepAspect"],a=0;a<o.length;a++){var r=i.getShallow(o[a],!0);null!=r&&l.setItemVisual(t,o[a],r)}}),l.count()&&o.each(function(t){var e=o.getItemModel(t).getShallow("category");if(null!=e){"string"==typeof e&&(e=u["ec-"+e]);for(var i=["color","opacity","symbol","symbolSize","symbolKeepAspect"],n=0;n<i.length;n++)null==o.getItemVisual(t,i[n],!0)&&o.setItemVisual(t,i[n],l.getItemVisual(e,i[n]))}})})}),bf(function(t){t.eachSeriesByType("graph",function(t){var s=t.getGraph(),l=t.getEdgeData(),e=Ow(t.get("edgeSymbol")),i=Ow(t.get("edgeSymbolSize")),u="lineStyle.color".split("."),h="lineStyle.opacity".split(".");l.setVisual("fromSymbol",e&&e[0]),l.setVisual("toSymbol",e&&e[1]),l.setVisual("fromSymbolSize",i&&i[0]),l.setVisual("toSymbolSize",i&&i[1]),l.setVisual("color",t.get(u)),l.setVisual("opacity",t.get(h)),l.each(function(t){var e=l.getItemModel(t),i=s.getEdgeByIndex(t),n=Ow(e.getShallow("symbol",!0)),o=Ow(e.getShallow("symbolSize",!0)),a=e.get(u),r=e.get(h);switch(a){case"source":a=i.node1.getVisual("color");break;case"target":a=i.node2.getVisual("color")}n[0]&&i.setVisual("fromSymbol",n[0]),n[1]&&i.setVisual("toSymbol",n[1]),o[0]&&i.setVisual("fromSymbolSize",o[0]),o[1]&&i.setVisual("toSymbolSize",o[1]),i.setVisual("color",a),i.setVisual("opacity",r)})})}),wf(function(t,e){t.eachSeriesByType("graph",function(t){var e=t.get("layout"),i=t.coordinateSystem;if(i&&"view"!==i.type){var n=t.getData(),o=[];E(i.dimensions,function(t){o=o.concat(n.mapDimension(t,!0))});for(var a=0;a<n.count();a++){for(var r=[],s=!1,l=0;l<o.length;l++){var u=n.get(o[l],a);isNaN(u)||(s=!0),r.push(u)}s?n.setItemLayout(a,i.dataToPoint(r)):n.setItemLayout(a,[NaN,NaN])}Rw(n.graph)}else e&&"none"!==e||Ew(t)})}),wf(Cd.VISUAL.POST_CHART_LAYOUT,function(t){t.eachSeriesByType("graph",function(t){"circular"===t.get("layout")&&Vw(t,"symbolSize")})}),wf(function(t){t.eachSeriesByType("graph",function(t){if(!(l=t.coordinateSystem)||"view"===l.type)if("force"===t.get("layout")){var c=t.preservedPoints||{},d=t.getGraph(),f=d.data,e=d.edgeData,i=t.getModel("force"),n=i.get("initLayout");t.preservedPoints?f.each(function(t){var e=f.getId(t);f.setItemLayout(t,c[e]||[NaN,NaN])}):n&&"none"!==n?"circular"===n&&Vw(t,"value"):Ew(t);var o=f.getDataExtent("value"),a=e.getDataExtent("value"),r=i.get("repulsion"),s=i.get("edgeLength");O(r)||(r=[r,r]),O(s)||(s=[s,s]),s=[s[1],s[0]];var l,u=f.mapArray("value",function(t,e){var i=f.getItemLayout(e),n=El(t,o,r);return isNaN(n)&&(n=(r[0]+r[1])/2),{w:n,rep:n,fixed:f.getItemModel(e).get("fixed"),p:!i||isNaN(i[0])||isNaN(i[1])?null:i}}),h=e.mapArray("value",function(t,e){var i=d.getEdgeByIndex(e),n=El(t,a,s);isNaN(n)&&(n=(s[0]+s[1])/2);var o=i.getModel();return{n1:u[i.node1.dataIndex],n2:u[i.node2.dataIndex],d:n,curveness:o.get("lineStyle.curveness")||0,ignoreForceLayout:o.get("ignoreForceLayout")}}),p=(l=t.coordinateSystem).getBoundingRect(),g=function(f,p,t){for(var e=t.rect,i=e.width,n=e.height,g=[e.x+i/2,e.y+n/2],m=null==t.gravity?.1:t.gravity,o=0;o<f.length;o++){var a=f[o];a.p||(a.p=ot(i*(Math.random()-.5)+g[0],n*(Math.random()-.5)+g[1])),a.pp=rt(a.p),a.edges=null}var r=null==t.friction?.6:t.friction,v=r;return{warmUp:function(){v=.8*r},setFixed:function(t){f[t].fixed=!0},setUnfixed:function(t){f[t].fixed=!1},step:function(t){for(var e=[],i=f.length,n=0;n<p.length;n++){var o=p[n];if(!o.ignoreForceLayout){var a=o.n1;ht(e,(u=o.n2).p,a.p);var r=ct(e)-o.d,s=u.w/(a.w+u.w);isNaN(s)&&(s=0),mt(e,e),a.fixed||Fw(a.p,a.p,e,s*r*v),u.fixed||Fw(u.p,u.p,e,-(1-s)*r*v)}}for(n=0;n<i;n++){(d=f[n]).fixed||(ht(e,g,d.p),Fw(d.p,d.p,e,m*v))}for(n=0;n<i;n++){a=f[n];for(var l=n+1;l<i;l++){var u;ht(e,(u=f[l]).p,a.p),0===(r=ct(e))&&(st(e,Math.random()-.5,Math.random()-.5),r=1);var h=(a.rep+u.rep)/r/r;a.fixed||Fw(a.pp,a.pp,e,h),u.fixed||Fw(u.pp,u.pp,e,-h)}}var c=[];for(n=0;n<i;n++){var d;(d=f[n]).fixed||(ht(c,d.p,d.pp),Fw(d.p,d.p,c,v),at(d.pp,d.p))}v*=.992,t&&t(f,p,v<.01)}}}(u,h,{rect:p,gravity:i.get("gravity"),friction:i.get("friction")}),m=g.step;g.step=function(h){for(var t=0,e=u.length;t<e;t++)u[t].fixed&&at(u[t].p,d.getNodeByIndex(t).getLayout());m(function(t,e,i){for(var n=0,o=t.length;n<o;n++)t[n].fixed||d.getNodeByIndex(n).setLayout(t[n].p),c[f.getId(n)]=t[n].p;for(n=0,o=e.length;n<o;n++){var a=e[n],r=d.getEdgeByIndex(n),s=a.n1.p,l=a.n2.p,u=r.getLayout();(u=u?u.slice():[])[0]=u[0]||[],u[1]=u[1]||[],at(u[0],s),at(u[1],l),+a.curveness&&(u[2]=[(s[0]+l[0])/2-(s[1]-l[1])*a.curveness,(s[1]+l[1])/2-(l[0]-s[0])*a.curveness]),r.setLayout(u)}h&&h(i)})},t.forceLayout=g,t.preservedPoints=c,g.step()}else t.forceLayout=null})}),_f("graphView",{create:function(t,d){var f=[];return t.eachSeriesByType("graph",function(t){var e=t.get("coordinateSystem");if(!e||"view"===e){var i=t.getData(),n=[],o=[];Wa(i.mapArray(function(t){var e=i.getItemModel(t);return[+e.get("x"),+e.get("y")]}),n,o),o[0]-n[0]==0&&(o[0]+=1,n[0]-=1),o[1]-n[1]==0&&(o[1]+=1,n[1]-=1);var a=(o[0]-n[0])/(o[1]-n[1]),r=function(t,e,i){var n=t.getBoxLayoutParams();return n.aspect=i,wu(n,{width:e.getWidth(),height:e.getHeight()})}(t,d,a);isNaN(a)&&(n=[r.x,r.y],o=[r.x+r.width,r.y+r.height]);var s=o[0]-n[0],l=o[1]-n[1],u=r.width,h=r.height,c=t.coordinateSystem=new rx;c.zoomLimit=t.get("scaleLimit"),c.setBoundingRect(n[0],n[1],s,l),c.setViewRect(r.x,r.y,u,h),c.setCenter(t.get("center")),c.setZoom(t.get("zoom")),f.push(c)}}),f}});rc.extend({type:"series.gauge",getInitialData:function(t,e){return Uv(this,["value"])},defaultOption:{zlevel:0,z:2,center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,lineStyle:{color:[[.2,"#91c7ae"],[.8,"#63869e"],[1,"#c23531"]],width:30}},splitLine:{show:!0,length:30,lineStyle:{color:"#eee",width:2,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:8,lineStyle:{color:"#eee",width:1,type:"solid"}},axisLabel:{show:!0,distance:5,color:"auto"},pointer:{show:!0,length:"80%",width:8},itemStyle:{color:"auto"},title:{show:!0,offsetCenter:[0,"-40%"],color:"#333",fontSize:15},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"auto",fontSize:30}}});var Ww=Ar.extend({type:"echartsGaugePointer",shape:{angle:0,width:10,r:10,x:0,y:0},buildPath:function(t,e){var i=Math.cos,n=Math.sin,o=e.r,a=e.width,r=e.angle,s=e.x-i(r)*a*(o/3<=a?1:2),l=e.y-n(r)*a*(o/3<=a?1:2);r=e.angle-Math.PI/2,t.moveTo(s,l),t.lineTo(e.x+i(r)*a,e.y+n(r)*a),t.lineTo(e.x+i(e.angle)*o,e.y+n(e.angle)*o),t.lineTo(e.x-i(r)*a,e.y-n(r)*a),t.lineTo(s,l)}});function Hw(t,e){return e&&("string"==typeof e?t=e.replace("{value}",null!=t?t:""):"function"==typeof e&&(t=e(t))),t}var Zw=2*Math.PI,Uw=(xc.extend({type:"gauge",render:function(t,e,i){this.group.removeAll();var n=t.get("axisLine.lineStyle.color"),o=function(t,e){var i=t.get("center"),n=e.getWidth(),o=e.getHeight(),a=Math.min(n,o);return{cx:Rl(i[0],e.getWidth()),cy:Rl(i[1],e.getHeight()),r:Rl(t.get("radius"),a/2)}}(t,i);this._renderMain(t,e,i,n,o)},dispose:function(){},_renderMain:function(t,e,i,n,o){for(var a=this.group,r=t.getModel("axisLine"),s=r.getModel("lineStyle"),l=t.get("clockwise"),u=-t.get("startAngle")/180*Math.PI,h=((g=-t.get("endAngle")/180*Math.PI)-u)%Zw,c=u,d=s.get("width"),f=r.get("show"),p=0;f&&p<n.length;p++){var g,m=Math.min(Math.max(n[p][0],0),1),v=new qr({shape:{startAngle:c,endAngle:g=u+h*m,cx:o.cx,cy:o.cy,clockwise:l,r0:o.r-d,r:o.r},silent:!0});v.setStyle({fill:n[p][1]}),v.setStyle(s.getLineStyle(["color","borderWidth","borderColor"])),a.add(v),c=g}function y(t){if(t<=0)return n[0][1];for(var e=0;e<n.length;e++)if(n[e][0]>=t&&(0===e?0:n[e-1][0])<t)return n[e][1];return n[e-1][1]}if(!l){var x=u;u=g,g=x}this._renderTicks(t,e,i,y,o,u,g,l),this._renderPointer(t,e,i,y,o,u,g,l),this._renderTitle(t,e,i,y,o),this._renderDetail(t,e,i,y,o)},_renderTicks:function(t,e,i,n,o,a,r,s){for(var l=this.group,u=o.cx,h=o.cy,c=o.r,d=+t.get("min"),f=+t.get("max"),p=t.getModel("splitLine"),g=t.getModel("axisTick"),m=t.getModel("axisLabel"),v=t.get("splitNumber"),y=g.get("splitNumber"),x=Rl(p.get("length"),c),_=Rl(g.get("length"),c),w=a,b=(r-a)/v,S=b/y,M=p.getModel("lineStyle").getLineStyle(),I=g.getModel("lineStyle").getLineStyle(),T=0;T<=v;T++){var A=Math.cos(w),D=Math.sin(w);if(p.get("show")){var C=new ls({shape:{x1:A*c+u,y1:D*c+h,x2:A*(c-x)+u,y2:D*(c-x)+h},style:M,silent:!0});"auto"===M.stroke&&C.setStyle({stroke:n(T/v)}),l.add(C)}if(m.get("show")){var L=Hw(zl(T/v*(f-d)+d),m.get("formatter")),k=m.get("distance"),P=n(T/v);l.add(new Ur({style:nl({},m,{text:L,x:A*(c-x-k)+u,y:D*(c-x-k)+h,textVerticalAlign:D<-.4?"top":.4<D?"bottom":"middle",textAlign:A<-.4?"left":.4<A?"right":"center"},{autoColor:P}),silent:!0}))}if(g.get("show")&&T!==v){for(var N=0;N<=y;N++){A=Math.cos(w),D=Math.sin(w);var O=new ls({shape:{x1:A*c+u,y1:D*c+h,x2:A*(c-_)+u,y2:D*(c-_)+h},silent:!0,style:I});"auto"===I.stroke&&O.setStyle({stroke:n((T+N/y)/v)}),l.add(O),w+=S}w-=S}else w+=b}},_renderPointer:function(n,t,e,o,a,i,r,s){var l=this.group,u=this._data;if(n.get("pointer.show")){var h=[+n.get("min"),+n.get("max")],c=[i,r],d=n.getData(),f=d.mapDimension("value");d.diff(u).add(function(t){var e=new Ww({shape:{angle:i}});dl(e,{shape:{angle:El(d.get(f,t),h,c,!0)}},n),l.add(e),d.setItemGraphicEl(t,e)}).update(function(t,e){var i=u.getItemGraphicEl(e);cl(i,{shape:{angle:El(d.get(f,t),h,c,!0)}},n),l.add(i),d.setItemGraphicEl(t,i)}).remove(function(t){var e=u.getItemGraphicEl(t);l.remove(e)}).execute(),d.eachItemGraphicEl(function(t,e){var i=d.getItemModel(e),n=i.getModel("pointer");t.setShape({x:a.cx,y:a.cy,width:Rl(n.get("width"),a.r),r:Rl(n.get("length"),a.r)}),t.useStyle(i.getModel("itemStyle").getItemStyle()),"auto"===t.style.fill&&t.setStyle("fill",o(El(d.get(f,e),h,[0,1],!0))),$s(t,i.getModel("emphasis.itemStyle").getItemStyle())}),this._data=d}else u&&u.eachItemGraphicEl(function(t){l.remove(t)})},_renderTitle:function(t,e,i,n,o){var a=t.getData(),r=a.mapDimension("value"),s=t.getModel("title");if(s.get("show")){var l=s.get("offsetCenter"),u=o.cx+Rl(l[0],o.r),h=o.cy+Rl(l[1],o.r),c=+t.get("min"),d=+t.get("max"),f=n(El(t.getData().get(r,0),[c,d],[0,1],!0));this.group.add(new Ur({silent:!0,style:nl({},s,{x:u,y:h,text:a.getName(0),textAlign:"center",textVerticalAlign:"middle"},{autoColor:f,forceRich:!0})}))}},_renderDetail:function(t,e,i,n,o){var a=t.getModel("detail"),r=+t.get("min"),s=+t.get("max");if(a.get("show")){var l=a.get("offsetCenter"),u=o.cx+Rl(l[0],o.r),h=o.cy+Rl(l[1],o.r),c=Rl(a.get("width"),o.r),d=Rl(a.get("height"),o.r),f=t.getData(),p=f.get(f.mapDimension("value"),0),g=n(El(p,[r,s],[0,1],!0));this.group.add(new Ur({silent:!0,style:nl({},a,{x:u,y:h,text:Hw(p,a.get("formatter")),textWidth:isNaN(c)?null:c,textHeight:isNaN(d)?null:d,textAlign:"center",textVerticalAlign:"middle"},{autoColor:g,forceRich:!0})}))}}}),Af({type:"series.funnel",init:function(t){Uw.superApply(this,"init",arguments),this.legendVisualProvider=new Yv(A(this.getData,this),A(this.getRawData,this)),this._defaultLabelLine(t)},getInitialData:function(t,e){return Uv(this,{coordDimensions:["value"],encodeDefaulter:T($u,this)})},_defaultLabelLine:function(t){Go(t,"labelLine",["show"]);var e=t.labelLine,i=t.emphasis.labelLine;e.show=e.show&&t.label.show,i.show=i.show&&t.emphasis.label.show},getDataParams:function(t){var e=this.getData(),i=Uw.superCall(this,"getDataParams",t),n=e.mapDimension("value"),o=e.getSum(n);return i.percent=o?+(e.get(n,t)/o*100).toFixed(2):0,i.$vars.push("percent"),i},defaultOption:{zlevel:0,z:2,legendHoverLink:!0,left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1,type:"solid"}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}}}}));function Xw(t,e){Ci.call(this);var i=new Qr,n=new ts,o=new Ur;this.add(i),this.add(n),this.add(o),this.highDownOnUpdate=function(t,e){"emphasis"===e?(n.ignore=n.hoverIgnore,o.ignore=o.hoverIgnore):(n.ignore=n.normalIgnore,o.ignore=o.normalIgnore)},this.updateData(t,e,!0)}var Yw=Xw.prototype,jw=["itemStyle","opacity"];Yw.updateData=function(t,e,i){var n=this.childAt(0),o=t.hostModel,a=t.getItemModel(e),r=t.getItemLayout(e),s=t.getItemModel(e).get(jw);s=null==s?1:s,n.useStyle({}),i?(n.setShape({points:r.points}),n.setStyle({opacity:0}),dl(n,{style:{opacity:s}},o,e)):cl(n,{style:{opacity:s},shape:{points:r.points}},o,e);var l=a.getModel("itemStyle"),u=t.getItemVisual(e,"color");n.setStyle(D({lineJoin:"round",fill:u},l.getItemStyle(["opacity"]))),n.hoverStyle=l.getModel("emphasis").getItemStyle(),this._updateLabel(t,e),$s(this)},Yw._updateLabel=function(t,e){var i=this.childAt(1),n=this.childAt(2),o=t.hostModel,a=t.getItemModel(e),r=t.getItemLayout(e).label,s=t.getItemVisual(e,"color");cl(i,{shape:{points:r.linePoints||r.linePoints}},o,e),cl(n,{style:{x:r.x,y:r.y}},o,e),n.attr({rotation:r.rotation,origin:[r.x,r.y],z2:10});var l=a.getModel("label"),u=a.getModel("emphasis.label"),h=a.getModel("labelLine"),c=a.getModel("emphasis.labelLine");s=t.getItemVisual(e,"color");el(n.style,n.hoverStyle={},l,u,{labelFetcher:t.hostModel,labelDataIndex:e,defaultText:t.getName(e),autoColor:s,useInsideStyle:!!r.inside},{textAlign:r.textAlign,textVerticalAlign:r.verticalAlign}),n.ignore=n.normalIgnore=!l.get("show"),n.hoverIgnore=!u.get("show"),i.ignore=i.normalIgnore=!h.get("show"),i.hoverIgnore=!c.get("show"),i.setStyle({stroke:s}),i.setStyle(h.getModel("lineStyle").getLineStyle()),i.hoverStyle=c.getModel("lineStyle").getLineStyle()},w(Xw,Ci);xc.extend({type:"funnel",render:function(t,e,i){var n=t.getData(),o=this._data,a=this.group;n.diff(o).add(function(t){var e=new Xw(n,t);n.setItemGraphicEl(t,e),a.add(e)}).update(function(t,e){var i=o.getItemGraphicEl(e);i.updateData(n,t),a.add(i),n.setItemGraphicEl(t,i)}).remove(function(t){var e=o.getItemGraphicEl(t);a.remove(e)}).execute(),this._data=n},remove:function(){this.group.removeAll(),this._data=null},dispose:function(){}});bf(ty("funnel")),wf(function(t,w,e){t.eachSeriesByType("funnel",function(t){var o=t.getData(),a=o.mapDimension("value"),e=t.get("sort"),r=function(t,e){return wu(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,w),i=function(t,e){for(var i=t.mapDimension("value"),n=t.mapArray(i,function(t){return t}),o=[],a="ascending"===e,r=0,s=t.count();r<s;r++)o[r]=r;return"function"==typeof e?o.sort(e):"none"!==e&&o.sort(function(t,e){return a?n[t]-n[e]:n[e]-n[t]}),o}(o,e),s=[Rl(t.get("minSize"),r.width),Rl(t.get("maxSize"),r.width)],n=o.getDataExtent(a),l=t.get("min"),u=t.get("max");null==l&&(l=Math.min(n[0],0)),null==u&&(u=n[1]);function h(t,e){var i,n=El(o.get(a,t)||0,[l,u],s,!0);switch(c){case"left":i=r.x;break;case"center":i=r.x+(r.width-n)/2;break;case"right":i=r.x+r.width-n}return[[i,e],[i+n,e]]}var c=t.get("funnelAlign"),d=t.get("gap"),f=(r.height-d*(o.count()-1))/o.count(),p=r.y;"ascending"===e&&(f=-f,d=-d,p+=r.height,i=i.reverse());for(var g=0;g<i.length;g++){var m=i[g],v=i[g+1],y=o.getItemModel(m).get("itemStyle.height");null==y?y=f:(y=Rl(y,r.height),"ascending"===e&&(y=-y));var x=h(m,p),_=h(v,p+y);p+=y+d,o.setItemLayout(m,{points:x.concat(_.slice().reverse())})}!function(g){g.each(function(t){var e,i,n,o,a=g.getItemModel(t),r=a.getModel("label").get("position"),s=a.getModel("labelLine"),l=g.getItemLayout(t),u=l.points,h="inner"===r||"inside"===r||"center"===r||"insideLeft"===r||"insideRight"===r;if(h)e="insideLeft"===r?(i=(u[0][0]+u[3][0])/2+5,n=(u[0][1]+u[3][1])/2,"left"):"insideRight"===r?(i=(u[1][0]+u[2][0])/2-5,n=(u[1][1]+u[2][1])/2,"right"):(i=(u[0][0]+u[1][0]+u[2][0]+u[3][0])/4,n=(u[0][1]+u[1][1]+u[2][1]+u[3][1])/4,"center"),o=[[i,n],[i,n]];else{var c,d,f,p=s.get("length");e="left"===r?(c=(u[3][0]+u[0][0])/2,d=(u[3][1]+u[0][1])/2,i=(f=c-p)-5,"right"):"right"===r?(c=(u[1][0]+u[2][0])/2,d=(u[1][1]+u[2][1])/2,i=(f=c+p)+5,"left"):"rightTop"===r?(c=u[1][0],d=u[1][1],i=(f=c+p)+5,"top"):"rightBottom"===r?(c=u[2][0],d=u[2][1],i=(f=c+p)+5,"bottom"):"leftTop"===r?(c=u[0][0],d=u[1][1],i=(f=c-p)-5,"right"):"leftBottom"===r?(c=u[3][0],d=u[2][1],i=(f=c-p)-5,"right"):(c=(u[1][0]+u[2][0])/2,d=(u[1][1]+u[2][1])/2,i=(f=c+p)+5,"left");o=[[c,d],[f,d]],n=d}l.label={linePoints:o,x:i,y:n,verticalAlign:"middle",textAlign:e,inside:h}})}(o)})}),yf(sy("funnel"));function qw(t,e,i,n,o){Vg.call(this,t,e,i),this.type=n||"value",this.axisIndex=o}qw.prototype={constructor:qw,model:null,isHorizontal:function(){return"horizontal"!==this.coordinateSystem.getModel().get("layout")}},w(qw,Vg);function Kw(t,e,i,n,o,a){t=t||0;var r=i[1]-i[0];if(null!=o&&(o=Jw(o,[0,r])),null!=a&&(a=Math.max(a,null!=o?o:0)),"all"===n){var s=Math.abs(e[1]-e[0]);o=a=Jw(s=Jw(s,[0,r]),[o,a]),n=0}e[0]=Jw(e[0],i),e[1]=Jw(e[1],i);var l=$w(e,n);e[n]+=t;var u=o||0,h=i.slice();l.sign<0?h[0]+=u:h[1]-=u,e[n]=Jw(e[n],h);var c=$w(e,n);return null!=o&&(c.sign!==l.sign||c.span<o)&&(e[1-n]=e[n]+l.sign*o),c=$w(e,n),null!=a&&c.span>a&&(e[1-n]=e[n]+c.sign*a),e}function $w(t,e){var i=t[e]-t[1-e];return{span:Math.abs(i),sign:0<i?-1:i<0?1:e?-1:1}}function Jw(t,e){return Math.min(null!=e[1]?e[1]:1/0,Math.max(null!=e[0]?e[0]:-1/0,t))}var Qw=E,tb=Math.min,eb=Math.max,ib=Math.floor,nb=Math.ceil,ob=zl,ab=Math.PI;function rb(t,e,i){this._axesMap=Q(),this._axesLayout={},this.dimensions=t.dimensions,this._rect,this._model=t,this._init(t,e,i)}function sb(t,e){return tb(eb(t,e[0]),e[1])}rb.prototype={type:"parallel",constructor:rb,_init:function(t,r,e){var i=t.dimensions,s=t.parallelAxisIndex;Qw(i,function(t,e){var i=s[e],n=r.getComponent("parallelAxis",i),o=this._axesMap.set(t,new qw(t,rg(n),[0,0],n.get("type"),i)),a="category"===o.type;o.onBand=a&&n.get("boundaryGap"),o.inverse=n.get("inverse"),(n.axis=o).model=n,o.coordinateSystem=n.coordinateSystem=this},this)},update:function(t,e){this._updateAxesFromSeries(this._model,t)},containPoint:function(t){var e=this._makeLayoutInfo(),i=e.axisBase,n=e.layoutBase,o=e.pixelDimIndex,a=t[1-o],r=t[o];return i<=a&&a<=i+e.axisLength&&n<=r&&r<=n+e.layoutLength},getModel:function(){return this._model},_updateAxesFromSeries:function(e,n){n.eachSeries(function(t){if(e.contains(t,n)){var i=t.getData();Qw(this.dimensions,function(t){var e=this._axesMap.get(t);e.scale.unionExtentFromData(i,i.mapDimension(t)),ag(e.scale,e.model)},this)}},this)},resize:function(t,e){this._rect=wu(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()}),this._layoutAxes()},getRect:function(){return this._rect},_makeLayoutInfo:function(){var t,e=this._model,i=this._rect,n=["x","y"],o=["width","height"],a=e.get("layout"),r="horizontal"===a?0:1,s=i[o[r]],l=[0,s],u=this.dimensions.length,h=sb(e.get("axisExpandWidth"),l),c=sb(e.get("axisExpandCount")||0,[0,u]),d=e.get("axisExpandable")&&3<u&&c<u&&1<c&&0<h&&0<s,f=e.get("axisExpandWindow");f?(t=sb(f[1]-f[0],l),f[1]=f[0]+t):(t=sb(h*(c-1),l),(f=[h*(e.get("axisExpandCenter")||ib(u/2))-t/2])[1]=f[0]+t);var p=(s-t)/(u-c);p<3&&(p=0);var g=[ib(ob(f[0]/h,1))+1,nb(ob(f[1]/h,1))-1],m=p/h*f[0];return{layout:a,pixelDimIndex:r,layoutBase:i[n[r]],layoutLength:s,axisBase:i[n[1-r]],axisLength:i[o[1-r]],axisExpandable:d,axisExpandWidth:h,axisCollapseWidth:p,axisExpandWindow:f,axisCount:u,winInnerIndices:g,axisExpandWindow0Pos:m}},_layoutAxes:function(){var l=this._rect,t=this._axesMap,e=this.dimensions,u=this._makeLayoutInfo(),h=u.layout;t.each(function(t){var e=[0,u.axisLength],i=t.inverse?1:0;t.setExtent(e[i],e[1-i])}),Qw(e,function(t,e){var i=(u.axisExpandable?function(t,e){var i,n,o=e.layoutLength,a=e.axisExpandWidth,r=e.axisCount,s=e.axisCollapseWidth,l=e.winInnerIndices,u=s,h=!1;t<l[0]?(i=t*s,n=s):t<=l[1]?(i=e.axisExpandWindow0Pos+t*a-e.axisExpandWindow[0],u=a,h=!0):(i=o-(r-1-t)*s,n=s);return{position:i,axisNameAvailableWidth:u,axisLabelShow:h,nameTruncateMaxWidth:n}}:function(t,e){var i=e.layoutLength/(e.axisCount-1);return{position:i*t,axisNameAvailableWidth:i,axisLabelShow:!0}})(e,u),n={horizontal:{x:i.position,y:u.axisLength},vertical:{x:0,y:i.position}},o={horizontal:ab/2,vertical:0},a=[n[h].x+l.x,n[h].y+l.y],r=o[h],s=ae();he(s,s,r),ue(s,s,a),this._axesLayout[t]={position:a,rotation:r,transform:s,axisNameAvailableWidth:i.axisNameAvailableWidth,axisLabelShow:i.axisLabelShow,nameTruncateMaxWidth:i.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},getAxis:function(t){return this._axesMap.get(t)},dataToPoint:function(t,e){return this.axisCoordToPoint(this._axesMap.get(e).dataToCoord(t),e)},eachActiveState:function(e,t,i,n){null==i&&(i=0),null==n&&(n=e.count());var o=this._axesMap,a=this.dimensions,r=[],s=[];E(a,function(t){r.push(e.mapDimension(t)),s.push(o.get(t).model)});for(var l=this.hasAxisBrushed(),u=i;u<n;u++){var h;if(l){h="active";for(var c=e.getValues(r,u),d=0,f=a.length;d<f;d++){if("inactive"===s[d].getActiveState(c[d])){h="inactive";break}}}else h="normal";t(h,u)}},hasAxisBrushed:function(){for(var t=this.dimensions,e=this._axesMap,i=!1,n=0,o=t.length;n<o;n++)"normal"!==e.get(t[n]).model.getActiveState()&&(i=!0);return i},axisCoordToPoint:function(t,e){return pl([t,0],this._axesLayout[e].transform)},getAxisLayout:function(t){return L(this._axesLayout[t])},getSlidedAxisExpandWindow:function(t){var e=this._makeLayoutInfo(),i=e.pixelDimIndex,n=e.axisExpandWindow.slice(),o=n[1]-n[0],a=[0,e.axisExpandWidth*(e.axisCount-1)];if(!this.containPoint(t))return{behavior:"none",axisExpandWindow:n};var r,s=t[i]-e.layoutBase-e.axisExpandWindow0Pos,l="slide",u=e.axisCollapseWidth,h=this._model.get("axisExpandSlideTriggerArea"),c=null!=h[0];if(u)c&&u&&s<o*h[0]?(l="jump",r=s-o*h[2]):c&&u&&s>o*(1-h[0])?(l="jump",r=s-o*(1-h[2])):0<=(r=s-o*h[1])&&(r=s-o*(1-h[1]))<=0&&(r=0),(r*=e.axisExpandWidth/u)?Kw(r,n,a,"all"):l="none";else{o=n[1]-n[0];(n=[eb(0,a[1]*s/o-o/2)])[1]=tb(a[1],n[0]+o),n[0]=n[1]-o}return{axisExpandWindow:n,behavior:l}}},sh.register("parallel",{create:function(n,o){var a=[];return n.eachComponent("parallel",function(t,e){var i=new rb(t,n,o);i.name="parallel_"+e,i.resize(t,o),(t.coordinateSystem=i).model=t,a.push(i)}),n.eachSeries(function(t){if("parallel"===t.get("coordinateSystem")){var e=n.queryComponents({mainType:"parallel",index:t.get("parallelIndex"),id:t.get("parallelId")})[0];t.coordinateSystem=e.coordinateSystem}}),a}});var lb=Lu.extend({type:"baseParallelAxis",axis:null,activeIntervals:[],getAreaSelectStyle:function(){return ha([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},setActiveIntervals:function(t){var e=this.activeIntervals=L(t);if(e)for(var i=e.length-1;0<=i;i--)Bl(e[i])},getActiveState:function(t){var e=this.activeIntervals;if(!e.length)return"normal";if(null==t||isNaN(t))return"inactive";if(1===e.length){var i=e[0];if(i[0]<=t&&t<=i[1])return"active"}else for(var n=0,o=e.length;n<o;n++)if(e[n][0]<=t&&t<=e[n][1])return"active";return"inactive"}});m(lb.prototype,cg),Bm("parallel",lb,function(t,e){return e.type||(e.data?"category":"value")},{type:"value",dim:null,areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10}),Lu.extend({type:"parallel",dependencies:["parallelAxis"],coordinateSystem:null,dimensions:null,parallelAxisIndex:null,layoutMode:"box",defaultOption:{zlevel:0,z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},init:function(){Lu.prototype.init.apply(this,arguments),this.mergeOption({})},mergeOption:function(t){var e=this.option;t&&m(e,t,!0),this._initDimensions()},contains:function(t,e){var i=t.get("parallelIndex");return null!=i&&e.getComponent("parallel",i)===this},setAxisExpand:function(e){E(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(t){e.hasOwnProperty(t)&&(this.option[t]=e[t])},this)},_initDimensions:function(){var e=this.dimensions=[],i=this.parallelAxisIndex=[];E(M(this.dependentModels.parallelAxis,function(t){return(t.get("parallelIndex")||0)===this.componentIndex},this),function(t){e.push("dim"+t.get("dim")),i.push(t.componentIndex)})}});xf({type:"axisAreaSelect",event:"axisAreaSelected"},function(e,t){t.eachComponent({mainType:"parallelAxis",query:e},function(t){t.axis.model.setActiveIntervals(e.intervals)})}),xf("parallelAxisExpand",function(e,t){t.eachComponent({mainType:"parallel",query:e},function(t){t.setAxisExpand(e)})});var ub=T,hb=E,cb=N,db=Math.min,fb=Math.max,pb=Math.pow,gb=1e4,mb=6,vb=6,yb="globalPan",xb={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},_b={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},wb={brushStyle:{lineWidth:2,stroke:"rgba(0,0,0,0.3)",fill:"rgba(0,0,0,0.1)"},transformable:!0,brushMode:"single",removeOnClick:!1},bb=0;function Sb(t){Ct.call(this),this._zr=t,this.group=new Ci,this._brushType,this._brushOption,this._panels,this._track=[],this._dragging,this._covers=[],this._creatingCover,this._creatingPanel,this._enableGlobalPan,this._uid="brushController_"+bb++,this._handlers={},hb(qb,function(t,e){this._handlers[e]=A(t,this)},this)}function Mb(t,e){var i=$b[e.brushType].createCover(t,e);return i.__brushOption=e,Ab(i,e),t.group.add(i),i}function Ib(t,e){var i=Cb(e);return i.endCreating&&(i.endCreating(t,e),Ab(e,e.__brushOption)),e}function Tb(t,e){var i=e.__brushOption;Cb(e).updateCoverShape(t,e,i.range,i)}function Ab(t,e){var i=e.z;null==i&&(i=gb),t.traverse(function(t){t.z=i,t.z2=i})}function Db(t,e){Cb(e).updateCommon(t,e),Tb(t,e)}function Cb(t){return $b[t.__brushOption.brushType]}function Lb(t,e,i){var n,o=t._panels;if(!o)return!0;var a=t._transform;return hb(o,function(t){t.isTargetByCursor(e,i,a)&&(n=t)}),n}function kb(t,e){var i=t._panels;if(!i)return!0;var n=e.__brushOption.panelId;return null==n||i[n]}function Pb(e){var t=e._covers,i=t.length;return hb(t,function(t){e.group.remove(t)},e),t.length=0,!!i}function Nb(t,e){var i=cb(t._covers,function(t){var e=t.__brushOption,i=L(e.range);return{brushType:e.brushType,panelId:e.panelId,range:i}});t.trigger("brush",i,{isEnd:!!e.isEnd,removeOnClick:!!e.removeOnClick})}function Ob(t){var e=t.length-1;return e<0&&(e=0),[t[0],t[e]]}function Eb(e,i,t,n){var o=new Ci;return o.add(new rs({name:"main",style:Vb(t),silent:!0,draggable:!0,cursor:"move",drift:ub(e,i,o,"nswe"),ondragend:ub(Nb,i,{isEnd:!0})})),hb(n,function(t){o.add(new rs({name:t,style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:ub(e,i,o,t),ondragend:ub(Nb,i,{isEnd:!0})}))}),o}function Rb(t,e,i,n){var o=n.brushStyle.lineWidth||0,a=fb(o,vb),r=i[0][0],s=i[1][0],l=r-o/2,u=s-o/2,h=i[0][1],c=i[1][1],d=h-a+o/2,f=c-a+o/2,p=h-r,g=c-s,m=p+o,v=g+o;Bb(t,e,"main",r,s,p,g),n.transformable&&(Bb(t,e,"w",l,u,a,v),Bb(t,e,"e",d,u,a,v),Bb(t,e,"n",l,u,m,a),Bb(t,e,"s",l,f,m,a),Bb(t,e,"nw",l,u,a,a),Bb(t,e,"ne",d,u,a,a),Bb(t,e,"sw",l,f,a,a),Bb(t,e,"se",d,f,a,a))}function zb(n,o){var t=o.__brushOption,a=t.transformable,e=o.childAt(0);e.useStyle(Vb(t)),e.attr({silent:!a,cursor:a?"move":"default"}),hb(["w","e","n","s","se","sw","ne","nw"],function(t){var e=o.childOfName(t),i=function t(e,i){{if(1<i.length){i=i.split("");var n=[t(e,i[0]),t(e,i[1])];return"e"!==n[0]&&"w"!==n[0]||n.reverse(),n.join("")}var o={w:"left",e:"right",n:"top",s:"bottom"},a={left:"w",right:"e",top:"n",bottom:"s"},n=gl(o[i],fl(e.group));return a[n]}}(n,t);e&&e.attr({silent:!a,invisible:!a,cursor:a?_b[i]+"-resize":null})})}function Bb(t,e,i,n,o,a,r){var s=e.childOfName(i);s&&s.setShape(function(t){var e=db(t[0][0],t[1][0]),i=db(t[0][1],t[1][1]),n=fb(t[0][0],t[1][0]),o=fb(t[0][1],t[1][1]);return{x:e,y:i,width:n-e,height:o-i}}(Zb(t,e,[[n,o],[n+a,o+r]])))}function Vb(t){return D({strokeNoScale:!0},t.brushStyle)}function Gb(t,e,i,n){var o=[db(t,i),db(e,n)],a=[fb(t,i),fb(e,n)];return[[o[0],a[0]],[o[1],a[1]]]}function Fb(t,e,i,n,o,a,r,s){var l=n.__brushOption,u=t(l.range),h=Hb(i,a,r);hb(o.split(""),function(t){var e=xb[t];u[e[0]][e[1]]+=h[e[0]]}),l.range=e(Gb(u[0][0],u[1][0],u[0][1],u[1][1])),Db(i,n),Nb(i,{isEnd:!1})}function Wb(t,e,i,n,o){var a=e.__brushOption.range,r=Hb(t,i,n);hb(a,function(t){t[0]+=r[0],t[1]+=r[1]}),Db(t,e),Nb(t,{isEnd:!1})}function Hb(t,e,i){var n=t.group,o=n.transformCoordToLocal(e,i),a=n.transformCoordToLocal(0,0);return[o[0]-a[0],o[1]-a[1]]}function Zb(t,e,i){var n=kb(t,e);return n&&!0!==n?n.clipPath(i,t._transform):L(i)}function Ub(t){var e=t.event;e.preventDefault&&e.preventDefault()}function Xb(t,e,i){return t.childOfName("main").contain(e,i)}function Yb(t,e,i,n){var o,a=t._creatingCover,r=t._creatingPanel,s=t._brushOption;if(t._track.push(i.slice()),function(t){var e=t._track;if(!e.length)return!1;var i=e[e.length-1],n=e[0],o=i[0]-n[0],a=i[1]-n[1],r=pb(o*o+a*a,.5);return mb<r}(t)||a){if(r&&!a){"single"===s.brushMode&&Pb(t);var l=L(s);l.brushType=jb(l.brushType,r),l.panelId=!0===r?null:r.panelId,a=t._creatingCover=Mb(t,l),t._covers.push(a)}if(a){var u=$b[jb(t._brushType,r)];a.__brushOption.range=u.getCreatingRange(Zb(t,a,t._track)),n&&(Ib(t,a),u.updateCommon(t,a)),Tb(t,a),o={isEnd:n}}}else n&&"single"===s.brushMode&&s.removeOnClick&&Lb(t,e,i)&&Pb(t)&&(o={isEnd:n,removeOnClick:!0});return o}function jb(t,e){return"auto"===t?e.defaultBrushType:t}Sb.prototype={constructor:Sb,enableBrush:function(t){return this._brushType&&function(t){var e=t._zr;(function(t,e,i){var n=Ry(t);n[e]===i&&(n[e]=null)})(e,yb,t._uid),function(i,t){hb(t,function(t,e){i.off(e,t)})}(e,t._handlers),t._brushType=t._brushOption=null}(this),t.brushType&&function(t,e){var i=t._zr;t._enableGlobalPan||function(t,e,i){Ry(t)[e]=i}(i,yb,t._uid);(function(i,t){hb(t,function(t,e){i.on(e,t)})})(i,t._handlers),t._brushType=e.brushType,t._brushOption=m(L(wb),e,!0)}(this,t),this},setPanels:function(t){if(t&&t.length){var e=this._panels={};E(t,function(t){e[t.panelId]=L(t)})}else this._panels=null;return this},mount:function(t){t=t||{},this._enableGlobalPan=t.enableGlobalPan;var e=this.group;return this._zr.add(e),e.attr({position:t.position||[0,0],rotation:t.rotation||0,scale:t.scale||[1,1]}),this._transform=e.getLocalTransform(),this},eachCover:function(t,e){hb(this._covers,t,e)},updateCovers:function(o){o=N(o,function(t){return m(L(wb),t,!0)});var i="\0-brush-index-",a=this._covers,r=this._covers=[],s=this,l=this._creatingCover;return new Lf(a,o,function(t,e){return n(t.__brushOption,e)},n).add(t).update(t).remove(function(t){a[t]!==l&&s.group.remove(a[t])}).execute(),this;function n(t,e){return(null!=t.id?t.id:i+e)+"-"+t.brushType}function t(t,e){var i=o[t];if(null!=e&&a[e]===l)r[t]=a[e];else{var n=r[t]=null!=e?(a[e].__brushOption=i,a[e]):Ib(s,Mb(s,i));Db(s,n)}}},unmount:function(){return this.enableBrush(!1),Pb(this),this._zr.remove(this.group),this},dispose:function(){this.unmount(),this.off()}},b(Sb,Ct);var qb={mousedown:function(t){if(this._dragging)Kb(this,t);else if(!t.target||!t.target.draggable){Ub(t);var e=this.group.transformCoordToLocal(t.offsetX,t.offsetY);this._creatingCover=null,(this._creatingPanel=Lb(this,t,e))&&(this._dragging=!0,this._track=[e.slice()])}},mousemove:function(t){var e=t.offsetX,i=t.offsetY,n=this.group.transformCoordToLocal(e,i);if(function(t,e,i){if(t._brushType&&!function(t,e,i){var n=t._zr;return e<0||e>n.getWidth()||i<0||i>n.getHeight()}(t,e)){var n=t._zr,o=t._covers,a=Lb(t,e,i);if(!t._dragging)for(var r=0;r<o.length;r++){var s=o[r].__brushOption;if(a&&(!0===a||s.panelId===a.panelId)&&$b[s.brushType].contain(o[r],i[0],i[1]))return}a&&n.setCursorStyle("crosshair")}}(this,t,n),this._dragging){Ub(t);var o=Yb(this,t,n,!1);o&&Nb(this,o)}},mouseup:function(t){Kb(this,t)}};function Kb(t,e){if(t._dragging){Ub(e);var i=e.offsetX,n=e.offsetY,o=t.group.transformCoordToLocal(i,n),a=Yb(t,e,o,!0);t._dragging=!1,t._track=[],t._creatingCover=null,a&&Nb(t,a)}}var $b={lineX:Jb(0),lineY:Jb(1),rect:{createCover:function(t,e){return Eb(ub(Fb,function(t){return t},function(t){return t}),t,e,["w","e","n","s","se","sw","ne","nw"])},getCreatingRange:function(t){var e=Ob(t);return Gb(e[1][0],e[1][1],e[0][0],e[0][1])},updateCoverShape:function(t,e,i,n){Rb(t,e,i,n)},updateCommon:zb,contain:Xb},polygon:{createCover:function(t,e){var i=new Ci;return i.add(new ts({name:"main",style:Vb(e),silent:!0})),i},getCreatingRange:function(t){return t},endCreating:function(t,e){e.remove(e.childAt(0)),e.add(new Qr({name:"main",draggable:!0,drift:ub(Wb,t,e),ondragend:ub(Nb,t,{isEnd:!0})}))},updateCoverShape:function(t,e,i,n){e.childAt(0).setShape({points:Zb(t,e,i)})},updateCommon:zb,contain:Xb}};function Jb(l){return{createCover:function(t,e){return Eb(ub(Fb,function(t){var e=[t,[0,100]];return l&&e.reverse(),e},function(t){return t[l]}),t,e,[["w","e"],["n","s"]][l])},getCreatingRange:function(t){var e=Ob(t);return[db(e[0][l],e[1][l]),fb(e[0][l],e[1][l])]},updateCoverShape:function(t,e,i,n){var o,a=kb(t,e);if(!0!==a&&a.getLinearBrushOtherExtent)o=a.getLinearBrushOtherExtent(l,t._transform);else{var r=t._zr;o=[0,[r.getWidth(),r.getHeight()][1-l]]}var s=[i,o];l&&s.reverse(),Rb(t,e,s,n)},updateCommon:zb,contain:Xb}}function Qb(i){return i=iS(i),function(t,e){return vl(t,i)}}function tS(o,a){return o=iS(o),function(t){var e=null!=a?a:t,i=e?o.width:o.height,n=e?o.x:o.y;return[n,n+(i||0)]}}function eS(n,o,a){return n=iS(n),function(t,e,i){return n.contain(e[0],e[1])&&!qy(t,o,a)}}function iS(t){return Di.create(t)}var nS=["axisLine","axisTickLabel","axisName"],oS=Tf({type:"parallelAxis",init:function(t,e){oS.superApply(this,"init",arguments),(this._brushController=new Sb(e.getZr())).on("brush",A(this._onBrush,this))},render:function(t,e,i,n){if(!function(t,e,i){return i&&"axisAreaSelect"===i.type&&e.findComponents({mainType:"parallelAxis",query:i})[0]===t}(t,e,n)){this.axisModel=t,this.api=i,this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new Ci,this.group.add(this._axisGroup),t.get("show")){var a=function(t,e){return e.getComponent("parallel",t.get("parallelIndex"))}(t,e),r=a.coordinateSystem,s=t.getAreaSelectStyle(),l=s.width,u=t.axis.dim,h=k({strokeContainThreshold:l},r.getAxisLayout(u)),c=new $m(t,h);E(nS,c.add,c),this._axisGroup.add(c.getGroup()),this._refreshBrushController(h,s,t,a,l,i);var d=n&&!1===n.animation?null:t;ml(o,this._axisGroup,d)}}},_refreshBrushController:function(t,e,i,n,o,a){var r=i.axis.getExtent(),s=r[1]-r[0],l=Math.min(30,.1*Math.abs(s)),u=Di.create({x:r[0],y:-o/2,width:s,height:o});u.x-=l,u.width+=2*l,this._brushController.mount({enableGlobalPan:!0,rotation:t.rotation,position:t.position}).setPanels([{panelId:"pl",clipPath:Qb(u),isTargetByCursor:eS(u,a,n),getLinearBrushOtherExtent:tS(u,0)}]).enableBrush({brushType:"lineX",brushStyle:e,removeOnClick:!0}).updateCovers(function(t){var e=t.axis;return N(t.activeIntervals,function(t){return{brushType:"lineX",panelId:"pl",range:[e.dataToCoord(t[0],!0),e.dataToCoord(t[1],!0)]}})}(i))},_onBrush:function(t,e){var i=this.axisModel,n=i.axis,o=N(t,function(t){return[n.coordToData(t.range[0],!0),n.coordToData(t.range[1],!0)]});!i.option.realtime!==e.isEnd&&!e.removeOnClick||this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:i.id,intervals:o})},dispose:function(){this._brushController.dispose()}});Tf({type:"parallel",render:function(t,e,i){this._model=t,this._api=i,this._handlers||(this._handlers={},E(aS,function(t,e){i.getZr().on(e,this._handlers[e]=A(t,this))},this)),Lc(this,"_throttledDispatchExpand",t.get("axisExpandRate"),"fixRate")},dispose:function(t,i){E(this._handlers,function(t,e){i.getZr().off(e,t)}),this._handlers=null},_throttledDispatchExpand:function(t){this._dispatchExpand(t)},_dispatchExpand:function(t){t&&this._api.dispatchAction(k({type:"parallelAxisExpand"},t))}});var aS={mousedown:function(t){rS(this,"click")&&(this._mouseDownPoint=[t.offsetX,t.offsetY])},mouseup:function(t){var e=this._mouseDownPoint;if(rS(this,"click")&&e){var i=[t.offsetX,t.offsetY];if(5<Math.pow(e[0]-i[0],2)+Math.pow(e[1]-i[1],2))return;var n=this._model.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]);"none"!==n.behavior&&this._dispatchExpand({axisExpandWindow:n.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(t){if(!this._mouseDownPoint&&rS(this,"mousemove")){var e=this._model,i=e.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]),n=i.behavior;"jump"===n&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand("none"===n?null:{axisExpandWindow:i.axisExpandWindow,animation:"jump"===n&&null})}}};function rS(t,e){var i=t._model;return i.get("axisExpandable")&&i.get("axisExpandTriggerOn")===e}vf(function(t){!function(t){if(t.parallel)return;var e=!1;E(t.series,function(t){t&&"parallel"===t.type&&(e=!0)}),e&&(t.parallel=[{}])}(t),function(n){E(Vo(n.parallelAxis),function(t){if(z(t)){var e=t.parallelIndex||0,i=Vo(n.parallel)[e];i&&i.parallelAxisDefault&&m(t,i.parallelAxisDefault,!1)}})}(t)}),rc.extend({type:"series.parallel",dependencies:["parallel"],visualColorAccessPath:"lineStyle.color",getInitialData:function(t,e){var i=this.getSource();return function(t,e){if(t.encodeDefine)return;var i=e.ecModel.getComponent("parallel",e.get("parallelIndex"));if(!i)return;var n=t.encodeDefine=Q();E(i.dimensions,function(t){var e=function(t){return+t.replace("dim","")}(t);n.set(t,e)})}(i,this),pp(i,this)},getRawIndicesByActiveState:function(i){var t=this.coordinateSystem,n=this.getData(),o=[];return t.eachActiveState(n,function(t,e){i===t&&o.push(n.getRawIndex(e))}),o},defaultOption:{zlevel:0,z:2,coordinateSystem:"parallel",parallelIndex:0,label:{show:!1},inactiveOpacity:.05,activeOpacity:1,lineStyle:{width:1,opacity:.45,type:"solid"},emphasis:{label:{show:!1}},progressive:500,smooth:!1,animationEasing:"linear"}});xc.extend({type:"parallel",init:function(){this._dataGroup=new Ci,this.group.add(this._dataGroup),this._data,this._initialized},render:function(a,t,e,r){var i=this._dataGroup,s=a.getData(),l=this._data,u=a.coordinateSystem,h=u.dimensions,c=uS(a);if(s.diff(l).add(function(t){hS(lS(s,i,t,h,u),s,t,c)}).update(function(t,e){var i=l.getItemGraphicEl(e),n=sS(s,t,h,u);s.setItemGraphicEl(t,i);var o=r&&!1===r.animation?null:a;cl(i,{shape:{points:n}},o,t),hS(i,s,t,c)}).remove(function(t){var e=l.getItemGraphicEl(t);i.remove(e)}).execute(),!this._initialized){this._initialized=!0;var n=function(t,e,i){var n=t.model,o=t.getRect(),a=new rs({shape:{x:o.x,y:o.y,width:o.width,height:o.height}}),r="horizontal"===n.get("layout")?"width":"height";return a.setShape(r,0),dl(a,{shape:{width:o.width,height:o.height}},e,i),a}(u,a,function(){setTimeout(function(){i.removeClipPath()})});i.setClipPath(n)}this._data=s},incrementalPrepareRender:function(t,e,i){this._initialized=!0,this._data=null,this._dataGroup.removeAll()},incrementalRender:function(t,e,i){for(var n=e.getData(),o=e.coordinateSystem,a=o.dimensions,r=uS(e),s=t.start;s<t.end;s++){var l=lS(n,this._dataGroup,s,a,o);l.incremental=!0,hS(l,n,s,r)}},dispose:function(){},remove:function(){this._dataGroup&&this._dataGroup.removeAll(),this._data=null}});function sS(t,e,i,n){for(var o,a=[],r=0;r<i.length;r++){var s=i[r],l=t.get(t.mapDimension(s),e);o=l,("category"===n.getAxis(s).type?null==o:null==o||isNaN(o))||a.push(n.dataToPoint(l,s))}return a}function lS(t,e,i,n,o){var a=sS(t,i,n,o),r=new ts({shape:{points:a},silent:!0,z2:10});return e.add(r),t.setItemGraphicEl(i,r),r}function uS(t){var e=t.get("smooth",!0);return!0===e&&(e=.3),{lineStyle:t.getModel("lineStyle").getLineStyle(),smooth:null!=e?e:.3}}function hS(t,e,i,n){var o=n.lineStyle;e.hasItemOption&&(o=e.getItemModel(i).getModel("lineStyle").getLineStyle());t.useStyle(o);var a=t.style;a.fill=null,a.stroke=e.getItemVisual(i,"color"),a.opacity=e.getItemVisual(i,"opacity"),n.smooth&&(t.shape.smooth=n.smooth)}var cS=["lineStyle","normal","opacity"];bf({seriesType:"parallel",reset:function(t,e,i){var n=t.getModel("itemStyle"),o=t.getModel("lineStyle"),a=e.get("color"),r=o.get("color")||n.get("color")||a[t.seriesIndex%a.length],s=t.get("inactiveOpacity"),l=t.get("activeOpacity"),u=t.getModel("lineStyle").getLineStyle(),h=t.coordinateSystem,c=t.getData(),d={normal:u.opacity,active:l,inactive:s};return c.setVisual("color",r),{progress:function(t,o){h.eachActiveState(o,function(t,e){var i=d[t];if("normal"===t&&o.hasItemOption){var n=o.getItemModel(e).get(cS,!0);null!=n&&(i=n)}o.setItemVisual(e,"opacity",i)},t.start,t.end)}}}});var dS=rc.extend({type:"series.sankey",layoutInfo:null,levelModels:null,getInitialData:function(t,e){for(var i=t.edges||t.links,n=t.data||t.nodes,o=t.levels,a=this.levelModels={},r=0;r<o.length;r++)null!=o[r].depth&&0<=o[r].depth&&(a[o[r].depth]=new Cl(o[r],this,e));if(n&&i)return tw(n,i,this,!0,function(t,e){t.wrapMethod("getItemModel",function(t,n){return t.customizeGetParent(function(t){var e=this.parentModel,i=e.getData().getItemLayout(n).depth;return e.levelModels[i]||this.parentModel}),t}),e.wrapMethod("getItemModel",function(t,n){return t.customizeGetParent(function(t){var e=this.parentModel,i=e.getGraph().getEdgeByIndex(n).node1.getLayout().depth;return e.levelModels[i]||this.parentModel}),t})}).data},setNodePosition:function(t,e){var i=this.option.data[t];i.localX=e[0],i.localY=e[1]},getGraph:function(){return this.getData().graph},getEdgeData:function(){return this.getGraph().edgeData},formatTooltip:function(t,e,i){if("edge"===i){var n=this.getDataParams(t,i),o=n.data,a=o.source+" -- "+o.target;return n.value&&(a+=" : "+n.value),au(a)}if("node"!==i)return dS.superCall(this,"formatTooltip",t,e);var r=this.getGraph().getNodeByIndex(t).getLayout().value,s=this.getDataParams(t,i).data.name;if(r)a=s+" : "+r;return au(a)},optionUpdated:function(){var t=this.option;!0===t.focusNodeAdjacency&&(t.focusNodeAdjacency="allEdges")},getDataParams:function(t,e){var i=dS.superCall(this,"getDataParams",t,e);if(null==i.value&&"node"===e){var n=this.getGraph().getNodeByIndex(t).getLayout().value;i.value=n}return i},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",layout:null,left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,focusNodeAdjacency:!1,layoutIterations:32,label:{show:!0,position:"right",color:"#000",fontSize:12},levels:[],nodeAlign:"justify",itemStyle:{borderWidth:1,borderColor:"#333"},lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},animationEasing:"linear",animationDuration:1e3}}),fS=["itemStyle","opacity"],pS=["emphasis","itemStyle","opacity"],gS=["lineStyle","opacity"],mS=["emphasis","lineStyle","opacity"];function vS(t,e){return t.getVisual("opacity")||t.getModel().get(e)}function yS(t,e,i){var n=t.getGraphicEl(),o=vS(t,e);null!=i&&(null==o&&(o=1),o*=i),n.downplay&&n.downplay(),n.traverse(function(t){"group"!==t.type&&t.setStyle("opacity",o)})}function xS(t,e){var i=vS(t,e),n=t.getGraphicEl();n.traverse(function(t){"group"!==t.type&&t.setStyle("opacity",i)}),n.highlight&&n.highlight()}var _S=Cs({shape:{x1:0,y1:0,x2:0,y2:0,cpx1:0,cpy1:0,cpx2:0,cpy2:0,extent:0,orient:""},buildPath:function(t,e){var i=e.extent;t.moveTo(e.x1,e.y1),t.bezierCurveTo(e.cpx1,e.cpy1,e.cpx2,e.cpy2,e.x2,e.y2),"vertical"===e.orient?(t.lineTo(e.x2+i,e.y2),t.bezierCurveTo(e.cpx2+i,e.cpy2,e.cpx1+i,e.cpy1,e.x1+i,e.y1)):(t.lineTo(e.x2,e.y2+i),t.bezierCurveTo(e.cpx2,e.cpy2+i,e.cpx1,e.cpy1+i,e.x1,e.y1+i)),t.closePath()},highlight:function(){this.trigger("emphasis")},downplay:function(){this.trigger("normal")}});Df({type:"sankey",_model:null,_focusAdjacencyDisabled:!1,render:function(w,t,n){var o=this,e=w.getGraph(),b=this.group,i=w.layoutInfo,S=i.width,M=i.height,u=w.getData(),I=w.getData("edge"),T=w.get("orient");this._model=w,b.removeAll(),b.attr("position",[i.x,i.y]),e.eachEdge(function(t){var e=new _S;e.dataIndex=t.dataIndex,e.seriesIndex=w.seriesIndex,e.dataType="edge";var i,n,o,a,r,s,l,u,h=t.getModel("lineStyle"),c=h.get("curveness"),d=t.node1.getLayout(),f=t.node1.getModel(),p=f.get("localX"),g=f.get("localY"),m=t.node2.getLayout(),v=t.node2.getModel(),y=v.get("localX"),x=v.get("localY"),_=t.getLayout();switch(e.shape.extent=Math.max(1,_.dy),u="vertical"===(e.shape.orient=T)?(i=(null!=p?p*S:d.x)+_.sy,n=(null!=g?g*M:d.y)+d.dy,o=(null!=y?y*S:m.x)+_.ty,r=i,s=n*(1-c)+(a=null!=x?x*M:m.y)*c,l=o,n*c+a*(1-c)):(i=(null!=p?p*S:d.x)+d.dx,n=(null!=g?g*M:d.y)+_.sy,r=i*(1-c)+(o=null!=y?y*S:m.x)*c,s=n,l=i*c+o*(1-c),a=(null!=x?x*M:m.y)+_.ty),e.setShape({x1:i,y1:n,x2:o,y2:a,cpx1:r,cpy1:s,cpx2:l,cpy2:u}),e.setStyle(h.getItemStyle()),e.style.fill){case"source":e.style.fill=t.node1.getVisual("color");break;case"target":e.style.fill=t.node2.getVisual("color")}$s(e,t.getModel("emphasis.lineStyle").getItemStyle()),b.add(e),I.setItemGraphicEl(t.dataIndex,e)}),e.eachNode(function(t){var e=t.getLayout(),i=t.getModel(),n=i.get("localX"),o=i.get("localY"),a=i.getModel("label"),r=i.getModel("emphasis.label"),s=new rs({shape:{x:null!=n?n*S:e.x,y:null!=o?o*M:e.y,width:e.dx,height:e.dy},style:i.getModel("itemStyle").getItemStyle()}),l=t.getModel("emphasis.itemStyle").getItemStyle();el(s.style,l,a,r,{labelFetcher:w,labelDataIndex:t.dataIndex,defaultText:t.id,isRectText:!0}),s.setStyle("fill",t.getVisual("color")),$s(s,l),b.add(s),u.setItemGraphicEl(t.dataIndex,s),s.dataType="node"}),u.eachItemGraphicEl(function(t,i){var e=u.getItemModel(i);e.get("draggable")&&(t.drift=function(t,e){o._focusAdjacencyDisabled=!0,this.shape.x+=t,this.shape.y+=e,this.dirty(),n.dispatchAction({type:"dragNode",seriesId:w.id,dataIndex:u.getRawIndex(i),localX:this.shape.x/S,localY:this.shape.y/M})},t.ondragend=function(){o._focusAdjacencyDisabled=!1},t.draggable=!0,t.cursor="move"),t.highlight=function(){this.trigger("emphasis")},t.downplay=function(){this.trigger("normal")},t.focusNodeAdjHandler&&t.off("mouseover",t.focusNodeAdjHandler),t.unfocusNodeAdjHandler&&t.off("mouseout",t.unfocusNodeAdjHandler),e.get("focusNodeAdjacency")&&(t.on("mouseover",t.focusNodeAdjHandler=function(){o._focusAdjacencyDisabled||(o._clearTimer(),n.dispatchAction({type:"focusNodeAdjacency",seriesId:w.id,dataIndex:t.dataIndex}))}),t.on("mouseout",t.unfocusNodeAdjHandler=function(){o._focusAdjacencyDisabled||o._dispatchUnfocus(n)}))}),I.eachItemGraphicEl(function(t,e){var i=I.getItemModel(e);t.focusNodeAdjHandler&&t.off("mouseover",t.focusNodeAdjHandler),t.unfocusNodeAdjHandler&&t.off("mouseout",t.unfocusNodeAdjHandler),i.get("focusNodeAdjacency")&&(t.on("mouseover",t.focusNodeAdjHandler=function(){o._focusAdjacencyDisabled||(o._clearTimer(),n.dispatchAction({type:"focusNodeAdjacency",seriesId:w.id,edgeDataIndex:t.dataIndex}))}),t.on("mouseout",t.unfocusNodeAdjHandler=function(){o._focusAdjacencyDisabled||o._dispatchUnfocus(n)}))}),!this._data&&w.get("animation")&&b.setClipPath(function(t,e,i){var n=new rs({shape:{x:t.x-10,y:t.y-10,width:0,height:t.height+20}});return dl(n,{shape:{width:t.width+20}},e,i),n}(b.getBoundingRect(),w,function(){b.removeClipPath()})),this._data=w.getData()},dispose:function(){this._clearTimer()},_dispatchUnfocus:function(t){var e=this;this._clearTimer(),this._unfocusDelayTimer=setTimeout(function(){e._unfocusDelayTimer=null,t.dispatchAction({type:"unfocusNodeAdjacency",seriesId:e._model.id})},500)},_clearTimer:function(){this._unfocusDelayTimer&&(clearTimeout(this._unfocusDelayTimer),this._unfocusDelayTimer=null)},focusNodeAdjacency:function(t,e,i,n){var o=t.getData(),a=o.graph,r=n.dataIndex,s=o.getItemModel(r),l=n.edgeDataIndex;if(null!=r||null!=l){var u=a.getNodeByIndex(r),h=a.getEdgeByIndex(l);if(a.eachNode(function(t){yS(t,fS,.1)}),a.eachEdge(function(t){yS(t,gS,.1)}),u){xS(u,pS);var c=s.get("focusNodeAdjacency");"outEdges"===c?E(u.outEdges,function(t){t.dataIndex<0||(xS(t,mS),xS(t.node2,pS))}):"inEdges"===c?E(u.inEdges,function(t){t.dataIndex<0||(xS(t,mS),xS(t.node1,pS))}):"allEdges"===c&&E(u.edges,function(t){t.dataIndex<0||(xS(t,mS),t.node1!==u&&xS(t.node1,pS),t.node2!==u&&xS(t.node2,pS))})}h&&(xS(h,mS),xS(h.node1,pS),xS(h.node2,pS))}},unfocusNodeAdjacency:function(t,e,i,n){var o=t.getGraph();o.eachNode(function(t){yS(t,fS)}),o.eachEdge(function(t){yS(t,gS)})}}),xf({type:"dragNode",event:"dragnode",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"sankey",query:e},function(t){t.setNodePosition(e.dataIndex,[e.localX,e.localY])})});function wS(t){var e=t.hostGraph.data.getRawDataItem(t.dataIndex);return null!=e.depth&&0<=e.depth}function bS(t,l,u,h,c){var d="vertical"===c?"x":"y";E(t,function(t){var e,i,n;t.sort(function(t,e){return t.getLayout()[d]-e.getLayout()[d]});for(var o=0,a=t.length,r="vertical"===c?"dx":"dy",s=0;s<a;s++)0<(n=o-(i=t[s]).getLayout()[d])&&(e=i.getLayout()[d]+n,"vertical"===c?i.setLayout({x:e},!0):i.setLayout({y:e},!0)),o=i.getLayout()[d]+i.getLayout()[r]+l;if(0<(n=o-l-("vertical"===c?h:u)))for(e=i.getLayout()[d]-n,"vertical"===c?i.setLayout({x:e},!0):i.setLayout({y:e},!0),o=e,s=a-2;0<=s;--s)0<(n=(i=t[s]).getLayout()[d]+i.getLayout()[r]+l-o)&&(e=i.getLayout()[d]-n,"vertical"===c?i.setLayout({x:e},!0):i.setLayout({y:e},!0)),o=i.getLayout()[d]})}function SS(t,o,a){E(t.slice().reverse(),function(t){E(t,function(t){if(t.outEdges.length){var e=DS(t.outEdges,MS,a)/DS(t.outEdges,AS,a);if("vertical"===a){var i=t.getLayout().x+(e-TS(t,a))*o;t.setLayout({x:i},!0)}else{var n=t.getLayout().y+(e-TS(t,a))*o;t.setLayout({y:n},!0)}}})})}function MS(t,e){return TS(t.node2,e)*t.getValue()}function IS(t,e){return TS(t.node1,e)*t.getValue()}function TS(t,e){return"vertical"===e?t.getLayout().x+t.getLayout().dx/2:t.getLayout().y+t.getLayout().dy/2}function AS(t){return t.getValue()}function DS(t,e,i){for(var n=0,o=t.length,a=-1;++a<o;){var r=+e.call(t,t[a],i);isNaN(r)||(n+=r)}return n}function CS(t,o,a){E(t,function(t){E(t,function(t){if(t.inEdges.length){var e=DS(t.inEdges,IS,a)/DS(t.inEdges,AS,a);if("vertical"===a){var i=t.getLayout().x+(e-TS(t,a))*o;t.setLayout({x:i},!0)}else{var n=t.getLayout().y+(e-TS(t,a))*o;t.setLayout({y:n},!0)}}})})}wf(function(t,u,e){t.eachSeriesByType("sankey",function(t){var e=t.get("nodeWidth"),i=t.get("nodeGap"),n=function(t,e){return wu(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,u),o=(t.layoutInfo=n).width,a=n.height,r=t.getGraph(),s=r.nodes,l=r.edges;!function(t){E(t,function(t){var e=DS(t.outEdges,AS),i=DS(t.inEdges,AS),n=t.getValue()||0,o=Math.max(e,i,n);t.setLayout({value:o},!0)})}(s),function(t,e,i,n,o,a,r,s,l){(function(t,e,i,n,o,a,r){for(var s=[],l=[],u=[],h=[],c=0,d=0;d<e.length;d++)s[d]=1;for(d=0;d<t.length;d++)l[d]=t[d].inEdges.length,0===l[d]&&u.push(t[d]);var f=-1;for(;u.length;){for(var p=0;p<u.length;p++){var g=u[p],m=g.hostGraph.data.getRawDataItem(g.dataIndex),v=null!=m.depth&&0<=m.depth;v&&m.depth>f&&(f=m.depth),g.setLayout({depth:v?m.depth:c},!0),"vertical"===a?g.setLayout({dy:i},!0):g.setLayout({dx:i},!0);for(var y=0;y<g.outEdges.length;y++){var x=g.outEdges[y],_=e.indexOf(x);s[_]=0;var w=x.node2,b=t.indexOf(w);0==--l[b]&&h.indexOf(w)<0&&h.push(w)}}++c,u=h,h=[]}for(d=0;d<s.length;d++)if(1===s[d])throw new Error("Sankey is a DAG, the original data has cycle!");var S=c-1<f?f:c-1;r&&"left"!==r&&function(t,e,i,n){if("right"===e){for(var o=[],a=t,r=0;a.length;){for(var s=0;s<a.length;s++){var l=a[s];l.setLayout({skNodeHeight:r},!0);for(var u=0;u<l.inEdges.length;u++){var h=l.inEdges[u];o.indexOf(h.node1)<0&&o.push(h.node1)}}a=o,o=[],++r}E(t,function(t){wS(t)||t.setLayout({depth:Math.max(0,n-t.getLayout().skNodeHeight)},!0)})}else"justify"===e&&function(t,e){E(t,function(t){wS(t)||t.outEdges.length||t.setLayout({depth:e},!0)})}(t,n)}(t,r,0,S);!function(t,i,n){E(t,function(t){var e=t.getLayout().depth*i;"vertical"===n?t.setLayout({y:e},!0):t.setLayout({x:e},!0)})}(t,"vertical"===a?(o-i)/S:(n-i)/S,a)})(t,e,i,o,a,s,l),function(t,e,i,n,o,a,r){var s=function(t,e){var i=[],n="vertical"===e?"y":"x",o=ta(t,function(t){return t.getLayout()[n]});return o.keys.sort(function(t,e){return t-e}),E(o.keys,function(t){i.push(o.buckets.get(t))}),i}(t,r);(function(t,e,o,a,r,s){var l=1/0;E(t,function(t){var e=t.length,i=0;E(t,function(t){i+=t.getLayout().value});var n="vertical"===s?(a-(e-1)*r)/i:(o-(e-1)*r)/i;n<l&&(l=n)}),E(t,function(t){E(t,function(t,e){var i=t.getLayout().value*l;"vertical"===s?(t.setLayout({x:e},!0),t.setLayout({dx:i},!0)):(t.setLayout({y:e},!0),t.setLayout({dy:i},!0))})}),E(e,function(t){var e=+t.getValue()*l;t.setLayout({dy:e},!0)})})(s,e,i,n,o,r),bS(s,o,i,n,r);for(var l=1;0<a;a--)SS(s,l*=.99,r),bS(s,o,i,n,r),CS(s,l,r),bS(s,o,i,n,r)}(t,e,a,o,n,r,s),function(t,e){var i="vertical"===e?"x":"y";E(t,function(t){t.outEdges.sort(function(t,e){return t.node2.getLayout()[i]-e.node2.getLayout()[i]}),t.inEdges.sort(function(t,e){return t.node1.getLayout()[i]-e.node1.getLayout()[i]})}),E(t,function(t){var e=0,i=0;E(t.outEdges,function(t){t.setLayout({sy:e},!0),e+=t.getLayout().dy}),E(t.inEdges,function(t){t.setLayout({ty:i},!0),i+=t.getLayout().dy})})}(t,s)}(s,l,e,i,o,a,0!==M(s,function(t){return 0===t.getLayout().value}).length?0:t.get("layoutIterations"),t.get("orient"),t.get("nodeAlign"))})}),bf(function(t,e){t.eachSeriesByType("sankey",function(n){var t=n.getGraph().nodes;if(t.length){var o=1/0,a=-1/0;E(t,function(t){var e=t.getLayout().value;e<o&&(o=e),a<e&&(a=e)}),E(t,function(t){var e=new f_({type:"color",mappingMethod:"linear",dataExtent:[o,a],visual:n.get("color")}).mapValueToVisual(t.getLayout().value),i=t.getModel().get("itemStyle.color");null!=i?t.setVisual("color",i):t.setVisual("color",e)})}})});var LS={_baseAxisDim:null,getInitialData:function(t,e){var i,n,o=e.getComponent("xAxis",this.get("xAxisIndex")),a=e.getComponent("yAxis",this.get("yAxisIndex")),r=o.get("type"),s=a.get("type");"category"===r?(t.layout="horizontal",i=o.getOrdinalMeta(),n=!0):"category"===s?(t.layout="vertical",i=a.getOrdinalMeta(),n=!0):t.layout=t.layout||"horizontal";var l=["x","y"],u="horizontal"===t.layout?0:1,h=this._baseAxisDim=l[u],c=l[1-u],d=[o,a],f=d[u].get("type"),p=d[1-u].get("type"),g=t.data;if(g&&n){var m=[];E(g,function(t,e){var i;t.value&&O(t.value)?(i=t.value.slice(),t.value.unshift(e)):O(t)?(i=t.slice(),t.unshift(e)):i=t,m.push(i)}),t.data=m}var v=this.defaultValueDimensions,y=[{name:h,type:Of(f),ordinalMeta:i,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:c,type:Of(p),dimsDef:v.slice()}];return Uv(this,{coordDimensions:y,dimensionsCount:v.length+1,encodeDefaulter:T(Ku,y,this)})},getBaseAxis:function(){var t=this._baseAxisDim;return this.ecModel.getComponent(t+"Axis",this.get(t+"AxisIndex")).axis}};b(rc.extend({type:"series.boxplot",dependencies:["xAxis","yAxis","grid"],defaultValueDimensions:[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],dimensions:null,defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:2,shadowOffsetY:2,shadowColor:"rgba(0,0,0,0.4)"}},animationEasing:"elasticOut",animationDuration:800}}),LS,!0);var kS=["itemStyle"],PS=["emphasis","itemStyle"],NS=(xc.extend({type:"boxplot",render:function(t,e,i){var o=t.getData(),a=this.group,r=this._data;this._data||a.removeAll();var s="horizontal"===t.get("layout")?1:0;o.diff(r).add(function(t){if(o.hasValue(t)){var e=OS(o.getItemLayout(t),o,t,s,!0);o.setItemGraphicEl(t,e),a.add(e)}}).update(function(t,e){var i=r.getItemGraphicEl(e);if(o.hasValue(t)){var n=o.getItemLayout(t);i?ES(n,i,o,t):i=OS(n,o,t,s),a.add(i),o.setItemGraphicEl(t,i)}else a.remove(i)}).remove(function(t){var e=r.getItemGraphicEl(t);e&&a.remove(e)}).execute(),this._data=o},remove:function(t){var e=this.group,i=this._data;this._data=null,i&&i.eachItemGraphicEl(function(t){t&&e.remove(t)})},dispose:et}),Ar.extend({type:"boxplotBoxPath",shape:{},buildPath:function(t,e){var i=e.points,n=0;for(t.moveTo(i[n][0],i[n][1]),n++;n<4;n++)t.lineTo(i[n][0],i[n][1]);for(t.closePath();n<i.length;n++)t.moveTo(i[n][0],i[n][1]),n++,t.lineTo(i[n][0],i[n][1])}}));function OS(t,e,i,n,o){var a=t.ends,r=new NS({shape:{points:o?function(t,e,i){return N(t,function(t){return(t=t.slice())[e]=i.initBaseline,t})}(a,n,t):a}});return ES(t,r,e,i,o),r}function ES(t,e,i,n,o){var a=i.hostModel;(0,bl[o?"initProps":"updateProps"])(e,{shape:{points:t.ends}},a,n);var r=i.getItemModel(n),s=r.getModel(kS),l=i.getItemVisual(n,"color"),u=s.getItemStyle(["borderColor"]);u.stroke=l,u.strokeNoScale=!0,e.useStyle(u),e.z2=100,$s(e,r.getModel(PS).getItemStyle())}var RS=["itemStyle","borderColor"],zS=E;bf(function(n,t){var o=n.get("color");n.eachRawSeriesByType("boxplot",function(t){var e=o[t.seriesIndex%o.length],i=t.getData();i.setVisual({legendSymbol:"roundRect",color:t.get(RS)||e}),n.isSeriesFiltered(t)||i.each(function(t){var e=i.getItemModel(t);i.setItemVisual(t,{color:e.get(RS,!0)})})})}),wf(function(t){var e=function(t){var n=[],o=[];return t.eachSeriesByType("boxplot",function(t){var e=t.getBaseAxis(),i=_(o,e);i<0&&(i=o.length,o[i]=e,n[i]={axis:e,seriesModels:[]}),n[i].seriesModels.push(t)}),n}(t);zS(e,function(i){var t=i.seriesModels;t.length&&(function(t){var e,i,n=t.axis,o=t.seriesModels,a=o.length,r=t.boxWidthList=[],s=t.boxOffsetList=[],l=[];if("category"===n.type)i=n.getBandWidth();else{var u=0;zS(o,function(t){u=Math.max(u,t.getData().count())}),e=n.getExtent(),Math.abs(e[1]-e[0])}zS(o,function(t){var e=t.get("boxWidth");O(e)||(e=[e,e]),l.push([Rl(e[0],i)||0,Rl(e[1],i)||0])});var h=.8*i-2,c=h/a*.3,d=(h-c*(a-1))/a,f=d/2-h/2;zS(o,function(t,e){s.push(f),f+=c+d,r.push(Math.min(Math.max(d,l[e][0]),l[e][1]))})}(i),zS(t,function(t,e){!function(t,r,e){var s=t.coordinateSystem,l=t.getData(),a=e/2,u="horizontal"===t.get("layout")?0:1,h=1-u,i=["x","y"],n=l.mapDimension(i[u]),o=l.mapDimension(i[h],!0);if(null==n||o.length<5)return;for(var c=0;c<l.count();c++){var d=l.get(n,c),f=x(d,o[2],c),p=x(d,o[0],c),g=x(d,o[1],c),m=x(d,o[3],c),v=x(d,o[4],c),y=[];_(y,g,0),_(y,m,1),y.push(p,g,v,m),w(y,p),w(y,v),w(y,f),l.setItemLayout(c,{initBaseline:f[h],ends:y})}function x(t,e,i){var n,o=l.get(e,i),a=[];return a[u]=t,a[h]=o,isNaN(t)||isNaN(o)?n=[NaN,NaN]:(n=s.dataToPoint(a))[u]+=r,n}function _(t,e,i){var n=e.slice(),o=e.slice();n[u]+=a,o[u]-=a,i?t.push(n,o):t.push(o,n)}function w(t,e){var i=e.slice(),n=e.slice();i[u]-=a,n[u]+=a,t.push(i,n)}}(t,i.boxOffsetList[e],i.boxWidthList[e])}))})}),b(rc.extend({type:"series.candlestick",dependencies:["xAxis","yAxis","grid"],defaultValueDimensions:[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],dimensions:null,defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,layout:null,clip:!0,itemStyle:{color:"#c23531",color0:"#314656",borderWidth:1,borderColor:"#c23531",borderColor0:"#314656"},emphasis:{itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationUpdate:!1,animationEasing:"linear",animationDuration:300},getShadowDim:function(){return"open"},brushSelector:function(t,e,i){var n=e.getItemLayout(t);return n&&i.rect(n.brushRect)}}),LS,!0);var BS=["itemStyle"],VS=["emphasis","itemStyle"],GS=["color","color0","borderColor","borderColor0"],FS=(xc.extend({type:"candlestick",render:function(t,e,i){this.group.removeClipPath(),this._updateDrawMode(t),this._isLargeDraw?this._renderLarge(t):this._renderNormal(t)},incrementalPrepareRender:function(t,e,i){this._clear(),this._updateDrawMode(t)},incrementalRender:function(t,e,i,n){this._isLargeDraw?this._incrementalRenderLarge(t,e):this._incrementalRenderNormal(t,e)},_updateDrawMode:function(t){var e=t.pipelineContext.large;(null==this._isLargeDraw||e^this._isLargeDraw)&&(this._isLargeDraw=e,this._clear())},_renderNormal:function(o){var a=o.getData(),r=this._data,s=this.group,l=a.getLayout("isSimpleBox"),u=o.get("clip",!0),t=o.coordinateSystem,h=t.getArea&&t.getArea();this._data||s.removeAll(),a.diff(r).add(function(t){if(a.hasValue(t)){var e,i=a.getItemLayout(t);if(u&&HS(h,i))return;dl(e=WS(i,t,!0),{shape:{points:i.ends}},o,t),ZS(e,a,t,l),s.add(e),a.setItemGraphicEl(t,e)}}).update(function(t,e){var i=r.getItemGraphicEl(e);if(a.hasValue(t)){var n=a.getItemLayout(t);u&&HS(h,n)?s.remove(i):(i?cl(i,{shape:{points:n.ends}},o,t):i=WS(n,t),ZS(i,a,t,l),s.add(i),a.setItemGraphicEl(t,i))}else s.remove(i)}).remove(function(t){var e=r.getItemGraphicEl(t);e&&s.remove(e)}).execute(),this._data=a},_renderLarge:function(t){this._clear(),XS(t,this.group);var e=t.get("clip",!0)?bm(t.coordinateSystem,!1,t):null;e?this.group.setClipPath(e):this.group.removeClipPath()},_incrementalRenderNormal:function(t,e){for(var i,n=e.getData(),o=n.getLayout("isSimpleBox");null!=(i=t.next());){var a;ZS(a=WS(n.getItemLayout(i),i),n,i,o),a.incremental=!0,this.group.add(a)}},_incrementalRenderLarge:function(t,e){XS(e,this.group,!0)},remove:function(t){this._clear()},_clear:function(){this.group.removeAll(),this._data=null},dispose:et}),Ar.extend({type:"normalCandlestickBox",shape:{},buildPath:function(t,e){var i=e.points;this.__simpleBox?(t.moveTo(i[4][0],i[4][1]),t.lineTo(i[6][0],i[6][1])):(t.moveTo(i[0][0],i[0][1]),t.lineTo(i[1][0],i[1][1]),t.lineTo(i[2][0],i[2][1]),t.lineTo(i[3][0],i[3][1]),t.closePath(),t.moveTo(i[4][0],i[4][1]),t.lineTo(i[5][0],i[5][1]),t.moveTo(i[6][0],i[6][1]),t.lineTo(i[7][0],i[7][1]))}}));function WS(t,e,i){var n=t.ends;return new FS({shape:{points:i?function(t,e){return N(t,function(t){return(t=t.slice())[1]=e.initBaseline,t})}(n,t):n},z2:100})}function HS(t,e){for(var i=!0,n=0;n<e.ends.length;n++)if(t.contain(e.ends[n][0],e.ends[n][1])){i=!1;break}return i}function ZS(t,e,i,n){var o=e.getItemModel(i),a=o.getModel(BS),r=e.getItemVisual(i,"color"),s=e.getItemVisual(i,"borderColor")||r,l=a.getItemStyle(GS);t.useStyle(l),t.style.strokeNoScale=!0,t.style.fill=r,t.style.stroke=s,t.__simpleBox=n,$s(t,o.getModel(VS).getItemStyle())}var US=Ar.extend({type:"largeCandlestickBox",shape:{},buildPath:function(t,e){for(var i=e.points,n=0;n<i.length;)if(this.__sign===i[n++]){var o=i[n++];t.moveTo(o,i[n++]),t.lineTo(o,i[n++])}else n+=3}});function XS(t,e,i){var n=t.getData(),o=n.getLayout("largePoints"),a=new US({shape:{points:o},__sign:1});e.add(a);var r=new US({shape:{points:o},__sign:-1});e.add(r),YS(1,a,t,n),YS(-1,r,t,n),i&&(a.incremental=!0,r.incremental=!0)}function YS(t,e,i,n){var o=0<t?"P":"N",a=n.getVisual("borderColor"+o)||n.getVisual("color"+o),r=i.getModel(BS).getItemStyle(GS);e.useStyle(r),e.style.fill=null,e.style.stroke=a}var jS=["itemStyle","borderColor"],qS=["itemStyle","borderColor0"],KS=["itemStyle","color"],$S=["itemStyle","color0"],JS={seriesType:"candlestick",plan:mc(),performRawSeries:!0,reset:function(t,e){if(t.getData().setVisual({legendSymbol:"roundRect",colorP:a(1,t),colorN:a(-1,t),borderColorP:r(1,t),borderColorN:r(-1,t)}),!e.isSeriesFiltered(t))return!t.pipelineContext.large&&{progress:function(t,e){var i;for(;null!=(i=t.next());){var n=e.getItemModel(i),o=e.getItemLayout(i).sign;e.setItemVisual(i,{color:a(o,n),borderColor:r(o,n)})}}};function a(t,e){return e.get(0<t?KS:$S)}function r(t,e){return e.get(0<t?jS:qS)}}},QS="undefined"!=typeof Float32Array?Float32Array:Array,tM={seriesType:"candlestick",plan:mc(),reset:function(t){var x=t.coordinateSystem,e=t.getData(),_=function(t,e){var i,n=t.getBaseAxis(),o="category"===n.type?n.getBandWidth():(i=n.getExtent(),Math.abs(i[1]-i[0])/e.count()),a=Rl(H(t.get("barMaxWidth"),o),o),r=Rl(H(t.get("barMinWidth"),1),o),s=t.get("barWidth");return null!=s?Rl(s,o):Math.max(Math.min(o/2,a),r)}(t,e),i=["x","y"],w=e.mapDimension(i[0]),n=e.mapDimension(i[1],!0),b=n[0],S=n[1],M=n[2],I=n[3];if(e.setLayout({candleWidth:_,isSimpleBox:_<=1.3}),!(null==w||n.length<4))return{progress:t.pipelineContext.large?function(t,e){var i,n,o=new QS(4*t.count),a=0,r=[],s=[];for(;null!=(n=t.next());){var l=e.get(w,n),u=e.get(b,n),h=e.get(S,n),c=e.get(M,n),d=e.get(I,n);isNaN(l)||isNaN(c)||isNaN(d)?(o[a++]=NaN,a+=3):(o[a++]=eM(e,n,u,h,S),r[0]=l,r[1]=c,i=x.dataToPoint(r,null,s),o[a++]=i?i[0]:NaN,o[a++]=i?i[1]:NaN,r[1]=d,i=x.dataToPoint(r,null,s),o[a++]=i?i[1]:NaN)}e.setLayout("largePoints",o)}:function(t,e){var i;for(;null!=(i=t.next());){var n=e.get(w,i),o=e.get(b,i),a=e.get(S,i),r=e.get(M,i),s=e.get(I,i),l=Math.min(o,a),u=Math.max(o,a),h=g(l,n),c=g(u,n),d=g(r,n),f=g(s,n),p=[];m(p,c,0),m(p,h,1),p.push(y(f),y(c),y(d),y(h)),e.setItemLayout(i,{sign:eM(e,i,o,a,S),initBaseline:a<o?c[1]:h[1],ends:p,brushRect:v(r,s,n)})}function g(t,e){var i=[];return i[0]=e,i[1]=t,isNaN(e)||isNaN(t)?[NaN,NaN]:x.dataToPoint(i)}function m(t,e,i){var n=e.slice(),o=e.slice();n[0]=zs(n[0]+_/2,1,!1),o[0]=zs(o[0]-_/2,1,!0),i?t.push(n,o):t.push(o,n)}function v(t,e,i){var n=g(t,i),o=g(e,i);return n[0]-=_/2,o[0]-=_/2,{x:n[0],y:n[1],width:_,height:o[1]-n[1]}}function y(t){return t[0]=zs(t[0],1),t}}}}};function eM(t,e,i,n,o){return n<i?-1:i<n?1:0<e?t.get(o,e-1)<=n?1:-1:1}vf(function(t){t&&O(t.series)&&E(t.series,function(t){z(t)&&"k"===t.type&&(t.type="candlestick")})}),bf(JS),wf(tM),rc.extend({type:"series.effectScatter",dependencies:["grid","polar"],getInitialData:function(t,e){return pp(this.getSource(),this,{useEncodeDefaulter:!0})},brushSelector:"point",defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,effectType:"ripple",progressive:0,showEffectOn:"render",rippleEffect:{period:4,scale:2.5,brushType:"fill"},symbolSize:10}});function iM(t,e){var i=e.rippleEffectColor||e.color;t.eachChild(function(t){t.attr({z:e.z,zlevel:e.zlevel,style:{stroke:"stroke"===e.brushType?i:null,fill:"fill"===e.brushType?i:null}})})}function nM(t,e){Ci.call(this);var i=new Ug(t,e),n=new Ci;this.add(i),this.add(n),n.beforeUpdate=function(){this.attr(i.getScale())},this.updateData(t,e)}var oM=nM.prototype;oM.stopEffectAnimation=function(){this.childAt(1).removeAll()},oM.startEffectAnimation=function(t){for(var e=t.symbolType,i=t.color,n=this.childAt(1),o=0;o<3;o++){var a=_g(e,-1,-1,2,2,i);a.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scale:[.5,.5]});var r=-o/3*t.period+t.effectOffset;a.animate("",!0).when(t.period,{scale:[t.rippleScale/2,t.rippleScale/2]}).delay(r).start(),a.animateStyle(!0).when(t.period,{opacity:0}).delay(r).start(),n.add(a)}iM(n,t)},oM.updateEffectAnimation=function(t){for(var e=this._effectCfg,i=this.childAt(1),n=["symbolType","period","rippleScale"],o=0;o<n.length;o++){var a=n[o];if(e[a]!==t[a])return this.stopEffectAnimation(),void this.startEffectAnimation(t)}iM(i,t)},oM.highlight=function(){this.trigger("emphasis")},oM.downplay=function(){this.trigger("normal")},oM.updateData=function(t,e){var i=t.hostModel;this.childAt(0).updateData(t,e);var n=this.childAt(1),o=t.getItemModel(e),a=t.getItemVisual(e,"symbol"),r=function(t){return O(t)||(t=[+t,+t]),t}(t.getItemVisual(e,"symbolSize")),s=t.getItemVisual(e,"color");n.attr("scale",r),n.traverse(function(t){t.attr({fill:s})});var l=o.getShallow("symbolOffset");if(l){var u=n.position;u[0]=Rl(l[0],r[0]),u[1]=Rl(l[1],r[1])}n.rotation=(o.getShallow("symbolRotate")||0)*Math.PI/180||0;var h={};if(h.showEffectOn=i.get("showEffectOn"),h.rippleScale=o.get("rippleEffect.scale"),h.brushType=o.get("rippleEffect.brushType"),h.period=1e3*o.get("rippleEffect.period"),h.effectOffset=e/t.count(),h.z=o.getShallow("z")||0,h.zlevel=o.getShallow("zlevel")||0,h.symbolType=a,h.color=s,h.rippleEffectColor=o.get("rippleEffect.color"),this.off("mouseover").off("mouseout").off("emphasis").off("normal"),"render"===h.showEffectOn)this._effectCfg?this.updateEffectAnimation(h):this.startEffectAnimation(h),this._effectCfg=h;else{this._effectCfg=null,this.stopEffectAnimation();var c=this.childAt(0),d=function(){c.highlight(),"render"!==h.showEffectOn&&this.startEffectAnimation(h)},f=function(){c.downplay(),"render"!==h.showEffectOn&&this.stopEffectAnimation()};this.on("mouseover",d,this).on("mouseout",f,this).on("emphasis",d,this).on("normal",f,this)}this._effectCfg=h},oM.fadeOut=function(t){this.off("mouseover").off("mouseout").off("emphasis").off("normal"),t&&t()},w(nM,Ci),Df({type:"effectScatter",init:function(){this._symbolDraw=new em(nM)},render:function(t,e,i){var n=t.getData(),o=this._symbolDraw;o.updateData(n),this.group.add(o.group)},updateTransform:function(t,e,i){var n=t.getData();this.group.dirty();var o=Cm().reset(t);o.progress&&o.progress({start:0,end:n.count()},n),this._symbolDraw.updateLayout(n)},_updateGroupTransform:function(t){var e=t.coordinateSystem;e&&e.getRoamTransform&&(this.group.transform=fe(e.getRoamTransform()),this.group.decomposeTransform())},remove:function(t,e){this._symbolDraw&&this._symbolDraw.remove(e)},dispose:function(){}}),bf(Dm("effectScatter","circle")),wf(Cm("effectScatter"));var aM="undefined"==typeof Uint32Array?Array:Uint32Array,rM="undefined"==typeof Float64Array?Array:Float64Array;function sM(t){var e=t.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(t.data=N(e,function(t){var e={coords:[t[0].coord,t[1].coord]};return t[0].name&&(e.fromName=t[0].name),t[1].name&&(e.toName=t[1].name),p([e,t[0],t[1]])}))}var lM=rc.extend({type:"series.lines",dependencies:["grid","polar"],visualColorAccessPath:"lineStyle.color",init:function(t){t.data=t.data||[],sM(t);var e=this._processFlatCoordsArray(t.data);this._flatCoords=e.flatCoords,this._flatCoordsOffset=e.flatCoordsOffset,e.flatCoords&&(t.data=new Float32Array(e.count)),lM.superApply(this,"init",arguments)},mergeOption:function(t){if(t.data=t.data||[],sM(t),t.data){var e=this._processFlatCoordsArray(t.data);this._flatCoords=e.flatCoords,this._flatCoordsOffset=e.flatCoordsOffset,e.flatCoords&&(t.data=new Float32Array(e.count))}lM.superApply(this,"mergeOption",arguments)},appendData:function(t){var e=this._processFlatCoordsArray(t.data);e.flatCoords&&(this._flatCoords?(this._flatCoords=tt(this._flatCoords,e.flatCoords),this._flatCoordsOffset=tt(this._flatCoordsOffset,e.flatCoordsOffset)):(this._flatCoords=e.flatCoords,this._flatCoordsOffset=e.flatCoordsOffset),t.data=new Float32Array(e.count)),this.getRawData().appendData(t.data)},_getCoordsFromItemModel:function(t){var e=this.getData().getItemModel(t);return e.option instanceof Array?e.option:e.getShallow("coords")},getLineCoordsCount:function(t){return this._flatCoordsOffset?this._flatCoordsOffset[2*t+1]:this._getCoordsFromItemModel(t).length},getLineCoords:function(t,e){if(this._flatCoordsOffset){for(var i=this._flatCoordsOffset[2*t],n=this._flatCoordsOffset[2*t+1],o=0;o<n;o++)e[o]=e[o]||[],e[o][0]=this._flatCoords[i+2*o],e[o][1]=this._flatCoords[i+2*o+1];return n}var a=this._getCoordsFromItemModel(t);for(o=0;o<a.length;o++)e[o]=e[o]||[],e[o][0]=a[o][0],e[o][1]=a[o][1];return a.length},_processFlatCoordsArray:function(t){var e=0;if(this._flatCoords&&(e=this._flatCoords.length),"number"!=typeof t[0])return{flatCoordsOffset:null,flatCoords:null,count:t.length};for(var i=t.length,n=new aM(i),o=new rM(i),a=0,r=0,s=0,l=0;l<i;){s++;var u=t[l++];n[r++]=a+e,n[r++]=u;for(var h=0;h<u;h++){var c=t[l++],d=t[l++];o[a++]=c,o[a++]=d}}return{flatCoordsOffset:new Uint32Array(n.buffer,0,r),flatCoords:o,count:s}},getInitialData:function(t,e){var a=new Xf(["value"],this);return a.hasItemOption=!1,a.initData(t.data,[],function(t,e,i,n){if(t instanceof Array)return NaN;a.hasItemOption=!0;var o=t.value;return null!=o?o instanceof Array?o[n]:o:void 0}),a},formatTooltip:function(t){var e=this.getData().getItemModel(t),i=e.get("name");if(i)return i;var n=e.get("fromName"),o=e.get("toName"),a=[];return null!=n&&a.push(n),null!=o&&a.push(o),au(a.join(" > "))},preventIncremental:function(){return!!this.get("effect.show")},getProgressive:function(){var t=this.option.progressive;return null==t?this.option.large?1e4:this.get("progressive"):t},getProgressiveThreshold:function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?2e4:this.get("progressiveThreshold"):t},defaultOption:{coordinateSystem:"geo",zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}}});function uM(t,e,i){Ci.call(this),this.add(this.createLine(t,e,i)),this._updateEffectSymbol(t,e)}var hM=uM.prototype;function cM(t,e,i){Ci.call(this),this._createPolyline(t,e,i)}hM.createLine=function(t,e,i){return new hw(t,e,i)},hM._updateEffectSymbol=function(t,e){var i=t.getItemModel(e).getModel("effect"),n=i.get("symbolSize"),o=i.get("symbol");O(n)||(n=[n,n]);var a=i.get("color")||t.getItemVisual(e,"color"),r=this.childAt(1);this._symbolType!==o&&(this.remove(r),(r=_g(o,-.5,-.5,1,1,a)).z2=100,r.culling=!0,this.add(r)),r&&(r.setStyle("shadowColor",a),r.setStyle(i.getItemStyle(["color"])),r.attr("scale",n),r.setColor(a),r.attr("scale",n),this._symbolType=o,this._symbolScale=n,this._updateEffectAnimation(t,i,e))},hM._updateEffectAnimation=function(e,t,i){var n=this.childAt(1);if(n){var o=this,a=e.getItemLayout(i),r=1e3*t.get("period"),s=t.get("loop"),l=t.get("constantSpeed"),u=W(t.get("delay"),function(t){return t/e.count()*r/3}),h="function"==typeof u;if(n.ignore=!0,this.updateAnimationPoints(n,a),0<l&&(r=this.getLineLength(n)/l*1e3),r!==this._period||s!==this._loop){n.stopAnimation();var c=u;h&&(c=u(i)),0<n.__t&&(c=-r*n.__t),n.__t=0;var d=n.animate("",s).when(r,{__t:1}).delay(c).during(function(){o.updateSymbolPosition(n)});s||d.done(function(){o.remove(n)}),d.start()}this._period=r,this._loop=s}},hM.getLineLength=function(t){return yt(t.__p1,t.__cp1)+yt(t.__cp1,t.__p2)},hM.updateAnimationPoints=function(t,e){t.__p1=e[0],t.__p2=e[1],t.__cp1=e[2]||[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2]},hM.updateData=function(t,e,i){this.childAt(0).updateData(t,e,i),this._updateEffectSymbol(t,e)},hM.updateSymbolPosition=function(t){var e=t.__p1,i=t.__p2,n=t.__cp1,o=t.__t,a=t.position,r=[a[0],a[1]],s=La,l=ka;a[0]=s(e[0],n[0],i[0],o),a[1]=s(e[1],n[1],i[1],o);var u=l(e[0],n[0],i[0],o),h=l(e[1],n[1],i[1],o);if(t.rotation=-Math.atan2(h,u)-Math.PI/2,"line"===this._symbolType||"rect"===this._symbolType||"roundRect"===this._symbolType)if(void 0!==t.__lastT&&t.__lastT<t.__t){var c=1.05*yt(r,a);t.attr("scale",[t.scale[0],c]),1===o&&(a[0]=r[0]+(a[0]-r[0])/2,a[1]=r[1]+(a[1]-r[1])/2)}else if(1===t.__lastT){c=2*yt(e,a);t.attr("scale",[t.scale[0],c])}else t.attr("scale",this._symbolScale);t.__lastT=t.__t,t.ignore=!1},hM.updateLayout=function(t,e){this.childAt(0).updateLayout(t,e);var i=t.getItemModel(e).getModel("effect");this._updateEffectAnimation(t,i,e)},w(uM,Ci);var dM=cM.prototype;function fM(t,e,i){uM.call(this,t,e,i),this._lastFrame=0,this._lastFramePercent=0}dM._createPolyline=function(t,e,i){var n=t.getItemLayout(e),o=new ts({shape:{points:n}});this.add(o),this._updateCommonStl(t,e,i)},dM.updateData=function(t,e,i){var n=t.hostModel;cl(this.childAt(0),{shape:{points:t.getItemLayout(e)}},n,e),this._updateCommonStl(t,e,i)},dM._updateCommonStl=function(t,e,i){var n=this.childAt(0),o=t.getItemModel(e),a=t.getItemVisual(e,"color"),r=i&&i.lineStyle,s=i&&i.hoverLineStyle;i&&!t.hasItemOption||(r=o.getModel("lineStyle").getLineStyle(),s=o.getModel("emphasis.lineStyle").getLineStyle()),n.useStyle(D({strokeNoScale:!0,fill:"none",stroke:a},r)),n.hoverStyle=s,$s(this)},dM.updateLayout=function(t,e){this.childAt(0).setShape("points",t.getItemLayout(e))},w(cM,Ci);var pM=fM.prototype;pM.createLine=function(t,e,i){return new cM(t,e,i)},pM.updateAnimationPoints=function(t,e){this._points=e;for(var i=[0],n=0,o=1;o<e.length;o++){var a=e[o-1],r=e[o];n+=yt(a,r),i.push(n)}if(0!==n){for(o=0;o<i.length;o++)i[o]/=n;this._offsets=i,this._length=n}},pM.getLineLength=function(t){return this._length},pM.updateSymbolPosition=function(t){var e=t.__t,i=this._points,n=this._offsets,o=i.length;if(n){var a=this._lastFrame;if(e<this._lastFramePercent){for(r=Math.min(a+1,o-1);0<=r&&!(n[r]<=e);r--);r=Math.min(r,o-2)}else{for(var r=a;r<o&&!(n[r]>e);r++);r=Math.min(r-1,o-2)}wt(t.position,i[r],i[r+1],(e-n[r])/(n[r+1]-n[r]));var s=i[r+1][0]-i[r][0],l=i[r+1][1]-i[r][1];t.rotation=-Math.atan2(l,s)-Math.PI/2,this._lastFrame=r,this._lastFramePercent=e,t.ignore=!1}},w(fM,uM);var gM=Cs({shape:{polyline:!1,curveness:0,segs:[]},buildPath:function(t,e){var i=e.segs,n=e.curveness;if(e.polyline)for(var o=0;o<i.length;){var a=i[o++];if(0<a){t.moveTo(i[o++],i[o++]);for(var r=1;r<a;r++)t.lineTo(i[o++],i[o++])}}else for(o=0;o<i.length;){var s=i[o++],l=i[o++],u=i[o++],h=i[o++];if(t.moveTo(s,l),0<n){var c=(s+u)/2-(l-h)*n,d=(l+h)/2-(u-s)*n;t.quadraticCurveTo(c,d,u,h)}else t.lineTo(u,h)}},findDataIndex:function(t,e){var i=this.shape,n=i.segs,o=i.curveness;if(i.polyline)for(var a=0,r=0;r<n.length;){var s=n[r++];if(0<s)for(var l=n[r++],u=n[r++],h=1;h<s;h++){if(sr(l,u,c=n[r++],d=n[r++]))return a}a++}else for(a=0,r=0;r<n.length;){l=n[r++],u=n[r++];var c=n[r++],d=n[r++];if(0<o){if(ur(l,u,(l+c)/2-(u-d)*o,(u+d)/2-(c-l)*o,c,d))return a}else if(sr(l,u,c,d))return a;a++}return-1}});function mM(){this.group=new Ci}var vM=mM.prototype;vM.isPersistent=function(){return!this._incremental},vM.updateData=function(t){this.group.removeAll();var e=new gM({rectHover:!0,cursor:"default"});e.setShape({segs:t.getLayout("linesPoints")}),this._setCommon(e,t),this.group.add(e),this._incremental=null},vM.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clearIncremental(),5e5<t.count()?(this._incremental||(this._incremental=new vs({silent:!0})),this.group.add(this._incremental)):this._incremental=null},vM.incrementalUpdate=function(t,e){var i=new gM;i.setShape({segs:e.getLayout("linesPoints")}),this._setCommon(i,e,!!this._incremental),this._incremental?this._incremental.addDisplayable(i,!0):(i.rectHover=!0,i.cursor="default",i.__startIndex=t.start,this.group.add(i))},vM.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},vM._setCommon=function(i,t,e){var n=t.hostModel;i.setShape({polyline:n.get("polyline"),curveness:n.get("lineStyle.curveness")}),i.useStyle(n.getModel("lineStyle").getLineStyle()),i.style.strokeNoScale=!0;var o=t.getVisual("color");o&&i.setStyle("stroke",o),i.setStyle("fill"),e||(i.seriesIndex=n.seriesIndex,i.on("mousemove",function(t){i.dataIndex=null;var e=i.findDataIndex(t.offsetX,t.offsetY);0<e&&(i.dataIndex=e+i.__startIndex)}))},vM._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()};var yM={seriesType:"lines",plan:mc(),reset:function(g){var m=g.coordinateSystem,v=g.get("polyline"),y=g.pipelineContext.large;return{progress:function(t,e){var i=[];if(y){var n,o=t.end-t.start;if(v){for(var a=0,r=t.start;r<t.end;r++)a+=g.getLineCoordsCount(r);n=new Float32Array(o+2*a)}else n=new Float32Array(4*o);var s=0,l=[];for(r=t.start;r<t.end;r++){var u=g.getLineCoords(r,i);v&&(n[s++]=u);for(var h=0;h<u;h++)l=m.dataToPoint(i[h],!1,l),n[s++]=l[0],n[s++]=l[1]}e.setLayout("linesPoints",n)}else for(r=t.start;r<t.end;r++){var c=e.getItemModel(r),d=(u=g.getLineCoords(r,i),[]);if(v)for(var f=0;f<u;f++)d.push(m.dataToPoint(i[f]));else{d[0]=m.dataToPoint(i[0]),d[1]=m.dataToPoint(i[1]);var p=c.get("lineStyle.curveness");+p&&(d[2]=[(d[0][0]+d[1][0])/2-(d[0][1]-d[1][1])*p,(d[0][1]+d[1][1])/2-(d[1][0]-d[0][0])*p])}e.setItemLayout(r,d)}}}}};function xM(t){return t instanceof Array||(t=[t,t]),t}Df({type:"lines",init:function(){},render:function(t,e,i){var n=t.getData(),o=this._updateLineDraw(n,t),a=t.get("zlevel"),r=t.get("effect.trailLength"),s=i.getZr(),l="svg"===s.painter.getType();l||s.painter.getLayer(a).clear(!0),null==this._lastZlevel||l||s.configLayer(this._lastZlevel,{motionBlur:!1}),this._showEffect(t)&&r&&(l||s.configLayer(a,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(r/10+.9,1),0)})),o.updateData(n);var u=t.get("clip",!0)&&bm(t.coordinateSystem,!1,t);u?this.group.setClipPath(u):this.group.removeClipPath(),this._lastZlevel=a,this._finished=!0},incrementalPrepareRender:function(t,e,i){var n=t.getData();this._updateLineDraw(n,t).incrementalPrepareUpdate(n),this._clearLayer(i),this._finished=!1},incrementalRender:function(t,e,i){this._lineDraw.incrementalUpdate(t,e.getData()),this._finished=t.end===e.getData().count()},updateTransform:function(t,e,i){var n=t.getData(),o=t.pipelineContext;if(!this._finished||o.large||o.progressiveRender)return{update:!0};var a=yM.reset(t);a.progress&&a.progress({start:0,end:n.count()},n),this._lineDraw.updateLayout(),this._clearLayer(i)},_updateLineDraw:function(t,e){var i=this._lineDraw,n=this._showEffect(e),o=!!e.get("polyline"),a=e.pipelineContext.large;return i&&n===this._hasEffet&&o===this._isPolyline&&a===this._isLargeDraw||(i&&i.remove(),i=this._lineDraw=a?new mM:new dw(o?n?fM:cM:n?uM:hw),this._hasEffet=n,this._isPolyline=o,this._isLargeDraw=a,this.group.removeAll()),this.group.add(i.group),i},_showEffect:function(t){return!!t.get("effect.show")},_clearLayer:function(t){var e=t.getZr();"svg"===e.painter.getType()||null==this._lastZlevel||e.painter.getLayer(this._lastZlevel).clear(!0)},remove:function(t,e){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(e)},dispose:function(){}});var _M="lineStyle.opacity".split("."),wM={seriesType:"lines",reset:function(t,e,i){var n=xM(t.get("symbol")),o=xM(t.get("symbolSize")),a=t.getData();return a.setVisual("fromSymbol",n&&n[0]),a.setVisual("toSymbol",n&&n[1]),a.setVisual("fromSymbolSize",o&&o[0]),a.setVisual("toSymbolSize",o&&o[1]),a.setVisual("opacity",t.get(_M)),{dataEach:a.hasItemOption?function(t,e){var i=t.getItemModel(e),n=xM(i.getShallow("symbol",!0)),o=xM(i.getShallow("symbolSize",!0)),a=i.get(_M);n[0]&&t.setItemVisual(e,"fromSymbol",n[0]),n[1]&&t.setItemVisual(e,"toSymbol",n[1]),o[0]&&t.setItemVisual(e,"fromSymbolSize",o[0]),o[1]&&t.setItemVisual(e,"toSymbolSize",o[1]),t.setItemVisual(e,"opacity",a)}:null}}};wf(yM),bf(wM),rc.extend({type:"series.heatmap",getInitialData:function(t,e){return pp(this.getSource(),this,{generateCoord:"value"})},preventIncremental:function(){var t=sh.get(this.get("coordinateSystem"));if(t&&t.dimensions)return"lng"===t.dimensions[0]&&"lat"===t.dimensions[1]},defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0}});function bM(){var t=g();this.canvas=t,this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={}}bM.prototype={update:function(t,e,i,n,o,a){var r=this._getBrush(),s=this._getGradient(t,o,"inRange"),l=this._getGradient(t,o,"outOfRange"),u=this.pointSize+this.blurSize,h=this.canvas,c=h.getContext("2d"),d=t.length;h.width=e,h.height=i;for(var f=0;f<d;++f){var p=t[f],g=p[0],m=p[1],v=n(p[2]);c.globalAlpha=v,c.drawImage(r,g-u,m-u)}if(!h.width||!h.height)return h;for(var y=c.getImageData(0,0,h.width,h.height),x=y.data,_=0,w=x.length,b=this.minOpacity,S=this.maxOpacity-b;_<w;){v=x[_+3]/256;var M=4*Math.floor(255*v);if(0<v){var I=a(v)?s:l;0<v&&(v=v*S+b),x[_++]=I[M],x[_++]=I[1+M],x[_++]=I[2+M],x[_++]=I[3+M]*v*256}else _+=4}return c.putImageData(y,0,0),h},_getBrush:function(){var t=this._brushCanvas||(this._brushCanvas=g()),e=this.pointSize+this.blurSize,i=2*e;t.width=i,t.height=i;var n=t.getContext("2d");return n.clearRect(0,0,i,i),n.shadowOffsetX=i,n.shadowBlur=this.blurSize,n.shadowColor="#000",n.beginPath(),n.arc(-e,e,this.pointSize,0,2*Math.PI,!0),n.closePath(),n.fill(),t},_getGradient:function(t,e,i){for(var n=this._gradientPixels,o=n[i]||(n[i]=new Uint8ClampedArray(1024)),a=[0,0,0,0],r=0,s=0;s<256;s++)e[i](s/255,!0,a),o[r++]=a[0],o[r++]=a[1],o[r++]=a[2],o[r++]=a[3];return o}},Df({type:"heatmap",render:function(i,t,e){var n;t.eachComponent("visualMap",function(e){e.eachTargetSeries(function(t){t===i&&(n=e)})}),this.group.removeAll(),this._incrementalDisplayable=null;var o=i.coordinateSystem;"cartesian2d"===o.type||"calendar"===o.type?this._renderOnCartesianAndCalendar(i,e,0,i.getData().count()):function(t){var e=t.dimensions;return"lng"===e[0]&&"lat"===e[1]}(o)&&this._renderOnGeo(o,i,n,e)},incrementalPrepareRender:function(t,e,i){this.group.removeAll()},incrementalRender:function(t,e,i,n){e.coordinateSystem&&this._renderOnCartesianAndCalendar(e,n,t.start,t.end,!0)},_renderOnCartesianAndCalendar:function(t,e,i,n,o){var a,r,s=t.coordinateSystem;if("cartesian2d"===s.type){var l=s.getAxis("x"),u=s.getAxis("y");a=l.getBandWidth(),r=u.getBandWidth()}for(var h=this.group,c=t.getData(),d="emphasis.itemStyle",f="emphasis.label",p=t.getModel("itemStyle").getItemStyle(["color"]),g=t.getModel(d).getItemStyle(),m=t.getModel("label"),v=t.getModel(f),y=s.type,x="cartesian2d"===y?[c.mapDimension("x"),c.mapDimension("y"),c.mapDimension("value")]:[c.mapDimension("time"),c.mapDimension("value")],_=i;_<n;_++){var w;if("cartesian2d"===y){if(isNaN(c.get(x[2],_)))continue;var b=s.dataToPoint([c.get(x[0],_),c.get(x[1],_)]);w=new rs({shape:{x:Math.floor(b[0]-a/2),y:Math.floor(b[1]-r/2),width:Math.ceil(a),height:Math.ceil(r)},style:{fill:c.getItemVisual(_,"color"),opacity:c.getItemVisual(_,"opacity")}})}else{if(isNaN(c.get(x[1],_)))continue;w=new rs({z2:1,shape:s.dataToRect([c.get(x[0],_)]).contentShape,style:{fill:c.getItemVisual(_,"color"),opacity:c.getItemVisual(_,"opacity")}})}var S=c.getItemModel(_);c.hasItemOption&&(p=S.getModel("itemStyle").getItemStyle(["color"]),g=S.getModel(d).getItemStyle(),m=S.getModel("label"),v=S.getModel(f));var M=t.getRawValue(_),I="-";M&&null!=M[2]&&(I=M[2]),el(p,g,m,v,{labelFetcher:t,labelDataIndex:_,defaultText:I,isRectText:!0}),w.setStyle(p),$s(w,c.hasItemOption?g:k({},g)),(w.incremental=o)&&(w.useHoverLayer=!0),h.add(w),c.setItemGraphicEl(_,w)}},_renderOnGeo:function(o,t,e,i){var n=e.targetVisuals.inRange,a=e.targetVisuals.outOfRange,r=t.getData(),s=this._hmLayer||this._hmLayer||new bM;s.blurSize=t.get("blurSize"),s.pointSize=t.get("pointSize"),s.minOpacity=t.get("minOpacity"),s.maxOpacity=t.get("maxOpacity");var l=o.getViewRect().clone(),u=o.getRoamTransform();l.applyTransform(u);var h=Math.max(l.x,0),c=Math.max(l.y,0),d=Math.min(l.width+l.x,i.getWidth()),f=Math.min(l.height+l.y,i.getHeight()),p=d-h,g=f-c,m=[r.mapDimension("lng"),r.mapDimension("lat"),r.mapDimension("value")],v=r.mapArray(m,function(t,e,i){var n=o.dataToPoint([t,e]);return n[0]-=h,n[1]-=c,n.push(i),n}),y=e.getExtent(),x="visualMap.continuous"===e.type?function(t,e){var i=t[1]-t[0];return e=[(e[0]-t[0])/i,(e[1]-t[0])/i],function(t){return t>=e[0]&&t<=e[1]}}(y,e.option.range):function(e,n,o){var i=e[1]-e[0],a=(n=N(n,function(t){return{interval:[(t.interval[0]-e[0])/i,(t.interval[1]-e[0])/i]}})).length,r=0;return function(t){for(var e=r;e<a;e++){if((i=n[e].interval)[0]<=t&&t<=i[1]){r=e;break}}if(e===a)for(e=r-1;0<=e;e--){var i;if((i=n[e].interval)[0]<=t&&t<=i[1]){r=e;break}}return 0<=e&&e<a&&o[e]}}(y,e.getPieceList(),e.option.selected);s.update(v,p,g,n.color.getNormalizer(),{inRange:n.color.getColorMapper(),outOfRange:a.color.getColorMapper()},x);var _=new Qn({style:{width:p,height:g,x:h,y:c,image:s.canvas},silent:!0});this.group.add(_)},dispose:function(){}});var SM=Mv.extend({type:"series.pictorialBar",dependencies:["grid"],defaultOption:{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",progressive:0,hoverAnimation:!1},getInitialData:function(t){return t.stack=null,SM.superApply(this,"getInitialData",arguments)}}),MM=["itemStyle","borderWidth"],IM=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],TM=new Yr;Df({type:"pictorialBar",render:function(t,e,i){var r=this.group,s=t.getData(),l=this._data,n=t.coordinateSystem,o=!!n.getBaseAxis().isHorizontal(),a=n.grid.getRect(),u={ecSize:{width:i.getWidth(),height:i.getHeight()},seriesModel:t,coordSys:n,coordSysExtent:[[a.x,a.x+a.width],[a.y,a.y+a.height]],isHorizontal:o,valueDim:IM[+o],categoryDim:IM[1-o]};return s.diff(l).add(function(t){if(s.hasValue(t)){var e=OM(s,t),i=AM(s,t,e,u),n=BM(s,u,i);s.setItemGraphicEl(t,n),r.add(n),HM(n,u,i)}}).update(function(t,e){var i=l.getItemGraphicEl(e);if(s.hasValue(t)){var n=OM(s,t),o=AM(s,t,n,u),a=GM(s,o);i&&a!==i.__pictorialShapeStr&&(r.remove(i),s.setItemGraphicEl(t,null),i=null),i?function(t,e,i){var n=i.animationModel,o=i.dataIndex;cl(t.__pictorialBundle,{position:i.bundlePosition.slice()},n,o),i.symbolRepeat?LM(t,e,i,!0):kM(t,e,i,!0);PM(t,i,!0),NM(t,e,i,!0)}(i,u,o):i=BM(s,u,o,!0),s.setItemGraphicEl(t,i),i.__pictorialSymbolMeta=o,r.add(i),HM(i,u,o)}else r.remove(i)}).remove(function(t){var e=l.getItemGraphicEl(t);e&&VM(l,t,e.__pictorialSymbolMeta.animationModel,e)}).execute(),this._data=s,this.group},dispose:et,remove:function(e,t){var i=this.group,n=this._data;e.get("animation")?n&&n.eachItemGraphicEl(function(t){VM(n,t.dataIndex,e,t)}):i.removeAll()}});function AM(t,e,i,n){var o=t.getItemLayout(e),a=i.get("symbolRepeat"),r=i.get("symbolClip"),s=i.get("symbolPosition")||"start",l=(i.get("symbolRotate")||0)*Math.PI/180||0,u=i.get("symbolPatternSize")||2,h=i.isAnimationEnabled(),c={dataIndex:e,layout:o,itemModel:i,symbolType:t.getItemVisual(e,"symbol")||"circle",color:t.getItemVisual(e,"color"),symbolClip:r,symbolRepeat:a,symbolRepeatDirection:i.get("symbolRepeatDirection"),symbolPatternSize:u,rotation:l,animationModel:h?i:null,hoverAnimation:h&&i.get("hoverAnimation"),z2:i.getShallow("z",!0)||0};!function(t,e,i,n,o){var a,r=n.valueDim,s=t.get("symbolBoundingData"),l=n.coordSys.getOtherAxis(n.coordSys.getBaseAxis()),u=l.toGlobalCoord(l.dataToCoord(0)),h=1-+(i[r.wh]<=0);if(O(s)){var c=[DM(l,s[0])-u,DM(l,s[1])-u];c[1]<c[0]&&c.reverse(),a=c[h]}else a=null!=s?DM(l,s)-u:e?n.coordSysExtent[r.index][h]-u:i[r.wh];o.boundingLength=a,e&&(o.repeatCutLength=i[r.wh]);o.pxSign=0<a?1:a<0?-1:0}(i,a,o,n,c),function(t,e,i,n,o,a,r,s,l,u){var h=l.valueDim,c=l.categoryDim,d=Math.abs(i[c.wh]),f=t.getItemVisual(e,"symbolSize");f=O(f)?f.slice():(null==f&&(f="100%"),[f,f]);f[c.index]=Rl(f[c.index],d),f[h.index]=Rl(f[h.index],n?d:Math.abs(a)),u.symbolSize=f,(u.symbolScale=[f[0]/s,f[1]/s])[h.index]*=(l.isHorizontal?-1:1)*r}(t,e,o,a,0,c.boundingLength,c.pxSign,u,n,c),function(t,e,i,n,o){var a=t.get(MM)||0;a&&(TM.attr({scale:e.slice(),rotation:i}),TM.updateTransform(),a/=TM.getLineScale(),a*=e[n.valueDim.index]);o.valueLineWidth=a}(i,c.symbolScale,l,n,c);var d=c.symbolSize,f=i.get("symbolOffset");return O(f)&&(f=[Rl(f[0],d[0]),Rl(f[1],d[1])]),function(t,e,i,n,o,a,r,s,l,u,h,c){var d=h.categoryDim,f=h.valueDim,p=c.pxSign,g=Math.max(e[f.index]+s,0),m=g;if(n){var v=Math.abs(l),y=W(t.get("symbolMargin"),"15%")+"",x=!1;y.lastIndexOf("!")===y.length-1&&(x=!0,y=y.slice(0,y.length-1)),y=Rl(y,e[f.index]);var _=Math.max(g+2*y,0),w=x?0:2*y,b=Jl(n),S=b?n:ZM((v+w)/_);_=g+2*(y=(v-S*g)/2/(x?S:S-1)),w=x?0:2*y,b||"fixed"===n||(S=u?ZM((Math.abs(u)+w)/_):0),m=S*_-w,c.repeatTimes=S,c.symbolMargin=y}var M=p*(m/2),I=c.pathPosition=[];I[d.index]=i[d.wh]/2,I[f.index]="start"===r?M:"end"===r?l-M:l/2,a&&(I[0]+=a[0],I[1]+=a[1]);var T=c.bundlePosition=[];T[d.index]=i[d.xy],T[f.index]=i[f.xy];var A=c.barRectShape=k({},i);A[f.wh]=p*Math.max(Math.abs(i[f.wh]),Math.abs(I[f.index]+M)),A[d.wh]=i[d.wh];var D=c.clipShape={};D[d.xy]=-i[d.xy],D[d.wh]=h.ecSize[d.wh],D[f.xy]=0,D[f.wh]=i[f.wh]}(i,d,o,a,0,f,s,c.valueLineWidth,c.boundingLength,c.repeatCutLength,n,c),c}function DM(t,e){return t.toGlobalCoord(t.dataToCoord(t.scale.parse(e)))}function CM(t){var e=t.symbolPatternSize,i=_g(t.symbolType,-e/2,-e/2,e,e,t.color);return i.attr({culling:!0}),"image"!==i.type&&i.setStyle({strokeNoScale:!0}),i}function LM(t,e,o,i){var n=t.__pictorialBundle,a=o.symbolSize,r=o.valueLineWidth,s=o.pathPosition,l=e.valueDim,u=o.repeatTimes||0,h=0,c=a[e.valueDim.index]+r+2*o.symbolMargin;for(FM(t,function(t){t.__pictorialAnimationIndex=h,t.__pictorialRepeatTimes=u,h<u?WM(t,null,p(h),o,i):WM(t,null,{scale:[0,0]},o,i,function(){n.remove(t)}),zM(t,o),h++});h<u;h++){var d=CM(o);d.__pictorialAnimationIndex=h,d.__pictorialRepeatTimes=u,n.add(d);var f=p(h);WM(d,{position:f.position,scale:[0,0]},{scale:f.scale,rotation:f.rotation},o,i),d.on("mouseover",g).on("mouseout",m),zM(d,o)}function p(t){var e=s.slice(),i=o.pxSign,n=t;return("start"===o.symbolRepeatDirection?0<i:i<0)&&(n=u-1-t),e[l.index]=c*(n-u/2+.5)+s[l.index],{position:e,scale:o.symbolScale.slice(),rotation:o.rotation}}function g(){FM(t,function(t){t.trigger("emphasis")})}function m(){FM(t,function(t){t.trigger("normal")})}}function kM(t,e,i,n){var o=t.__pictorialBundle,a=t.__pictorialMainPath;a?WM(a,null,{position:i.pathPosition.slice(),scale:i.symbolScale.slice(),rotation:i.rotation},i,n):(a=t.__pictorialMainPath=CM(i),o.add(a),WM(a,{position:i.pathPosition.slice(),scale:[0,0],rotation:i.rotation},{scale:i.symbolScale.slice()},i,n),a.on("mouseover",function(){this.trigger("emphasis")}).on("mouseout",function(){this.trigger("normal")})),zM(a,i)}function PM(t,e,i){var n=k({},e.barRectShape),o=t.__pictorialBarRect;o?WM(o,null,{shape:n},e,i):(o=t.__pictorialBarRect=new rs({z2:2,shape:n,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),t.add(o))}function NM(t,e,i,n){if(i.symbolClip){var o=t.__pictorialClipPath,a=k({},i.clipShape),r=e.valueDim,s=i.animationModel,l=i.dataIndex;if(o)cl(o,{shape:a},s,l);else{a[r.wh]=0,o=new rs({shape:a}),t.__pictorialBundle.setClipPath(o),t.__pictorialClipPath=o;var u={};u[r.wh]=i.clipShape[r.wh],bl[n?"updateProps":"initProps"](o,{shape:u},s,l)}}}function OM(t,e){var i=t.getItemModel(e);return i.getAnimationDelayParams=EM,i.isAnimationEnabled=RM,i}function EM(t){return{index:t.__pictorialAnimationIndex,count:t.__pictorialRepeatTimes}}function RM(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function zM(t,e){t.off("emphasis").off("normal");var i=e.symbolScale.slice();e.hoverAnimation&&t.on("emphasis",function(){this.animateTo({scale:[1.1*i[0],1.1*i[1]]},400,"elasticOut")}).on("normal",function(){this.animateTo({scale:i.slice()},400,"elasticOut")})}function BM(t,e,i,n){var o=new Ci,a=new Ci;return o.add(a),(o.__pictorialBundle=a).attr("position",i.bundlePosition.slice()),i.symbolRepeat?LM(o,e,i):kM(o,0,i),PM(o,i,n),NM(o,e,i,n),o.__pictorialShapeStr=GM(t,i),o.__pictorialSymbolMeta=i,o}function VM(t,e,i,n){var o=n.__pictorialBarRect;o&&(o.style.text=null);var a=[];FM(n,function(t){a.push(t)}),n.__pictorialMainPath&&a.push(n.__pictorialMainPath),n.__pictorialClipPath&&(i=null),E(a,function(t){cl(t,{scale:[0,0]},i,e,function(){n.parent&&n.parent.remove(n)})}),t.setItemGraphicEl(e,null)}function GM(t,e){return[t.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function FM(e,i,n){E(e.__pictorialBundle.children(),function(t){t!==e.__pictorialBarRect&&i.call(n,t)})}function WM(t,e,i,n,o,a){e&&t.attr(e),n.symbolClip&&!o?i&&t.attr(i):i&&bl[o?"updateProps":"initProps"](t,i,n.animationModel,n.dataIndex,a)}function HM(t,e,i){var n=i.color,o=i.dataIndex,a=i.itemModel,r=a.getModel("itemStyle").getItemStyle(["color"]),s=a.getModel("emphasis.itemStyle").getItemStyle(),l=a.getShallow("cursor");FM(t,function(t){t.setColor(n),t.setStyle(D({fill:n,opacity:i.opacity},r)),$s(t,s),l&&(t.cursor=l),t.z2=i.z2});var u={},h=(e.valueDim.posDesc[+(0<i.boundingLength)],t.__pictorialBarRect);Iv(h.style,u,a,n,e.seriesModel,o),$s(h,u)}function ZM(t){var e=Math.round(t);return Math.abs(t-e)<1e-4?e:Math.ceil(t)}wf(T(Rp,"pictorialBar")),bf(Dm("pictorialBar","roundRect"));function UM(t,e,i,n,o){Vg.call(this,t,e,i),this.type=n||"value",this.position=o||"bottom",this.orient=null}function XM(t,e,i){this.dimension="single",this.dimensions=["single"],this._axis=null,this._rect,this._init(t,e,i),this.model=t}function YM(t,e){e=e||{};var i=t.coordinateSystem,n=t.axis,o={},a=n.position,r=n.orient,s=i.getRect(),l=[s.x,s.x+s.width,s.y,s.y+s.height],u={horizontal:{top:l[2],bottom:l[3]},vertical:{left:l[0],right:l[1]}};o.position=["vertical"===r?u.vertical[a]:l[0],"horizontal"===r?u.horizontal[a]:l[3]];o.rotation=Math.PI/2*{horizontal:0,vertical:1}[r];o.labelDirection=o.tickDirection=o.nameDirection={top:-1,bottom:1,right:1,left:-1}[a],t.get("axisTick.inside")&&(o.tickDirection=-o.tickDirection),W(e.labelInside,t.get("axisLabel.inside"))&&(o.labelDirection=-o.labelDirection);var h=e.rotate;return null==h&&(h=t.get("axisLabel.rotate")),o.labelRotation="top"===a?-h:h,o.z2=1,o}UM.prototype={constructor:UM,model:null,isHorizontal:function(){var t=this.position;return"top"===t||"bottom"===t},pointToData:function(t,e){return this.coordinateSystem.pointToData(t,e)[0]},toGlobalCoord:null,toLocalCoord:null},w(UM,Vg),sh.register("single",{create:function(n,o){var a=[];return n.eachComponent("singleAxis",function(t,e){var i=new XM(t,n,o);i.name="single_"+e,i.resize(t,o),t.coordinateSystem=i,a.push(i)}),n.eachSeries(function(t){if("singleAxis"===t.get("coordinateSystem")){var e=n.queryComponents({mainType:"singleAxis",index:t.get("singleAxisIndex"),id:t.get("singleAxisId")})[0];t.coordinateSystem=e&&e.coordinateSystem}}),a},dimensions:(XM.prototype={type:"singleAxis",axisPointerEnabled:!0,constructor:XM,_init:function(t,e,i){var n=this.dimension,o=new UM(n,rg(t),[0,0],t.get("type"),t.get("position")),a="category"===o.type;o.onBand=a&&t.get("boundaryGap"),o.inverse=t.get("inverse"),o.orient=t.get("orient"),(t.axis=o).model=t,(o.coordinateSystem=this)._axis=o},update:function(t,e){t.eachSeries(function(t){if(t.coordinateSystem===this){var e=t.getData();E(e.mapDimension(this.dimension,!0),function(t){this._axis.scale.unionExtentFromData(e,t)},this),ag(this._axis.scale,this._axis.model)}},this)},resize:function(t,e){this._rect=wu({left:t.get("left"),top:t.get("top"),right:t.get("right"),bottom:t.get("bottom"),width:t.get("width"),height:t.get("height")},{width:e.getWidth(),height:e.getHeight()}),this._adjustAxis()},getRect:function(){return this._rect},_adjustAxis:function(){var t=this._rect,e=this._axis,i=e.isHorizontal(),n=i?[0,t.width]:[0,t.height],o=e.reverse?1:0;e.setExtent(n[o],n[1-o]),this._updateAxisTransform(e,i?t.x:t.y)},_updateAxisTransform:function(t,e){var i=t.getExtent(),n=i[0]+i[1],o=t.isHorizontal();t.toGlobalCoord=o?function(t){return t+e}:function(t){return n-t+e},t.toLocalCoord=o?function(t){return t-e}:function(t){return n-t+e}},getAxis:function(){return this._axis},getBaseAxis:function(){return this._axis},getAxes:function(){return[this._axis]},getTooltipAxes:function(){return{baseAxes:[this.getAxis()]}},containPoint:function(t){var e=this.getRect(),i=this.getAxis();return"horizontal"===i.orient?i.contain(i.toLocalCoord(t[0]))&&t[1]>=e.y&&t[1]<=e.y+e.height:i.contain(i.toLocalCoord(t[1]))&&t[0]>=e.y&&t[0]<=e.y+e.height},pointToData:function(t){var e=this.getAxis();return[e.coordToData(e.toLocalCoord(t["horizontal"===e.orient?0:1]))]},dataToPoint:function(t){var e=this.getAxis(),i=this.getRect(),n=[],o="horizontal"===e.orient?0:1;return t instanceof Array&&(t=t[0]),n[o]=e.toGlobalCoord(e.dataToCoord(+t)),n[1-o]=0==o?i.y+i.height/2:i.x+i.width/2,n}}).dimensions});var jM=["axisLine","axisTickLabel","axisName"],qM=["splitArea","splitLine"],KM=pv.extend({type:"singleAxis",axisPointerClass:"SingleAxisPointer",render:function(e,t,i,n){var o=this.group;o.removeAll();var a=this._axisGroup;this._axisGroup=new Ci;var r=YM(e),s=new $m(e,r);E(jM,s.add,s),o.add(this._axisGroup),o.add(s.getGroup()),E(qM,function(t){e.get(t+".show")&&this["_"+t](e)},this),ml(a,this._axisGroup,e),KM.superCall(this,"render",e,t,i,n)},remove:function(){_v(this)},_splitLine:function(t){var e=t.axis;if(!e.scale.isBlank()){var i=t.getModel("splitLine"),n=i.getModel("lineStyle"),o=n.get("width"),a=n.get("color");a=a instanceof Array?a:[a];for(var r=t.coordinateSystem.getRect(),s=e.isHorizontal(),l=[],u=0,h=e.getTicksCoords({tickModel:i}),c=[],d=[],f=0;f<h.length;++f){var p=e.toGlobalCoord(h[f].coord);s?(c[0]=p,c[1]=r.y,d[0]=p,d[1]=r.y+r.height):(c[0]=r.x,c[1]=p,d[0]=r.x+r.width,d[1]=p);var g=u++%a.length;l[g]=l[g]||[],l[g].push(new ls({subPixelOptimize:!0,shape:{x1:c[0],y1:c[1],x2:d[0],y2:d[1]},style:{lineWidth:o},silent:!0}))}for(f=0;f<l.length;++f)this.group.add(Es(l[f],{style:{stroke:a[f%a.length],lineDash:n.getLineDash(o),lineWidth:o},silent:!0}))}},_splitArea:function(t){xv(this,this._axisGroup,t,t)}}),$M=Lu.extend({type:"singleAxis",layoutMode:"box",axis:null,coordinateSystem:null,getCoordSysModel:function(){return this}});m($M.prototype,cg),Bm("single",$M,function(t,e){return e.type||(e.data?"category":"value")},{left:"5%",top:"5%",right:"5%",bottom:"5%",type:"value",position:"bottom",orient:"horizontal",axisLine:{show:!0,lineStyle:{width:1,type:"solid"}},tooltip:{show:!0},axisTick:{show:!0,length:6,lineStyle:{width:1}},axisLabel:{show:!0,interval:"auto"},splitLine:{show:!0,lineStyle:{type:"dashed",opacity:.2}}});function JM(t,e){var i,n=[],o=t.seriesIndex;if(null==o||!(i=e.getSeriesByIndex(o)))return{point:[]};var a=i.getData(),r=Yo(a,t);if(null==r||r<0||O(r))return{point:[]};var s=a.getItemGraphicEl(r),l=i.coordinateSystem;if(i.getTooltipPosition)n=i.getTooltipPosition(r)||[];else if(l&&l.dataToPoint)n=l.dataToPoint(a.getValues(N(l.dimensions,function(t){return a.mapDimension(t)}),r,!0))||[];else if(s){var u=s.getBoundingRect().clone();u.applyTransform(s.transform),n=[u.x+u.width/2,u.y+u.height/2]}return{point:n,el:s}}var QM=E,tI=T,eI=jo();function iI(t,e,i,n,o){var a=t.axis;if(!a.scale.isBlank()&&a.containData(e))if(t.involveSeries){var r=function(l,t){var u=t.axis,h=u.dim,c=l,d=[],f=Number.MAX_VALUE,p=-1;return QM(t.seriesModels,function(e,t){var i,n,o=e.getData().mapDimension(h,!0);if(e.getAxisTooltipData){var a=e.getAxisTooltipData(o,l,u);n=a.dataIndices,i=a.nestestValue}else{if(!(n=e.getData().indicesOfNearest(o[0],l,"category"===u.type?.5:null)).length)return;i=e.getData().get(o[0],n[0])}if(null!=i&&isFinite(i)){var r=l-i,s=Math.abs(r);s<=f&&((s<f||0<=r&&p<0)&&(f=s,p=r,c=i,d.length=0),QM(n,function(t){d.push({seriesIndex:e.seriesIndex,dataIndexInside:t,dataIndex:e.getData().getRawIndex(t)})}))}}),{payloadBatch:d,snapToValue:c}}(e,t),s=r.payloadBatch,l=r.snapToValue;s[0]&&null==o.seriesIndex&&k(o,s[0]),!n&&t.snap&&a.containData(l)&&null!=l&&(e=l),i.showPointer(t,e,s,o),i.showTooltip(t,r,l)}else i.showPointer(t,e)}function nI(t,e,i,n){t[e.key]={value:i,payloadBatch:n}}function oI(t,e,i,n){var o=i.payloadBatch,a=e.axis,r=a.model,s=e.axisPointerModel;if(e.triggerTooltip&&o.length){var l=e.coordSys.model,u=fv(l),h=t.map[u];h||(h=t.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},t.list.push(h)),h.dataByAxis.push({axisDim:a.dim,axisIndex:r.componentIndex,axisType:r.type,axisId:r.id,value:n,valueLabelOpt:{precision:s.get("label.precision"),formatter:s.get("label.formatter")},seriesDataIndices:o.slice()})}}function aI(t){var e=t.axis.model,i={},n=i.axisDim=t.axis.dim;return i.axisIndex=i[n+"AxisIndex"]=e.componentIndex,i.axisName=i[n+"AxisName"]=e.name,i.axisId=i[n+"AxisId"]=e.id,i}function rI(t){return!t||null==t[0]||isNaN(t[0])||null==t[1]||isNaN(t[1])}If({type:"axisPointer",coordSysAxesInfo:null,defaultOption:{show:"auto",triggerOn:null,zlevel:0,z:50,type:"line",snap:!1,triggerTooltip:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#aaa",width:1,type:"solid"},shadowStyle:{color:"rgba(150,150,150,0.3)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,shadowBlur:3,shadowColor:"#aaa"},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}}});var sI=jo(),lI=E;function uI(t,e,i){if(!v.node){var n=e.getZr();sI(n).records||(sI(n).records={}),function(o,a){if(sI(o).initialized)return;function t(t,n){o.on(t,function(e){var i=function(i){var n={showTip:[],hideTip:[]},o=function(t){var e=n[t.type];e?e.push(t):(t.dispatchAction=o,i.dispatchAction(t))};return{dispatchAction:o,pendings:n}}(a);lI(sI(o).records,function(t){t&&n(t,e,i.dispatchAction)}),function(t,e){var i,n=t.showTip.length,o=t.hideTip.length;n?i=t.showTip[n-1]:o&&(i=t.hideTip[o-1]);i&&(i.dispatchAction=null,e.dispatchAction(i))}(i.pendings,a)})}sI(o).initialized=!0,t("click",T(cI,"click")),t("mousemove",T(cI,"mousemove")),t("globalout",hI)}(n,e),(sI(n).records[t]||(sI(n).records[t]={})).handler=i}}function hI(t,e,i){t.handler("leave",null,i)}function cI(t,e,i,n){e.handler(t,i,n)}function dI(t,e){if(!v.node){var i=e.getZr();(sI(i).records||{})[t]&&(sI(i).records[t]=null)}}var fI=Tf({type:"axisPointer",render:function(t,e,i){var n=e.getComponent("tooltip"),o=t.get("triggerOn")||n&&n.get("triggerOn")||"mousemove|click";uI("axisPointer",i,function(t,e,i){"none"!==o&&("leave"===t||0<=o.indexOf(t))&&i({type:"updateAxisPointer",currTrigger:t,x:e&&e.offsetX,y:e&&e.offsetY})})},remove:function(t,e){dI(e.getZr(),"axisPointer"),fI.superApply(this._model,"remove",arguments)},dispose:function(t,e){dI("axisPointer",e),fI.superApply(this._model,"dispose",arguments)}}),pI=jo(),gI=L,mI=A;function vI(){}function yI(t,e,i,n){!function i(n,t){{if(z(n)&&z(t)){var o=!0;return E(t,function(t,e){o=o&&i(n[e],t)}),!!o}return n===t}}(pI(i).lastProp,n)&&(pI(i).lastProp=n,e?cl(i,n,t):(i.stopAnimation(),i.attr(n)))}function xI(t,e){t[e.get("label.show")?"show":"hide"]()}function _I(t){return{position:t.position.slice(),rotation:t.rotation||0}}function wI(t,e,i){var n=e.get("z"),o=e.get("zlevel");t&&t.traverse(function(t){"group"!==t.type&&(null!=n&&(t.z=n),null!=o&&(t.zlevel=o),t.silent=i)})}function bI(t){var e,i=t.get("type"),n=t.getModel(i+"Style");return"line"===i?(e=n.getLineStyle()).fill=null:"shadow"===i&&((e=n.getAreaStyle()).stroke=null),e}function SI(t,e,i,n,o){var a=MI(i.get("value"),e.axis,e.ecModel,i.get("seriesDataIndices"),{precision:i.get("label.precision"),formatter:i.get("label.formatter")}),r=i.getModel("label"),s=iu(r.get("padding")||0),l=r.getFont(),u=gn(a,l),h=o.position,c=u.width+s[1]+s[3],d=u.height+s[0]+s[2],f=o.align;"right"===f&&(h[0]-=c),"center"===f&&(h[0]-=c/2);var p=o.verticalAlign;"bottom"===p&&(h[1]-=d),"middle"===p&&(h[1]-=d/2),function(t,e,i,n){var o=n.getWidth(),a=n.getHeight();t[0]=Math.min(t[0]+e,o)-e,t[1]=Math.min(t[1]+i,a)-i,t[0]=Math.max(t[0],0),t[1]=Math.max(t[1],0)}(h,c,d,n);var g=r.get("backgroundColor");g&&"auto"!==g||(g=e.get("axisLine.lineStyle.color")),t.label={shape:{x:0,y:0,width:c,height:d,r:r.get("borderRadius")},position:h.slice(),style:{text:a,textFont:l,textFill:r.getTextColor(),textPosition:"inside",textPadding:s,fill:g,stroke:r.get("borderColor")||"transparent",lineWidth:r.get("borderWidth")||0,shadowBlur:r.get("shadowBlur"),shadowColor:r.get("shadowColor"),shadowOffsetX:r.get("shadowOffsetX"),shadowOffsetY:r.get("shadowOffsetY")},z2:10}}function MI(t,e,o,i,n){t=e.scale.parse(t);var a=e.scale.getLabel(t,{precision:n.precision}),r=n.formatter;if(r){var s={value:lg(e,t),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};E(i,function(t){var e=o.getSeriesByIndex(t.seriesIndex),i=t.dataIndexInside,n=e&&e.getDataParams(i);n&&s.seriesData.push(n)}),R(r)?a=r.replace("{value}",a):C(r)&&(a=r(s))}return a}function II(t,e,i){var n=ae();return he(n,n,i.rotation),ue(n,n,i.position),pl([t.dataToCoord(e),(i.labelOffset||0)+(i.labelDirection||1)*(i.labelMargin||0)],n)}function TI(t,e,i,n,o,a){var r=$m.innerTextLayout(i.rotation,0,i.labelDirection);i.labelMargin=o.get("label.margin"),SI(e,n,o,a,{position:II(n.axis,t,i),align:r.textAlign,verticalAlign:r.textVerticalAlign})}function AI(t,e,i){return{x1:t[i=i||0],y1:t[1-i],x2:e[i],y2:e[1-i]}}function DI(t,e,i){return{x:t[i=i||0],y:t[1-i],width:e[i],height:e[1-i]}}function CI(t,e,i,n,o,a){return{cx:t,cy:e,r0:i,r:n,startAngle:o,endAngle:a,clockwise:!0}}oa((vI.prototype={_group:null,_lastGraphicKey:null,_handle:null,_dragging:!1,_lastValue:null,_lastStatus:null,_payloadInfo:null,animationThreshold:15,render:function(t,e,i,n){var o=e.get("value"),a=e.get("status");if(this._axisModel=t,this._axisPointerModel=e,this._api=i,n||this._lastValue!==o||this._lastStatus!==a){this._lastValue=o,this._lastStatus=a;var r=this._group,s=this._handle;if(!a||"hide"===a)return r&&r.hide(),void(s&&s.hide());r&&r.show(),s&&s.show();var l={};this.makeElOption(l,o,t,e,i);var u=l.graphicKey;u!==this._lastGraphicKey&&this.clear(i),this._lastGraphicKey=u;var h=this._moveAnimation=this.determineAnimation(t,e);if(r){var c=T(yI,e,h);this.updatePointerEl(r,l,c,e),this.updateLabelEl(r,l,c,e)}else r=this._group=new Ci,this.createPointerEl(r,l,t,e),this.createLabelEl(r,l,t,e),i.getZr().add(r);wI(r,e,!0),this._renderHandle(o)}},remove:function(t){this.clear(t)},dispose:function(t){this.clear(t)},determineAnimation:function(t,e){var i=e.get("animation"),n=t.axis,o="category"===n.type,a=e.get("snap");if(!a&&!o)return!1;if("auto"!==i&&null!=i)return!0===i;var r=this.animationThreshold;if(o&&n.getBandWidth()>r)return!0;if(a){var s=cv(t).seriesDataCount,l=n.getExtent();return Math.abs(l[0]-l[1])/s>r}return!1},makeElOption:function(t,e,i,n,o){},createPointerEl:function(t,e,i,n){var o=e.pointer;if(o){var a=pI(t).pointerEl=new bl[o.type](gI(e.pointer));t.add(a)}},createLabelEl:function(t,e,i,n){if(e.label){var o=pI(t).labelEl=new rs(gI(e.label));t.add(o),xI(o,n)}},updatePointerEl:function(t,e,i){var n=pI(t).pointerEl;n&&e.pointer&&(n.setStyle(e.pointer.style),i(n,{shape:e.pointer.shape}))},updateLabelEl:function(t,e,i,n){var o=pI(t).labelEl;o&&(o.setStyle(e.label.style),i(o,{shape:e.label.shape,position:e.label.position}),xI(o,n))},_renderHandle:function(t){if(!this._dragging&&this.updateHandleTransform){var e,i=this._axisPointerModel,n=this._api.getZr(),o=this._handle,a=i.getModel("handle"),r=i.get("status");if(!a.get("show")||!r||"hide"===r)return o&&n.remove(o),void(this._handle=null);this._handle||(e=!0,o=this._handle=yl(a.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){Xt(t.event)},onmousedown:mI(this._onHandleDragMove,this,0,0),drift:mI(this._onHandleDragMove,this),ondragend:mI(this._onHandleDragEnd,this)}),n.add(o)),wI(o,i,!1);o.setStyle(a.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var s=a.get("size");O(s)||(s=[s,s]),o.attr("scale",[s[0]/2,s[1]/2]),Lc(this,"_doDispatchAxisPointer",a.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,e)}},_moveHandleToValue:function(t,e){yI(this._axisPointerModel,!e&&this._moveAnimation,this._handle,_I(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},_onHandleDragMove:function(t,e){var i=this._handle;if(i){this._dragging=!0;var n=this.updateHandleTransform(_I(i),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=n,i.stopAnimation(),i.attr(_I(n)),pI(i).lastProp=null,this._doDispatchAxisPointer()}},_doDispatchAxisPointer:function(){if(this._handle){var t=this._payloadInfo,e=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:e.axis.dim,axisIndex:e.componentIndex}]})}},_onHandleDragEnd:function(t){if(this._dragging=!1,this._handle){var e=this._axisPointerModel.get("value");this._moveHandleToValue(e),this._api.dispatchAction({type:"hideTip"})}},getHandleTransform:null,updateHandleTransform:null,clear:function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),i=this._group,n=this._handle;e&&i&&(this._lastGraphicKey=null,i&&e.remove(i),n&&e.remove(n),this._group=null,this._handle=null,this._payloadInfo=null)},doClear:function(){},buildLabel:function(t,e,i){return{x:t[i=i||0],y:t[1-i],width:e[i],height:e[1-i]}}}).constructor=vI);var LI=vI.extend({makeElOption:function(t,e,i,n,o){var a=i.axis,r=a.grid,s=n.get("type"),l=kI(r,a).getOtherAxis(a).getGlobalExtent(),u=a.toGlobalCoord(a.dataToCoord(e,!0));if(s&&"none"!==s){var h=bI(n),c=PI[s](a,u,l);c.style=h,t.graphicKey=c.type,t.pointer=c}TI(e,t,yv(r.model,i),i,n,o)},getHandleTransform:function(t,e,i){var n=yv(e.axis.grid.model,e,{labelInside:!1});return n.labelMargin=i.get("handle.margin"),{position:II(e.axis,t,n),rotation:n.rotation+(n.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,i,n){var o=i.axis,a=o.grid,r=o.getGlobalExtent(!0),s=kI(a,o).getOtherAxis(o).getGlobalExtent(),l="x"===o.dim?0:1,u=t.position;u[l]+=e[l],u[l]=Math.min(r[1],u[l]),u[l]=Math.max(r[0],u[l]);var h=(s[1]+s[0])/2,c=[h,h];c[l]=u[l];return{position:u,rotation:t.rotation,cursorPoint:c,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][l]}}});function kI(t,e){var i={};return i[e.dim+"AxisIndex"]=e.index,t.getCartesian(i)}var PI={line:function(t,e,i){return{type:"Line",subPixelOptimize:!0,shape:AI([e,i[0]],[e,i[1]],NI(t))}},shadow:function(t,e,i){var n=Math.max(1,t.getBandWidth()),o=i[1]-i[0];return{type:"Rect",shape:DI([e-n/2,i[0]],[n,o],NI(t))}}};function NI(t){return"x"===t.dim?0:1}pv.registerAxisPointerClass("CartesianAxisPointer",LI),vf(function(t){if(t){t.axisPointer&&0!==t.axisPointer.length||(t.axisPointer={});var e=t.axisPointer.link;e&&!O(e)&&(t.axisPointer.link=[e])}}),yf(Cd.PROCESSOR.STATISTIC,function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=uv(t,e)}),xf({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},function(t,e,i){var n=t.currTrigger,r=[t.x,t.y],o=t,a=t.dispatchAction||A(i.dispatchAction,i),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){rI(r)&&(r=JM({seriesIndex:o.seriesIndex,dataIndex:o.dataIndex},e).point);var l=rI(r),u=o.axesInfo,h=s.axesInfo,c="leave"===n||rI(r),d={},f={},p={list:[],map:{}},g={showPointer:tI(nI,f),showTooltip:tI(oI,p)};QM(s.coordSysMap,function(t,e){var a=l||t.containPoint(r);QM(s.coordSysAxesInfo[e],function(t,e){var i=t.axis,n=function(t,e){for(var i=0;i<(t||[]).length;i++){var n=t[i];if(e.axis.dim===n.axisDim&&e.axis.model.componentIndex===n.axisIndex)return n}}(u,t);if(!c&&a&&(!u||n)){var o=n&&n.value;null!=o||l||(o=i.pointToData(r)),null!=o&&iI(t,o,g,!1,d)}})});var m={};return QM(h,function(o,t){var a=o.linkGroup;a&&!f[t]&&QM(a.axesInfo,function(t,e){var i=f[e];if(t!==o&&i){var n=i.value;a.mapper&&(n=o.axis.scale.parse(a.mapper(n,aI(t),aI(o)))),m[o.key]=n}})}),QM(m,function(t,e){iI(h[e],t,g,!0,d)}),function(o,t,e){var a=e.axesInfo=[];QM(t,function(t,e){var i=t.axisPointerModel.option,n=o[e];n?(t.useHandle||(i.status="show"),i.value=n.value,i.seriesDataIndices=(n.payloadBatch||[]).slice()):t.useHandle||(i.status="hide"),"show"===i.status&&a.push({axisDim:t.axis.dim,axisIndex:t.axis.model.componentIndex,value:i.value})})}(f,h,d),function(t,e,i,n){if(rI(e)||!t.list.length)return n({type:"hideTip"});var o=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};n({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:i.tooltipOption,position:i.position,dataIndexInside:o.dataIndexInside,dataIndex:o.dataIndex,seriesIndex:o.seriesIndex,dataByCoordSys:t.list})}(p,r,t,a),function(t,e,i){var n=i.getZr(),o="axisPointerLastHighlights",a=eI(n)[o]||{},r=eI(n)[o]={};QM(t,function(t,e){var i=t.axisPointerModel.option;"show"===i.status&&QM(i.seriesDataIndices,function(t){var e=t.seriesIndex+" | "+t.dataIndex;r[e]=t})});var s=[],l=[];E(a,function(t,e){r[e]||l.push(t)}),E(r,function(t,e){a[e]||s.push(t)}),l.length&&i.dispatchAction({type:"downplay",escapeConnect:!0,batch:l}),s.length&&i.dispatchAction({type:"highlight",escapeConnect:!0,batch:s})}(h,0,i),d}});var OI=["x","y"],EI=["width","height"],RI=vI.extend({makeElOption:function(t,e,i,n,o){var a=i.axis,r=a.coordinateSystem,s=VI(r,1-BI(a)),l=r.dataToPoint(e)[0],u=n.get("type");if(u&&"none"!==u){var h=bI(n),c=zI[u](a,l,s);c.style=h,t.graphicKey=c.type,t.pointer=c}TI(e,t,YM(i),i,n,o)},getHandleTransform:function(t,e,i){var n=YM(e,{labelInside:!1});return n.labelMargin=i.get("handle.margin"),{position:II(e.axis,t,n),rotation:n.rotation+(n.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,i,n){var o=i.axis,a=o.coordinateSystem,r=BI(o),s=VI(a,r),l=t.position;l[r]+=e[r],l[r]=Math.min(s[1],l[r]),l[r]=Math.max(s[0],l[r]);var u=VI(a,1-r),h=(u[1]+u[0])/2,c=[h,h];return c[r]=l[r],{position:l,rotation:t.rotation,cursorPoint:c,tooltipOption:{verticalAlign:"middle"}}}}),zI={line:function(t,e,i){return{type:"Line",subPixelOptimize:!0,shape:AI([e,i[0]],[e,i[1]],BI(t))}},shadow:function(t,e,i){var n=t.getBandWidth(),o=i[1]-i[0];return{type:"Rect",shape:DI([e-n/2,i[0]],[n,o],BI(t))}}};function BI(t){return t.isHorizontal()?0:1}function VI(t,e){var i=t.getRect();return[i[OI[e]],i[OI[e]]+i[EI[e]]]}pv.registerAxisPointerClass("SingleAxisPointer",RI),Tf({type:"single"});var GI=rc.extend({type:"series.themeRiver",dependencies:["singleAxis"],nameMap:null,init:function(t){GI.superApply(this,"init",arguments),this.legendVisualProvider=new Yv(A(this.getData,this),A(this.getRawData,this))},fixData:function(t){var e=t.length,i=ta(t,function(t){return t[2]}),n=[];i.buckets.each(function(t,e){n.push({name:e,dataList:t})});for(var o=n.length,a=-1,r=-1,s=0;s<o;++s){var l=n[s].dataList.length;a<l&&(a=l,r=s)}for(var u=0;u<o;++u)if(u!==r)for(var h=n[u].name,c=0;c<a;++c){for(var d=n[r].dataList[c][0],f=n[u].dataList.length,p=-1,g=0;g<f;++g){if(n[u].dataList[g][0]===d){p=g;break}}-1===p&&(t[e]=[],t[e][0]=d,t[e][1]=0,t[e][2]=h,e++)}return t},getInitialData:function(t,e){for(var i=e.queryComponents({mainType:"singleAxis",index:this.get("singleAxisIndex"),id:this.get("singleAxisId")})[0].get("type"),n=M(t.data,function(t){return void 0!==t[2]}),o=this.fixData(n||[]),a=[],r=this.nameMap=Q(),s=0,l=0;l<o.length;++l)a.push(o[l][2]),r.get(o[l][2])||(r.set(o[l][2],s),s++);var u=sp(o,{coordDimensions:["single"],dimensionsDefine:[{name:"time",type:Of(i)},{name:"value",type:"float"},{name:"name",type:"ordinal"}],encodeDefine:{single:0,value:1,itemName:2}}),h=new Xf(u,this);return h.initData(o),h},getLayerSeries:function(){for(var i=this.getData(),t=i.count(),e=[],n=0;n<t;++n)e[n]=n;var o=i.mapDimension("single"),a=ta(e,function(t){return i.get("name",t)}),r=[];return a.buckets.each(function(t,e){t.sort(function(t,e){return i.get(o,t)-i.get(o,e)}),r.push({name:e,indices:t})}),r},getAxisTooltipData:function(t,e,i){O(t)||(t=t?[t]:[]);for(var n,o=this.getData(),a=this.getLayerSeries(),r=[],s=a.length,l=0;l<s;++l){for(var u=Number.MAX_VALUE,h=-1,c=a[l].indices.length,d=0;d<c;++d){var f=o.get(t[0],a[l].indices[d]),p=Math.abs(f-e);p<=u&&(n=f,u=p,h=a[l].indices[d])}r.push(h)}return{dataIndices:r,nestestValue:n}},formatTooltip:function(t){var e=this.getData(),i=e.getName(t),n=e.get(e.mapDimension("value"),t);return!isNaN(n)&&null!=n||(n="-"),au(i+" : "+n)},defaultOption:{zlevel:0,z:2,coordinateSystem:"singleAxis",boundaryGap:["10%","10%"],singleAxisIndex:0,animationEasing:"linear",label:{margin:4,show:!0,position:"left",color:"#000",fontSize:11},emphasis:{label:{show:!0}}}});Df({type:"themeRiver",init:function(){this._layers=[]},render:function(b,t,e){var S=b.getData(),M=this.group,I=b.getLayerSeries(),i=S.getLayout("layoutInfo"),n=i.rect,o=i.boundaryGap;function a(t){return t.name}M.attr("position",[0,n.y+o[0]]);var r=new Lf(this._layersSeries||[],I,a,a),T={};function s(t,e,i){var n=this._layers;if("remove"!==t){for(var o,a,r,s=[],l=[],u=I[e].indices,h=0;h<u.length;h++){var c=S.getItemLayout(u[h]),d=c.x,f=c.y0,p=c.y;s.push([d,f]),l.push([d,f+p]),o=S.getItemVisual(u[h],"color")}var g=S.getItemLayout(u[0]),m=S.getItemModel(u[h-1]),v=m.getModel("label"),y=v.get("margin");if("add"===t){var x=T[e]=new Ci;a=new xm({shape:{points:s,stackedOnPoints:l,smooth:.4,stackedOnSmooth:.4,smoothConstraint:!1},z2:0}),r=new Ur({style:{x:g.x-y,y:g.y0+g.y/2}}),x.add(a),x.add(r),M.add(x),a.setClipPath(function(t,e,i){var n=new rs({shape:{x:t.x-10,y:t.y-10,width:0,height:t.height+20}});return dl(n,{shape:{width:t.width+20,height:t.height+20}},e,i),n}(a.getBoundingRect(),b,function(){a.removeClipPath()}))}else{x=n[i];a=x.childAt(0),r=x.childAt(1),M.add(x),T[e]=x,cl(a,{shape:{points:s,stackedOnPoints:l}},b),cl(r,{style:{x:g.x-y,y:g.y0+g.y/2}},b)}var _=m.getModel("emphasis.itemStyle"),w=m.getModel("itemStyle");nl(r.style,v,{text:v.get("show")?b.getFormattedLabel(u[h-1],"normal")||S.getName(u[h-1]):null,textVerticalAlign:"middle"}),a.setStyle(k({fill:o},w.getItemStyle(["color"]))),$s(a,_.getItemStyle())}else M.remove(n[e])}r.add(A(s,this,"add")).update(A(s,this,"update")).remove(A(s,this,"remove")).execute(),this._layersSeries=I,this._layers=T},dispose:function(){}});function FI(i,t,e){if(i.count())for(var n,o=t.coordinateSystem,a=t.getLayerSeries(),r=i.mapDimension("single"),s=i.mapDimension("value"),l=N(a,function(t){return N(t.indices,function(t){var e=o.dataToPoint(i.get(r,t));return e[1]=i.get(s,t),e})}),u=function(t){for(var e=t.length,i=t[0].length,n=[],o=[],a=0,r={},s=0;s<i;++s){for(var l=0,u=0;l<e;++l)u+=t[l][s][1];a<u&&(a=u),n.push(u)}for(var h=0;h<i;++h)o[h]=(a-n[h])/2;for(var c=a=0;c<i;++c){var d=n[c]+o[c];a<d&&(a=d)}return r.y0=o,r.max=a,r}(l),h=u.y0,c=e/u.max,d=a.length,f=a[0].indices.length,p=0;p<f;++p){n=h[p]*c,i.setItemLayout(a[0].indices[p],{layerIndex:0,x:l[0][p][0],y0:n,y:l[0][p][1]*c});for(var g=1;g<d;++g)n+=l[g-1][p][1]*c,i.setItemLayout(a[g].indices[p],{layerIndex:g,x:l[g][p][0],y0:n,y:l[g][p][1]*c})}}wf(function(t,e){t.eachSeriesByType("themeRiver",function(t){var e=t.getData(),i=t.coordinateSystem,n={},o=i.getRect();n.rect=o;var a=t.get("boundaryGap"),r=i.getAxis();(n.boundaryGap=a,"horizontal"===r.orient)?(a[0]=Rl(a[0],o.height),a[1]=Rl(a[1],o.height),FI(e,t,o.height-a[0]-a[1])):(a[0]=Rl(a[0],o.width),a[1]=Rl(a[1],o.width),FI(e,t,o.width-a[0]-a[1]));e.setLayout("layoutInfo",n)})}),bf(function(t){t.eachSeriesByType("themeRiver",function(o){var a=o.getData(),r=o.getRawData(),s=o.get("color"),l=Q();a.each(function(t){l.set(a.getRawIndex(t),t)}),r.each(function(t){var e=r.getName(t),i=s[(o.nameMap.get(e)-1)%s.length];r.setItemVisual(t,"color",i);var n=l.get(t);null!=n&&a.setItemVisual(n,"color",i)})})}),yf(sy("themeRiver")),rc.extend({type:"series.sunburst",_viewRoot:null,getInitialData:function(t,e){var i={name:t.name,children:t.data};!function i(t){var n=0;E(t.children,function(t){i(t);var e=t.value;O(e)&&(e=e[0]),n+=e});var e=t.value;O(e)&&(e=e[0]);null!=e&&!isNaN(e)||(e=n);e<0&&(e=0);O(t.value)?t.value[0]=e:t.value=e}(i);var n=t.levels||[],o={};return o.levels=n,Ix.createTree(i,this,o).data},optionUpdated:function(){this.resetViewRoot()},getDataParams:function(t){var e=rc.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(t);return e.treePathInfo=Ux(i,this),e},defaultOption:{zlevel:0,z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,percentPrecision:2,stillShowZeroSum:!0,highlightPolicy:"descendant",nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0,emphasis:{}},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1,emphasis:{},highlight:{opacity:1},downplay:{opacity:.9}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicOut",data:[],levels:[],sort:"desc"},getViewRoot:function(){return this._viewRoot},resetViewRoot:function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getRawData().tree.root;t&&(t===e||e.contains(t))||(this._viewRoot=e)}});var WI="none",HI="ancestor",ZI="self",UI=2,XI=4;function YI(t,e,i){Ci.call(this);var n=new qr({z2:UI});n.seriesIndex=e.seriesIndex;var o=new Ur({z2:XI,silent:t.getModel("label").get("silent")});function a(){o.ignore=o.hoverIgnore}function r(){o.ignore=o.normalIgnore}this.add(n),this.add(o),this.updateData(!0,t,"normal",e,i),this.on("emphasis",a).on("normal",r).on("mouseover",a).on("mouseout",r)}var jI=YI.prototype;jI.updateData=function(t,e,i,n,o){(this.node=e).piece=this,n=n||this._seriesModel,o=o||this._ecModel;var a=this.childAt(0);a.dataIndex=e.dataIndex;var r=e.getModel(),s=e.getLayout(),l=k({},s);l.label=null;var u=function(t,e,i){var n=t.getVisual("color"),o=t.getVisual("visualMeta");o&&0!==o.length||(n=null);var a=t.getModel("itemStyle").get("color");{if(a)return a;if(n)return n;if(0===t.depth)return i.option.color[0];var r=i.option.color.length;a=i.option.color[function(t){var e=t;for(;1<e.depth;)e=e.parentNode;return _(t.getAncestors()[0].children,e)}(t)%r]}return a}(e,0,o);!function(t,e,i){e.getData().setItemVisual(t.dataIndex,"color",i)}(e,n,u);var h,c=r.getModel("itemStyle").getItemStyle();"normal"===i?h=c:h=m(r.getModel(i+".itemStyle").getItemStyle(),c);h=D({lineJoin:"bevel",fill:h.fill||u},h),t?(a.setShape(l),a.shape.r=s.r0,cl(a,{shape:{r:s.r}},n,e.dataIndex),a.useStyle(h)):"object"==typeof h.fill&&h.fill.type||"object"==typeof a.style.fill&&a.style.fill.type?(cl(a,{shape:l},n),a.useStyle(h)):cl(a,{shape:l,style:h},n),this._updateLabel(n,u,i);var d=r.getShallow("cursor");if(d&&a.attr("cursor",d),t){var f=n.getShallow("highlightPolicy");this._initEvents(a,e,n,f)}this._seriesModel=n||this._seriesModel,this._ecModel=o||this._ecModel},jI.onEmphasis=function(e){var i=this;this.node.hostTree.root.eachNode(function(t){t.piece&&(i.node===t?t.piece.updateData(!1,t,"emphasis"):!function(t,e,i){return i!==WI&&(i===ZI?t===e:i===HI?t===e||t.isAncestorOf(e):t===e||t.isDescendantOf(e))}(t,i.node,e)?e!==WI&&t.piece.childAt(0).trigger("downplay"):t.piece.childAt(0).trigger("highlight"))})},jI.onNormal=function(){this.node.hostTree.root.eachNode(function(t){t.piece&&t.piece.updateData(!1,t,"normal")})},jI.onHighlight=function(){this.updateData(!1,this.node,"highlight")},jI.onDownplay=function(){this.updateData(!1,this.node,"downplay")},jI._updateLabel=function(t,e,i){var n=this.node.getModel(),o=n.getModel("label"),a="normal"===i||"emphasis"===i?o:n.getModel(i+".label"),r=n.getModel("emphasis.label"),s=W(t.getFormattedLabel(this.node.dataIndex,i,null,null,"label"),this.node.name);!1===S("show")&&(s="");var l=this.node.getLayout(),u=a.get("minAngle");null==u&&(u=o.get("minAngle")),u=u/180*Math.PI;var h=l.endAngle-l.startAngle;null!=u&&Math.abs(h)<u&&(s="");var c=this.childAt(1);el(c.style,c.hoverStyle||{},o,r,{defaultText:a.getShallow("show")?s:null,autoColor:e,useInsideStyle:!0});var d,f=(l.startAngle+l.endAngle)/2,p=Math.cos(f),g=Math.sin(f),m=S("position"),v=S("distance")||0,y=S("align");"outside"===m?(d=l.r+v,y=f>Math.PI/2?"right":"left"):y&&"center"!==y?"left"===y?(d=l.r0+v,f>Math.PI/2&&(y="right")):"right"===y&&(d=l.r-v,f>Math.PI/2&&(y="left")):(d=(l.r+l.r0)/2,y="center"),c.attr("style",{text:s,textAlign:y,textVerticalAlign:S("verticalAlign")||"middle",opacity:S("opacity")});var x=d*p+l.cx,_=d*g+l.cy;c.attr("position",[x,_]);var w=S("rotate"),b=0;function S(t){var e=a.get(t);return null==e?o.get(t):e}"radial"===w?(b=-f)<-Math.PI/2&&(b+=Math.PI):"tangential"===w?(b=Math.PI/2-f)>Math.PI/2?b-=Math.PI:b<-Math.PI/2&&(b+=Math.PI):"number"==typeof w&&(b=w*Math.PI/180),c.attr("rotation",b)},jI._initEvents=function(t,e,i,n){t.off("mouseover").off("mouseout").off("emphasis").off("normal");function o(){r.onEmphasis(n)}function a(){r.onNormal()}var r=this;i.isAnimationEnabled()&&t.on("mouseover",o).on("mouseout",a).on("emphasis",o).on("normal",a).on("downplay",function(){r.onDownplay()}).on("highlight",function(){r.onHighlight()})},w(YI,Ci);xc.extend({type:"sunburst",init:function(){},render:function(o,a,t,e){var n=this;this.seriesModel=o,this.api=t,this.ecModel=a;var r=o.getData(),s=r.tree.root,i=o.getViewRoot(),l=this.group,u=o.get("renderLabelForZeroData"),h=[];i.eachNode(function(t){h.push(t)});var c=this._oldChildren||[];if(function(i,n){if(0===i.length&&0===n.length)return;function t(t){return t.getId()}function e(t,e){!function(t,e){u||!t||t.getValue()||(t=null);if(t!==s&&e!==s)if(e&&e.piece)t?(e.piece.updateData(!1,t,"normal",o,a),r.setItemGraphicEl(t.dataIndex,e.piece)):function(t){if(!t)return;t.piece&&(l.remove(t.piece),t.piece=null)}(e);else if(t){var i=new YI(t,o,a);l.add(i),r.setItemGraphicEl(t.dataIndex,i)}}(null==t?null:i[t],null==e?null:n[e])}new Lf(n,i,t,t).add(e).update(e).remove(T(e,null)).execute()}(h,c),function(t,e){if(0<e.depth){n.virtualPiece?n.virtualPiece.updateData(!1,t,"normal",o,a):(n.virtualPiece=new YI(t,o,a),l.add(n.virtualPiece)),e.piece._onclickEvent&&e.piece.off("click",e.piece._onclickEvent);var i=function(t){n._rootToNode(e.parentNode)};e.piece._onclickEvent=i,n.virtualPiece.on("click",i)}else n.virtualPiece&&(l.remove(n.virtualPiece),n.virtualPiece=null)}(s,i),e&&e.highlight&&e.highlight.piece){var d=o.getShallow("highlightPolicy");e.highlight.piece.onEmphasis(d)}else if(e&&e.unhighlight){var f=this.virtualPiece;!f&&s.children.length&&(f=s.children[0].piece),f&&f.onNormal()}this._initEvents(),this._oldChildren=h},dispose:function(){},_initEvents:function(){function t(a){var r=!1;s.seriesModel.getViewRoot().eachNode(function(t){if(!r&&t.piece&&t.piece.childAt(0)===a.target){var e=t.getModel().get("nodeClick");if("rootToNode"===e)s._rootToNode(t);else if("link"===e){var i=t.getModel(),n=i.get("link");if(n){var o=i.get("target",!0)||"_blank";window.open(n,o)}}r=!0}})}var s=this;this.group._onclickEvent&&this.group.off("click",this.group._onclickEvent),this.group.on("click",t),this.group._onclickEvent=t},_rootToNode:function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:"sunburstRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},containPoint:function(t,e){var i=e.getData().getItemLayout(0);if(i){var n=t[0]-i.cx,o=t[1]-i.cy,a=Math.sqrt(n*n+o*o);return a<=i.r&&a>=i.r0}}});var qI="sunburstRootToNode";xf({type:qI,update:"updateView"},function(o,t){t.eachComponent({mainType:"series",subType:"sunburst",query:o},function(t,e){var i=Wx(o,[qI],t);if(i){var n=t.getViewRoot();n&&(o.direction=Zx(n,i.node)?"rollUp":"drillDown"),t.resetViewRoot(i.node)}})});var KI="sunburstHighlight";xf({type:KI,update:"updateView"},function(n,t){t.eachComponent({mainType:"series",subType:"sunburst",query:n},function(t,e){var i=Wx(n,[KI],t);i&&(n.highlight=i.node)})});xf({type:"sunburstUnhighlight",update:"updateView"},function(i,t){t.eachComponent({mainType:"series",subType:"sunburst",query:i},function(t,e){i.unhighlight=!0})});var $I=Math.PI/180;function JI(t,e){if("function"==typeof e)return t.sort(e);var n="asc"===e;return t.sort(function(t,e){var i=(t.getValue()-e.getValue())*(n?1:-1);return 0==i?(t.dataIndex-e.dataIndex)*(n?-1:1):i})}function QI(a,r){return r=r||[0,0],N(["x","y"],function(t,e){var i=this.getAxis(t),n=r[e],o=a[e]/2;return"category"===i.type?i.getBandWidth():Math.abs(i.dataToCoord(n-o)-i.dataToCoord(n+o))},this)}bf(T(ty,"sunburst")),wf(T(function(t,e,C,i){e.eachSeriesByType(t,function(t){var e=t.get("center"),i=t.get("radius");O(i)||(i=[0,i]),O(e)||(e=[e,e]);var n=C.getWidth(),o=C.getHeight(),h=Math.min(n,o),c=Rl(e[0],n),d=Rl(e[1],o),f=Rl(i[0],h/2),a=Rl(i[1],h/2),r=-t.get("startAngle")*$I,p=t.get("minAngle")*$I,g=t.getData().tree.root,s=t.getViewRoot(),m=s.depth,l=t.get("sort");null!=l&&!function e(t,i){var n=t.children||[];t.children=JI(n,i);n.length&&E(t.children,function(t){e(t,i)})}(s,l);var u=0;E(s.children,function(t){isNaN(t.getValue())||u++});var v=s.getValue(),y=Math.PI/(v||u)*2,x=0<s.depth,_=s.height-(x?-1:1),w=(a-f)/(_||1),b=t.get("clockwise"),S=t.get("stillShowZeroSum"),M=b?1:-1,I=function(t,e){if(t){var i=e;if(t!==g){var n=t.getValue(),o=0===v&&S?y:n*y;o<p&&(o=p),i=e+M*o;var a=t.depth-m-(x?-1:1),r=f+w*a,s=f+w*(1+a),l=t.getModel();null!=l.get("r0")&&(r=Rl(l.get("r0"),h/2)),null!=l.get("r")&&(s=Rl(l.get("r"),h/2)),t.setLayout({angle:o,startAngle:e,endAngle:i,clockwise:b,cx:c,cy:d,r0:r,r:s})}if(t.children&&t.children.length){var u=0;E(t.children,function(t){u+=I(t,e+u)})}return i-e}};if(x){var T=f,A=f+w,D=2*Math.PI;g.setLayout({angle:D,startAngle:r,endAngle:r+D,clockwise:b,cx:c,cy:d,r0:T,r:A})}I(s,r)})},"sunburst")),yf(T(sy,"sunburst"));function tT(a,r){return r=r||[0,0],N([0,1],function(t){var e=r[t],i=a[t]/2,n=[],o=[];return n[t]=e-i,o[t]=e+i,n[1-t]=o[1-t]=r[1-t],Math.abs(this.dataToPoint(n)[t]-this.dataToPoint(o)[t])},this)}function eT(t,e){var i=this.getAxis(),n=e instanceof Array?e[0]:e,o=(t instanceof Array?t[0]:t)/2;return"category"===i.type?i.getBandWidth():Math.abs(i.dataToCoord(n-o)-i.dataToCoord(n+o))}function iT(s,l){return N(["Radius","Angle"],function(t,e){var i=this["get"+t+"Axis"](),n=l[e],o=s[e]/2,a="dataTo"+t,r="category"===i.type?i.getBandWidth():Math.abs(i[a](n-o)-i[a](n+o));return"Angle"===t&&(r=r*Math.PI/180),r},this)}var nT=Ss,oT=["itemStyle"],aT=["emphasis","itemStyle"],rT=["label"],sT=["emphasis","label"],lT="e\0\0",uT={cartesian2d:function(e){var t=e.grid.getRect();return{coordSys:{type:"cartesian2d",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(t){return e.dataToPoint(t)},size:A(QI,e)}}},geo:function(e){var t=e.getBoundingRect();return{coordSys:{type:"geo",x:t.x,y:t.y,width:t.width,height:t.height,zoom:e.getZoom()},api:{coord:function(t){return e.dataToPoint(t)},size:A(tT,e)}}},singleAxis:function(e){var t=e.getRect();return{coordSys:{type:"singleAxis",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(t){return e.dataToPoint(t)},size:A(eT,e)}}},polar:function(o){var a=o.getRadiusAxis(),r=o.getAngleAxis(),t=a.getExtent();return t[0]>t[1]&&t.reverse(),{coordSys:{type:"polar",cx:o.cx,cy:o.cy,r:t[1],r0:t[0]},api:{coord:A(function(t){var e=a.dataToRadius(t[0]),i=r.dataToAngle(t[1]),n=o.coordToPoint([e,i]);return n.push(e,i*Math.PI/180),n}),size:A(iT,o)}}},calendar:function(i){var t=i.getRect(),e=i.getRangeInfo();return{coordSys:{type:"calendar",x:t.x,y:t.y,width:t.width,height:t.height,cellWidth:i.getCellWidth(),cellHeight:i.getCellHeight(),rangeInfo:{start:e.start,end:e.end,weeks:e.weeks,dayCount:e.allDay}},api:{coord:function(t,e){return i.dataToPoint(t,e)}}}}};function hT(t,e,i,n,o){null==i[t]||o||(e[t]=i[t],i[t]=n[t])}function cT(a,r,e,t){var i=a.get("renderItem"),n=a.coordinateSystem,o={};n&&(o=n.prepareCustoms?n.prepareCustoms():uT[n.type](n));var s,l,u,h,c,d=D({getWidth:t.getWidth,getHeight:t.getHeight,getZr:t.getZr,getDevicePixelRatio:t.getDevicePixelRatio,value:function(t,e){return null==e&&(e=s),r.get(r.getDimension(t||0),e)},style:function(t,e){null==e&&(e=s),g(e);var i=l.getModel(oT).getItemStyle();null!=c&&(i.fill=c);var n=r.getItemVisual(e,"opacity");null!=n&&(i.opacity=n);var o=t?mT(t,u):u;return nl(i,o,null,{autoColor:c,isRectText:!0}),i.text=o.getShallow("show")?H(a.getFormattedLabel(e,"normal"),Zg(r,e)):null,t&&vT(i,t),i},styleEmphasis:function(t,e){null==e&&(e=s),g(e);var i=l.getModel(aT).getItemStyle(),n=t?mT(t,h):h;return nl(i,n,null,{isRectText:!0},!0),i.text=n.getShallow("show")?Z(a.getFormattedLabel(e,"emphasis"),a.getFormattedLabel(e,"normal"),Zg(r,e)):null,t&&vT(i,t),i},visual:function(t,e){return null==e&&(e=s),r.getItemVisual(e,t)},barLayout:function(t){if(n.getBaseAxis){return function(t){var e=[],i=t.axis;if("category"===i.type){for(var n=i.getBandWidth(),o=0;o<t.count;o++)e.push(D({bandWidth:n,axisKey:"axis0",stackId:Dp+o},t));var a=Op(e),r=[];for(o=0;o<t.count;o++){var s=a.axis0[Dp+o];s.offsetCenter=s.offset+s.width/2,r.push(s)}return r}}(D({axis:n.getBaseAxis()},t))}},currentSeriesIndices:function(){return e.getCurrentSeriesIndices()},font:function(t){return ul(t,e)}},o.api||{}),f={context:{},seriesId:a.id,seriesName:a.name,seriesIndex:a.seriesIndex,coordSys:o.coordSys,dataInsideLength:r.count(),encode:function(o){var a={};return E(o.dimensions,function(t,e){var i=o.getDimensionInfo(t);if(!i.isExtraCoord){var n=i.coordDim;(a[n]=a[n]||[])[i.coordDimIndex]=e}}),a}(a.getData())},p=!0;return function(t,e){return s=t,p=!0,i&&i(D({dataIndexInside:t,dataIndex:r.getRawIndex(t),actionType:e?e.type:null},f),d)};function g(t){null==t&&(t=s),p&&(l=r.getItemModel(t),u=l.getModel(rT),h=l.getModel(sT),c=r.getItemVisual(t,"color"),p=!1)}}function dT(t,e,i,n,o,a){return(t=fT(t,e,i,n,o,a,!0))&&a.setItemGraphicEl(e,t),t}function fT(t,e,i,n,o,a,r){var s=!i,l=(i=i||{}).type,u=i.shape,h=i.style;if(t&&(s||null!=l&&l!==t.__customGraphicType||"path"===l&&function(t){return t&&(t.hasOwnProperty("pathData")||t.hasOwnProperty("d"))}(u)&&xT(u)!==t.__customPathData||"image"===l&&_T(h,"image")&&h.image!==t.__customImagePath||"text"===l&&_T(u,"text")&&h.text!==t.__customText)&&(o.remove(t),t=null),!s){var c=!t;return function(e,t,i,n,o,a,r){var s={},l=i.style||{};if(i.shape&&(s.shape=L(i.shape)),i.position&&(s.position=i.position.slice()),i.scale&&(s.scale=i.scale.slice()),i.origin&&(s.origin=i.origin.slice()),i.rotation&&(s.rotation=i.rotation),"image"===e.type&&i.style){var u=s.style={};E(["x","y","width","height"],function(t){hT(t,u,l,e.style,a)})}if("text"===e.type&&i.style){u=s.style={};E(["x","y"],function(t){hT(t,u,l,e.style,a)}),!l.hasOwnProperty("textFill")&&l.fill&&(l.textFill=l.fill),!l.hasOwnProperty("textStroke")&&l.stroke&&(l.textStroke=l.stroke)}if("group"!==e.type&&(e.useStyle(l),a)){e.style.opacity=0;var h=l.opacity;null==h&&(h=1),dl(e,{style:{opacity:h}},n,t)}a?e.attr(s):cl(e,s,n,t),i.hasOwnProperty("z2")&&e.attr("z2",i.z2||0),i.hasOwnProperty("silent")&&e.attr("silent",i.silent),i.hasOwnProperty("invisible")&&e.attr("invisible",i.invisible),i.hasOwnProperty("ignore")&&e.attr("ignore",i.ignore),i.hasOwnProperty("info")&&e.attr("info",i.info);var c=i.styleEmphasis;Us(e,c),r&&Js(e,!1!==c)}(t=t||function(t){var e,i=t.type;if("path"===i){var n=t.shape,o=null!=n.width&&null!=n.height?{x:n.x||0,y:n.y||0,width:n.width,height:n.height}:null,a=xT(n);(e=Ps(a,null,o,n.layout||"center")).__customPathData=a}else if("image"===i)(e=new Qn({})).__customImagePath=t.style.image;else if("text"===i)(e=new Ur({})).__customText=t.style.text;else if("group"===i)e=new Ci;else{if("compoundPath"===i)throw new Error('"compoundPath" is not supported yet.');e=new(ks(i))}return e.__customGraphicType=i,e.name=t.name,e}(i),e,i,n,0,c,r),"group"===l&&function(t,e,i,n,o){var a=i.children,r=a?a.length:0,s=i.$mergeChildren,l="byName"===s||i.diffChildrenByName,u=!1===s;if(!r&&!l&&!u)return;if(l)return function(t){new Lf(t.oldChildren,t.newChildren,pT,pT,t).add(gT).update(gT).remove(yT).execute()}({oldChildren:t.children()||[],newChildren:a||[],dataIndex:e,animatableModel:n,group:t,data:o});u&&t.removeAll();for(var h=0;h<r;h++)a[h]&&fT(t.childAt(h),e,a[h],n,t,o)}(t,e,i,n,a),o.add(t),t}}function pT(t,e){var i=t&&t.name;return null!=i?i:lT+e}function gT(t,e){var i=this.context,n=null!=t?i.newChildren[t]:null;fT(null!=e?i.oldChildren[e]:null,i.dataIndex,n,i.animatableModel,i.group,i.data)}function mT(i,t){var n=new Cl({},t);return E(nT,function(t,e){i.hasOwnProperty(t)&&(n.option[e]=i[t])}),n}function vT(t,e){for(var i in e)!e.hasOwnProperty(i)&&nT.hasOwnProperty(i)||(t[i]=e[i])}function yT(t){var e=this.context,i=e.oldChildren[t];i&&e.group.remove(i)}function xT(t){return t&&(t.pathData||t.d)}function _T(t,e){return t&&t.hasOwnProperty(e)}function wT(t){return t.get("stack")||"__ec_stack_"+t.seriesIndex}function bT(t,e){return e.dim+t.model.componentIndex}function ST(t,e){Vg.call(this,"radius",t,e),this.type="category"}rc.extend({type:"series.custom",dependencies:["grid","polar","geo","singleAxis","calendar"],defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,useTransform:!0,clip:!1},getInitialData:function(t,e){return pp(this.getSource(),this)},getDataParams:function(t,e,i){var n=rc.prototype.getDataParams.apply(this,arguments);return i&&(n.info=i.info),n}}),xc.extend({type:"custom",_data:null,render:function(i,t,e,n){var o=this._data,a=i.getData(),r=this.group,s=cT(i,a,t,e);a.diff(o).add(function(t){dT(null,t,s(t,n),i,r,a)}).update(function(t,e){dT(o.getItemGraphicEl(e),t,s(t,n),i,r,a)}).remove(function(t){var e=o.getItemGraphicEl(t);e&&r.remove(e)}).execute();var l=i.get("clip",!0)?bm(i.coordinateSystem,!1,i):null;l?r.setClipPath(l):r.removeClipPath(),this._data=a},incrementalPrepareRender:function(t,e,i){this.group.removeAll(),this._data=null},incrementalRender:function(t,e,i,n,o){var a=e.getData(),r=cT(e,a,i,n);function s(t){t.isGroup||(t.incremental=!0,t.useHoverLayer=!0)}for(var l=t.start;l<t.end;l++){dT(null,l,r(l,o),e,this.group,a).traverse(s)}},dispose:et,filterForExposedEvent:function(t,e,i,n){var o=e.element;if(null==o||i.name===o)return!0;for(;(i=i.parent)&&i!==this.group;)if(i.name===o)return!0;return!1}}),ST.prototype={constructor:ST,pointToData:function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},dataToRadius:Vg.prototype.dataToCoord,radiusToData:Vg.prototype.coordToData},w(ST,Vg);var MT=jo();function IT(t,e){e=e||[0,360],Vg.call(this,"angle",t,e),this.type="category"}IT.prototype={constructor:IT,pointToData:function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},dataToAngle:Vg.prototype.dataToCoord,angleToData:Vg.prototype.coordToData,calculateCategoryInterval:function(){var t=this.getLabelModel(),e=this.scale,i=e.getExtent(),n=e.count();if(i[1]-i[0]<1)return 0;var o=i[0],a=this.dataToCoord(o+1)-this.dataToCoord(o),r=Math.abs(a),s=gn(o,t.getFont(),"center","top"),l=Math.max(s.height,7)/r;isNaN(l)&&(l=1/0);var u=Math.max(0,Math.floor(l)),h=MT(this.model),c=h.lastAutoInterval,d=h.lastTickCount;return null!=c&&null!=d&&Math.abs(c-u)<=1&&Math.abs(d-n)<=1&&u<c?u=c:(h.lastTickCount=n,h.lastAutoInterval=u),u}},w(IT,Vg);function TT(t){this.name=t||"",this.cx=0,this.cy=0,this._radiusAxis=new ST,this._angleAxis=new IT,this._radiusAxis.polar=this._angleAxis.polar=this}TT.prototype={type:"polar",axisPointerEnabled:!0,constructor:TT,dimensions:["radius","angle"],model:null,containPoint:function(t){var e=this.pointToCoord(t);return this._radiusAxis.contain(e[0])&&this._angleAxis.contain(e[1])},containData:function(t){return this._radiusAxis.containData(t[0])&&this._angleAxis.containData(t[1])},getAxis:function(t){return this["_"+t+"Axis"]},getAxes:function(){return[this._radiusAxis,this._angleAxis]},getAxesByScale:function(t){var e=[],i=this._angleAxis,n=this._radiusAxis;return i.scale.type===t&&e.push(i),n.scale.type===t&&e.push(n),e},getAngleAxis:function(){return this._angleAxis},getRadiusAxis:function(){return this._radiusAxis},getOtherAxis:function(t){var e=this._angleAxis;return t===e?this._radiusAxis:e},getBaseAxis:function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},getTooltipAxes:function(t){var e=null!=t&&"auto"!==t?this.getAxis(t):this.getBaseAxis();return{baseAxes:[e],otherAxes:[this.getOtherAxis(e)]}},dataToPoint:function(t,e){return this.coordToPoint([this._radiusAxis.dataToRadius(t[0],e),this._angleAxis.dataToAngle(t[1],e)])},pointToData:function(t,e){var i=this.pointToCoord(t);return[this._radiusAxis.radiusToData(i[0],e),this._angleAxis.angleToData(i[1],e)]},pointToCoord:function(t){var e=t[0]-this.cx,i=t[1]-this.cy,n=this.getAngleAxis(),o=n.getExtent(),a=Math.min(o[0],o[1]),r=Math.max(o[0],o[1]);n.inverse?a=r-360:r=a+360;var s=Math.sqrt(e*e+i*i);e/=s,i/=s;for(var l=Math.atan2(-i,e)/Math.PI*180,u=l<a?1:-1;l<a||r<l;)l+=360*u;return[s,l]},coordToPoint:function(t){var e=t[0],i=t[1]/180*Math.PI;return[Math.cos(i)*e+this.cx,-Math.sin(i)*e+this.cy]},getArea:function(){var t=this.getAngleAxis(),e=this.getRadiusAxis().getExtent().slice();e[0]>e[1]&&e.reverse();var i=t.getExtent(),n=Math.PI/180;return{cx:this.cx,cy:this.cy,r0:e[0],r:e[1],startAngle:-i[0]*n,endAngle:-i[1]*n,clockwise:t.inverse,contain:function(t,e){var i=t-this.cx,n=e-this.cy,o=i*i+n*n,a=this.r,r=this.r0;return o<=a*a&&r*r<=o}}}};var AT=Lu.extend({type:"polarAxis",axis:null,getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"polar",index:this.option.polarIndex,id:this.option.polarId})[0]}});m(AT.prototype,cg);var DT={splitNumber:5};function CT(t,e){return e.type||(e.data?"category":"value")}function LT(t,e){var i=this,n=i.getAngleAxis(),o=i.getRadiusAxis();if(n.scale.setExtent(1/0,-1/0),o.scale.setExtent(1/0,-1/0),t.eachSeries(function(t){if(t.coordinateSystem===i){var e=t.getData();E(e.mapDimension("radius",!0),function(t){o.scale.unionExtentFromData(e,fp(e,t))}),E(e.mapDimension("angle",!0),function(t){n.scale.unionExtentFromData(e,fp(e,t))})}}),ag(n.scale,n.model),ag(o.scale,o.model),"category"===n.type&&!n.onBand){var a=n.getExtent(),r=360/n.scale.count();n.inverse?a[1]+=r:a[1]-=r,n.setExtent(a[0],a[1])}}function kT(t,e){if(t.type=e.get("type"),t.scale=rg(e),t.onBand=e.get("boundaryGap")&&"category"===t.type,t.inverse=e.get("inverse"),"angleAxis"===e.mainType){t.inverse^=e.get("clockwise");var i=e.get("startAngle");t.setExtent(i,i+(t.inverse?-360:360))}(e.axis=t).model=e}Bm("angle",AT,CT,{startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:!1}}),Bm("radius",AT,CT,DT),If({type:"polar",dependencies:["polarAxis","angleAxis"],coordinateSystem:null,findAxisModel:function(t){var e;return this.ecModel.eachComponent(t,function(t){t.getCoordSysModel()===this&&(e=t)},this),e},defaultOption:{zlevel:0,z:0,center:["50%","50%"],radius:"80%"}}),sh.register("polar",{dimensions:TT.prototype.dimensions,create:function(i,s){var l=[];return i.eachComponent("polar",function(t,e){var i=new TT(e);i.update=LT;var n=i.getRadiusAxis(),o=i.getAngleAxis(),a=t.findAxisModel("radiusAxis"),r=t.findAxisModel("angleAxis");kT(n,a),kT(o,r),function(t,e,i){var n=e.get("center"),o=i.getWidth(),a=i.getHeight();t.cx=Rl(n[0],o),t.cy=Rl(n[1],a);var r=t.getRadiusAxis(),s=Math.min(o,a)/2,l=e.get("radius");null==l?l=[0,"100%"]:O(l)||(l=[0,l]),l=[Rl(l[0],s),Rl(l[1],s)],r.inverse?r.setExtent(l[1],l[0]):r.setExtent(l[0],l[1])}(i,t,s),l.push(i),(t.coordinateSystem=i).model=t}),i.eachSeries(function(t){if("polar"===t.get("coordinateSystem")){var e=i.queryComponents({mainType:"polar",index:t.get("polarIndex"),id:t.get("polarId")})[0];t.coordinateSystem=e.coordinateSystem}}),l}});var PT=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function NT(t,e,i){e[1]>e[0]&&(e=e.slice().reverse());var n=t.coordToPoint([e[0],i]),o=t.coordToPoint([e[1],i]);return{x1:n[0],y1:n[1],x2:o[0],y2:o[1]}}function OT(t){return t.getRadiusAxis().inverse?0:1}function ET(t){var e=t[0],i=t[t.length-1];e&&i&&Math.abs(Math.abs(e.coord-i.coord)-360)<1e-4&&t.pop()}pv.extend({type:"angleAxis",axisPointerClass:"PolarAxisPointer",render:function(e,t){if(this.group.removeAll(),e.get("show")){var i=e.axis,n=i.polar,o=n.getRadiusAxis().getExtent(),a=i.getTicksCoords(),r=i.getMinorTicksCoords(),s=N(i.getViewLabels(),function(t){return(t=L(t)).coord=i.dataToCoord(t.tickValue),t});ET(s),ET(a),E(PT,function(t){!e.get(t+".show")||i.scale.isBlank()&&"axisLine"!==t||this["_"+t](e,n,a,r,o,s)},this)}},_axisLine:function(t,e,i,n,o){var a,r=t.getModel("axisLine.lineStyle"),s=OT(e),l=s?0:1;(a=0===o[l]?new Yr({shape:{cx:e.cx,cy:e.cy,r:o[s]},style:r.getLineStyle(),z2:1,silent:!0}):new Kr({shape:{cx:e.cx,cy:e.cy,r:o[s],r0:o[l]},style:r.getLineStyle(),z2:1,silent:!0})).style.fill=null,this.group.add(a)},_axisTick:function(t,e,i,n,o){var a=t.getModel("axisTick"),r=(a.get("inside")?-1:1)*a.get("length"),s=o[OT(e)],l=N(i,function(t){return new ls({shape:NT(e,[s,s+r],t.coord)})});this.group.add(Es(l,{style:D(a.getModel("lineStyle").getLineStyle(),{stroke:t.get("axisLine.lineStyle.color")})}))},_minorTick:function(t,e,i,n,o){if(n.length){for(var a=t.getModel("axisTick"),r=t.getModel("minorTick"),s=(a.get("inside")?-1:1)*r.get("length"),l=o[OT(e)],u=[],h=0;h<n.length;h++)for(var c=0;c<n[h].length;c++)u.push(new ls({shape:NT(e,[l,l+s],n[h][c].coord)}));this.group.add(Es(u,{style:D(r.getModel("lineStyle").getLineStyle(),D(a.getLineStyle(),{stroke:t.get("axisLine.lineStyle.color")}))}))}},_axisLabel:function(c,d,t,e,f,i){var p=c.getCategories(!0),g=c.getModel("axisLabel"),m=g.get("margin"),v=c.get("triggerEvent");E(i,function(t,e){var i=g,n=t.tickValue,o=f[OT(d)],a=d.coordToPoint([o+m,t.coord]),r=d.cx,s=d.cy,l=Math.abs(a[0]-r)/o<.3?"center":a[0]>r?"left":"right",u=Math.abs(a[1]-s)/o<.3?"middle":a[1]>s?"top":"bottom";p&&p[n]&&p[n].textStyle&&(i=new Cl(p[n].textStyle,g,g.ecModel));var h=new Ur({silent:$m.isLabelSilent(c)});this.group.add(h),nl(h.style,i,{x:a[0],y:a[1],textFill:i.getTextColor()||c.get("axisLine.lineStyle.color"),text:t.formattedLabel,textAlign:l,textVerticalAlign:u}),v&&(h.eventData=$m.makeAxisEventDataBase(c),h.eventData.targetType="axisLabel",h.eventData.value=t.rawLabel)},this)},_splitLine:function(t,e,i,n,o){var a=t.getModel("splitLine").getModel("lineStyle"),r=a.get("color"),s=0;r=r instanceof Array?r:[r];for(var l=[],u=0;u<i.length;u++){var h=s++%r.length;l[h]=l[h]||[],l[h].push(new ls({shape:NT(e,o,i[u].coord)}))}for(u=0;u<l.length;u++)this.group.add(Es(l[u],{style:D({stroke:r[u%r.length]},a.getLineStyle()),silent:!0,z:t.get("z")}))},_minorSplitLine:function(t,e,i,n,o){if(n.length){for(var a=t.getModel("minorSplitLine").getModel("lineStyle"),r=[],s=0;s<n.length;s++)for(var l=0;l<n[s].length;l++)r.push(new ls({shape:NT(e,o,n[s][l].coord)}));this.group.add(Es(r,{style:a.getLineStyle(),silent:!0,z:t.get("z")}))}},_splitArea:function(t,e,i,n,o){if(i.length){var a=t.getModel("splitArea").getModel("areaStyle"),r=a.get("color"),s=0;r=r instanceof Array?r:[r];for(var l=[],u=Math.PI/180,h=-i[0].coord*u,c=Math.min(o[0],o[1]),d=Math.max(o[0],o[1]),f=t.get("clockwise"),p=1;p<i.length;p++){var g=s++%r.length;l[g]=l[g]||[],l[g].push(new qr({shape:{cx:e.cx,cy:e.cy,r0:c,r:d,startAngle:h,endAngle:-i[p].coord*u,clockwise:f},silent:!0})),h=-i[p].coord*u}for(p=0;p<l.length;p++)this.group.add(Es(l[p],{style:D({fill:r[p%r.length]},a.getAreaStyle()),silent:!0}))}}});var RT=["axisLine","axisTickLabel","axisName"],zT=["splitLine","splitArea","minorSplitLine"];pv.extend({type:"radiusAxis",axisPointerClass:"PolarAxisPointer",render:function(e,t){if(this.group.removeAll(),e.get("show")){var i=e.axis,n=i.polar,o=n.getAngleAxis(),a=i.getTicksCoords(),r=i.getMinorTicksCoords(),s=o.getExtent()[0],l=i.getExtent(),u=function(t,e,i){return{position:[t.cx,t.cy],rotation:i/180*Math.PI,labelDirection:-1,tickDirection:-1,nameDirection:1,labelRotate:e.getModel("axisLabel").get("rotate"),z2:1}}(n,e,s),h=new $m(e,u);E(RT,h.add,h),this.group.add(h.getGroup()),E(zT,function(t){e.get(t+".show")&&!i.scale.isBlank()&&this["_"+t](e,n,s,l,a,r)},this)}},_splitLine:function(t,e,i,n,o){var a=t.getModel("splitLine").getModel("lineStyle"),r=a.get("color"),s=0;r=r instanceof Array?r:[r];for(var l=[],u=0;u<o.length;u++){var h=s++%r.length;l[h]=l[h]||[],l[h].push(new Yr({shape:{cx:e.cx,cy:e.cy,r:o[u].coord}}))}for(u=0;u<l.length;u++)this.group.add(Es(l[u],{style:D({stroke:r[u%r.length],fill:null},a.getLineStyle()),silent:!0}))},_minorSplitLine:function(t,e,i,n,o,a){if(a.length){for(var r=t.getModel("minorSplitLine").getModel("lineStyle"),s=[],l=0;l<a.length;l++)for(var u=0;u<a[l].length;u++)s.push(new Yr({shape:{cx:e.cx,cy:e.cy,r:a[l][u].coord}}));this.group.add(Es(s,{style:D({fill:null},r.getLineStyle()),silent:!0}))}},_splitArea:function(t,e,i,n,o){if(o.length){var a=t.getModel("splitArea").getModel("areaStyle"),r=a.get("color"),s=0;r=r instanceof Array?r:[r];for(var l=[],u=o[0].coord,h=1;h<o.length;h++){var c=s++%r.length;l[c]=l[c]||[],l[c].push(new qr({shape:{cx:e.cx,cy:e.cy,r0:u,r:o[h].coord,startAngle:0,endAngle:2*Math.PI},silent:!0})),u=o[h].coord}for(h=0;h<l.length;h++)this.group.add(Es(l[h],{style:D({fill:r[h%r.length]},a.getAreaStyle()),silent:!0}))}}});var BT=vI.extend({makeElOption:function(t,e,i,n,o){var a=i.axis;"angle"===a.dim&&(this.animationThreshold=Math.PI/18);var r,s=a.polar,l=s.getOtherAxis(a).getExtent();r=a["dataTo"+fu(a.dim)](e);var u=n.get("type");if(u&&"none"!==u){var h=bI(n),c=VT[u](a,s,r,l,h);c.style=h,t.graphicKey=c.type,t.pointer=c}var d=n.get("label.margin");SI(t,i,n,o,function(t,e,i,n,o){var a=e.axis,r=a.dataToCoord(t),s=n.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l,u,h,c=n.getRadiusAxis().getExtent();if("radius"===a.dim){var d=ae();he(d,d,s),ue(d,d,[n.cx,n.cy]),l=pl([r,-o],d);var f=e.getModel("axisLabel").get("rotate")||0,p=$m.innerTextLayout(s,f*Math.PI/180,-1);u=p.textAlign,h=p.textVerticalAlign}else{var g=c[1];l=n.coordToPoint([g+o,r]);var m=n.cx,v=n.cy;u=Math.abs(l[0]-m)/g<.3?"center":l[0]>m?"left":"right",h=Math.abs(l[1]-v)/g<.3?"middle":l[1]>v?"top":"bottom"}return{position:l,align:u,verticalAlign:h}}(e,i,0,s,d))}});var VT={line:function(t,e,i,n,o){return"angle"===t.dim?{type:"Line",shape:AI(e.coordToPoint([n[0],i]),e.coordToPoint([n[1],i]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r:i}}},shadow:function(t,e,i,n,o){var a=Math.max(1,t.getBandWidth()),r=Math.PI/180;return"angle"===t.dim?{type:"Sector",shape:CI(e.cx,e.cy,n[0],n[1],(-i-a/2)*r,(a/2-i)*r)}:{type:"Sector",shape:CI(e.cx,e.cy,i-a/2,i+a/2,0,2*Math.PI)}}};function GT(n,t){t.update="updateView",xf(t,function(t,e){var i={};return e.eachComponent({mainType:"geo",query:t},function(e){e[n](t.name),E(e.coordinateSystem.regions,function(t){i[t.name]=e.isSelected(t.name)||!1})}),{selected:i,name:t.name}})}pv.registerAxisPointerClass("PolarAxisPointer",BT),wf(T(function(t,e,i){var N={},O=function(t){var g={};E(t,function(t,e){var i=t.getData(),n=t.coordinateSystem,o=n.getBaseAxis(),a=bT(n,o),r=o.getExtent(),s="category"===o.type?o.getBandWidth():Math.abs(r[1]-r[0])/i.count(),l=g[a]||{bandWidth:s,remainedWidth:s,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},u=l.stacks;g[a]=l;var h=wT(t);u[h]||l.autoWidthCount++,u[h]=u[h]||{width:0,maxWidth:0};var c=Rl(t.get("barWidth"),s),d=Rl(t.get("barMaxWidth"),s),f=t.get("barGap"),p=t.get("barCategoryGap");c&&!u[h].width&&(c=Math.min(l.remainedWidth,c),u[h].width=c,l.remainedWidth-=c),d&&(u[h].maxWidth=d),null!=f&&(l.gap=f),null!=p&&(l.categoryGap=p)});var d={};return E(g,function(t,i){d[i]={};var e=t.stacks,n=t.bandWidth,o=Rl(t.categoryGap,n),a=Rl(t.gap,1),r=t.remainedWidth,s=t.autoWidthCount,l=(r-o)/(s+(s-1)*a);l=Math.max(l,0),E(e,function(t,e){var i=t.maxWidth;i&&i<l&&(i=Math.min(i,r),t.width&&(i=Math.min(i,t.width)),r-=i,t.width=i,s--)}),l=(r-o)/(s+(s-1)*a),l=Math.max(l,0);var u,h=0;E(e,function(t,e){t.width||(t.width=l),h+=(u=t).width*(1+a)}),u&&(h-=u.width*a);var c=-h/2;E(e,function(t,e){d[i][e]=d[i][e]||{offset:c,width:t.width},c+=t.width*(1+a)})}),d}(M(e.getSeriesByType(t),function(t){return!e.isSeriesFiltered(t)&&t.coordinateSystem&&"polar"===t.coordinateSystem.type}));e.eachSeriesByType(t,function(t){if("polar"===t.coordinateSystem.type){var e=t.getData(),i=t.coordinateSystem,n=i.getBaseAxis(),o=bT(i,n),a=wT(t),r=O[o][a],s=r.offset,l=r.width,u=i.getOtherAxis(n),h=t.coordinateSystem.cx,c=t.coordinateSystem.cy,d=t.get("barMinHeight")||0,f=t.get("barMinAngle")||0;N[a]=N[a]||[];for(var p=e.mapDimension(u.dim),g=e.mapDimension(n.dim),m=dp(e,p),v="radius"!==n.dim||!t.get("roundCap",!0),y=u.getExtent()[0],x=0,_=e.count();x<_;x++){var w,b,S,M,I=e.get(p,x),T=e.get(g,x),A=0<=I?"p":"n",D=y;if(m&&(N[a][T]||(N[a][T]={p:y,n:y}),D=N[a][T][A]),"radius"===u.dim){var C=u.dataToRadius(I)-y,L=n.dataToAngle(T);Math.abs(C)<d&&(C=(C<0?-1:1)*d),b=(w=D)+C,M=(S=L-s)-l,m&&(N[a][T][A]=b)}else{var k=u.dataToAngle(I,v)-y,P=n.dataToRadius(T);Math.abs(k)<f&&(k=(k<0?-1:1)*f),b=(w=P+s)+l,M=(S=D)+k,m&&(N[a][T][A]=M)}e.setItemLayout(x,{cx:h,cy:c,r0:w,r:b,startAngle:-S*Math.PI/180,endAngle:-M*Math.PI/180})}}},this)},"bar")),Tf({type:"polar"}),b(Lu.extend({type:"geo",coordinateSystem:null,layoutMode:"box",init:function(t){Lu.prototype.init.apply(this,arguments),Go(t,"label",["show"])},optionUpdated:function(){var t=this.option,i=this;t.regions=dx.getFilledRegions(t.regions,t.map,t.nameMap),this._optionModelMap=S(t.regions||[],function(t,e){return e.name&&t.set(e.name,new Cl(e,i)),t},Q()),this.updateSelectedMap(t.regions)},defaultOption:{zlevel:0,z:0,show:!0,left:"center",top:"center",aspectScale:null,silent:!1,map:"",boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",color:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},regions:[]},getRegionModel:function(t){return this._optionModelMap.get(t)||new Cl(null,this,this.ecModel)},getFormattedLabel:function(t,e){var i=this.getRegionModel(t).get("label"+("normal"===e?".":e+".")+"formatter"),n={name:t};return"function"==typeof i?(n.status=e,i(n)):"string"==typeof i?i.replace("{a}",null!=t?t:""):void 0},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t}}),Xv),Tf({type:"geo",init:function(t,e){var i=new Jy(e,!0);this._mapDraw=i,this.group.add(i.group)},render:function(t,e,i,n){if(!n||"geoToggleSelect"!==n.type||n.from!==this.uid){var o=this._mapDraw;t.get("show")?o.draw(t,e,i,this,n):this._mapDraw.group.removeAll(),this.group.silent=t.get("silent")}},dispose:function(){this._mapDraw&&this._mapDraw.remove()}}),GT("toggleSelected",{type:"geoToggleSelect",event:"geoselectchanged"}),GT("select",{type:"geoSelect",event:"geoselected"}),GT("unSelect",{type:"geoUnSelect",event:"geounselected"});function FT(t,e,i){this._model=t}function WT(t,e,i,n){var o=i.calendarModel,a=i.seriesModel,r=o?o.coordinateSystem:a?a.coordinateSystem:null;return r===this?r[t](n):null}FT.prototype={constructor:FT,type:"calendar",dimensions:["time","value"],getDimensionsInfo:function(){return[{name:"time",type:"time"},"value"]},getRangeInfo:function(){return this._rangeInfo},getModel:function(){return this._model},getRect:function(){return this._rect},getCellWidth:function(){return this._sw},getCellHeight:function(){return this._sh},getOrient:function(){return this._orient},getFirstDayOfWeek:function(){return this._firstDayOfWeek},getDateInfo:function(t){var e=(t=Yl(t)).getFullYear(),i=t.getMonth()+1;i=i<10?"0"+i:i;var n=t.getDate();n=n<10?"0"+n:n;var o=t.getDay();return{y:e,m:i,d:n,day:o=Math.abs((o+7-this.getFirstDayOfWeek())%7),time:t.getTime(),formatedDate:e+"-"+i+"-"+n,date:t}},getNextNDay:function(t,e){return 0===(e=e||0)||(t=new Date(this.getDateInfo(t).time)).setDate(t.getDate()+e),this.getDateInfo(t)},update:function(t,e){this._firstDayOfWeek=+this._model.getModel("dayLabel").get("firstDay"),this._orient=this._model.get("orient"),this._lineWidth=this._model.getModel("itemStyle").getItemStyle().lineWidth||0,this._rangeInfo=this._getRangeInfo(this._initRangeOption());var i=this._rangeInfo.weeks||1,n=["width","height"],o=this._model.get("cellSize").slice(),a=this._model.getBoxLayoutParams(),r="horizontal"===this._orient?[i,7]:[7,i];E([0,1],function(t){u(o,t)&&(a[n[t]]=o[t]*r[t])});var s={width:e.getWidth(),height:e.getHeight()},l=this._rect=wu(a,s);function u(t,e){return null!=t[e]&&"auto"!==t[e]}E([0,1],function(t){u(o,t)||(o[t]=l[n[t]]/r[t])}),this._sw=o[0],this._sh=o[1]},dataToPoint:function(t,e){O(t)&&(t=t[0]),null==e&&(e=!0);var i=this.getDateInfo(t),n=this._rangeInfo,o=i.formatedDate;if(e&&!(i.time>=n.start.time&&i.time<n.end.time+864e5))return[NaN,NaN];var a=i.day,r=this._getRangeInfo([n.start.time,o]).nthWeek;return"vertical"===this._orient?[this._rect.x+a*this._sw+this._sw/2,this._rect.y+r*this._sh+this._sh/2]:[this._rect.x+r*this._sw+this._sw/2,this._rect.y+a*this._sh+this._sh/2]},pointToData:function(t){var e=this.pointToDate(t);return e&&e.time},dataToRect:function(t,e){var i=this.dataToPoint(t,e);return{contentShape:{x:i[0]-(this._sw-this._lineWidth)/2,y:i[1]-(this._sh-this._lineWidth)/2,width:this._sw-this._lineWidth,height:this._sh-this._lineWidth},center:i,tl:[i[0]-this._sw/2,i[1]-this._sh/2],tr:[i[0]+this._sw/2,i[1]-this._sh/2],br:[i[0]+this._sw/2,i[1]+this._sh/2],bl:[i[0]-this._sw/2,i[1]+this._sh/2]}},pointToDate:function(t){var e=Math.floor((t[0]-this._rect.x)/this._sw)+1,i=Math.floor((t[1]-this._rect.y)/this._sh)+1,n=this._rangeInfo.range;return"vertical"===this._orient?this._getDateByWeeksAndDay(i,e-1,n):this._getDateByWeeksAndDay(e,i-1,n)},convertToPixel:T(WT,"dataToPoint"),convertFromPixel:T(WT,"pointToData"),_initRangeOption:function(){var t=this._model.get("range"),e=t;if(O(e)&&1===e.length&&(e=e[0]),/^\d{4}$/.test(e)&&(t=[e+"-01-01",e+"-12-31"]),/^\d{4}[\/|-]\d{1,2}$/.test(e)){var i=this.getDateInfo(e),n=i.date;n.setMonth(n.getMonth()+1);var o=this.getNextNDay(n,-1);t=[i.formatedDate,o.formatedDate]}/^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(e)&&(t=[e,e]);var a=this._getRangeInfo(t);return a.start.time>a.end.time&&t.reverse(),t},_getRangeInfo:function(t){var e;(t=[this.getDateInfo(t[0]),this.getDateInfo(t[1])])[0].time>t[1].time&&(e=!0,t.reverse());var i=Math.floor(t[1].time/864e5)-Math.floor(t[0].time/864e5)+1,n=new Date(t[0].time),o=n.getDate(),a=t[1].date.getDate();if(n.setDate(o+i-1),n.getDate()!==a)for(var r=0<n.getTime()-t[1].time?1:-1;n.getDate()!==a&&0<(n.getTime()-t[1].time)*r;)i-=r,n.setDate(o+i-1);var s=Math.floor((i+t[0].day+6)/7),l=e?1-s:s-1;return e&&t.reverse(),{range:[t[0].formatedDate,t[1].formatedDate],start:t[0],end:t[1],allDay:i,weeks:s,nthWeek:l,fweek:t[0].day,lweek:t[1].day}},_getDateByWeeksAndDay:function(t,e,i){var n=this._getRangeInfo(i);if(t>n.weeks||0===t&&e<n.fweek||t===n.weeks&&e>n.lweek)return!1;var o=7*(t-1)-n.fweek+e,a=new Date(n.start.time);return a.setDate(n.start.d+o),this.getDateInfo(a)}},FT.dimensions=FT.prototype.dimensions,FT.getDimensionsInfo=FT.prototype.getDimensionsInfo,FT.create=function(i,n){var o=[];return i.eachComponent("calendar",function(t){var e=new FT(t,i,n);o.push(e),t.coordinateSystem=e}),i.eachSeries(function(t){"calendar"===t.get("coordinateSystem")&&(t.coordinateSystem=o[t.get("calendarIndex")||0])}),o},sh.register("calendar",FT);var HT=Lu.extend({type:"calendar",coordinateSystem:null,defaultOption:{zlevel:0,z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#ccc"},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",nameMap:"en",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",nameMap:"en",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},init:function(t,e,i,n){var o=Mu(t);HT.superApply(this,"init",arguments),ZT(t,o)},mergeOption:function(t,e){HT.superApply(this,"mergeOption",arguments),ZT(this.option,t)}});function ZT(t,e){var i=t.cellSize;O(i)?1===i.length&&(i[1]=i[0]):i=t.cellSize=[i,i];var n=N([0,1],function(t){return function(t,e){return null!=t[yu[e][0]]||null!=t[yu[e][1]]&&null!=t[yu[e][2]]}(e,t)&&(i[t]="auto"),null!=i[t]&&"auto"!==i[t]});Su(t,e,{type:"box",ignoreSize:n})}var UT={EN:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],CN:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},XT={EN:["S","M","T","W","T","F","S"],CN:["日","一","二","三","四","五","六"]};Tf({type:"calendar",_tlpoints:null,_blpoints:null,_firstDayOfMonth:null,_firstDayPoints:null,render:function(t,e,i){var n=this.group;n.removeAll();var o=t.coordinateSystem,a=o.getRangeInfo(),r=o.getOrient();this._renderDayRect(t,a,n),this._renderLines(t,a,r,n),this._renderYearText(t,a,r,n),this._renderMonthText(t,r,n),this._renderWeekText(t,a,r,n)},_renderDayRect:function(t,e,i){for(var n=t.coordinateSystem,o=t.getModel("itemStyle").getItemStyle(),a=n.getCellWidth(),r=n.getCellHeight(),s=e.start.time;s<=e.end.time;s=n.getNextNDay(s,1).time){var l=n.dataToRect([s],!1).tl,u=new rs({shape:{x:l[0],y:l[1],width:a,height:r},cursor:"default",style:o});i.add(u)}},_renderLines:function(i,t,n,o){var a=this,r=i.coordinateSystem,s=i.getModel("splitLine.lineStyle").getLineStyle(),l=i.get("splitLine.show"),e=s.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var u=t.start,h=0;u.time<=t.end.time;h++){d(u.formatedDate),0===h&&(u=r.getDateInfo(t.start.y+"-"+t.start.m));var c=u.date;c.setMonth(c.getMonth()+1),u=r.getDateInfo(c)}function d(t){a._firstDayOfMonth.push(r.getDateInfo(t)),a._firstDayPoints.push(r.dataToRect([t],!1).tl);var e=a._getLinePointsOfOneWeek(i,t,n);a._tlpoints.push(e[0]),a._blpoints.push(e[e.length-1]),l&&a._drawSplitline(e,s,o)}d(r.getNextNDay(t.end.time,1).formatedDate),l&&this._drawSplitline(a._getEdgesPoints(a._tlpoints,e,n),s,o),l&&this._drawSplitline(a._getEdgesPoints(a._blpoints,e,n),s,o)},_getEdgesPoints:function(t,e,i){var n=[t[0].slice(),t[t.length-1].slice()],o="horizontal"===i?0:1;return n[0][o]=n[0][o]-e/2,n[1][o]=n[1][o]+e/2,n},_drawSplitline:function(t,e,i){var n=new ts({z2:20,shape:{points:t},style:e});i.add(n)},_getLinePointsOfOneWeek:function(t,e,i){var n=t.coordinateSystem;e=n.getDateInfo(e);for(var o=[],a=0;a<7;a++){var r=n.getNextNDay(e.time,a),s=n.dataToRect([r.time],!1);o[2*r.day]=s.tl,o[2*r.day+1]=s["horizontal"===i?"bl":"tr"]}return o},_formatterLabel:function(t,e){return"string"==typeof t&&t?uu(t,e):"function"==typeof t?t(e):e.nameMap},_yearTextPositionControl:function(t,e,i,n,o){e=e.slice();var a=["center","bottom"];"bottom"===n?(e[1]+=o,a=["center","top"]):"left"===n?e[0]-=o:"right"===n?(e[0]+=o,a=["center","top"]):e[1]-=o;var r=0;return"left"!==n&&"right"!==n||(r=Math.PI/2),{rotation:r,position:e,style:{textAlign:a[0],textVerticalAlign:a[1]}}},_renderYearText:function(t,e,i,n){var o=t.getModel("yearLabel");if(o.get("show")){var a=o.get("margin"),r=o.get("position");r=r||("horizontal"!==i?"top":"left");var s=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],l=(s[0][0]+s[1][0])/2,u=(s[0][1]+s[1][1])/2,h="horizontal"===i?0:1,c={top:[l,s[h][1]],bottom:[l,s[1-h][1]],left:[s[1-h][0],u],right:[s[h][0],u]},d=e.start.y;+e.end.y>+e.start.y&&(d=d+"-"+e.end.y);var f=o.get("formatter"),p={start:e.start.y,end:e.end.y,nameMap:d},g=this._formatterLabel(f,p),m=new Ur({z2:30});nl(m.style,o,{text:g}),m.attr(this._yearTextPositionControl(m,c[r],i,r,a)),n.add(m)}},_monthTextPositionControl:function(t,e,i,n,o){var a="left",r="top",s=t[0],l=t[1];return"horizontal"===i?(l+=o,e&&(a="center"),"start"===n&&(r="bottom")):(s+=o,e&&(r="middle"),"start"===n&&(a="right")),{x:s,y:l,textAlign:a,textVerticalAlign:r}},_renderMonthText:function(t,e,i){var n=t.getModel("monthLabel");if(n.get("show")){var o=n.get("nameMap"),a=n.get("margin"),r=n.get("position"),s=n.get("align"),l=[this._tlpoints,this._blpoints];R(o)&&(o=UT[o.toUpperCase()]||[]);var u="start"===r?0:1,h="horizontal"===e?0:1;a="start"===r?-a:a;for(var c="center"===s,d=0;d<l[u].length-1;d++){var f=l[u][d].slice(),p=this._firstDayOfMonth[d];if(c){var g=this._firstDayPoints[d];f[h]=(g[h]+l[0][d+1][h])/2}var m=n.get("formatter"),v=o[+p.m-1],y={yyyy:p.y,yy:(p.y+"").slice(2),MM:p.m,M:+p.m,nameMap:v},x=this._formatterLabel(m,y),_=new Ur({z2:30});k(nl(_.style,n,{text:x}),this._monthTextPositionControl(f,c,e,r,a)),i.add(_)}}},_weekTextPositionControl:function(t,e,i,n,o){var a="center",r="middle",s=t[0],l=t[1],u="start"===i;return"horizontal"===e?(s=s+n+(u?1:-1)*o[0]/2,a=u?"right":"left"):(l=l+n+(u?1:-1)*o[1]/2,r=u?"bottom":"top"),{x:s,y:l,textAlign:a,textVerticalAlign:r}},_renderWeekText:function(t,e,i,n){var o=t.getModel("dayLabel");if(o.get("show")){var a=t.coordinateSystem,r=o.get("position"),s=o.get("nameMap"),l=o.get("margin"),u=a.getFirstDayOfWeek();R(s)&&(s=XT[s.toUpperCase()]||[]);var h=a.getNextNDay(e.end.time,7-e.lweek).time,c=[a.getCellWidth(),a.getCellHeight()];l=Rl(l,c["horizontal"===i?0:1]),"start"===r&&(h=a.getNextNDay(e.start.time,-(7+e.fweek)).time,l=-l);for(var d=0;d<7;d++){var f,p=a.getNextNDay(h,d),g=a.dataToRect([p.time],!1).center;f=Math.abs((d+u)%7);var m=new Ur({z2:30});k(nl(m.style,o,{text:s[f]}),this._weekTextPositionControl(g,i,r,l,c)),n.add(m)}}}});var YT={path:null,compoundPath:null,group:Ci,image:Qn,text:Ur};vf(function(t){var e=t.graphic;O(e)?e[0]&&e[0].elements?t.graphic=[t.graphic[0]]:t.graphic=[{elements:e}]:e&&!e.elements&&(t.graphic=[{elements:[e]}])});var jT=If({type:"graphic",defaultOption:{elements:[],parentId:null},_elOptionsToUpdate:null,mergeOption:function(t){var e=this.option.elements;this.option.elements=null,jT.superApply(this,"mergeOption",arguments),this.option.elements=e},optionUpdated:function(t,e){var i=this.option,n=(e?i:t).elements,o=i.elements=e?[]:i.elements,a=[];this._flatten(n,a);var r=Ho(o,a);Zo(r);var s=this._elOptionsToUpdate=[];E(r,function(t,e){var i=t.option;i&&(s.push(i),function(t,e){var i=t.exist;if(e.id=t.keyInfo.id,!e.type&&i&&(e.type=i.type),null==e.parentId){var n=e.parentOption;n?e.parentId=n.id:i&&(e.parentId=i.parentId)}e.parentOption=null}(t,i),function(t,e,i){var n=k({},i),o=t[e],a=i.$action||"merge";"merge"===a?o?(m(o,n,!0),Su(o,n,{ignoreSize:!0}),Iu(i,o)):t[e]=n:"replace"===a?t[e]=n:"remove"===a&&o&&(t[e]=null)}(o,e,i),function(t,e){if(!t)return;t.hv=e.hv=[$T(e,["left","right"]),$T(e,["top","bottom"])],"group"===t.type&&(null==t.width&&(t.width=e.width=0),null==t.height&&(t.height=e.height=0))}(o[e],i))},this);for(var l=o.length-1;0<=l;l--)null==o[l]?o.splice(l,1):delete o[l].$action},_flatten:function(t,i,n){E(t,function(t){if(t){n&&(t.parentOption=n),i.push(t);var e=t.children;"group"===t.type&&e&&this._flatten(e,i,t),delete t.children}},this)},useElOptionsToUpdate:function(){var t=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,t}});function qT(t,e,i,n){var o=i.type,a=new(YT.hasOwnProperty(o)?YT[o]:ks(o))(i);e.add(a),n.set(t,a),a.__ecGraphicId=t}function KT(t,e){var i=t&&t.parent;i&&("group"===t.type&&t.traverse(function(t){KT(t,e)}),e.removeKey(t.__ecGraphicId),i.remove(t))}function $T(e,t){var i;return E(t,function(t){null!=e[t]&&"auto"!==e[t]&&(i=!0)}),i}Tf({type:"graphic",init:function(t,e){this._elMap=Q(),this._lastGraphicModel},render:function(t,e,i){t!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=t,this._updateElements(t),this._relocate(t,i)},_updateElements:function(u){var t=u.useElOptionsToUpdate();if(t){var h=this._elMap,c=this.group;E(t,function(t){var e=t.$action,i=t.id,n=h.get(i),o=t.parentId,a=null!=o?h.get(o):c,r=t.style;"text"===t.type&&r&&(t.hv&&t.hv[1]&&(r.textVerticalAlign=r.textBaseline=null),!r.hasOwnProperty("textFill")&&r.fill&&(r.textFill=r.fill),!r.hasOwnProperty("textStroke")&&r.stroke&&(r.textStroke=r.stroke));var s=function(e){return e=k({},e),E(["id","parentId","$action","hv","bounding"].concat(vu),function(t){delete e[t]}),e}(t);e&&"merge"!==e?"replace"===e?(KT(n,h),qT(i,a,s,h)):"remove"===e&&KT(n,h):n?n.attr(s):qT(i,a,s,h);var l=h.get(i);l&&(l.__ecGraphicWidthOption=t.width,l.__ecGraphicHeightOption=t.height,function(t,e){var i=t.eventData;t.silent||t.ignore||i||(i=t.eventData={componentType:"graphic",componentIndex:e.componentIndex,name:t.name});i&&(i.info=t.info)}(l,u))})}},_relocate:function(t,e){for(var i=t.option.elements,n=this.group,o=this._elMap,a=e.getWidth(),r=e.getHeight(),s=0;s<i.length;s++){var l=i[s];if((h=o.get(l.id))&&h.isGroup){var u=(c=h.parent)===n;h.__ecGraphicWidth=Rl(h.__ecGraphicWidthOption,u?a:c.__ecGraphicWidth)||0,h.__ecGraphicHeight=Rl(h.__ecGraphicHeightOption,u?r:c.__ecGraphicHeight)||0}}for(s=i.length-1;0<=s;s--){var h,c;l=i[s];if(h=o.get(l.id))bu(h,l,(c=h.parent)===n?{width:a,height:r}:{width:c.__ecGraphicWidth,height:c.__ecGraphicHeight},null,{hv:l.hv,boundingMode:l.bounding})}},_clear:function(){var e=this._elMap;e.each(function(t){KT(t,e)}),this._elMap=Q()},dispose:function(){this._clear()}});var JT={};function QT(t,e){JT[t]=e}function tA(t){return JT[t]}var eA=If({type:"toolbox",layoutMode:{type:"box",ignoreSize:!0},optionUpdated:function(){eA.superApply(this,"optionUpdated",arguments),E(this.option.feature,function(t,e){var i=tA(e);i&&m(t,i.defaultOption)})},defaultOption:{show:!0,z:6,zlevel:0,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}},tooltip:{show:!1}}});function iA(t,e){var i=iu(e.get("padding")),n=e.getItemStyle(["color","opacity"]);return n.fill=e.get("backgroundColor"),t=new rs({shape:{x:t.x-i[3],y:t.y-i[0],width:t.width+i[1]+i[3],height:t.height+i[0]+i[2],r:e.get("borderRadius")},style:n,silent:!0,z2:-1})}Tf({type:"toolbox",render:function(h,c,d,l){var f=this.group;if(f.removeAll(),h.get("show")){var p=+h.get("itemSize"),u=h.get("feature")||{},g=this._features||(this._features={}),m=[];E(u,function(t,e){m.push(e)}),new Lf(this._featureNames||[],m).add(t).update(t).remove(T(t,null)).execute(),this._featureNames=m,function(t,e,i){var n=e.getBoxLayoutParams(),o=e.get("padding"),a={width:i.getWidth(),height:i.getHeight()},r=wu(n,a,o);_u(e.get("orient"),t,e.get("itemGap"),r.width,r.height),bu(t,n,a,o)}(f,h,d),f.add(iA(f.getBoundingRect(),h)),f.eachChild(function(t){var e=t.__title,i=t.hoverStyle;if(i&&e){var n=gn(e,An(i)),o=t.position[0]+f.position[0],a=!1;t.position[1]+f.position[1]+p+n.height>d.getHeight()&&(i.textPosition="top",a=!0);var r=a?-5-n.height:p+8;o+n.width/2>d.getWidth()?(i.textPosition=["100%",r],i.textAlign="right"):o-n.width/2<0&&(i.textPosition=[0,r],i.textAlign="left")}})}function t(t,e){var i,n=m[t],o=m[e],a=u[n],r=new Cl(a,h,h.ecModel);if(l&&null!=l.newTitle&&(a.title=l.newTitle),n&&!o){if(function(t){return 0===t.indexOf("my")}(n))i={model:r,onclick:r.option.onclick,featureName:n};else{var s=tA(n);if(!s)return;i=new s(r,c,d)}g[n]=i}else{if(!(i=g[o]))return;i.model=r,i.ecModel=c,i.api=d}n||!o?r.get("show")&&!i.unusable?(function(o,a,t){var r=o.getModel("iconStyle"),s=o.getModel("emphasis.iconStyle"),e=a.getIcons?a.getIcons():o.get("icon"),l=o.get("title")||{};if("string"==typeof e){var i=e,n=l;l={},(e={})[t]=i,l[t]=n}var u=o.iconPaths={};E(e,function(t,e){var i=yl(t,{},{x:-p/2,y:-p/2,width:p,height:p});i.setStyle(r.getItemStyle()),i.hoverStyle=s.getItemStyle(),i.setStyle({text:l[e],textAlign:s.get("textAlign"),textBorderRadius:s.get("textBorderRadius"),textPadding:s.get("textPadding"),textFill:null});var n=h.getModel("tooltip");n&&n.get("show")&&i.attr("tooltip",k({content:l[e],formatter:n.get("formatter",!0)||function(){return l[e]},formatterParams:{componentType:"toolbox",name:e,title:l[e],$vars:["name","title"]},position:n.get("position",!0)||"bottom"},n.option)),$s(i),h.get("showTitle")&&(i.__title=l[e],i.on("mouseover",function(){var t=s.getItemStyle(),e="vertical"===h.get("orient")?null==h.get("right")?"right":"left":null==h.get("bottom")?"bottom":"top";i.setStyle({textFill:s.get("textFill")||t.fill||t.stroke||"#000",textBackgroundColor:s.get("textBackgroundColor"),textPosition:s.get("textPosition")||e})}).on("mouseout",function(){i.setStyle({textFill:null,textBackgroundColor:null})})),i.trigger(o.get("iconStatus."+e)||"normal"),f.add(i),i.on("click",A(a.onclick,a,c,d,e)),u[e]=i})}(r,i,n),r.setIconStatus=function(t,e){var i=this.option,n=this.iconPaths;i.iconStatus=i.iconStatus||{},i.iconStatus[t]=e,n[t]&&n[t].trigger(e)},i.render&&i.render(r,c,d,l)):i.remove&&i.remove(c,d):i.dispose&&i.dispose(c,d)}},updateView:function(t,e,i,n){E(this._features,function(t){t.updateView&&t.updateView(t.model,e,i,n)})},remove:function(e,i){E(this._features,function(t){t.remove&&t.remove(e,i)}),this.group.removeAll()},dispose:function(e,i){E(this._features,function(t){t.dispose&&t.dispose(e,i)})}});var nA=Nc.toolbox.saveAsImage;function oA(t){this.model=t}oA.defaultOption={show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:nA.title,type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],pixelRatio:1,lang:nA.lang.slice()},oA.prototype.unusable=!v.canvasSupported,oA.prototype.onclick=function(t,e){var i=this.model,n=i.get("name")||t.get("title.0.text")||"echarts",o=i.get("type",!0)||"png",a=e.getConnectedDataURL({type:o,backgroundColor:i.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",connectedBackgroundColor:i.get("connectedBackgroundColor"),excludeComponents:i.get("excludeComponents"),pixelRatio:i.get("pixelRatio")});if("function"!=typeof MouseEvent||v.browser.ie||v.browser.edge)if(window.navigator.msSaveOrOpenBlob){for(var r=atob(a.split(",")[1]),s=r.length,l=new Uint8Array(s);s--;)l[s]=r.charCodeAt(s);var u=new Blob([l]);window.navigator.msSaveOrOpenBlob(u,n+"."+o)}else{var h=i.get("lang"),c='<body style="margin:0;"><img src="'+a+'" style="max-width:100%;" title="'+(h&&h[0]||"")+'" /></body>';window.open().document.write(c)}else{var d=document.createElement("a");d.download=n+"."+o,d.target="_blank",d.href=a;var f=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!1});d.dispatchEvent(f)}},QT("saveAsImage",oA);var aA=Nc.toolbox.magicType,rA="__ec_magicType_stack__";function sA(t){this.model=t}sA.defaultOption={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:L(aA.title),option:{},seriesIndex:{}};var lA=sA.prototype;lA.getIcons=function(){var t=this.model,e=t.get("icon"),i={};return E(t.get("type"),function(t){e[t]&&(i[t]=e[t])}),i};var uA={line:function(t,e,i,n){if("bar"===t)return m({id:e,type:"line",data:i.get("data"),stack:i.get("stack"),markPoint:i.get("markPoint"),markLine:i.get("markLine")},n.get("option.line")||{},!0)},bar:function(t,e,i,n){if("line"===t)return m({id:e,type:"bar",data:i.get("data"),stack:i.get("stack"),markPoint:i.get("markPoint"),markLine:i.get("markLine")},n.get("option.bar")||{},!0)},stack:function(t,e,i,n){var o=i.get("stack")===rA;if("line"===t||"bar"===t)return n.setIconStatus("stack",o?"normal":"emphasis"),m({id:e,stack:o?"":rA},n.get("option.stack")||{},!0)}},hA=[["line","bar"],["stack"]];lA.onclick=function(u,t,h){var c=this.model,e=c.get("seriesIndex."+h);if(uA[h]){var i,d={series:[]};if(E(hA,function(t){0<=_(t,h)&&E(t,function(t){c.setIconStatus(t,"normal")})}),c.setIconStatus(h,"emphasis"),u.eachComponent({mainType:"series",query:null==e?null:{seriesIndex:e}},function(t){var e=t.subType,i=t.id,n=uA[h](e,i,t,c);n&&(D(n,t.option),d.series.push(n));var o=t.coordinateSystem;if(o&&"cartesian2d"===o.type&&("line"===h||"bar"===h)){var a=o.getAxesByScale("ordinal")[0];if(a){var r=a.dim+"Axis",s=u.queryComponents({mainType:r,index:t.get(name+"Index"),id:t.get(name+"Id")})[0].componentIndex;d[r]=d[r]||[];for(var l=0;l<=s;l++)d[r][s]=d[r][s]||{};d[r][s].boundaryGap="bar"===h}}}),"stack"===h)i=d.series&&d.series[0]&&d.series[0].stack===rA?m({stack:aA.title.tiled},aA.title):L(aA.title);t.dispatchAction({type:"changeMagicType",currentType:h,newOption:d,newTitle:i})}},xf({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(t,e){e.mergeOption(t.newOption)}),QT("magicType",sA);var cA=Nc.toolbox.dataView,dA=new Array(60).join("-"),fA="\t";function pA(t){var e=function(t){var o={},a=[],r=[];return t.eachRawSeries(function(t){var e=t.coordinateSystem;if(!e||"cartesian2d"!==e.type&&"polar"!==e.type)a.push(t);else{var i=e.getBaseAxis();if("category"===i.type){var n=i.dim+"_"+i.index;o[n]||(o[n]={categoryAxis:i,valueAxis:e.getOtherAxis(i),series:[]},r.push({axisDim:i.dim,axisIndex:i.index})),o[n].series.push(t)}else a.push(t)}}),{seriesGroupByCategoryAxis:o,other:a,meta:r}}(t);return{value:M([function(t){var h=[];return E(t,function(t,e){var i=t.categoryAxis,n=t.valueAxis.dim,o=[" "].concat(N(t.series,function(t){return t.name})),a=[i.model.getCategories()];E(t.series,function(t){a.push(t.getRawData().mapArray(n,function(t){return t}))});for(var r=[o.join(fA)],s=0;s<a[0].length;s++){for(var l=[],u=0;u<a.length;u++)l.push(a[u][s]);r.push(l.join(fA))}h.push(r.join("\n"))}),h.join("\n\n"+dA+"\n\n")}(e.seriesGroupByCategoryAxis),function(t){return N(t,function(t){var o=t.getRawData(),a=[t.name],r=[];return o.each(o.dimensions,function(){for(var t=arguments.length,e=arguments[t-1],i=o.getName(e),n=0;n<t-1;n++)r[n]=arguments[n];a.push((i?i+fA:"")+r.join(fA))}),a.join("\n")}).join("\n\n"+dA+"\n\n")}(e.other)],function(t){return t.replace(/[\n\t\s]/g,"")}).join("\n\n"+dA+"\n\n"),meta:e.meta}}function gA(t){return t.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}var mA=new RegExp("["+fA+"]+","g");function vA(t,a){var e=t.split(new RegExp("\n*"+dA+"\n*","g")),r={series:[]};return E(e,function(t,e){if(function(t){if(0<=t.slice(0,t.indexOf("\n")).indexOf(fA))return!0}(t)){var i=function(t){for(var e=t.split(/\n+/g),i=[],n=N(gA(e.shift()).split(mA),function(t){return{name:t,data:[]}}),o=0;o<e.length;o++){var a=gA(e[o]).split(mA);i.push(a.shift());for(var r=0;r<a.length;r++)n[r]&&(n[r].data[o]=a[r])}return{series:n,categories:i}}(t),n=a[e],o=n.axisDim+"Axis";n&&(r[o]=r[o]||[],r[o][n.axisIndex]={data:i.categories},r.series=r.series.concat(i.series))}else{i=function(t){for(var e=t.split(/\n+/g),i=gA(e.shift()),n=[],o=0;o<e.length;o++){var a,r=gA(e[o]).split(mA),s="",l=!1;a=isNaN(r[0])?(l=!0,s=r[0],r=r.slice(1),n[o]={name:s,value:[]},n[o].value):n[o]=[];for(var u=0;u<r.length;u++)a.push(+r[u]);1===a.length&&(l?n[o].value=a[0]:n[o]=a[0])}return{name:i,data:n}}(t);r.series.push(i)}}),r}function yA(t){this._dom=null,this.model=t}yA.defaultOption={show:!0,readOnly:!1,optionToContent:null,contentToOption:null,icon:"M17.5,17.3H33 M17.5,17.3H33 M45.4,29.5h-28 M11.5,2v56H51V14.8L38.4,2H11.5z M38.4,2.2v12.7H51 M45.4,41.7h-28",title:L(cA.title),lang:L(cA.lang),backgroundColor:"#fff",textColor:"#000",textareaColor:"#fff",textareaBorderColor:"#333",buttonColor:"#c23531",buttonTextColor:"#fff"},yA.prototype.onclick=function(t,e){var i=e.getDom(),n=this.model;this._dom&&i.removeChild(this._dom);var o=document.createElement("div");o.style.cssText="position:absolute;left:5px;top:5px;bottom:5px;right:5px;",o.style.backgroundColor=n.get("backgroundColor")||"#fff";var a=document.createElement("h4"),r=n.get("lang")||[];a.innerHTML=r[0]||n.get("title"),a.style.cssText="margin: 10px 20px;",a.style.color=n.get("textColor");var s=document.createElement("div"),l=document.createElement("textarea");s.style.cssText="display:block;width:100%;overflow:auto;";var u=n.get("optionToContent"),h=n.get("contentToOption"),c=pA(t);if("function"==typeof u){var d=u(e.getOption());"string"==typeof d?s.innerHTML=d:G(d)&&s.appendChild(d)}else s.appendChild(l),l.readOnly=n.get("readOnly"),l.style.cssText="width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;",l.style.color=n.get("textColor"),l.style.borderColor=n.get("textareaBorderColor"),l.style.backgroundColor=n.get("textareaColor"),l.value=c.value;var f=c.meta,p=document.createElement("div");p.style.cssText="position:absolute;bottom:0;left:0;right:0;";var g="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",m=document.createElement("div"),v=document.createElement("div");g+=";background-color:"+n.get("buttonColor"),g+=";color:"+n.get("buttonTextColor");var y=this;function x(){i.removeChild(o),y._dom=null}Ut(m,"click",x),Ut(v,"click",function(){var t;try{t="function"==typeof h?h(s,e.getOption()):vA(l.value,f)}catch(t){throw x(),new Error("Data view format error "+t)}t&&e.dispatchAction({type:"changeDataView",newOption:t}),x()}),m.innerHTML=r[1],v.innerHTML=r[2],v.style.cssText=g,m.style.cssText=g,n.get("readOnly")||p.appendChild(v),p.appendChild(m),o.appendChild(a),o.appendChild(s),o.appendChild(p),s.style.height=i.clientHeight-80+"px",i.appendChild(o),this._dom=o},yA.prototype.remove=function(t,e){this._dom&&e.getDom().removeChild(this._dom)},yA.prototype.dispose=function(t,e){this.remove(t,e)},QT("dataView",yA),xf({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},function(t,n){var o=[];E(t.newOption.series,function(t){var e=n.getSeriesByName(t.name)[0];if(e){var i=e.get("data");o.push({name:t.name,data:function(t,n){return N(t,function(t,e){var i=n&&n[e];return z(i)&&!O(i)?(z(t)&&!O(t)&&(t=t.value),D({value:t},i)):t})}(t.data,i)})}else o.push(k({type:"scatter"},t))}),n.mergeOption(D({series:o},t.newOption))});var xA=E,_A=_,wA=T,bA=["dataToPoint","pointToData"],SA=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"];function MA(t,e,i){var n=this._targetInfoList=[],o={},a=AA(e,t);xA(DA,function(t,e){i&&i.include&&!(0<=_A(i.include,e))||t(a,n,o)})}var IA=MA.prototype;function TA(t){return t[0]>t[1]&&t.reverse(),t}function AA(t,e){return Ko(t,e,{includeMainTypes:SA})}IA.setOutputRanges=function(t,e){this.matchOutputRanges(t,e,function(t,e,i){if((t.coordRanges||(t.coordRanges=[])).push(e),!t.coordRange){t.coordRange=e;var n=kA[t.brushType](0,i,e);t.__rangeOffset={offset:NA[t.brushType](n.values,t.range,[1,1]),xyMinMax:n.xyMinMax}}})},IA.matchOutputRanges=function(t,n,o){xA(t,function(i){var t=this.findTargetInfo(i,n);t&&!0!==t&&E(t.coordSyses,function(t){var e=kA[i.brushType](1,t,i.range);o(i,e.values,t,n)})},this)},IA.setInputRanges=function(t,o){xA(t,function(t){var e=this.findTargetInfo(t,o);if(t.range=t.range||[],e&&!0!==e){t.panelId=e.panelId;var i=kA[t.brushType](0,e.coordSys,t.coordRange),n=t.__rangeOffset;t.range=n?NA[t.brushType](i.values,n.offset,function(t,e){var i=EA(t),n=EA(e),o=[i[0]/n[0],i[1]/n[1]];return isNaN(o[0])&&(o[0]=1),isNaN(o[1])&&(o[1]=1),o}(i.xyMinMax,n.xyMinMax)):i.values}},this)},IA.makePanelOpts=function(i,n){return N(this._targetInfoList,function(t){var e=t.getPanelRect();return{panelId:t.panelId,defaultBrushType:n&&n(t),clipPath:Qb(e),isTargetByCursor:eS(e,i,t.coordSysModel),getLinearBrushOtherExtent:tS(e)}})},IA.controlSeries=function(t,e,i){var n=this.findTargetInfo(t,i);return!0===n||n&&0<=_A(n.coordSyses,e.coordinateSystem)},IA.findTargetInfo=function(t,e){for(var i=this._targetInfoList,n=AA(e,t),o=0;o<i.length;o++){var a=i[o],r=t.panelId;if(r){if(a.panelId===r)return a}else for(o=0;o<CA.length;o++)if(CA[o](n,a))return a}return!0};var DA={grid:function(t,n){var o=t.xAxisModels,a=t.yAxisModels,e=t.gridModels,i=Q(),r={},s={};(o||a||e)&&(xA(o,function(t){var e=t.axis.grid.model;i.set(e.id,e),r[e.id]=!0}),xA(a,function(t){var e=t.axis.grid.model;i.set(e.id,e),s[e.id]=!0}),xA(e,function(t){i.set(t.id,t),r[t.id]=!0,s[t.id]=!0}),i.each(function(t){var e=t.coordinateSystem,i=[];xA(e.getCartesians(),function(t,e){(0<=_A(o,t.getAxis("x").model)||0<=_A(a,t.getAxis("y").model))&&i.push(t)}),n.push({panelId:"grid--"+t.id,gridModel:t,coordSysModel:t,coordSys:i[0],coordSyses:i,getPanelRect:LA.grid,xAxisDeclared:r[t.id],yAxisDeclared:s[t.id]})}))},geo:function(t,i){xA(t.geoModels,function(t){var e=t.coordinateSystem;i.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:e,coordSyses:[e],getPanelRect:LA.geo})})}},CA=[function(t,e){var i=t.xAxisModel,n=t.yAxisModel,o=t.gridModel;return!o&&i&&(o=i.axis.grid.model),!o&&n&&(o=n.axis.grid.model),o&&o===e.gridModel},function(t,e){var i=t.geoModel;return i&&i===e.geoModel}],LA={grid:function(){return this.coordSys.grid.getRect().clone()},geo:function(){var t=this.coordSys,e=t.getBoundingRect().clone();return e.applyTransform(fl(t)),e}},kA={lineX:wA(PA,0),lineY:wA(PA,1),rect:function(t,e,i){var n=e[bA[t]]([i[0][0],i[1][0]]),o=e[bA[t]]([i[0][1],i[1][1]]),a=[TA([n[0],o[0]]),TA([n[1],o[1]])];return{values:a,xyMinMax:a}},polygon:function(i,n,t){var o=[[1/0,-1/0],[1/0,-1/0]];return{values:N(t,function(t){var e=n[bA[i]](t);return o[0][0]=Math.min(o[0][0],e[0]),o[1][0]=Math.min(o[1][0],e[1]),o[0][1]=Math.max(o[0][1],e[0]),o[1][1]=Math.max(o[1][1],e[1]),e}),xyMinMax:o}}};function PA(t,e,i,n){var o=i.getAxis(["x","y"][t]),a=TA(N([0,1],function(t){return e?o.coordToData(o.toLocalCoord(n[t])):o.toGlobalCoord(o.dataToCoord(n[t]))})),r=[];return r[t]=a,r[1-t]=[NaN,NaN],{values:a,xyMinMax:r}}var NA={lineX:wA(OA,0),lineY:wA(OA,1),rect:function(t,e,i){return[[t[0][0]-i[0]*e[0][0],t[0][1]-i[0]*e[0][1]],[t[1][0]-i[1]*e[1][0],t[1][1]-i[1]*e[1][1]]]},polygon:function(t,i,n){return N(t,function(t,e){return[t[0]-n[0]*i[e][0],t[1]-n[1]*i[e][1]]})}};function OA(t,e,i,n){return[e[0]-n[t]*i[0],e[1]-n[t]*i[1]]}function EA(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[NaN,NaN]}var RA=E,zA="\0_ec_hist_store";function BA(t){var e=t[zA];return e=e||(t[zA]=[{}])}Lu.registerSubTypeDefaulter("dataZoom",function(){return"slider"});var VA=["cartesian2d","polar","singleAxis"];var GA,FA,WA,HA,ZA=(FA=["axisIndex","axis","index","id"],WA=N(GA=(GA=["x","y","z","radius","angle","single"]).slice(),fu),HA=N(FA=(FA||[]).slice(),fu),function(o,a){E(GA,function(t,e){for(var i={name:t,capital:WA[e]},n=0;n<FA.length;n++)i[FA[n]]=t+HA[n];o.call(a,i)})});function UA(o,a,r){return function(t){var e,i={nodes:[],records:{}};if(a(function(t){i.records[t.name]={}}),!t)return i;for(s(t,i);e=!1,o(n),e;);function n(t){!function(t,e){return 0<=_(e.nodes,t)}(t,i)&&function(t,i){var n=!1;return a(function(e){E(r(t,e)||[],function(t){i.records[e.name][t]&&(n=!0)})}),n}(t,i)&&(s(t,i),e=!0)}return i};function s(t,i){i.nodes.push(t),a(function(e){E(r(t,e)||[],function(t){i.records[e.name][t]=!0})})}}function XA(t,e,i,n){this._dimName=t,this._axisIndex=e,this._valueWindow,this._percentWindow,this._dataExtent,this._minMaxSpan,this.ecModel=n,this._dataZoomModel=i}var YA=E,jA=Bl;function qA(t,e){var i=t.getAxisModel(),n=t._percentWindow,o=t._valueWindow;if(n){var a=Fl(o,[0,500]);a=Math.min(a,20);var r=e||0===n[0]&&100===n[1];i.setRange(r?null:+o[0].toFixed(a),r?null:+o[1].toFixed(a))}}XA.prototype={constructor:XA,hostedBy:function(t){return this._dataZoomModel===t},getDataValueWindow:function(){return this._valueWindow.slice()},getDataPercentWindow:function(){return this._percentWindow.slice()},getTargetSeriesModels:function(){var n=[],o=this.ecModel;return o.eachSeries(function(t){if(function(t){return 0<=_(VA,t)}(t.get("coordinateSystem"))){var e=this._dimName,i=o.queryComponents({mainType:e+"Axis",index:t.get(e+"AxisIndex"),id:t.get(e+"AxisId")})[0];this._axisIndex===(i&&i.componentIndex)&&n.push(t)}},this),n},getAxisModel:function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},getOtherAxisModel:function(){var t,e,i,n=this._dimName,o=this.ecModel,a=this.getAxisModel();return t="x"===n||"y"===n?(e="gridIndex","x"===n?"y":"x"):(e="polarIndex","angle"===n?"radius":"angle"),o.eachComponent(t+"Axis",function(t){(t.get(e)||0)===(a.get(e)||0)&&(i=t)}),i},getMinMaxSpan:function(){return L(this._minMaxSpan)},calculateDataWindow:function(o){var a,r=this._dataExtent,s=this.getAxisModel().axis.scale,l=this._dataZoomModel.getRangePropMode(),u=[0,100],h=[],c=[];YA(["start","end"],function(t,e){var i=o[t],n=o[t+"Value"];"percent"===l[e]?(null==i&&(i=u[e]),n=s.parse(El(i,u,r))):(a=!0,i=El(n=null==n?r[e]:s.parse(n),r,u)),c[e]=n,h[e]=i}),jA(c),jA(h);var d=this._minMaxSpan;function t(t,e,i,n,o){var a=o?"Span":"ValueSpan";Kw(0,t,i,"all",d["min"+a],d["max"+a]);for(var r=0;r<2;r++)e[r]=El(t[r],i,n,!0),o&&(e[r]=s.parse(e[r]))}return a?t(c,h,r,u,!1):t(h,c,u,r,!0),{valueWindow:c,percentWindow:h}},reset:function(t){if(t===this._dataZoomModel){var e=this.getTargetSeriesModels();this._dataExtent=function(t,e,i){var n=[1/0,-1/0];YA(i,function(t){var i=t.getData();i&&YA(i.mapDimension(e,!0),function(t){var e=i.getApproximateExtent(t);e[0]<n[0]&&(n[0]=e[0]),e[1]>n[1]&&(n[1]=e[1])})}),n[1]<n[0]&&(n=[NaN,NaN]);return function(t,e){var i=t.getAxisModel(),n=i.getMin(!0),o="category"===i.get("type"),a=o&&i.getCategories().length;null!=n&&"dataMin"!==n&&"function"!=typeof n?e[0]=n:o&&(e[0]=0<a?0:NaN);var r=i.getMax(!0);null!=r&&"dataMax"!==r&&"function"!=typeof r?e[1]=r:o&&(e[1]=0<a?a-1:NaN);i.get("scale",!0)||(0<e[0]&&(e[0]=0),e[1]<0&&(e[1]=0))}(t,n),n}(this,this._dimName,e),function(n){var o=n._minMaxSpan={},a=n._dataZoomModel,r=n._dataExtent;YA(["min","max"],function(t){var e=a.get(t+"Span"),i=a.get(t+"ValueSpan");null!=i&&(i=n.getAxisModel().axis.scale.parse(i)),null!=i?e=El(r[0]+i,r,[0,100],!0):null!=e&&(i=El(e,[0,100],r,!0)-r[0]),o[t+"Span"]=e,o[t+"ValueSpan"]=i})}(this);var i=this.calculateDataWindow(t.settledOption);this._valueWindow=i.valueWindow,this._percentWindow=i.percentWindow,qA(this)}},restore:function(t){t===this._dataZoomModel&&(this._valueWindow=this._percentWindow=null,qA(this,!0))},filterData:function(t,e){if(t===this._dataZoomModel){var n=this._dimName,i=this.getTargetSeriesModels(),o=t.get("filterMode"),c=this._valueWindow;"none"!==o&&YA(i,function(i){var u=i.getData(),h=u.mapDimension(n,!0);h.length&&("weakFilter"===o?u.filterSelf(function(t){for(var e,i,n,o=0;o<h.length;o++){var a=u.get(h[o],t),r=!isNaN(a),s=a<c[0],l=a>c[1];if(r&&!s&&!l)return!0;r&&(n=!0),s&&(e=!0),l&&(i=!0)}return n&&e&&i}):YA(h,function(t){if("empty"===o)i.setData(u=u.map(t,function(t){return function(t){return t>=c[0]&&t<=c[1]}(t)?t:NaN}));else{var e={};e[t]=c,u.selectRange(e)}}),YA(h,function(t){u.setApproximateExtent(c,t)}))})}}};var KA=E,$A=ZA,JA=If({type:"dataZoom",dependencies:["xAxis","yAxis","zAxis","radiusAxis","angleAxis","singleAxis","series"],defaultOption:{zlevel:0,z:4,orient:null,xAxisIndex:null,yAxisIndex:null,filterMode:"filter",throttle:null,start:0,end:100,startValue:null,endValue:null,minSpan:null,maxSpan:null,minValueSpan:null,maxValueSpan:null,rangeMode:null},init:function(t,e,i){this._dataIntervalByAxis={},this._dataInfo={},this._axisProxies={},this.textStyleModel,this._autoThrottle=!0,this._rangePropMode=["percent","percent"];var n=QA(t);this.settledOption=n,this.mergeDefaultAndTheme(t,i),this.doInit(n)},mergeOption:function(t){var e=QA(t);m(this.option,t,!0),m(this.settledOption,e,!0),this.doInit(e)},doInit:function(t){var i=this.option;v.canvasSupported||(i.realtime=!1),this._setDefaultThrottle(t),tD(this,t);var n=this.settledOption;KA([["start","startValue"],["end","endValue"]],function(t,e){"value"===this._rangePropMode[e]&&(i[t[0]]=n[t[0]]=null)},this),this.textStyleModel=this.getModel("textStyle"),this._resetTarget(),this._giveAxisProxies()},_giveAxisProxies:function(){var r=this._axisProxies;this.eachTargetAxis(function(t,e,i,n){var o=this.dependentModels[t.axis][e],a=o.__dzAxisProxy||(o.__dzAxisProxy=new XA(t.name,e,this,n));r[t.name+"_"+e]=a},this)},_resetTarget:function(){var i=this.option,t=this._judgeAutoMode();$A(function(t){var e=t.axisIndex;i[e]=Vo(i[e])},this),"axisIndex"===t?this._autoSetAxisIndex():"orient"===t&&this._autoSetOrient()},_judgeAutoMode:function(){var e=this.option,i=!1;$A(function(t){null!=e[t.axisIndex]&&(i=!0)},this);var t=e.orient;return null==t&&i?"orient":i?void 0:(null==t&&(e.orient="horizontal"),"axisIndex")},_autoSetAxisIndex:function(){var a=!0,e=this.get("orient",!0),r=this.option,t=this.dependentModels;if(a){var i="vertical"===e?"y":"x";t[i+"Axis"].length?(r[i+"AxisIndex"]=[0],a=!1):KA(t.singleAxis,function(t){a&&t.get("orient",!0)===e&&(r.singleAxisIndex=[t.componentIndex],a=!1)})}a&&$A(function(t){if(a){var e=[],i=this.dependentModels[t.axis];if(i.length&&!e.length)for(var n=0,o=i.length;n<o;n++)"category"===i[n].get("type")&&e.push(n);(r[t.axisIndex]=e).length&&(a=!1)}},this),a&&this.ecModel.eachSeries(function(o){this._isSeriesHasAllAxesTypeOf(o,"value")&&$A(function(t){var e=r[t.axisIndex],i=o.get(t.axisIndex),n=o.get(t.axisId);_(e,i=o.ecModel.queryComponents({mainType:t.axis,index:i,id:n})[0].componentIndex)<0&&e.push(i)})},this)},_autoSetOrient:function(){var e;this.eachTargetAxis(function(t){e=e||t.name},this),this.option.orient="y"===e?"vertical":"horizontal"},_isSeriesHasAllAxesTypeOf:function(n,o){var a=!0;return $A(function(t){var e=n.get(t.axisIndex),i=this.dependentModels[t.axis][e];i&&i.get("type")===o||(a=!1)},this),a},_setDefaultThrottle:function(t){if(t.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var e=this.ecModel.option;this.option.throttle=e.animation&&0<e.animationDurationUpdate?100:20}},getFirstTargetAxisModel:function(){var i;return $A(function(t){if(null==i){var e=this.get(t.axisIndex);e.length&&(i=this.dependentModels[t.axis][e[0]])}},this),i},eachTargetAxis:function(i,n){var o=this.ecModel;$A(function(e){KA(this.get(e.axisIndex),function(t){i.call(n,e,t,this,o)},this)},this)},getAxisProxy:function(t,e){return this._axisProxies[t+"_"+e]},getAxisModel:function(t,e){var i=this.getAxisProxy(t,e);return i&&i.getAxisModel()},setRawRange:function(e){var i=this.option,n=this.settledOption;KA([["start","startValue"],["end","endValue"]],function(t){null==e[t[0]]&&null==e[t[1]]||(i[t[0]]=n[t[0]]=e[t[0]],i[t[1]]=n[t[1]]=e[t[1]])},this),tD(this,e)},setCalculatedRange:function(e){var i=this.option;KA(["start","startValue","end","endValue"],function(t){i[t]=e[t]})},getPercentRange:function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},getValueRange:function(t,e){if(null!=t||null!=e)return this.getAxisProxy(t,e).getDataValueWindow();var i=this.findRepresentativeAxisProxy();return i?i.getDataValueWindow():void 0},findRepresentativeAxisProxy:function(t){if(t)return t.__dzAxisProxy;var e=this._axisProxies;for(var i in e)if(e.hasOwnProperty(i)&&e[i].hostedBy(this))return e[i];for(var i in e)if(e.hasOwnProperty(i)&&!e[i].hostedBy(this))return e[i]},getRangePropMode:function(){return this._rangePropMode.slice()}});function QA(e){var i={};return KA(["start","end","startValue","endValue","throttle"],function(t){e.hasOwnProperty(t)&&(i[t]=e[t])}),i}function tD(t,o){var a=t._rangePropMode,r=t.get("rangeMode");KA([["start","startValue"],["end","endValue"]],function(t,e){var i=null!=o[t[0]],n=null!=o[t[1]];i&&!n?a[e]="percent":!i&&n?a[e]="value":r?a[e]=r[e]:i&&(a[e]="percent")})}var eD=pc.extend({type:"dataZoom",render:function(t,e,i,n){this.dataZoomModel=t,this.ecModel=e,this.api=i},getTargetCoordInfo:function(){var t=this.dataZoomModel,o=this.ecModel,a={};return t.eachTargetAxis(function(t,e){var i=o.getComponent(t.axis,e);if(i){var n=i.getCoordSysModel();n&&function(t,e,i,n){for(var o,a=0;a<i.length;a++)if(i[a].model===t){o=i[a];break}o||i.push(o={model:t,axisModels:[],coordIndex:n});o.axisModels.push(e)}(n,i,a[n.mainType]||(a[n.mainType]=[]),n.componentIndex)}},this),a}});JA.extend({type:"dataZoom.select"}),eD.extend({type:"dataZoom.select"}),yf({getTargetSeries:function(t){var n=Q();return t.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(t,e,i){E(i.getAxisProxy(t.name,e).getTargetSeriesModels(),function(t){n.set(t.uid,t)})})}),n},modifyOutputEnd:!0,overallReset:function(t,n){t.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(t,e,i){i.getAxisProxy(t.name,e).reset(i,n)}),t.eachTargetAxis(function(t,e,i){i.getAxisProxy(t.name,e).filterData(i,n)})}),t.eachComponent("dataZoom",function(t){var e=t.findRepresentativeAxisProxy(),i=e.getDataPercentWindow(),n=e.getDataValueWindow();t.setCalculatedRange({start:i[0],end:i[1],startValue:n[0],endValue:n[1]})})}}),xf("dataZoom",function(i,t){var n=UA(A(t.eachComponent,t,"dataZoom"),ZA,function(t,e){return t.get(e.axisIndex)}),o=[];t.eachComponent({mainType:"dataZoom",query:i},function(t,e){o.push.apply(o,n(t).nodes)}),E(o,function(t,e){t.setRawRange({start:i.start,end:i.end,startValue:i.startValue,endValue:i.endValue})})});var iD=Nc.toolbox.dataZoom,nD=E;function oD(t,e,i){(this._brushController=new Sb(i.getZr())).on("brush",A(this._onBrush,this)).mount(),this._isZoomActive}oD.defaultOption={show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:L(iD.title)};var aD=oD.prototype;aD.render=function(t,e,i,n){this.model=t,this.ecModel=e,this.api=i,function(t,e,i,n,o){var a=i._isZoomActive;n&&"takeGlobalCursor"===n.type&&(a="dataZoomSelect"===n.key&&n.dataZoomSelectActive);i._isZoomActive=a,t.setIconStatus("zoom",a?"emphasis":"normal");var r=new MA(sD(t.option),e,{include:["grid"]});i._brushController.setPanels(r.makePanelOpts(o,function(t){return t.xAxisDeclared&&!t.yAxisDeclared?"lineX":!t.xAxisDeclared&&t.yAxisDeclared?"lineY":"rect"})).enableBrush(!!a&&{brushType:"auto",brushStyle:{lineWidth:0,fill:"rgba(0,0,0,0.2)"}})}(t,e,this,n,i),function(t,e){t.setIconStatus("back",1<function(t){return BA(t).length}(e)?"emphasis":"normal")}(t,e)},aD.onclick=function(t,e,i){rD[i].call(this)},aD.remove=function(t,e){this._brushController.unmount()},aD.dispose=function(t,e){this._brushController.dispose()};var rD={zoom:function(){var t=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:t})},back:function(){this._dispatchZoomAction(function(t){var n=BA(t),e=n[n.length-1];1<n.length&&n.pop();var o={};return RA(e,function(t,e){for(var i=n.length-1;0<=i;i--){if(t=n[i][e]){o[e]=t;break}}}),o}(this.ecModel))}};function sD(e){var i={};return E(["xAxisIndex","yAxisIndex"],function(t){i[t]=e[t],null==i[t]&&(i[t]="all"),!1!==i[t]&&"none"!==i[t]||(i[t]=[])}),i}aD._onBrush=function(t,e){if(e.isEnd&&t.length){var s={},l=this.ecModel;this._brushController.updateCovers([]),new MA(sD(this.model.option),l,{include:["grid"]}).matchOutputRanges(t,l,function(t,e,i){if("cartesian2d"===i.type){var n=t.brushType;"rect"===n?(o("x",i,e[0]),o("y",i,e[1])):o({lineX:"x",lineY:"y"}[n],i,e)}}),function(a,t){var r=BA(a);RA(t,function(t,e){for(var i=r.length-1;0<=i;i--){if(r[i][e])break}if(i<0){var n=a.queryComponents({mainType:"dataZoom",subType:"select",id:e})[0];if(n){var o=n.getPercentRange();r[0][e]={dataZoomId:e,start:o[0],end:o[1]}}}}),r.push(t)}(l,s),this._dispatchZoomAction(s)}function o(t,e,i){var n=e.getAxis(t),o=n.model,a=function(e,i,t){var n;return t.eachComponent({mainType:"dataZoom",subType:"select"},function(t){t.getAxisModel(e,i.componentIndex)&&(n=t)}),n}(t,o,l),r=a.findRepresentativeAxisProxy(o).getMinMaxSpan();null==r.minValueSpan&&null==r.maxValueSpan||(i=Kw(0,i.slice(),n.scale.getExtent(),0,r.minValueSpan,r.maxValueSpan)),a&&(s[a.id]={dataZoomId:a.id,startValue:i[0],endValue:i[1]})}},aD._dispatchZoomAction=function(t){var i=[];nD(t,function(t,e){i.push(L(t))}),i.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:i})},QT("dataZoom",oD),vf(function(s){if(s){var l=s.dataZoom||(s.dataZoom=[]);O(l)||(s.dataZoom=l=[l]);var t=s.toolbox;if(t&&(O(t)&&(t=t[0]),t&&t.feature)){var e=t.feature.dataZoom;i("xAxis",e),i("yAxis",e)}}function i(n,o){if(o){var a=n+"Index",r=o[a];null==r||"all"===r||O(r)||(r=!1===r||"none"===r?[]:[r]),function(t,e){var i=s[t];O(i)||(i=i?[i]:[]);nD(i,e)}(n,function(t,e){if(null==r||"all"===r||-1!==_(r,e)){var i={type:"select",$fromToolbox:!0,filterMode:o.filterMode||"filter",id:"\0_ec_\0toolbox-dataZoom_"+n+e};i[a]=e,l.push(i)}})}}});var lD=Nc.toolbox.restore;function uD(t){this.model=t}uD.defaultOption={show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:lD.title},uD.prototype.onclick=function(t,e,i){!function(t){t[zA]=null}(t),e.dispatchAction({type:"restore",from:this.uid})},QT("restore",uD),xf({type:"restore",event:"restore",update:"prepareAndUpdate"},function(t,e){e.resetOption("recreate")}),If({type:"tooltip",dependencies:["axisPointer"],defaultOption:{zlevel:0,z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:!1,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"rgba(50,50,50,0.7)",borderColor:"#333",borderRadius:4,borderWidth:0,padding:5,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#fff",fontSize:14}}});var hD=E,cD=eu,dD=["","-webkit-","-moz-","-o-"];function fD(o){var a=[],t=o.get("transitionDuration"),e=o.get("backgroundColor"),i=o.getModel("textStyle"),n=o.get("padding");return t&&a.push(function(t){var e="cubic-bezier(0.23, 1, 0.32, 1)",i="left "+t+"s "+e+",top "+t+"s "+e;return N(dD,function(t){return t+"transition:"+i}).join(";")}(t)),e&&(v.canvasSupported?a.push("background-Color:"+e):(a.push("background-Color:#"+Ze(e)),a.push("filter:alpha(opacity=70)"))),hD(["width","color","radius"],function(t){var e="border-"+t,i=cD(e),n=o.get(i);null!=n&&a.push(e+":"+n+("color"===t?"":"px"))}),a.push(function(i){var n=[],t=i.get("fontSize"),e=i.getTextColor();return e&&n.push("color:"+e),n.push("font:"+i.getFont()),t&&n.push("line-height:"+Math.round(3*t/2)+"px"),hD(["decoration","align"],function(t){var e=i.get(t);e&&n.push("text-"+t+":"+e)}),n.join(";")}(i)),null!=n&&a.push("padding:"+iu(n).join("px ")+"px"),a.join(";")+";"}function pD(t,e,i,n,o){var a=e&&e.painter;if(i){var r=a&&a.getViewportRoot();r&&function(t,e,i,n,o){Rt(Et,e,n,o,!0)&&Rt(t,i,Et[0],Et[1])}(t,r,document.body,n,o)}else{t[0]=n,t[1]=o;var s=a&&a.getViewportRootOffset();s&&(t[0]+=s.offsetLeft,t[1]+=s.offsetTop)}}function gD(t,e,i){if(v.wxa)return null;var n=document.createElement("div");n.domBelongToZr=!0,this.el=n;var o=this._zr=e.getZr(),a=this._appendToBody=i&&i.appendToBody;this._styleCoord=[0,0],pD(this._styleCoord,o,a,e.getWidth()/2,e.getHeight()/2),a?document.body.appendChild(n):t.appendChild(n),this._container=t,this._show=!1,this._hideTimeout;var r=this;n.onmouseenter=function(){r._enterable&&(clearTimeout(r._hideTimeout),r._show=!0),r._inContent=!0},n.onmousemove=function(t){if(t=t||window.event,!r._enterable){var e=o.handler;Zt(o.painter.getViewportRoot(),t,!0),e.dispatch("mousemove",t)}},n.onmouseleave=function(){r._enterable&&r._show&&r.hideLater(r._hideDelay),r._inContent=!1}}function mD(t){this._zr=t.getZr(),this._show=!1,this._hideTimeout}gD.prototype={constructor:gD,_enterable:!0,update:function(){var t=this._container,e=t.currentStyle||document.defaultView.getComputedStyle(t),i=t.style;"absolute"!==i.position&&"absolute"!==e.position&&(i.position="relative")},show:function(t){clearTimeout(this._hideTimeout);var e=this.el,i=this._styleCoord;e.style.cssText="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+fD(t)+";left:"+i[0]+"px;top:"+i[1]+"px;"+(t.get("extraCssText")||""),e.style.display=e.innerHTML?"block":"none",e.style.pointerEvents=this._enterable?"auto":"none",this._show=!0},setContent:function(t){this.el.innerHTML=null==t?"":t},setEnterable:function(t){this._enterable=t},getSize:function(){var t=this.el;return[t.clientWidth,t.clientHeight]},moveTo:function(t,e){var i=this._styleCoord;pD(i,this._zr,this._appendToBody,t,e);var n=this.el.style;n.left=i[0]+"px",n.top=i[1]+"px"},hide:function(){this.el.style.display="none",this._show=!1},hideLater:function(t){!this._show||this._inContent&&this._enterable||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(A(this.hide,this),t)):this.hide())},isShow:function(){return this._show},dispose:function(){this.el.parentNode.removeChild(this.el)},getOuterSize:function(){var t=this.el.clientWidth,e=this.el.clientHeight;if(document.defaultView&&document.defaultView.getComputedStyle){var i=document.defaultView.getComputedStyle(this.el);i&&(t+=parseInt(i.borderLeftWidth,10)+parseInt(i.borderRightWidth,10),e+=parseInt(i.borderTopWidth,10)+parseInt(i.borderBottomWidth,10))}return{width:t,height:e}}},mD.prototype={constructor:mD,_enterable:!0,update:function(){},show:function(t){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.attr("show",!0),this._show=!0},setContent:function(t,e,i){this.el&&this._zr.remove(this.el);for(var n={},o=t,a="{marker",r=o.indexOf(a);0<=r;){var s=o.indexOf("|}"),l=o.substr(r+a.length,s-r-a.length);-1<l.indexOf("sub")?n["marker"+l]={textWidth:4,textHeight:4,textBorderRadius:2,textBackgroundColor:e[l],textOffset:[3,0]}:n["marker"+l]={textWidth:10,textHeight:10,textBorderRadius:5,textBackgroundColor:e[l]},r=(o=o.substr(s+1)).indexOf("{marker")}this.el=new Ur({style:{rich:n,text:t,textLineHeight:20,textBackgroundColor:i.get("backgroundColor"),textBorderRadius:i.get("borderRadius"),textFill:i.get("textStyle.color"),textPadding:i.get("padding")},z:i.get("z")}),this._zr.add(this.el);var u=this;this.el.on("mouseover",function(){u._enterable&&(clearTimeout(u._hideTimeout),u._show=!0),u._inContent=!0}),this.el.on("mouseout",function(){u._enterable&&u._show&&u.hideLater(u._hideDelay),u._inContent=!1})},setEnterable:function(t){this._enterable=t},getSize:function(){var t=this.el.getBoundingRect();return[t.width,t.height]},moveTo:function(t,e){this.el&&this.el.attr("position",[t,e])},hide:function(){this.el&&this.el.hide(),this._show=!1},hideLater:function(t){!this._show||this._inContent&&this._enterable||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(A(this.hide,this),t)):this.hide())},isShow:function(){return this._show},getOuterSize:function(){var t=this.getSize();return{width:t[0],height:t[1]}}};var vD=A,yD=E,xD=Rl,_D=new rs({shape:{x:-1,y:-1,width:2,height:2}});function wD(t){for(var e=t.pop();t.length;){var i=t.pop();i&&(Cl.isInstance(i)&&(i=i.get("tooltip",!0)),"string"==typeof i&&(i={formatter:i}),e=new Cl(i,e,e.ecModel))}return e}function bD(t,e){return t.dispatchAction||A(e.dispatchAction,e)}function SD(t){return"center"===t||"middle"===t}Tf({type:"tooltip",init:function(t,e){if(!v.node){var i,n=t.getComponent("tooltip"),o=n.get("renderMode");this._renderMode=Qo(o),"html"===this._renderMode?(i=new gD(e.getDom(),e,{appendToBody:n.get("appendToBody",!0)}),this._newLine="<br/>"):(i=new mD(e),this._newLine="\n"),this._tooltipContent=i}},render:function(t,e,i){if(!v.node){this.group.removeAll(),this._tooltipModel=t,this._ecModel=e,this._api=i,this._lastDataByCoordSys=null,this._alwaysShowContent=t.get("alwaysShowContent");var n=this._tooltipContent;n.update(),n.setEnterable(t.get("enterable")),this._initGlobalListener(),this._keepShow()}},_initGlobalListener:function(){var n=this._tooltipModel.get("triggerOn");uI("itemTooltip",this._api,vD(function(t,e,i){"none"!==n&&(0<=n.indexOf(t)?this._tryShow(e,i):"leave"===t&&this._hide(i))},this))},_keepShow:function(){var t=this._tooltipModel,e=this._ecModel,i=this._api;if(null!=this._lastX&&null!=this._lastY&&"none"!==t.get("triggerOn")){var n=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){i.isDisposed()||n.manuallyShowTip(t,e,i,{x:n._lastX,y:n._lastY})})}},manuallyShowTip:function(t,e,i,n){if(n.from!==this.uid&&!v.node){var o=bD(n,i);this._ticket="";var a=n.dataByCoordSys;if(n.tooltip&&null!=n.x&&null!=n.y){var r=_D;r.position=[n.x,n.y],r.update(),r.tooltip=n.tooltip,this._tryShow({offsetX:n.x,offsetY:n.y,target:r},o)}else if(a)this._tryShow({offsetX:n.x,offsetY:n.y,position:n.position,dataByCoordSys:n.dataByCoordSys,tooltipOption:n.tooltipOption},o);else if(null!=n.seriesIndex){if(this._manuallyAxisShowTip(t,e,i,n))return;var s=JM(n,e),l=s.point[0],u=s.point[1];null!=l&&null!=u&&this._tryShow({offsetX:l,offsetY:u,position:n.position,target:s.el},o)}else null!=n.x&&null!=n.y&&(i.dispatchAction({type:"updateAxisPointer",x:n.x,y:n.y}),this._tryShow({offsetX:n.x,offsetY:n.y,position:n.position,target:i.getZr().findHover(n.x,n.y).target},o))}},manuallyHideTip:function(t,e,i,n){var o=this._tooltipContent;!this._alwaysShowContent&&this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=null,n.from!==this.uid&&this._hide(bD(n,i))},_manuallyAxisShowTip:function(t,e,i,n){var o=n.seriesIndex,a=n.dataIndex,r=e.getComponent("axisPointer").coordSysAxesInfo;if(null!=o&&null!=a&&null!=r){var s=e.getSeriesByIndex(o);if(s)if("axis"===(t=wD([s.getData().getItemModel(a),s,(s.coordinateSystem||{}).model,t])).get("trigger"))return i.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:a,position:n.position}),!0}},_tryShow:function(t,e){var i=t.target;if(this._tooltipModel){this._lastX=t.offsetX,this._lastY=t.offsetY;var n=t.dataByCoordSys;n&&n.length?this._showAxisTooltip(n,t):i&&null!=i.dataIndex?(this._lastDataByCoordSys=null,this._showSeriesItemTooltip(t,i,e)):i&&i.tooltip?(this._lastDataByCoordSys=null,this._showComponentItemTooltip(t,i,e)):(this._lastDataByCoordSys=null,this._hide(e))}},_showOrMove:function(t,e){var i=t.get("showDelay");e=A(e,this),clearTimeout(this._showTimout),0<i?this._showTimout=setTimeout(e,i):e()},_showAxisTooltip:function(t,e){var d=this._ecModel,i=this._tooltipModel,n=[e.offsetX,e.offsetY],o=[],f=[],a=wD([e.tooltipOption,i]),p=this._renderMode,r=this._newLine,g={};yD(t,function(t){yD(t.dataByAxis,function(s){var l=d.getComponent(s.axisDim+"Axis",s.axisIndex),u=s.value,h=[];if(l&&null!=u){var c=MI(u,l.axis,d,s.seriesDataIndices,s.valueLabelOpt);E(s.seriesDataIndices,function(t){var e=d.getSeriesByIndex(t.seriesIndex),i=t.dataIndexInside,n=e&&e.getDataParams(i);if(n.axisDim=s.axisDim,n.axisIndex=s.axisIndex,n.axisType=s.axisType,n.axisId=s.axisId,n.axisValue=lg(l.axis,u),n.axisValueLabel=c,n){f.push(n);var o,a=e.formatTooltip(i,!0,null,p);if(z(a)){o=a.html;var r=a.markers;m(g,r)}else o=a;h.push(o)}});var t=c;"html"!==p?o.push(h.join(r)):o.push((t?au(t)+r:"")+h.join(r))}})},this),o.reverse(),o=o.join(this._newLine+this._newLine);var s=e.position;this._showOrMove(a,function(){this._updateContentNotChangedOnAxis(t)?this._updatePosition(a,s,n[0],n[1],this._tooltipContent,f):this._showTooltipContent(a,o,f,Math.random(),n[0],n[1],s,void 0,g)})},_showSeriesItemTooltip:function(t,e,i){var n=this._ecModel,o=e.seriesIndex,a=n.getSeriesByIndex(o),r=e.dataModel||a,s=e.dataIndex,l=e.dataType,u=r.getData(),h=wD([u.getItemModel(s),r,a&&(a.coordinateSystem||{}).model,this._tooltipModel]),c=h.get("trigger");if(null==c||"item"===c){var d,f,p=r.getDataParams(s,l),g=r.formatTooltip(s,!1,l,this._renderMode);f=z(g)?(d=g.html,g.markers):(d=g,null);var m="item_"+r.name+"_"+s;this._showOrMove(h,function(){this._showTooltipContent(h,d,p,m,t.offsetX,t.offsetY,t.position,t.target,f)}),i({type:"showTip",dataIndexInside:s,dataIndex:u.getRawIndex(s),seriesIndex:o,from:this.uid})}},_showComponentItemTooltip:function(t,e,i){var n=e.tooltip;if("string"==typeof n){n={content:n,formatter:n}}var o=new Cl(n,this._tooltipModel,this._ecModel),a=o.get("content"),r=Math.random();this._showOrMove(o,function(){this._showTooltipContent(o,a,o.get("formatterParams")||{},r,t.offsetX,t.offsetY,t.position,e)}),i({type:"showTip",from:this.uid})},_showTooltipContent:function(i,t,n,e,o,a,r,s,l){if(this._ticket="",i.get("showContent")&&i.get("show")){var u=this._tooltipContent,h=i.get("formatter");r=r||i.get("position");var c=t;if(h&&"string"==typeof h)c=lu(h,n,!0);else if("function"==typeof h){var d=vD(function(t,e){t===this._ticket&&(u.setContent(e,l,i),this._updatePosition(i,r,o,a,u,n,s))},this);this._ticket=e,c=h(n,e,d)}u.setContent(c,l,i),u.show(i),this._updatePosition(i,r,o,a,u,n,s)}},_updatePosition:function(t,e,i,n,o,a,r){var s=this._api.getWidth(),l=this._api.getHeight();e=e||t.get("position");var u=o.getSize(),h=t.get("align"),c=t.get("verticalAlign"),d=r&&r.getBoundingRect().clone();if(r&&d.applyTransform(r.transform),"function"==typeof e&&(e=e([i,n],a,o.el,d,{viewSize:[s,l],contentSize:u.slice()})),O(e))i=xD(e[0],s),n=xD(e[1],l);else if(z(e)){e.width=u[0],e.height=u[1];var f=wu(e,{width:s,height:l});i=f.x,n=f.y,c=h=null}else if("string"==typeof e&&r){i=(p=function(t,e,i){var n=i[0],o=i[1],a=0,r=0,s=e.width,l=e.height;switch(t){case"inside":a=e.x+s/2-n/2,r=e.y+l/2-o/2;break;case"top":a=e.x+s/2-n/2,r=e.y-o-5;break;case"bottom":a=e.x+s/2-n/2,r=e.y+l+5;break;case"left":a=e.x-n-5,r=e.y+l/2-o/2;break;case"right":a=e.x+s+5,r=e.y+l/2-o/2}return[a,r]}(e,d,u))[0],n=p[1]}else{var p;i=(p=function(t,e,i,n,o,a,r){var s=i.getOuterSize(),l=s.width,u=s.height;null!=a&&(n<t+l+a?t-=l+a:t+=a);null!=r&&(o<e+u+r?e-=u+r:e+=r);return[t,e]}(i,n,o,s,l,h?null:20,c?null:20))[0],n=p[1]}h&&(i-=SD(h)?u[0]/2:"right"===h?u[0]:0),c&&(n-=SD(c)?u[1]/2:"bottom"===c?u[1]:0),t.get("confine")&&(i=(p=function(t,e,i,n,o){var a=i.getOuterSize(),r=a.width,s=a.height;return t=Math.min(t+r,n)-r,e=Math.min(e+s,o)-s,t=Math.max(t,0),e=Math.max(e,0),[t,e]}(i,n,o,s,l))[0],n=p[1]);o.moveTo(i,n)},_updateContentNotChangedOnAxis:function(n){var t=this._lastDataByCoordSys,r=!!t&&t.length===n.length;return r&&yD(t,function(t,e){var i=t.dataByAxis||{},a=(n[e]||{}).dataByAxis||[];(r&=i.length===a.length)&&yD(i,function(t,e){var i=a[e]||{},n=t.seriesDataIndices||[],o=i.seriesDataIndices||[];(r&=t.value===i.value&&t.axisType===i.axisType&&t.axisId===i.axisId&&n.length===o.length)&&yD(n,function(t,e){var i=o[e];r&=t.seriesIndex===i.seriesIndex&&t.dataIndex===i.dataIndex})})}),this._lastDataByCoordSys=n,!!r},_hide:function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},dispose:function(t,e){v.node||(this._tooltipContent.dispose(),dI("itemTooltip",e))}}),xf({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},function(){}),xf({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},function(){});var MD=["rect","polygon","keep","clear"];var ID=E;function TD(t){if(t)for(var e in t)if(t.hasOwnProperty(e))return!0}function AD(t,e,a){var i={};return ID(e,function(n){var o=i[n]=function(){function t(){}return t.prototype.__hidden=t.prototype,new t}();ID(t[n],function(t,e){if(f_.isValidType(e)){var i={type:e,visual:t};a&&a(i,n),o[e]=new f_(i),"opacity"===e&&((i=L(i)).type="colorAlpha",o.__hidden.__alphaForOpacity=new f_(i))}})}),i}function DD(e,i,t){var n;E(t,function(t){i.hasOwnProperty(t)&&TD(i[t])&&(n=!0)}),n&&E(t,function(t){i.hasOwnProperty(t)&&TD(i[t])?e[t]=L(i[t]):delete e[t]})}var CD={lineX:LD(0),lineY:LD(1),rect:{point:function(t,e,i){return t&&i.boundingRect.contain(t[0],t[1])},rect:function(t,e,i){return t&&i.boundingRect.intersect(t)}},polygon:{point:function(t,e,i){return t&&i.boundingRect.contain(t[0],t[1])&&Ig(i.range,t[0],t[1])},rect:function(t,e,i){var n=i.range;if(!t||n.length<=1)return!1;var o=t.x,a=t.y,r=t.width,s=t.height,l=n[0];return!!(Ig(n,o,a)||Ig(n,o+r,a)||Ig(n,o,a+s)||Ig(n,o+r,a+s)||Di.create(t).contain(l[0],l[1])||xl(o,a,o+r,a,n)||xl(o,a,o,a+s,n)||xl(o+r,a,o+r,a+s,n)||xl(o,a+s,o+r,a+s,n))||void 0}}};function LD(a){var r=["x","y"],s=["width","height"];return{point:function(t,e,i){if(t){var n=i.range;return kD(t[a],n)}},rect:function(t,e,i){if(t){var n=i.range,o=[t[r[a]],t[r[a]]+t[s[a]]];return o[1]<o[0]&&o.reverse(),kD(o[0],n)||kD(o[1],n)||kD(n[0],o)||kD(n[1],o)}}}}function kD(t,e){return e[0]<=t&&t<=e[1]}var PD=["inBrush","outOfBrush"],ND="__ecBrushSelect",OD="__ecInBrushSelectEvent",ED=Cd.VISUAL.BRUSH;function RD(e){e.eachComponent({mainType:"brush"},function(t){(t.brushTargetManager=new MA(t.option,e)).setInputRanges(t.areas,e)})}function zD(t,e){if(!t.isDisposed()){var i=t.getZr();i[OD]=!0,t.dispatchAction({type:"brushSelect",batch:e}),i[OD]=!1}}function BD(t,e,i,n){for(var o=0,a=e.length;o<a;o++){var r=e[o];if(t[r.brushType](n,i,r.selectors,r))return!0}}function VD(t){var r=t.brushSelector;if(R(r)){var e=[];return E(CD,function(a,t){e[t]=function(t,e,i,n){var o=e.getItemLayout(t);return a[r](o,i,n)}}),e}if(C(r)){var i={};return E(CD,function(t,e){i[e]=r}),i}return r}wf(ED,function(t,e,i){t.eachComponent({mainType:"brush"},function(t){i&&"takeGlobalCursor"===i.type&&t.setBrushOption("brush"===i.key?i.brushOption:{brushType:!1})}),RD(t)}),bf(ED,function(p,t,e){var o,g,m=[];p.eachComponent({mainType:"brush"},function(a,t){var s={brushId:a.id,brushIndex:t,brushName:a.name,areas:L(a.areas),selected:[]};m.push(s);var e=a.option,i=e.brushLink,n=[],l=[],u=[],h=0;t||(o=e.throttleType,g=e.throttleDelay);var r=N(a.areas,function(t){return function(i){var n=i.selectors={};return E(CD[i.brushType],function(e,t){n[t]=function(t){return e(t,n,i)}}),i}(D({boundingRect:GD[t.brushType](t)},t))}),c=AD(a.option,PD,function(t){t.mappingMethod="fixed"});function d(t){return"all"===i||n[t]}function f(t){return!!t.length}O(i)&&E(i,function(t){n[t]=1}),p.eachSeries(function(t,e){var i=u[e]=[];"parallel"===t.subType?function(t,e){var i=t.coordinateSystem;h|=i.hasAxisBrushed(),d(e)&&i.eachActiveState(t.getData(),function(t,e){"active"===t&&(l[e]=1)})}(t,e):function(e,t,i){var n=VD(e);if(!n||function(t,e){var i=t.option.seriesIndex;return null!=i&&"all"!==i&&(O(i)?_(i,e)<0:e!==i)}(a,t))return;if(E(r,function(t){n[t.brushType]&&a.brushTargetManager.controlSeries(t,e,p)&&i.push(t),h|=f(i)}),d(t)&&f(i)){var o=e.getData();o.each(function(t){BD(n,i,o,t)&&(l[t]=1)})}}(t,e,i)}),p.eachSeries(function(t,e){var i={seriesId:t.id,seriesIndex:e,seriesName:t.name,dataIndex:[]};s.selected.push(i);var n=VD(t),o=u[e],a=t.getData(),r=d(e)?function(t){return l[t]?(i.dataIndex.push(a.getRawIndex(t)),"inBrush"):"outOfBrush"}:function(t){return BD(n,o,a,t)?(i.dataIndex.push(a.getRawIndex(t)),"inBrush"):"outOfBrush"};(d(e)?h:f(o))&&function(t,u,h,c,d,f){var p,g={};function m(t){return h.getItemVisual(p,t)}function v(t,e){h.setItemVisual(p,t,e)}function e(t,e){p=null==f?t:e;var i=h.getRawDataItem(p);if(!i||!1!==i.visualMap)for(var n=c.call(d,t),o=u[n],a=g[n],r=0,s=a.length;r<s;r++){var l=a[r];o[l]&&o[l].applyVisual(t,m,v)}}E(t,function(t){var e=f_.prepareVisualTypes(u[t]);g[t]=e}),null==f?h.each(e):h.each([f],e)}(PD,c,a,r)})}),function(t,e,i,n,o){if(!o)return;var a=t.getZr();if(a[OD])return;a[ND]||(a[ND]=zD);Lc(a,ND,i,e)(t,n)}(t,o,g,m,e)});var GD={lineX:et,lineY:et,rect:function(t){return FD(t.range)},polygon:function(t){for(var e,i=t.range,n=0,o=i.length;n<o;n++){e=e||[[1/0,-1/0],[1/0,-1/0]];var a=i[n];a[0]<e[0][0]&&(e[0][0]=a[0]),a[0]>e[0][1]&&(e[0][1]=a[0]),a[1]<e[1][0]&&(e[1][0]=a[1]),a[1]>e[1][1]&&(e[1][1]=a[1])}return e&&FD(e)}};function FD(t){return new Di(t[0][0],t[1][0],t[0][1]-t[0][0],t[1][1]-t[1][0])}var WD=["#ddd"];If({type:"brush",dependencies:["geo","grid","xAxis","yAxis","parallel","series"],defaultOption:{toolbox:null,brushLink:null,seriesIndex:"all",geoIndex:null,xAxisIndex:null,yAxisIndex:null,brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(120,140,180,0.3)",borderColor:"rgba(120,140,180,0.8)"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},areas:[],brushType:null,brushOption:{},coordInfoList:[],optionUpdated:function(t,e){var i=this.option;e||DD(i,t,["inBrush","outOfBrush"]);var n=i.inBrush=i.inBrush||{};i.outOfBrush=i.outOfBrush||{color:WD},n.hasOwnProperty("liftZ")||(n.liftZ=5)},setAreas:function(t){t&&(this.areas=N(t,function(t){return HD(this.option,t)},this))},setBrushOption:function(t){this.brushOption=HD(this.option,t),this.brushType=this.brushOption.brushType}});function HD(t,e){return m({brushType:t.brushType,brushMode:t.brushMode,transformable:t.transformable,brushStyle:new Cl(t.brushStyle).getItemStyle(),removeOnClick:t.removeOnClick,z:t.z},e,!0)}function ZD(t,e,i,n){n&&n.$from===t.id||this._brushController.setPanels(t.brushTargetManager.makePanelOpts(i)).enableBrush(t.brushOption).updateCovers(t.areas.slice())}Tf({type:"brush",init:function(t,e){this.ecModel=t,this.api=e,this.model,(this._brushController=new Sb(e.getZr())).on("brush",A(this._onBrush,this)).mount()},render:function(t){return this.model=t,ZD.apply(this,arguments)},updateTransform:function(t,e){return RD(e),ZD.apply(this,arguments)},updateView:ZD,dispose:function(){this._brushController.dispose()},_onBrush:function(t,e){var i=this.model.id;this.model.brushTargetManager.setOutputRanges(t,this.ecModel),e.isEnd&&!e.removeOnClick||this.api.dispatchAction({type:"brush",brushId:i,areas:L(t),$from:i}),e.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:i,areas:L(t),$from:i})}}),xf({type:"brush",event:"brush"},function(e,t){t.eachComponent({mainType:"brush",query:e},function(t){t.setAreas(e.areas)})}),xf({type:"brushSelect",event:"brushSelected",update:"none"},function(){}),xf({type:"brushEnd",event:"brushEnd",update:"none"},function(){});var UD=Nc.toolbox.brush;function XD(t,e,i){this.model=t,this.ecModel=e,this.api=i,this._brushType,this._brushMode}XD.defaultOption={show:!0,type:["rect","polygon","lineX","lineY","keep","clear"],icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:L(UD.title)};var YD=XD.prototype;YD.render=YD.updateView=function(e,t,i){var n,o,a;t.eachComponent({mainType:"brush"},function(t){n=t.brushType,o=t.brushOption.brushMode||"single",a|=t.areas.length}),this._brushType=n,this._brushMode=o,E(e.get("type",!0),function(t){e.setIconStatus(t,("keep"===t?"multiple"===o:"clear"===t?a:t===n)?"emphasis":"normal")})},YD.getIcons=function(){var t=this.model,e=t.get("icon",!0),i={};return E(t.get("type",!0),function(t){e[t]&&(i[t]=e[t])}),i},YD.onclick=function(t,e,i){var n=this._brushType,o=this._brushMode;"clear"===i?(e.dispatchAction({type:"axisAreaSelect",intervals:[]}),e.dispatchAction({type:"brush",command:"clear",areas:[]})):e.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"keep"===i?n:n!==i&&i,brushMode:"keep"===i?"multiple"===o?"single":"multiple":o}})},QT("brush",XD),vf(function(t,e){var i=t&&t.brush;if(O(i)||(i=i?[i]:[]),i.length){var n=[];E(i,function(t){var e=t.hasOwnProperty("toolbox")?t.toolbox:[];e instanceof Array&&(n=n.concat(e))});var o=t&&t.toolbox;O(o)&&(o=o[0]),o||(o={feature:{}},t.toolbox=[o]);var a=o.feature||(o.feature={}),r=a.brush||(a.brush={}),s=r.type||(r.type=[]);s.push.apply(s,n),function(i){var e={};E(i,function(t){e[t]=1}),i.length=0,E(e,function(t,e){i.push(e)})}(s),e&&!s.length&&s.push.apply(s,MD)}}),If({type:"title",layoutMode:{type:"box",ignoreSize:!0},defaultOption:{zlevel:0,z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bolder",color:"#333"},subtextStyle:{color:"#aaa"}}}),Tf({type:"title",render:function(t,e,i){if(this.group.removeAll(),t.get("show")){var n=this.group,o=t.getModel("textStyle"),a=t.getModel("subtextStyle"),r=t.get("textAlign"),s=H(t.get("textBaseline"),t.get("textVerticalAlign")),l=new Ur({style:nl({},o,{text:t.get("text"),textFill:o.getTextColor()},{disableBox:!0}),z2:10}),u=l.getBoundingRect(),h=t.get("subtext"),c=new Ur({style:nl({},a,{text:h,textFill:a.getTextColor(),y:u.height+t.get("itemGap"),textVerticalAlign:"top"},{disableBox:!0}),z2:10}),d=t.get("link"),f=t.get("sublink"),p=t.get("triggerEvent",!0);l.silent=!d&&!p,c.silent=!f&&!p,d&&l.on("click",function(){window.open(d,"_"+t.get("target"))}),f&&c.on("click",function(){window.open(f,"_"+t.get("subtarget"))}),l.eventData=c.eventData=p?{componentType:"title",componentIndex:t.componentIndex}:null,n.add(l),h&&n.add(c);var g=n.getBoundingRect(),m=t.getBoxLayoutParams();m.width=g.width,m.height=g.height;var v=wu(m,{width:i.getWidth(),height:i.getHeight()},t.get("padding"));r||("middle"===(r=t.get("left")||t.get("right"))&&(r="center"),"right"===r?v.x+=v.width:"center"===r&&(v.x+=v.width/2)),s||("center"===(s=t.get("top")||t.get("bottom"))&&(s="middle"),"bottom"===s?v.y+=v.height:"middle"===s&&(v.y+=v.height/2),s=s||"top"),n.attr("position",[v.x,v.y]);var y={textAlign:r,textVerticalAlign:s};l.setStyle(y),c.setStyle(y),g=n.getBoundingRect();var x=v.margin,_=t.getItemStyle(["color","opacity"]);_.fill=t.get("backgroundColor");var w=new rs({shape:{x:g.x-x[3],y:g.y-x[0],width:g.width+x[1]+x[3],height:g.height+x[0]+x[2],r:t.get("borderRadius")},style:_,subPixelOptimize:!0,silent:!0});n.add(w)}}});function jD(t){var e=t.itemStyle||(t.itemStyle={}),i=e.emphasis||(e.emphasis={}),n=t.label||t.label||{},o=n.normal||(n.normal={}),a={normal:1,emphasis:1};E(n,function(t,e){a[e]||qD(o,e)||(o[e]=t)}),i.label&&!qD(n,"emphasis")&&(n.emphasis=i.label,delete i.label)}function qD(t,e){return t.hasOwnProperty(e)}Lu.registerSubTypeDefaulter("timeline",function(){return"slider"}),xf({type:"timelineChange",event:"timelineChanged",update:"prepareAndUpdate"},function(t,e){var i=e.getComponent("timeline");return i&&null!=t.currentIndex&&(i.setCurrentIndex(t.currentIndex),!i.get("loop",!0)&&i.isIndexMax()&&i.setPlayState(!1)),e.resetOption("timeline"),D({currentIndex:i.option.currentIndex},t)}),xf({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},function(t,e){var i=e.getComponent("timeline");i&&null!=t.playState&&i.setPlayState(t.playState)});var KD=Lu.extend({type:"timeline",layoutMode:"box",defaultOption:{zlevel:0,z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},init:function(t,e,i){this._data,this._names,this.mergeDefaultAndTheme(t,i),this._initData()},mergeOption:function(t){KD.superApply(this,"mergeOption",arguments),this._initData()},setCurrentIndex:function(t){null==t&&(t=this.option.currentIndex);var e=this._data.count();this.option.loop?t=(t%e+e)%e:(e<=t&&(t=e-1),t<0&&(t=0)),this.option.currentIndex=t},getCurrentIndex:function(){return this.option.currentIndex},isIndexMax:function(){return this.getCurrentIndex()>=this._data.count()-1},setPlayState:function(t){this.option.autoPlay=!!t},getPlayState:function(){return!!this.option.autoPlay},_initData:function(){var t=this.option,e=t.data||[],i=t.axisType,o=this._names=[];if("category"===i){var a=[];E(e,function(t,e){var i,n=Wo(t);z(t)?(i=L(t)).value=e:i=e,a.push(i),R(n)||null!=n&&!isNaN(n)||(n=""),o.push(n+"")}),e=a}var n={category:"ordinal",time:"time"}[i]||"number";(this._data=new Xf([{name:"value",type:n}],this)).initData(e,o)},getData:function(){return this._data},getCategories:function(){if("category"===this.get("axisType"))return this._names.slice()}});b(KD.extend({type:"timeline.slider",defaultOption:{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"emptyCircle",symbolSize:10,lineStyle:{show:!0,width:2,color:"#304654"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#304654"},itemStyle:{color:"#304654",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:13,color:"#c23531",borderWidth:5,borderColor:"rgba(194,53,49, 0.5)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:22,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"path://M18.6,50.8l22.5-22.5c0.2-0.2,0.3-0.4,0.3-0.7c0-0.3-0.1-0.5-0.3-0.7L18.7,4.4c-0.1-0.1-0.2-0.3-0.2-0.5 c0-0.4,0.3-0.8,0.8-0.8c0.2,0,0.5,0.1,0.6,0.3l23.5,23.5l0,0c0.2,0.2,0.3,0.4,0.3,0.7c0,0.3-0.1,0.5-0.3,0.7l-0.1,0.1L19.7,52 c-0.1,0.1-0.3,0.2-0.5,0.2c-0.4,0-0.8-0.3-0.8-0.8C18.4,51.2,18.5,51,18.6,50.8z",prevIcon:"path://M43,52.8L20.4,30.3c-0.2-0.2-0.3-0.4-0.3-0.7c0-0.3,0.1-0.5,0.3-0.7L42.9,6.4c0.1-0.1,0.2-0.3,0.2-0.5 c0-0.4-0.3-0.8-0.8-0.8c-0.2,0-0.5,0.1-0.6,0.3L18.3,28.8l0,0c-0.2,0.2-0.3,0.4-0.3,0.7c0,0.3,0.1,0.5,0.3,0.7l0.1,0.1L41.9,54 c0.1,0.1,0.3,0.2,0.5,0.2c0.4,0,0.8-0.3,0.8-0.8C43.2,53.2,43.1,53,43,52.8z",color:"#304654",borderColor:"#304654",borderWidth:1},emphasis:{label:{show:!0,color:"#c23531"},itemStyle:{color:"#c23531"},controlStyle:{color:"#c23531",borderColor:"#c23531",borderWidth:2}},data:[]}}),Uh);function $D(t,e,i,n){Vg.call(this,t,e,i),this.type=n||"value",this.model=null}var JD=pc.extend({type:"timeline"});$D.prototype={constructor:$D,getLabelModel:function(){return this.model.getModel("label")},isHorizontal:function(){return"horizontal"===this.model.get("orient")}},w($D,Vg);var QD=A,tC=E,eC=Math.PI;function iC(t,e,i,n,o,a){var r=e.get("color");o?(o.setColor(r),i.add(o),a&&a.onUpdate(o)):((o=_g(t.get("symbol"),-1,-1,2,2,r)).setStyle("strokeNoScale",!0),i.add(o),a&&a.onCreate(o));var s=e.getItemStyle(["color","symbol","symbolSize"]);o.setStyle(s),n=m({rectHover:!0,z2:100},n,!0);var l=t.get("symbolSize");(l=l instanceof Array?l.slice():[+l,+l])[0]/=2,l[1]/=2,n.scale=l;var u=t.get("symbolOffset");if(u){var h=n.position=n.position||[0,0];h[0]+=Rl(u[0],l[0]),h[1]+=Rl(u[1],l[1])}var c=t.get("symbolRotate");return n.rotation=(c||0)*Math.PI/180||0,o.attr(n),o.updateTransform(),o}function nC(t,e,i,n,o){if(!t.dragging){var a=n.getModel("checkpointStyle"),r=i.dataToCoord(n.getData().get(["value"],e));o||!a.get("animation",!0)?t.attr({position:[r,0]}):(t.stopAnimation(!0),t.animateTo({position:[r,0]},a.get("animationDuration",!0),a.get("animationEasing",!0)))}}JD.extend({type:"timeline.slider",init:function(t,e){this.api=e,this._axis,this._viewRect,this._timer,this._currentPointer,this._mainGroup,this._labelGroup},render:function(e,t,i,n){if(this.model=e,this.api=i,this.ecModel=t,this.group.removeAll(),e.get("show",!0)){var o=this._layout(e,i),a=this._createGroup("mainGroup"),r=this._createGroup("labelGroup"),s=this._axis=this._createAxis(o,e);e.formatTooltip=function(t){return au(s.scale.getLabel(t))},tC(["AxisLine","AxisTick","Control","CurrentPointer"],function(t){this["_render"+t](o,a,s,e)},this),this._renderAxisLabel(o,r,s,e),this._position(o,e)}this._doPlayStop()},remove:function(){this._clearTimer(),this.group.removeAll()},dispose:function(){this._clearTimer()},_layout:function(t,e){var i=t.get("label.position"),n=t.get("orient"),o=function(t,e){return wu(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()},t.get("padding"))}(t,e);null==i||"auto"===i?i="horizontal"===n?o.y+o.height/2<e.getHeight()/2?"-":"+":o.x+o.width/2<e.getWidth()/2?"+":"-":isNaN(i)&&(i={horizontal:{top:"-",bottom:"+"},vertical:{left:"-",right:"+"}}[n][i]);var a,r,s,l,u={horizontal:"center",vertical:0<=i||"+"===i?"left":"right"},h={horizontal:0<=i||"+"===i?"top":"bottom",vertical:"middle"},c={horizontal:0,vertical:eC/2},d="vertical"===n?o.height:o.width,f=t.getModel("controlStyle"),p=f.get("show",!0),g=p?f.get("itemSize"):0,m=p?f.get("itemGap"):0,v=g+m,y=t.get("label.rotate")||0;y=y*eC/180;var x=f.get("position",!0),_=p&&f.get("showPlayBtn",!0),w=p&&f.get("showPrevBtn",!0),b=p&&f.get("showNextBtn",!0),S=0,M=d;return"left"===x||"bottom"===x?(_&&(a=[0,0],S+=v),w&&(r=[S,0],S+=v)):(_&&(a=[M-g,0],M-=v),w&&(r=[0,0],S+=v)),b&&(s=[M-g,0],M-=v),l=[S,M],t.get("inverse")&&l.reverse(),{viewRect:o,mainLength:d,orient:n,rotation:c[n],labelRotation:y,labelPosOpt:i,labelAlign:t.get("label.align")||u[n],labelBaseline:t.get("label.verticalAlign")||t.get("label.baseline")||h[n],playPosition:a,prevBtnPosition:r,nextBtnPosition:s,axisExtent:l,controlSize:g,controlGap:m}},_position:function(t,e){var i=this._mainGroup,n=this._labelGroup,o=t.viewRect;if("vertical"===t.orient){var a=ae(),r=o.x,s=o.y+o.height;ue(a,a,[-r,-s]),he(a,a,-eC/2),ue(a,a,[r,s]),(o=o.clone()).applyTransform(a)}var l=m(o),u=m(i.getBoundingRect()),h=m(n.getBoundingRect()),c=i.position,d=n.position;d[0]=c[0]=l[0][0];var f,p=t.labelPosOpt;isNaN(p)?(v(c,u,l,1,f="+"===p?0:1),v(d,h,l,1,1-f)):(v(c,u,l,1,f=0<=p?0:1),d[1]=c[1]+p);function g(t){var e=t.position;t.origin=[l[0][0]-e[0],l[1][0]-e[1]]}function m(t){return[[t.x,t.x+t.width],[t.y,t.y+t.height]]}function v(t,e,i,n,o){t[n]+=i[n][o]-e[n][o]}i.attr("position",c),n.attr("position",d),i.rotation=n.rotation=t.rotation,g(i),g(n)},_createAxis:function(t,e){var i=e.getData(),n=e.get("axisType"),o=rg(e,n);o.getTicks=function(){return i.mapArray(["value"],function(t){return t})};var a=i.getDataExtent("value");o.setExtent(a[0],a[1]),o.niceTicks();var r=new $D("value",o,t.axisExtent,n);return r.model=e,r},_createGroup:function(t){var e=this["_"+t]=new Ci;return this.group.add(e),e},_renderAxisLine:function(t,e,i,n){var o=i.getExtent();n.get("lineStyle.show")&&e.add(new ls({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:k({lineCap:"round"},n.getModel("lineStyle").getLineStyle()),silent:!0,z2:1}))},_renderAxisTick:function(t,s,l,u){var h=u.getData(),e=l.scale.getTicks();tC(e,function(t){var e=l.dataToCoord(t),i=h.getItemModel(t),n=i.getModel("itemStyle"),o=i.getModel("emphasis.itemStyle"),a={position:[e,0],onclick:QD(this._changeTimeline,this,t)},r=iC(i,n,s,a);$s(r,o.getItemStyle()),i.get("tooltip")?(r.dataIndex=t,r.dataModel=u):r.dataIndex=r.dataModel=null},this)},_renderAxisLabel:function(s,l,u,t){if(u.getLabelModel().get("show")){var h=t.getData(),e=u.getViewLabels();tC(e,function(t){var e=t.tickValue,i=h.getItemModel(e),n=i.getModel("label"),o=i.getModel("emphasis.label"),a=u.dataToCoord(t.tickValue),r=new Ur({position:[a,0],rotation:s.labelRotation-s.rotation,onclick:QD(this._changeTimeline,this,e),silent:!1});nl(r.style,n,{text:t.formattedLabel,textAlign:s.labelAlign,textVerticalAlign:s.labelBaseline}),l.add(r),$s(r,nl({},o))},this)}},_renderControl:function(t,a,e,r){var s=t.controlSize,l=t.rotation,u=r.getModel("controlStyle").getItemStyle(),h=r.getModel("emphasis.controlStyle").getItemStyle(),c=[0,-s/2,s,s],i=r.getPlayState(),n=r.get("inverse",!0);function o(t,e,i,n){if(t){var o=function(t,e,i,n){return Ps(t.get(e).replace(/^path:\/\//,""),L(n||{}),new Di(i[0],i[1],i[2],i[3]),"center")}(r,e,c,{position:t,origin:[s/2,0],rotation:n?-l:0,rectHover:!0,style:u,onclick:i});a.add(o),$s(o,h)}}o(t.nextBtnPosition,"controlStyle.nextIcon",QD(this._changeTimeline,this,n?"-":"+")),o(t.prevBtnPosition,"controlStyle.prevIcon",QD(this._changeTimeline,this,n?"+":"-")),o(t.playPosition,"controlStyle."+(i?"stopIcon":"playIcon"),QD(this._handlePlayClick,this,!i),!0)},_renderCurrentPointer:function(t,e,i,n){var o=n.getData(),a=n.getCurrentIndex(),r=o.getItemModel(a).getModel("checkpointStyle"),s=this,l={onCreate:function(t){t.draggable=!0,t.drift=QD(s._handlePointerDrag,s),t.ondragend=QD(s._handlePointerDragend,s),nC(t,a,i,n,!0)},onUpdate:function(t){nC(t,a,i,n)}};this._currentPointer=iC(r,r,this._mainGroup,{},this._currentPointer,l)},_handlePlayClick:function(t){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:t,from:this.uid})},_handlePointerDrag:function(t,e,i){this._clearTimer(),this._pointerChangeTimeline([i.offsetX,i.offsetY])},_handlePointerDragend:function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},_pointerChangeTimeline:function(t,e){var i=this._toAxisCoord(t)[0],n=Bl(this._axis.getExtent().slice());i>n[1]&&(i=n[1]),i<n[0]&&(i=n[0]),this._currentPointer.position[0]=i,this._currentPointer.dirty();var o=this._findNearestTick(i),a=this.model;(e||o!==a.getCurrentIndex()&&a.get("realtime"))&&this._changeTimeline(o)},_doPlayStop:function(){this._clearTimer(),this.model.getPlayState()&&(this._timer=setTimeout(QD(function(){var t=this.model;this._changeTimeline(t.getCurrentIndex()+(t.get("rewind",!0)?-1:1))},this),this.model.get("playInterval")))},_toAxisCoord:function(t){return pl(t,this._mainGroup.getLocalTransform(),!0)},_findNearestTick:function(o){var a,t=this.model.getData(),r=1/0,s=this._axis;return t.each(["value"],function(t,e){var i=s.dataToCoord(t),n=Math.abs(i-o);n<r&&(r=n,a=e)}),a},_clearTimer:function(){this._timer&&(clearTimeout(this._timer),this._timer=null)},_changeTimeline:function(t){var e=this.model.getCurrentIndex();"+"===t?t=e+1:"-"===t&&(t=e-1),this.api.dispatchAction({type:"timelineChange",currentIndex:t,from:this.uid})}}),vf(function(t){var e=t&&t.timeline;O(e)||(e=e?[e]:[]),E(e,function(t){t&&function(t){var e=t.type,i={number:"value",time:"time"};i[e]&&(t.axisType=i[e],delete t.type);if(jD(t),qD(t,"controlPosition")){var n=t.controlStyle||(t.controlStyle={});qD(n,"position")||(n.position=t.controlPosition),"none"!==n.position||qD(n,"show")||(n.show=!1,delete n.position),delete t.controlPosition}E(t.data||[],function(t){z(t)&&!O(t)&&(!qD(t,"value")&&qD(t,"name")&&(t.value=t.name),jD(t))})}(t)})});var oC=tu,aC=au;function rC(t){Go(t,"label",["show"])}var sC=If({type:"marker",dependencies:["series","grid","polar","geo"],init:function(t,e,i){this.mergeDefaultAndTheme(t,i),this._mergeOption(t,i,!1,!0)},isAnimationEnabled:function(){if(v.node)return!1;var t=this.__hostSeries;return this.getShallow("animation")&&t&&t.isAnimationEnabled()},mergeOption:function(t,e){this._mergeOption(t,e,!1,!1)},_mergeOption:function(t,n,e,o){var a=this.constructor,r=this.mainType+"Model";e||n.eachSeries(function(t){var e=t.get(this.mainType,!0),i=t[r];e&&e.data?(i?i._mergeOption(e,n,!0):(o&&rC(e),E(e.data,function(t){t instanceof Array?(rC(t[0]),rC(t[1])):rC(t)}),k(i=new a(e,this,n),{mainType:this.mainType,seriesIndex:t.seriesIndex,name:t.name,createdBySelf:!0}),i.__hostSeries=t),t[r]=i):t[r]=null},this)},formatTooltip:function(t){var e=this.getData(),i=this.getRawValue(t),n=O(i)?N(i,oC).join(", "):oC(i),o=e.getName(t),a=aC(this.name);return null==i&&!o||(a+="<br />"),o&&(a+=aC(o),null!=i&&(a+=" : ")),null!=i&&(a+=aC(n)),a},getData:function(){return this._data},setData:function(t){this._data=t}});b(sC,Uh),sC.extend({type:"markPoint",defaultOption:{zlevel:0,z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}}});var lC=_;function uC(t,e,i,n,o,a){var r=[],s=dp(e,n)?e.getCalculationInfo("stackResultDimension"):n,l=mC(e,s,t),u=e.indicesOfNearest(s,l)[0];r[o]=e.get(i,u),r[a]=e.get(s,u);var h=e.get(n,u),c=Vl(e.get(n,u));return 0<=(c=Math.min(c,20))&&(r[a]=+r[a].toFixed(c)),[r,h]}var hC=T,cC={min:hC(uC,"min"),max:hC(uC,"max"),average:hC(uC,"average")};function dC(t,e){var i=t.getData(),n=t.coordinateSystem;if(e&&!function(t){return!isNaN(parseFloat(t.x))&&!isNaN(parseFloat(t.y))}(e)&&!O(e.coord)&&n){var o=n.dimensions,a=fC(e,i,n,t);if((e=L(e)).type&&cC[e.type]&&a.baseAxis&&a.valueAxis){var r=lC(o,a.baseAxis.dim),s=lC(o,a.valueAxis.dim),l=cC[e.type](i,a.baseDataDim,a.valueDataDim,r,s);e.coord=l[0],e.value=l[1]}else{for(var u=[null!=e.xAxis?e.xAxis:e.radiusAxis,null!=e.yAxis?e.yAxis:e.angleAxis],h=0;h<2;h++)cC[u[h]]&&(u[h]=mC(i,i.mapDimension(o[h]),u[h]));e.coord=u}}return e}function fC(t,e,i,n){var o={};return null!=t.valueIndex||null!=t.valueDim?(o.valueDataDim=null!=t.valueIndex?e.getDimension(t.valueIndex):t.valueDim,o.valueAxis=i.getAxis(function(t,e){var i=t.getData(),n=i.dimensions;e=i.getDimension(e);for(var o=0;o<n.length;o++){var a=i.getDimensionInfo(n[o]);if(a.name===e)return a.coordDim}}(n,o.valueDataDim)),o.baseAxis=i.getOtherAxis(o.valueAxis),o.baseDataDim=e.mapDimension(o.baseAxis.dim)):(o.baseAxis=n.getBaseAxis(),o.valueAxis=i.getOtherAxis(o.baseAxis),o.baseDataDim=e.mapDimension(o.baseAxis.dim),o.valueDataDim=e.mapDimension(o.valueAxis.dim)),o}function pC(t,e){return!(t&&t.containData&&e.coord&&!function(t){return!(isNaN(parseFloat(t.x))&&isNaN(parseFloat(t.y)))}(e))||t.containData(e.coord)}function gC(t,e,i,n){return n<2?t.coord&&t.coord[n]:t.value}function mC(t,e,i){if("average"!==i)return"median"===i?t.getMedian(e):t.getDataExtent(e,!0)["max"===i?1:0];var n=0,o=0;return t.each(e,function(t,e){isNaN(t)||(n+=t,o++)}),n/o}var vC=Tf({type:"marker",init:function(){this.markerGroupMap=Q()},render:function(t,i,n){var e=this.markerGroupMap;e.each(function(t){t.__keep=!1});var o=this.type+"Model";i.eachSeries(function(t){var e=t[o];e&&this.renderSeries(t,e,i,n)},this),e.each(function(t){t.__keep||this.group.remove(t.group)},this)},renderSeries:function(){}});function yC(s,l,u){var h=l.coordinateSystem;s.each(function(t){var e,i=s.getItemModel(t),n=Rl(i.get("x"),u.getWidth()),o=Rl(i.get("y"),u.getHeight());if(isNaN(n)||isNaN(o)){if(l.getMarkerPosition)e=l.getMarkerPosition(s.getValues(s.dimensions,t));else if(h){var a=s.get(h.dimensions[0],t),r=s.get(h.dimensions[1],t);e=h.dataToPoint([a,r])}}else e=[n,o];isNaN(n)||(e[0]=n),isNaN(o)||(e[1]=o),s.setItemLayout(t,e)})}vC.extend({type:"markPoint",updateTransform:function(t,e,i){e.eachSeries(function(t){var e=t.markPointModel;e&&(yC(e.getData(),t,i),this.markerGroupMap.get(t.id).updateLayout(e))},this)},renderSeries:function(t,l,e,i){var n=t.coordinateSystem,o=t.id,u=t.getData(),a=this.markerGroupMap,r=a.get(o)||a.set(o,new em),h=function(t,e,i){var n;n=t?N(t&&t.dimensions,function(t){return D({name:t},e.getData().getDimensionInfo(e.getData().mapDimension(t))||{})}):[{name:"value",type:"float"}];var o=new Xf(n,i),a=N(i.get("data"),T(dC,e));t&&(a=M(a,T(pC,t)));return o.initData(a,null,t?gC:function(t){return t.value}),o}(n,t,l);l.setData(h),yC(l.getData(),t,i),h.each(function(t){var e=h.getItemModel(t),i=e.getShallow("symbol"),n=e.getShallow("symbolSize"),o=C(i),a=C(n);if(o||a){var r=l.getRawValue(t),s=l.getDataParams(t);o&&(i=i(r,s)),a&&(n=n(r,s))}h.setItemVisual(t,{symbol:i,symbolSize:n,color:e.get("itemStyle.color")||u.getVisual("color")})}),r.updateData(h),this.group.add(r.group),h.eachItemGraphicEl(function(t){t.traverse(function(t){t.dataModel=l})}),r.__keep=!0,r.group.silent=l.get("silent")||t.get("silent")}}),vf(function(t){t.markPoint=t.markPoint||{}}),sC.extend({type:"markLine",defaultOption:{zlevel:0,z:5,symbol:["circle","arrow"],symbolSize:[8,16],precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"}});function xC(t,e,i,n){var o=t.getData(),a=n.type;if(!O(n)&&("min"===a||"max"===a||"average"===a||"median"===a||null!=n.xAxis||null!=n.yAxis)){var r,s;if(null!=n.yAxis||null!=n.xAxis)r=e.getAxis(null!=n.yAxis?"y":"x"),s=W(n.yAxis,n.xAxis);else{var l=fC(n,o,e,t);r=l.valueAxis,s=mC(o,fp(o,l.valueDataDim),a)}var u="x"===r.dim?0:1,h=1-u,c=L(n),d={};c.type=null,c.coord=[],d.coord=[],c.coord[h]=-1/0,d.coord[h]=1/0;var f=i.get("precision");0<=f&&"number"==typeof s&&(s=+s.toFixed(Math.min(f,20))),c.coord[u]=d.coord[u]=s,n=[c,d,{type:a,valueIndex:n.valueIndex,value:s}]}return(n=[dC(t,n[0]),dC(t,n[1]),k({},n[2])])[2].type=n[2].type||"",m(n[2],n[0]),m(n[2],n[1]),n}function _C(t){return!isNaN(t)&&!isFinite(t)}function wC(t,e,i,n){var o=1-t,a=n.dimensions[t];return _C(e[o])&&_C(i[o])&&e[t]===i[t]&&n.getAxis(a).containData(e[t])}function bC(t,e){if("cartesian2d"===t.type){var i=e[0].coord,n=e[1].coord;if(i&&n&&(wC(1,i,n,t)||wC(0,i,n,t)))return!0}return pC(t,e[0])&&pC(t,e[1])}function SC(t,e,i,n,o){var a,r=n.coordinateSystem,s=t.getItemModel(e),l=Rl(s.get("x"),o.getWidth()),u=Rl(s.get("y"),o.getHeight());if(isNaN(l)||isNaN(u)){if(n.getMarkerPosition)a=n.getMarkerPosition(t.getValues(t.dimensions,e));else{var h=r.dimensions,c=t.get(h[0],e),d=t.get(h[1],e);a=r.dataToPoint([c,d])}if("cartesian2d"===r.type){var f=r.getAxis("x"),p=r.getAxis("y");h=r.dimensions;_C(t.get(h[0],e))?a[0]=f.toGlobalCoord(f.getExtent()[i?0:1]):_C(t.get(h[1],e))&&(a[1]=p.toGlobalCoord(p.getExtent()[i?0:1]))}isNaN(l)||(a[0]=l),isNaN(u)||(a[1]=u)}else a=[l,u];t.setItemLayout(e,a)}vC.extend({type:"markLine",updateTransform:function(t,e,a){e.eachSeries(function(e){var t=e.markLineModel;if(t){var i=t.getData(),n=t.__from,o=t.__to;n.each(function(t){SC(n,t,!0,e,a),SC(o,t,!1,e,a)}),i.each(function(t){i.setItemLayout(t,[n.getItemLayout(t),o.getItemLayout(t)])}),this.markerGroupMap.get(e.id).updateLayout()}},this)},renderSeries:function(o,i,t,a){var e=o.coordinateSystem,n=o.id,r=o.getData(),s=this.markerGroupMap,l=s.get(n)||s.set(n,new dw);this.group.add(l.group);var u=function(t,e,i){var n;n=t?N(t&&t.dimensions,function(t){return D({name:t},e.getData().getDimensionInfo(e.getData().mapDimension(t))||{})}):[{name:"value",type:"float"}];var o=new Xf(n,i),a=new Xf(n,i),r=new Xf([],i),s=N(i.get("data"),T(xC,e,t,i));t&&(s=M(s,T(bC,t)));var l=t?gC:function(t){return t.value};return o.initData(N(s,function(t){return t[0]}),null,l),a.initData(N(s,function(t){return t[1]}),null,l),r.initData(N(s,function(t){return t[2]})),r.hasItemOption=!0,{from:o,to:a,line:r}}(e,o,i),h=u.from,c=u.to,d=u.line;i.__from=h,i.__to=c,i.setData(d);var f=i.get("symbol"),p=i.get("symbolSize");function g(t,e,i){var n=t.getItemModel(e);SC(t,e,i,o,a),t.setItemVisual(e,{symbolSize:n.get("symbolSize")||p[i?0:1],symbol:n.get("symbol",!0)||f[i?0:1],color:n.get("itemStyle.color")||r.getVisual("color")})}O(f)||(f=[f,f]),"number"==typeof p&&(p=[p,p]),u.from.each(function(t){g(h,t,!0),g(c,t,!1)}),d.each(function(t){var e=d.getItemModel(t).get("lineStyle.color");d.setItemVisual(t,{color:e||h.getItemVisual(t,"color")}),d.setItemLayout(t,[h.getItemLayout(t),c.getItemLayout(t)]),d.setItemVisual(t,{fromSymbolSize:h.getItemVisual(t,"symbolSize"),fromSymbol:h.getItemVisual(t,"symbol"),toSymbolSize:c.getItemVisual(t,"symbolSize"),toSymbol:c.getItemVisual(t,"symbol")})}),l.updateData(d),u.line.eachItemGraphicEl(function(t,e){t.traverse(function(t){t.dataModel=i})}),l.__keep=!0,l.group.silent=i.get("silent")||o.get("silent")}}),vf(function(t){t.markLine=t.markLine||{}}),sC.extend({type:"markArea",defaultOption:{zlevel:0,z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}}});function MC(t,e,i,n){var o=dC(t,n[0]),a=dC(t,n[1]),r=W,s=o.coord,l=a.coord;s[0]=r(s[0],-1/0),s[1]=r(s[1],-1/0),l[0]=r(l[0],1/0),l[1]=r(l[1],1/0);var u=p([{},o,a]);return u.coord=[o.coord,a.coord],u.x0=o.x,u.y0=o.y,u.x1=a.x,u.y1=a.y,u}function IC(t){return!isNaN(t)&&!isFinite(t)}function TC(t,e,i){var n=1-t;return IC(e[n])&&IC(i[n])}function AC(t,e){var i=e.coord[0],n=e.coord[1];return!("cartesian2d"!==t.type||!i||!n||!TC(1,i,n)&&!TC(0,i,n))||(pC(t,{coord:i,x:e.x0,y:e.y0})||pC(t,{coord:n,x:e.x1,y:e.y1}))}function DC(t,e,i,n,o){var a,r=n.coordinateSystem,s=t.getItemModel(e),l=Rl(s.get(i[0]),o.getWidth()),u=Rl(s.get(i[1]),o.getHeight());if(isNaN(l)||isNaN(u)){if(n.getMarkerPosition)a=n.getMarkerPosition(t.getValues(i,e));else{var h=[f=t.get(i[0],e),p=t.get(i[1],e)];r.clampData&&r.clampData(h,h),a=r.dataToPoint(h,!0)}if("cartesian2d"===r.type){var c=r.getAxis("x"),d=r.getAxis("y"),f=t.get(i[0],e),p=t.get(i[1],e);IC(f)?a[0]=c.toGlobalCoord(c.getExtent()["x0"===i[0]?0:1]):IC(p)&&(a[1]=d.toGlobalCoord(d.getExtent()["y0"===i[1]?0:1]))}isNaN(l)||(a[0]=l),isNaN(u)||(a[1]=u)}else a=[l,u];return a}var CC=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]];vC.extend({type:"markArea",updateTransform:function(t,e,o){e.eachSeries(function(i){var t=i.markAreaModel;if(t){var n=t.getData();n.each(function(e){var t=N(CC,function(t){return DC(n,e,t,i,o)});n.setItemLayout(e,t),n.getItemGraphicEl(e).setShape("points",t)})}},this)},renderSeries:function(i,r,t,n){var e=i.coordinateSystem,o=i.id,a=i.getData(),s=this.markerGroupMap,l=s.get(o)||s.set(o,{group:new Ci});this.group.add(l.group),l.__keep=!0;var u=function(t,i,e){var n,o;o=t?(n=N(t&&t.dimensions,function(t){var e=i.getData();return D({name:t},e.getDimensionInfo(e.mapDimension(t))||{})}),new Xf(N(["x0","y0","x1","y1"],function(t,e){return{name:t,type:n[e%2].type}}),e)):new Xf(n=[{name:"value",type:"float"}],e);var a=N(e.get("data"),T(MC,i,t,e));t&&(a=M(a,T(AC,t)));var r=t?function(t,e,i,n){return t.coord[Math.floor(n/2)][n%2]}:function(t){return t.value};return o.initData(a,null,r),o.hasItemOption=!0,o}(e,i,r);r.setData(u),u.each(function(e){u.setItemLayout(e,N(CC,function(t){return DC(u,e,t,i,n)})),u.setItemVisual(e,{color:a.getVisual("color")})}),u.diff(l.__data).add(function(t){var e=new Qr({shape:{points:u.getItemLayout(t)}});u.setItemGraphicEl(t,e),l.group.add(e)}).update(function(t,e){var i=l.__data.getItemGraphicEl(e);cl(i,{shape:{points:u.getItemLayout(t)}},r,t),l.group.add(i),u.setItemGraphicEl(t,i)}).remove(function(t){var e=l.__data.getItemGraphicEl(t);l.group.remove(e)}).execute(),u.eachItemGraphicEl(function(t,e){var i=u.getItemModel(e),n=i.getModel("label"),o=i.getModel("emphasis.label"),a=u.getItemVisual(e,"color");t.useStyle(D(i.getModel("itemStyle").getItemStyle(),{fill:Ke(a,.4),stroke:a})),t.hoverStyle=i.getModel("emphasis.itemStyle").getItemStyle(),el(t.style,t.hoverStyle,n,o,{labelFetcher:r,labelDataIndex:e,defaultText:u.getName(e)||"",isRectText:!0,autoColor:a}),$s(t,{}),t.dataModel=r}),l.__data=u,l.group.silent=r.get("silent")||i.get("silent")}}),vf(function(t){t.markArea=t.markArea||{}});var LC=Nc.legend.selector,kC={all:{type:"all",title:L(LC.all)},inverse:{type:"inverse",title:L(LC.inverse)}},PC=If({type:"legend.plain",dependencies:["series"],layoutMode:{type:"box",ignoreSize:!0},init:function(t,e,i){this.mergeDefaultAndTheme(t,i),t.selected=t.selected||{},this._updateSelector(t)},mergeOption:function(t){PC.superCall(this,"mergeOption",t),this._updateSelector(t)},_updateSelector:function(t){var i=t.selector;!0===i&&(i=t.selector=["all","inverse"]),O(i)&&E(i,function(t,e){R(t)&&(t={type:t}),i[e]=m(t,kC[t.type])})},optionUpdated:function(){this._updateData(this.ecModel);var t=this._data;if(t[0]&&"single"===this.get("selectedMode")){for(var e=!1,i=0;i<t.length;i++){var n=t[i].get("name");if(this.isSelected(n)){this.select(n),e=!0;break}}e||this.select(t[0].get("name"))}},_updateData:function(o){var a=[],r=[];o.eachRawSeries(function(t){var e,i=t.name;if(r.push(i),t.legendVisualProvider){var n=t.legendVisualProvider.getAllNames();o.isSeriesFiltered(t)||(r=r.concat(n)),n.length?a=a.concat(n):e=!0}else e=!0;e&&Uo(t)&&a.push(t.name)}),this._availableNames=r;var t=N(this.get("data")||a,function(t){return"string"!=typeof t&&"number"!=typeof t||(t={name:t}),new Cl(t,this,this.ecModel)},this);this._data=t},getData:function(){return this._data},select:function(t){var e=this.option.selected;"single"===this.get("selectedMode")&&E(this._data,function(t){e[t.get("name")]=!1});e[t]=!0},unSelect:function(t){"single"!==this.get("selectedMode")&&(this.option.selected[t]=!1)},toggleSelected:function(t){var e=this.option.selected;e.hasOwnProperty(t)||(e[t]=!0),this[e[t]?"unSelect":"select"](t)},allSelect:function(){var t=this._data,e=this.option.selected;E(t,function(t){e[t.get("name",!0)]=!0})},inverseSelect:function(){var t=this._data,i=this.option.selected;E(t,function(t){var e=t.get("name",!0);i.hasOwnProperty(e)||(i[e]=!0),i[e]=!i[e]})},isSelected:function(t){var e=this.option.selected;return!(e.hasOwnProperty(t)&&!e[t])&&0<=_(this._availableNames,t)},getOrient:function(){return"vertical"===this.get("orient")?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},defaultOption:{zlevel:0,z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",itemStyle:{borderWidth:0},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:" sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}}});function NC(t,e,i){var o,a={},r="toggleSelected"===t;return i.eachComponent("legend",function(n){r&&null!=o?n[o?"select":"unSelect"](e.name):"allSelect"===t||"inverseSelect"===t?n[t]():(n[t](e.name),o=n.isSelected(e.name)),E(n.getData(),function(t){var e=t.get("name");if("\n"!==e&&""!==e){var i=n.isSelected(e);a.hasOwnProperty(e)?a[e]=a[e]&&i:a[e]=i}})}),"allSelect"===t||"inverseSelect"===t?{selected:a}:{name:e.name,selected:a}}xf("legendToggleSelect","legendselectchanged",T(NC,"toggleSelected")),xf("legendAllSelect","legendselectall",T(NC,"allSelect")),xf("legendInverseSelect","legendinverseselect",T(NC,"inverseSelect")),xf("legendSelect","legendselected",T(NC,"select")),xf("legendUnSelect","legendunselected",T(NC,"unSelect"));var OC=T,EC=E,RC=Ci,zC=Tf({type:"legend.plain",newlineDisabled:!1,init:function(){this.group.add(this._contentGroup=new RC),this._backgroundEl,this.group.add(this._selectorGroup=new RC),this._isFirstRender=!0},getContentGroup:function(){return this._contentGroup},getSelectorGroup:function(){return this._selectorGroup},render:function(t,e,i){var n=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),t.get("show",!0)){var o=t.get("align"),a=t.get("orient");o&&"auto"!==o||(o="right"===t.get("left")&&"vertical"===a?"right":"left");var r=t.get("selector",!0),s=t.get("selectorPosition",!0);!r||s&&"auto"!==s||(s="horizontal"===a?"end":"start"),this.renderInner(o,t,e,i,r,a,s);var l=t.getBoxLayoutParams(),u={width:i.getWidth(),height:i.getHeight()},h=t.get("padding"),c=wu(l,u,h),d=this.layoutInner(t,o,c,n,r,s),f=wu(D({width:d.width,height:d.height},l),u,h);this.group.attr("position",[f.x-d.x,f.y-d.y]),this.group.add(this._backgroundEl=iA(d,t))}},resetInner:function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},renderInner:function(u,h,c,d,t,e,i){var f=this.getContentGroup(),p=Q(),g=h.get("selectedMode"),m=[];c.eachRawSeries(function(t){t.get("legendHoverLink")||m.push(t.id)}),EC(h.getData(),function(a,r){var s=a.get("name");if(this.newlineDisabled||""!==s&&"\n"!==s){var t=c.getSeriesByName(s)[0];if(!p.get(s))if(t){var e=t.getData(),i=e.getVisual("color"),n=e.getVisual("borderColor");"function"==typeof i&&(i=i(t.getDataParams(0))),"function"==typeof n&&(n=n(t.getDataParams(0)));var o=e.getVisual("legendSymbol")||"roundRect",l=e.getVisual("symbol");this._createItem(s,r,a,h,o,l,u,i,n,g).on("click",OC(VC,s,null,d,m)).on("mouseover",OC(GC,t.name,null,d,m)).on("mouseout",OC(FC,t.name,null,d,m)),p.set(s,!0)}else c.eachRawSeries(function(t){if(!p.get(s)&&t.legendVisualProvider){var e=t.legendVisualProvider;if(!e.containName(s))return;var i=e.indexOfName(s),n=e.getItemVisual(i,"color"),o=e.getItemVisual(i,"borderColor");this._createItem(s,r,a,h,"roundRect",null,u,n,o,g).on("click",OC(VC,null,s,d,m)).on("mouseover",OC(GC,null,s,d,m)).on("mouseout",OC(FC,null,s,d,m)),p.set(s,!0)}},this)}else f.add(new RC({newline:!0}))},this),t&&this._createSelector(t,h,d,e,i)},_createSelector:function(t,a,r,e,i){var s=this.getSelectorGroup();EC(t,function(t){!function(t){var e=t.type,i=new Ur({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){r.dispatchAction({type:"all"===e?"legendAllSelect":"legendInverseSelect"})}});s.add(i);var n=a.getModel("selectorLabel"),o=a.getModel("emphasis.selectorLabel");el(i.style,i.hoverStyle={},n,o,{defaultText:t.title,isRectText:!1}),$s(i)}(t)})},_createItem:function(t,e,i,n,o,a,r,s,l,u){var h=n.get("itemWidth"),c=n.get("itemHeight"),d=n.get("inactiveColor"),f=n.get("inactiveBorderColor"),p=n.get("symbolKeepAspect"),g=n.getModel("itemStyle"),m=n.isSelected(t),v=new RC,y=i.getModel("textStyle"),x=i.get("icon"),_=i.getModel("tooltip"),w=_.parentModel,b=_g(o=x||o,0,0,h,c,m?s:d,null==p||p);if(v.add(BC(b,o,g,l,f,m)),!x&&a&&(a!==o||"none"===a)){var S=.8*c;"none"===a&&(a="circle");var M=_g(a,(h-S)/2,(c-S)/2,S,S,m?s:d,null==p||p);v.add(BC(M,a,g,l,f,m))}var I="left"===r?h+5:-5,T=r,A=n.get("formatter"),D=t;"string"==typeof A&&A?D=A.replace("{name}",null!=t?t:""):"function"==typeof A&&(D=A(t)),v.add(new Ur({style:nl({},y,{text:D,x:I,y:c/2,textFill:m?y.getTextColor():d,textAlign:T,textVerticalAlign:"middle"})}));var C=new rs({shape:v.getBoundingRect(),invisible:!0,tooltip:_.get("show")?k({content:t,formatter:w.get("formatter",!0)||function(){return t},formatterParams:{componentType:"legend",legendIndex:n.componentIndex,name:t,$vars:["name"]}},_.option):null});return v.add(C),v.eachChild(function(t){t.silent=!0}),C.silent=!u,this.getContentGroup().add(v),$s(v),v.__legendDataIndex=e,v},layoutInner:function(t,e,i,n,o,a){var r=this.getContentGroup(),s=this.getSelectorGroup();_u(t.get("orient"),r,t.get("itemGap"),i.width,i.height);var l=r.getBoundingRect(),u=[-l.x,-l.y];if(o){_u("horizontal",s,t.get("selectorItemGap",!0));var h=s.getBoundingRect(),c=[-h.x,-h.y],d=t.get("selectorButtonGap",!0),f=t.getOrient().index,p=0===f?"width":"height",g=0===f?"height":"width",m=0===f?"y":"x";"end"===a?c[f]+=l[p]+d:u[f]+=h[p]+d,c[1-f]+=l[g]/2-h[g]/2,s.attr("position",c),r.attr("position",u);var v={x:0,y:0};return v[p]=l[p]+d+h[p],v[g]=Math.max(l[g],h[g]),v[m]=Math.min(0,h[m]+c[1-f]),v}return r.attr("position",u),this.group.getBoundingRect()},remove:function(){this.getContentGroup().removeAll(),this._isFirstRender=!0}});function BC(t,e,i,n,o,a){var r;return"line"!==e&&e.indexOf("empty")<0?(r=i.getItemStyle(),t.style.stroke=n,a||(r.stroke=o)):r=i.getItemStyle(["borderWidth","borderColor"]),t.setStyle(r)}function VC(t,e,i,n){FC(t,e,i,n),i.dispatchAction({type:"legendToggleSelect",name:null!=t?t:e}),GC(t,e,i,n)}function GC(t,e,i,n){var o=i.getZr().storage.getDisplayList()[0];o&&o.useHoverLayer||i.dispatchAction({type:"highlight",seriesName:t,name:e,excludeSeriesId:n})}function FC(t,e,i,n){var o=i.getZr().storage.getDisplayList()[0];o&&o.useHoverLayer||i.dispatchAction({type:"downplay",seriesName:t,name:e,excludeSeriesId:n})}yf(Cd.PROCESSOR.SERIES_FILTER,function(t){var i=t.findComponents({mainType:"legend"});i&&i.length&&t.filterSeries(function(t){for(var e=0;e<i.length;e++)if(!i[e].isSelected(t.name))return!1;return!0})}),Lu.registerSubTypeDefaulter("legend",function(){return"plain"});var WC=PC.extend({type:"legend.scroll",setScrollDataIndex:function(t){this.option.scrollDataIndex=t},defaultOption:{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:"end",pageFormatter:"{current}/{total}",pageIcons:{horizontal:["M0,0L12,-10L12,10z","M0,0L-12,-10L-12,10z"],vertical:["M0,0L20,0L10,-20z","M0,0L20,0L10,20z"]},pageIconColor:"#2f4554",pageIconInactiveColor:"#aaa",pageIconSize:15,pageTextStyle:{color:"#333"},animationDurationUpdate:800},init:function(t,e,i,n){var o=Mu(t);WC.superCall(this,"init",t,e,i,n),HC(this,t,o)},mergeOption:function(t,e){WC.superCall(this,"mergeOption",t,e),HC(this,this.option,t)}});function HC(t,e,i){var n=[1,1];n[t.getOrient().index]=0,Su(e,i,{type:"box",ignoreSize:n})}var ZC=Ci,UC=["width","height"],XC=["x","y"],YC=zC.extend({type:"legend.scroll",newlineDisabled:!0,init:function(){YC.superCall(this,"init"),this._currentIndex=0,this.group.add(this._containerGroup=new ZC),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new ZC),this._showController},resetInner:function(){YC.superCall(this,"resetInner"),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},renderInner:function(t,o,e,a,i,n,r){var s=this;YC.superCall(this,"renderInner",t,o,e,a,i,n,r);var l=this._controllerGroup,u=o.get("pageIconSize",!0);O(u)||(u=[u,u]),c("pagePrev",0);var h=o.getModel("pageTextStyle");function c(t,e){var i=t+"DataIndex",n=yl(o.get("pageIcons",!0)[o.getOrient().name][e],{onclick:A(s._pageGo,s,i,o,a)},{x:-u[0]/2,y:-u[1]/2,width:u[0],height:u[1]});n.name=t,l.add(n)}l.add(new Ur({name:"pageText",style:{textFill:h.getTextColor(),font:h.getFont(),textVerticalAlign:"middle",textAlign:"center"},silent:!0})),c("pageNext",1)},layoutInner:function(t,e,i,n,o,a){var r=this.getSelectorGroup(),s=t.getOrient().index,l=UC[s],u=XC[s],h=UC[1-s],c=XC[1-s];o&&_u("horizontal",r,t.get("selectorItemGap",!0));var d=t.get("selectorButtonGap",!0),f=r.getBoundingRect(),p=[-f.x,-f.y],g=L(i);o&&(g[l]=i[l]-f[l]-d);var m=this._layoutContentAndController(t,n,g,s,l,h,c);if(o){if("end"===a)p[s]+=m[l]+d;else{var v=f[l]+d;p[s]-=v,m[u]-=v}m[l]+=f[l]+d,p[1-s]+=m[c]+m[h]/2-f[h]/2,m[h]=Math.max(m[h],f[h]),m[c]=Math.min(m[c],f[c]+p[1-s]),r.attr("position",p)}return m},_layoutContentAndController:function(t,e,i,n,o,a,r){var s=this.getContentGroup(),l=this._containerGroup,u=this._controllerGroup;_u(t.get("orient"),s,t.get("itemGap"),n?i.width:null,n?null:i.height),_u("horizontal",u,t.get("pageButtonItemGap",!0));var h=s.getBoundingRect(),c=u.getBoundingRect(),d=this._showController=h[o]>i[o],f=[-h.x,-h.y];e||(f[n]=s.position[n]);var p=[0,0],g=[-c.x,-c.y],m=H(t.get("pageButtonGap",!0),t.get("itemGap",!0));d&&("end"===t.get("pageButtonPosition",!0)?g[n]+=i[o]-c[o]:p[n]+=c[o]+m);g[1-n]+=h[a]/2-c[a]/2,s.attr("position",f),l.attr("position",p),u.attr("position",g);var v={x:0,y:0};if(v[o]=d?i[o]:h[o],v[a]=Math.max(h[a],c[a]),v[r]=Math.min(0,c[r]+g[1-n]),l.__rectSize=i[o],d){var y={x:0,y:0};y[o]=Math.max(i[o]-c[o]-m,0),y[a]=v[a],l.setClipPath(new rs({shape:y})),l.__rectSize=y[o]}else u.eachChild(function(t){t.attr({invisible:!0,silent:!0})});var x=this._getPageInfo(t);return null!=x.pageIndex&&cl(s,{position:x.contentPosition},d&&t),this._updatePageInfoView(t,x),v},_pageGo:function(t,e,i){var n=this._getPageInfo(e)[t];null!=n&&i.dispatchAction({type:"legendScroll",scrollDataIndex:n,legendId:e.id})},_updatePageInfoView:function(n,o){var a=this._controllerGroup;E(["pagePrev","pageNext"],function(t){var e=null!=o[t+"DataIndex"],i=a.childOfName(t);i&&(i.setStyle("fill",e?n.get("pageIconColor",!0):n.get("pageIconInactiveColor",!0)),i.cursor=e?"pointer":"default")});var t=a.childOfName("pageText"),e=n.get("pageFormatter"),i=o.pageIndex,r=null!=i?i+1:0,s=o.pageCount;t&&e&&t.setStyle("text",R(e)?e.replace("{current}",r).replace("{total}",s):e({current:r,total:s}))},_getPageInfo:function(t){var e=t.get("scrollDataIndex",!0),i=this.getContentGroup(),n=this._containerGroup.__rectSize,o=t.getOrient().index,a=UC[o],r=XC[o],s=this._findTargetItemIndex(e),l=i.children(),u=l[s],h=l.length,c=h?1:0,d={contentPosition:i.position.slice(),pageCount:c,pageIndex:c-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!u)return d;var f=y(u);d.contentPosition[o]=-f.s;for(var p=s+1,g=f,m=f,v=null;p<=h;++p)(!(v=y(l[p]))&&m.e>g.s+n||v&&!x(v,g.s))&&(g=m.i>g.i?m:v)&&(null==d.pageNextDataIndex&&(d.pageNextDataIndex=g.i),++d.pageCount),m=v;for(p=s-1,g=f,m=f,v=null;-1<=p;--p)(v=y(l[p]))&&x(m,v.s)||!(g.i<m.i)||(m=g,null==d.pagePrevDataIndex&&(d.pagePrevDataIndex=g.i),++d.pageCount,++d.pageIndex),g=v;return d;function y(t){if(t){var e=t.getBoundingRect(),i=e[r]+t.position[o];return{s:i,e:i+e[a],i:t.__legendDataIndex}}}function x(t,e){return t.e>=e&&t.s<=e+n}},_findTargetItemIndex:function(n){return this._showController?(this.getContentGroup().eachChild(function(t,e){var i=t.__legendDataIndex;null==a&&null!=i&&(a=e),i===n&&(o=e)}),null!=o?o:a):0;var o,a}});xf("legendScroll","legendscroll",function(t,e){var i=t.scrollDataIndex;null!=i&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},function(t){t.setScrollDataIndex(i)})});JA.extend({type:"dataZoom.slider",layoutMode:"box",defaultOption:{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#2f4554",width:.5,opacity:.3},areaStyle:{color:"rgba(47,69,84,0.3)",opacity:.3}},borderColor:"#ddd",fillerColor:"rgba(167,183,204,0.4)",handleIcon:"M8.2,13.6V3.9H6.3v9.7H3.1v14.9h3.3v9.7h1.8v-9.7h3.3V13.6H8.2z M9.7,24.4H4.8v-1.4h4.9V24.4z M9.7,19.1H4.8v-1.4h4.9V19.1z",handleSize:"100%",handleStyle:{color:"#a7b7cc"},labelPrecision:null,labelFormatter:null,showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#333"}}});var jC=rs,qC=El,KC=Bl,$C=A,JC=E,QC="horizontal",tL="vertical",eL=["line","bar","candlestick","scatter"],iL=eD.extend({type:"dataZoom.slider",init:function(t,e){this._displayables={},this._orient,this._range,this._handleEnds,this._size,this._handleWidth,this._handleHeight,this._location,this._dragging,this._dataShadowInfo,this.api=e},render:function(t,e,i,n){iL.superApply(this,"render",arguments),Lc(this,"_dispatchZoomAction",this.dataZoomModel.get("throttle"),"fixRate"),this._orient=t.get("orient"),!1!==this.dataZoomModel.get("show")?(n&&"dataZoom"===n.type&&n.from===this.uid||this._buildView(),this._updateView()):this.group.removeAll()},remove:function(){iL.superApply(this,"remove",arguments),kc(this,"_dispatchZoomAction")},dispose:function(){iL.superApply(this,"dispose",arguments),kc(this,"_dispatchZoomAction")},_buildView:function(){var t=this.group;t.removeAll(),this._resetLocation(),this._resetInterval();var e=this._displayables.barGroup=new Ci;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(e),this._positionGroup()},_resetLocation:function(){var t=this.dataZoomModel,e=this.api,i=this._findCoordRect(),n={width:e.getWidth(),height:e.getHeight()},o=this._orient===QC?{right:n.width-i.x-i.width,top:n.height-30-7,width:i.width,height:30}:{right:7,top:i.y,width:30,height:i.height},a=Mu(t.option);E(["right","top","width","height"],function(t){"ph"===a[t]&&(a[t]=o[t])});var r=wu(a,n,t.padding);this._location={x:r.x,y:r.y},this._size=[r.width,r.height],this._orient===tL&&this._size.reverse()},_positionGroup:function(){var t=this.group,e=this._location,i=this._orient,n=this.dataZoomModel.getFirstTargetAxisModel(),o=n&&n.get("inverse"),a=this._displayables.barGroup,r=(this._dataShadowInfo||{}).otherAxisInverse;a.attr(i!==QC||o?i===QC&&o?{scale:r?[-1,1]:[-1,-1]}:i!==tL||o?{scale:r?[-1,-1]:[-1,1],rotation:Math.PI/2}:{scale:r?[1,-1]:[1,1],rotation:Math.PI/2}:{scale:r?[1,1]:[1,-1]});var s=t.getBoundingRect([a]);t.attr("position",[e.x-s.x,e.y-s.y])},_getViewExtent:function(){return[0,this._size[0]]},_renderBackground:function(){var t=this.dataZoomModel,e=this._size,i=this._displayables.barGroup;i.add(new jC({silent:!0,shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:t.get("backgroundColor")},z2:-40})),i.add(new jC({shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:"transparent"},z2:0,onclick:A(this._onClickPanelClick,this)}))},_renderDataShadow:function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(t){var e=this._size,i=t.series,n=i.getRawData(),o=i.getShadowDim?i.getShadowDim():t.otherDim;if(null!=o){var a=n.getDataExtent(o),r=.3*(a[1]-a[0]);a=[a[0]-r,a[1]+r];var s,l=[0,e[1]],u=[0,e[0]],h=[[e[0],0],[0,0]],c=[],d=u[1]/(n.count()-1),f=0,p=Math.round(n.count()/e[0]);n.each([o],function(t,e){if(0<p&&e%p)f+=d;else{var i=null==t||isNaN(t)||""===t,n=i?0:qC(t,a,l,!0);i&&!s&&e?(h.push([h[h.length-1][0],0]),c.push([c[c.length-1][0],0])):!i&&s&&(h.push([f,0]),c.push([f,0])),h.push([f,n]),c.push([f,n]),f+=d,s=i}});var g=this.dataZoomModel;this._displayables.barGroup.add(new Qr({shape:{points:h},style:D({fill:g.get("dataBackgroundColor")},g.getModel("dataBackground.areaStyle").getAreaStyle()),silent:!0,z2:-20})),this._displayables.barGroup.add(new ts({shape:{points:c},style:g.getModel("dataBackground.lineStyle").getLineStyle(),silent:!0,z2:-19}))}}},_prepareDataShadowInfo:function(){var t=this.dataZoomModel,s=t.get("showDataShadow");if(!1!==s){var l,u=this.ecModel;return t.eachTargetAxis(function(a,r){E(t.getAxisProxy(a.name,r).getTargetSeriesModels(),function(t){if(!(l||!0!==s&&_(eL,t.get("type"))<0)){var e,i=u.getComponent(a.axis,r).axis,n=function(t){return{x:"y",y:"x",radius:"angle",angle:"radius"}[t]}(a.name),o=t.coordinateSystem;null!=n&&o.getOtherAxis&&(e=o.getOtherAxis(i).inverse),n=t.getData().mapDimension(n),l={thisAxis:i,series:t,thisDim:a.name,otherDim:n,otherAxisInverse:e}}},this)},this),l}},_renderHandle:function(){var t=this._displayables,a=t.handles=[],r=t.handleLabels=[],s=this._displayables.barGroup,e=this._size,l=this.dataZoomModel;s.add(t.filler=new jC({draggable:!0,cursor:nL(this._orient),drift:$C(this._onDragMove,this,"all"),ondragstart:$C(this._showDataInfo,this,!0),ondragend:$C(this._onDragEnd,this),onmouseover:$C(this._showDataInfo,this,!0),onmouseout:$C(this._showDataInfo,this,!1),style:{fill:l.get("fillerColor"),textPosition:"inside"}})),s.add(new jC({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:e[0],height:e[1]},style:{stroke:l.get("dataBackgroundColor")||l.get("borderColor"),lineWidth:1,fill:"rgba(0,0,0,0)"}})),JC([0,1],function(t){var e=yl(l.get("handleIcon"),{cursor:nL(this._orient),draggable:!0,drift:$C(this._onDragMove,this,t),ondragend:$C(this._onDragEnd,this),onmouseover:$C(this._showDataInfo,this,!0),onmouseout:$C(this._showDataInfo,this,!1)},{x:-1,y:0,width:2,height:2}),i=e.getBoundingRect();this._handleHeight=Rl(l.get("handleSize"),this._size[1]),this._handleWidth=i.width/i.height*this._handleHeight,e.setStyle(l.getModel("handleStyle").getItemStyle());var n=l.get("handleColor");null!=n&&(e.style.fill=n),s.add(a[t]=e);var o=l.textStyleModel;this.group.add(r[t]=new Ur({silent:!0,invisible:!0,style:{x:0,y:0,text:"",textVerticalAlign:"middle",textAlign:"center",textFill:o.getTextColor(),textFont:o.getFont()},z2:10}))},this)},_resetInterval:function(){var t=this._range=this.dataZoomModel.getPercentRange(),e=this._getViewExtent();this._handleEnds=[qC(t[0],[0,100],e,!0),qC(t[1],[0,100],e,!0)]},_updateInterval:function(t,e){var i=this.dataZoomModel,n=this._handleEnds,o=this._getViewExtent(),a=i.findRepresentativeAxisProxy().getMinMaxSpan(),r=[0,100];Kw(e,n,o,i.get("zoomLock")?"all":t,null!=a.minSpan?qC(a.minSpan,r,o,!0):null,null!=a.maxSpan?qC(a.maxSpan,r,o,!0):null);var s=this._range,l=this._range=KC([qC(n[0],o,r,!0),qC(n[1],o,r,!0)]);return!s||s[0]!==l[0]||s[1]!==l[1]},_updateView:function(t){var n=this._displayables,o=this._handleEnds,e=KC(o.slice()),a=this._size;JC([0,1],function(t){var e=n.handles[t],i=this._handleHeight;e.attr({scale:[i/2,i/2],position:[o[t],a[1]/2-i/2]})},this),n.filler.setShape({x:e[0],y:0,width:e[1]-e[0],height:a[1]}),this._updateDataInfo(t)},_updateDataInfo:function(t){var e=this.dataZoomModel,a=this._displayables,r=a.handleLabels,s=this._orient,l=["",""];if(e.get("showDetail")){var i=e.findRepresentativeAxisProxy();if(i){var n=i.getAxisModel().axis,o=this._range,u=t?i.calculateDataWindow({start:o[0],end:o[1]}).valueWindow:i.getDataValueWindow();l=[this._formatLabel(u[0],n),this._formatLabel(u[1],n)]}}var h=KC(this._handleEnds.slice());function c(t){var e=fl(a.handles[t].parent,this.group),i=gl(0===t?"right":"left",e),n=this._handleWidth/2+5,o=pl([h[t]+(0===t?-n:n),this._size[1]/2],e);r[t].setStyle({x:o[0],y:o[1],textVerticalAlign:s===QC?"middle":i,textAlign:s===QC?i:"center",text:l[t]})}c.call(this,0),c.call(this,1)},_formatLabel:function(t,e){var i=this.dataZoomModel,n=i.get("labelFormatter"),o=i.get("labelPrecision");null!=o&&"auto"!==o||(o=e.getPixelPrecision());var a=null==t||isNaN(t)?"":"category"===e.type||"time"===e.type?e.scale.getLabel(Math.round(t)):t.toFixed(Math.min(o,20));return C(n)?n(t,a):R(n)?n.replace("{value}",a):a},_showDataInfo:function(t){t=this._dragging||t;var e=this._displayables.handleLabels;e[0].attr("invisible",!t),e[1].attr("invisible",!t)},_onDragMove:function(t,e,i,n){this._dragging=!0,Xt(n.event);var o=pl([e,i],this._displayables.barGroup.getLocalTransform(),!0),a=this._updateInterval(t,o[0]),r=this.dataZoomModel.get("realtime");this._updateView(!r),a&&r&&this._dispatchZoomAction()},_onDragEnd:function(){this._dragging=!1,this._showDataInfo(!1),this.dataZoomModel.get("realtime")||this._dispatchZoomAction()},_onClickPanelClick:function(t){var e=this._size,i=this._displayables.barGroup.transformCoordToLocal(t.offsetX,t.offsetY);if(!(i[0]<0||i[0]>e[0]||i[1]<0||i[1]>e[1])){var n=this._handleEnds,o=(n[0]+n[1])/2,a=this._updateInterval("all",i[0]-o);this._updateView(),a&&this._dispatchZoomAction()}},_dispatchZoomAction:function(){var t=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,start:t[0],end:t[1]})},_findCoordRect:function(){var i;if(JC(this.getTargetCoordInfo(),function(t){if(!i&&t.length){var e=t[0].model.coordinateSystem;i=e.getRect&&e.getRect()}}),!i){var t=this.api.getWidth(),e=this.api.getHeight();i={x:.2*t,y:.2*e,width:.6*t,height:.6*e}}return i}});function nL(t){return"vertical"===t?"ns-resize":"ew-resize"}JA.extend({type:"dataZoom.inside",defaultOption:{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}});var oL="\0_ec_dataZoom_roams";function aL(t,n){var e=sL(t),o=n.dataZoomId,a=n.coordId;E(e,function(t,e){var i=t.dataZoomInfos;i[o]&&_(n.allCoordIds,a)<0&&(delete i[o],t.count--)}),lL(e);var i=e[a];i||((i=e[a]={coordId:a,dataZoomInfos:{},count:0}).controller=function(t,r){var e=new zy(t.getZr());return E(["pan","zoom","scrollMove"],function(a){e.on(a,function(n){var o=[];E(r.dataZoomInfos,function(t){if(n.isAvailableBehavior(t.dataZoomModel.option)){var e=(t.getRange||{})[a],i=e&&e(r.controller,n);!t.dataZoomModel.get("disabled",!0)&&i&&o.push({dataZoomId:t.dataZoomId,start:i[0],end:i[1]})}}),o.length&&r.dispatchAction(o)})}),e}(t,i),i.dispatchAction=T(uL,t)),i.dataZoomInfos[o]||i.count++,i.dataZoomInfos[o]=n;var r=function(t){var n,o={type_true:2,type_move:1,type_false:0,type_undefined:-1},a=!0;return E(t,function(t){var e=t.dataZoomModel,i=!e.get("disabled",!0)&&(!e.get("zoomLock",!0)||"move");o["type_"+n]<o["type_"+i]&&(n=i),a&=e.get("preventDefaultMouseMove",!0)}),{controlType:n,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!a}}}(i.dataZoomInfos);i.controller.enable(r.controlType,r.opt),i.controller.setPointerChecker(n.containsPoint),Lc(i,"dispatchAction",n.dataZoomModel.get("throttle",!0),"fixRate")}function rL(t){return t.type+"\0_"+t.id}function sL(t){var e=t.getZr();return e[oL]||(e[oL]={})}function lL(i){E(i,function(t,e){t.count||(t.controller.dispose(),delete i[e])})}function uL(t,e){t.dispatchAction({type:"dataZoom",batch:e})}var hL=A,cL=eD.extend({type:"dataZoom.inside",init:function(t,e){this._range},render:function(r,t,s,e){cL.superApply(this,"render",arguments),this._range=r.getPercentRange(),E(this.getTargetCoordInfo(),function(t,o){var a=N(t,function(t){return rL(t.model)});E(t,function(e){var n=e.model,i={};E(["pan","zoom","scrollMove"],function(t){i[t]=hL(dL[t],this,e,o)},this),aL(s,{coordId:rL(n),allCoordIds:a,containsPoint:function(t,e,i){return n.coordinateSystem.containPoint([e,i])},dataZoomId:r.id,dataZoomModel:r,getRange:i})},this)},this)},dispose:function(){!function(t,i){var e=sL(t);E(e,function(t){t.controller.dispose();var e=t.dataZoomInfos;e[i]&&(delete e[i],t.count--)}),lL(e)}(this.api,this.dataZoomModel.id),cL.superApply(this,"dispose",arguments),this._range=null}}),dL={zoom:function(t,e,i,n){var o=this._range,a=o.slice(),r=t.axisModels[0];if(r){var s=gL[e](null,[n.originX,n.originY],r,i,t),l=(0<s.signal?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(a[1]-a[0])+a[0],u=Math.max(1/n.scale,0);a[0]=(a[0]-l)*u+l,a[1]=(a[1]-l)*u+l;var h=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();return Kw(0,a,[0,100],0,h.minSpan,h.maxSpan),this._range=a,o[0]!==a[0]||o[1]!==a[1]?a:void 0}},pan:fL(function(t,e,i,n,o,a){var r=gL[n]([a.oldX,a.oldY],[a.newX,a.newY],e,o,i);return r.signal*(t[1]-t[0])*r.pixel/r.pixelLength}),scrollMove:fL(function(t,e,i,n,o,a){return gL[n]([0,0],[a.scrollDelta,a.scrollDelta],e,o,i).signal*(t[1]-t[0])*a.scrollDelta})};function fL(l){return function(t,e,i,n){var o=this._range,a=o.slice(),r=t.axisModels[0];if(r){var s=l(a,r,t,e,i,n);return Kw(s,a,[0,100],"all"),this._range=a,o[0]!==a[0]||o[1]!==a[1]?a:void 0}}}function pL(t){var e=t&&t.visualMap;O(e)||(e=e?[e]:[]),mL(e,function(t){if(t){vL(t,"splitList")&&!vL(t,"pieces")&&(t.pieces=t.splitList,delete t.splitList);var e=t.pieces;e&&O(e)&&mL(e,function(t){z(t)&&(vL(t,"start")&&!vL(t,"min")&&(t.min=t.start),vL(t,"end")&&!vL(t,"max")&&(t.max=t.end))})}})}var gL={grid:function(t,e,i,n,o){var a=i.axis,r={},s=o.model.coordinateSystem.getRect();return t=t||[0,0],"x"===a.dim?(r.pixel=e[0]-t[0],r.pixelLength=s.width,r.pixelStart=s.x,r.signal=a.inverse?1:-1):(r.pixel=e[1]-t[1],r.pixelLength=s.height,r.pixelStart=s.y,r.signal=a.inverse?-1:1),r},polar:function(t,e,i,n,o){var a=i.axis,r={},s=o.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return t=t?s.pointToCoord(t):[0,0],e=s.pointToCoord(e),"radiusAxis"===i.mainType?(r.pixel=e[0]-t[0],r.pixelLength=l[1]-l[0],r.pixelStart=l[0],r.signal=a.inverse?1:-1):(r.pixel=e[1]-t[1],r.pixelLength=u[1]-u[0],r.pixelStart=u[0],r.signal=a.inverse?-1:1),r},singleAxis:function(t,e,i,n,o){var a=i.axis,r=o.model.coordinateSystem.getRect(),s={};return t=t||[0,0],"horizontal"===a.orient?(s.pixel=e[0]-t[0],s.pixelLength=r.width,s.pixelStart=r.x,s.signal=a.inverse?1:-1):(s.pixel=e[1]-t[1],s.pixelLength=r.height,s.pixelStart=r.y,s.signal=a.inverse?-1:1),s}},mL=E;function vL(t,e){return t&&t.hasOwnProperty&&t.hasOwnProperty(e)}Lu.registerSubTypeDefaulter("visualMap",function(t){return t.categories||(t.pieces?0<t.pieces.length:0<t.splitNumber)&&!t.calculable?"piecewise":"continuous"});var yL=Cd.VISUAL.COMPONENT;function xL(t,e,i,n){for(var o=e.targetVisuals[n],a=f_.prepareVisualTypes(o),r={color:t.getData().getVisual("color")},s=0,l=a.length;s<l;s++){var u=a[s],h=o["opacity"===u?"__alphaForOpacity":u];h&&h.applyVisual(i,c,d)}return r.color;function c(t){return r[t]}function d(t,e){r[t]=e}}bf(yL,{createOnAllSeries:!0,reset:function(i,t){var n=[];return t.eachComponent("visualMap",function(t){var e=i.pipelineContext;!t.isTargetSeries(i)||e&&e.large||n.push(function(t,f,p,g){var m={};return E(t,function(t){var e=f_.prepareVisualTypes(f[t]);m[t]=e}),{progress:function(t,i){function e(t){return i.getItemVisual(o,t)}function n(t,e){i.setItemVisual(o,t,e)}var o;for(null!=g&&(g=i.getDimension(g));null!=(o=t.next());){var a=i.getRawDataItem(o);if(!a||!1!==a.visualMap)for(var r=null!=g?i.get(g,o,!0):o,s=p(r),l=f[s],u=m[s],h=0,c=u.length;h<c;h++){var d=u[h];l[d]&&l[d].applyVisual(r,e,n)}}}}}(t.stateList,t.targetVisuals,A(t.getValueState,t),t.getDataDimension(i.getData())))}),n}}),bf(yL,{createOnAllSeries:!0,reset:function(o,t){var a=o.getData(),r=[];t.eachComponent("visualMap",function(t){if(t.isTargetSeries(o)){var e=t.getVisualMeta(A(xL,null,o,t))||{stops:[],outerColors:[]},i=t.getDataDimension(a),n=a.getDimensionInfo(i);null!=n&&(e.dimension=n.index,r.push(e))}}),o.getData().setVisual("visualMeta",r)}});var _L=function(t,e,i){var n=L((wL[t]||{})[e]);return i&&O(n)?n[n.length-1]:n},wL={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}},bL=f_.mapVisual,SL=f_.eachVisual,ML=O,IL=E,TL=Bl,AL=El,DL=If({type:"visualMap",dependencies:["series"],stateList:["inRange","outOfRange"],replacableOptionKeys:["inRange","outOfRange","target","controller","color"],dataBound:[-1/0,1/0],layoutMode:{type:"box",ignoreSize:!0},defaultOption:{show:!0,zlevel:0,z:4,seriesIndex:"all",min:0,max:200,dimension:null,inRange:null,outOfRange:null,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,color:null,formatter:null,text:null,textStyle:{color:"#333"}},init:function(t,e,i){this._dataExtent,this.targetVisuals={},this.controllerVisuals={},this.textStyleModel,this.itemSize,this.mergeDefaultAndTheme(t,i)},optionUpdated:function(t,e){var i=this.option;v.canvasSupported||(i.realtime=!1),e||DD(i,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},resetVisual:function(t){var e=this.stateList;t=A(t,this),this.controllerVisuals=AD(this.option.controller,e,t),this.targetVisuals=AD(this.option.target,e,t)},getTargetSeriesIndices:function(){var t=this.option.seriesIndex,i=[];return null==t||"all"===t?this.ecModel.eachSeries(function(t,e){i.push(e)}):i=Vo(t),i},eachTargetSeries:function(e,i){E(this.getTargetSeriesIndices(),function(t){e.call(i,this.ecModel.getSeriesByIndex(t))},this)},isTargetSeries:function(e){var i=!1;return this.eachTargetSeries(function(t){t===e&&(i=!0)}),i},formatValueText:function(t,e,i){var n,o,a=this.option,r=a.precision,s=this.dataBound,l=a.formatter;return i=i||["<",">"],O(t)&&(t=t.slice(),n=!0),o=e?t:n?[u(t[0]),u(t[1])]:u(t),R(l)?l.replace("{value}",n?o[0]:o).replace("{value2}",n?o[1]:o):C(l)?n?l(t[0],t[1]):l(t):n?t[0]===s[0]?i[0]+" "+o[1]:t[1]===s[1]?i[1]+" "+o[0]:o[0]+" - "+o[1]:o;function u(t){return t===s[0]?"min":t===s[1]?"max":(+t).toFixed(Math.min(r,20))}},resetExtent:function(){var t=this.option,e=TL([t.min,t.max]);this._dataExtent=e},getDataDimension:function(t){var e=this.option.dimension,i=t.dimensions;if(null!=e||i.length){if(null!=e)return t.getDimension(e);for(var n=t.dimensions,o=n.length-1;0<=o;o--){var a=n[o];if(!t.getDimensionInfo(a).isCalculationCoord)return a}}},getExtent:function(){return this._dataExtent.slice()},completeVisualOption:function(){var t=this.ecModel,e=this.option,i={inRange:e.inRange,outOfRange:e.outOfRange},n=e.target||(e.target={}),o=e.controller||(e.controller={});m(n,i),m(o,i);var u=this.isCategory();function a(n){ML(e.color)&&!n.inRange&&(n.inRange={color:e.color.slice().reverse()}),n.inRange=n.inRange||{color:t.get("gradientColor")},IL(this.stateList,function(t){var e=n[t];if(R(e)){var i=_L(e,"active",u);i?(n[t]={},n[t][e]=i):delete n[t]}},this)}a.call(this,n),a.call(this,o),function(t,e,i){var n=t[e],o=t[i];n&&!o&&(o=t[i]={},IL(n,function(t,e){if(f_.isValidType(e)){var i=_L(e,"inactive",u);null!=i&&(o[e]=i,"color"!==e||o.hasOwnProperty("opacity")||o.hasOwnProperty("colorAlpha")||(o.opacity=[0,0]))}}))}.call(this,n,"inRange","outOfRange"),function(a){var r=(a.inRange||{}).symbol||(a.outOfRange||{}).symbol,s=(a.inRange||{}).symbolSize||(a.outOfRange||{}).symbolSize,l=this.get("inactiveColor");IL(this.stateList,function(t){var e=this.itemSize,i=a[t];null==(i=i||(a[t]={color:u?l:[l]})).symbol&&(i.symbol=r&&L(r)||(u?"roundRect":["roundRect"])),null==i.symbolSize&&(i.symbolSize=s&&L(s)||(u?e[0]:[e[0],e[0]])),i.symbol=bL(i.symbol,function(t){return"none"===t||"square"===t?"roundRect":t});var n=i.symbolSize;if(null!=n){var o=-1/0;SL(n,function(t){o<t&&(o=t)}),i.symbolSize=bL(n,function(t){return AL(t,[0,o],[0,e[0]],!0)})}},this)}.call(this,o)},resetItemSize:function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},isCategory:function(){return!!this.option.categories},setSelected:et,getValueState:et,getVisualMeta:et}),CL=[20,140],LL=DL.extend({type:"visualMap.continuous",defaultOption:{align:"auto",calculable:!1,range:null,realtime:!0,itemHeight:null,itemWidth:null,hoverLink:!0,hoverLinkDataSize:null,hoverLinkOnHandle:null},optionUpdated:function(t,e){LL.superApply(this,"optionUpdated",arguments),this.resetExtent(),this.resetVisual(function(t){t.mappingMethod="linear",t.dataExtent=this.getExtent()}),this._resetRange()},resetItemSize:function(){LL.superApply(this,"resetItemSize",arguments);var t=this.itemSize;"horizontal"===this._orient&&t.reverse(),null!=t[0]&&!isNaN(t[0])||(t[0]=CL[0]),null!=t[1]&&!isNaN(t[1])||(t[1]=CL[1])},_resetRange:function(){var t=this.getExtent(),e=this.option.range;!e||e.auto?(t.auto=1,this.option.range=t):O(e)&&(e[0]>e[1]&&e.reverse(),e[0]=Math.max(e[0],t[0]),e[1]=Math.min(e[1],t[1]))},completeVisualOption:function(){DL.prototype.completeVisualOption.apply(this,arguments),E(this.stateList,function(t){var e=this.option.controller[t].symbolSize;e&&e[0]!==e[1]&&(e[0]=0)},this)},setSelected:function(t){this.option.range=t.slice(),this._resetRange()},getSelected:function(){var t=this.getExtent(),e=Bl((this.get("range")||[]).slice());return e[0]>t[1]&&(e[0]=t[1]),e[1]>t[1]&&(e[1]=t[1]),e[0]<t[0]&&(e[0]=t[0]),e[1]<t[0]&&(e[1]=t[0]),e},getValueState:function(t){var e=this.option.range,i=this.getExtent();return(e[0]<=i[0]||e[0]<=t)&&(e[1]>=i[1]||t<=e[1])?"inRange":"outOfRange"},findTargetDataIndices:function(n){var o=[];return this.eachTargetSeries(function(t){var i=[],e=t.getData();e.each(this.getDataDimension(e),function(t,e){n[0]<=t&&t<=n[1]&&i.push(e)},this),o.push({seriesId:t.id,dataIndex:i})},this),o},getVisualMeta:function(i){var t=kL(this,"outOfRange",this.getExtent()),e=kL(this,"inRange",this.option.range.slice()),n=[];function o(t,e){n.push({value:t,color:i(t,e)})}for(var a=0,r=0,s=e.length,l=t.length;r<l&&(!e.length||t[r]<=e[0]);r++)t[r]<e[a]&&o(t[r],"outOfRange");for(var u=1;a<s;a++,u=0)u&&n.length&&o(e[a],"outOfRange"),o(e[a],"inRange");for(u=1;r<l;r++)(!e.length||e[e.length-1]<t[r])&&(u&&(n.length&&o(n[n.length-1].value,"outOfRange"),u=0),o(t[r],"outOfRange"));var h=n.length;return{stops:n,outerColors:[h?n[0].color:"transparent",h?n[h-1].color:"transparent"]}}});function kL(t,e,i){if(i[0]===i[1])return i.slice();for(var n=(i[1]-i[0])/200,o=i[0],a=[],r=0;r<=200&&o<i[1];r++)a.push(o),o+=n;return a.push(i[1]),a}var PL=Tf({type:"visualMap",autoPositionValues:{left:1,right:1,top:1,bottom:1},init:function(t,e){this.ecModel=t,this.api=e,this.visualMapModel},render:function(t,e,i,n){!1!==(this.visualMapModel=t).get("show")?this.doRender.apply(this,arguments):this.group.removeAll()},renderBackground:function(t){var e=this.visualMapModel,i=iu(e.get("padding")||0),n=t.getBoundingRect();t.add(new rs({z2:-1,silent:!0,shape:{x:n.x-i[3],y:n.y-i[0],width:n.width+i[3]+i[1],height:n.height+i[0]+i[2]},style:{fill:e.get("backgroundColor"),stroke:e.get("borderColor"),lineWidth:e.get("borderWidth")}}))},getControllerVisual:function(i,n,o){var t=(o=o||{}).forceState,e=this.visualMapModel,a={};if("symbol"===n&&(a.symbol=e.get("itemSymbol")),"color"===n){var r=e.get("contentColor");a.color=r}function s(t){return a[t]}function l(t,e){a[t]=e}var u=e.controllerVisuals[t||e.getValueState(i)];return E(f_.prepareVisualTypes(u),function(t){var e=u[t];o.convertOpacityToAlpha&&"opacity"===t&&(t="colorAlpha",e=u.__alphaForOpacity),f_.dependsOn(t,n)&&e&&e.applyVisual(i,s,l)}),a[n]},positionGroup:function(t){var e=this.visualMapModel,i=this.api;bu(t,e.getBoxLayoutParams(),{width:i.getWidth(),height:i.getHeight()})},doRender:et});function NL(t,e,i){var n=t.option,o=n.align;if(null!=o&&"auto"!==o)return o;for(var a={width:e.getWidth(),height:e.getHeight()},r="horizontal"===n.orient?1:0,s=[["left","right","width"],["top","bottom","height"]],l=s[r],u=[0,null,10],h={},c=0;c<3;c++)h[s[1-r][c]]=u[c],h[l[c]]=2===c?i[0]:n[l[c]];var d=[["x","width",3],["y","height",0]][r],f=wu(h,a,n.padding);return l[(f.margin[d[2]]||0)+f[d[0]]+.5*f[d[1]]<.5*a[d[1]]?0:1]}function OL(t,e){return E(t||[],function(t){null!=t.dataIndex&&(t.dataIndexInside=t.dataIndex,t.dataIndex=null),t.highlightKey="visualMap"+(e?e.componentIndex:"")}),t}var EL=El,RL=E,zL=Math.min,BL=Math.max,VL=PL.extend({type:"visualMap.continuous",init:function(){VL.superApply(this,"init",arguments),this._shapes={},this._dataInterval=[],this._handleEnds=[],this._orient,this._useHandle,this._hoverLinkDataIndices=[],this._dragging,this._hovering},doRender:function(t,e,i,n){n&&"selectDataRange"===n.type&&n.from===this.uid||this._buildView()},_buildView:function(){this.group.removeAll();var t=this.visualMapModel,e=this.group;this._orient=t.get("orient"),this._useHandle=t.get("calculable"),this._resetInterval(),this._renderBar(e);var i=t.get("text");this._renderEndsText(e,i,0),this._renderEndsText(e,i,1),this._updateView(!0),this.renderBackground(e),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(e)},_renderEndsText:function(t,e,i){if(e){var n=e[1-i];n=null!=n?n+"":"";var o=this.visualMapModel,a=o.get("textGap"),r=o.itemSize,s=this._shapes.barGroup,l=this._applyTransform([r[0]/2,0===i?-a:r[1]+a],s),u=this._applyTransform(0===i?"bottom":"top",s),h=this._orient,c=this.visualMapModel.textStyleModel;this.group.add(new Ur({style:{x:l[0],y:l[1],textVerticalAlign:"horizontal"===h?"middle":u,textAlign:"horizontal"===h?u:"center",text:n,textFont:c.getFont(),textFill:c.getTextColor()}}))}},_renderBar:function(t){var e=this.visualMapModel,i=this._shapes,n=e.itemSize,o=this._orient,a=this._useHandle,r=NL(e,this.api,n),s=i.barGroup=this._createBarGroup(r);s.add(i.outOfRange=GL()),s.add(i.inRange=GL(null,a?WL(this._orient):null,A(this._dragHandle,this,"all",!1),A(this._dragHandle,this,"all",!0)));var l=e.textStyleModel.getTextRect("国"),u=BL(l.width,l.height);a&&(i.handleThumbs=[],i.handleLabels=[],i.handleLabelPoints=[],this._createHandle(s,0,n,u,o,r),this._createHandle(s,1,n,u,o,r)),this._createIndicator(s,n,u,o),t.add(s)},_createHandle:function(t,e,i,n,o){var a=A(this._dragHandle,this,e,!1),r=A(this._dragHandle,this,e,!0),s=GL(function(t,e){return 0===t?[[0,0],[e,0],[e,-e]]:[[0,0],[e,0],[e,e]]}(e,n),WL(this._orient),a,r);s.position[0]=i[0],t.add(s);var l=this.visualMapModel.textStyleModel,u=new Ur({draggable:!0,drift:a,onmousemove:function(t){Xt(t.event)},ondragend:r,style:{x:0,y:0,text:"",textFont:l.getFont(),textFill:l.getTextColor()}});this.group.add(u);var h=["horizontal"===o?n/2:1.5*n,"horizontal"===o?0===e?-1.5*n:1.5*n:0===e?-n/2:n/2],c=this._shapes;c.handleThumbs[e]=s,c.handleLabelPoints[e]=h,c.handleLabels[e]=u},_createIndicator:function(t,e,i,n){var o=GL([[0,0]],"move");o.position[0]=e[0],o.attr({invisible:!0,silent:!0}),t.add(o);var a=this.visualMapModel.textStyleModel,r=new Ur({silent:!0,invisible:!0,style:{x:0,y:0,text:"",textFont:a.getFont(),textFill:a.getTextColor()}});this.group.add(r);var s=["horizontal"===n?i/2:9,0],l=this._shapes;l.indicator=o,l.indicatorLabel=r,l.indicatorLabelPoint=s},_dragHandle:function(t,e,i,n){if(this._useHandle){if(this._dragging=!e,!e){var o=this._applyTransform([i,n],this._shapes.barGroup,!0);this._updateInterval(t,o[1]),this._updateView()}e===!this.visualMapModel.get("realtime")&&this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),e?this._hovering||this._clearHoverLinkToSeries():FL(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[t],!1)}},_resetInterval:function(){var t=this.visualMapModel,e=this._dataInterval=t.getSelected(),i=t.getExtent(),n=[0,t.itemSize[1]];this._handleEnds=[EL(e[0],i,n,!0),EL(e[1],i,n,!0)]},_updateInterval:function(t,e){e=e||0;var i=this.visualMapModel,n=this._handleEnds,o=[0,i.itemSize[1]];Kw(e,n,o,t,0);var a=i.getExtent();this._dataInterval=[EL(n[0],o,a,!0),EL(n[1],o,a,!0)]},_updateView:function(t){var e=this.visualMapModel,i=e.getExtent(),n=this._shapes,o=[0,e.itemSize[1]],a=t?o:this._handleEnds,r=this._createBarVisual(this._dataInterval,i,a,"inRange"),s=this._createBarVisual(i,i,o,"outOfRange");n.inRange.setStyle({fill:r.barColor,opacity:r.opacity}).setShape("points",r.barPoints),n.outOfRange.setStyle({fill:s.barColor,opacity:s.opacity}).setShape("points",s.barPoints),this._updateHandle(a,r)},_createBarVisual:function(t,e,i,n){var o={forceState:n,convertOpacityToAlpha:!0},a=this._makeColorGradient(t,o),r=[this.getControllerVisual(t[0],"symbolSize",o),this.getControllerVisual(t[1],"symbolSize",o)],s=this._createBarPoints(i,r);return{barColor:new gs(0,0,0,1,a),barPoints:s,handlesColor:[a[0].color,a[a.length-1].color]}},_makeColorGradient:function(t,e){var i=[],n=(t[1]-t[0])/100;i.push({color:this.getControllerVisual(t[0],"color",e),offset:0});for(var o=1;o<100;o++){var a=t[0]+n*o;if(a>t[1])break;i.push({color:this.getControllerVisual(a,"color",e),offset:o/100})}return i.push({color:this.getControllerVisual(t[1],"color",e),offset:1}),i},_createBarPoints:function(t,e){var i=this.visualMapModel.itemSize;return[[i[0]-e[0],t[0]],[i[0],t[0]],[i[0],t[1]],[i[0]-e[1],t[1]]]},_createBarGroup:function(t){var e=this._orient,i=this.visualMapModel.get("inverse");return new Ci("horizontal"!==e||i?"horizontal"===e&&i?{scale:"bottom"===t?[-1,1]:[1,1],rotation:-Math.PI/2}:"vertical"!==e||i?{scale:"left"===t?[1,1]:[-1,1]}:{scale:"left"===t?[1,-1]:[-1,-1]}:{scale:"bottom"===t?[1,1]:[-1,1],rotation:Math.PI/2})},_updateHandle:function(n,o){if(this._useHandle){var a=this._shapes,r=this.visualMapModel,s=a.handleThumbs,l=a.handleLabels;RL([0,1],function(t){var e=s[t];e.setStyle("fill",o.handlesColor[t]),e.position[1]=n[t];var i=pl(a.handleLabelPoints[t],fl(e,this.group));l[t].setStyle({x:i[0],y:i[1],text:r.formatValueText(this._dataInterval[t]),textVerticalAlign:"middle",textAlign:this._applyTransform("horizontal"===this._orient?0===t?"bottom":"top":"left",a.barGroup)})},this)}},_showIndicator:function(t,e,i,n){var o=this.visualMapModel,a=o.getExtent(),r=o.itemSize,s=[0,r[1]],l=EL(t,a,s,!0),u=this._shapes,h=u.indicator;if(h){h.position[1]=l,h.attr("invisible",!1),h.setShape("points",function(t,e,i,n){return t?[[0,-zL(e,BL(i,0))],[6,0],[0,zL(e,BL(n-i,0))]]:[[0,0],[5,-5],[5,5]]}(!!i,n,l,r[1]));var c=this.getControllerVisual(t,"color",{convertOpacityToAlpha:!0});h.setStyle("fill",c);var d=pl(u.indicatorLabelPoint,fl(h,this.group)),f=u.indicatorLabel;f.attr("invisible",!1);var p=this._applyTransform("left",u.barGroup),g=this._orient;f.setStyle({text:(i||"")+o.formatValueText(e),textVerticalAlign:"horizontal"===g?p:"middle",textAlign:"horizontal"===g?"center":p,x:d[0],y:d[1]})}},_enableHoverLinkToSeries:function(){var n=this;this._shapes.barGroup.on("mousemove",function(t){if(n._hovering=!0,!n._dragging){var e=n.visualMapModel.itemSize,i=n._applyTransform([t.offsetX,t.offsetY],n._shapes.barGroup,!0,!0);i[1]=zL(BL(0,i[1]),e[1]),n._doHoverLinkToSeries(i[1],0<=i[0]&&i[0]<=e[0])}}).on("mouseout",function(){n._hovering=!1,n._dragging||n._clearHoverLinkToSeries()})},_enableHoverLinkFromSeries:function(){var t=this.api.getZr();this.visualMapModel.option.hoverLink?(t.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),t.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},_doHoverLinkToSeries:function(t,e){var i=this.visualMapModel,n=i.itemSize;if(i.option.hoverLink){var o=[0,n[1]],a=i.getExtent();t=zL(BL(o[0],t),o[1]);var r=function(t,e,i){var n=6,o=t.get("hoverLinkDataSize");o&&(n=EL(o,e,i,!0)/2);return n}(i,a,o),s=[t-r,t+r],l=EL(t,o,a,!0),u=[EL(s[0],o,a,!0),EL(s[1],o,a,!0)];s[0]<o[0]&&(u[0]=-1/0),o[1]<s[1]&&(u[1]=1/0),e&&(u[0]===-1/0?this._showIndicator(l,u[1],"< ",r):u[1]===1/0?this._showIndicator(l,u[0],"> ",r):this._showIndicator(l,l,"≈ ",r));var h=this._hoverLinkDataIndices,c=[];(e||FL(i))&&(c=this._hoverLinkDataIndices=i.findTargetDataIndices(u));var d=function(t,e){var i={},n={};return o(t||[],i),o(e||[],n,i),[a(i),a(n)];function o(t,e,i){for(var n=0,o=t.length;n<o;n++)for(var a=t[n].seriesId,r=Vo(t[n].dataIndex),s=i&&i[a],l=0,u=r.length;l<u;l++){var h=r[l];s&&s[h]?s[h]=null:(e[a]||(e[a]={}))[h]=1}}function a(t,e){var i=[];for(var n in t)if(t.hasOwnProperty(n)&&null!=t[n])if(e)i.push(+n);else{var o=a(t[n],!0);o.length&&i.push({seriesId:n,dataIndex:o})}return i}}(h,c);this._dispatchHighDown("downplay",OL(d[0],i)),this._dispatchHighDown("highlight",OL(d[1],i))}},_hoverLinkFromSeriesMouseOver:function(t){var e=t.target,i=this.visualMapModel;if(e&&null!=e.dataIndex){var n=this.ecModel.getSeriesByIndex(e.seriesIndex);if(i.isTargetSeries(n)){var o=n.getData(e.dataType),a=o.get(i.getDataDimension(o),e.dataIndex,!0);isNaN(a)||this._showIndicator(a,a)}}},_hideIndicator:function(){var t=this._shapes;t.indicator&&t.indicator.attr("invisible",!0),t.indicatorLabel&&t.indicatorLabel.attr("invisible",!0)},_clearHoverLinkToSeries:function(){this._hideIndicator();var t=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",OL(t,this.visualMapModel)),t.length=0},_clearHoverLinkFromSeries:function(){this._hideIndicator();var t=this.api.getZr();t.off("mouseover",this._hoverLinkFromSeriesMouseOver),t.off("mouseout",this._hideIndicator)},_applyTransform:function(t,e,i,n){var o=fl(e,n?null:this.group);return bl[O(t)?"applyTransform":"transformDirection"](t,o,i)},_dispatchHighDown:function(t,e){e&&e.length&&this.api.dispatchAction({type:t,batch:e})},dispose:function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},remove:function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()}});function GL(t,e,i,n){return new Qr({shape:{points:t},draggable:!!i,cursor:e,drift:i,onmousemove:function(t){Xt(t.event)},ondragend:n})}function FL(t){var e=t.get("hoverLinkOnHandle");return!!(null==e?t.get("realtime"):e)}function WL(t){return"vertical"===t?"ns-resize":"ew-resize"}xf({type:"selectDataRange",event:"dataRangeSelected",update:"update"},function(e,t){t.eachComponent({mainType:"visualMap",query:e},function(t){t.setSelected(e.selected)})}),vf(pL);var HL=DL.extend({type:"visualMap.piecewise",defaultOption:{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieceList:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0,showLabel:null},optionUpdated:function(t,e){HL.superApply(this,"optionUpdated",arguments),this._pieceList=[],this.resetExtent();var i=this._mode=this._determineMode();ZL[this._mode].call(this),this._resetSelected(t,e);var n=this.option.categories;this.resetVisual(function(t,e){"categories"===i?(t.mappingMethod="category",t.categories=L(n)):(t.dataExtent=this.getExtent(),t.mappingMethod="piecewise",t.pieceList=N(this._pieceList,function(t){t=L(t);return"inRange"!==e&&(t.visual=null),t}))})},completeVisualOption:function(){var n=this.option,i={},t=f_.listVisualTypes(),o=this.isCategory();function a(t,e,i){return t&&t[e]&&(z(t[e])?t[e].hasOwnProperty(i):t[e]===i)}E(n.pieces,function(e){E(t,function(t){e.hasOwnProperty(t)&&(i[t]=1)})}),E(i,function(t,e){var i=0;E(this.stateList,function(t){i|=a(n,t,e)||a(n.target,t,e)},this),i||E(this.stateList,function(t){(n[t]||(n[t]={}))[e]=_L(e,"inRange"===t?"active":"inactive",o)})},this),DL.prototype.completeVisualOption.apply(this,arguments)},_resetSelected:function(t,e){var i=this.option,n=this._pieceList,o=(e?i:t).selected||{};if(i.selected=o,E(n,function(t,e){var i=this.getSelectedMapKey(t);o.hasOwnProperty(i)||(o[i]=!0)},this),"single"===i.selectedMode){var a=!1;E(n,function(t,e){var i=this.getSelectedMapKey(t);o[i]&&(a?o[i]=!1:a=!0)},this)}},getSelectedMapKey:function(t){return"categories"===this._mode?t.value+"":t.index+""},getPieceList:function(){return this._pieceList},_determineMode:function(){var t=this.option;return t.pieces&&0<t.pieces.length?"pieces":this.option.categories?"categories":"splitNumber"},setSelected:function(t){this.option.selected=L(t)},getValueState:function(t){var e=f_.findPieceIndex(t,this._pieceList);return null!=e&&this.option.selected[this.getSelectedMapKey(this._pieceList[e])]?"inRange":"outOfRange"},findTargetDataIndices:function(n){var o=[];return this.eachTargetSeries(function(t){var i=[],e=t.getData();e.each(this.getDataDimension(e),function(t,e){f_.findPieceIndex(t,this._pieceList)===n&&i.push(e)},this),o.push({seriesId:t.id,dataIndex:i})},this),o},getRepresentValue:function(t){var e;if(this.isCategory())e=t.value;else if(null!=t.value)e=t.value;else{var i=t.interval||[];e=i[0]===-1/0&&i[1]===1/0?0:(i[0]+i[1])/2}return e},getVisualMeta:function(o){if(!this.isCategory()){var a=[],r=[],s=this,t=this._pieceList.slice();if(t.length){var e=t[0].interval[0];e!==-1/0&&t.unshift({interval:[-1/0,e]}),(e=t[t.length-1].interval[1])!==1/0&&t.push({interval:[e,1/0]})}else t.push({interval:[-1/0,1/0]});var i=-1/0;return E(t,function(t){var e=t.interval;e&&(e[0]>i&&n([i,e[0]],"outOfRange"),n(e.slice()),i=e[1])},this),{stops:a,outerColors:r}}function n(t,e){var i=s.getRepresentValue({interval:t});e=e||s.getValueState(i);var n=o(i,e);t[0]===-1/0?r[0]=n:t[1]===1/0?r[1]=n:a.push({value:t[0],color:n},{value:t[1],color:n})}}}),ZL={splitNumber:function(){var t=this.option,e=this._pieceList,i=Math.min(t.precision,20),n=this.getExtent(),o=t.splitNumber;o=Math.max(parseInt(o,10),1),t.splitNumber=o;for(var a=(n[1]-n[0])/o;+a.toFixed(i)!==a&&i<5;)i++;t.precision=i,a=+a.toFixed(i);var r=0;t.minOpen&&e.push({index:r++,interval:[-1/0,n[0]],close:[0,0]});for(var s=n[0],l=r+o;r<l;s+=a){var u=r===o-1?n[1]:s+a;e.push({index:r++,interval:[s,u],close:[1,1]})}t.maxOpen&&e.push({index:r++,interval:[n[1],1/0],close:[0,0]}),$l(e),E(e,function(t){t.text=this.formatValueText(t.interval)},this)},categories:function(){var t=this.option;E(t.categories,function(t){this._pieceList.push({text:this.formatValueText(t,!0),value:t})},this),UL(t,this._pieceList)},pieces:function(){var t=this.option,d=this._pieceList;E(t.pieces,function(t,e){z(t)||(t={value:t});var i={text:"",index:e};if(null!=t.label&&(i.text=t.label),t.hasOwnProperty("value")){var n=i.value=t.value;i.interval=[n,n],i.close=[1,1]}else{for(var o=i.interval=[],a=i.close=[0,0],r=[1,0,1],s=[-1/0,1/0],l=[],u=0;u<2;u++){for(var h=[["gte","gt","min"],["lte","lt","max"]][u],c=0;c<3&&null==o[u];c++)o[u]=t[h[c]],a[u]=r[c],l[u]=2===c;null==o[u]&&(o[u]=s[u])}l[0]&&o[1]===1/0&&(a[0]=0),l[1]&&o[0]===-1/0&&(a[1]=0),o[0]===o[1]&&a[0]&&a[1]&&(i.value=o[0])}i.visual=f_.retrieveVisuals(t),d.push(i)},this),UL(t,d),$l(d),E(d,function(t){var e=t.close,i=[["<","≤"][e[1]],[">","≥"][e[0]]];t.text=t.text||this.formatValueText(null!=t.value?t.value:t.interval,!1,i)},this)}};function UL(t,e){var i=t.inverse;("vertical"===t.orient?!i:i)&&e.reverse()}PL.extend({type:"visualMap.piecewise",doRender:function(){var a=this.group;a.removeAll();var r=this.visualMapModel,s=r.get("textGap"),t=r.textStyleModel,l=t.getFont(),u=t.getTextColor(),h=this._getItemAlign(),c=r.itemSize,e=this._getViewData(),i=e.endsText,d=W(r.get("showLabel",!0),!i);i&&this._renderEndsText(a,i[0],c,d,h),E(e.viewPieceList,function(t){var e=t.piece,i=new Ci;i.onclick=A(this._onItemClick,this,e),this._enableHoverLink(i,t.indexInModelPieceList);var n=r.getRepresentValue(e);if(this._createItemSymbol(i,n,[0,0,c[0],c[1]]),d){var o=this.visualMapModel.getValueState(n);i.add(new Ur({style:{x:"right"===h?-s:c[0]+s,y:c[1]/2,text:e.text,textVerticalAlign:"middle",textAlign:h,textFont:l,textFill:u,opacity:"outOfRange"===o?.5:1}}))}a.add(i)},this),i&&this._renderEndsText(a,i[1],c,d,h),_u(r.get("orient"),a,r.get("itemGap")),this.renderBackground(a),this.positionGroup(a)},_enableHoverLink:function(t,i){function e(t){var e=this.visualMapModel;e.option.hoverLink&&this.api.dispatchAction({type:t,batch:OL(e.findTargetDataIndices(i),e)})}t.on("mouseover",A(e,this,"highlight")).on("mouseout",A(e,this,"downplay"))},_getItemAlign:function(){var t=this.visualMapModel,e=t.option;if("vertical"===e.orient)return NL(t,this.api,t.itemSize);var i=e.align;return i&&"auto"!==i||(i="left"),i},_renderEndsText:function(t,e,i,n,o){if(e){var a=new Ci,r=this.visualMapModel.textStyleModel;a.add(new Ur({style:{x:n?"right"===o?i[0]:0:i[0]/2,y:i[1]/2,textVerticalAlign:"middle",textAlign:n?o:"center",text:e,textFont:r.getFont(),textFill:r.getTextColor()}})),t.add(a)}},_getViewData:function(){var t=this.visualMapModel,e=N(t.getPieceList(),function(t,e){return{piece:t,indexInModelPieceList:e}}),i=t.get("text"),n=t.get("orient"),o=t.get("inverse");return("horizontal"===n?o:!o)?e.reverse():i=i&&i.slice().reverse(),{viewPieceList:e,endsText:i}},_createItemSymbol:function(t,e,i){t.add(_g(this.getControllerVisual(e,"symbol"),i[0],i[1],i[2],i[3],this.getControllerVisual(e,"color")))},_onItemClick:function(t){var e=this.visualMapModel,i=e.option,n=L(i.selected),o=e.getSelectedMapKey(t);"single"===i.selectedMode?(n[o]=!0,E(n,function(t,e){n[e]=e===o})):n[o]=!n[o],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:n})}});vf(pL);var XL,YL="urn:schemas-microsoft-com:vml",jL="undefined"==typeof window?null:window,qL=!1,KL=jL&&jL.document;function $L(t){return XL(t)}if(KL&&!v.canvasSupported)try{KL.namespaces.zrvml||KL.namespaces.add("zrvml",YL),XL=function(t){return KL.createElement("<zrvml:"+t+' class="zrvml">')}}catch(t){XL=function(t){return KL.createElement("<"+t+' xmlns="'+YL+'" class="zrvml">')}}var JL,QL=rr.CMD,tk=Math.round,ek=Math.sqrt,ik=Math.abs,nk=Math.cos,ok=Math.sin,ak=Math.max;if(!v.canvasSupported){var rk=",",sk="progid:DXImageTransform.Microsoft",lk=21600,uk=lk/2,hk=function(t){t.style.cssText="position:absolute;left:0;top:0;width:1px;height:1px;",t.coordsize=lk+","+lk,t.coordorigin="0,0"},ck=function(t,e,i){return"rgb("+[t,e,i].join(",")+")"},dk=function(t,e){e&&t&&e.parentNode!==t&&t.appendChild(e)},fk=function(t,e){e&&t&&e.parentNode===t&&t.removeChild(e)},pk=function(t,e,i){return 1e5*(parseFloat(t)||0)+1e3*(parseFloat(e)||0)+i},gk=Yn,mk=function(t,e,i){var n=Fe(e);i=+i,isNaN(i)&&(i=1),n&&(t.color=ck(n[0],n[1],n[2]),t.opacity=i*n[3])},vk=function(t,e,i,n){var o="fill"===e,a=t.getElementsByTagName(e)[0];null!=i[e]&&"none"!==i[e]&&(o||!o&&i.lineWidth)?(t[o?"filled":"stroked"]="true",i[e]instanceof cs&&fk(t,a),a=a||$L(e),o?function(t,e,i){var n,o,a=e.fill;if(null!=a)if(a instanceof cs){var r,s=0,l=[0,0],u=0,h=1,c=i.getBoundingRect(),d=c.width,f=c.height;if("linear"===a.type){r="gradient";var p=i.transform,g=[a.x*d,a.y*f],m=[a.x2*d,a.y2*f];p&&(bt(g,g,p),bt(m,m,p));var v=m[0]-g[0],y=m[1]-g[1];(s=180*Math.atan2(v,y)/Math.PI)<0&&(s+=360),s<1e-6&&(s=0)}else{r="gradientradial";g=[a.x*d,a.y*f],p=i.transform;var x=i.scale,_=d,w=f;l=[(g[0]-c.x)/_,(g[1]-c.y)/w],p&&bt(g,g,p),_/=x[0]*lk,w/=x[1]*lk;var b=ak(_,w);u=0/b,h=2*a.r/b-u}var S=a.colorStops.slice();S.sort(function(t,e){return t.offset-e.offset});for(var M=S.length,I=[],T=[],A=0;A<M;A++){var D=S[A],C=(n=D.color,void 0,o=Fe(n),[ck(o[0],o[1],o[2]),o[3]]);T.push(D.offset*h+u+" "+C[0]),0!==A&&A!==M-1||I.push(C)}if(2<=M){var L=I[0][0],k=I[1][0],P=I[0][1]*e.opacity,N=I[1][1]*e.opacity;t.type=r,t.method="none",t.focus="100%",t.angle=s,t.color=L,t.color2=k,t.colors=T.join(","),t.opacity=N,t.opacity2=P}"radial"===r&&(t.focusposition=l.join(","))}else mk(t,a,e.opacity)}(a,i,n):function(t,e){e.lineDash&&(t.dashstyle=e.lineDash.join(" ")),null==e.stroke||e.stroke instanceof cs||mk(t,e.stroke,e.opacity)}(a,i),dk(t,a)):(t[o?"filled":"stroked"]="false",fk(t,a))},yk=[[],[],[]];Ar.prototype.brushVML=function(t){var e=this.style,i=this._vmlEl;i||(i=$L("shape"),hk(i),this._vmlEl=i),vk(i,"fill",e,this),vk(i,"stroke",e,this);var n=this.transform,o=null!=n,a=i.getElementsByTagName("stroke")[0];if(a){var r=e.lineWidth;if(o&&!e.strokeNoScale){var s=n[0]*n[3]-n[1]*n[2];r*=ek(ik(s))}a.weight=r+"px"}var l=this.path||(this.path=new rr);this.__dirtyPath&&(l.beginPath(),l.subPixelOptimize=!1,this.buildPath(l,this.shape),l.toStatic(),this.__dirtyPath=!1),i.path=function(t,e){var i,n,o,a,r,s,l=QL.M,u=QL.C,h=QL.L,c=QL.A,d=QL.Q,f=[],p=t.data,g=t.len();for(a=0;a<g;){switch(n="",i=0,o=p[a++]){case l:n=" m ",i=1,r=p[a++],s=p[a++],yk[0][0]=r,yk[0][1]=s;break;case h:n=" l ",i=1,r=p[a++],s=p[a++],yk[0][0]=r,yk[0][1]=s;break;case d:case u:n=" c ",i=3;var m,v,y=p[a++],x=p[a++],_=p[a++],w=p[a++];o===d?(_=((m=_)+2*y)/3,w=((v=w)+2*x)/3,y=(r+2*y)/3,x=(s+2*x)/3):(m=p[a++],v=p[a++]),yk[0][0]=y,yk[0][1]=x,yk[1][0]=_,yk[1][1]=w,r=yk[2][0]=m,s=yk[2][1]=v;break;case c:var b=0,S=0,M=1,I=1,T=0;e&&(b=e[4],S=e[5],M=ek(e[0]*e[0]+e[1]*e[1]),I=ek(e[2]*e[2]+e[3]*e[3]),T=Math.atan2(-e[1]/I,e[0]/M));var A=p[a++],D=p[a++],C=p[a++],L=p[a++],k=p[a++]+T,P=p[a++]+k+T;a++;var N=p[a++],O=A+nk(k)*C,E=D+ok(k)*L,R=(y=A+nk(P)*C,x=D+ok(P)*L,N?" wa ":" at ");Math.abs(O-y)<1e-4&&(.01<Math.abs(P-k)?N&&(O+=.0125):Math.abs(E-D)<1e-4?N&&O<A||!N&&A<O?x-=.0125:x+=.0125:N&&E<D||!N&&D<E?y+=.0125:y-=.0125),f.push(R,tk(((A-C)*M+b)*lk-uk),rk,tk(((D-L)*I+S)*lk-uk),rk,tk(((A+C)*M+b)*lk-uk),rk,tk(((D+L)*I+S)*lk-uk),rk,tk((O*M+b)*lk-uk),rk,tk((E*I+S)*lk-uk),rk,tk((y*M+b)*lk-uk),rk,tk((x*I+S)*lk-uk)),r=y,s=x;break;case QL.R:var z=yk[0],B=yk[1];z[0]=p[a++],z[1]=p[a++],B[0]=z[0]+p[a++],B[1]=z[1]+p[a++],e&&(bt(z,z,e),bt(B,B,e)),z[0]=tk(z[0]*lk-uk),B[0]=tk(B[0]*lk-uk),z[1]=tk(z[1]*lk-uk),B[1]=tk(B[1]*lk-uk),f.push(" m ",z[0],rk,z[1]," l ",B[0],rk,z[1]," l ",B[0],rk,B[1]," l ",z[0],rk,B[1]);break;case QL.Z:f.push(" x ")}if(0<i){f.push(n);for(var V=0;V<i;V++){var G=yk[V];e&&bt(G,G,e),f.push(tk(G[0]*lk-uk),rk,tk(G[1]*lk-uk),V<i-1?rk:"")}}}return f.join("")}(l,this.transform),i.style.zIndex=pk(this.zlevel,this.z,this.z2),dk(t,i),null!=e.text?this.drawRectText(t,this.getBoundingRect()):this.removeRectText(t)},Ar.prototype.onRemove=function(t){fk(t,this._vmlEl),this.removeRectText(t)},Ar.prototype.onAdd=function(t){dk(t,this._vmlEl),this.appendRectText(t)};Qn.prototype.brushVML=function(t){var e,i,n=this.style,o=n.image;if(function(t){return"object"==typeof t&&t.tagName&&"IMG"===t.tagName.toUpperCase()}(o)){var a=o.src;if(a===this._imageSrc)e=this._imageWidth,i=this._imageHeight;else{var r=o.runtimeStyle,s=r.width,l=r.height;r.width="auto",r.height="auto",e=o.width,i=o.height,r.width=s,r.height=l,this._imageSrc=a,this._imageWidth=e,this._imageHeight=i}o=a}else o===this._imageSrc&&(e=this._imageWidth,i=this._imageHeight);if(o){var u=n.x||0,h=n.y||0,c=n.width,d=n.height,f=n.sWidth,p=n.sHeight,g=n.sx||0,m=n.sy||0,v=f&&p,y=this._vmlEl;y||(y=KL.createElement("div"),hk(y),this._vmlEl=y);var x,_=y.style,w=!1,b=1,S=1;if(this.transform&&(x=this.transform,b=ek(x[0]*x[0]+x[1]*x[1]),S=ek(x[2]*x[2]+x[3]*x[3]),w=x[1]||x[2]),w){var M=[u,h],I=[u+c,h],T=[u,h+d],A=[u+c,h+d];bt(M,M,x),bt(I,I,x),bt(T,T,x),bt(A,A,x);var D=ak(M[0],I[0],T[0],A[0]),C=ak(M[1],I[1],T[1],A[1]),L=[];L.push("M11=",x[0]/b,rk,"M12=",x[2]/S,rk,"M21=",x[1]/b,rk,"M22=",x[3]/S,rk,"Dx=",tk(u*b+x[4]),rk,"Dy=",tk(h*S+x[5])),_.padding="0 "+tk(D)+"px "+tk(C)+"px 0",_.filter=sk+".Matrix("+L.join("")+", SizingMethod=clip)"}else x&&(u=u*b+x[4],h=h*S+x[5]),_.filter="",_.left=tk(u)+"px",_.top=tk(h)+"px";var k=this._imageEl,P=this._cropEl;k||(k=KL.createElement("div"),this._imageEl=k);var N=k.style;if(v){if(e&&i)N.width=tk(b*e*c/f)+"px",N.height=tk(S*i*d/p)+"px";else{var O=new Image,E=this;O.onload=function(){O.onload=null,e=O.width,i=O.height,N.width=tk(b*e*c/f)+"px",N.height=tk(S*i*d/p)+"px",E._imageWidth=e,E._imageHeight=i,E._imageSrc=o},O.src=o}P||((P=KL.createElement("div")).style.overflow="hidden",this._cropEl=P);var R=P.style;R.width=tk((c+g*c/f)*b),R.height=tk((d+m*d/p)*S),R.filter=sk+".Matrix(Dx="+-g*c/f*b+",Dy="+-m*d/p*S+")",P.parentNode||y.appendChild(P),k.parentNode!==P&&P.appendChild(k)}else N.width=tk(b*c)+"px",N.height=tk(S*d)+"px",y.appendChild(k),P&&P.parentNode&&(y.removeChild(P),this._cropEl=null);var z="",B=n.opacity;B<1&&(z+=".Alpha(opacity="+tk(100*B)+") "),z+=sk+".AlphaImageLoader(src="+o+", SizingMethod=scale)",N.filter=z,y.style.zIndex=pk(this.zlevel,this.z,this.z2),dk(t,y),null!=n.text&&this.drawRectText(t,this.getBoundingRect())}},Qn.prototype.onRemove=function(t){fk(t,this._vmlEl),this._vmlEl=null,this._cropEl=null,this._imageEl=null,this.removeRectText(t)},Qn.prototype.onAdd=function(t){dk(t,this._vmlEl),this.appendRectText(t)};var xk,_k="normal",wk={},bk=0,Sk=document.createElement("div");JL=function(t,e){var i=KL;xk||((xk=i.createElement("div")).style.cssText="position:absolute;top:-20000px;left:0;padding:0;margin:0;border:none;white-space:pre;",KL.body.appendChild(xk));try{xk.style.font=e}catch(t){}return xk.innerHTML="",xk.appendChild(i.createTextNode(t)),{width:xk.offsetWidth}},fn["measureText"]=JL;for(var Mk=new Di,Ik=function(t,e,i,n){var o=this.style;this.__dirty&&En(o);var a=o.text;if(null!=a&&(a+=""),a){if(o.rich){var r=In(a,o);a=[];for(var s=0;s<r.lines.length;s++){for(var l=r.lines[s].tokens,u=[],h=0;h<l.length;h++)u.push(l[h].text);a.push(u.join(""))}a=a.join("\n")}var c,d,f=o.textAlign,p=o.textVerticalAlign,g=function(t){var e=wk[t];if(!e){100<bk&&(bk=0,wk={});var i,n=Sk.style;try{n.font=t,i=n.fontFamily.split(",")[0]}catch(t){}e={style:n.fontStyle||_k,variant:n.fontVariant||_k,weight:n.fontWeight||_k,size:0|parseFloat(n.fontSize||12),family:i||"Microsoft YaHei"},wk[t]=e,bk++}return e}(o.font),m=g.style+" "+g.variant+" "+g.weight+" "+g.size+'px "'+g.family+'"';i=i||gn(a,m,f,p,o.textPadding,o.textLineHeight);var v=this.transform;if(v&&!n&&(Mk.copy(e),Mk.applyTransform(v),e=Mk),n)c=e.x,d=e.y;else{var y=o.textPosition;if(y instanceof Array)c=e.x+gk(y[0],e.width),d=e.y+gk(y[1],e.height),f=f||"left";else{var x=this.calculateTextPosition?this.calculateTextPosition({},o,e):yn({},o,e);c=x.x,d=x.y,f=f||x.textAlign,p=p||x.textVerticalAlign}}c=mn(c,i.width,f),d=vn(d,i.height,p),d+=i.height/2;var _,w,b,S=$L,M=this._textVmlEl;M?w=(_=(b=M.firstChild).nextSibling).nextSibling:(M=S("line"),_=S("path"),w=S("textpath"),b=S("skew"),w.style["v-text-align"]="left",hk(M),_.textpathok=!0,w.on=!0,M.from="0 0",M.to="1000 0.05",dk(M,b),dk(M,_),dk(M,w),this._textVmlEl=M);var I=[c,d],T=M.style;v&&n?(bt(I,I,v),b.on=!0,b.matrix=v[0].toFixed(3)+rk+v[2].toFixed(3)+rk+v[1].toFixed(3)+rk+v[3].toFixed(3)+",0,0",b.offset=(tk(I[0])||0)+","+(tk(I[1])||0),b.origin="0 0",T.left="0px",T.top="0px"):(b.on=!1,T.left=tk(c)+"px",T.top=tk(d)+"px"),w.string=function(t){return String(t).replace(/&/g,"&amp;").replace(/"/g,"&quot;")}(a);try{w.style.font=m}catch(t){}vk(M,"fill",{fill:o.textFill,opacity:o.opacity},this),vk(M,"stroke",{stroke:o.textStroke,opacity:o.opacity,lineDash:o.lineDash||null},this),M.style.zIndex=pk(this.zlevel,this.z,this.z2),dk(t,M)}},Tk=function(t){fk(t,this._textVmlEl),this._textVmlEl=null},Ak=function(t){dk(t,this._textVmlEl)},Dk=[Kn,Jn,Qn,Ar,Ur],Ck=0;Ck<Dk.length;Ck++){var Lk=Dk[Ck].prototype;Lk.drawRectText=Ik,Lk.removeRectText=Tk,Lk.appendRectText=Ak}Ur.prototype.brushVML=function(t){var e=this.style;null!=e.text?this.drawRectText(t,{x:e.x||0,y:e.y||0,width:0,height:0},this.getBoundingRect(),!0):this.removeRectText(t)},Ur.prototype.onRemove=function(t){this.removeRectText(t)},Ur.prototype.onAdd=function(t){this.appendRectText(t)}}function kk(t){return parseInt(t,10)}function Pk(t,e){!function(){if(!qL&&KL){qL=!0;var t=KL.styleSheets;t.length<31?KL.createStyleSheet().addRule(".zrvml","behavior:url(#default#VML)"):t[0].addRule(".zrvml","behavior:url(#default#VML)")}}(),this.root=t,this.storage=e;var i=document.createElement("div"),n=document.createElement("div");i.style.cssText="display:inline-block;overflow:hidden;position:relative;width:300px;height:150px;",n.style.cssText="position:absolute;left:0;top:0;",t.appendChild(i),this._vmlRoot=n,this._vmlViewport=i,this.resize();var o=e.delFromStorage,a=e.addToStorage;e.delFromStorage=function(t){o.call(e,t),t&&t.onRemove&&t.onRemove(n)},e.addToStorage=function(t){t.onAdd&&t.onAdd(n),a.call(e,t)},this._firstPaint=!0}Pk.prototype={constructor:Pk,getType:function(){return"vml"},getViewportRoot:function(){return this._vmlViewport},getViewportRootOffset:function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},refresh:function(){var t=this.storage.getDisplayList(!0,!0);this._paintList(t)},_paintList:function(t){for(var e=this._vmlRoot,i=0;i<t.length;i++){var n=t[i];n.invisible||n.ignore?(n.__alreadyNotVisible||n.onRemove(e),n.__alreadyNotVisible=!0):(n.__alreadyNotVisible&&n.onAdd(e),n.__alreadyNotVisible=!1,n.__dirty&&(n.beforeBrush&&n.beforeBrush(),(n.brushVML||n.brush).call(n,e),n.afterBrush&&n.afterBrush())),n.__dirty=!1}this._firstPaint&&(this._vmlViewport.appendChild(e),this._firstPaint=!1)},resize:function(t,e){t=null==t?this._getWidth():t,e=null==e?this._getHeight():e;if(this._width!==t||this._height!==e){this._width=t,this._height=e;var i=this._vmlViewport.style;i.width=t+"px",i.height=e+"px"}},dispose:function(){this.root.innerHTML="",this._vmlRoot=this._vmlViewport=this.storage=null},getWidth:function(){return this._width},getHeight:function(){return this._height},clear:function(){this._vmlViewport&&this.root.removeChild(this._vmlViewport)},_getWidth:function(){var t=this.root,e=t.currentStyle;return(t.clientWidth||kk(e.width))-kk(e.paddingLeft)-kk(e.paddingRight)|0},_getHeight:function(){var t=this.root,e=t.currentStyle;return(t.clientHeight||kk(e.height))-kk(e.paddingTop)-kk(e.paddingBottom)|0}},E(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","toDataURL","pathToImage"],function(t){Pk.prototype[t]=function(t){return function(){vi('In IE8.0 VML mode painter not support method "'+t+'"')}}(t)}),Po("vml",Pk);function Nk(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}var Ok=rr.CMD,Ek=Array.prototype.join,Rk="none",zk=Math.round,Bk=Math.sin,Vk=Math.cos,Gk=Math.PI,Fk=2*Math.PI,Wk=180/Gk,Hk=1e-4;function Zk(t){return zk(1e4*t)/1e4}function Uk(t){return t<Hk&&-Hk<t}function Xk(t,e){e&&Yk(t,"transform","matrix("+Ek.call(e,",")+")")}function Yk(t,e,i){i&&("linear"===i.type||"radial"===i.type)||t.setAttribute(e,i)}function jk(t,e,i,n){if(function(t,e){var i=e?t.textFill:t.fill;return null!=i&&i!==Rk}(e,i)){var o=i?e.textFill:e.fill;Yk(t,"fill",o="transparent"===o?Rk:o),Yk(t,"fill-opacity",null!=e.fillOpacity?e.fillOpacity*e.opacity:e.opacity)}else Yk(t,"fill",Rk);if(function(t,e){var i=e?t.textStroke:t.stroke;return null!=i&&i!==Rk}(e,i)){var a=i?e.textStroke:e.stroke;Yk(t,"stroke",a="transparent"===a?Rk:a),Yk(t,"stroke-width",(i?e.textStrokeWidth:e.lineWidth)/(!i&&e.strokeNoScale?n.getLineScale():1)),Yk(t,"paint-order",i?"stroke":"fill"),Yk(t,"stroke-opacity",null!=e.strokeOpacity?e.strokeOpacity:e.opacity),e.lineDash?(Yk(t,"stroke-dasharray",e.lineDash.join(",")),Yk(t,"stroke-dashoffset",zk(e.lineDashOffset||0))):Yk(t,"stroke-dasharray",""),e.lineCap&&Yk(t,"stroke-linecap",e.lineCap),e.lineJoin&&Yk(t,"stroke-linejoin",e.lineJoin),e.miterLimit&&Yk(t,"stroke-miterlimit",e.miterLimit)}else Yk(t,"stroke",Rk)}var qk={};qk.brush=function(t){var e=t.style,i=t.__svgEl;i||(i=Nk("path"),t.__svgEl=i),t.path||t.createPathProxy();var n=t.path;if(t.__dirtyPath){n.beginPath(),n.subPixelOptimize=!1,t.buildPath(n,t.shape),t.__dirtyPath=!1;var o=function(t){for(var e=[],i=t.data,n=t.len(),o=0;o<n;){var a="",r=0;switch(i[o++]){case Ok.M:a="M",r=2;break;case Ok.L:a="L",r=2;break;case Ok.Q:a="Q",r=4;break;case Ok.C:a="C",r=6;break;case Ok.A:var s=i[o++],l=i[o++],u=i[o++],h=i[o++],c=i[o++],d=i[o++],f=i[o++],p=i[o++],g=Math.abs(d),m=Uk(g-Fk)||(p?Fk<=d:Fk<=-d),v=0<d?d%Fk:d%Fk+Fk,y=!1;y=!!m||!Uk(g)&&Gk<=v==!!p;var x=Zk(s+u*Vk(c)),_=Zk(l+h*Bk(c));m&&(d=p?Fk-1e-4:1e-4-Fk,y=!0,9===o&&e.push("M",x,_));var w=Zk(s+u*Vk(c+d)),b=Zk(l+h*Bk(c+d));e.push("A",Zk(u),Zk(h),zk(f*Wk),+y,+p,w,b);break;case Ok.Z:a="Z";break;case Ok.R:w=Zk(i[o++]),b=Zk(i[o++]);var S=Zk(i[o++]),M=Zk(i[o++]);e.push("M",w,b,"L",w+S,b,"L",w+S,b+M,"L",w,b+M,"L",w,b)}a&&e.push(a);for(var I=0;I<r;I++)e.push(Zk(i[o++]))}return e.join(" ")}(n);o.indexOf("NaN")<0&&Yk(i,"d",o)}jk(i,e,!1,t),Xk(i,t.transform),null!=e.text?iP(t,t.getBoundingRect()):oP(t)};var Kk={brush:function(t){var e=t.style,i=e.image;i instanceof HTMLImageElement&&(i=i.src);if(i){var n=e.x||0,o=e.y||0,a=e.width,r=e.height,s=t.__svgEl;s||(s=Nk("image"),t.__svgEl=s),i!==t.__imageSrc&&(function(t,e,i){t.setAttributeNS("http://www.w3.org/1999/xlink",e,i)}(s,"href",i),t.__imageSrc=i),Yk(s,"width",a),Yk(s,"height",r),Yk(s,"x",n),Yk(s,"y",o),Xk(s,t.transform),null!=e.text?iP(t,t.getBoundingRect()):oP(t)}}},$k={},Jk=new Di,Qk={},tP=[],eP={left:"start",right:"end",center:"middle",middle:"middle"},iP=function(t,e){var i=t.style,n=t.transform,o=t instanceof Ur||i.transformText;t.__dirty&&En(i);var a=i.text;if(null!=a&&(a+=""),qn(a,i)){null==a&&(a=""),!o&&n&&(Jk.copy(e),Jk.applyTransform(n),e=Jk);var r=t.__textSvgEl;r||(r=Nk("text"),t.__textSvgEl=r);var s=r.style,l=i.font||dn,u=r.__computedFont;l!==r.__styleFont&&(s.font=r.__styleFont=l,u=r.__computedFont=s.font);var h=i.textPadding,c=i.textLineHeight,d=t.__textCotentBlock;d&&!t.__dirtyText||(d=t.__textCotentBlock=Mn(a,u,h,c,i.truncate));var f=d.outerHeight,p=d.lineHeight;Hn(Qk,t,i,e);var g=Qk.baseX,m=Qk.baseY,v=Qk.textAlign||"left",y=Qk.textVerticalAlign;!function(t,e,i,n,o,a,r){re(tP),e&&i&&se(tP,i);var s=n.textRotation;if(o&&s){var l=n.textOrigin;"center"===l?(a=o.width/2+o.x,r=o.height/2+o.y):l&&(a=l[0]+o.x,r=l[1]+o.y),tP[4]-=a,tP[5]-=r,he(tP,tP,s),tP[4]+=a,tP[5]+=r}Xk(t,tP)}(r,o,n,i,e,g,m);var x=g,_=vn(m,f,y);h&&(x=function(t,e,i){return"right"===e?t-i[1]:"center"===e?t+i[3]/2-i[1]/2:t+i[3]}(g,v,h),_+=h[0]),_+=p/2,jk(r,i,!0,t);var w=d.canCacheByTextString,b=t.__tspanList||(t.__tspanList=[]),S=b.length;if(w&&t.__canCacheByTextString&&t.__text===a){if(t.__dirtyText&&S)for(var M=0;M<S;++M)nP(b[M],v,x,_+M*p)}else{t.__text=a,t.__canCacheByTextString=w;var I=d.lines,T=I.length;for(M=0;M<T;M++){var A=b[M],D=I[M];A?A.__zrText!==D&&(A.innerHTML="",A.appendChild(document.createTextNode(D))):(A=b[M]=Nk("tspan"),r.appendChild(A),A.appendChild(document.createTextNode(D))),nP(A,v,x,_+M*p)}if(T<S){for(;M<S;M++)r.removeChild(b[M]);b.length=T}}}};function nP(t,e,i,n){Yk(t,"dominant-baseline","middle"),Yk(t,"text-anchor",eP[e]),Yk(t,"x",i),Yk(t,"y",n)}function oP(t){t&&t.__textSvgEl&&(t.__textSvgEl.parentNode&&t.__textSvgEl.parentNode.removeChild(t.__textSvgEl),t.__textSvgEl=null,t.__tspanList=[],t.__text=null)}function aP(){}function rP(t,e){for(var i=0,n=e.length,o=0,a=0;i<n;i++){var r=e[i];if(r.removed){for(s=[],l=a;l<a+r.count;l++)s.push(l);r.indices=s,a+=r.count}else{for(var s=[],l=o;l<o+r.count;l++)s.push(l);r.indices=s,o+=r.count,r.added||(a+=r.count)}}return e}$k.drawRectText=iP,$k.brush=function(t){null!=t.style.text?iP(t,!1):oP(t)},aP.prototype={diff:function(l,u,t){t=t||function(t,e){return t===e},this.equals=t;var h=this;l=l.slice();var c=(u=u.slice()).length,d=l.length,f=1,e=c+d,p=[{newPos:-1,components:[]}],i=this.extractCommon(p[0],u,l,0);if(p[0].newPos+1>=c&&d<=i+1){for(var n=[],o=0;o<u.length;o++)n.push(o);return[{indices:n,count:u.length}]}function a(){for(var t=-1*f;t<=f;t+=2){var e,i=p[t-1],n=p[t+1],o=(n?n.newPos:0)-t;i&&(p[t-1]=void 0);var a=i&&i.newPos+1<c,r=n&&0<=o&&o<d;if(a||r){if(!a||r&&i.newPos<n.newPos?(e={newPos:(s=n).newPos,components:s.components.slice(0)},h.pushComponent(e.components,void 0,!0)):((e=i).newPos++,h.pushComponent(e.components,!0,void 0)),o=h.extractCommon(e,u,l,t),e.newPos+1>=c&&d<=o+1)return rP(h,e.components,u,l);p[t]=e}else p[t]=void 0}var s;f++}for(;f<=e;){var r=a();if(r)return r}},pushComponent:function(t,e,i){var n=t[t.length-1];n&&n.added===e&&n.removed===i?t[t.length-1]={count:n.count+1,added:e,removed:i}:t.push({count:1,added:e,removed:i})},extractCommon:function(t,e,i,n){for(var o=e.length,a=i.length,r=t.newPos,s=r-n,l=0;r+1<o&&s+1<a&&this.equals(e[r+1],i[s+1]);)r++,s++,l++;return l&&t.components.push({count:l}),t.newPos=r,s},tokenize:function(t){return t.slice()},join:function(t){return t.slice()}};var sP=new aP;function lP(t,e,i,n,o){this._zrId=t,this._svgRoot=e,this._tagNames="string"==typeof i?[i]:i,this._markLabel=n,this._domName=o||"_dom",this.nextId=0}function uP(t,e){lP.call(this,t,e,["linearGradient","radialGradient"],"__gradient_in_use__")}function hP(t,e){lP.call(this,t,e,"clipPath","__clippath_in_use__")}function cP(t,e){lP.call(this,t,e,["filter"],"__filter_in_use__","_shadowDom")}function dP(t){return t&&(t.shadowBlur||t.shadowOffsetX||t.shadowOffsetY||t.textShadowBlur||t.textShadowOffsetX||t.textShadowOffsetY)}function fP(t){return parseInt(t,10)}function pP(t,e){return e&&t&&e.parentNode!==t}function gP(t,e,i){if(pP(t,e)&&i){var n=i.nextSibling;n?t.insertBefore(e,n):t.appendChild(e)}}function mP(t,e){if(pP(t,e)){var i=t.firstChild;i?t.insertBefore(e,i):t.appendChild(e)}}function vP(t,e){e&&t&&e.parentNode===t&&t.removeChild(e)}function yP(t){return t.__textSvgEl}function xP(t){return t.__svgEl}lP.prototype.createElement=Nk,lP.prototype.getDefs=function(t){var e=this._svgRoot,n=this._svgRoot.getElementsByTagName("defs");return 0===n.length?t?((n=e.insertBefore(this.createElement("defs"),e.firstChild)).contains||(n.contains=function(t){var e=n.children;if(!e)return!1;for(var i=e.length-1;0<=i;--i)if(e[i]===t)return!0;return!1}),n):null:n[0]},lP.prototype.update=function(t,e){if(t){var i=this.getDefs(!1);if(t[this._domName]&&i.contains(t[this._domName]))"function"==typeof e&&e(t);else{var n=this.add(t);n&&(t[this._domName]=n)}}},lP.prototype.addDom=function(t){this.getDefs(!0).appendChild(t)},lP.prototype.removeDom=function(t){var e=this.getDefs(!1);e&&t[this._domName]&&(e.removeChild(t[this._domName]),t[this._domName]=null)},lP.prototype.getDoms=function(){var i=this.getDefs(!1);if(!i)return[];var n=[];return E(this._tagNames,function(t){var e=i.getElementsByTagName(t);n=n.concat([].slice.call(e))}),n},lP.prototype.markAllUnused=function(){var t=this.getDoms(),e=this;E(t,function(t){t[e._markLabel]="0"})},lP.prototype.markUsed=function(t){t&&(t[this._markLabel]="1")},lP.prototype.removeUnused=function(){var e=this.getDefs(!1);if(e){var t=this.getDoms(),i=this;E(t,function(t){"1"!==t[i._markLabel]&&e.removeChild(t)})}},lP.prototype.getSvgProxy=function(t){return t instanceof Ar?qk:t instanceof Qn?Kk:t instanceof Ur?$k:qk},lP.prototype.getTextSvgElement=function(t){return t.__textSvgEl},lP.prototype.getSvgElement=function(t){return t.__svgEl},w(uP,lP),uP.prototype.addWithoutUpdate=function(a,r){if(r&&r.style){var s=this;E(["fill","stroke"],function(t){if(r.style[t]&&("linear"===r.style[t].type||"radial"===r.style[t].type)){var e,i=r.style[t],n=s.getDefs(!0);i._dom?(e=i._dom,n.contains(i._dom)||s.addDom(e)):e=s.add(i),s.markUsed(r);var o=e.getAttribute("id");a.setAttribute(t,"url(#"+o+")")}})}},uP.prototype.add=function(t){var e;if("linear"===t.type)e=this.createElement("linearGradient");else{if("radial"!==t.type)return vi("Illegal gradient type."),null;e=this.createElement("radialGradient")}return t.id=t.id||this.nextId++,e.setAttribute("id","zr"+this._zrId+"-gradient-"+t.id),this.updateDom(t,e),this.addDom(e),e},uP.prototype.update=function(i){var n=this;lP.prototype.update.call(this,i,function(){var t=i.type,e=i._dom.tagName;"linear"===t&&"linearGradient"===e||"radial"===t&&"radialGradient"===e?n.updateDom(i,i._dom):(n.removeDom(i),n.add(i))})},uP.prototype.updateDom=function(t,e){if("linear"===t.type)e.setAttribute("x1",t.x),e.setAttribute("y1",t.y),e.setAttribute("x2",t.x2),e.setAttribute("y2",t.y2);else{if("radial"!==t.type)return void vi("Illegal gradient type.");e.setAttribute("cx",t.x),e.setAttribute("cy",t.y),e.setAttribute("r",t.r)}t.global?e.setAttribute("gradientUnits","userSpaceOnUse"):e.setAttribute("gradientUnits","objectBoundingBox"),e.innerHTML="";for(var i=t.colorStops,n=0,o=i.length;n<o;++n){var a=this.createElement("stop");a.setAttribute("offset",100*i[n].offset+"%");var r=i[n].color;if(r.indexOf(!1)){var s=Fe(r)[3],l=Ze(r);a.setAttribute("stop-color","#"+l),a.setAttribute("stop-opacity",s)}else a.setAttribute("stop-color",i[n].color);e.appendChild(a)}t._dom=e},uP.prototype.markUsed=function(t){if(t.style){var e=t.style.fill;e&&e._dom&&lP.prototype.markUsed.call(this,e._dom),(e=t.style.stroke)&&e._dom&&lP.prototype.markUsed.call(this,e._dom)}},w(hP,lP),hP.prototype.update=function(t){var e=this.getSvgElement(t);e&&this.updateDom(e,t.__clipPaths,!1);var i=this.getTextSvgElement(t);i&&this.updateDom(i,t.__clipPaths,!0),this.markUsed(t)},hP.prototype.updateDom=function(t,e,i){if(e&&0<e.length){var n,o,a=this.getDefs(!0),r=e[0],s=i?"_textDom":"_dom";r[s]?(o=r[s].getAttribute("id"),n=r[s],a.contains(n)||a.appendChild(n)):(o="zr"+this._zrId+"-clip-"+this.nextId,++this.nextId,(n=this.createElement("clipPath")).setAttribute("id",o),a.appendChild(n),r[s]=n);var l=this.getSvgProxy(r);if(r.transform&&r.parent.invTransform&&!i){var u=Array.prototype.slice.call(r.transform);le(r.transform,r.parent.invTransform,r.transform),l.brush(r),r.transform=u}else l.brush(r);var h=this.getSvgElement(r);n.innerHTML="",n.appendChild(h.cloneNode()),t.setAttribute("clip-path","url(#"+o+")"),1<e.length&&this.updateDom(n,e.slice(1),i)}else t&&t.setAttribute("clip-path","none")},hP.prototype.markUsed=function(t){var e=this;t.__clipPaths&&E(t.__clipPaths,function(t){t._dom&&lP.prototype.markUsed.call(e,t._dom),t._textDom&&lP.prototype.markUsed.call(e,t._textDom)})},w(cP,lP),cP.prototype.addWithoutUpdate=function(t,e){if(e&&dP(e.style)){var i;if(e._shadowDom)i=e._shadowDom,this.getDefs(!0).contains(e._shadowDom)||this.addDom(i);else i=this.add(e);this.markUsed(e);var n=i.getAttribute("id");t.style.filter="url(#"+n+")"}},cP.prototype.add=function(t){var e=this.createElement("filter");return t._shadowDomId=t._shadowDomId||this.nextId++,e.setAttribute("id","zr"+this._zrId+"-shadow-"+t._shadowDomId),this.updateDom(t,e),this.addDom(e),e},cP.prototype.update=function(t,e){if(dP(e.style)){var i=this;lP.prototype.update.call(this,e,function(){i.updateDom(e,e._shadowDom)})}else this.remove(t,e)},cP.prototype.remove=function(t,e){null!=e._shadowDomId&&(this.removeDom(t),t.style.filter="")},cP.prototype.updateDom=function(t,e){var i=e.getElementsByTagName("feDropShadow");i=0===i.length?this.createElement("feDropShadow"):i[0];var n,o,a,r,s=t.style,l=t.scale&&t.scale[0]||1,u=t.scale&&t.scale[1]||1;if(s.shadowBlur||s.shadowOffsetX||s.shadowOffsetY)n=s.shadowOffsetX||0,o=s.shadowOffsetY||0,a=s.shadowBlur,r=s.shadowColor;else{if(!s.textShadowBlur)return void this.removeDom(e,s);n=s.textShadowOffsetX||0,o=s.textShadowOffsetY||0,a=s.textShadowBlur,r=s.textShadowColor}i.setAttribute("dx",n/l),i.setAttribute("dy",o/u),i.setAttribute("flood-color",r);var h=a/2/l+" "+a/2/u;i.setAttribute("stdDeviation",h),e.setAttribute("x","-100%"),e.setAttribute("y","-100%"),e.setAttribute("width",Math.ceil(a/2*200)+"%"),e.setAttribute("height",Math.ceil(a/2*200)+"%"),e.appendChild(i),t._shadowDom=e},cP.prototype.markUsed=function(t){t._shadowDom&&lP.prototype.markUsed.call(this,t._shadowDom)};function _P(t,e,i,n){this.root=t,this.storage=e,this._opts=i=k({},i||{});var o=Nk("svg");o.setAttribute("xmlns","http://www.w3.org/2000/svg"),o.setAttribute("version","1.1"),o.setAttribute("baseProfile","full"),o.style.cssText="user-select:none;position:absolute;left:0;top:0;",this.gradientManager=new uP(n,o),this.clipPathManager=new hP(n,o),this.shadowManager=new cP(n,o);var a=document.createElement("div");a.style.cssText="overflow:hidden;position:relative",this._svgRoot=o,this._viewport=a,t.appendChild(a),a.appendChild(o),this.resize(i.width,i.height),this._visibleList=[]}_P.prototype={constructor:_P,getType:function(){return"svg"},getViewportRoot:function(){return this._viewport},getViewportRootOffset:function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},refresh:function(){var t=this.storage.getDisplayList(!0);this._paintList(t)},setBackgroundColor:function(t){this._viewport.style.background=t},_paintList:function(t){this.gradientManager.markAllUnused(),this.clipPathManager.markAllUnused(),this.shadowManager.markAllUnused();var e,i,n=this._svgRoot,o=this._visibleList,a=t.length,r=[];for(e=0;e<a;e++){var s=t[e],l=(i=s)instanceof Ar?qk:i instanceof Qn?Kk:i instanceof Ur?$k:qk,u=xP(s)||yP(s);s.invisible||(s.__dirty&&(l&&l.brush(s),this.clipPathManager.update(s),s.style&&(this.gradientManager.update(s.style.fill),this.gradientManager.update(s.style.stroke),this.shadowManager.update(u,s)),s.__dirty=!1),r.push(s))}var h,c=function(t,e,i){return sP.diff(t,e,i)}(o,r);for(e=0;e<c.length;e++){if((p=c[e]).removed)for(var d=0;d<p.count;d++){u=xP(s=o[p.indices[d]]);var f=yP(s);vP(n,u),vP(n,f)}}for(e=0;e<c.length;e++){var p;if((p=c[e]).added)for(d=0;d<p.count;d++){u=xP(s=r[p.indices[d]]),f=yP(s);h?gP(n,u,h):mP(n,u),u?gP(n,f,u):h?gP(n,f,h):mP(n,f),gP(n,f,u),h=f||u||h,this.gradientManager.addWithoutUpdate(u||f,s),this.shadowManager.addWithoutUpdate(u||f,s),this.clipPathManager.markUsed(s)}else if(!p.removed)for(d=0;d<p.count;d++){u=xP(s=r[p.indices[d]]),f=yP(s),u=xP(s),f=yP(s);this.gradientManager.markUsed(s),this.gradientManager.addWithoutUpdate(u||f,s),this.shadowManager.markUsed(s),this.shadowManager.addWithoutUpdate(u||f,s),this.clipPathManager.markUsed(s),f&&gP(n,f,u),h=u||f||h}}this.gradientManager.removeUnused(),this.clipPathManager.removeUnused(),this.shadowManager.removeUnused(),this._visibleList=r},_getDefs:function(t){var n,e=this._svgRoot;return 0!==(n=this._svgRoot.getElementsByTagName("defs")).length?n[0]:t?((n=e.insertBefore(Nk("defs"),e.firstChild)).contains||(n.contains=function(t){var e=n.children;if(!e)return!1;for(var i=e.length-1;0<=i;--i)if(e[i]===t)return!0;return!1}),n):null},resize:function(t,e){var i=this._viewport;i.style.display="none";var n=this._opts;if(null!=t&&(n.width=t),null!=e&&(n.height=e),t=this._getSize(0),e=this._getSize(1),i.style.display="",this._width!==t||this._height!==e){this._width=t,this._height=e;var o=i.style;o.width=t+"px",o.height=e+"px";var a=this._svgRoot;a.setAttribute("width",t),a.setAttribute("height",e)}},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(t){var e=this._opts,i=["width","height"][t],n=["clientWidth","clientHeight"][t],o=["paddingLeft","paddingTop"][t],a=["paddingRight","paddingBottom"][t];if(null!=e[i]&&"auto"!==e[i])return parseFloat(e[i]);var r=this.root,s=document.defaultView.getComputedStyle(r);return(r[n]||fP(s[i])||fP(r.style[i]))-(fP(s[o])||0)-(fP(s[a])||0)|0},dispose:function(){this.root.innerHTML="",this._svgRoot=this._viewport=this.storage=null},clear:function(){this._viewport&&this.root.removeChild(this._viewport)},pathToDataUrl:function(){return this.refresh(),"data:image/svg+xml;charset=UTF-8,"+this._svgRoot.outerHTML}},E(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","toDataURL","pathToImage"],function(t){_P.prototype[t]=function(t){return function(){vi('In SVG mode painter not support method "'+t+'"')}}(t)}),Po("svg",_P),t.version="4.7.0",t.dependencies={zrender:"4.3.0"},t.PRIORITY=Cd,t.init=function(t,e,i){var n=gf(t);if(n)return n;var o=new Ed(t,e,i);return o.id="ec_"+hf++,lf[o.id]=o,Jo(t,df,o.id),function(n){var o="__connectUpdateStatus";function a(t,e){for(var i=0;i<t.length;i++){t[i][o]=e}}Id(tf,function(t,e){n._messageCenter.on(e,function(t){if(uf[n.group]&&0!==n[o]){if(t&&t.escapeConnect)return;var e=n.makeActionFromEvent(t),i=[];Id(lf,function(t){t!==n&&t.group===n.group&&i.push(t)}),a(i,0),Id(i,function(t){1!==t[o]&&t.dispatchAction(e)}),a(i,2)}})})}(o),o},t.connect=function(e){if(O(e)){var t=e;e=null,Id(t,function(t){null!=t.group&&(e=t.group)}),e=e||"g_"+cf++,Id(t,function(t){t.group=e})}return uf[e]=!0,e},t.disConnect=ff,t.disconnect=pf,t.dispose=function(t){"string"==typeof t?t=lf[t]:t instanceof Ed||(t=gf(t)),t instanceof Ed&&!t.isDisposed()&&t.dispose()},t.getInstanceByDom=gf,t.getInstanceById=function(t){return lf[t]},t.registerTheme=mf,t.registerPreprocessor=vf,t.registerProcessor=yf,t.registerPostUpdate=function(t){of.push(t)},t.registerAction=xf,t.registerCoordinateSystem=_f,t.getCoordinateSystemDimensions=function(t){var e=sh.get(t);if(e)return e.getDimensionsInfo?e.getDimensionsInfo():e.dimensions.slice()},t.registerLayout=wf,t.registerVisual=bf,t.registerLoading=Mf,t.extendComponentModel=If,t.extendComponentView=Tf,t.extendSeriesModel=Af,t.extendChartView=Df,t.setCanvasCreator=function(t){f("createCanvas",t)},t.registerMap=function(t,e,i){bd.registerMap(t,e,i)},t.getMap=function(t){var e=bd.retrieveMap(t);return e&&e[0]&&{geoJson:e[0].geoJSON,specialAreas:e[0].specialAreas}},t.dataTool={},t.zrender=Oo,t.number=Ql,t.format=gu,t.throttle=Cc,t.helper=bg,t.matrix=pe,t.vector=It,t.color=Je,t.parseGeoJSON=Dg,t.parseGeoJson=Fg,t.util=Wg,t.graphic=Hg,t.List=Xf,t.Model=Cl,t.Axis=Vg,t.env=v});
+!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(t.echarts={})}(this,function(t){"use strict";var e=2311,n=function(){return e++},v="object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?{browser:{},os:{},node:!1,wxa:!0,canvasSupported:!0,svgSupported:!1,touchEventsSupported:!0,domSupported:!1}:"undefined"==typeof document&&"undefined"!=typeof self?{browser:{},os:{},node:!1,worker:!0,canvasSupported:!0,domSupported:!1}:"undefined"==typeof navigator?{browser:{},os:{},node:!0,worker:!1,canvasSupported:!0,svgSupported:!0,domSupported:!1}:function(t){var e={},i=t.match(/Firefox\/([\d.]+)/),n=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),o=t.match(/Edge\/([\d.]+)/),a=/micromessenger/i.test(t);i&&(e.firefox=!0,e.version=i[1]);n&&(e.ie=!0,e.version=n[1]);o&&(e.edge=!0,e.version=o[1]);a&&(e.weChat=!0);return{browser:e,os:{},node:!1,canvasSupported:!!document.createElement("canvas").getContext,svgSupported:"undefined"!=typeof SVGRect,touchEventsSupported:"ontouchstart"in window&&!e.ie&&!e.edge,pointerEventsSupported:"onpointerdown"in window&&(e.edge||e.ie&&11<=e.version),domSupported:"undefined"!=typeof document}}(navigator.userAgent);var s={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},l={"[object Int8Array]":1,"[object Uint8Array]":1,"[object Uint8ClampedArray]":1,"[object Int16Array]":1,"[object Uint16Array]":1,"[object Int32Array]":1,"[object Uint32Array]":1,"[object Float32Array]":1,"[object Float64Array]":1},u=Object.prototype.toString,i=Array.prototype,r=i.forEach,h=i.filter,o=i.slice,c=i.map,d=i.reduce,a={};function f(t,e){"createCanvas"===t&&(g=null),a[t]=e}function k(t){if(null==t||"object"!=typeof t)return t;var e=t,i=u.call(t);if("[object Array]"===i){if(!$(t)){e=[];for(var n=0,o=t.length;n<o;n++)e[n]=k(t[n])}}else if(l[i]){if(!$(t)){var a=t.constructor;if(t.constructor.from)e=a.from(t);else{e=new a(t.length);for(n=0,o=t.length;n<o;n++)e[n]=k(t[n])}}}else if(!s[i]&&!$(t)&&!G(t))for(var r in e={},t)t.hasOwnProperty(r)&&(e[r]=k(t[r]));return e}function m(t,e,i){if(!z(e)||!z(t))return i?k(e):t;for(var n in e)if(e.hasOwnProperty(n)){var o=t[n],a=e[n];!z(a)||!z(o)||L(a)||L(o)||G(a)||G(o)||B(a)||B(o)||$(a)||$(o)?!i&&n in t||(t[n]=k(e[n])):m(o,a,i)}return t}function p(t,e){for(var i=t[0],n=1,o=t.length;n<o;n++)i=m(i,t[n],e);return i}function P(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);return t}function D(t,e,i){for(var n in e)e.hasOwnProperty(n)&&(i?null!=e[n]:null==t[n])&&(t[n]=e[n]);return t}function y(){return a.createCanvas()}var g;function x(){return g=g||y().getContext("2d")}function _(t,e){if(t){if(t.indexOf)return t.indexOf(e);for(var i=0,n=t.length;i<n;i++)if(t[i]===e)return i}return-1}function w(t,e){var i=t.prototype;function n(){}for(var o in n.prototype=e.prototype,t.prototype=new n,i)i.hasOwnProperty(o)&&(t.prototype[o]=i[o]);(t.prototype.constructor=t).superClass=e}function b(t,e,i){D(t="prototype"in t?t.prototype:t,e="prototype"in e?e.prototype:e,i)}function N(t){if(t)return"string"!=typeof t&&"number"==typeof t.length}function E(t,e,i){if(t&&e)if(t.forEach&&t.forEach===r)t.forEach(e,i);else if(t.length===+t.length)for(var n=0,o=t.length;n<o;n++)e.call(i,t[n],n,t);else for(var a in t)t.hasOwnProperty(a)&&e.call(i,t[a],a,t)}function O(t,e,i){if(t&&e){if(t.map&&t.map===c)return t.map(e,i);for(var n=[],o=0,a=t.length;o<a;o++)n.push(e.call(i,t[o],o,t));return n}}function S(t,e,i,n){if(t&&e){if(t.reduce&&t.reduce===d)return t.reduce(e,i,n);for(var o=0,a=t.length;o<a;o++)i=e.call(n,i,t[o],o,t);return i}}function M(t,e,i){if(t&&e){if(t.filter&&t.filter===h)return t.filter(e,i);for(var n=[],o=0,a=t.length;o<a;o++)e.call(i,t[o],o,t)&&n.push(t[o]);return n}}function I(t,e,i){if(t&&e)for(var n=0,o=t.length;n<o;n++)if(e.call(i,t[n],n,t))return t[n]}function A(t,e){var i=o.call(arguments,2);return function(){return t.apply(e,i.concat(o.call(arguments)))}}function T(t){var e=o.call(arguments,1);return function(){return t.apply(this,e.concat(o.call(arguments)))}}function L(t){return"[object Array]"===u.call(t)}function C(t){return"function"==typeof t}function R(t){return"[object String]"===u.call(t)}function z(t){var e=typeof t;return"function"==e||!!t&&"object"==e}function B(t){return!!s[u.call(t)]}function V(t){return!!l[u.call(t)]}function G(t){return"object"==typeof t&&"number"==typeof t.nodeType&&"object"==typeof t.ownerDocument}function F(t){return t!=t}function W(t){for(var e=0,i=arguments.length;e<i;e++)if(null!=arguments[e])return arguments[e]}function H(t,e){return null!=t?t:e}function Z(t,e,i){return null!=t?t:null!=e?e:i}function U(){return Function.call.apply(o,arguments)}function X(t){if("number"==typeof t)return[t,t,t,t];var e=t.length;return 2===e?[t[0],t[1],t[0],t[1]]:3===e?[t[0],t[1],t[2],t[1]]:t}function Y(t,e){if(!t)throw new Error(e)}function j(t){return null==t?null:"function"==typeof t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}a.createCanvas=function(){return document.createElement("canvas")};var q="__ec_primitive__";function K(t){t[q]=!0}function $(t){return t[q]}function J(t){var i=L(t);this.data={};var n=this;function e(t,e){i?n.set(t,e):n.set(e,t)}t instanceof J?t.each(e):t&&E(t,e)}function Q(t){return new J(t)}function tt(t,e){for(var i=new t.constructor(t.length+e.length),n=0;n<t.length;n++)i[n]=t[n];var o=t.length;for(n=0;n<e.length;n++)i[n+o]=e[n];return i}function et(){}J.prototype={constructor:J,get:function(t){return this.data.hasOwnProperty(t)?this.data[t]:null},set:function(t,e){return this.data[t]=e},each:function(t,e){for(var i in void 0!==e&&(t=A(t,e)),this.data)this.data.hasOwnProperty(i)&&t(this.data[i],i)},removeKey:function(t){delete this.data[t]}};var it=(Object.freeze||Object)({$override:f,clone:k,merge:m,mergeAll:p,extend:P,defaults:D,createCanvas:y,getContext:x,indexOf:_,inherits:w,mixin:b,isArrayLike:N,each:E,map:O,reduce:S,filter:M,find:I,bind:A,curry:T,isArray:L,isFunction:C,isString:R,isObject:z,isBuiltInObject:B,isTypedArray:V,isDom:G,eqNaN:F,retrieve:W,retrieve2:H,retrieve3:Z,slice:U,normalizeCssArray:X,assert:Y,trim:j,setAsPrimitive:K,isPrimitive:$,createHashMap:Q,concatArray:tt,noop:et}),nt="undefined"==typeof Float32Array?Array:Float32Array;function ot(t,e){var i=new nt(2);return null==t&&(t=0),null==e&&(e=0),i[0]=t,i[1]=e,i}function at(t,e){return t[0]=e[0],t[1]=e[1],t}function rt(t){var e=new nt(2);return e[0]=t[0],e[1]=t[1],e}function st(t,e,i){return t[0]=e,t[1]=i,t}function lt(t,e,i){return t[0]=e[0]+i[0],t[1]=e[1]+i[1],t}function ut(t,e,i,n){return t[0]=e[0]+i[0]*n,t[1]=e[1]+i[1]*n,t}function ht(t,e,i){return t[0]=e[0]-i[0],t[1]=e[1]-i[1],t}function ct(t){return Math.sqrt(ft(t))}var dt=ct;function ft(t){return t[0]*t[0]+t[1]*t[1]}var pt=ft;function gt(t,e,i){return t[0]=e[0]*i,t[1]=e[1]*i,t}function mt(t,e){var i=ct(e);return 0===i?(t[0]=0,t[1]=0):(t[0]=e[0]/i,t[1]=e[1]/i),t}function vt(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}var yt=vt;function xt(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])}var _t=xt;function wt(t,e,i,n){return t[0]=e[0]+n*(i[0]-e[0]),t[1]=e[1]+n*(i[1]-e[1]),t}function bt(t,e,i){var n=e[0],o=e[1];return t[0]=i[0]*n+i[2]*o+i[4],t[1]=i[1]*n+i[3]*o+i[5],t}function St(t,e,i){return t[0]=Math.min(e[0],i[0]),t[1]=Math.min(e[1],i[1]),t}function Mt(t,e,i){return t[0]=Math.max(e[0],i[0]),t[1]=Math.max(e[1],i[1]),t}var It=(Object.freeze||Object)({create:ot,copy:at,clone:rt,set:st,add:lt,scaleAndAdd:ut,sub:ht,len:ct,length:dt,lenSquare:ft,lengthSquare:pt,mul:function(t,e,i){return t[0]=e[0]*i[0],t[1]=e[1]*i[1],t},div:function(t,e,i){return t[0]=e[0]/i[0],t[1]=e[1]/i[1],t},dot:function(t,e){return t[0]*e[0]+t[1]*e[1]},scale:gt,normalize:mt,distance:vt,dist:yt,distanceSquare:xt,distSquare:_t,negate:function(t,e){return t[0]=-e[0],t[1]=-e[1],t},lerp:wt,applyTransform:bt,min:St,max:Mt});function Tt(){this.on("mousedown",this._dragStart,this),this.on("mousemove",this._drag,this),this.on("mouseup",this._dragEnd,this)}function At(t,e){return{target:t,topTarget:e&&e.topTarget}}Tt.prototype={constructor:Tt,_dragStart:function(t){for(var e=t.target;e&&!e.draggable;)e=e.parent;e&&((this._draggingTarget=e).dragging=!0,this._x=t.offsetX,this._y=t.offsetY,this.dispatchToElement(At(e,t),"dragstart",t.event))},_drag:function(t){var e=this._draggingTarget;if(e){var i=t.offsetX,n=t.offsetY,o=i-this._x,a=n-this._y;this._x=i,this._y=n,e.drift(o,a,t),this.dispatchToElement(At(e,t),"drag",t.event);var r=this.findHover(i,n,e).target,s=this._dropTarget;e!==(this._dropTarget=r)&&(s&&r!==s&&this.dispatchToElement(At(s,t),"dragleave",t.event),r&&r!==s&&this.dispatchToElement(At(r,t),"dragenter",t.event))}},_dragEnd:function(t){var e=this._draggingTarget;e&&(e.dragging=!1),this.dispatchToElement(At(e,t),"dragend",t.event),this._dropTarget&&this.dispatchToElement(At(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null}};var Dt=Array.prototype.slice,Ct=function(t){this._$handlers={},this._$eventProcessor=t};function Lt(t,e,i,n,o,a){var r=t._$handlers;if("function"==typeof i&&(o=n,n=i,i=null),!n||!e)return t;i=function(t,e){var i=t._$eventProcessor;return null!=e&&i&&i.normalizeQuery&&(e=i.normalizeQuery(e)),e}(t,i),r[e]||(r[e]=[]);for(var s=0;s<r[e].length;s++)if(r[e][s].h===n)return t;var l={h:n,one:a,query:i,ctx:o||t,callAtLast:n.zrEventfulCallAtLast},u=r[e].length-1,h=r[e][u];return h&&h.callAtLast?r[e].splice(u,0,l):r[e].push(l),t}Ct.prototype={constructor:Ct,one:function(t,e,i,n){return Lt(this,t,e,i,n,!0)},on:function(t,e,i,n){return Lt(this,t,e,i,n,!1)},isSilent:function(t){var e=this._$handlers;return!e[t]||!e[t].length},off:function(t,e){var i=this._$handlers;if(!t)return this._$handlers={},this;if(e){if(i[t]){for(var n=[],o=0,a=i[t].length;o<a;o++)i[t][o].h!==e&&n.push(i[t][o]);i[t]=n}i[t]&&0===i[t].length&&delete i[t]}else delete i[t];return this},trigger:function(t){var e=this._$handlers[t],i=this._$eventProcessor;if(e){var n=arguments,o=n.length;3<o&&(n=Dt.call(n,1));for(var a=e.length,r=0;r<a;){var s=e[r];if(i&&i.filter&&null!=s.query&&!i.filter(t,s.query))r++;else{switch(o){case 1:s.h.call(s.ctx);break;case 2:s.h.call(s.ctx,n[1]);break;case 3:s.h.call(s.ctx,n[1],n[2]);break;default:s.h.apply(s.ctx,n)}s.one?(e.splice(r,1),a--):r++}}}return i&&i.afterTrigger&&i.afterTrigger(t),this},triggerWithContext:function(t){var e=this._$handlers[t],i=this._$eventProcessor;if(e){var n=arguments,o=n.length;4<o&&(n=Dt.call(n,1,n.length-1));for(var a=n[n.length-1],r=e.length,s=0;s<r;){var l=e[s];if(i&&i.filter&&null!=l.query&&!i.filter(t,l.query))s++;else{switch(o){case 1:l.h.call(a);break;case 2:l.h.call(a,n[1]);break;case 3:l.h.call(a,n[1],n[2]);break;default:l.h.apply(a,n)}l.one?(e.splice(s,1),r--):s++}}}return i&&i.afterTrigger&&i.afterTrigger(t),this}};var kt=Math.log(2);function Pt(t,e,i,n,o,a){var r=n+"-"+o,s=t.length;if(a.hasOwnProperty(r))return a[r];if(1===e){var l=Math.round(Math.log((1<<s)-1&~o)/kt);return t[i][l]}for(var u=n|1<<i,h=i+1;n&1<<h;)h++;for(var c=0,d=0,f=0;d<s;d++){var p=1<<d;p&o||(c+=(f%2?-1:1)*t[i][d]*Pt(t,e-1,h,u,o|p,a),f++)}return a[r]=c}function Nt(t,e){var i=[[t[0],t[1],1,0,0,0,-e[0]*t[0],-e[0]*t[1]],[0,0,0,t[0],t[1],1,-e[1]*t[0],-e[1]*t[1]],[t[2],t[3],1,0,0,0,-e[2]*t[2],-e[2]*t[3]],[0,0,0,t[2],t[3],1,-e[3]*t[2],-e[3]*t[3]],[t[4],t[5],1,0,0,0,-e[4]*t[4],-e[4]*t[5]],[0,0,0,t[4],t[5],1,-e[5]*t[4],-e[5]*t[5]],[t[6],t[7],1,0,0,0,-e[6]*t[6],-e[6]*t[7]],[0,0,0,t[6],t[7],1,-e[7]*t[6],-e[7]*t[7]]],n={},o=Pt(i,8,0,0,0,n);if(0!==o){for(var a=[],r=0;r<8;r++)for(var s=0;s<8;s++)null==a[s]&&(a[s]=0),a[s]+=((r+s)%2?-1:1)*Pt(i,7,0===r?1:0,1<<r,1<<s,n)/o*e[r];return function(t,e,i){var n=e*a[6]+i*a[7]+1;t[0]=(e*a[0]+i*a[1]+a[2])/n,t[1]=(e*a[3]+i*a[4]+a[5])/n}}}var Ot="___zrEVENTSAVED",Et=[];function Rt(t,e,i,n,o){if(e.getBoundingClientRect&&v.domSupported&&!zt(e)){var a=e[Ot]||(e[Ot]={}),r=function(t,e,i){for(var n=i?"invTrans":"trans",o=e[n],a=e.srcCoords,r=!0,s=[],l=[],u=0;u<4;u++){var h=t[u].getBoundingClientRect(),c=2*u,d=h.left,f=h.top;s.push(d,f),r=r&&a&&d===a[c]&&f===a[1+c],l.push(t[u].offsetLeft,t[u].offsetTop)}return r&&o?o:(e.srcCoords=s,e[n]=i?Nt(l,s):Nt(s,l))}(function(t,e){var i=e.markers;if(i)return i;i=e.markers=[];for(var n=["left","right"],o=["top","bottom"],a=0;a<4;a++){var r=document.createElement("div"),s=r.style,l=a%2,u=(a>>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",n[l]+":0",o[u]+":0",n[1-l]+":auto",o[1-u]+":auto",""].join("!important;"),t.appendChild(r),i.push(r)}return i}(e,a),a,o);if(r)return r(t,i,n),!0}return!1}function zt(t){return"CANVAS"===t.nodeName.toUpperCase()}var Bt="undefined"!=typeof window&&!!window.addEventListener,Vt=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Gt=[];function Ft(t,e,i,n){return i=i||{},n||!v.canvasSupported?Wt(t,e,i):v.browser.firefox&&null!=e.layerX&&e.layerX!==e.offsetX?(i.zrX=e.layerX,i.zrY=e.layerY):null!=e.offsetX?(i.zrX=e.offsetX,i.zrY=e.offsetY):Wt(t,e,i),i}function Wt(t,e,i){if(v.domSupported&&t.getBoundingClientRect){var n=e.clientX,o=e.clientY;if(zt(t)){var a=t.getBoundingClientRect();return i.zrX=n-a.left,void(i.zrY=o-a.top)}if(Rt(Gt,t,n,o))return i.zrX=Gt[0],void(i.zrY=Gt[1])}i.zrX=i.zrY=0}function Ht(t){return t||window.event}function Zt(t,e,i){if(null!=(e=Ht(e)).zrX)return e;var n=e.type;if(n&&0<=n.indexOf("touch")){var o="touchend"!==n?e.targetTouches[0]:e.changedTouches[0];o&&Ft(t,o,e,i)}else Ft(t,e,e,i),e.zrDelta=e.wheelDelta?e.wheelDelta/120:-(e.detail||0)/3;var a=e.button;return null==e.which&&void 0!==a&&Vt.test(e.type)&&(e.which=1&a?1:2&a?3:4&a?2:0),e}function Ut(t,e,i,n){Bt?t.addEventListener(e,i,n):t.attachEvent("on"+e,i)}var Xt=Bt?function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0}:function(t){t.returnValue=!1,t.cancelBubble=!0};function Yt(t){return 2===t.which||3===t.which}function jt(){this._track=[]}function qt(t){var e=t[1][0]-t[0][0],i=t[1][1]-t[0][1];return Math.sqrt(e*e+i*i)}jt.prototype={constructor:jt,recognize:function(t,e,i){return this._doTrack(t,e,i),this._recognize(t)},clear:function(){return this._track.length=0,this},_doTrack:function(t,e,i){var n=t.touches;if(n){for(var o={points:[],touches:[],target:e,event:t},a=0,r=n.length;a<r;a++){var s=n[a],l=Ft(i,s,{});o.points.push([l.zrX,l.zrY]),o.touches.push(s)}this._track.push(o)}},_recognize:function(t){for(var e in Kt)if(Kt.hasOwnProperty(e)){var i=Kt[e](this._track,t);if(i)return i}}};var Kt={pinch:function(t,e){var i=t.length;if(i){var n=(t[i-1]||{}).points,o=(t[i-2]||{}).points||n;if(o&&1<o.length&&n&&1<n.length){var a=qt(n)/qt(o);isFinite(a)||(a=1),e.pinchScale=a;var r=function(t){return[(t[0][0]+t[1][0])/2,(t[0][1]+t[1][1])/2]}(n);return e.pinchX=r[0],e.pinchY=r[1],{type:"pinch",target:t[0].target,event:e}}}}},$t="silent";function Jt(){Xt(this.event)}function Qt(){}Qt.prototype.dispose=function(){};function te(t,e,i,n){Ct.call(this),this.storage=t,this.painter=e,this.painterRoot=n,i=i||new Qt,this.proxy=null,this._hovered={},this._lastTouchMoment,this._lastX,this._lastY,this._gestureMgr,Tt.call(this),this.setHandlerProxy(i)}var ee=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"];function ie(t,e,i){if(t[t.rectHover?"rectContain":"contain"](e,i)){for(var n,o=t;o;){if(o.clipPath&&!o.clipPath.contain(e,i))return!1;o.silent&&(n=!0),o=o.parent}return!n||$t}return!1}function ne(t,e,i){var n=t.painter;return e<0||e>n.getWidth()||i<0||i>n.getHeight()}te.prototype={constructor:te,setHandlerProxy:function(e){this.proxy&&this.proxy.dispose(),e&&(E(ee,function(t){e.on&&e.on(t,this[t],this)},this),e.handler=this),this.proxy=e},mousemove:function(t){var e=t.zrX,i=t.zrY,n=ne(this,e,i),o=this._hovered,a=o.target;a&&!a.__zr&&(a=(o=this.findHover(o.x,o.y)).target);var r=this._hovered=n?{x:e,y:i}:this.findHover(e,i),s=r.target,l=this.proxy;l.setCursor&&l.setCursor(s?s.cursor:"default"),a&&s!==a&&this.dispatchToElement(o,"mouseout",t),this.dispatchToElement(r,"mousemove",t),s&&s!==a&&this.dispatchToElement(r,"mouseover",t)},mouseout:function(t){var e=t.zrEventControl,i=t.zrIsToLocalDOM;"only_globalout"!==e&&this.dispatchToElement(this._hovered,"mouseout",t),"no_globalout"!==e&&(i||this.trigger("globalout",{type:"globalout",event:t}))},resize:function(t){this._hovered={}},dispatch:function(t,e){var i=this[t];i&&i.call(this,e)},dispose:function(){this.proxy.dispose(),this.storage=this.proxy=this.painter=null},setCursorStyle:function(t){var e=this.proxy;e.setCursor&&e.setCursor(t)},dispatchToElement:function(t,e,i){var n=(t=t||{}).target;if(!n||!n.silent){for(var o="on"+e,a=function(t,e,i){return{type:t,event:i,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:i.zrX,offsetY:i.zrY,gestureEvent:i.gestureEvent,pinchX:i.pinchX,pinchY:i.pinchY,pinchScale:i.pinchScale,wheelDelta:i.zrDelta,zrByTouch:i.zrByTouch,which:i.which,stop:Jt}}(e,t,i);n&&(n[o]&&(a.cancelBubble=n[o].call(n,a)),n.trigger(e,a),n=n.parent,!a.cancelBubble););a.cancelBubble||(this.trigger(e,a),this.painter&&this.painter.eachOtherLayer(function(t){"function"==typeof t[o]&&t[o].call(t,a),t.trigger&&t.trigger(e,a)}))}},findHover:function(t,e,i){for(var n=this.storage.getDisplayList(),o={x:t,y:e},a=n.length-1;0<=a;a--){var r;if(n[a]!==i&&!n[a].ignore&&(r=ie(n[a],t,e))&&(o.topTarget||(o.topTarget=n[a]),r!==$t)){o.target=n[a];break}}return o},processGesture:function(t,e){this._gestureMgr||(this._gestureMgr=new jt);var i=this._gestureMgr;"start"===e&&i.clear();var n=i.recognize(t,this.findHover(t.zrX,t.zrY,null).target,this.proxy.dom);if("end"===e&&i.clear(),n){var o=n.type;t.gestureEvent=o,this.dispatchToElement({target:n.target},o,n.event)}}},E(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(r){te.prototype[r]=function(t){var e,i,n=t.zrX,o=t.zrY,a=ne(this,n,o);if("mouseup"===r&&a||(i=(e=this.findHover(n,o)).target),"mousedown"===r)this._downEl=i,this._downPoint=[t.zrX,t.zrY],this._upEl=i;else if("mouseup"===r)this._upEl=i;else if("click"===r){if(this._downEl!==this._upEl||!this._downPoint||4<yt(this._downPoint,[t.zrX,t.zrY]))return;this._downPoint=null}this.dispatchToElement(e,r,t)}}),b(te,Ct),b(te,Tt);var oe="undefined"==typeof Float32Array?Array:Float32Array;function ae(){var t=new oe(6);return re(t),t}function re(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function se(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function le(t,e,i){var n=e[0]*i[0]+e[2]*i[1],o=e[1]*i[0]+e[3]*i[1],a=e[0]*i[2]+e[2]*i[3],r=e[1]*i[2]+e[3]*i[3],s=e[0]*i[4]+e[2]*i[5]+e[4],l=e[1]*i[4]+e[3]*i[5]+e[5];return t[0]=n,t[1]=o,t[2]=a,t[3]=r,t[4]=s,t[5]=l,t}function ue(t,e,i){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+i[0],t[5]=e[5]+i[1],t}function he(t,e,i){var n=e[0],o=e[2],a=e[4],r=e[1],s=e[3],l=e[5],u=Math.sin(i),h=Math.cos(i);return t[0]=n*h+r*u,t[1]=-n*u+r*h,t[2]=o*h+s*u,t[3]=-o*u+h*s,t[4]=h*a+u*l,t[5]=h*l-u*a,t}function ce(t,e,i){var n=i[0],o=i[1];return t[0]=e[0]*n,t[1]=e[1]*o,t[2]=e[2]*n,t[3]=e[3]*o,t[4]=e[4]*n,t[5]=e[5]*o,t}function de(t,e){var i=e[0],n=e[2],o=e[4],a=e[1],r=e[3],s=e[5],l=i*r-a*n;return l?(l=1/l,t[0]=r*l,t[1]=-a*l,t[2]=-n*l,t[3]=i*l,t[4]=(n*s-r*o)*l,t[5]=(a*o-i*s)*l,t):null}function fe(t){var e=ae();return se(e,t),e}var pe=(Object.freeze||Object)({create:ae,identity:re,copy:se,mul:le,translate:ue,rotate:he,scale:ce,invert:de,clone:fe}),ge=re;function me(t){return 5e-5<t||t<-5e-5}var ve=function(t){(t=t||{}).position||(this.position=[0,0]),null==t.rotation&&(this.rotation=0),t.scale||(this.scale=[1,1]),this.origin=this.origin||null},ye=ve.prototype;ye.transform=null,ye.needLocalTransform=function(){return me(this.rotation)||me(this.position[0])||me(this.position[1])||me(this.scale[0]-1)||me(this.scale[1]-1)};var xe=[];ye.updateTransform=function(){var t=this.parent,e=t&&t.transform,i=this.needLocalTransform(),n=this.transform;if(i||e){n=n||ae(),i?this.getLocalTransform(n):ge(n),e&&(i?le(n,t.transform,n):se(n,t.transform)),this.transform=n;var o=this.globalScaleRatio;if(null!=o&&1!==o){this.getGlobalScale(xe);var a=xe[0]<0?-1:1,r=xe[1]<0?-1:1,s=((xe[0]-a)*o+a)/xe[0]||0,l=((xe[1]-r)*o+r)/xe[1]||0;n[0]*=s,n[1]*=s,n[2]*=l,n[3]*=l}this.invTransform=this.invTransform||ae(),de(this.invTransform,n)}else n&&ge(n)},ye.getLocalTransform=function(t){return ve.getLocalTransform(this,t)},ye.setTransform=function(t){var e=this.transform,i=t.dpr||1;e?t.setTransform(i*e[0],i*e[1],i*e[2],i*e[3],i*e[4],i*e[5]):t.setTransform(i,0,0,i,0,0)},ye.restoreTransform=function(t){var e=t.dpr||1;t.setTransform(e,0,0,e,0,0)};var _e=[],we=ae();ye.setLocalTransform=function(t){if(t){var e=t[0]*t[0]+t[1]*t[1],i=t[2]*t[2]+t[3]*t[3],n=this.position,o=this.scale;me(e-1)&&(e=Math.sqrt(e)),me(i-1)&&(i=Math.sqrt(i)),t[0]<0&&(e=-e),t[3]<0&&(i=-i),n[0]=t[4],n[1]=t[5],o[0]=e,o[1]=i,this.rotation=Math.atan2(-t[1]/i,t[0]/e)}},ye.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(le(_e,t.invTransform,e),e=_e);var i=this.origin;i&&(i[0]||i[1])&&(we[4]=i[0],we[5]=i[1],le(_e,e,we),_e[4]-=i[0],_e[5]-=i[1],e=_e),this.setLocalTransform(e)}},ye.getGlobalScale=function(t){var e=this.transform;return t=t||[],e?(t[0]=Math.sqrt(e[0]*e[0]+e[1]*e[1]),t[1]=Math.sqrt(e[2]*e[2]+e[3]*e[3]),e[0]<0&&(t[0]=-t[0]),e[3]<0&&(t[1]=-t[1])):(t[0]=1,t[1]=1),t},ye.transformCoordToLocal=function(t,e){var i=[t,e],n=this.invTransform;return n&&bt(i,i,n),i},ye.transformCoordToGlobal=function(t,e){var i=[t,e],n=this.transform;return n&&bt(i,i,n),i},ve.getLocalTransform=function(t,e){ge(e=e||[]);var i=t.origin,n=t.scale||[1,1],o=t.rotation||0,a=t.position||[0,0];return i&&(e[4]-=i[0],e[5]-=i[1]),ce(e,e,n),o&&he(e,e,o),i&&(e[4]+=i[0],e[5]+=i[1]),e[4]+=a[0],e[5]+=a[1],e};var be={linear:function(t){return t},quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},quarticIn:function(t){return t*t*t*t},quarticOut:function(t){return 1- --t*t*t*t},quarticInOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},quinticIn:function(t){return t*t*t*t*t},quinticOut:function(t){return--t*t*t*t*t+1},quinticInOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},sinusoidalIn:function(t){return 1-Math.cos(t*Math.PI/2)},sinusoidalOut:function(t){return Math.sin(t*Math.PI/2)},sinusoidalInOut:function(t){return.5*(1-Math.cos(Math.PI*t))},exponentialIn:function(t){return 0===t?0:Math.pow(1024,t-1)},exponentialOut:function(t){return 1===t?1:1-Math.pow(2,-10*t)},exponentialInOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(2-Math.pow(2,-10*(t-1)))},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e,i=.1;return 0===t?0:1===t?1:(e=!i||i<1?(i=1,.1):.4*Math.asin(1/i)/(2*Math.PI),-i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4))},elasticOut:function(t){var e,i=.1;return 0===t?0:1===t?1:(e=!i||i<1?(i=1,.1):.4*Math.asin(1/i)/(2*Math.PI),i*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/.4)+1)},elasticInOut:function(t){var e,i=.1;return 0===t?0:1===t?1:(e=!i||i<1?(i=1,.1):.4*Math.asin(1/i)/(2*Math.PI),(t*=2)<1?i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4)*-.5:i*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4)*.5+1)},backIn:function(t){return t*t*(2.70158*t-1.70158)},backOut:function(t){return--t*t*(2.70158*t+1.70158)+1},backInOut:function(t){var e=2.5949095;return(t*=2)<1?t*t*((1+e)*t-e)*.5:.5*((t-=2)*t*((1+e)*t+e)+2)},bounceIn:function(t){return 1-be.bounceOut(1-t)},bounceOut:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bounceInOut:function(t){return t<.5?.5*be.bounceIn(2*t):.5*be.bounceOut(2*t-1)+.5}};function Se(t){this._target=t.target,this._life=t.life||1e3,this._delay=t.delay||0,this._initialized=!1,this.loop=null!=t.loop&&t.loop,this.gap=t.gap||0,this.easing=t.easing||"Linear",this.onframe=t.onframe,this.ondestroy=t.ondestroy,this.onrestart=t.onrestart,this._pausedTime=0,this._paused=!1}Se.prototype={constructor:Se,step:function(t,e){if(this._initialized||(this._startTime=t+this._delay,this._initialized=!0),this._paused)this._pausedTime+=e;else{var i=(t-this._startTime-this._pausedTime)/this._life;if(!(i<0)){i=Math.min(i,1);var n=this.easing,o="string"==typeof n?be[n]:n,a="function"==typeof o?o(i):i;return this.fire("frame",a),1===i?this.loop?(this.restart(t),"restart"):(this._needsRemove=!0,"destroy"):null}}},restart:function(t){var e=(t-this._startTime-this._pausedTime)%this._life;this._startTime=t-e+this.gap,this._pausedTime=0,this._needsRemove=!1},fire:function(t,e){this[t="on"+t]&&this[t](this._target,e)},pause:function(){this._paused=!0},resume:function(){this._paused=!1}};function Me(){this.head=null,this.tail=null,this._len=0}var Ie=Me.prototype;Ie.insert=function(t){var e=new Ae(t);return this.insertEntry(e),e},Ie.insertEntry=function(t){this.head?((this.tail.next=t).prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},Ie.remove=function(t){var e=t.prev,i=t.next;e?e.next=i:this.head=i,i?i.prev=e:this.tail=e,t.next=t.prev=null,this._len--},Ie.len=function(){return this._len},Ie.clear=function(){this.head=this.tail=null,this._len=0};function Te(t){this._list=new Me,this._map={},this._maxSize=t||10,this._lastRemovedEntry=null}var Ae=function(t){this.value=t,this.next,this.prev},De=Te.prototype;De.put=function(t,e){var i=this._list,n=this._map,o=null;if(null==n[t]){var a=i.len(),r=this._lastRemovedEntry;if(a>=this._maxSize&&0<a){var s=i.head;i.remove(s),delete n[s.key],o=s.value,this._lastRemovedEntry=s}r?r.value=e:r=new Ae(e),r.key=t,i.insertEntry(r),n[t]=r}return o},De.get=function(t){var e=this._map[t],i=this._list;if(null!=e)return e!==i.tail&&(i.remove(e),i.insertEntry(e)),e.value},De.clear=function(){this._list.clear(),this._map={}};var Ce={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function Le(t){return(t=Math.round(t))<0?0:255<t?255:t}function ke(t){return t<0?0:1<t?1:t}function Pe(t){return t.length&&"%"===t.charAt(t.length-1)?Le(parseFloat(t)/100*255):Le(parseInt(t,10))}function Ne(t){return t.length&&"%"===t.charAt(t.length-1)?ke(parseFloat(t)/100):ke(parseFloat(t))}function Oe(t,e,i){return i<0?i+=1:1<i&&(i-=1),6*i<1?t+(e-t)*i*6:2*i<1?e:3*i<2?t+(e-t)*(2/3-i)*6:t}function Ee(t,e,i){return t+(e-t)*i}function Re(t,e,i,n,o){return t[0]=e,t[1]=i,t[2]=n,t[3]=o,t}function ze(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var Be=new Te(20),Ve=null;function Ge(t,e){Ve&&ze(Ve,e),Ve=Be.put(t,Ve||e.slice())}function Fe(t,e){if(t){e=e||[];var i=Be.get(t);if(i)return ze(e,i);var n,o=(t+="").replace(/ /g,"").toLowerCase();if(o in Ce)return ze(e,Ce[o]),Ge(t,e),e;if("#"===o.charAt(0))return 4===o.length?0<=(n=parseInt(o.substr(1),16))&&n<=4095?(Re(e,(3840&n)>>4|(3840&n)>>8,240&n|(240&n)>>4,15&n|(15&n)<<4,1),Ge(t,e),e):void Re(e,0,0,0,1):7===o.length?0<=(n=parseInt(o.substr(1),16))&&n<=16777215?(Re(e,(16711680&n)>>16,(65280&n)>>8,255&n,1),Ge(t,e),e):void Re(e,0,0,0,1):void 0;var a=o.indexOf("("),r=o.indexOf(")");if(-1!==a&&r+1===o.length){var s=o.substr(0,a),l=o.substr(a+1,r-(a+1)).split(","),u=1;switch(s){case"rgba":if(4!==l.length)return void Re(e,0,0,0,1);u=Ne(l.pop());case"rgb":return 3!==l.length?void Re(e,0,0,0,1):(Re(e,Pe(l[0]),Pe(l[1]),Pe(l[2]),u),Ge(t,e),e);case"hsla":return 4!==l.length?void Re(e,0,0,0,1):(l[3]=Ne(l[3]),We(l,e),Ge(t,e),e);case"hsl":return 3!==l.length?void Re(e,0,0,0,1):(We(l,e),Ge(t,e),e);default:return}}Re(e,0,0,0,1)}}function We(t,e){var i=(parseFloat(t[0])%360+360)%360/360,n=Ne(t[1]),o=Ne(t[2]),a=o<=.5?o*(n+1):o+n-o*n,r=2*o-a;return Re(e=e||[],Le(255*Oe(r,a,i+1/3)),Le(255*Oe(r,a,i)),Le(255*Oe(r,a,i-1/3)),1),4===t.length&&(e[3]=t[3]),e}function He(t,e){var i=Fe(t);if(i){for(var n=0;n<3;n++)i[n]=e<0?i[n]*(1-e)|0:(255-i[n])*e+i[n]|0,255<i[n]?i[n]=255:t[n]<0&&(i[n]=0);return $e(i,4===i.length?"rgba":"rgb")}}function Ze(t){var e=Fe(t);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1)}function Ue(t,e,i){if(e&&e.length&&0<=t&&t<=1){i=i||[];var n=t*(e.length-1),o=Math.floor(n),a=Math.ceil(n),r=e[o],s=e[a],l=n-o;return i[0]=Le(Ee(r[0],s[0],l)),i[1]=Le(Ee(r[1],s[1],l)),i[2]=Le(Ee(r[2],s[2],l)),i[3]=ke(Ee(r[3],s[3],l)),i}}var Xe=Ue;function Ye(t,e,i){if(e&&e.length&&0<=t&&t<=1){var n=t*(e.length-1),o=Math.floor(n),a=Math.ceil(n),r=Fe(e[o]),s=Fe(e[a]),l=n-o,u=$e([Le(Ee(r[0],s[0],l)),Le(Ee(r[1],s[1],l)),Le(Ee(r[2],s[2],l)),ke(Ee(r[3],s[3],l))],"rgba");return i?{color:u,leftIndex:o,rightIndex:a,value:n}:u}}var je=Ye;function qe(t,e,i,n){if(t=Fe(t))return t=function(t){if(t){var e,i,n=t[0]/255,o=t[1]/255,a=t[2]/255,r=Math.min(n,o,a),s=Math.max(n,o,a),l=s-r,u=(s+r)/2;if(0==l)i=e=0;else{i=u<.5?l/(s+r):l/(2-s-r);var h=((s-n)/6+l/2)/l,c=((s-o)/6+l/2)/l,d=((s-a)/6+l/2)/l;n===s?e=d-c:o===s?e=1/3+h-d:a===s&&(e=2/3+c-h),e<0&&(e+=1),1<e&&(e-=1)}var f=[360*e,i,u];return null!=t[3]&&f.push(t[3]),f}}(t),null!=e&&(t[0]=function(t){return(t=Math.round(t))<0?0:360<t?360:t}(e)),null!=i&&(t[1]=Ne(i)),null!=n&&(t[2]=Ne(n)),$e(We(t),"rgba")}function Ke(t,e){if((t=Fe(t))&&null!=e)return t[3]=ke(e),$e(t,"rgba")}function $e(t,e){if(t&&t.length){var i=t[0]+","+t[1]+","+t[2];return"rgba"!==e&&"hsva"!==e&&"hsla"!==e||(i+=","+t[3]),e+"("+i+")"}}var Je=(Object.freeze||Object)({parse:Fe,lift:He,toHex:Ze,fastLerp:Ue,fastMapToColor:Xe,lerp:Ye,mapToColor:je,modifyHSL:qe,modifyAlpha:Ke,stringify:$e}),Qe=Array.prototype.slice;function ti(t,e){return t[e]}function ei(t,e,i){t[e]=i}function ii(t,e,i){return(e-t)*i+t}function ni(t,e,i){return.5<i?e:t}function oi(t,e,i,n,o){var a=t.length;if(1===o)for(var r=0;r<a;r++)n[r]=ii(t[r],e[r],i);else{var s=a&&t[0].length;for(r=0;r<a;r++)for(var l=0;l<s;l++)n[r][l]=ii(t[r][l],e[r][l],i)}}function ai(t,e,i){var n=t.length,o=e.length;if(n!==o)if(o<n)t.length=o;else for(var a=n;a<o;a++)t.push(1===i?e[a]:Qe.call(e[a]));var r=t[0]&&t[0].length;for(a=0;a<t.length;a++)if(1===i)isNaN(t[a])&&(t[a]=e[a]);else for(var s=0;s<r;s++)isNaN(t[a][s])&&(t[a][s]=e[a][s])}function ri(t,e,i){if(t===e)return!0;var n=t.length;if(n!==e.length)return!1;if(1===i){for(var o=0;o<n;o++)if(t[o]!==e[o])return!1}else{var a=t[0].length;for(o=0;o<n;o++)for(var r=0;r<a;r++)if(t[o][r]!==e[o][r])return!1}return!0}function si(t,e,i,n,o,a,r,s,l){var u=t.length;if(1===l)for(var h=0;h<u;h++)s[h]=li(t[h],e[h],i[h],n[h],o,a,r);else{var c=t[0].length;for(h=0;h<u;h++)for(var d=0;d<c;d++)s[h][d]=li(t[h][d],e[h][d],i[h][d],n[h][d],o,a,r)}}function li(t,e,i,n,o,a,r){var s=.5*(i-t),l=.5*(n-e);return(2*(e-i)+s+l)*r+(-3*(e-i)-2*s-l)*a+s*o+e}function ui(t){if(N(t)){var e=t.length;if(N(t[0])){for(var i=[],n=0;n<e;n++)i.push(Qe.call(t[n]));return i}return Qe.call(t)}return t}function hi(t){return t[0]=Math.floor(t[0]),t[1]=Math.floor(t[1]),t[2]=Math.floor(t[2]),"rgba("+t.join(",")+")"}function ci(t,e,i,n,a,o){var r=t._getter,s=t._setter,l="spline"===e,u=n.length;if(u){var h,c=N(n[0].value),d=!1,f=!1,p=c?function(t){var e=t[t.length-1].value;return N(e&&e[0])?2:1}(n):0;n.sort(function(t,e){return t.time-e.time}),h=n[u-1].time;for(var g=[],m=[],v=n[0].value,y=!0,x=0;x<u;x++){g.push(n[x].time/h);var _=n[x].value;if(c&&ri(_,v,p)||!c&&_===v||(y=!1),"string"==typeof(v=_)){var w=Fe(_);w?(_=w,d=!0):f=!0}m.push(_)}if(o||!y){var b=m[u-1];for(x=0;x<u-1;x++)c?ai(m[x],b,p):!isNaN(m[x])||isNaN(b)||f||d||(m[x]=b);c&&ai(r(t._target,a),b,p);var S,M,I,T,A,D=0,C=0;if(d)var L=[0,0,0,0];var k=new Se({target:t._target,life:h,loop:t._loop,delay:t._delay,onframe:function(t,e){var i;if(e<0)i=0;else if(e<C){for(i=Math.min(D+1,u-1);0<=i&&!(g[i]<=e);i--);i=Math.min(i,u-2)}else{for(i=D;i<u&&!(g[i]>e);i++);i=Math.min(i-1,u-2)}C=e;var n=g[(D=i)+1]-g[i];if(0!=n)if(S=(e-g[i])/n,l)if(I=m[i],M=m[0===i?i:i-1],T=m[u-2<i?u-1:i+1],A=m[u-3<i?u-1:i+2],c)si(M,I,T,A,S,S*S,S*S*S,r(t,a),p);else{if(d)o=si(M,I,T,A,S,S*S,S*S*S,L,1),o=hi(L);else{if(f)return ni(I,T,S);o=li(M,I,T,A,S,S*S,S*S*S)}s(t,a,o)}else if(c)oi(m[i],m[i+1],S,r(t,a),p);else{var o;if(d)oi(m[i],m[i+1],S,L,1),o=hi(L);else{if(f)return ni(m[i],m[i+1],S);o=ii(m[i],m[i+1],S)}s(t,a,o)}},ondestroy:i});return e&&"spline"!==e&&(k.easing=e),k}}}function di(t,e,i,n){this._tracks={},this._target=t,this._loop=e||!1,this._getter=i||ti,this._setter=n||ei,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]}di.prototype={when:function(t,e){var i=this._tracks;for(var n in e)if(e.hasOwnProperty(n)){if(!i[n]){i[n]=[];var o=this._getter(this._target,n);if(null==o)continue;0!==t&&i[n].push({time:0,value:ui(o)})}i[n].push({time:t,value:e[n]})}return this},during:function(t){return this._onframeList.push(t),this},pause:function(){for(var t=0;t<this._clipList.length;t++)this._clipList[t].pause();this._paused=!0},resume:function(){for(var t=0;t<this._clipList.length;t++)this._clipList[t].resume();this._paused=!1},isPaused:function(){return!!this._paused},_doneCallback:function(){this._tracks={},this._clipList.length=0;for(var t=this._doneList,e=t.length,i=0;i<e;i++)t[i].call(this)},start:function(t,e){function i(){--a||o._doneCallback()}var n,o=this,a=0;for(var r in this._tracks)if(this._tracks.hasOwnProperty(r)){var s=ci(this,t,i,this._tracks[r],r,e);s&&(this._clipList.push(s),a++,this.animation&&this.animation.addClip(s),n=s)}if(n){var l=n.onframe;n.onframe=function(t,e){l(t,e);for(var i=0;i<o._onframeList.length;i++)o._onframeList[i](t,e)}}return a||this._doneCallback(),this},stop:function(t){for(var e=this._clipList,i=this.animation,n=0;n<e.length;n++){var o=e[n];t&&o.onframe(this._target,1),i&&i.removeClip(o)}e.length=0},delay:function(t){return this._delay=t,this},done:function(t){return t&&this._doneList.push(t),this},getClips:function(){return this._clipList}};var fi=1;"undefined"!=typeof window&&(fi=Math.max(window.devicePixelRatio||1,1));var pi=fi,gi=function(){};function mi(){this.animators=[]}var vi=gi;function yi(t,e,i,n,o,a,r,s){R(n)?(a=o,o=n,n=0):C(o)?(a=o,o="linear",n=0):C(n)?(a=n,n=0):i=C(i)?(a=i,500):i||500,t.stopAnimation(),function t(e,i,n,o,a,r,s){var l={};var u=0;for(var h in o)o.hasOwnProperty(h)&&(null!=n[h]?z(o[h])&&!N(o[h])?t(e,i?i+"."+h:h,n[h],o[h],a,r,s):(s?(l[h]=n[h],xi(e,i,h,o[h])):l[h]=o[h],u++):null==o[h]||s||xi(e,i,h,o[h]));0<u&&e.animate(i,!1).when(null==a?500:a,l).delay(r||0)}(t,"",t,e,i,n,s);var l=t.animators.slice(),u=l.length;function h(){--u||a&&a()}u||a&&a();for(var c=0;c<l.length;c++)l[c].done(h).start(o,r)}function xi(t,e,i,n){if(e){var o={};o[e]={},o[e][i]=n,t.attr(o)}else t.attr(i,n)}mi.prototype={constructor:mi,animate:function(t,e){var i,n=!1,o=this,a=this.__zr;if(t){var r=t.split("."),s=o;n="shape"===r[0];for(var l=0,u=r.length;l<u;l++)s=s&&s[r[l]];s&&(i=s)}else i=o;if(i){var h=o.animators,c=new di(i,e);return c.during(function(t){o.dirty(n)}).done(function(){h.splice(_(h,c),1)}),h.push(c),a&&a.animation.addAnimator(c),c}vi('Property "'+t+'" is not existed in element '+o.id)},stopAnimation:function(t){for(var e=this.animators,i=e.length,n=0;n<i;n++)e[n].stop(t);return e.length=0,this},animateTo:function(t,e,i,n,o,a){yi(this,t,e,i,n,o,a)},animateFrom:function(t,e,i,n,o,a){yi(this,t,e,i,n,o,a,!0)}};var _i=function(t){ve.call(this,t),Ct.call(this,t),mi.call(this,t),this.id=t.id||n()};_i.prototype={type:"element",name:"",__zr:null,ignore:!1,clipPath:null,isGroup:!1,drift:function(t,e){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0}var i=this.transform;(i=i||(this.transform=[1,0,0,1,0,0]))[4]+=t,i[5]+=e,this.decomposeTransform(),this.dirty(!1)},beforeUpdate:function(){},afterUpdate:function(){},update:function(){this.updateTransform()},traverse:function(t,e){},attrKV:function(t,e){if("position"===t||"scale"===t||"origin"===t){if(e){var i=this[t];(i=i||(this[t]=[]))[0]=e[0],i[1]=e[1]}}else this[t]=e},hide:function(){this.ignore=!0,this.__zr&&this.__zr.refresh()},show:function(){this.ignore=!1,this.__zr&&this.__zr.refresh()},attr:function(t,e){if("string"==typeof t)this.attrKV(t,e);else if(z(t))for(var i in t)t.hasOwnProperty(i)&&this.attrKV(i,t[i]);return this.dirty(!1),this},setClipPath:function(t){var e=this.__zr;e&&t.addSelfToZr(e),this.clipPath&&this.clipPath!==t&&this.removeClipPath(),(this.clipPath=t).__zr=e,(t.__clipTarget=this).dirty(!1)},removeClipPath:function(){var t=this.clipPath;t&&(t.__zr&&t.removeSelfFromZr(t.__zr),t.__zr=null,t.__clipTarget=null,this.clipPath=null,this.dirty(!1))},addSelfToZr:function(t){this.__zr=t;var e=this.animators;if(e)for(var i=0;i<e.length;i++)t.animation.addAnimator(e[i]);this.clipPath&&this.clipPath.addSelfToZr(t)},removeSelfFromZr:function(t){this.__zr=null;var e=this.animators;if(e)for(var i=0;i<e.length;i++)t.animation.removeAnimator(e[i]);this.clipPath&&this.clipPath.removeSelfFromZr(t)}},b(_i,mi),b(_i,ve),b(_i,Ct);var wi,bi,Si,Mi,Ii=bt,Ti=Math.min,Ai=Math.max;function Di(t,e,i,n){i<0&&(t+=i,i=-i),n<0&&(e+=n,n=-n),this.x=t,this.y=e,this.width=i,this.height=n}Di.prototype={constructor:Di,union:function(t){var e=Ti(t.x,this.x),i=Ti(t.y,this.y);this.width=Ai(t.x+t.width,this.x+this.width)-e,this.height=Ai(t.y+t.height,this.y+this.height)-i,this.x=e,this.y=i},applyTransform:(wi=[],bi=[],Si=[],Mi=[],function(t){if(t){wi[0]=Si[0]=this.x,wi[1]=Mi[1]=this.y,bi[0]=Mi[0]=this.x+this.width,bi[1]=Si[1]=this.y+this.height,Ii(wi,wi,t),Ii(bi,bi,t),Ii(Si,Si,t),Ii(Mi,Mi,t),this.x=Ti(wi[0],bi[0],Si[0],Mi[0]),this.y=Ti(wi[1],bi[1],Si[1],Mi[1]);var e=Ai(wi[0],bi[0],Si[0],Mi[0]),i=Ai(wi[1],bi[1],Si[1],Mi[1]);this.width=e-this.x,this.height=i-this.y}}),calculateTransform:function(t){var e=t.width/this.width,i=t.height/this.height,n=ae();return ue(n,n,[-this.x,-this.y]),ce(n,n,[e,i]),ue(n,n,[t.x,t.y]),n},intersect:function(t){if(!t)return!1;t instanceof Di||(t=Di.create(t));var e=this,i=e.x,n=e.x+e.width,o=e.y,a=e.y+e.height,r=t.x,s=t.x+t.width,l=t.y,u=t.y+t.height;return!(n<r||s<i||a<l||u<o)},contain:function(t,e){var i=this;return t>=i.x&&t<=i.x+i.width&&e>=i.y&&e<=i.y+i.height},clone:function(){return new Di(this.x,this.y,this.width,this.height)},copy:function(t){this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height},plain:function(){return{x:this.x,y:this.y,width:this.width,height:this.height}}},Di.create=function(t){return new Di(t.x,t.y,t.width,t.height)};var Ci=function(t){for(var e in t=t||{},_i.call(this,t),t)t.hasOwnProperty(e)&&(this[e]=t[e]);this._children=[],this.__storage=null,this.__dirty=!0};Ci.prototype={constructor:Ci,isGroup:!0,type:"group",silent:!1,children:function(){return this._children.slice()},childAt:function(t){return this._children[t]},childOfName:function(t){for(var e=this._children,i=0;i<e.length;i++)if(e[i].name===t)return e[i]},childCount:function(){return this._children.length},add:function(t){return t&&t!==this&&t.parent!==this&&(this._children.push(t),this._doAdd(t)),this},addBefore:function(t,e){if(t&&t!==this&&t.parent!==this&&e&&e.parent===this){var i=this._children,n=i.indexOf(e);0<=n&&(i.splice(n,0,t),this._doAdd(t))}return this},_doAdd:function(t){t.parent&&t.parent.remove(t);var e=(t.parent=this).__storage,i=this.__zr;e&&e!==t.__storage&&(e.addToStorage(t),t instanceof Ci&&t.addChildrenToStorage(e)),i&&i.refresh()},remove:function(t){var e=this.__zr,i=this.__storage,n=this._children,o=_(n,t);return o<0||(n.splice(o,1),t.parent=null,i&&(i.delFromStorage(t),t instanceof Ci&&t.delChildrenFromStorage(i)),e&&e.refresh()),this},removeAll:function(){var t,e,i=this._children,n=this.__storage;for(e=0;e<i.length;e++)t=i[e],n&&(n.delFromStorage(t),t instanceof Ci&&t.delChildrenFromStorage(n)),t.parent=null;return i.length=0,this},eachChild:function(t,e){for(var i=this._children,n=0;n<i.length;n++){var o=i[n];t.call(e,o,n)}return this},traverse:function(t,e){for(var i=0;i<this._children.length;i++){var n=this._children[i];t.call(e,n),"group"===n.type&&n.traverse(t,e)}return this},addChildrenToStorage:function(t){for(var e=0;e<this._children.length;e++){var i=this._children[e];t.addToStorage(i),i instanceof Ci&&i.addChildrenToStorage(t)}},delChildrenFromStorage:function(t){for(var e=0;e<this._children.length;e++){var i=this._children[e];t.delFromStorage(i),i instanceof Ci&&i.delChildrenFromStorage(t)}},dirty:function(){return this.__dirty=!0,this.__zr&&this.__zr.refresh(),this},getBoundingRect:function(t){for(var e=null,i=new Di(0,0,0,0),n=t||this._children,o=[],a=0;a<n.length;a++){var r=n[a];if(!r.ignore&&!r.invisible){var s=r.getBoundingRect(),l=r.getLocalTransform(o);l?(i.copy(s),i.applyTransform(l),(e=e||i.clone()).union(i)):(e=e||s.clone()).union(s)}}return e||i}},w(Ci,_i);var Li=32,ki=7;function Pi(t,e,i,n){var o=e+1;if(o===i)return 1;if(n(t[o++],t[e])<0){for(;o<i&&n(t[o],t[o-1])<0;)o++;!function(t,e,i){i--;for(;e<i;){var n=t[e];t[e++]=t[i],t[i--]=n}}(t,e,o)}else for(;o<i&&0<=n(t[o],t[o-1]);)o++;return o-e}function Ni(t,e,i,n,o){for(n===e&&n++;n<i;n++){for(var a,r=t[n],s=e,l=n;s<l;)o(r,t[a=s+l>>>1])<0?l=a:s=1+a;var u=n-s;switch(u){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;0<u;)t[s+u]=t[s+u-1],u--}t[s]=r}}function Oi(t,e,i,n,o,a){var r=0,s=0,l=1;if(0<a(t,e[i+o])){for(s=n-o;l<s&&0<a(t,e[i+o+l]);)(l=1+((r=l)<<1))<=0&&(l=s);s<l&&(l=s),r+=o,l+=o}else{for(s=o+1;l<s&&a(t,e[i+o-l])<=0;)(l=1+((r=l)<<1))<=0&&(l=s);s<l&&(l=s);var u=r;r=o-l,l=o-u}for(r++;r<l;){var h=r+(l-r>>>1);0<a(t,e[i+h])?r=h+1:l=h}return l}function Ei(t,e,i,n,o,a){var r=0,s=0,l=1;if(a(t,e[i+o])<0){for(s=o+1;l<s&&a(t,e[i+o-l])<0;)(l=1+((r=l)<<1))<=0&&(l=s);s<l&&(l=s);var u=r;r=o-l,l=o-u}else{for(s=n-o;l<s&&0<=a(t,e[i+o+l]);)(l=1+((r=l)<<1))<=0&&(l=s);s<l&&(l=s),r+=o,l+=o}for(r++;r<l;){var h=r+(l-r>>>1);a(t,e[i+h])<0?l=h:r=h+1}return l}function Ri(p,g){var r,s,m=ki,l=0,v=[];function e(t){var e=r[t],i=s[t],n=r[t+1],o=s[t+1];s[t]=i+o,t===l-3&&(r[t+1]=r[t+2],s[t+1]=s[t+2]),l--;var a=Ei(p[n],p,e,i,0,g);e+=a,0!==(i-=a)&&0!==(o=Oi(p[e+i-1],p,n,o,o-1,g))&&(i<=o?function(t,e,i,n){var o=0;for(o=0;o<e;o++)v[o]=p[t+o];var a=0,r=i,s=t;if(p[s++]=p[r++],0==--n){for(o=0;o<e;o++)p[s+o]=v[a+o];return}if(1===e){for(o=0;o<n;o++)p[s+o]=p[r+o];return p[s+n]=v[a]}var l,u,h,c=m;for(;;){u=l=0,h=!1;do{if(g(p[r],v[a])<0){if(p[s++]=p[r++],u++,(l=0)==--n){h=!0;break}}else if(p[s++]=v[a++],l++,u=0,1==--e){h=!0;break}}while((l|u)<c);if(h)break;do{if(0!==(l=Ei(p[r],v,a,e,0,g))){for(o=0;o<l;o++)p[s+o]=v[a+o];if(s+=l,a+=l,(e-=l)<=1){h=!0;break}}if(p[s++]=p[r++],0==--n){h=!0;break}if(0!==(u=Oi(v[a],p,r,n,0,g))){for(o=0;o<u;o++)p[s+o]=p[r+o];if(s+=u,r+=u,0===(n-=u)){h=!0;break}}if(p[s++]=v[a++],1==--e){h=!0;break}c--}while(ki<=l||ki<=u);if(h)break;c<0&&(c=0),c+=2}if((m=c)<1&&(m=1),1===e){for(o=0;o<n;o++)p[s+o]=p[r+o];p[s+n]=v[a]}else{if(0===e)throw new Error;for(o=0;o<e;o++)p[s+o]=v[a+o]}}(e,i,n,o):function(t,e,i,n){var o=0;for(o=0;o<n;o++)v[o]=p[i+o];var a=t+e-1,r=n-1,s=i+n-1,l=0,u=0;if(p[s--]=p[a--],0==--e){for(l=s-(n-1),o=0;o<n;o++)p[l+o]=v[o];return}if(1===n){for(u=(s-=e)+1,l=(a-=e)+1,o=e-1;0<=o;o--)p[u+o]=p[l+o];return p[s]=v[r]}var h=m;for(;;){var c=0,d=0,f=!1;do{if(g(v[r],p[a])<0){if(p[s--]=p[a--],c++,(d=0)==--e){f=!0;break}}else if(p[s--]=v[r--],d++,c=0,1==--n){f=!0;break}}while((c|d)<h);if(f)break;do{if(0!==(c=e-Ei(v[r],p,t,e,e-1,g))){for(e-=c,u=(s-=c)+1,l=(a-=c)+1,o=c-1;0<=o;o--)p[u+o]=p[l+o];if(0===e){f=!0;break}}if(p[s--]=v[r--],1==--n){f=!0;break}if(0!==(d=n-Oi(p[a],v,0,n,n-1,g))){for(n-=d,u=(s-=d)+1,l=(r-=d)+1,o=0;o<d;o++)p[u+o]=v[l+o];if(n<=1){f=!0;break}}if(p[s--]=p[a--],0==--e){f=!0;break}h--}while(ki<=c||ki<=d);if(f)break;h<0&&(h=0),h+=2}(m=h)<1&&(m=1);if(1===n){for(u=(s-=e)+1,l=(a-=e)+1,o=e-1;0<=o;o--)p[u+o]=p[l+o];p[s]=v[r]}else{if(0===n)throw new Error;for(l=s-(n-1),o=0;o<n;o++)p[l+o]=v[o]}}(e,i,n,o))}r=[],s=[],this.mergeRuns=function(){for(;1<l;){var t=l-2;if(1<=t&&s[t-1]<=s[t]+s[t+1]||2<=t&&s[t-2]<=s[t]+s[t-1])s[t-1]<s[t+1]&&t--;else if(s[t]>s[t+1])break;e(t)}},this.forceMergeRuns=function(){for(;1<l;){var t=l-2;0<t&&s[t-1]<s[t+1]&&t--,e(t)}},this.pushRun=function(t,e){r[l]=t,s[l]=e,l+=1}}function zi(t,e,i,n){i=i||0;var o=(n=n||t.length)-i;if(!(o<2)){var a=0;if(o<Li)Ni(t,i,n,i+(a=Pi(t,i,n,e)),e);else{var r=new Ri(t,e),s=function(t){for(var e=0;Li<=t;)e|=1&t,t>>=1;return t+e}(o);do{if((a=Pi(t,i,n,e))<s){var l=o;s<l&&(l=s),Ni(t,i,i+l,i+a,e),a=l}r.pushRun(i,a),r.mergeRuns(),o-=a,i+=a}while(0!==o);r.forceMergeRuns()}}}function Bi(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}function Vi(){this._roots=[],this._displayList=[],this._displayListLen=0}Vi.prototype={constructor:Vi,traverse:function(t,e){for(var i=0;i<this._roots.length;i++)this._roots[i].traverse(t,e)},getDisplayList:function(t,e){return e=e||!1,t&&this.updateDisplayList(e),this._displayList},updateDisplayList:function(t){this._displayListLen=0;for(var e=this._roots,i=this._displayList,n=0,o=e.length;n<o;n++)this._updateAndAddDisplayable(e[n],null,t);i.length=this._displayListLen,v.canvasSupported&&zi(i,Bi)},_updateAndAddDisplayable:function(t,e,i){if(!t.ignore||i){t.beforeUpdate(),t.__dirty&&t.update(),t.afterUpdate();var n=t.clipPath;if(n){e=e?e.slice():[];for(var o=n,a=t;o;)o.parent=a,o.updateTransform(),e.push(o),o=(a=o).clipPath}if(t.isGroup){for(var r=t._children,s=0;s<r.length;s++){var l=r[s];t.__dirty&&(l.__dirty=!0),this._updateAndAddDisplayable(l,e,i)}t.__dirty=!1}else t.__clipPaths=e,this._displayList[this._displayListLen++]=t}},addRoot:function(t){t.__storage!==this&&(t instanceof Ci&&t.addChildrenToStorage(this),this.addToStorage(t),this._roots.push(t))},delRoot:function(t){if(null==t){for(var e=0;e<this._roots.length;e++){var i=this._roots[e];i instanceof Ci&&i.delChildrenFromStorage(this)}return this._roots=[],this._displayList=[],void(this._displayListLen=0)}if(t instanceof Array){e=0;for(var n=t.length;e<n;e++)this.delRoot(t[e])}else{var o=_(this._roots,t);0<=o&&(this.delFromStorage(t),this._roots.splice(o,1),t instanceof Ci&&t.delChildrenFromStorage(this))}},addToStorage:function(t){return t&&(t.__storage=this,t.dirty(!1)),this},delFromStorage:function(t){return t&&(t.__storage=null),this},dispose:function(){this._renderList=this._roots=null},displayableSortFunc:Bi};var Gi={shadowBlur:1,shadowOffsetX:1,shadowOffsetY:1,textShadowBlur:1,textShadowOffsetX:1,textShadowOffsetY:1,textBoxShadowBlur:1,textBoxShadowOffsetX:1,textBoxShadowOffsetY:1},Fi=function(t,e,i){return Gi.hasOwnProperty(e)?i*t.dpr:i},Wi={NONE:0,STYLE_BIND:1,PLAIN_TEXT:2},Hi=9,Zi=[["shadowBlur",0],["shadowOffsetX",0],["shadowOffsetY",0],["shadowColor","#000"],["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]],Ui=function(t){this.extendFrom(t,!1)};function Xi(t,e,i){var n=null==e.x?0:e.x,o=null==e.x2?1:e.x2,a=null==e.y?0:e.y,r=null==e.y2?0:e.y2;return e.global||(n=n*i.width+i.x,o=o*i.width+i.x,a=a*i.height+i.y,r=r*i.height+i.y),n=isNaN(n)?0:n,o=isNaN(o)?1:o,a=isNaN(a)?0:a,r=isNaN(r)?0:r,t.createLinearGradient(n,a,o,r)}function Yi(t,e,i){var n=i.width,o=i.height,a=Math.min(n,o),r=null==e.x?.5:e.x,s=null==e.y?.5:e.y,l=null==e.r?.5:e.r;return e.global||(r=r*n+i.x,s=s*o+i.y,l*=a),t.createRadialGradient(r,s,0,r,s,l)}Ui.prototype={constructor:Ui,fill:"#000",stroke:null,opacity:1,fillOpacity:null,strokeOpacity:null,lineDash:null,lineDashOffset:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,lineWidth:1,strokeNoScale:!1,text:null,font:null,textFont:null,fontStyle:null,fontWeight:null,fontSize:null,fontFamily:null,textTag:null,textFill:"#000",textStroke:null,textWidth:null,textHeight:null,textStrokeWidth:0,textLineHeight:null,textPosition:"inside",textRect:null,textOffset:null,textAlign:null,textVerticalAlign:null,textDistance:5,textShadowColor:"transparent",textShadowBlur:0,textShadowOffsetX:0,textShadowOffsetY:0,textBoxShadowColor:"transparent",textBoxShadowBlur:0,textBoxShadowOffsetX:0,textBoxShadowOffsetY:0,transformText:!1,textRotation:0,textOrigin:null,textBackgroundColor:null,textBorderColor:null,textBorderWidth:0,textBorderRadius:0,textPadding:null,rich:null,truncate:null,blend:null,bind:function(t,e,i){var n=this,o=i&&i.style,a=!o||t.__attrCachedBy!==Wi.STYLE_BIND;t.__attrCachedBy=Wi.STYLE_BIND;for(var r=0;r<Zi.length;r++){var s=Zi[r],l=s[0];!a&&n[l]===o[l]||(t[l]=Fi(t,l,n[l]||s[1]))}if(!a&&n.fill===o.fill||(t.fillStyle=n.fill),!a&&n.stroke===o.stroke||(t.strokeStyle=n.stroke),!a&&n.opacity===o.opacity||(t.globalAlpha=null==n.opacity?1:n.opacity),!a&&n.blend===o.blend||(t.globalCompositeOperation=n.blend||"source-over"),this.hasStroke()){var u=n.lineWidth;t.lineWidth=u/(this.strokeNoScale&&e&&e.getLineScale?e.getLineScale():1)}},hasFill:function(){var t=this.fill;return null!=t&&"none"!==t},hasStroke:function(){var t=this.stroke;return null!=t&&"none"!==t&&0<this.lineWidth},extendFrom:function(t,e){if(t)for(var i in t)!t.hasOwnProperty(i)||!0!==e&&(!1===e?this.hasOwnProperty(i):null==t[i])||(this[i]=t[i])},set:function(t,e){"string"==typeof t?this[t]=e:this.extendFrom(t,!0)},clone:function(){var t=new this.constructor;return t.extendFrom(this,!0),t},getGradient:function(t,e,i){for(var n=("radial"===e.type?Yi:Xi)(t,e,i),o=e.colorStops,a=0;a<o.length;a++)n.addColorStop(o[a].offset,o[a].color);return n}};for(var ji=Ui.prototype,qi=0;qi<Zi.length;qi++){var Ki=Zi[qi];Ki[0]in ji||(ji[Ki[0]]=Ki[1])}Ui.getGradient=ji.getGradient;function $i(t,e){this.image=t,this.repeat=e,this.type="pattern"}function Ji(){return!1}function Qi(t,e,i){var n=y(),o=e.getWidth(),a=e.getHeight(),r=n.style;return r&&(r.position="absolute",r.left=0,r.top=0,r.width=o+"px",r.height=a+"px",n.setAttribute("data-zr-dom-id",t)),n.width=o*i,n.height=a*i,n}function tn(t,e,i){var n;i=i||pi,"string"==typeof t?n=Qi(t,e,i):z(t)&&(t=(n=t).id),this.id=t;var o=(this.dom=n).style;o&&(n.onselectstart=Ji,o["-webkit-user-select"]="none",o["user-select"]="none",o["-webkit-touch-callout"]="none",o["-webkit-tap-highlight-color"]="rgba(0,0,0,0)",o.padding=0,o.margin=0,o["border-width"]=0),this.domBack=null,this.ctxBack=null,this.painter=e,this.config=null,this.clearColor=0,this.motionBlur=!1,this.lastFrameAlpha=.7,this.dpr=i}tn.prototype={constructor:tn,__dirty:!0,__used:!($i.prototype.getCanvasPattern=function(t){return t.createPattern(this.image,this.repeat||"repeat")}),__drawIndex:0,__startIndex:0,__endIndex:0,incremental:!1,getElementCount:function(){return this.__endIndex-this.__startIndex},initContext:function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},createBackBuffer:function(){var t=this.dpr;this.domBack=Qi("back-"+this.id,this.painter,t),this.ctxBack=this.domBack.getContext("2d"),1!==t&&this.ctxBack.scale(t,t)},resize:function(t,e){var i=this.dpr,n=this.dom,o=n.style,a=this.domBack;o&&(o.width=t+"px",o.height=e+"px"),n.width=t*i,n.height=e*i,a&&(a.width=t*i,a.height=e*i,1!==i&&this.ctxBack.scale(i,i))},clear:function(t,e){var i,n=this.dom,o=this.ctx,a=n.width,r=n.height,s=(e=e||this.clearColor,this.motionBlur&&!t),l=this.lastFrameAlpha,u=this.dpr;s&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(n,0,0,a/u,r/u)),o.clearRect(0,0,a,r),e&&"transparent"!==e&&(e.colorStops?(i=e.__canvasGradient||Ui.getGradient(o,e,{x:0,y:0,width:a,height:r}),e.__canvasGradient=i):e.image&&(i=$i.prototype.getCanvasPattern.call(e,o)),o.save(),o.fillStyle=i||e,o.fillRect(0,0,a,r),o.restore());if(s){var h=this.domBack;o.save(),o.globalAlpha=l,o.drawImage(h,0,0,a,r),o.restore()}}};var en="undefined"!=typeof window&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){setTimeout(t,16)},nn=new Te(50);function on(t){if("string"!=typeof t)return t;var e=nn.get(t);return e&&e.image}function an(t,e,i,n,o){if(t){if("string"!=typeof t)return t;if(e&&e.__zrImageSrc===t||!i)return e;var a=nn.get(t),r={hostEl:i,cb:n,cbPayload:o};return a?sn(e=a.image)||a.pending.push(r):((e=new Image).onload=e.onerror=rn,nn.put(t,e.__cachedImgObj={image:e,pending:[r]}),e.src=e.__zrImageSrc=t),e}return e}function rn(){var t=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e<t.pending.length;e++){var i=t.pending[e],n=i.cb;n&&n(this,i.cbPayload),i.hostEl.dirty()}t.pending.length=0}function sn(t){return t&&t.width&&t.height}var ln={},un=0,hn=5e3,cn=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g,dn="12px sans-serif",fn={};function pn(t,e){var i=t+":"+(e=e||dn);if(ln[i])return ln[i];for(var n,o,a=(t+"").split("\n"),r=0,s=0,l=a.length;s<l;s++)r=Math.max((n=a[s],o=e,fn.measureText(n,o)).width,r);return hn<un&&(un=0,ln={}),un++,ln[i]=r}function gn(t,e,i,n,o,a,r,s){return r?function(t,e,i,n,o,a,r,s){var l=In(t,{rich:r,truncate:s,font:e,textAlign:i,textPadding:o,textLineHeight:a}),u=l.outerWidth,h=l.outerHeight,c=mn(0,u,i),d=vn(0,h,n);return new Di(c,d,u,h)}(t,e,i,n,o,a,r,s):function(t,e,i,n,o,a,r){var s=Mn(t,e,o,a,r),l=pn(t,e);o&&(l+=o[1]+o[3]);var u=s.outerHeight,h=mn(0,l,i),c=vn(0,u,n),d=new Di(h,c,l,u);return d.lineHeight=s.lineHeight,d}(t,e,i,n,o,a,s)}function mn(t,e,i){return"right"===i?t-=e:"center"===i&&(t-=e/2),t}function vn(t,e,i){return"middle"===i?t-=e/2:"bottom"===i&&(t-=e),t}function yn(t,e,i){var n=e.textPosition,o=e.textDistance,a=i.x,r=i.y;o=o||0;var s=i.height,l=i.width,u=s/2,h="left",c="top";switch(n){case"left":a-=o,r+=u,h="right",c="middle";break;case"right":a+=o+l,r+=u,c="middle";break;case"top":a+=l/2,r-=o,h="center",c="bottom";break;case"bottom":a+=l/2,r+=s+o,h="center";break;case"inside":a+=l/2,r+=u,h="center",c="middle";break;case"insideLeft":a+=o,r+=u,c="middle";break;case"insideRight":a+=l-o,r+=u,h="right",c="middle";break;case"insideTop":a+=l/2,r+=o,h="center";break;case"insideBottom":a+=l/2,r+=s-o,h="center",c="bottom";break;case"insideTopLeft":a+=o,r+=o;break;case"insideTopRight":a+=l-o,r+=o,h="right";break;case"insideBottomLeft":a+=o,r+=s-o,c="bottom";break;case"insideBottomRight":a+=l-o,r+=s-o,h="right",c="bottom"}return(t=t||{}).x=a,t.y=r,t.textAlign=h,t.textVerticalAlign=c,t}function xn(t,e,i,n,o){if(!e)return"";var a=(t+"").split("\n");o=_n(e,i,n,o);for(var r=0,s=a.length;r<s;r++)a[r]=wn(a[r],o);return a.join("\n")}function _n(t,e,i,n){(n=P({},n)).font=e;i=H(i,"...");n.maxIterations=H(n.maxIterations,2);var o=n.minChar=H(n.minChar,0);n.cnCharWidth=pn("国",e);var a=n.ascCharWidth=pn("a",e);n.placeholder=H(n.placeholder,"");for(var r=t=Math.max(0,t-1),s=0;s<o&&a<=r;s++)r-=a;var l=pn(i,e);return r<l&&(i="",l=0),r=t-l,n.ellipsis=i,n.ellipsisWidth=l,n.contentWidth=r,n.containerWidth=t,n}function wn(t,e){var i=e.containerWidth,n=e.font,o=e.contentWidth;if(!i)return"";var a=pn(t,n);if(a<=i)return t;for(var r=0;;r++){if(a<=o||r>=e.maxIterations){t+=e.ellipsis;break}var s=0===r?bn(t,o,e.ascCharWidth,e.cnCharWidth):0<a?Math.floor(t.length*o/a):0;a=pn(t=t.substr(0,s),n)}return""===t&&(t=e.placeholder),t}function bn(t,e,i,n){for(var o=0,a=0,r=t.length;a<r&&o<e;a++){var s=t.charCodeAt(a);o+=0<=s&&s<=127?i:n}return a}function Sn(t){return pn("国",t)}function Mn(t,e,i,n,o){null!=t&&(t+="");var a=H(n,Sn(e)),r=t?t.split("\n"):[],s=r.length*a,l=s,u=!0;if(i&&(l+=i[0]+i[2]),t&&o){u=!1;var h=o.outerHeight,c=o.outerWidth;if(null!=h&&h<l)t="",r=[];else if(null!=c)for(var d=_n(c-(i?i[1]+i[3]:0),e,o.ellipsis,{minChar:o.minChar,placeholder:o.placeholder}),f=0,p=r.length;f<p;f++)r[f]=wn(r[f],d)}return{lines:r,height:s,outerHeight:l,lineHeight:a,canCacheByTextString:u}}function In(t,e){var i={lines:[],width:0,height:0};if(null!=t&&(t+=""),!t)return i;for(var n,o=cn.lastIndex=0;null!=(n=cn.exec(t));){var a=n.index;o<a&&Tn(i,t.substring(o,a)),Tn(i,n[2],n[1]),o=cn.lastIndex}o<t.length&&Tn(i,t.substring(o,t.length));var r=i.lines,s=0,l=0,u=[],h=e.textPadding,c=e.truncate,d=c&&c.outerWidth,f=c&&c.outerHeight;h&&(null!=d&&(d-=h[1]+h[3]),null!=f&&(f-=h[0]+h[2]));for(var p=0;p<r.length;p++){for(var g=r[p],m=0,v=0,y=0;y<g.tokens.length;y++){var x=(C=g.tokens[y]).styleName&&e.rich[C.styleName]||{},_=C.textPadding=x.textPadding,w=C.font=x.font||e.font,b=C.textHeight=H(x.textHeight,Sn(w));if(_&&(b+=_[0]+_[2]),C.height=b,C.lineHeight=Z(x.textLineHeight,e.textLineHeight,b),C.textAlign=x&&x.textAlign||e.textAlign,C.textVerticalAlign=x&&x.textVerticalAlign||"middle",null!=f&&s+C.lineHeight>f)return{lines:[],width:0,height:0};C.textWidth=pn(C.text,w);var S=x.textWidth,M=null==S||"auto"===S;if("string"==typeof S&&"%"===S.charAt(S.length-1))C.percentWidth=S,u.push(C),S=0;else{if(M){S=C.textWidth;var I=x.textBackgroundColor,T=I&&I.image;T&&sn(T=on(T))&&(S=Math.max(S,T.width*b/T.height))}var A=_?_[1]+_[3]:0;S+=A;var D=null!=d?d-v:null;null!=D&&D<S&&(!M||D<A?(C.text="",C.textWidth=S=0):(C.text=xn(C.text,D-A,w,c.ellipsis,{minChar:c.minChar}),C.textWidth=pn(C.text,w),S=C.textWidth+A))}v+=C.width=S,x&&(m=Math.max(m,C.lineHeight))}g.width=v,s+=g.lineHeight=m,l=Math.max(l,v)}i.outerWidth=i.width=H(e.textWidth,l),i.outerHeight=i.height=H(e.textHeight,s),h&&(i.outerWidth+=h[1]+h[3],i.outerHeight+=h[0]+h[2]);for(p=0;p<u.length;p++){var C,L=(C=u[p]).percentWidth;C.width=parseInt(L,10)/100*l}return i}function Tn(t,e,i){for(var n=""===e,o=e.split("\n"),a=t.lines,r=0;r<o.length;r++){var s=o[r],l={styleName:i,text:s,isLineHolder:!s&&!n};if(r)a.push({tokens:[l]});else{var u=(a[a.length-1]||(a[0]={tokens:[]})).tokens,h=u.length;1===h&&u[0].isLineHolder?u[0]=l:!s&&h&&!n||u.push(l)}}}function An(t){var e=(t.fontSize||t.fontFamily)&&[t.fontStyle,t.fontWeight,(t.fontSize||12)+"px",t.fontFamily||"sans-serif"].join(" ");return e&&j(e)||t.textFont||t.font}function Dn(t,e){var i,n,o,a,r,s=e.x,l=e.y,u=e.width,h=e.height,c=e.r;u<0&&(s+=u,u=-u),h<0&&(l+=h,h=-h),"number"==typeof c?i=n=o=a=c:c instanceof Array?1===c.length?i=n=o=a=c[0]:2===c.length?(i=o=c[0],n=a=c[1]):3===c.length?(i=c[0],n=a=c[1],o=c[2]):(i=c[0],n=c[1],o=c[2],a=c[3]):i=n=o=a=0,u<i+n&&(i*=u/(r=i+n),n*=u/r),u<o+a&&(o*=u/(r=o+a),a*=u/r),h<n+o&&(n*=h/(r=n+o),o*=h/r),h<i+a&&(i*=h/(r=i+a),a*=h/r),t.moveTo(s+i,l),t.lineTo(s+u-n,l),0!==n&&t.arc(s+u-n,l+n,n,-Math.PI/2,0),t.lineTo(s+u,l+h-o),0!==o&&t.arc(s+u-o,l+h-o,o,0,Math.PI/2),t.lineTo(s+a,l+h),0!==a&&t.arc(s+a,l+h-a,a,Math.PI/2,Math.PI),t.lineTo(s,l+i),0!==i&&t.arc(s+i,l+i,i,Math.PI,1.5*Math.PI)}fn.measureText=function(t,e){var i=x();return i.font=e||dn,i.measureText(t)};var Cn=dn,Ln={left:1,right:1,center:1},kn={top:1,bottom:1,middle:1},Pn=[["textShadowBlur","shadowBlur",0],["textShadowOffsetX","shadowOffsetX",0],["textShadowOffsetY","shadowOffsetY",0],["textShadowColor","shadowColor","transparent"]],Nn={},On={};function En(t){return Rn(t),E(t.rich,Rn),t}function Rn(t){if(t){t.font=An(t);var e=t.textAlign;"middle"===e&&(e="center"),t.textAlign=null==e||Ln[e]?e:"left";var i=t.textVerticalAlign||t.textBaseline;"center"===i&&(i="middle"),t.textVerticalAlign=null==i||kn[i]?i:"top",t.textPadding&&(t.textPadding=X(t.textPadding))}}function zn(t,e,i,n,o,a){n.rich?function(t,e,i,n,o,a){a!==Hi&&(e.__attrCachedBy=Wi.NONE);var r=t.__textCotentBlock;r&&!t.__dirtyText||(r=t.__textCotentBlock=In(i,n));!function(t,e,i,n,o){var a=i.width,r=i.outerWidth,s=i.outerHeight,l=n.textPadding,u=Hn(On,t,n,o),h=u.baseX,c=u.baseY,d=u.textAlign,f=u.textVerticalAlign;Bn(e,n,o,h,c);var p=mn(h,r,d),g=vn(c,s,f),m=p,v=g;l&&(m+=l[3],v+=l[0]);var y=m+a;Gn(n)&&Fn(t,e,n,p,g,r,s);for(var x=0;x<i.lines.length;x++){for(var _,w=i.lines[x],b=w.tokens,S=b.length,M=w.lineHeight,I=w.width,T=0,A=m,D=y,C=S-1;T<S&&(!(_=b[T]).textAlign||"left"===_.textAlign);)Vn(t,e,_,n,M,v,A,"left"),I-=_.width,A+=_.width,T++;for(;0<=C&&"right"===(_=b[C]).textAlign;)Vn(t,e,_,n,M,v,D,"right"),I-=_.width,D-=_.width,C--;for(A+=(a-(A-m)-(y-D)-I)/2;T<=C;)_=b[T],Vn(t,e,_,n,M,v,A+_.width/2,"center"),A+=_.width,T++;v+=M}}(t,e,r,n,o)}(t,e,i,n,o,a):function(t,e,i,n,o,a){var r,s=Gn(n),l=!1,u=e.__attrCachedBy===Wi.PLAIN_TEXT;a!==Hi?(a&&(r=a.style,l=!s&&u&&r),e.__attrCachedBy=s?Wi.NONE:Wi.PLAIN_TEXT):u&&(e.__attrCachedBy=Wi.NONE);var h=n.font||Cn;l&&h===(r.font||Cn)||(e.font=h);var c=t.__computedFont;t.__styleFont!==h&&(t.__styleFont=h,c=t.__computedFont=e.font);var d=n.textPadding,f=n.textLineHeight,p=t.__textCotentBlock;p&&!t.__dirtyText||(p=t.__textCotentBlock=Mn(i,c,d,f,n.truncate));var g=p.outerHeight,m=p.lines,v=p.lineHeight,y=Hn(On,t,n,o),x=y.baseX,_=y.baseY,w=y.textAlign||"left",b=y.textVerticalAlign;Bn(e,n,o,x,_);var S=vn(_,g,b),M=x,I=S;if(s||d){var T=pn(i,c);d&&(T+=d[1]+d[3]);var A=mn(x,T,w);s&&Fn(t,e,n,A,S,T,g),d&&(M=jn(x,w,d),I+=d[0])}e.textAlign=w,e.textBaseline="middle",e.globalAlpha=n.opacity||1;for(var D=0;D<Pn.length;D++){var C=Pn[D],L=C[0],k=C[1],P=n[L];l&&P===r[L]||(e[k]=Fi(e,k,P||C[2]))}I+=v/2;var N=n.textStrokeWidth,O=l?r.textStrokeWidth:null,E=!l||N!==O,R=!l||E||n.textStroke!==r.textStroke,z=Un(n.textStroke,N),B=Xn(n.textFill);z&&(E&&(e.lineWidth=N),R&&(e.strokeStyle=z));B&&(l&&n.textFill===r.textFill||(e.fillStyle=B));if(1===m.length)z&&e.strokeText(m[0],M,I),B&&e.fillText(m[0],M,I);else for(D=0;D<m.length;D++)z&&e.strokeText(m[D],M,I),B&&e.fillText(m[D],M,I),I+=v}(t,e,i,n,o,a)}function Bn(t,e,i,n,o){if(i&&e.textRotation){var a=e.textOrigin;"center"===a?(n=i.width/2+i.x,o=i.height/2+i.y):a&&(n=a[0]+i.x,o=a[1]+i.y),t.translate(n,o),t.rotate(-e.textRotation),t.translate(-n,-o)}}function Vn(t,e,i,n,o,a,r,s){var l=n.rich[i.styleName]||{};l.text=i.text;var u=i.textVerticalAlign,h=a+o/2;"top"===u?h=a+i.height/2:"bottom"===u&&(h=a+o-i.height/2),!i.isLineHolder&&Gn(l)&&Fn(t,e,l,"right"===s?r-i.width:"center"===s?r-i.width/2:r,h-i.height/2,i.width,i.height);var c=i.textPadding;c&&(r=jn(r,s,c),h-=i.height/2-c[2]-i.textHeight/2),Zn(e,"shadowBlur",Z(l.textShadowBlur,n.textShadowBlur,0)),Zn(e,"shadowColor",l.textShadowColor||n.textShadowColor||"transparent"),Zn(e,"shadowOffsetX",Z(l.textShadowOffsetX,n.textShadowOffsetX,0)),Zn(e,"shadowOffsetY",Z(l.textShadowOffsetY,n.textShadowOffsetY,0)),Zn(e,"textAlign",s),Zn(e,"textBaseline","middle"),Zn(e,"font",i.font||Cn);var d=Un(l.textStroke||n.textStroke,p),f=Xn(l.textFill||n.textFill),p=H(l.textStrokeWidth,n.textStrokeWidth);d&&(Zn(e,"lineWidth",p),Zn(e,"strokeStyle",d),e.strokeText(i.text,r,h)),f&&(Zn(e,"fillStyle",f),e.fillText(i.text,r,h))}function Gn(t){return!!(t.textBackgroundColor||t.textBorderWidth&&t.textBorderColor)}function Fn(t,e,i,n,o,a,r){var s=i.textBackgroundColor,l=i.textBorderWidth,u=i.textBorderColor,h=R(s);if(Zn(e,"shadowBlur",i.textBoxShadowBlur||0),Zn(e,"shadowColor",i.textBoxShadowColor||"transparent"),Zn(e,"shadowOffsetX",i.textBoxShadowOffsetX||0),Zn(e,"shadowOffsetY",i.textBoxShadowOffsetY||0),h||l&&u){e.beginPath();var c=i.textBorderRadius;c?Dn(e,{x:n,y:o,width:a,height:r,r:c}):e.rect(n,o,a,r),e.closePath()}if(h)if(Zn(e,"fillStyle",s),null!=i.fillOpacity){var d=e.globalAlpha;e.globalAlpha=i.fillOpacity*i.opacity,e.fill(),e.globalAlpha=d}else e.fill();else if(z(s)){var f=s.image;(f=an(f,null,t,Wn,s))&&sn(f)&&e.drawImage(f,n,o,a,r)}if(l&&u)if(Zn(e,"lineWidth",l),Zn(e,"strokeStyle",u),null!=i.strokeOpacity){d=e.globalAlpha;e.globalAlpha=i.strokeOpacity*i.opacity,e.stroke(),e.globalAlpha=d}else e.stroke()}function Wn(t,e){e.image=t}function Hn(t,e,i,n){var o=i.x||0,a=i.y||0,r=i.textAlign,s=i.textVerticalAlign;if(n){var l=i.textPosition;if(l instanceof Array)o=n.x+Yn(l[0],n.width),a=n.y+Yn(l[1],n.height);else{var u=e&&e.calculateTextPosition?e.calculateTextPosition(Nn,i,n):yn(Nn,i,n);o=u.x,a=u.y,r=r||u.textAlign,s=s||u.textVerticalAlign}var h=i.textOffset;h&&(o+=h[0],a+=h[1])}return(t=t||{}).baseX=o,t.baseY=a,t.textAlign=r,t.textVerticalAlign=s,t}function Zn(t,e,i){return t[e]=Fi(t,e,i),t[e]}function Un(t,e){return null==t||e<=0||"transparent"===t||"none"===t?null:t.image||t.colorStops?"#000":t}function Xn(t){return null==t||"none"===t?null:t.image||t.colorStops?"#000":t}function Yn(t,e){return"string"==typeof t?0<=t.lastIndexOf("%")?parseFloat(t)/100*e:parseFloat(t):t}function jn(t,e,i){return"right"===e?t-i[1]:"center"===e?t+i[3]/2-i[1]/2:t+i[3]}function qn(t,e){return null!=t&&(t||e.textBackgroundColor||e.textBorderWidth&&e.textBorderColor||e.textPadding)}function Kn(){}var $n=new Di;function Jn(t){for(var e in t=t||{},_i.call(this,t),t)t.hasOwnProperty(e)&&"style"!==e&&(this[e]=t[e]);this.style=new Ui(t.style,this),this._rect=null,this.__clipPaths=null}function Qn(t){Jn.call(this,t)}Jn.prototype={constructor:Jn,type:"displayable",__dirty:!0,invisible:!(Kn.prototype={constructor:Kn,drawRectText:function(t,e){var i=this.style;e=i.textRect||e,this.__dirty&&En(i);var n=i.text;if(null!=n&&(n+=""),qn(n,i)){t.save();var o=this.transform;i.transformText?this.setTransform(t):o&&($n.copy(e),$n.applyTransform(o),e=$n),zn(this,t,n,i,e,Hi),t.restore()}}}),z:0,z2:0,zlevel:0,draggable:!1,dragging:!1,silent:!1,culling:!1,cursor:"pointer",rectHover:!1,progressive:!1,incremental:!1,globalScaleRatio:1,beforeBrush:function(t){},afterBrush:function(t){},brush:function(t,e){},getBoundingRect:function(){},contain:function(t,e){return this.rectContain(t,e)},traverse:function(t,e){t.call(e,this)},rectContain:function(t,e){var i=this.transformCoordToLocal(t,e);return this.getBoundingRect().contain(i[0],i[1])},dirty:function(){this.__dirty=this.__dirtyText=!0,this._rect=null,this.__zr&&this.__zr.refresh()},animateStyle:function(t){return this.animate("style",t)},attrKV:function(t,e){"style"!==t?_i.prototype.attrKV.call(this,t,e):this.style.set(e)},setStyle:function(t,e){return this.style.set(t,e),this.dirty(!1),this},useStyle:function(t){return this.style=new Ui(t,this),this.dirty(!1),this},calculateTextPosition:null},w(Jn,_i),b(Jn,Kn),Qn.prototype={constructor:Qn,type:"image",brush:function(t,e){var i=this.style,n=i.image;i.bind(t,this,e);var o=this._image=an(n,this._image,this,this.onload);if(o&&sn(o)){var a=i.x||0,r=i.y||0,s=i.width,l=i.height,u=o.width/o.height;if(null==s&&null!=l?s=l*u:null==l&&null!=s?l=s/u:null==s&&null==l&&(s=o.width,l=o.height),this.setTransform(t),i.sWidth&&i.sHeight){var h=i.sx||0,c=i.sy||0;t.drawImage(o,h,c,i.sWidth,i.sHeight,a,r,s,l)}else if(i.sx&&i.sy){var d=s-(h=i.sx),f=l-(c=i.sy);t.drawImage(o,h,c,d,f,a,r,s,l)}else t.drawImage(o,a,r,s,l);null!=i.text&&(this.restoreTransform(t),this.drawRectText(t,this.getBoundingRect()))}},getBoundingRect:function(){var t=this.style;return this._rect||(this._rect=new Di(t.x||0,t.y||0,t.width||0,t.height||0)),this._rect}},w(Qn,Jn);var to=314159;function eo(t){return parseInt(t,10)}var io=new Di(0,0,0,0),no=new Di(0,0,0,0);function oo(t,e,i){this.type="canvas";var n=!t.nodeName||"CANVAS"===t.nodeName.toUpperCase();this._opts=i=P({},i||{}),this.dpr=i.devicePixelRatio||pi,this._singleCanvas=n;var o=(this.root=t).style;o&&(o["-webkit-tap-highlight-color"]="transparent",o["-webkit-user-select"]=o["user-select"]=o["-webkit-touch-callout"]="none",t.innerHTML=""),this.storage=e;var a=this._zlevelList=[],r=this._layers={};if(this._layerConfig={},this._needsManuallyCompositing=!1,n){var s=t.width,l=t.height;null!=i.width&&(s=i.width),null!=i.height&&(l=i.height),this.dpr=i.devicePixelRatio||1,t.width=s*this.dpr,t.height=l*this.dpr,this._width=s,this._height=l;var u=new tn(t,this,this.dpr);u.__builtin__=!0,u.initContext(),(r[to]=u).zlevel=to,a.push(to),this._domRoot=t}else{this._width=this._getSize(0),this._height=this._getSize(1);var h=this._domRoot=function(t,e){var i=document.createElement("div");return i.style.cssText=["position:relative","width:"+t+"px","height:"+e+"px","padding:0","margin:0","border-width:0"].join(";")+";",i}(this._width,this._height);t.appendChild(h)}this._hoverlayer=null,this._hoverElements=[]}oo.prototype={constructor:oo,getType:function(){return"canvas"},isSingleCanvas:function(){return this._singleCanvas},getViewportRoot:function(){return this._domRoot},getViewportRootOffset:function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},refresh:function(t){var e=this.storage.getDisplayList(!0),i=this._zlevelList;this._redrawId=Math.random(),this._paintList(e,t,this._redrawId);for(var n=0;n<i.length;n++){var o=i[n],a=this._layers[o];if(!a.__builtin__&&a.refresh){var r=0===n?this._backgroundColor:null;a.refresh(r)}}return this.refreshHover(),this},addHover:function(t,e){if(!t.__hoverMir){var i=new t.constructor({style:t.style,shape:t.shape,z:t.z,z2:t.z2,silent:t.silent});return(i.__from=t).__hoverMir=i,e&&i.setStyle(e),this._hoverElements.push(i),i}},removeHover:function(t){var e=t.__hoverMir,i=this._hoverElements,n=_(i,e);0<=n&&i.splice(n,1),t.__hoverMir=null},clearHover:function(t){for(var e=this._hoverElements,i=0;i<e.length;i++){var n=e[i].__from;n&&(n.__hoverMir=null)}e.length=0},refreshHover:function(){var t=this._hoverElements,e=t.length,i=this._hoverlayer;if(i&&i.clear(),e){zi(t,this.storage.displayableSortFunc);var n={};(i=i||(this._hoverlayer=this.getLayer(1e5))).ctx.save();for(var o=0;o<e;){var a=t[o],r=a.__from;r&&r.__zr?(o++,r.invisible||(a.transform=r.transform,a.invTransform=r.invTransform,a.__clipPaths=r.__clipPaths,this._doPaintEl(a,i,!0,n))):(t.splice(o,1),r.__hoverMir=null,e--)}i.ctx.restore()}},getHoverLayer:function(){return this.getLayer(1e5)},_paintList:function(t,e,i){if(this._redrawId===i){e=e||!1,this._updateLayerStatus(t);var n=this._doPaintList(t,e);if(this._needsManuallyCompositing&&this._compositeManually(),!n){var o=this;en(function(){o._paintList(t,e,i)})}}},_compositeManually:function(){var e=this.getLayer(to).ctx,i=this._domRoot.width,n=this._domRoot.height;e.clearRect(0,0,i,n),this.eachBuiltinLayer(function(t){t.virtual&&e.drawImage(t.dom,0,0,i,n)})},_doPaintList:function(t,e){for(var i=[],n=0;n<this._zlevelList.length;n++){var o=this._zlevelList[n];(s=this._layers[o]).__builtin__&&s!==this._hoverlayer&&(s.__dirty||e)&&i.push(s)}for(var a=!0,r=0;r<i.length;r++){var s,l=(s=i[r]).ctx,u={};l.save();var h=e?s.__startIndex:s.__drawIndex,c=!e&&s.incremental&&Date.now,d=c&&Date.now(),f=s.zlevel===this._zlevelList[0]?this._backgroundColor:null;if(s.__startIndex===s.__endIndex)s.clear(!1,f);else if(h===s.__startIndex){var p=t[h];p.incremental&&p.notClear&&!e||s.clear(!1,f)}-1===h&&(console.error("For some unknown reason. drawIndex is -1"),h=s.__startIndex);for(var g=h;g<s.__endIndex;g++){var m=t[g];if(this._doPaintEl(m,s,e,u),m.__dirty=m.__dirtyText=!1,c)if(15<Date.now()-d)break}s.__drawIndex=g,s.__drawIndex<s.__endIndex&&(a=!1),u.prevElClipPaths&&l.restore(),l.restore()}return v.wxa&&E(this._layers,function(t){t&&t.ctx&&t.ctx.draw&&t.ctx.draw()}),a},_doPaintEl:function(t,e,i,n){var o=e.ctx,a=t.transform;if((e.__dirty||i)&&!t.invisible&&0!==t.style.opacity&&(!a||a[0]||a[3])&&(!t.culling||!function(t,e,i){return io.copy(t.getBoundingRect()),t.transform&&io.applyTransform(t.transform),no.width=e,no.height=i,!io.intersect(no)}(t,this._width,this._height))){var r=t.__clipPaths,s=n.prevElClipPaths;s&&!function(t,e){if(t===e)return!1;if(!t||!e||t.length!==e.length)return!0;for(var i=0;i<t.length;i++)if(t[i]!==e[i])return!0;return!1}(r,s)||(s&&(o.restore(),n.prevElClipPaths=null,n.prevEl=null),r&&(o.save(),function(t,e){for(var i=0;i<t.length;i++){var n=t[i];n.setTransform(e),e.beginPath(),n.buildPath(e,n.shape),e.clip(),n.restoreTransform(e)}}(r,o),n.prevElClipPaths=r)),t.beforeBrush&&t.beforeBrush(o),t.brush(o,n.prevEl||null),(n.prevEl=t).afterBrush&&t.afterBrush(o)}},getLayer:function(t,e){this._singleCanvas&&!this._needsManuallyCompositing&&(t=to);var i=this._layers[t];return i||((i=new tn("zr_"+t,this,this.dpr)).zlevel=t,i.__builtin__=!0,this._layerConfig[t]?m(i,this._layerConfig[t],!0):this._layerConfig[t-.01]&&m(i,this._layerConfig[t-.01],!0),e&&(i.virtual=e),this.insertLayer(t,i),i.initContext()),i},insertLayer:function(t,e){var i=this._layers,n=this._zlevelList,o=n.length,a=null,r=-1,s=this._domRoot;if(i[t])vi("ZLevel "+t+" has been used already");else if(function(t){return!!t&&(!!t.__builtin__||"function"==typeof t.resize&&"function"==typeof t.refresh)}(e)){if(0<o&&t>n[0]){for(r=0;r<o-1&&!(n[r]<t&&n[r+1]>t);r++);a=i[n[r]]}if(n.splice(r+1,0,t),!(i[t]=e).virtual)if(a){var l=a.dom;l.nextSibling?s.insertBefore(e.dom,l.nextSibling):s.appendChild(e.dom)}else s.firstChild?s.insertBefore(e.dom,s.firstChild):s.appendChild(e.dom)}else vi("Layer of zlevel "+t+" is not valid")},eachLayer:function(t,e){var i,n,o=this._zlevelList;for(n=0;n<o.length;n++)i=o[n],t.call(e,this._layers[i],i)},eachBuiltinLayer:function(t,e){var i,n,o,a=this._zlevelList;for(o=0;o<a.length;o++)n=a[o],(i=this._layers[n]).__builtin__&&t.call(e,i,n)},eachOtherLayer:function(t,e){var i,n,o,a=this._zlevelList;for(o=0;o<a.length;o++)n=a[o],(i=this._layers[n]).__builtin__||t.call(e,i,n)},getLayers:function(){return this._layers},_updateLayerStatus:function(t){function e(t){o&&(o.__endIndex!==t&&(o.__dirty=!0),o.__endIndex=t)}if(this.eachBuiltinLayer(function(t,e){t.__dirty=t.__used=!1}),this._singleCanvas)for(var i=1;i<t.length;i++){if((r=t[i]).zlevel!==t[i-1].zlevel||r.incremental){this._needsManuallyCompositing=!0;break}}var n,o=null,a=0;for(i=0;i<t.length;i++){var r,s,l=(r=t[i]).zlevel;n!==l&&(n=l,a=0),r.incremental?((s=this.getLayer(l+.001,this._needsManuallyCompositing)).incremental=!0,a=1):s=this.getLayer(l+(0<a?.01:0),this._needsManuallyCompositing),s.__builtin__||vi("ZLevel "+l+" has been used by unkown layer "+s.id),s!==o&&(s.__used=!0,s.__startIndex!==i&&(s.__dirty=!0),s.__startIndex=i,s.incremental?s.__drawIndex=-1:s.__drawIndex=i,e(i),o=s),r.__dirty&&(s.__dirty=!0,s.incremental&&s.__drawIndex<0&&(s.__drawIndex=i))}e(i),this.eachBuiltinLayer(function(t,e){!t.__used&&0<t.getElementCount()&&(t.__dirty=!0,t.__startIndex=t.__endIndex=t.__drawIndex=0),t.__dirty&&t.__drawIndex<0&&(t.__drawIndex=t.__startIndex)})},clear:function(){return this.eachBuiltinLayer(this._clearLayer),this},_clearLayer:function(t){t.clear()},setBackgroundColor:function(t){this._backgroundColor=t},configLayer:function(t,e){if(e){var i=this._layerConfig;i[t]?m(i[t],e,!0):i[t]=e;for(var n=0;n<this._zlevelList.length;n++){var o=this._zlevelList[n];if(o===t||o===t+.01)m(this._layers[o],i[t],!0)}}},delLayer:function(t){var e=this._layers,i=this._zlevelList,n=e[t];n&&(n.dom.parentNode.removeChild(n.dom),delete e[t],i.splice(_(i,t),1))},resize:function(e,i){if(this._domRoot.style){var t=this._domRoot;t.style.display="none";var n=this._opts;if(null!=e&&(n.width=e),null!=i&&(n.height=i),e=this._getSize(0),i=this._getSize(1),t.style.display="",this._width!==e||i!==this._height){for(var o in t.style.width=e+"px",t.style.height=i+"px",this._layers)this._layers.hasOwnProperty(o)&&this._layers[o].resize(e,i);E(this._progressiveLayers,function(t){t.resize(e,i)}),this.refresh(!0)}this._width=e,this._height=i}else{if(null==e||null==i)return;this._width=e,this._height=i,this.getLayer(to).resize(e,i)}return this},clearLayer:function(t){var e=this._layers[t];e&&e.clear()},dispose:function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},getRenderedCanvas:function(t){if(t=t||{},this._singleCanvas&&!this._compositeManually)return this._layers[to].dom;var e=new tn("image",this,t.pixelRatio||this.dpr);if(e.initContext(),e.clear(!1,t.backgroundColor||this._backgroundColor),t.pixelRatio<=this.dpr){this.refresh();var i=e.dom.width,n=e.dom.height,o=e.ctx;this.eachLayer(function(t){t.__builtin__?o.drawImage(t.dom,0,0,i,n):t.renderToCanvas&&(e.ctx.save(),t.renderToCanvas(e.ctx),e.ctx.restore())})}else for(var a={},r=this.storage.getDisplayList(!0),s=0;s<r.length;s++){var l=r[s];this._doPaintEl(l,e,!0,a)}return e.dom},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(t){var e=this._opts,i=["width","height"][t],n=["clientWidth","clientHeight"][t],o=["paddingLeft","paddingTop"][t],a=["paddingRight","paddingBottom"][t];if(null!=e[i]&&"auto"!==e[i])return parseFloat(e[i]);var r=this.root,s=document.defaultView.getComputedStyle(r);return(r[n]||eo(s[i])||eo(r.style[i]))-(eo(s[o])||0)-(eo(s[a])||0)|0},pathToImage:function(t,e){e=e||this.dpr;var i=document.createElement("canvas"),n=i.getContext("2d"),o=t.getBoundingRect(),a=t.style,r=a.shadowBlur*e,s=a.shadowOffsetX*e,l=a.shadowOffsetY*e,u=a.hasStroke()?a.lineWidth:0,h=Math.max(u/2,r-s),c=Math.max(u/2,s+r),d=Math.max(u/2,r-l),f=Math.max(u/2,l+r),p=o.width+h+c,g=o.height+d+f;i.width=p*e,i.height=g*e,n.scale(e,e),n.clearRect(0,0,p,g),n.dpr=e;var m={position:t.position,rotation:t.rotation,scale:t.scale};t.position=[h-o.x,d-o.y],t.rotation=0,t.scale=[1,1],t.updateTransform(),t&&t.brush(n);var v=new Qn({style:{x:0,y:0,image:i}});return null!=m.position&&(v.position=t.position=m.position),null!=m.rotation&&(v.rotation=t.rotation=m.rotation),null!=m.scale&&(v.scale=t.scale=m.scale),v}};function ao(t){t=t||{},this.stage=t.stage||{},this.onframe=t.onframe||function(){},this._clips=[],this._running=!1,this._time,this._pausedTime,this._pauseStart,this._paused=!1,Ct.call(this)}ao.prototype={constructor:ao,addClip:function(t){this._clips.push(t)},addAnimator:function(t){t.animation=this;for(var e=t.getClips(),i=0;i<e.length;i++)this.addClip(e[i])},removeClip:function(t){var e=_(this._clips,t);0<=e&&this._clips.splice(e,1)},removeAnimator:function(t){for(var e=t.getClips(),i=0;i<e.length;i++)this.removeClip(e[i]);t.animation=null},_update:function(){for(var t=(new Date).getTime()-this._pausedTime,e=t-this._time,i=this._clips,n=i.length,o=[],a=[],r=0;r<n;r++){var s=i[r],l=s.step(t,e);l&&(o.push(l),a.push(s))}for(r=0;r<n;)i[r]._needsRemove?(i[r]=i[n-1],i.pop(),n--):r++;n=o.length;for(r=0;r<n;r++)a[r].fire(o[r]);this._time=t,this.onframe(e),this.trigger("frame",e),this.stage.update&&this.stage.update()},_startLoop:function(){var e=this;this._running=!0,en(function t(){e._running&&(en(t),e._paused||e._update())})},start:function(){this._time=(new Date).getTime(),this._pausedTime=0,this._startLoop()},stop:function(){this._running=!1},pause:function(){this._paused||(this._pauseStart=(new Date).getTime(),this._paused=!0)},resume:function(){this._paused&&(this._pausedTime+=(new Date).getTime()-this._pauseStart,this._paused=!1)},clear:function(){this._clips=[]},isFinished:function(){return!this._clips.length},animate:function(t,e){var i=new di(t,(e=e||{}).loop,e.getter,e.setter);return this.addAnimator(i),i}},b(ao,Ct);var ro,so,lo=v.domSupported,uo=(so={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},{mouse:ro=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],touch:["touchstart","touchend","touchmove"],pointer:O(ro,function(t){var e=t.replace("mouse","pointer");return so.hasOwnProperty(e)?e:t})}),ho={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]};function co(t){return"mousewheel"===t&&v.browser.firefox?"DOMMouseScroll":t}function fo(t){var e=t.pointerType;return"pen"===e||"touch"===e}function po(t){t&&(t.zrByTouch=!0)}function go(t,e){for(var i=e,n=!1;i&&9!==i.nodeType&&!(n=i.domBelongToZr||i!==e&&i===t.painterRoot);)i=i.parentNode;return n}function mo(t,e){this.type=e.type,this.target=this.currentTarget=t.dom,this.pointerType=e.pointerType,this.clientX=e.clientX,this.clientY=e.clientY}var vo=mo.prototype;vo.stopPropagation=vo.stopImmediatePropagation=vo.preventDefault=et;var yo={mousedown:function(t){t=Zt(this.dom,t),this._mayPointerCapture=[t.zrX,t.zrY],this.trigger("mousedown",t)},mousemove:function(t){t=Zt(this.dom,t);var e=this._mayPointerCapture;!e||t.zrX===e[0]&&t.zrY===e[1]||Mo(this,!0),this.trigger("mousemove",t)},mouseup:function(t){t=Zt(this.dom,t),Mo(this,!1),this.trigger("mouseup",t)},mouseout:function(t){t=Zt(this.dom,t),this._pointerCapturing&&(t.zrEventControl="no_globalout");var e=t.toElement||t.relatedTarget;t.zrIsToLocalDOM=go(this,e),this.trigger("mouseout",t)},touchstart:function(t){po(t=Zt(this.dom,t)),this._lastTouchMoment=new Date,this.handler.processGesture(t,"start"),yo.mousemove.call(this,t),yo.mousedown.call(this,t)},touchmove:function(t){po(t=Zt(this.dom,t)),this.handler.processGesture(t,"change"),yo.mousemove.call(this,t)},touchend:function(t){po(t=Zt(this.dom,t)),this.handler.processGesture(t,"end"),yo.mouseup.call(this,t),+new Date-this._lastTouchMoment<300&&yo.click.call(this,t)},pointerdown:function(t){yo.mousedown.call(this,t)},pointermove:function(t){fo(t)||yo.mousemove.call(this,t)},pointerup:function(t){yo.mouseup.call(this,t)},pointerout:function(t){fo(t)||yo.mouseout.call(this,t)}};E(["click","mousewheel","dblclick","contextmenu"],function(e){yo[e]=function(t){t=Zt(this.dom,t),this.trigger(e,t)}});var xo={pointermove:function(t){fo(t)||xo.mousemove.call(this,t)},pointerup:function(t){xo.mouseup.call(this,t)},mousemove:function(t){this.trigger("mousemove",t)},mouseup:function(t){var e=this._pointerCapturing;Mo(this,!1),this.trigger("mouseup",t),e&&(t.zrEventControl="only_globalout",this.trigger("mouseout",t))}};function _o(i,n){var o=n.domHandlers;v.pointerEventsSupported?E(uo.pointer,function(e){bo(n,e,function(t){o[e].call(i,t)})}):(v.touchEventsSupported&&E(uo.touch,function(e){bo(n,e,function(t){o[e].call(i,t),function(t){t.touching=!0,null!=t.touchTimer&&(clearTimeout(t.touchTimer),t.touchTimer=null),t.touchTimer=setTimeout(function(){t.touching=!1,t.touchTimer=null},700)}(n)})}),E(uo.mouse,function(e){bo(n,e,function(t){t=Ht(t),n.touching||o[e].call(i,t)})}))}function wo(i,n){function t(e){bo(n,e,function(t){t=Ht(t),go(i,t.target)||(t=function(t,e){return Zt(t.dom,new mo(t,e),!0)}(i,t),n.domHandlers[e].call(i,t))},{capture:!0})}v.pointerEventsSupported?E(ho.pointer,t):v.touchEventsSupported||E(ho.mouse,t)}function bo(t,e,i,n){t.mounted[e]=i,t.listenerOpts[e]=n,Ut(t.domTarget,co(e),i,n)}function So(t){var e,i,n,o,a=t.mounted;for(var r in a)a.hasOwnProperty(r)&&(e=t.domTarget,i=co(r),n=a[r],o=t.listenerOpts[r],Bt?e.removeEventListener(i,n,o):e.detachEvent("on"+i,n));t.mounted={}}function Mo(t,e){if(t._mayPointerCapture=null,lo&&t._pointerCapturing^e){t._pointerCapturing=e;var i=t._globalHandlerScope;e?wo(t,i):So(i)}}function Io(t,e){this.domTarget=t,this.domHandlers=e,this.mounted={},this.listenerOpts={},this.touchTimer=null,this.touching=!1}function To(t,e){Ct.call(this),this.dom=t,this.painterRoot=e,this._localHandlerScope=new Io(t,yo),lo&&(this._globalHandlerScope=new Io(document,xo)),this._pointerCapturing=!1,this._mayPointerCapture=null,_o(this,this._localHandlerScope)}var Ao=To.prototype;Ao.dispose=function(){So(this._localHandlerScope),lo&&So(this._globalHandlerScope)},Ao.setCursor=function(t){this.dom.style&&(this.dom.style.cursor=t||"default")},b(To,Ct);var Do=!v.canvasSupported,Co={canvas:oo},Lo={};function ko(t,e){var i=new No(n(),t,e);return Lo[i.id]=i}function Po(t,e){Co[t]=e}var No=function(t,e,i){i=i||{},this.dom=e,this.id=t;var n=this,o=new Vi,a=i.renderer;if(Do){if(!Co.vml)throw new Error("You need to require 'zrender/vml/vml' to support IE8");a="vml"}else a&&Co[a]||(a="canvas");var r=new Co[a](e,o,i,t);this.storage=o,this.painter=r;var s=v.node||v.worker?null:new To(r.getViewportRoot(),r.root);this.handler=new te(o,r,s,r.root),this.animation=new ao({stage:{update:A(this.flush,this)}}),this.animation.start(),this._needsRefresh;var l=o.delFromStorage,u=o.addToStorage;o.delFromStorage=function(t){l.call(o,t),t&&t.removeSelfFromZr(n)},o.addToStorage=function(t){u.call(o,t),t.addSelfToZr(n)}};No.prototype={constructor:No,getId:function(){return this.id},add:function(t){this.storage.addRoot(t),this._needsRefresh=!0},remove:function(t){this.storage.delRoot(t),this._needsRefresh=!0},configLayer:function(t,e){this.painter.configLayer&&this.painter.configLayer(t,e),this._needsRefresh=!0},setBackgroundColor:function(t){this.painter.setBackgroundColor&&this.painter.setBackgroundColor(t),this._needsRefresh=!0},refreshImmediately:function(){this._needsRefresh=this._needsRefreshHover=!1,this.painter.refresh(),this._needsRefresh=this._needsRefreshHover=!1},refresh:function(){this._needsRefresh=!0},flush:function(){var t;this._needsRefresh&&(t=!0,this.refreshImmediately()),this._needsRefreshHover&&(t=!0,this.refreshHoverImmediately()),t&&this.trigger("rendered")},addHover:function(t,e){if(this.painter.addHover){var i=this.painter.addHover(t,e);return this.refreshHover(),i}},removeHover:function(t){this.painter.removeHover&&(this.painter.removeHover(t),this.refreshHover())},clearHover:function(){this.painter.clearHover&&(this.painter.clearHover(),this.refreshHover())},refreshHover:function(){this._needsRefreshHover=!0},refreshHoverImmediately:function(){this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.refreshHover()},resize:function(t){t=t||{},this.painter.resize(t.width,t.height),this.handler.resize()},clearAnimation:function(){this.animation.clear()},getWidth:function(){return this.painter.getWidth()},getHeight:function(){return this.painter.getHeight()},pathToImage:function(t,e){return this.painter.pathToImage(t,e)},setCursorStyle:function(t){this.handler.setCursorStyle(t)},findHover:function(t,e){return this.handler.findHover(t,e)},on:function(t,e,i){this.handler.on(t,e,i)},off:function(t,e){this.handler.off(t,e)},trigger:function(t,e){this.handler.trigger(t,e)},clear:function(){this.storage.delRoot(),this.painter.clear()},dispose:function(){this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,function(t){delete Lo[t]}(this.id)}};var Oo=(Object.freeze||Object)({version:"4.3.1",init:ko,dispose:function(t){if(t)t.dispose();else{for(var e in Lo)Lo.hasOwnProperty(e)&&Lo[e].dispose();Lo={}}return this},getInstance:function(t){return Lo[t]},registerPainter:Po}),Eo=E,Ro=z,zo=L,Bo="series\0";function Vo(t){return t instanceof Array?t:null==t?[]:[t]}function Go(t,e,i){if(t){t[e]=t[e]||{},t.emphasis=t.emphasis||{},t.emphasis[e]=t.emphasis[e]||{};for(var n=0,o=i.length;n<o;n++){var a=i[n];!t.emphasis[e].hasOwnProperty(a)&&t[e].hasOwnProperty(a)&&(t.emphasis[e][a]=t[e][a])}}}var Fo=["fontStyle","fontWeight","fontSize","fontFamily","rich","tag","color","textBorderColor","textBorderWidth","width","height","lineHeight","align","verticalAlign","baseline","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY","backgroundColor","borderColor","borderWidth","borderRadius","padding"];function Wo(t){return!Ro(t)||zo(t)||t instanceof Date?t:t.value}function Ho(t,o){o=(o||[]).slice();var a=O(t||[],function(t,e){return{exist:t}});return Eo(o,function(t,e){if(Ro(t)){for(var i=0;i<a.length;i++)if(!a[i].option&&null!=t.id&&a[i].exist.id===t.id+"")return a[i].option=t,void(o[e]=null);for(i=0;i<a.length;i++){var n=a[i].exist;if(!(a[i].option||null!=n.id&&null!=t.id||null==t.name||Xo(t)||Xo(n)||n.name!==t.name+""))return a[i].option=t,void(o[e]=null)}}}),Eo(o,function(t,e){if(Ro(t)){for(var i=0;i<a.length;i++){var n=a[i].exist;if(!a[i].option&&!Xo(n)&&null==t.id){a[i].option=t;break}}i>=a.length&&a.push({option:t})}}),a}function Zo(t){var r=Q();Eo(t,function(t,e){var i=t.exist;i&&r.set(i.id,t)}),Eo(t,function(t,e){var i=t.option;Y(!i||null==i.id||!r.get(i.id)||r.get(i.id)===t,"id duplicates: "+(i&&i.id)),i&&null!=i.id&&r.set(i.id,t),t.keyInfo||(t.keyInfo={})}),Eo(t,function(t,e){var i=t.exist,n=t.option,o=t.keyInfo;if(Ro(n)){if(o.name=null!=n.name?n.name+"":i?i.name:Bo+e,i)o.id=i.id;else if(null!=n.id)o.id=n.id+"";else for(var a=0;o.id="\0"+o.name+"\0"+a++,r.get(o.id););r.set(o.id,t)}})}function Uo(t){var e=t.name;return!(!e||!e.indexOf(Bo))}function Xo(t){return Ro(t)&&t.id&&0===(t.id+"").indexOf("\0_ec_\0")}function Yo(e,t){return null!=t.dataIndexInside?t.dataIndexInside:null!=t.dataIndex?L(t.dataIndex)?O(t.dataIndex,function(t){return e.indexOfRawIndex(t)}):e.indexOfRawIndex(t.dataIndex):null!=t.name?L(t.name)?O(t.name,function(t){return e.indexOfName(t)}):e.indexOfName(t.name):void 0}function jo(){var e="__\0ec_inner_"+qo+++"_"+Math.random().toFixed(5);return function(t){return t[e]||(t[e]={})}}var qo=0;function Ko(s,l,u){if(R(l)){var t={};t[l+"Index"]=0,l=t}var e=u&&u.defaultMainType;!e||$o(l,e+"Index")||$o(l,e+"Id")||$o(l,e+"Name")||(l[e+"Index"]=0);var h={};return Eo(l,function(t,e){t=l[e];if("dataIndex"!==e&&"dataIndexInside"!==e){var i=e.match(/^(\w+)(Index|Id|Name)$/)||[],n=i[1],o=(i[2]||"").toLowerCase();if(!(!n||!o||null==t||"index"===o&&"none"===t||u&&u.includeMainTypes&&_(u.includeMainTypes,n)<0)){var a={mainType:n};"index"===o&&"all"===t||(a[o]=t);var r=s.queryComponents(a);h[n+"Models"]=r,h[n+"Model"]=r[0]}}else h[e]=t}),h}function $o(t,e){return t&&t.hasOwnProperty(e)}function Jo(t,e,i){t.setAttribute?t.setAttribute(e,i):t[e]=i}function Qo(t){return"auto"===t?v.domSupported?"html":"richText":t||"html"}function ta(t,i){var n=Q(),o=[];return E(t,function(t){var e=i(t);(n.get(e)||(o.push(e),n.set(e,[]))).push(t)}),{keys:o,buckets:n}}var ea=".",ia="___EC__COMPONENT__CONTAINER___";function na(t){var e={main:"",sub:""};return t&&(t=t.split(ea),e.main=t[0]||"",e.sub=t[1]||""),e}function oa(t){(t.$constructor=t).extend=function(t){function e(){t.$constructor?t.$constructor.apply(this,arguments):i.apply(this,arguments)}var i=this;return P(e.prototype,t),e.extend=this.extend,e.superCall=sa,e.superApply=la,w(e,this),e.superClass=i,e}}var aa=0;function ra(t){var e=["__\0is_clz",aa++,Math.random().toFixed(3)].join("_");t.prototype[e]=!0,t.isInstance=function(t){return!(!t||!t[e])}}function sa(t,e){var i=U(arguments,2);return this.superClass.prototype[e].apply(t,i)}function la(t,e,i){return this.superClass.prototype[e].apply(t,i)}function ua(i,t){t=t||{};var o={};if(i.registerClass=function(t,e){if(e)if(function(t){Y(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(t),'componentType "'+t+'" illegal')}(e),(e=na(e)).sub){if(e.sub!==ia){(function(t){var e=o[t.main];e&&e[ia]||((e=o[t.main]={})[ia]=!0);return e})(e)[e.sub]=t}}else o[e.main]=t;return t},i.getClass=function(t,e,i){var n=o[t];if(n&&n[ia]&&(n=e?n[e]:null),i&&!n)throw new Error(e?"Component "+t+"."+(e||"")+" not exists. Load it first.":t+".type should be specified.");return n},i.getClassesByMainType=function(t){t=na(t);var i=[],e=o[t.main];return e&&e[ia]?E(e,function(t,e){e!==ia&&i.push(t)}):i.push(e),i},i.hasClass=function(t){return t=na(t),!!o[t.main]},i.getAllClassMainTypes=function(){var i=[];return E(o,function(t,e){i.push(e)}),i},i.hasSubTypes=function(t){t=na(t);var e=o[t.main];return e&&e[ia]},i.parseClassType=na,t.registerWhenExtend){var n=i.extend;n&&(i.extend=function(t){var e=n.call(this,t);return i.registerClass(e,t.type)})}return i}function ha(s){for(var t=0;t<s.length;t++)s[t][1]||(s[t][1]=s[t][0]);return function(t,e,i){for(var n={},o=0;o<s.length;o++){var a=s[o][1];if(!(e&&0<=_(e,a)||i&&_(i,a)<0)){var r=t.getShallow(a);null!=r&&(n[s[o][0]]=r)}}return n}}var ca=ha([["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),da={getLineStyle:function(t){var e=ca(this,t);return e.lineDash=this.getLineDash(e.lineWidth),e},getLineDash:function(t){null==t&&(t=1);var e=this.get("type"),i=Math.max(t,2),n=4*t;return"solid"!==e&&null!=e&&("dashed"===e?[n,n]:[i,i])}},fa=ha([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),pa={getAreaStyle:function(t,e){return fa(this,t,e)}},ga=Math.pow,ma=Math.sqrt,va=1e-8,ya=1e-4,xa=ma(3),_a=1/3,wa=ot(),ba=ot(),Sa=ot();function Ma(t){return-va<t&&t<va}function Ia(t){return va<t||t<-va}function Ta(t,e,i,n,o){var a=1-o;return a*a*(a*t+3*o*e)+o*o*(o*n+3*a*i)}function Aa(t,e,i,n,o){var a=1-o;return 3*(((e-t)*a+2*(i-e)*o)*a+(n-i)*o*o)}function Da(t,e,i,n,o){var a=6*i-12*e+6*t,r=9*e+3*n-3*t-9*i,s=3*e-3*t,l=0;if(Ma(r)){if(Ia(a))0<=(h=-s/a)&&h<=1&&(o[l++]=h)}else{var u=a*a-4*r*s;if(Ma(u))o[0]=-a/(2*r);else if(0<u){var h,c=ma(u),d=(-a-c)/(2*r);0<=(h=(-a+c)/(2*r))&&h<=1&&(o[l++]=h),0<=d&&d<=1&&(o[l++]=d)}}return l}function Ca(t,e,i,n,o,a){var r=(e-t)*o+t,s=(i-e)*o+e,l=(n-i)*o+i,u=(s-r)*o+r,h=(l-s)*o+s,c=(h-u)*o+u;a[0]=t,a[1]=r,a[2]=u,a[3]=c,a[4]=c,a[5]=h,a[6]=l,a[7]=n}function La(t,e,i,n){var o=1-n;return o*(o*t+2*n*e)+n*n*i}function ka(t,e,i,n){return 2*((1-n)*(e-t)+n*(i-e))}function Pa(t,e,i){var n=t+i-2*e;return 0==n?.5:(t-e)/n}function Na(t,e,i,n,o){var a=(e-t)*n+t,r=(i-e)*n+e,s=(r-a)*n+a;o[0]=t,o[1]=a,o[2]=s,o[3]=s,o[4]=r,o[5]=i}var Oa=Math.min,Ea=Math.max,Ra=Math.sin,za=Math.cos,Ba=2*Math.PI,Va=ot(),Ga=ot(),Fa=ot();function Wa(t,e,i){if(0!==t.length){var n,o=t[0],a=o[0],r=o[0],s=o[1],l=o[1];for(n=1;n<t.length;n++)o=t[n],a=Oa(a,o[0]),r=Ea(r,o[0]),s=Oa(s,o[1]),l=Ea(l,o[1]);e[0]=a,e[1]=s,i[0]=r,i[1]=l}}function Ha(t,e,i,n,o,a){o[0]=Oa(t,i),o[1]=Oa(e,n),a[0]=Ea(t,i),a[1]=Ea(e,n)}var Za=[],Ua=[];function Xa(t,e,i,n,o,a,r,s,l,u){var h,c=Da,d=Ta,f=c(t,i,o,r,Za);for(l[0]=1/0,l[1]=1/0,u[0]=-1/0,u[1]=-1/0,h=0;h<f;h++){var p=d(t,i,o,r,Za[h]);l[0]=Oa(p,l[0]),u[0]=Ea(p,u[0])}for(f=c(e,n,a,s,Ua),h=0;h<f;h++){var g=d(e,n,a,s,Ua[h]);l[1]=Oa(g,l[1]),u[1]=Ea(g,u[1])}l[0]=Oa(t,l[0]),u[0]=Ea(t,u[0]),l[0]=Oa(r,l[0]),u[0]=Ea(r,u[0]),l[1]=Oa(e,l[1]),u[1]=Ea(e,u[1]),l[1]=Oa(s,l[1]),u[1]=Ea(s,u[1])}function Ya(t,e,i,n,o,a,r,s,l){var u=St,h=Mt,c=Math.abs(o-a);if(c%Ba<1e-4&&1e-4<c)return s[0]=t-i,s[1]=e-n,l[0]=t+i,void(l[1]=e+n);if(Va[0]=za(o)*i+t,Va[1]=Ra(o)*n+e,Ga[0]=za(a)*i+t,Ga[1]=Ra(a)*n+e,u(s,Va,Ga),h(l,Va,Ga),(o%=Ba)<0&&(o+=Ba),(a%=Ba)<0&&(a+=Ba),a<o&&!r?a+=Ba:o<a&&r&&(o+=Ba),r){var d=a;a=o,o=d}for(var f=0;f<a;f+=Math.PI/2)o<f&&(Fa[0]=za(f)*i+t,Fa[1]=Ra(f)*n+e,u(s,Fa,s),h(l,Fa,l))}var ja={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},qa=[],Ka=[],$a=[],Ja=[],Qa=Math.min,tr=Math.max,er=Math.cos,ir=Math.sin,nr=Math.sqrt,or=Math.abs,ar="undefined"!=typeof Float32Array,rr=function(t){this._saveData=!t,this._saveData&&(this.data=[]),this._ctx=null};function sr(t,e,i,n,o,a,r){if(0===o)return!1;var s=o,l=0;if(e+s<r&&n+s<r||r<e-s&&r<n-s||t+s<a&&i+s<a||a<t-s&&a<i-s)return!1;if(t===i)return Math.abs(a-t)<=s/2;var u=(l=(e-n)/(t-i))*a-r+(t*n-i*e)/(t-i);return u*u/(l*l+1)<=s/2*s/2}function lr(t,e,i,n,o,a,r,s,l,u,h){if(0===l)return!1;var c=l;return!(e+c<h&&n+c<h&&a+c<h&&s+c<h||h<e-c&&h<n-c&&h<a-c&&h<s-c||t+c<u&&i+c<u&&o+c<u&&r+c<u||u<t-c&&u<i-c&&u<o-c&&u<r-c)&&function(t,e,i,n,o,a,r,s,l,u,h){var c,d,f,p,g,m=.005,v=1/0;wa[0]=l,wa[1]=u;for(var y=0;y<1;y+=.05)ba[0]=Ta(t,i,o,r,y),ba[1]=Ta(e,n,a,s,y),(p=_t(wa,ba))<v&&(c=y,v=p);v=1/0;for(var x=0;x<32&&!(m<ya);x++)d=c-m,f=c+m,ba[0]=Ta(t,i,o,r,d),ba[1]=Ta(e,n,a,s,d),p=_t(ba,wa),0<=d&&p<v?(c=d,v=p):(Sa[0]=Ta(t,i,o,r,f),Sa[1]=Ta(e,n,a,s,f),g=_t(Sa,wa),f<=1&&g<v?(c=f,v=g):m*=.5);return h&&(h[0]=Ta(t,i,o,r,c),h[1]=Ta(e,n,a,s,c)),ma(v)}(t,e,i,n,o,a,r,s,u,h,null)<=c/2}function ur(t,e,i,n,o,a,r,s,l){if(0===r)return!1;var u=r;return!(e+u<l&&n+u<l&&a+u<l||l<e-u&&l<n-u&&l<a-u||t+u<s&&i+u<s&&o+u<s||s<t-u&&s<i-u&&s<o-u)&&function(t,e,i,n,o,a,r,s,l){var u,h=.005,c=1/0;wa[0]=r,wa[1]=s;for(var d=0;d<1;d+=.05){ba[0]=La(t,i,o,d),ba[1]=La(e,n,a,d),(m=_t(wa,ba))<c&&(u=d,c=m)}c=1/0;for(var f=0;f<32&&!(h<ya);f++){var p=u-h,g=u+h;ba[0]=La(t,i,o,p),ba[1]=La(e,n,a,p);var m=_t(ba,wa);if(0<=p&&m<c)u=p,c=m;else{Sa[0]=La(t,i,o,g),Sa[1]=La(e,n,a,g);var v=_t(Sa,wa);g<=1&&v<c?(u=g,c=v):h*=.5}}return l&&(l[0]=La(t,i,o,u),l[1]=La(e,n,a,u)),ma(c)}(t,e,i,n,o,a,s,l,null)<=u/2}rr.prototype={constructor:rr,_xi:0,_yi:0,_x0:0,_y0:0,_ux:0,_uy:0,_len:0,_lineDash:null,_dashOffset:0,_dashIdx:0,_dashSum:0,setScale:function(t,e,i){i=i||0,this._ux=or(i/pi/t)||0,this._uy=or(i/pi/e)||0},getContext:function(){return this._ctx},beginPath:function(t){return(this._ctx=t)&&t.beginPath(),t&&(this.dpr=t.dpr),this._saveData&&(this._len=0),this._lineDash&&(this._lineDash=null,this._dashOffset=0),this},moveTo:function(t,e){return this.addData(ja.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},lineTo:function(t,e){var i=or(t-this._xi)>this._ux||or(e-this._yi)>this._uy||this._len<5;return this.addData(ja.L,t,e),this._ctx&&i&&(this._needsDash()?this._dashedLineTo(t,e):this._ctx.lineTo(t,e)),i&&(this._xi=t,this._yi=e),this},bezierCurveTo:function(t,e,i,n,o,a){return this.addData(ja.C,t,e,i,n,o,a),this._ctx&&(this._needsDash()?this._dashedBezierTo(t,e,i,n,o,a):this._ctx.bezierCurveTo(t,e,i,n,o,a)),this._xi=o,this._yi=a,this},quadraticCurveTo:function(t,e,i,n){return this.addData(ja.Q,t,e,i,n),this._ctx&&(this._needsDash()?this._dashedQuadraticTo(t,e,i,n):this._ctx.quadraticCurveTo(t,e,i,n)),this._xi=i,this._yi=n,this},arc:function(t,e,i,n,o,a){return this.addData(ja.A,t,e,i,i,n,o-n,0,a?0:1),this._ctx&&this._ctx.arc(t,e,i,n,o,a),this._xi=er(o)*i+t,this._yi=ir(o)*i+e,this},arcTo:function(t,e,i,n,o){return this._ctx&&this._ctx.arcTo(t,e,i,n,o),this},rect:function(t,e,i,n){return this._ctx&&this._ctx.rect(t,e,i,n),this.addData(ja.R,t,e,i,n),this},closePath:function(){this.addData(ja.Z);var t=this._ctx,e=this._x0,i=this._y0;return t&&(this._needsDash()&&this._dashedLineTo(e,i),t.closePath()),this._xi=e,this._yi=i,this},fill:function(t){t&&t.fill(),this.toStatic()},stroke:function(t){t&&t.stroke(),this.toStatic()},setLineDash:function(t){if(t instanceof Array){this._lineDash=t;for(var e=this._dashIdx=0,i=0;i<t.length;i++)e+=t[i];this._dashSum=e}return this},setLineDashOffset:function(t){return this._dashOffset=t,this},len:function(){return this._len},setData:function(t){var e=t.length;this.data&&this.data.length===e||!ar||(this.data=new Float32Array(e));for(var i=0;i<e;i++)this.data[i]=t[i];this._len=e},appendPath:function(t){t instanceof Array||(t=[t]);for(var e=t.length,i=0,n=this._len,o=0;o<e;o++)i+=t[o].len();ar&&this.data instanceof Float32Array&&(this.data=new Float32Array(n+i));for(o=0;o<e;o++)for(var a=t[o].data,r=0;r<a.length;r++)this.data[n++]=a[r];this._len=n},addData:function(t){if(this._saveData){var e=this.data;this._len+arguments.length>e.length&&(this._expandData(),e=this.data);for(var i=0;i<arguments.length;i++)e[this._len++]=arguments[i];this._prevCmd=t}},_expandData:function(){if(!(this.data instanceof Array)){for(var t=[],e=0;e<this._len;e++)t[e]=this.data[e];this.data=t}},_needsDash:function(){return this._lineDash},_dashedLineTo:function(t,e){var i,n,o=this._dashSum,a=this._dashOffset,r=this._lineDash,s=this._ctx,l=this._xi,u=this._yi,h=t-l,c=e-u,d=nr(h*h+c*c),f=l,p=u,g=r.length;for(a<0&&(a=o+a),f-=(a%=o)*(h/=d),p-=a*(c/=d);0<h&&f<=t||h<0&&t<=f||0===h&&(0<c&&p<=e||c<0&&e<=p);)f+=h*(i=r[n=this._dashIdx]),p+=c*i,this._dashIdx=(n+1)%g,0<h&&f<l||h<0&&l<f||0<c&&p<u||c<0&&u<p||s[n%2?"moveTo":"lineTo"](0<=h?Qa(f,t):tr(f,t),0<=c?Qa(p,e):tr(p,e));h=f-t,c=p-e,this._dashOffset=-nr(h*h+c*c)},_dashedBezierTo:function(t,e,i,n,o,a){var r,s,l,u,h,c=this._dashSum,d=this._dashOffset,f=this._lineDash,p=this._ctx,g=this._xi,m=this._yi,v=Ta,y=0,x=this._dashIdx,_=f.length,w=0;for(d<0&&(d=c+d),d%=c,r=0;r<1;r+=.1)s=v(g,t,i,o,r+.1)-v(g,t,i,o,r),l=v(m,e,n,a,r+.1)-v(m,e,n,a,r),y+=nr(s*s+l*l);for(;x<_&&!(d<(w+=f[x]));x++);for(r=(w-d)/y;r<=1;)u=v(g,t,i,o,r),h=v(m,e,n,a,r),x%2?p.moveTo(u,h):p.lineTo(u,h),r+=f[x]/y,x=(x+1)%_;x%2!=0&&p.lineTo(o,a),s=o-u,l=a-h,this._dashOffset=-nr(s*s+l*l)},_dashedQuadraticTo:function(t,e,i,n){var o=i,a=n;i=(i+2*t)/3,n=(n+2*e)/3,t=(this._xi+2*t)/3,e=(this._yi+2*e)/3,this._dashedBezierTo(t,e,i,n,o,a)},toStatic:function(){var t=this.data;t instanceof Array&&(t.length=this._len,ar&&(this.data=new Float32Array(t)))},getBoundingRect:function(){qa[0]=qa[1]=$a[0]=$a[1]=Number.MAX_VALUE,Ka[0]=Ka[1]=Ja[0]=Ja[1]=-Number.MAX_VALUE;for(var t,e,i,n,o,a,r,s,l,u,h,c,d,f,p=this.data,g=0,m=0,v=0,y=0,x=0;x<p.length;){var _=p[x++];switch(1===x&&(v=g=p[x],y=m=p[x+1]),_){case ja.M:g=v=p[x++],m=y=p[x++],$a[0]=v,$a[1]=y,Ja[0]=v,Ja[1]=y;break;case ja.L:Ha(g,m,p[x],p[x+1],$a,Ja),g=p[x++],m=p[x++];break;case ja.C:Xa(g,m,p[x++],p[x++],p[x++],p[x++],p[x],p[x+1],$a,Ja),g=p[x++],m=p[x++];break;case ja.Q:t=g,e=m,i=p[x++],n=p[x++],o=p[x],a=p[x+1],r=$a,s=Ja,u=l=void 0,u=La,h=Ea(Oa((l=Pa)(t,i,o),1),0),c=Ea(Oa(l(e,n,a),1),0),d=u(t,i,o,h),f=u(e,n,a,c),r[0]=Oa(t,o,d),r[1]=Oa(e,a,f),s[0]=Ea(t,o,d),s[1]=Ea(e,a,f),g=p[x++],m=p[x++];break;case ja.A:var w=p[x++],b=p[x++],S=p[x++],M=p[x++],I=p[x++],T=p[x++]+I;x+=1;var A=1-p[x++];1===x&&(v=er(I)*S+w,y=ir(I)*M+b),Ya(w,b,S,M,I,T,A,$a,Ja),g=er(T)*S+w,m=ir(T)*M+b;break;case ja.R:Ha(v=g=p[x++],y=m=p[x++],v+p[x++],y+p[x++],$a,Ja);break;case ja.Z:g=v,m=y}St(qa,qa,$a),Mt(Ka,Ka,Ja)}return 0===x&&(qa[0]=qa[1]=Ka[0]=Ka[1]=0),new Di(qa[0],qa[1],Ka[0]-qa[0],Ka[1]-qa[1])},rebuildPath:function(t){for(var e,i,n,o,a,r,s=this.data,l=this._ux,u=this._uy,h=this._len,c=0;c<h;){var d=s[c++];switch(1===c&&(e=n=s[c],i=o=s[c+1]),d){case ja.M:e=n=s[c++],i=o=s[c++],t.moveTo(n,o);break;case ja.L:a=s[c++],r=s[c++],(or(a-n)>l||or(r-o)>u||c===h-1)&&(t.lineTo(a,r),n=a,o=r);break;case ja.C:t.bezierCurveTo(s[c++],s[c++],s[c++],s[c++],s[c++],s[c++]),n=s[c-2],o=s[c-1];break;case ja.Q:t.quadraticCurveTo(s[c++],s[c++],s[c++],s[c++]),n=s[c-2],o=s[c-1];break;case ja.A:var f=s[c++],p=s[c++],g=s[c++],m=s[c++],v=s[c++],y=s[c++],x=s[c++],_=s[c++],w=m<g?g:m,b=m<g?1:g/m,S=m<g?m/g:1,M=v+y;.001<Math.abs(g-m)?(t.translate(f,p),t.rotate(x),t.scale(b,S),t.arc(0,0,w,v,M,1-_),t.scale(1/b,1/S),t.rotate(-x),t.translate(-f,-p)):t.arc(f,p,w,v,M,1-_),1===c&&(e=er(v)*g+f,i=ir(v)*m+p),n=er(M)*g+f,o=ir(M)*m+p;break;case ja.R:e=n=s[c],i=o=s[c+1],t.rect(s[c++],s[c++],s[c++],s[c++]);break;case ja.Z:t.closePath(),n=e,o=i}}}},rr.CMD=ja;var hr=2*Math.PI;function cr(t){return(t%=hr)<0&&(t+=hr),t}var dr=2*Math.PI;function fr(t,e,i,n,o,a,r,s,l){if(0===r)return!1;var u=r;s-=t,l-=e;var h=Math.sqrt(s*s+l*l);if(i<h-u||h+u<i)return!1;if(Math.abs(n-o)%dr<1e-4)return!0;if(a){var c=n;n=cr(o),o=cr(c)}else n=cr(n),o=cr(o);o<n&&(o+=dr);var d=Math.atan2(l,s);return d<0&&(d+=dr),n<=d&&d<=o||n<=d+dr&&d+dr<=o}function pr(t,e,i,n,o,a){if(e<a&&n<a||a<e&&a<n)return 0;if(n===e)return 0;var r=n<e?1:-1,s=(a-e)/(n-e);1!=s&&0!=s||(r=n<e?.5:-.5);var l=s*(i-t)+t;return l===o?1/0:o<l?r:0}var gr=rr.CMD,mr=2*Math.PI,vr=1e-4;var yr=[-1,-1,-1],xr=[-1,-1];function _r(t,e,i,n,o,a,r,s,l,u){if(e<u&&n<u&&a<u&&s<u||u<e&&u<n&&u<a&&u<s)return 0;var h,c=function(t,e,i,n,o,a){var r=n+3*(e-i)-t,s=3*(i-2*e+t),l=3*(e-t),u=t-o,h=s*s-3*r*l,c=s*l-9*r*u,d=l*l-3*s*u,f=0;if(Ma(h)&&Ma(c)){if(Ma(s))a[0]=0;else 0<=(M=-l/s)&&M<=1&&(a[f++]=M)}else{var p=c*c-4*h*d;if(Ma(p)){var g=c/h,m=-g/2;0<=(M=-s/r+g)&&M<=1&&(a[f++]=M),0<=m&&m<=1&&(a[f++]=m)}else if(0<p){var v=ma(p),y=h*s+1.5*r*(-c+v),x=h*s+1.5*r*(-c-v);0<=(M=(-s-((y=y<0?-ga(-y,_a):ga(y,_a))+(x=x<0?-ga(-x,_a):ga(x,_a))))/(3*r))&&M<=1&&(a[f++]=M)}else{var _=(2*h*s-3*r*c)/(2*ma(h*h*h)),w=Math.acos(_)/3,b=ma(h),S=Math.cos(w),M=(-s-2*b*S)/(3*r),I=(m=(-s+b*(S+xa*Math.sin(w)))/(3*r),(-s+b*(S-xa*Math.sin(w)))/(3*r));0<=M&&M<=1&&(a[f++]=M),0<=m&&m<=1&&(a[f++]=m),0<=I&&I<=1&&(a[f++]=I)}}return f}(e,n,a,s,u,yr);if(0===c)return 0;for(var d,f,p=0,g=-1,m=0;m<c;m++){var v=yr[m],y=0===v||1===v?.5:1;Ta(t,i,o,r,v)<l||(g<0&&(g=Da(e,n,a,s,xr),xr[1]<xr[0]&&1<g&&(void 0,h=xr[0],xr[0]=xr[1],xr[1]=h),d=Ta(e,n,a,s,xr[0]),1<g&&(f=Ta(e,n,a,s,xr[1]))),2===g?v<xr[0]?p+=d<e?y:-y:v<xr[1]?p+=f<d?y:-y:p+=s<f?y:-y:v<xr[0]?p+=d<e?y:-y:p+=s<d?y:-y)}return p}function wr(t,e,i,n,o,a,r,s){if(e<s&&n<s&&a<s||s<e&&s<n&&s<a)return 0;var l=function(t,e,i,n,o){var a=t-2*e+i,r=2*(e-t),s=t-n,l=0;if(Ma(a)){if(Ia(r))0<=(h=-s/r)&&h<=1&&(o[l++]=h)}else{var u=r*r-4*a*s;if(Ma(u))0<=(h=-r/(2*a))&&h<=1&&(o[l++]=h);else if(0<u){var h,c=ma(u),d=(-r-c)/(2*a);0<=(h=(-r+c)/(2*a))&&h<=1&&(o[l++]=h),0<=d&&d<=1&&(o[l++]=d)}}return l}(e,n,a,s,yr);if(0===l)return 0;var u=Pa(e,n,a);if(0<=u&&u<=1){for(var h=0,c=La(e,n,a,u),d=0;d<l;d++){var f=0===yr[d]||1===yr[d]?.5:1;La(t,i,o,yr[d])<r||(yr[d]<u?h+=c<e?f:-f:h+=a<c?f:-f)}return h}f=0===yr[0]||1===yr[0]?.5:1;return La(t,i,o,yr[0])<r?0:a<e?f:-f}function br(t,e,i,n,o,a,r,s){if(i<(s-=e)||s<-i)return 0;var l=Math.sqrt(i*i-s*s);yr[0]=-l,yr[1]=l;var u=Math.abs(n-o);if(u<1e-4)return 0;if(u%mr<1e-4){o=mr;var h=a?1:-1;return r>=yr[n=0]+t&&r<=yr[1]+t?h:0}if(a){l=n;n=cr(o),o=cr(l)}else n=cr(n),o=cr(o);o<n&&(o+=mr);for(var c=0,d=0;d<2;d++){var f=yr[d];if(r<f+t){var p=Math.atan2(s,f);h=a?1:-1;p<0&&(p=mr+p),(n<=p&&p<=o||n<=p+mr&&p+mr<=o)&&(p>Math.PI/2&&p<1.5*Math.PI&&(h=-h),c+=h)}}return c}function Sr(t,e,i,n,o){for(var a=0,r=0,s=0,l=0,u=0,h=0;h<t.length;){var c=t[h++];switch(c===gr.M&&1<h&&(i||(a+=pr(r,s,l,u,n,o))),1===h&&(l=r=t[h],u=s=t[h+1]),c){case gr.M:r=l=t[h++],s=u=t[h++];break;case gr.L:if(i){if(sr(r,s,t[h],t[h+1],e,n,o))return!0}else a+=pr(r,s,t[h],t[h+1],n,o)||0;r=t[h++],s=t[h++];break;case gr.C:if(i){if(lr(r,s,t[h++],t[h++],t[h++],t[h++],t[h],t[h+1],e,n,o))return!0}else a+=_r(r,s,t[h++],t[h++],t[h++],t[h++],t[h],t[h+1],n,o)||0;r=t[h++],s=t[h++];break;case gr.Q:if(i){if(ur(r,s,t[h++],t[h++],t[h],t[h+1],e,n,o))return!0}else a+=wr(r,s,t[h++],t[h++],t[h],t[h+1],n,o)||0;r=t[h++],s=t[h++];break;case gr.A:var d=t[h++],f=t[h++],p=t[h++],g=t[h++],m=t[h++],v=t[h++];h+=1;var y=1-t[h++],x=Math.cos(m)*p+d,_=Math.sin(m)*g+f;1<h?a+=pr(r,s,x,_,n,o):(l=x,u=_);var w=(n-d)*g/p+d;if(i){if(fr(d,f,g,m,m+v,y,e,w,o))return!0}else a+=br(d,f,g,m,m+v,y,w,o);r=Math.cos(m+v)*p+d,s=Math.sin(m+v)*g+f;break;case gr.R:l=r=t[h++],u=s=t[h++];x=l+t[h++],_=u+t[h++];if(i){if(sr(l,u,x,u,e,n,o)||sr(x,u,x,_,e,n,o)||sr(x,_,l,_,e,n,o)||sr(l,_,l,u,e,n,o))return!0}else a+=pr(x,u,x,_,n,o),a+=pr(l,_,l,u,n,o);break;case gr.Z:if(i){if(sr(r,s,l,u,e,n,o))return!0}else a+=pr(r,s,l,u,n,o);r=l,s=u}}return i||function(t,e){return Math.abs(t-e)<vr}(s,u)||(a+=pr(r,s,l,u,n,o)||0),0!==a}var Mr=$i.prototype.getCanvasPattern,Ir=Math.abs,Tr=new rr(!0);function Ar(t){Jn.call(this,t),this.path=null}Ar.prototype={constructor:Ar,type:"path",__dirtyPath:!0,strokeContainThreshold:5,segmentIgnoreThreshold:0,subPixelOptimize:!1,brush:function(t,e){var i,n=this.style,o=this.path||Tr,a=n.hasStroke(),r=n.hasFill(),s=n.fill,l=n.stroke,u=r&&!!s.colorStops,h=a&&!!l.colorStops,c=r&&!!s.image,d=a&&!!l.image;n.bind(t,this,e),this.setTransform(t),this.__dirty&&(u&&(i=i||this.getBoundingRect(),this._fillGradient=n.getGradient(t,s,i)),h&&(i=i||this.getBoundingRect(),this._strokeGradient=n.getGradient(t,l,i)));u?t.fillStyle=this._fillGradient:c&&(t.fillStyle=Mr.call(s,t)),h?t.strokeStyle=this._strokeGradient:d&&(t.strokeStyle=Mr.call(l,t));var f=n.lineDash,p=n.lineDashOffset,g=!!t.setLineDash,m=this.getGlobalScale();if(o.setScale(m[0],m[1],this.segmentIgnoreThreshold),this.__dirtyPath||f&&!g&&a?(o.beginPath(t),f&&!g&&(o.setLineDash(f),o.setLineDashOffset(p)),this.buildPath(o,this.shape,!1),this.path&&(this.__dirtyPath=!1)):(t.beginPath(),this.path.rebuildPath(t)),r)if(null!=n.fillOpacity){var v=t.globalAlpha;t.globalAlpha=n.fillOpacity*n.opacity,o.fill(t),t.globalAlpha=v}else o.fill(t);if(f&&g&&(t.setLineDash(f),t.lineDashOffset=p),a)if(null!=n.strokeOpacity){v=t.globalAlpha;t.globalAlpha=n.strokeOpacity*n.opacity,o.stroke(t),t.globalAlpha=v}else o.stroke(t);f&&g&&t.setLineDash([]),null!=n.text&&(this.restoreTransform(t),this.drawRectText(t,this.getBoundingRect()))},buildPath:function(t,e,i){},createPathProxy:function(){this.path=new rr},getBoundingRect:function(){var t=this._rect,e=this.style,i=!t;if(i){var n=this.path;n=n||(this.path=new rr),this.__dirtyPath&&(n.beginPath(),this.buildPath(n,this.shape,!1)),t=n.getBoundingRect()}if(this._rect=t,e.hasStroke()){var o=this._rectWithStroke||(this._rectWithStroke=t.clone());if(this.__dirty||i){o.copy(t);var a=e.lineWidth,r=e.strokeNoScale?this.getLineScale():1;e.hasFill()||(a=Math.max(a,this.strokeContainThreshold||4)),1e-10<r&&(o.width+=a/r,o.height+=a/r,o.x-=a/r/2,o.y-=a/r/2)}return o}return t},contain:function(t,e){var i=this.transformCoordToLocal(t,e),n=this.getBoundingRect(),o=this.style;if(t=i[0],e=i[1],n.contain(t,e)){var a=this.path.data;if(o.hasStroke()){var r=o.lineWidth,s=o.strokeNoScale?this.getLineScale():1;if(1e-10<s&&(o.hasFill()||(r=Math.max(r,this.strokeContainThreshold)),function(t,e,i,n){return Sr(t,e,!0,i,n)}(a,r/s,t,e)))return!0}if(o.hasFill())return function(t,e,i){return Sr(t,0,!1,e,i)}(a,t,e)}return!1},dirty:function(t){null==t&&(t=!0),t&&(this.__dirtyPath=t,this._rect=null),this.__dirty=this.__dirtyText=!0,this.__zr&&this.__zr.refresh(),this.__clipTarget&&this.__clipTarget.dirty()},animateShape:function(t){return this.animate("shape",t)},attrKV:function(t,e){"shape"===t?(this.setShape(e),this.__dirtyPath=!0,this._rect=null):Jn.prototype.attrKV.call(this,t,e)},setShape:function(t,e){var i=this.shape;if(i){if(z(t))for(var n in t)t.hasOwnProperty(n)&&(i[n]=t[n]);else i[t]=e;this.dirty(!0)}return this},getLineScale:function(){var t=this.transform;return t&&1e-10<Ir(t[0]-1)&&1e-10<Ir(t[3]-1)?Math.sqrt(Ir(t[0]*t[3]-t[2]*t[1])):1}},Ar.extend=function(o){function t(t){Ar.call(this,t),o.style&&this.style.extendFrom(o.style,!1);var e=o.shape;if(e){this.shape=this.shape||{};var i=this.shape;for(var n in e)!i.hasOwnProperty(n)&&e.hasOwnProperty(n)&&(i[n]=e[n])}o.init&&o.init.call(this,t)}for(var e in w(t,Ar),o)"style"!==e&&"shape"!==e&&(t.prototype[e]=o[e]);return t},w(Ar,Jn);function Dr(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}var Cr=rr.CMD,Lr=[[],[],[]],kr=Math.sqrt,Pr=Math.atan2,Nr=function(t,e){var i,n,o,a,r,s=t.data,l=Cr.M,u=Cr.C,h=Cr.L,c=Cr.R,d=Cr.A,f=Cr.Q;for(a=o=0;o<s.length;){switch(i=s[o++],a=o,n=0,i){case l:case h:n=1;break;case u:n=3;break;case f:n=2;break;case d:var p=e[4],g=e[5],m=kr(e[0]*e[0]+e[1]*e[1]),v=kr(e[2]*e[2]+e[3]*e[3]),y=Pr(-e[1]/v,e[0]/m);s[o]*=m,s[o++]+=p,s[o]*=v,s[o++]+=g,s[o++]*=m,s[o++]*=v,s[o++]+=y,s[o++]+=y,a=o+=2;break;case c:x[0]=s[o++],x[1]=s[o++],bt(x,x,e),s[a++]=x[0],s[a++]=x[1],x[0]+=s[o++],x[1]+=s[o++],bt(x,x,e),s[a++]=x[0],s[a++]=x[1]}for(r=0;r<n;r++){var x;(x=Lr[r])[0]=s[o++],x[1]=s[o++],bt(x,x,e),s[a++]=x[0],s[a++]=x[1]}}},Or=Math.sqrt,Er=Math.sin,Rr=Math.cos,zr=Math.PI,Br=function(t,e){return(t[0]*e[0]+t[1]*e[1])/(Dr(t)*Dr(e))},Vr=function(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(Br(t,e))};function Gr(t,e,i,n,o,a,r,s,l,u,h){var c=l*(zr/180),d=Rr(c)*(t-i)/2+Er(c)*(e-n)/2,f=-1*Er(c)*(t-i)/2+Rr(c)*(e-n)/2,p=d*d/(r*r)+f*f/(s*s);1<p&&(r*=Or(p),s*=Or(p));var g=(o===a?-1:1)*Or((r*r*(s*s)-r*r*(f*f)-s*s*(d*d))/(r*r*(f*f)+s*s*(d*d)))||0,m=g*r*f/s,v=g*-s*d/r,y=(t+i)/2+Rr(c)*m-Er(c)*v,x=(e+n)/2+Er(c)*m+Rr(c)*v,_=Vr([1,0],[(d-m)/r,(f-v)/s]),w=[(d-m)/r,(f-v)/s],b=[(-1*d-m)/r,(-1*f-v)/s],S=Vr(w,b);Br(w,b)<=-1&&(S=zr),1<=Br(w,b)&&(S=0),0===a&&0<S&&(S-=2*zr),1===a&&S<0&&(S+=2*zr),h.addData(u,y,x,r,s,_,S,c,a)}var Fr=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,Wr=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function Hr(t,e){var i=function(t){if(!t)return new rr;for(var e,i=0,n=0,o=i,a=n,r=new rr,s=rr.CMD,l=t.match(Fr),u=0;u<l.length;u++){for(var h,c=l[u],d=c.charAt(0),f=c.match(Wr)||[],p=f.length,g=0;g<p;g++)f[g]=parseFloat(f[g]);for(var m=0;m<p;){var v,y,x,_,w,b,S,M=i,I=n;switch(d){case"l":i+=f[m++],n+=f[m++],h=s.L,r.addData(h,i,n);break;case"L":i=f[m++],n=f[m++],h=s.L,r.addData(h,i,n);break;case"m":i+=f[m++],n+=f[m++],h=s.M,r.addData(h,i,n),o=i,a=n,d="l";break;case"M":i=f[m++],n=f[m++],h=s.M,r.addData(h,i,n),o=i,a=n,d="L";break;case"h":i+=f[m++],h=s.L,r.addData(h,i,n);break;case"H":i=f[m++],h=s.L,r.addData(h,i,n);break;case"v":n+=f[m++],h=s.L,r.addData(h,i,n);break;case"V":n=f[m++],h=s.L,r.addData(h,i,n);break;case"C":h=s.C,r.addData(h,f[m++],f[m++],f[m++],f[m++],f[m++],f[m++]),i=f[m-2],n=f[m-1];break;case"c":h=s.C,r.addData(h,f[m++]+i,f[m++]+n,f[m++]+i,f[m++]+n,f[m++]+i,f[m++]+n),i+=f[m-2],n+=f[m-1];break;case"S":v=i,y=n;var T=r.len(),A=r.data;e===s.C&&(v+=i-A[T-4],y+=n-A[T-3]),h=s.C,M=f[m++],I=f[m++],i=f[m++],n=f[m++],r.addData(h,v,y,M,I,i,n);break;case"s":v=i,y=n;T=r.len(),A=r.data;e===s.C&&(v+=i-A[T-4],y+=n-A[T-3]),h=s.C,M=i+f[m++],I=n+f[m++],i+=f[m++],n+=f[m++],r.addData(h,v,y,M,I,i,n);break;case"Q":M=f[m++],I=f[m++],i=f[m++],n=f[m++],h=s.Q,r.addData(h,M,I,i,n);break;case"q":M=f[m++]+i,I=f[m++]+n,i+=f[m++],n+=f[m++],h=s.Q,r.addData(h,M,I,i,n);break;case"T":v=i,y=n;T=r.len(),A=r.data;e===s.Q&&(v+=i-A[T-4],y+=n-A[T-3]),i=f[m++],n=f[m++],h=s.Q,r.addData(h,v,y,i,n);break;case"t":v=i,y=n;T=r.len(),A=r.data;e===s.Q&&(v+=i-A[T-4],y+=n-A[T-3]),i+=f[m++],n+=f[m++],h=s.Q,r.addData(h,v,y,i,n);break;case"A":x=f[m++],_=f[m++],w=f[m++],b=f[m++],S=f[m++],Gr(M=i,I=n,i=f[m++],n=f[m++],b,S,x,_,w,h=s.A,r);break;case"a":x=f[m++],_=f[m++],w=f[m++],b=f[m++],S=f[m++],Gr(M=i,I=n,i+=f[m++],n+=f[m++],b,S,x,_,w,h=s.A,r)}}"z"!==d&&"Z"!==d||(h=s.Z,r.addData(h),i=o,n=a),e=h}return r.toStatic(),r}(t);return(e=e||{}).buildPath=function(t){if(t.setData){t.setData(i.data),(e=t.getContext())&&t.rebuildPath(e)}else{var e=t;i.rebuildPath(e)}},e.applyTransform=function(t){Nr(i,t),this.dirty(!0)},e}function Zr(t,e){return new Ar(Hr(t,e))}var Ur=function(t){Jn.call(this,t)};Ur.prototype={constructor:Ur,type:"text",brush:function(t,e){var i=this.style;this.__dirty&&En(i),i.fill=i.stroke=i.shadowBlur=i.shadowColor=i.shadowOffsetX=i.shadowOffsetY=null;var n=i.text;null!=n&&(n+=""),qn(n,i)?(this.setTransform(t),zn(this,t,n,i,null,e),this.restoreTransform(t)):t.__attrCachedBy=Wi.NONE},getBoundingRect:function(){var t=this.style;if(this.__dirty&&En(t),!this._rect){var e=t.text;null!=e?e+="":e="";var i=gn(t.text+"",t.font,t.textAlign,t.textVerticalAlign,t.textPadding,t.textLineHeight,t.rich);if(i.x+=t.x||0,i.y+=t.y||0,Un(t.textStroke,t.textStrokeWidth)){var n=t.textStrokeWidth;i.x-=n/2,i.y-=n/2,i.width+=n,i.height+=n}this._rect=i}return this._rect}},w(Ur,Jn);function Xr(l){return v.browser.ie&&11<=v.browser.version?function(){var t,e=this.__clipPaths,i=this.style;if(e)for(var n=0;n<e.length;n++){var o=e[n],a=o&&o.shape,r=o&&o.type;if(a&&("sector"===r&&a.startAngle===a.endAngle||"rect"===r&&(!a.width||!a.height))){for(var s=0;s<jr.length;s++)jr[s][2]=i[jr[s][0]],i[jr[s][0]]=jr[s][1];t=!0;break}}if(l.apply(this,arguments),t)for(s=0;s<jr.length;s++)i[jr[s][0]]=jr[s][2]}:l}var Yr=Ar.extend({type:"circle",shape:{cx:0,cy:0,r:0},buildPath:function(t,e,i){i&&t.moveTo(e.cx+e.r,e.cy),t.arc(e.cx,e.cy,e.r,0,2*Math.PI,!0)}}),jr=[["shadowBlur",0],["shadowColor","#000"],["shadowOffsetX",0],["shadowOffsetY",0]],qr=Ar.extend({type:"sector",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},brush:Xr(Ar.prototype.brush),buildPath:function(t,e){var i=e.cx,n=e.cy,o=Math.max(e.r0||0,0),a=Math.max(e.r,0),r=e.startAngle,s=e.endAngle,l=e.clockwise,u=Math.cos(r),h=Math.sin(r);t.moveTo(u*o+i,h*o+n),t.lineTo(u*a+i,h*a+n),t.arc(i,n,a,r,s,!l),t.lineTo(Math.cos(s)*o+i,Math.sin(s)*o+n),0!==o&&t.arc(i,n,o,s,r,l),t.closePath()}}),Kr=Ar.extend({type:"ring",shape:{cx:0,cy:0,r:0,r0:0},buildPath:function(t,e){var i=e.cx,n=e.cy,o=2*Math.PI;t.moveTo(i+e.r,n),t.arc(i,n,e.r,0,o,!1),t.moveTo(i+e.r0,n),t.arc(i,n,e.r0,0,o,!0)}});function $r(t,e,i,n,o,a,r){var s=.5*(i-t),l=.5*(n-e);return(2*(e-i)+s+l)*r+(-3*(e-i)-2*s-l)*a+s*o+e}function Jr(t,e,i){var n=e.points,o=e.smooth;if(n&&2<=n.length){if(o&&"spline"!==o){var a=function(t,e,i,n){var o,a,r,s,l=[],u=[],h=[],c=[];if(n){r=[1/0,1/0],s=[-1/0,-1/0];for(var d=0,f=t.length;d<f;d++)St(r,r,t[d]),Mt(s,s,t[d]);St(r,r,n[0]),Mt(s,s,n[1])}for(d=0,f=t.length;d<f;d++){var p=t[d];if(i)o=t[d?d-1:f-1],a=t[(d+1)%f];else{if(0===d||d===f-1){l.push(rt(t[d]));continue}o=t[d-1],a=t[d+1]}ht(u,a,o),gt(u,u,e);var g=vt(p,o),m=vt(p,a),v=g+m;0!==v&&(g/=v,m/=v),gt(h,u,-g),gt(c,u,m);var y=lt([],p,h),x=lt([],p,c);n&&(Mt(y,y,r),St(y,y,s),Mt(x,x,r),St(x,x,s)),l.push(y),l.push(x)}return i&&l.push(l.shift()),l}(n,o,i,e.smoothConstraint);t.moveTo(n[0][0],n[0][1]);for(var r=n.length,s=0;s<(i?r:r-1);s++){var l=a[2*s],u=a[2*s+1],h=n[(s+1)%r];t.bezierCurveTo(l[0],l[1],u[0],u[1],h[0],h[1])}}else{"spline"===o&&(n=function(t,e){for(var i=t.length,n=[],o=0,a=1;a<i;a++)o+=vt(t[a-1],t[a]);var r=o/2;r=r<i?i:r;for(a=0;a<r;a++){var s,l,u,h=a/(r-1)*(e?i:i-1),c=Math.floor(h),d=h-c,f=t[c%i];u=e?(s=t[(c-1+i)%i],l=t[(c+1)%i],t[(c+2)%i]):(s=t[0===c?c:c-1],l=t[i-2<c?i-1:c+1],t[i-3<c?i-1:c+2]);var p=d*d,g=d*p;n.push([$r(s[0],f[0],l[0],u[0],d,p,g),$r(s[1],f[1],l[1],u[1],d,p,g)])}return n}(n,i)),t.moveTo(n[0][0],n[0][1]);s=1;for(var c=n.length;s<c;s++)t.lineTo(n[s][0],n[s][1])}i&&t.closePath()}}var Qr=Ar.extend({type:"polygon",shape:{points:null,smooth:!1,smoothConstraint:null},buildPath:function(t,e){Jr(t,e,!0)}}),ts=Ar.extend({type:"polyline",shape:{points:null,smooth:!1,smoothConstraint:null},style:{stroke:"#000",fill:null},buildPath:function(t,e){Jr(t,e,!1)}}),es=Math.round;function is(t,e,i){if(e){var n=e.x1,o=e.x2,a=e.y1,r=e.y2;t.x1=n,t.x2=o,t.y1=a,t.y2=r;var s=i&&i.lineWidth;s&&(es(2*n)===es(2*o)&&(t.x1=t.x2=os(n,s,!0)),es(2*a)===es(2*r)&&(t.y1=t.y2=os(a,s,!0)))}}function ns(t,e,i){if(e){var n=e.x,o=e.y,a=e.width,r=e.height;t.x=n,t.y=o,t.width=a,t.height=r;var s=i&&i.lineWidth;s&&(t.x=os(n,s,!0),t.y=os(o,s,!0),t.width=Math.max(os(n+a,s,!1)-t.x,0===a?0:1),t.height=Math.max(os(o+r,s,!1)-t.y,0===r?0:1))}}function os(t,e,i){if(!e)return t;var n=es(2*t);return(n+es(e))%2==0?n/2:(n+(i?1:-1))/2}var as={},rs=Ar.extend({type:"rect",shape:{r:0,x:0,y:0,width:0,height:0},buildPath:function(t,e){var i,n,o,a;this.subPixelOptimize?(ns(as,e,this.style),i=as.x,n=as.y,o=as.width,a=as.height,as.r=e.r,e=as):(i=e.x,n=e.y,o=e.width,a=e.height),e.r?Dn(t,e):t.rect(i,n,o,a),t.closePath()}}),ss={},ls=Ar.extend({type:"line",shape:{x1:0,y1:0,x2:0,y2:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(t,e){var i,n,o,a;a=this.subPixelOptimize?(is(ss,e,this.style),i=ss.x1,n=ss.y1,o=ss.x2,ss.y2):(i=e.x1,n=e.y1,o=e.x2,e.y2);var r=e.percent;0!==r&&(t.moveTo(i,n),r<1&&(o=i*(1-r)+o*r,a=n*(1-r)+a*r),t.lineTo(o,a))},pointAt:function(t){var e=this.shape;return[e.x1*(1-t)+e.x2*t,e.y1*(1-t)+e.y2*t]}}),us=[];function hs(t,e,i){var n=t.cpx2,o=t.cpy2;return null===n||null===o?[(i?Aa:Ta)(t.x1,t.cpx1,t.cpx2,t.x2,e),(i?Aa:Ta)(t.y1,t.cpy1,t.cpy2,t.y2,e)]:[(i?ka:La)(t.x1,t.cpx1,t.x2,e),(i?ka:La)(t.y1,t.cpy1,t.y2,e)]}function cs(t){this.colorStops=t||[]}var ds=Ar.extend({type:"bezier-curve",shape:{x1:0,y1:0,x2:0,y2:0,cpx1:0,cpy1:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(t,e){var i=e.x1,n=e.y1,o=e.x2,a=e.y2,r=e.cpx1,s=e.cpy1,l=e.cpx2,u=e.cpy2,h=e.percent;0!==h&&(t.moveTo(i,n),null==l||null==u?(h<1&&(Na(i,r,o,h,us),r=us[1],o=us[2],Na(n,s,a,h,us),s=us[1],a=us[2]),t.quadraticCurveTo(r,s,o,a)):(h<1&&(Ca(i,r,l,o,h,us),r=us[1],l=us[2],o=us[3],Ca(n,s,u,a,h,us),s=us[1],u=us[2],a=us[3]),t.bezierCurveTo(r,s,l,u,o,a)))},pointAt:function(t){return hs(this.shape,t,!1)},tangentAt:function(t){var e=hs(this.shape,t,!0);return mt(e,e)}}),fs=Ar.extend({type:"arc",shape:{cx:0,cy:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},style:{stroke:"#000",fill:null},buildPath:function(t,e){var i=e.cx,n=e.cy,o=Math.max(e.r,0),a=e.startAngle,r=e.endAngle,s=e.clockwise,l=Math.cos(a),u=Math.sin(a);t.moveTo(l*o+i,u*o+n),t.arc(i,n,o,a,r,!s)}}),ps=Ar.extend({type:"compound",shape:{paths:null},_updatePathDirty:function(){for(var t=this.__dirtyPath,e=this.shape.paths,i=0;i<e.length;i++)t=t||e[i].__dirtyPath;this.__dirtyPath=t,this.__dirty=this.__dirty||t},beforeBrush:function(){this._updatePathDirty();for(var t=this.shape.paths||[],e=this.getGlobalScale(),i=0;i<t.length;i++)t[i].path||t[i].createPathProxy(),t[i].path.setScale(e[0],e[1],t[i].segmentIgnoreThreshold)},buildPath:function(t,e){for(var i=e.paths||[],n=0;n<i.length;n++)i[n].buildPath(t,i[n].shape,!0)},afterBrush:function(){for(var t=this.shape.paths||[],e=0;e<t.length;e++)t[e].__dirtyPath=!1},getBoundingRect:function(){return this._updatePathDirty(),Ar.prototype.getBoundingRect.call(this)}});cs.prototype={constructor:cs,addColorStop:function(t,e){this.colorStops.push({offset:t,color:e})}};function gs(t,e,i,n,o,a){this.x=null==t?0:t,this.y=null==e?0:e,this.x2=null==i?1:i,this.y2=null==n?0:n,this.type="linear",this.global=a||!1,cs.call(this,o)}gs.prototype={constructor:gs},w(gs,cs);function ms(t,e,i,n,o){this.x=null==t?.5:t,this.y=null==e?.5:e,this.r=null==i?.5:i,this.type="radial",this.global=o||!1,cs.call(this,n)}function vs(t){Jn.call(this,t),this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.notClear=!0}ms.prototype={constructor:ms},w(ms,cs),vs.prototype.incremental=!0,vs.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.dirty(),this.notClear=!1},vs.prototype.addDisplayable=function(t,e){e?this._temporaryDisplayables.push(t):this._displayables.push(t),this.dirty()},vs.prototype.addDisplayables=function(t,e){e=e||!1;for(var i=0;i<t.length;i++)this.addDisplayable(t[i],e)},vs.prototype.eachPendingDisplayable=function(t){for(var e=this._cursor;e<this._displayables.length;e++)t&&t(this._displayables[e]);for(e=0;e<this._temporaryDisplayables.length;e++)t&&t(this._temporaryDisplayables[e])},vs.prototype.update=function(){this.updateTransform();for(var t=this._cursor;t<this._displayables.length;t++){(e=this._displayables[t]).parent=this,e.update(),e.parent=null}for(t=0;t<this._temporaryDisplayables.length;t++){var e;(e=this._temporaryDisplayables[t]).parent=this,e.update(),e.parent=null}},vs.prototype.brush=function(t,e){for(var i=this._cursor;i<this._displayables.length;i++){(n=this._displayables[i]).beforeBrush&&n.beforeBrush(t),n.brush(t,i===this._cursor?null:this._displayables[i-1]),n.afterBrush&&n.afterBrush(t)}this._cursor=i;for(i=0;i<this._temporaryDisplayables.length;i++){var n;(n=this._temporaryDisplayables[i]).beforeBrush&&n.beforeBrush(t),n.brush(t,0===i?null:this._temporaryDisplayables[i-1]),n.afterBrush&&n.afterBrush(t)}this._temporaryDisplayables=[],this.notClear=!0};var ys=[];vs.prototype.getBoundingRect=function(){if(!this._rect){for(var t=new Di(1/0,1/0,-1/0,-1/0),e=0;e<this._displayables.length;e++){var i=this._displayables[e],n=i.getBoundingRect().clone();i.needLocalTransform()&&n.applyTransform(i.getLocalTransform(ys)),t.union(n)}this._rect=t}return this._rect},vs.prototype.contain=function(t,e){var i=this.transformCoordToLocal(t,e);if(this.getBoundingRect().contain(i[0],i[1]))for(var n=0;n<this._displayables.length;n++){if(this._displayables[n].contain(t,e))return!0}return!1},w(vs,Jn);var xs=Math.max,_s=Math.min,ws={},bs=1,Ss={color:"textFill",textBorderColor:"textStroke",textBorderWidth:"textStrokeWidth"},Ms="emphasis",Is="normal",Ts=1,As={},Ds={};function Cs(t){return Ar.extend(t)}function Ls(t,e){Ds[t]=e}function ks(t){if(Ds.hasOwnProperty(t))return Ds[t]}function Ps(t,e,i,n){var o=Zr(t,e);return i&&("center"===n&&(i=Os(i,o.getBoundingRect())),Rs(o,i)),o}function Ns(t,i,n){var o=new Qn({style:{image:t,x:i.x,y:i.y,width:i.width,height:i.height},onload:function(t){if("center"===n){var e={width:t.width,height:t.height};o.setStyle(Os(i,e))}}});return o}function Os(t,e){var i,n=e.width/e.height,o=t.height*n;return i=o<=t.width?t.height:(o=t.width)/n,{x:t.x+t.width/2-o/2,y:t.y+t.height/2-i/2,width:o,height:i}}var Es=function(t,e){for(var i=[],n=t.length,o=0;o<n;o++){var a=t[o];a.path||a.createPathProxy(),a.__dirtyPath&&a.buildPath(a.path,a.shape,!0),i.push(a.path)}var r=new Ar(e);return r.createPathProxy(),r.buildPath=function(t){t.appendPath(i);var e=t.getContext();e&&t.rebuildPath(e)},r};function Rs(t,e){if(t.applyTransform){var i=t.getBoundingRect().calculateTransform(e);t.applyTransform(i)}}var zs=os;function Bs(t){return null!=t&&"none"!==t}var Vs=Q(),Gs=0;function Fs(t){var e=t.__hoverStl;if(e&&!t.__highlighted){var i=t.__zr,n=t.useHoverLayer&&i&&"canvas"===i.painter.type;if(t.__highlighted=n?"layer":"plain",!(t.isGroup||!i&&t.useHoverLayer)){var o=t,a=t.style;n&&(a=(o=i.addHover(t)).style),ll(a),n||function(t){if(t.__hoverStlDirty){t.__hoverStlDirty=!1;var e=t.__hoverStl;if(e){var i=t.__cachedNormalStl={};t.__cachedNormalZ2=t.z2;var n=t.style;for(var o in e)null!=e[o]&&(i[o]=n[o]);i.fill=n.fill,i.stroke=n.stroke}else t.__cachedNormalStl=t.__cachedNormalZ2=null}}(o),a.extendFrom(e),Ws(a,e,"fill"),Ws(a,e,"stroke"),sl(a),n||(t.dirty(!1),t.z2+=bs)}}}function Ws(t,e,i){!Bs(e[i])&&Bs(t[i])&&(t[i]=function(t){if("string"!=typeof t)return t;var e=Vs.get(t);return e||(e=He(t,-.1),Gs<1e4&&(Vs.set(t,e),Gs++)),e}(t[i]))}function Hs(t){var e=t.__highlighted;if(e&&(t.__highlighted=!1,!t.isGroup))if("layer"===e)t.__zr&&t.__zr.removeHover(t);else{var i=t.style,n=t.__cachedNormalStl;n&&(ll(i),t.setStyle(n),sl(i));var o=t.__cachedNormalZ2;null!=o&&t.z2-o===bs&&(t.z2=o)}}function Zs(t,e,i){var n,o=Is,a=Is;t.__highlighted&&(o=Ms,n=!0),e(t,i),t.__highlighted&&(a=Ms,n=!0),t.isGroup&&t.traverse(function(t){t.isGroup||e(t,i)}),n&&t.__highDownOnUpdate&&t.__highDownOnUpdate(o,a)}function Us(t,e){e=t.__hoverStl=!1!==e&&(t.hoverStyle||e||{}),t.__hoverStlDirty=!0,t.__highlighted&&(t.__cachedNormalStl=null,Hs(t),Fs(t))}function Xs(t){Ks(this,t)||this.__highByOuter||Zs(this,Fs)}function Ys(t){Ks(this,t)||this.__highByOuter||Zs(this,Hs)}function js(t){this.__highByOuter|=1<<(t||0),Zs(this,Fs)}function qs(t){(this.__highByOuter&=~(1<<(t||0)))||Zs(this,Hs)}function Ks(t,e){return t.__highDownSilentOnTouch&&e.zrByTouch}function $s(t,e){Js(t,!0),Zs(t,Us,e)}function Js(t,e){var i=!1===e;if(t.__highDownSilentOnTouch=t.highDownSilentOnTouch,t.__highDownOnUpdate=t.highDownOnUpdate,!i||t.__highDownDispatcher){var n=i?"off":"on";t[n]("mouseover",Xs)[n]("mouseout",Ys),t[n]("emphasis",js)[n]("normal",qs),t.__highByOuter=t.__highByOuter||0,t.__highDownDispatcher=!i}}function Qs(t){return!(!t||!t.__highDownDispatcher)}function tl(t){var e=As[t];return null==e&&Ts<=32&&(e=As[t]=Ts++),e}function el(t,e,i,n,o,a,r){var s,l=(o=o||ws).labelFetcher,u=o.labelDataIndex,h=o.labelDimIndex,c=o.labelProp,d=i.getShallow("show"),f=n.getShallow("show");(d||f)&&(l&&(s=l.getFormattedLabel(u,"normal",null,h,c)),null==s&&(s=C(o.defaultText)?o.defaultText(u,o):o.defaultText));var p=d?s:null,g=f?H(l?l.getFormattedLabel(u,"emphasis",null,h,c):null,s):null;null==p&&null==g||(nl(t,i,a,o),nl(e,n,r,o,!0)),t.text=p,e.text=g}function il(t,e,i){var n=t.style;e&&(ll(n),t.setStyle(e),sl(n)),n=t.__hoverStl,i&&n&&(ll(n),P(n,i),sl(n))}function nl(t,e,i,n,o){return ol(t,e,n,o),i&&P(t,i),t}function ol(t,e,i,n){if((i=i||ws).isRectText){var o;i.getTextPosition?o=i.getTextPosition(e,n):"outside"===(o=e.getShallow("position")||(n?null:"inside"))&&(o="top"),t.textPosition=o,t.textOffset=e.getShallow("offset");var a=e.getShallow("rotate");null!=a&&(a*=Math.PI/180),t.textRotation=a,t.textDistance=H(e.getShallow("distance"),n?null:5)}var r,s=e.ecModel,l=s&&s.option.textStyle,u=function(t){var e;for(;t&&t!==t.ecModel;){var i=(t.option||ws).rich;if(i)for(var n in e=e||{},i)i.hasOwnProperty(n)&&(e[n]=1);t=t.parentModel}return e}(e);if(u)for(var h in r={},u)if(u.hasOwnProperty(h)){var c=e.getModel(["rich",h]);al(r[h]={},c,l,i,n)}return t.rich=r,al(t,e,l,i,n,!0),i.forceRich&&!i.textStyle&&(i.textStyle={}),t}function al(t,e,i,n,o,a){i=!o&&i||ws,t.textFill=rl(e.getShallow("color"),n)||i.color,t.textStroke=rl(e.getShallow("textBorderColor"),n)||i.textBorderColor,t.textStrokeWidth=H(e.getShallow("textBorderWidth"),i.textBorderWidth),o||(a&&(t.insideRollbackOpt=n,sl(t)),null==t.textFill&&(t.textFill=n.autoColor)),t.fontStyle=e.getShallow("fontStyle")||i.fontStyle,t.fontWeight=e.getShallow("fontWeight")||i.fontWeight,t.fontSize=e.getShallow("fontSize")||i.fontSize,t.fontFamily=e.getShallow("fontFamily")||i.fontFamily,t.textAlign=e.getShallow("align"),t.textVerticalAlign=e.getShallow("verticalAlign")||e.getShallow("baseline"),t.textLineHeight=e.getShallow("lineHeight"),t.textWidth=e.getShallow("width"),t.textHeight=e.getShallow("height"),t.textTag=e.getShallow("tag"),a&&n.disableBox||(t.textBackgroundColor=rl(e.getShallow("backgroundColor"),n),t.textPadding=e.getShallow("padding"),t.textBorderColor=rl(e.getShallow("borderColor"),n),t.textBorderWidth=e.getShallow("borderWidth"),t.textBorderRadius=e.getShallow("borderRadius"),t.textBoxShadowColor=e.getShallow("shadowColor"),t.textBoxShadowBlur=e.getShallow("shadowBlur"),t.textBoxShadowOffsetX=e.getShallow("shadowOffsetX"),t.textBoxShadowOffsetY=e.getShallow("shadowOffsetY")),t.textShadowColor=e.getShallow("textShadowColor")||i.textShadowColor,t.textShadowBlur=e.getShallow("textShadowBlur")||i.textShadowBlur,t.textShadowOffsetX=e.getShallow("textShadowOffsetX")||i.textShadowOffsetX,t.textShadowOffsetY=e.getShallow("textShadowOffsetY")||i.textShadowOffsetY}function rl(t,e){return"auto"!==t?t:e&&e.autoColor?e.autoColor:null}function sl(t){var e,i=t.textPosition,n=t.insideRollbackOpt;if(n&&null==t.textFill){var o=n.autoColor,a=n.isRectText,r=n.useInsideStyle,s=!1!==r&&(!0===r||a&&i&&"string"==typeof i&&0<=i.indexOf("inside")),l=!s&&null!=o;(s||l)&&(e={textFill:t.textFill,textStroke:t.textStroke,textStrokeWidth:t.textStrokeWidth}),s&&(t.textFill="#fff",null==t.textStroke&&(t.textStroke=o,null==t.textStrokeWidth&&(t.textStrokeWidth=2))),l&&(t.textFill=o)}t.insideRollback=e}function ll(t){var e=t.insideRollback;e&&(t.textFill=e.textFill,t.textStroke=e.textStroke,t.textStrokeWidth=e.textStrokeWidth,t.insideRollback=null)}function ul(t,e){var i=e&&e.getModel("textStyle");return j([t.fontStyle||i&&i.getShallow("fontStyle")||"",t.fontWeight||i&&i.getShallow("fontWeight")||"",(t.fontSize||i&&i.getShallow("fontSize")||12)+"px",t.fontFamily||i&&i.getShallow("fontFamily")||"sans-serif"].join(" "))}function hl(t,e,i,n,o,a){if("function"==typeof o&&(a=o,o=null),n&&n.isAnimationEnabled()){var r=t?"Update":"",s=n.getShallow("animationDuration"+r),l=n.getShallow("animationEasing"+r),u=n.getShallow("animationDelay"+r);"function"==typeof u&&(u=u(o,n.getAnimationDelayParams?n.getAnimationDelayParams(e,o):null)),"function"==typeof s&&(s=s(o)),0<s?e.animateTo(i,s,u||0,l,a,!!a):(e.stopAnimation(),e.attr(i),a&&a())}else e.stopAnimation(),e.attr(i),a&&a()}function cl(t,e,i,n,o){hl(!0,t,e,i,n,o)}function dl(t,e,i,n,o){hl(!1,t,e,i,n,o)}function fl(t,e){for(var i=re([]);t&&t!==e;)le(i,t.getLocalTransform(),i),t=t.parent;return i}function pl(t,e,i){return e&&!N(e)&&(e=ve.getLocalTransform(e)),i&&(e=de([],e)),bt([],t,e)}function gl(t,e,i){var n=0===e[4]||0===e[5]||0===e[0]?1:Math.abs(2*e[4]/e[0]),o=0===e[4]||0===e[5]||0===e[2]?1:Math.abs(2*e[4]/e[2]),a=["left"===t?-n:"right"===t?n:0,"top"===t?-o:"bottom"===t?o:0];return a=pl(a,e,i),Math.abs(a[0])>Math.abs(a[1])?0<a[0]?"right":"left":0<a[1]?"bottom":"top"}function ml(t,e,n,i){if(t&&e){var o,a=(o={},t.traverse(function(t){!t.isGroup&&t.anid&&(o[t.anid]=t)}),o);e.traverse(function(t){if(!t.isGroup&&t.anid){var e=a[t.anid];if(e){var i=r(t);t.attr(r(e)),cl(t,i,n,t.dataIndex)}}})}function r(t){var e={position:rt(t.position),rotation:t.rotation};return t.shape&&(e.shape=P({},t.shape)),e}}function vl(t,n){return O(t,function(t){var e=t[0];e=xs(e,n.x),e=_s(e,n.x+n.width);var i=t[1];return i=xs(i,n.y),[e,i=_s(i,n.y+n.height)]})}function yl(t,e,i){var n=(e=P({rectHover:!0},e)).style={strokeNoScale:!0};if(i=i||{x:-1,y:-1,width:2,height:2},t)return 0===t.indexOf("image://")?(n.image=t.slice(8),D(n,i),new Qn(e)):Ps(t.replace("path://",""),e,i,"center")}function xl(t,e,i,n,o){for(var a=0,r=o[o.length-1];a<o.length;a++){var s=o[a];if(_l(t,e,i,n,s[0],s[1],r[0],r[1]))return!0;r=s}}function _l(t,e,i,n,o,a,r,s){var l=i-t,u=n-e,h=r-o,c=s-a,d=wl(h,c,l,u);if(function(t){return t<=1e-6&&-1e-6<=t}(d))return!1;var f=t-o,p=e-a,g=wl(f,p,l,u)/d;if(g<0||1<g)return!1;var m=wl(f,p,h,c)/d;return!(m<0||1<m)}function wl(t,e,i,n){return t*n-i*e}Ls("circle",Yr),Ls("sector",qr),Ls("ring",Kr),Ls("polygon",Qr),Ls("polyline",ts),Ls("rect",rs),Ls("line",ls),Ls("bezierCurve",ds),Ls("arc",fs);var bl=(Object.freeze||Object)({Z2_EMPHASIS_LIFT:bs,CACHED_LABEL_STYLE_PROPERTIES:Ss,extendShape:Cs,extendPath:function(t,e){return function(t,e){return Ar.extend(Hr(t,e))}(t,e)},registerShape:Ls,getShapeClass:ks,makePath:Ps,makeImage:Ns,mergePath:Es,resizePath:Rs,subPixelOptimizeLine:function(t){return is(t.shape,t.shape,t.style),t},subPixelOptimizeRect:function(t){return ns(t.shape,t.shape,t.style),t},subPixelOptimize:zs,setElementHoverStyle:Us,setHoverStyle:$s,setAsHighDownDispatcher:Js,isHighDownDispatcher:Qs,getHighlightDigit:tl,setLabelStyle:el,modifyLabelStyle:il,setTextStyle:nl,setText:function(t,e,i){var n,o={isRectText:!0};!1===i?n=!0:o.autoColor=i,ol(t,e,o,n)},getFont:ul,updateProps:cl,initProps:dl,getTransform:fl,applyTransform:pl,transformDirection:gl,groupTransition:ml,clipPointsByRect:vl,clipRectByRect:function(t,e){var i=xs(t.x,e.x),n=_s(t.x+t.width,e.x+e.width),o=xs(t.y,e.y),a=_s(t.y+t.height,e.y+e.height);if(i<=n&&o<=a)return{x:i,y:o,width:n-i,height:a-o}},createIcon:yl,linePolygonIntersect:xl,lineLineIntersect:_l,Group:Ci,Image:Qn,Text:Ur,Circle:Yr,Sector:qr,Ring:Kr,Polygon:Qr,Polyline:ts,Rect:rs,Line:ls,BezierCurve:ds,Arc:fs,IncrementalDisplayable:vs,CompoundPath:ps,LinearGradient:gs,RadialGradient:ms,BoundingRect:Di}),Sl=["textStyle","color"],Ml={getTextColor:function(t){var e=this.ecModel;return this.getShallow("color")||(!t&&e?e.get(Sl):null)},getFont:function(){return ul({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},getTextRect:function(t){return gn(t,this.getFont(),this.getShallow("align"),this.getShallow("verticalAlign")||this.getShallow("baseline"),this.getShallow("padding"),this.getShallow("lineHeight"),this.getShallow("rich"),this.getShallow("truncateText"))}},Il=ha([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["textPosition"],["textAlign"]]),Tl={getItemStyle:function(t,e){var i=Il(this,t,e),n=this.getBorderLineDash();return n&&(i.lineDash=n),i},getBorderLineDash:function(){var t=this.get("borderType");return"solid"===t||null==t?null:"dashed"===t?[5,5]:[1,1]}},Al=b,Dl=jo();function Cl(t,e,i){this.parentModel=e,this.ecModel=i,this.option=t}function Ll(t,e,i){for(var n=0;n<e.length&&(!e[n]||null!=(t=t&&"object"==typeof t?t[e[n]]:null));n++);return null==t&&i&&(t=i.get(e)),t}function kl(t,e){var i=Dl(t).getParent;return i?i.call(t,e):t.parentModel}Cl.prototype={constructor:Cl,init:null,mergeOption:function(t){m(this.option,t,!0)},get:function(t,e){return null==t?this.option:Ll(this.option,this.parsePath(t),!e&&kl(this,t))},getShallow:function(t,e){var i=this.option,n=null==i?i:i[t],o=!e&&kl(this,t);return null==n&&o&&(n=o.getShallow(t)),n},getModel:function(t,e){var i;return new Cl(null==t?this.option:Ll(this.option,t=this.parsePath(t)),e=e||(i=kl(this,t))&&i.getModel(t),this.ecModel)},isEmpty:function(){return null==this.option},restoreData:function(){},clone:function(){return new this.constructor(k(this.option))},setReadOnly:function(t){},parsePath:function(t){return"string"==typeof t&&(t=t.split(".")),t},customizeGetParent:function(t){Dl(this).getParent=t},isAnimationEnabled:function(){if(!v.node){if(null!=this.option.animation)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}}},oa(Cl),ra(Cl),Al(Cl,da),Al(Cl,pa),Al(Cl,Ml),Al(Cl,Tl);var Pl=0;function Nl(t){return[t||"",Pl++,Math.random().toFixed(5)].join("_")}var Ol=1e-4;function El(t,e,i,n){var o=e[1]-e[0],a=i[1]-i[0];if(0==o)return 0==a?i[0]:(i[0]+i[1])/2;if(n)if(0<o){if(t<=e[0])return i[0];if(t>=e[1])return i[1]}else{if(t>=e[0])return i[0];if(t<=e[1])return i[1]}else{if(t===e[0])return i[0];if(t===e[1])return i[1]}return(t-e[0])/o*a+i[0]}function Rl(t,e){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%"}return"string"==typeof t?function(t){return t.replace(/^\s+|\s+$/g,"")}(t).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?NaN:+t}function zl(t,e,i){return null==e&&(e=10),e=Math.min(Math.max(0,e),20),t=(+t).toFixed(e),i?t:+t}function Bl(t){return t.sort(function(t,e){return t-e}),t}function Vl(t){if(t=+t,isNaN(t))return 0;for(var e=1,i=0;Math.round(t*e)/e!==t;)e*=10,i++;return i}function Gl(t){var e=t.toString(),i=e.indexOf("e");if(0<i){var n=+e.slice(i+1);return n<0?-n:0}var o=e.indexOf(".");return o<0?0:e.length-1-o}function Fl(t,e){var i=Math.log,n=Math.LN10,o=Math.floor(i(t[1]-t[0])/n),a=Math.round(i(Math.abs(e[1]-e[0]))/n),r=Math.min(Math.max(-o+a,0),20);return isFinite(r)?r:20}function Wl(t,e,i){if(!t[e])return 0;var n=S(t,function(t,e){return t+(isNaN(e)?0:e)},0);if(0===n)return 0;for(var o=Math.pow(10,i),a=O(t,function(t){return(isNaN(t)?0:t)/n*o*100}),r=100*o,s=O(a,function(t){return Math.floor(t)}),l=S(s,function(t,e){return t+e},0),u=O(a,function(t,e){return t-s[e]});l<r;){for(var h=Number.NEGATIVE_INFINITY,c=null,d=0,f=u.length;d<f;++d)u[d]>h&&(h=u[d],c=d);++s[c],u[c]=0,++l}return s[e]/o}var Hl=9007199254740991;function Zl(t){var e=2*Math.PI;return(t%e+e)%e}function Ul(t){return-Ol<t&&t<Ol}var Xl=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d\d)(?::(\d\d)(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function Yl(t){if(t instanceof Date)return t;if("string"!=typeof t)return null==t?new Date(NaN):new Date(Math.round(t));var e=Xl.exec(t);if(!e)return new Date(NaN);if(e[8]){var i=+e[4]||0;return"Z"!==e[8].toUpperCase()&&(i-=e[8].slice(0,3)),new Date(Date.UTC(+e[1],+(e[2]||1)-1,+e[3]||1,i,+(e[5]||0),+e[6]||0,+e[7]||0))}return new Date(+e[1],+(e[2]||1)-1,+e[3]||1,+e[4]||0,+(e[5]||0),+e[6]||0,+e[7]||0)}function jl(t){return Math.pow(10,ql(t))}function ql(t){if(0===t)return 0;var e=Math.floor(Math.log(t)/Math.LN10);return 10<=t/Math.pow(10,e)&&e++,e}function Kl(t,e){var i=ql(t),n=Math.pow(10,i),o=t/n;return t=(e?o<1.5?1:o<2.5?2:o<4?3:o<7?5:10:o<1?1:o<2?2:o<3?3:o<5?5:10)*n,-20<=i?+t.toFixed(i<0?-i:0):t}function $l(t){t.sort(function(t,e){return function t(e,i,n){return e.interval[n]<i.interval[n]||e.interval[n]===i.interval[n]&&(e.close[n]-i.close[n]==(n?-1:1)||!n&&t(e,i,1))}(t,e,0)?-1:1});for(var e=-1/0,i=1,n=0;n<t.length;){for(var o=t[n].interval,a=t[n].close,r=0;r<2;r++)o[r]<=e&&(o[r]=e,a[r]=r?1:1-i),e=o[r],i=a[r];o[0]===o[1]&&a[0]*a[1]!=1?t.splice(n,1):n++}return t}function Jl(t){return 0<=t-parseFloat(t)}var Ql=(Object.freeze||Object)({linearMap:El,parsePercent:Rl,round:zl,asc:Bl,getPrecision:Vl,getPrecisionSafe:Gl,getPixelPrecision:Fl,getPercentWithPrecision:Wl,MAX_SAFE_INTEGER:Hl,remRadian:Zl,isRadianAroundZero:Ul,parseDate:Yl,quantity:jl,quantityExponent:ql,nice:Kl,quantile:function(t,e){var i=(t.length-1)*e+1,n=Math.floor(i),o=+t[n-1],a=i-n;return a?o+a*(t[n]-o):o},reformIntervals:$l,isNumeric:Jl});function tu(t){return isNaN(t)?"-":(t=(t+"").split("."))[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(1<t.length?"."+t[1]:"")}function eu(t,e){return t=(t||"").toLowerCase().replace(/-(.)/g,function(t,e){return e.toUpperCase()}),e&&t&&(t=t.charAt(0).toUpperCase()+t.slice(1)),t}var iu=X,nu=/([&<>"'])/g,ou={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function au(t){return null==t?"":(t+"").replace(nu,function(t,e){return ou[e]})}function ru(t,e){return"{"+t+(null==e?"":e)+"}"}var su=["a","b","c","d","e","f","g"];function lu(t,e,i){L(e)||(e=[e]);var n=e.length;if(!n)return"";for(var o=e[0].$vars||[],a=0;a<o.length;a++){var r=su[a];t=t.replace(ru(r),ru(r,0))}for(var s=0;s<n;s++)for(var l=0;l<o.length;l++){var u=e[s][o[l]];t=t.replace(ru(su[l],s),i?au(u):u)}return t}function uu(i,t,n){return E(t,function(t,e){i=i.replace("{"+e+"}",n?au(t):t)}),i}function hu(t,e){var i=(t=R(t)?{color:t,extraCssText:e}:t||{}).color,n=t.type,o=(e=t.extraCssText,t.renderMode||"html"),a=t.markerId||"X";return i?"html"===o?"subItem"===n?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+au(i)+";"+(e||"")+'"></span>':'<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:'+au(i)+";"+(e||"")+'"></span>':{renderMode:o,content:"{marker"+a+"|} ",style:{color:i}}:""}function cu(t,e){return"0000".substr(0,e-(t+="").length)+t}function du(t,e,i){"week"!==t&&"month"!==t&&"quarter"!==t&&"half-year"!==t&&"year"!==t||(t="MM-dd\nyyyy");var n=Yl(e),o=i?"UTC":"",a=n["get"+o+"FullYear"](),r=n["get"+o+"Month"]()+1,s=n["get"+o+"Date"](),l=n["get"+o+"Hours"](),u=n["get"+o+"Minutes"](),h=n["get"+o+"Seconds"](),c=n["get"+o+"Milliseconds"]();return t=t.replace("MM",cu(r,2)).replace("M",r).replace("yyyy",a).replace("yy",a%100).replace("dd",cu(s,2)).replace("d",s).replace("hh",cu(l,2)).replace("h",l).replace("mm",cu(u,2)).replace("m",u).replace("ss",cu(h,2)).replace("s",h).replace("SSS",cu(c,3))}function fu(t){return t?t.charAt(0).toUpperCase()+t.substr(1):t}var pu=xn;function gu(t,e){if("_blank"===e||"blank"===e){var i=window.open();i.opener=null,i.location=t}else window.open(t,e)}var mu=(Object.freeze||Object)({addCommas:tu,toCamelCase:eu,normalizeCssArray:iu,encodeHTML:au,formatTpl:lu,formatTplSimple:uu,getTooltipMarker:hu,formatTime:du,capitalFirst:fu,truncateText:pu,getTextBoundingRect:function(t){return gn(t.text,t.font,t.textAlign,t.textVerticalAlign,t.textPadding,t.textLineHeight,t.rich,t.truncate)},getTextRect:function(t,e,i,n,o,a,r,s){return gn(t,e,i,n,o,s,a,r)},windowOpen:gu}),vu=E,yu=["left","right","top","bottom","width","height"],xu=[["width","left","right"],["height","top","bottom"]];function _u(h,c,d,f,p){var g=0,m=0;null==f&&(f=1/0),null==p&&(p=1/0);var v=0;c.eachChild(function(t,e){var i,n,o=t.position,a=t.getBoundingRect(),r=c.childAt(e+1),s=r&&r.getBoundingRect();if("horizontal"===h){var l=a.width+(s?-s.x+a.x:0);v=f<(i=g+l)||t.newline?(g=0,i=l,m+=v+d,a.height):Math.max(v,a.height)}else{var u=a.height+(s?-s.y+a.y:0);v=p<(n=m+u)||t.newline?(g+=v+d,m=0,n=u,a.width):Math.max(v,a.width)}t.newline||(o[0]=g,o[1]=m,"horizontal"===h?g=i+d:m=n+d)})}var wu=_u;T(_u,"vertical"),T(_u,"horizontal");function bu(t,e,i){i=iu(i||0);var n=e.width,o=e.height,a=Rl(t.left,n),r=Rl(t.top,o),s=Rl(t.right,n),l=Rl(t.bottom,o),u=Rl(t.width,n),h=Rl(t.height,o),c=i[2]+i[0],d=i[1]+i[3],f=t.aspect;switch(isNaN(u)&&(u=n-s-d-a),isNaN(h)&&(h=o-l-c-r),null!=f&&(isNaN(u)&&isNaN(h)&&(n/o<f?u=.8*n:h=.8*o),isNaN(u)&&(u=f*h),isNaN(h)&&(h=u/f)),isNaN(a)&&(a=n-s-u-d),isNaN(r)&&(r=o-l-h-c),t.left||t.right){case"center":a=n/2-u/2-i[3];break;case"right":a=n-u-d}switch(t.top||t.bottom){case"middle":case"center":r=o/2-h/2-i[0];break;case"bottom":r=o-h-c}a=a||0,r=r||0,isNaN(u)&&(u=n-d-a-(s||0)),isNaN(h)&&(h=o-c-r-(l||0));var p=new Di(a+i[3],r+i[0],u,h);return p.margin=i,p}function Su(t,e,i,n,o){var a=!o||!o.hv||o.hv[0],r=!o||!o.hv||o.hv[1],s=o&&o.boundingMode||"all";if(a||r){var l;if("raw"===s)l="group"===t.type?new Di(0,0,+e.width||0,+e.height||0):t.getBoundingRect();else if(l=t.getBoundingRect(),t.needLocalTransform()){var u=t.getLocalTransform();(l=l.clone()).applyTransform(u)}e=bu(D({width:l.width,height:l.height},e),i,n);var h=t.position,c=a?e.x-l.x:0,d=r?e.y-l.y:0;t.attr("position","raw"===s?[c,d]:[h[0]+c,h[1]+d])}}function Mu(l,u,t){z(t)||(t={});var h=t.ignoreSize;L(h)||(h=[h,h]);var e=n(xu[0],0),i=n(xu[1],1);function n(t,e){var i={},n=0,o={},a=0;if(vu(t,function(t){o[t]=l[t]}),vu(t,function(t){c(u,t)&&(i[t]=o[t]=u[t]),d(i,t)&&n++,d(o,t)&&a++}),h[e])return d(u,t[1])?o[t[2]]=null:d(u,t[2])&&(o[t[1]]=null),o;if(2!==a&&n){if(2<=n)return i;for(var r=0;r<t.length;r++){var s=t[r];if(!c(i,s)&&c(l,s)){i[s]=l[s];break}}return i}return o}function c(t,e){return t.hasOwnProperty(e)}function d(t,e){return null!=t[e]&&"auto"!==t[e]}function o(t,e,i){vu(t,function(t){e[t]=i[t]})}o(xu[0],l,e),o(xu[1],l,i)}function Iu(t){return Tu({},t)}function Tu(e,i){return i&&e&&vu(yu,function(t){i.hasOwnProperty(t)&&(e[t]=i[t])}),e}var Au,Du,Cu,Lu=jo(),ku=Cl.extend({type:"component",id:"",name:"",mainType:"",subType:"",componentIndex:0,defaultOption:null,ecModel:null,dependentModels:[],uid:null,layoutMode:null,$constructor:function(t,e,i,n){Cl.call(this,t,e,i,n),this.uid=Nl("ec_cpt_model")},init:function(t,e,i,n){this.mergeDefaultAndTheme(t,i)},mergeDefaultAndTheme:function(t,e){var i=this.layoutMode,n=i?Iu(t):{};m(t,e.getTheme().get(this.mainType)),m(t,this.getDefaultOption()),i&&Mu(t,n,i)},mergeOption:function(t,e){m(this.option,t,!0);var i=this.layoutMode;i&&Mu(this.option,t,i)},optionUpdated:function(t,e){},getDefaultOption:function(){var t=Lu(this);if(!t.defaultOption){for(var e=[],i=this.constructor;i;){var n=i.prototype.defaultOption;n&&e.push(n),i=i.superClass}for(var o={},a=e.length-1;0<=a;a--)o=m(o,e[a],!0);t.defaultOption=o}return t.defaultOption},getReferringComponents:function(t){return this.ecModel.queryComponents({mainType:t,index:this.get(t+"Index",!0),id:this.get(t+"Id",!0)})}});function Pu(t,e){return t[e]||(t[e]={predecessor:[],successor:[]}),t[e]}ua(ku,{registerWhenExtend:!0}),Du={},(Au=ku).registerSubTypeDefaulter=function(t,e){t=na(t),Du[t.main]=e},Au.determineSubType=function(t,e){var i=e.type;if(!i){var n=na(t).main;Au.hasSubTypes(t)&&Du[n]&&(i=Du[n](e))}return i},Cu=function(t){var e=[];E(ku.getClassesByMainType(t),function(t){e=e.concat(t.prototype.dependencies||[])}),e=O(e,function(t){return na(t).main}),"dataset"!==t&&_(e,"dataset")<=0&&e.unshift("dataset");return e},ku.topologicalTravel=function(t,e,i,n){if(t.length){var o=function(e){var o={},a=[];return E(e,function(i){var n=Pu(o,i),t=function(t,e){var i=[];return E(t,function(t){0<=_(e,t)&&i.push(t)}),i}(n.originalDeps=Cu(i),e);n.entryCount=t.length,0===n.entryCount&&a.push(i),E(t,function(t){_(n.predecessor,t)<0&&n.predecessor.push(t);var e=Pu(o,t);_(e.successor,t)<0&&e.successor.push(i)})}),{graph:o,noEntryList:a}}(e),a=o.graph,r=o.noEntryList,s={};for(E(t,function(t){s[t]=!0});r.length;){var l=r.pop(),u=a[l],h=!!s[l];h&&(i.call(n,l,u.originalDeps.slice()),delete s[l]),E(u.successor,h?d:c)}E(s,function(){throw new Error("Circle dependency may exists")})}function c(t){a[t].entryCount--,0===a[t].entryCount&&r.push(t)}function d(t){s[t]=!0,c(t)}},b(ku,{getBoxLayoutParams:function(){return{left:this.get("left"),top:this.get("top"),right:this.get("right"),bottom:this.get("bottom"),width:this.get("width"),height:this.get("height")}}});var Nu="";"undefined"!=typeof navigator&&(Nu=navigator.platform||"");var Ou={color:["#c23531","#2f4554","#61a0a8","#d48265","#91c7ae","#749f83","#ca8622","#bda29a","#6e7074","#546570","#c4ccd3"],gradientColor:["#f6efa6","#d88273","#bf444c"],textStyle:{fontFamily:Nu.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,animation:"auto",animationDuration:1e3,animationDurationUpdate:300,animationEasing:"exponentialOut",animationEasingUpdate:"cubicOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1},Eu=jo();var Ru={clearColorPalette:function(){Eu(this).colorIdx=0,Eu(this).colorNameMap={}},getColorFromPalette:function(t,e,i){var n=Eu(e=e||this),o=n.colorIdx||0,a=n.colorNameMap=n.colorNameMap||{};if(a.hasOwnProperty(t))return a[t];var r=Vo(this.get("color",!0)),s=this.get("colorLayer",!0),l=null!=i&&s?function(t,e){for(var i=t.length,n=0;n<i;n++)if(t[n].length>e)return t[n];return t[i-1]}(s,i):r;if((l=l||r)&&l.length){var u=l[o];return t&&(a[t]=u),n.colorIdx=(o+1)%l.length,u}}},zu="original",Bu="arrayRows",Vu="objectRows",Gu="keyedColumns",Fu="unknown",Wu="typedArray",Hu="column",Zu="row";function Uu(t){this.fromDataset=t.fromDataset,this.data=t.data||(t.sourceFormat===Gu?{}:[]),this.sourceFormat=t.sourceFormat||Fu,this.seriesLayoutBy=t.seriesLayoutBy||Hu,this.dimensionsDefine=t.dimensionsDefine,this.encodeDefine=t.encodeDefine&&Q(t.encodeDefine),this.startIndex=t.startIndex||0,this.dimensionsDetectCount=t.dimensionsDetectCount}Uu.seriesDataToSource=function(t){return new Uu({data:t,sourceFormat:V(t)?Wu:zu,fromDataset:!1})},ra(Uu);var Xu={Must:1,Might:2,Not:3},Yu=jo();function ju(t){var e=t.option,i=e.data,n=V(i)?Wu:zu,o=!1,a=e.seriesLayoutBy,r=e.sourceHeader,s=e.dimensions,l=Qu(t);if(l){var u=l.option;i=u.source,n=Yu(l).sourceFormat,o=!0,a=a||u.seriesLayoutBy,null==r&&(r=u.sourceHeader),s=s||u.dimensions}var h=function(t,e,i,n,o){if(!t)return{dimensionsDefine:qu(o)};var a,r;if(e===Bu)"auto"===n||null==n?Ku(function(t){null!=t&&"-"!==t&&(R(t)?null==r&&(r=1):r=0)},i,t,10):r=n?1:0,o||1!==r||(o=[],Ku(function(t,e){o[e]=null!=t?t:""},i,t)),a=o?o.length:i===Zu?t.length:t[0]?t[0].length:null;else if(e===Vu)o=o||function(t){var e,i=0;for(;i<t.length&&!(e=t[i++]););if(e){var n=[];return E(e,function(t,e){n.push(e)}),n}}(t);else if(e===Gu)o||(o=[],E(t,function(t,e){o.push(e)}));else if(e===zu){var s=Wo(t[0]);a=L(s)&&s.length||1}return{startIndex:r,dimensionsDefine:qu(o),dimensionsDetectCount:a}}(i,n,a,r,s);Yu(t).source=new Uu({data:i,fromDataset:o,seriesLayoutBy:a,sourceFormat:n,dimensionsDefine:h.dimensionsDefine,startIndex:h.startIndex,dimensionsDetectCount:h.dimensionsDetectCount,encodeDefine:e.encode})}function qu(t){if(t){var n=Q();return O(t,function(t,e){if(null==(t=P({},z(t)?t:{name:t})).name)return t;t.name+="",null==t.displayName&&(t.displayName=t.name);var i=n.get(t.name);return i?t.name+="-"+i.count++:n.set(t.name,{count:1}),t})}}function Ku(t,e,i,n){if(null==n&&(n=1/0),e===Zu)for(var o=0;o<i.length&&o<n;o++)t(i[o]?i[o][0]:null,o);else{var a=i[0]||[];for(o=0;o<a.length&&o<n;o++)t(a[o],o)}}function $u(i,t,e){var a={},n=Qu(t);if(!n||!i)return a;var r,o,s=[],l=[],u=t.ecModel,h=Yu(u).datasetMap,c=n.uid+"_"+e.seriesLayoutBy;E(i=i.slice(),function(t,e){z(t)||(i[e]={name:t}),"ordinal"===t.type&&null==r&&(o=p(i[r=e])),a[t.name]=[]});var d=h.get(c)||h.set(c,{categoryWayDim:o,valueWayDim:0});function f(t,e,i){for(var n=0;n<i;n++)t.push(e+n)}function p(t){var e=t.dimsDef;return e?e.length:1}return E(i,function(t,e){var i=t.name,n=p(t);if(null==r){var o=d.valueWayDim;f(a[i],o,n),f(l,o,n),d.valueWayDim+=n}else if(r===e)f(a[i],0,n),f(s,0,n);else{o=d.categoryWayDim;f(a[i],o,n),f(l,o,n),d.categoryWayDim+=n}}),s.length&&(a.itemName=s),l.length&&(a.seriesName=l),a}function Ju(t,l,u){var e={};if(!Qu(t))return e;var h,c=l.sourceFormat,d=l.dimensionsDefine;c!==Vu&&c!==Gu||E(d,function(t,e){"name"===(z(t)?t.name:t)&&(h=e)});var i=function(){for(var t={},e={},i=[],n=0,o=Math.min(5,u);n<o;n++){var a=th(l.data,c,l.seriesLayoutBy,d,l.startIndex,n);i.push(a);var r=a===Xu.Not;if(r&&null==t.v&&n!==h&&(t.v=n),null!=t.n&&t.n!==t.v&&(r||i[t.n]!==Xu.Not)||(t.n=n),s(t)&&i[t.n]!==Xu.Not)return t;r||(a===Xu.Might&&null==e.v&&n!==h&&(e.v=n),null!=e.n&&e.n!==e.v||(e.n=n))}function s(t){return null!=t.v&&null!=t.n}return s(t)?t:s(e)?e:null}();if(i){e.value=i.v;var n=null!=h?h:i.n;e.itemName=[n],e.seriesName=[n]}return e}function Qu(t){var e=t.option;if(!e.data)return t.ecModel.getComponent("dataset",e.datasetIndex||0)}function th(t,e,i,n,o,a){var r,s,l;if(V(t))return Xu.Not;if(n){var u=n[a];z(u)?(s=u.name,l=u.type):R(u)&&(s=u)}if(null!=l)return"ordinal"===l?Xu.Must:Xu.Not;if(e===Bu)if(i===Zu){for(var h=t[a],c=0;c<(h||[]).length&&c<5;c++)if(null!=(r=g(h[o+c])))return r}else for(c=0;c<t.length&&c<5;c++){var d=t[o+c];if(d&&null!=(r=g(d[a])))return r}else if(e===Vu){if(!s)return Xu.Not;for(c=0;c<t.length&&c<5;c++){if((f=t[c])&&null!=(r=g(f[s])))return r}}else if(e===Gu){if(!s)return Xu.Not;if(!(h=t[s])||V(h))return Xu.Not;for(c=0;c<h.length&&c<5;c++)if(null!=(r=g(h[c])))return r}else if(e===zu)for(c=0;c<t.length&&c<5;c++){var f,p=Wo(f=t[c]);if(!L(p))return Xu.Not;if(null!=(r=g(p[a])))return r}function g(t){var e=R(t);return null!=t&&isFinite(t)&&""!==t?e?Xu.Might:Xu.Not:e&&"-"!==t?Xu.Must:void 0}return Xu.Not}var eh="\0_ec_inner",ih=Cl.extend({init:function(t,e,i,n){i=i||{},this.option=null,this._theme=new Cl(i),this._optionManager=n},setOption:function(t,e){Y(!(eh in t),"please use chart.getOption()"),this._optionManager.setOption(t,e),this.resetOption(null)},resetOption:function(t){var e=!1,i=this._optionManager;if(!t||"recreate"===t){var n=i.mountOption("recreate"===t);this.option&&"recreate"!==t?(this.restoreData(),this.mergeOption(n)):function(t){t=t,this.option={},this.option[eh]=1,this._componentsMap=Q({series:[]}),this._seriesIndices,this._seriesIndicesMap,function(i,t){var n=i.color&&!i.colorLayer;E(t,function(t,e){"colorLayer"===e&&n||ku.hasClass(e)||("object"==typeof t?i[e]=i[e]?m(i[e],t,!1):k(t):null==i[e]&&(i[e]=t))})}(t,this._theme.option),m(t,Ou,!1),this.mergeOption(t)}.call(this,n),e=!0}if("timeline"!==t&&"media"!==t||this.restoreData(),!t||"recreate"===t||"timeline"===t){var o=i.getTimelineOption(this);o&&(this.mergeOption(o),e=!0)}if(!t||"recreate"===t||"media"===t){var a=i.getMediaOption(this,this._api);a.length&&E(a,function(t){this.mergeOption(t,e=!0)},this)}return e},mergeOption:function(n){var l=this.option,u=this._componentsMap,i=[];!function(t){Yu(t).datasetMap=Q()}(this),E(n,function(t,e){null!=t&&(ku.hasClass(e)?e&&i.push(e):l[e]=null==l[e]?k(t):m(l[e],t,!0))}),ku.topologicalTravel(i,ku.getAllClassMainTypes(),function(r,t){var e=Vo(n[r]),i=Ho(u.get(r),e);Zo(i),E(i,function(t,e){var i=t.option;z(i)&&(t.keyInfo.mainType=r,t.keyInfo.subType=function(t,e,i){return e.type?e.type:i?i.subType:ku.determineSubType(t,e)}(r,i,t.exist))});var s=function(e,t){L(t)||(t=t?[t]:[]);var i={};return E(t,function(t){i[t]=(e.get(t)||[]).slice()}),i}(u,t);l[r]=[],u.set(r,[]),E(i,function(t,e){var i=t.exist,n=t.option;if(Y(z(n)||i,"Empty component definition"),n){var o=ku.getClass(r,t.keyInfo.subType,!0);if(i&&i.constructor===o)i.name=t.keyInfo.name,i.mergeOption(n,this),i.optionUpdated(n,!1);else{var a=P({dependentModels:s,componentIndex:e},t.keyInfo);P(i=new o(n,this,this,a),a),i.init(n,this,this,a),i.optionUpdated(null,!0)}}else i.mergeOption({},this),i.optionUpdated({},!1);u.get(r)[e]=i,l[r][e]=i.option},this),"series"===r&&nh(this,u.get("series"))},this),this._seriesIndicesMap=Q(this._seriesIndices=this._seriesIndices||[])},getOption:function(){var n=k(this.option);return E(n,function(t,e){if(ku.hasClass(e)){for(var i=(t=Vo(t)).length-1;0<=i;i--)Xo(t[i])&&t.splice(i,1);n[e]=t}}),delete n[eh],n},getTheme:function(){return this._theme},getComponent:function(t,e){var i=this._componentsMap.get(t);if(i)return i[e||0]},queryComponents:function(t){var e=t.mainType;if(!e)return[];var i,n=t.index,o=t.id,a=t.name,r=this._componentsMap.get(e);if(!r||!r.length)return[];if(null!=n)L(n)||(n=[n]),i=M(O(n,function(t){return r[t]}),function(t){return!!t});else if(null!=o){var s=L(o);i=M(r,function(t){return s&&0<=_(o,t.id)||!s&&t.id===o})}else if(null!=a){var l=L(a);i=M(r,function(t){return l&&0<=_(a,t.name)||!l&&t.name===a})}else i=r.slice();return oh(i,t)},findComponents:function(t){var e,i,n,o,a,r=t.query,s=t.mainType,l=(i=s+"Index",n=s+"Id",o=s+"Name",!(e=r)||null==e[i]&&null==e[n]&&null==e[o]?null:{mainType:s,index:e[i],id:e[n],name:e[o]}),u=l?this.queryComponents(l):this._componentsMap.get(s);return a=oh(u,t),t.filter?M(a,t.filter):a},eachComponent:function(t,n,o){var e=this._componentsMap;if("function"==typeof t)o=n,n=t,e.each(function(t,i){E(t,function(t,e){n.call(o,i,t,e)})});else if(R(t))E(e.get(t),n,o);else if(z(t)){E(this.findComponents(t),n,o)}},getSeriesByName:function(e){return M(this._componentsMap.get("series"),function(t){return t.name===e})},getSeriesByIndex:function(t){return this._componentsMap.get("series")[t]},getSeriesByType:function(e){return M(this._componentsMap.get("series"),function(t){return t.subType===e})},getSeries:function(){return this._componentsMap.get("series").slice()},getSeriesCount:function(){return this._componentsMap.get("series").length},eachSeries:function(i,n){E(this._seriesIndices,function(t){var e=this._componentsMap.get("series")[t];i.call(n,e,t)},this)},eachRawSeries:function(t,e){E(this._componentsMap.get("series"),t,e)},eachSeriesByType:function(i,n,o){E(this._seriesIndices,function(t){var e=this._componentsMap.get("series")[t];e.subType===i&&n.call(o,e,t)},this)},eachRawSeriesByType:function(t,e,i){return E(this.getSeriesByType(t),e,i)},isSeriesFiltered:function(t){return null==this._seriesIndicesMap.get(t.componentIndex)},getCurrentSeriesIndices:function(){return(this._seriesIndices||[]).slice()},filterSeries:function(t,e){var i=M(this._componentsMap.get("series"),t,e);nh(this,i)},restoreData:function(i){var n=this._componentsMap;nh(this,n.get("series"));var o=[];n.each(function(t,e){o.push(e)}),ku.topologicalTravel(o,ku.getAllClassMainTypes(),function(e,t){E(n.get(e),function(t){"series"===e&&function(t,e){if(e){var i=e.seiresIndex,n=e.seriesId,o=e.seriesName;return null!=i&&t.componentIndex!==i||null!=n&&t.id!==n||null!=o&&t.name!==o}}(t,i)||t.restoreData()})})}});function nh(t,e){t._seriesIndicesMap=Q(t._seriesIndices=O(e,function(t){return t.componentIndex})||[])}function oh(t,e){return e.hasOwnProperty("subType")?M(t,function(t){return t.subType===e.subType}):t}b(ih,Ru);var ah=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isDisposed","on","off","getDataURL","getConnectedDataURL","getModel","getOption","getViewOfComponentModel","getViewOfSeriesModel"];function rh(e){E(ah,function(t){this[t]=A(e[t],e)},this)}var sh={};function lh(){this._coordinateSystems=[]}lh.prototype={constructor:lh,create:function(n,o){var a=[];E(sh,function(t,e){var i=t.create(n,o);a=a.concat(i||[])}),this._coordinateSystems=a},update:function(e,i){E(this._coordinateSystems,function(t){t.update&&t.update(e,i)})},getCoordinateSystems:function(){return this._coordinateSystems.slice()}},lh.register=function(t,e){sh[t]=e},lh.get=function(t){return sh[t]};var uh=E,hh=k,ch=O,dh=m,fh=/^(min|max)?(.+)$/;function ph(t){this._api=t,this._timelineOptions=[],this._mediaList=[],this._mediaDefault,this._currentMediaIndices=[],this._optionBackup,this._newBaseOption}function gh(t,e,i){var a={width:e,height:i,aspectratio:e/i},r=!0;return E(t,function(t,e){var i=e.match(fh);if(i&&i[1]&&i[2]){var n=i[1],o=i[2].toLowerCase();!function(t,e,i){return"min"===i?e<=t:"max"===i?t<=e:t===e}(a[o],t,n)&&(r=!1)}}),r}ph.prototype={constructor:ph,setOption:function(t,e){t&&E(Vo(t.series),function(t){t&&t.data&&V(t.data)&&K(t.data)}),t=hh(t);var i=this._optionBackup,n=function(t,i,n){var e,o,a=[],r=[],s=t.timeline;t.baseOption&&(o=t.baseOption);(s||t.options)&&(o=o||{},a=(t.options||[]).slice());if(t.media){o=o||{};var l=t.media;uh(l,function(t){t&&t.option&&(t.query?r.push(t):e=e||t)})}o=o||t;o.timeline||(o.timeline=s);return uh([o].concat(a).concat(O(r,function(t){return t.option})),function(e){uh(i,function(t){t(e,n)})}),{baseOption:o,timelineOptions:a,mediaDefault:e,mediaList:r}}.call(this,t,e,!i);this._newBaseOption=n.baseOption,i?(function(o,t){uh(t=t||{},function(t,e){if(null!=t){var i=o[e];if(ku.hasClass(e)){t=Vo(t);var n=Ho(i=Vo(i),t);o[e]=ch(n,function(t){return t.option&&t.exist?dh(t.exist,t.option,!0):t.exist||t.option})}else o[e]=dh(i,t,!0)}})}(i.baseOption,n.baseOption),n.timelineOptions.length&&(i.timelineOptions=n.timelineOptions),n.mediaList.length&&(i.mediaList=n.mediaList),n.mediaDefault&&(i.mediaDefault=n.mediaDefault)):this._optionBackup=n},mountOption:function(t){var e=this._optionBackup;return this._timelineOptions=ch(e.timelineOptions,hh),this._mediaList=ch(e.mediaList,hh),this._mediaDefault=hh(e.mediaDefault),this._currentMediaIndices=[],hh(t?e.baseOption:this._newBaseOption)},getTimelineOption:function(t){var e,i=this._timelineOptions;if(i.length){var n=t.getComponent("timeline");n&&(e=hh(i[n.getCurrentIndex()],!0))}return e},getMediaOption:function(t){var e=this._api.getWidth(),i=this._api.getHeight(),n=this._mediaList,o=this._mediaDefault,a=[],r=[];if(!n.length&&!o)return r;for(var s=0,l=n.length;s<l;s++)gh(n[s].query,e,i)&&a.push(s);return!a.length&&o&&(a=[-1]),a.length&&!function(t,e){return t.join(",")===e.join(",")}(a,this._currentMediaIndices)&&(r=ch(a,function(t){return hh(-1===t?o.option:n[t].option)})),this._currentMediaIndices=a,r}};var mh=E,vh=z,yh=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function xh(t){var e=t&&t.itemStyle;if(e)for(var i=0,n=yh.length;i<n;i++){var o=yh[i],a=e.normal,r=e.emphasis;a&&a[o]&&(t[o]=t[o]||{},t[o].normal?m(t[o].normal,a[o]):t[o].normal=a[o],a[o]=null),r&&r[o]&&(t[o]=t[o]||{},t[o].emphasis?m(t[o].emphasis,r[o]):t[o].emphasis=r[o],r[o]=null)}}function _h(t,e,i){if(t&&t[e]&&(t[e].normal||t[e].emphasis)){var n=t[e].normal,o=t[e].emphasis;n&&(i?(t[e].normal=t[e].emphasis=null,D(t[e],n)):t[e]=n),o&&(t.emphasis=t.emphasis||{},t.emphasis[e]=o)}}function wh(t){_h(t,"itemStyle"),_h(t,"lineStyle"),_h(t,"areaStyle"),_h(t,"label"),_h(t,"labelLine"),_h(t,"upperLabel"),_h(t,"edgeLabel")}function bh(t,e){var i=vh(t)&&t[e],n=vh(i)&&i.textStyle;if(n)for(var o=0,a=Fo.length;o<a;o++){e=Fo[o];n.hasOwnProperty(e)&&(i[e]=n[e])}}function Sh(t){t&&(wh(t),bh(t,"label"),t.emphasis&&bh(t.emphasis,"label"))}function Mh(t){return L(t)?t:t?[t]:[]}function Ih(t){return(L(t)?t[0]:t)||{}}function Th(e,t){mh(Mh(e.series),function(t){vh(t)&&function(t){if(vh(t)){xh(t),wh(t),bh(t,"label"),bh(t,"upperLabel"),bh(t,"edgeLabel"),t.emphasis&&(bh(t.emphasis,"label"),bh(t.emphasis,"upperLabel"),bh(t.emphasis,"edgeLabel")),(i=t.markPoint)&&(xh(i),Sh(i)),(n=t.markLine)&&(xh(n),Sh(n));var e=t.markArea;e&&Sh(e);var i,n,o=t.data;if("graph"===t.type){o=o||t.nodes;var a=t.links||t.edges;if(a&&!V(a))for(var r=0;r<a.length;r++)Sh(a[r]);E(t.categories,function(t){wh(t)})}if(o&&!V(o))for(r=0;r<o.length;r++)Sh(o[r]);if((i=t.markPoint)&&i.data){var s=i.data;for(r=0;r<s.length;r++)Sh(s[r])}if((n=t.markLine)&&n.data){var l=n.data;for(r=0;r<l.length;r++)L(l[r])?(Sh(l[r][0]),Sh(l[r][1])):Sh(l[r])}"gauge"===t.type?(bh(t,"axisLabel"),bh(t,"title"),bh(t,"detail")):"treemap"===t.type?(_h(t.breadcrumb,"itemStyle"),E(t.levels,function(t){wh(t)})):"tree"===t.type&&wh(t.leaves)}}(t)});var i=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];t&&i.push("valueAxis","categoryAxis","logAxis","timeAxis"),mh(i,function(t){mh(Mh(e[t]),function(t){t&&(bh(t,"axisLabel"),bh(t.axisPointer,"label"))})}),mh(Mh(e.parallel),function(t){var e=t&&t.parallelAxisDefault;bh(e,"axisLabel"),bh(e&&e.axisPointer,"label")}),mh(Mh(e.calendar),function(t){_h(t,"itemStyle"),bh(t,"dayLabel"),bh(t,"monthLabel"),bh(t,"yearLabel")}),mh(Mh(e.radar),function(t){bh(t,"name")}),mh(Mh(e.geo),function(t){vh(t)&&(Sh(t),mh(Mh(t.regions),function(t){Sh(t)}))}),mh(Mh(e.timeline),function(t){Sh(t),_h(t,"label"),_h(t,"itemStyle"),_h(t,"controlStyle",!0);var e=t.data;L(e)&&E(e,function(t){z(t)&&(_h(t,"label"),_h(t,"itemStyle"))})}),mh(Mh(e.toolbox),function(t){_h(t,"iconStyle"),mh(t.feature,function(t){_h(t,"iconStyle")})}),bh(Ih(e.axisPointer),"label"),bh(Ih(e.tooltip).axisPointer,"label")}function Ah(e){E(Dh,function(t){t[0]in e&&!(t[1]in e)&&(e[t[1]]=e[t[0]])})}var Dh=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],Ch=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],Lh=function(i,t){Th(i,t),i.series=Vo(i.series),E(i.series,function(t){if(z(t)){var e=t.type;if("line"===e)null!=t.clipOverflow&&(t.clip=t.clipOverflow);else if("pie"===e||"gauge"===e)null!=t.clockWise&&(t.clockwise=t.clockWise);else if("gauge"===e){var i=function(t,e){e=e.split(",");for(var i=t,n=0;n<e.length&&null!=(i=i&&i[e[n]]);n++);return i}(t,"pointer.color");null!=i&&function(t,e,i,n){e=e.split(",");for(var o,a=t,r=0;r<e.length-1;r++)null==a[o=e[r]]&&(a[o]={}),a=a[o];!n&&null!=a[e[r]]||(a[e[r]]=i)}(t,"itemStyle.color",i)}Ah(t)}}),i.dataRange&&(i.visualMap=i.dataRange),E(Ch,function(t){var e=i[t];e&&(L(e)||(e=[e]),E(e,function(t){Ah(t)}))})};function kh(m){E(m,function(h,c){var d=[],f=[NaN,NaN],t=[h.stackResultDimension,h.stackedOverDimension],p=h.data,g=h.isStackedByIndex,e=p.map(t,function(t,e,i){var n,o,a=p.get(h.stackedDimension,i);if(isNaN(a))return f;g?o=p.getRawIndex(i):n=p.get(h.stackedByDimension,i);for(var r=NaN,s=c-1;0<=s;s--){var l=m[s];if(g||(o=l.data.rawIndexOf(l.stackedByDimension,n)),0<=o){var u=l.data.getByRawIndex(l.stackResultDimension,o);if(0<=a&&0<u||a<=0&&u<0){a+=u,r=u;break}}}return d[0]=a,d[1]=r,d});p.hostModel.setData(e),h.data=e})}function Ph(t,e){Uu.isInstance(t)||(t=Uu.seriesDataToSource(t)),this._source=t;var i=this._data=t.data,n=t.sourceFormat;n===Wu&&(this._offset=0,this._dimSize=e,this._data=i),P(this,Oh[n===Bu?n+"_"+t.seriesLayoutBy:n])}var Nh=Ph.prototype;Nh.pure=!1;var Oh={arrayRows_column:{pure:Nh.persistent=!0,count:function(){return Math.max(0,this._data.length-this._source.startIndex)},getItem:function(t){return this._data[t+this._source.startIndex]},appendData:zh},arrayRows_row:{pure:!0,count:function(){var t=this._data[0];return t?Math.max(0,t.length-this._source.startIndex):0},getItem:function(t){t+=this._source.startIndex;for(var e=[],i=this._data,n=0;n<i.length;n++){var o=i[n];e.push(o?o[t]:null)}return e},appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},objectRows:{pure:!0,count:Eh,getItem:Rh,appendData:zh},keyedColumns:{pure:!0,count:function(){var t=this._source.dimensionsDefine[0].name,e=this._data[t];return e?e.length:0},getItem:function(t){for(var e=[],i=this._source.dimensionsDefine,n=0;n<i.length;n++){var o=this._data[i[n].name];e.push(o?o[t]:null)}return e},appendData:function(t){var o=this._data;E(t,function(t,e){for(var i=o[e]||(o[e]=[]),n=0;n<(t||[]).length;n++)i.push(t[n])})}},original:{count:Eh,getItem:Rh,appendData:zh},typedArray:{persistent:!(Nh.getSource=function(){return this._source}),pure:!0,count:function(){return this._data?this._data.length/this._dimSize:0},getItem:function(t,e){t-=this._offset,e=e||[];for(var i=this._dimSize*t,n=0;n<this._dimSize;n++)e[n]=this._data[i+n];return e},appendData:function(t){this._data=t},clean:function(){this._offset+=this.count(),this._data=null}}};function Eh(){return this._data.length}function Rh(t){return this._data[t]}function zh(t){for(var e=0;e<t.length;e++)this._data.push(t[e])}var Bh={arrayRows:Vh,objectRows:function(t,e,i,n){return null!=i?t[n]:t},keyedColumns:Vh,original:function(t,e,i,n){var o=Wo(t);return null!=i&&o instanceof Array?o[i]:o},typedArray:Vh};function Vh(t,e,i,n){return null!=i?t[i]:t}var Gh={arrayRows:Fh,objectRows:function(t,e,i,n){return Wh(t[e],this._dimensionInfos[e])},keyedColumns:Fh,original:function(t,e,i,n){var o=t&&(null==t.value?t:t.value);return!this._rawData.pure&&function(t){return Ro(t)&&!(t instanceof Array)}(t)&&(this.hasItemOption=!0),Wh(o instanceof Array?o[n]:o,this._dimensionInfos[e])},typedArray:function(t,e,i,n){return t[n]}};function Fh(t,e,i,n){return Wh(t[n],this._dimensionInfos[e])}function Wh(t,e){var i=e&&e.type;if("ordinal"!==i)return"time"===i&&"number"!=typeof t&&null!=t&&"-"!==t&&(t=+Yl(t)),null==t||""===t?NaN:+t;var n=e&&e.ordinalMeta;return n?n.parseAndCollect(t):t}function Hh(t,e,i){if(t){var n=t.getRawDataItem(e);if(null!=n){var o,a,r=t.getProvider().getSource().sourceFormat,s=t.getDimensionInfo(i);return s&&(o=s.name,a=s.index),Bh[r](n,e,a,o)}}}function Zh(t,e,i){if(t){var n=t.getProvider().getSource().sourceFormat;if(n===zu||n===Vu){var o=t.getRawDataItem(e);return n!==zu||z(o)||(o=null),o?o[i]:void 0}}}var Uh=/\{@(.+?)\}/g,Xh={getDataParams:function(t,e){var i=this.getData(e),n=this.getRawValue(t,e),o=i.getRawIndex(t),a=i.getName(t),r=i.getRawDataItem(t),s=i.getItemVisual(t,"color"),l=i.getItemVisual(t,"borderColor"),u=this.ecModel.getComponent("tooltip"),h=Qo(u&&u.get("renderMode")),c=this.mainType,d="series"===c,f=i.userOutput;return{componentType:c,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:d?this.subType:null,seriesIndex:this.seriesIndex,seriesId:d?this.id:null,seriesName:d?this.name:null,name:a,dataIndex:o,data:r,dataType:e,value:n,color:s,borderColor:l,dimensionNames:f?f.dimensionNames:null,encode:f?f.encode:null,marker:hu({color:s,renderMode:h}),$vars:["seriesName","name","value"]}},getFormattedLabel:function(n,t,e,i,o){t=t||"normal";var a=this.getData(e),r=a.getItemModel(n),s=this.getDataParams(n,e);null!=i&&s.value instanceof Array&&(s.value=s.value[i]);var l=r.get("normal"===t?[o||"label","formatter"]:[t,o||"label","formatter"]);return"function"==typeof l?(s.status=t,s.dimensionIndex=i,l(s)):"string"==typeof l?lu(l,s).replace(Uh,function(t,e){var i=e.length;return"["===e.charAt(0)&&"]"===e.charAt(i-1)&&(e=+e.slice(1,i-1)),Hh(a,n,e)}):void 0},getRawValue:function(t,e){return Hh(this.getData(e),t)},formatTooltip:function(){}};function Yh(t){return new jh(t)}function jh(t){t=t||{},this._reset=t.reset,this._plan=t.plan,this._count=t.count,this._onDirty=t.onDirty,this._dirty=!0,this.context}var qh=jh.prototype;qh.perform=function(t){var e,i=this._upstream,n=t&&t.skip;if(this._dirty&&i){var o=this.context;o.data=o.outputData=i.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this),this._plan&&!n&&(e=this._plan(this.context));var a,r=h(this._modBy),s=this._modDataCount||0,l=h(t&&t.modBy),u=t&&t.modDataCount||0;function h(t){return 1<=t||(t=1),t}r===l&&s===u||(e="reset"),!this._dirty&&"reset"!==e||(this._dirty=!1,a=function(t,e){var i,n;t._dueIndex=t._outputDueEnd=t._dueEnd=0,t._settedOutputEnd=null,!e&&t._reset&&((i=t._reset(t.context))&&i.progress&&(n=i.forceFirstProgress,i=i.progress),L(i)&&!i.length&&(i=null));t._progress=i,t._modBy=t._modDataCount=null;var o=t._downstream;return o&&o.dirty(),n}(this,n)),this._modBy=l,this._modDataCount=u;var c=t&&t.step;if(this._dueEnd=i?i._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var d=this._dueIndex,f=Math.min(null!=c?this._dueIndex+c:1/0,this._dueEnd);if(!n&&(a||d<f)){var p=this._progress;if(L(p))for(var g=0;g<p.length;g++)ac(this,p[g],d,f,l,u);else ac(this,p,d,f,l,u)}this._dueIndex=f;var m=null!=this._settedOutputEnd?this._settedOutputEnd:f;this._outputDueEnd=m}else this._dueIndex=this._outputDueEnd=null!=this._settedOutputEnd?this._settedOutputEnd:this._dueEnd;return this.unfinished()};var Kh,$h,Jh,Qh,tc,ec,ic=ec={reset:function(t,e,i,n){$h=t,Kh=e,Jh=i,Qh=n,tc=Math.ceil(Qh/Jh),ec.next=1<Jh&&0<Qh?oc:nc}};function nc(){return $h<Kh?$h++:null}function oc(){var t=$h%tc*Jh+Math.ceil($h/tc),e=Kh<=$h?null:t<Qh?t:$h;return $h++,e}function ac(t,e,i,n,o,a){ic.reset(i,n,o,a),t._callingProgress=e,t._callingProgress({start:i,end:n,count:n-i,next:ic.next},t.context)}qh.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},qh.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},qh.pipe=function(t){this._downstream===t&&!this._dirty||((this._downstream=t)._upstream=this,t.dirty())},qh.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},qh.getUpstream=function(){return this._upstream},qh.getDownstream=function(){return this._downstream},qh.setOutputEnd=function(t){this._outputDueEnd=this._settedOutputEnd=t};var rc=jo(),sc=ku.extend({type:"series.__base__",seriesIndex:0,coordinateSystem:null,defaultOption:null,legendVisualProvider:null,visualColorAccessPath:"itemStyle.color",visualBorderColorAccessPath:"itemStyle.borderColor",layoutMode:null,init:function(t,e,i,n){this.seriesIndex=this.componentIndex,this.dataTask=Yh({count:uc,reset:hc}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,i),ju(this);var o=this.getInitialData(t,i);dc(o,this),this.dataTask.context.data=o,rc(this).dataBeforeProcessed=o,lc(this)},mergeDefaultAndTheme:function(t,e){var i=this.layoutMode,n=i?Iu(t):{},o=this.subType;ku.hasClass(o)&&(o+="Series"),m(t,e.getTheme().get(this.subType)),m(t,this.getDefaultOption()),Go(t,"label",["show"]),this.fillDataTextStyle(t.data),i&&Mu(t,n,i)},mergeOption:function(t,e){t=m(this.option,t,!0),this.fillDataTextStyle(t.data);var i=this.layoutMode;i&&Mu(this.option,t,i),ju(this);var n=this.getInitialData(t,e);dc(n,this),this.dataTask.dirty(),this.dataTask.context.data=n,rc(this).dataBeforeProcessed=n,lc(this)},fillDataTextStyle:function(t){if(t&&!V(t))for(var e=["show"],i=0;i<t.length;i++)t[i]&&t[i].label&&Go(t[i],"label",e)},getInitialData:function(){},appendData:function(t){this.getRawData().appendData(t.data)},getData:function(t){var e=pc(this);if(e){var i=e.context.data;return null==t?i:i.getLinkedData(t)}return rc(this).data},setData:function(t){var e=pc(this);if(e){var i=e.context;i.data!==t&&e.modifyOutputEnd&&e.setOutputEnd(t.count()),i.outputData=t,e!==this.dataTask&&(i.data=t)}rc(this).data=t},getSource:function(){return function(t){return Yu(t).source}(this)},getRawData:function(){return rc(this).dataBeforeProcessed},getBaseAxis:function(){var t=this.coordinateSystem;return t&&t.getBaseAxis&&t.getBaseAxis()},formatTooltip:function(o,h,t,c){var d=this,e="html"===(c=c||"html")?"<br/>":"\n",f="richText"===c,p={},g=0;function i(t){return{renderMode:c,content:au(tu(t)),style:p}}var m=this.getData(),a=m.mapDimension("defaultedTooltip",!0),n=a.length,r=this.getRawValue(o),s=L(r),v=m.getItemVisual(o,"color");z(v)&&v.colorStops&&(v=(v.colorStops[0]||{}).color),v=v||"transparent";var l=(1<n||s&&!n?function(t){var l=S(t,function(t,e,i){var n=m.getDimensionInfo(i);return t|(n&&!1!==n.tooltip&&null!=n.displayName)},0),u=[];function e(t,e){var i=m.getDimensionInfo(e);if(i&&!1!==i.otherDims.tooltip){var n=i.type,o="sub"+d.seriesIndex+"at"+g,a=hu({color:v,type:"subItem",renderMode:c,markerId:o}),r="string"==typeof a?a:a.content,s=(l?r+au(i.displayName||"-")+": ":"")+au("ordinal"===n?t+"":"time"===n?h?"":du("yyyy/MM/dd hh:mm:ss",t):tu(t));s&&u.push(s),f&&(p[o]=v,++g)}}a.length?E(a,function(t){e(Hh(m,o,t),t)}):E(t,e);var i=l?f?"\n":"<br/>":"",n=i+u.join(i||", ");return{renderMode:c,content:n,style:p}}(r):i(n?Hh(m,o,a[0]):s?r[0]:r)).content,u=d.seriesIndex+"at"+g,y=hu({color:v,type:"item",renderMode:c,markerId:u});p[u]=v,++g;var x=m.getName(o),_=this.name;Uo(this)||(_=""),_=_?au(_)+(h?": ":e):"";var w="string"==typeof y?y:y.content;return{html:h?w+_+l:_+w+(x?au(x)+": "+l:l),markers:p}},isAnimationEnabled:function(){if(v.node)return!1;var t=this.getShallow("animation");return t&&this.getData().count()>this.getShallow("animationThreshold")&&(t=!1),t},restoreData:function(){this.dataTask.dirty()},getColorFromPalette:function(t,e,i){var n=this.ecModel,o=Ru.getColorFromPalette.call(this,t,e,i);return o=o||n.getColorFromPalette(t,e,i)},coordDimToDataDim:function(t){return this.getRawData().mapDimension(t,!0)},getProgressive:function(){return this.get("progressive")},getProgressiveThreshold:function(){return this.get("progressiveThreshold")},getAxisTooltipData:null,getTooltipPosition:null,pipeTask:null,preventIncremental:null,pipelineContext:null});function lc(t){var e=t.name;Uo(t)||(t.name=function(t){var i=t.getRawData(),e=i.mapDimension("seriesName",!0),n=[];return E(e,function(t){var e=i.getDimensionInfo(t);e.displayName&&n.push(e.displayName)}),n.join(" ")}(t)||e)}function uc(t){return t.model.getRawData().count()}function hc(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),cc}function cc(t,e){e.outputData&&t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function dc(e,i){E(e.CHANGABLE_METHODS,function(t){e.wrapMethod(t,T(fc,i))})}function fc(t){var e=pc(t);e&&e.setOutputEnd(this.count())}function pc(t){var e=(t.ecModel||{}).scheduler,i=e&&e.getPipeline(t.uid);if(i){var n=i.currentTask;if(n){var o=n.agentStubMap;o&&(n=o.get(t.uid))}return n}}b(sc,Xh),b(sc,Ru);var gc=function(){this.group=new Ci,this.uid=Nl("viewComponent")};gc.prototype={constructor:gc,init:function(t,e){},render:function(t,e,i,n){},dispose:function(){},filterForExposedEvent:null};var mc=gc.prototype;mc.updateView=mc.updateLayout=mc.updateVisual=function(t,e,i,n){},oa(gc),ua(gc,{registerWhenExtend:!0});function vc(){var s=jo();return function(t){var e=s(t),i=t.pipelineContext,n=e.large,o=e.progressiveRender,a=e.large=i&&i.large,r=e.progressiveRender=i&&i.progressiveRender;return!!(n^a||o^r)&&"reset"}}var yc=jo(),xc=vc();function _c(){this.group=new Ci,this.uid=Nl("viewChart"),this.renderTask=Yh({plan:Mc,reset:Ic}),this.renderTask.context={view:this}}var wc=_c.prototype={type:"chart",init:function(t,e){},render:function(t,e,i,n){},highlight:function(t,e,i,n){Sc(t.getData(),n,"emphasis")},downplay:function(t,e,i,n){Sc(t.getData(),n,"normal")},remove:function(t,e){this.group.removeAll()},dispose:function(){},incrementalPrepareRender:null,incrementalRender:null,updateTransform:null,filterForExposedEvent:null};function bc(t,e,i){if(t&&(t.trigger(e,i),t.isGroup&&!Qs(t)))for(var n=0,o=t.childCount();n<o;n++)bc(t.childAt(n),e,i)}function Sc(e,t,i){var n=Yo(e,t),o=t&&null!=t.highlightKey?tl(t.highlightKey):null;null!=n?E(Vo(n),function(t){bc(e.getItemGraphicEl(t),i,o)}):e.eachItemGraphicEl(function(t){bc(t,i,o)})}function Mc(t){return xc(t.model)}function Ic(t){var e=t.model,i=t.ecModel,n=t.api,o=t.payload,a=e.pipelineContext.progressiveRender,r=t.view,s=o&&yc(o).updateMethod,l=a?"incrementalPrepareRender":s&&r[s]?s:"render";return"render"!==l&&r[l](e,i,n,o),Tc[l]}wc.updateView=wc.updateLayout=wc.updateVisual=function(t,e,i,n){this.render(t,e,i,n)},oa(_c),ua(_c,{registerWhenExtend:!0}),_c.markUpdateMethod=function(t,e){yc(t).updateMethod=e};var Tc={incrementalPrepareRender:{progress:function(t,e){e.view.incrementalRender(t,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(t,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}},Ac="\0__throttleOriginMethod",Dc="\0__throttleRate",Cc="\0__throttleType";function Lc(t,i,n){var o,a,r,s,l,u=0,h=0,c=null;function d(){h=(new Date).getTime(),c=null,t.apply(r,s||[])}i=i||0;function e(){o=(new Date).getTime(),r=this,s=arguments;var t=l||i,e=l||n;l=null,a=o-(e?u:h)-t,clearTimeout(c),e?c=setTimeout(d,t):0<=a?d():c=setTimeout(d,-a),u=o}return e.clear=function(){c&&(clearTimeout(c),c=null)},e.debounceNextCall=function(t){l=t},e}function kc(t,e,i,n){var o=t[e];if(o){var a=o[Ac]||o,r=o[Cc];if(o[Dc]!==i||r!==n){if(null==i||!n)return t[e]=a;(o=t[e]=Lc(a,i,"debounce"===n))[Ac]=a,o[Cc]=n,o[Dc]=i}return o}}function Pc(t,e){var i=t[e];i&&i[Ac]&&(t[e]=i[Ac])}var Nc={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var i=e.getData(),a=(e.visualColorAccessPath||"itemStyle.color").split("."),n=e.get(a),o=!C(n)||n instanceof cs?null:n;n&&!o||(n=e.getColorFromPalette(e.name,null,t.getSeriesCount())),i.setVisual("color",n);var r=(e.visualBorderColorAccessPath||"itemStyle.borderColor").split("."),s=e.get(r);if(i.setVisual("borderColor",s),!t.isSeriesFiltered(e)){o&&i.each(function(t){i.setItemVisual(t,"color",o(e.getDataParams(t)))});return{dataEach:i.hasItemOption?function(t,e){var i=t.getItemModel(e),n=i.get(a,!0),o=i.get(r,!0);null!=n&&t.setItemVisual(e,"color",n),null!=o&&t.setItemVisual(e,"borderColor",o)}:null}}}},Oc={legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType},",withoutName:"第{seriesId}个系列是一个{seriesType},",separator:{middle:";",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:",",end:""}}}},Ec=function(t,e){var a=e.getModel("aria");if(a.get("show"))if(a.get("description"))t.setAttribute("aria-label",a.get("description"));else{var h=0;e.eachSeries(function(t,e){++h},this);var i,c=a.get("data.maxCount")||10,n=a.get("series.maxCount")||10,d=Math.min(h,n);if(!(h<1)){var o=function(){var t=e.getModel("title").option;t&&t.length&&(t=t[0]);return t&&t.text}();i=o?p(g("general.withTitle"),{title:o}):g("general.withoutTitle");var f=[];i+=p(g(1<h?"series.multiple.prefix":"series.single.prefix"),{seriesCount:h}),e.eachSeries(function(t,e){if(e<d){var i,n=t.get("name"),o="series."+(1<h?"multiple":"single")+".";i=p(i=g(n?o+"withName":o+"withoutName"),{seriesId:t.seriesIndex,seriesName:t.get("name"),seriesType:function(t){return Oc.series.typeNames[t]||"自定义图"}(t.subType)});var a=t.getData();(window.data=a).count()>c?i+=p(g("data.partialData"),{displayCnt:c}):i+=g("data.allData");for(var r=[],s=0;s<a.count();s++)if(s<c){var l=a.getName(s),u=Hh(a,s);r.push(p(g(l?"data.withName":"data.withoutName"),{name:l,value:u}))}i+=r.join(g("data.separator.middle"))+g("data.separator.end"),f.push(i)}}),i+=f.join(g("series.multiple.separator.middle"))+g("series.multiple.separator.end"),t.setAttribute("aria-label",i)}}function p(t,e){if("string"!=typeof t)return t;var i=t;return E(e,function(t,e){i=i.replace(new RegExp("\\{\\s*"+e+"\\s*\\}","g"),t)}),i}function g(t){var e=a.get(t);if(null!=e)return e;for(var i=t.split("."),n=Oc.aria,o=0;o<i.length;++o)n=n[i[o]];return n}},Rc=Math.PI;function zc(t,e,i,n){this.ecInstance=t,this.api=e,this.unfinished;i=this._dataProcessorHandlers=i.slice(),n=this._visualHandlers=n.slice();this._allHandlers=i.concat(n),this._stageTaskMap=Q()}var Bc=zc.prototype;function Vc(l,t,u,h,c){var d;function f(t,e){return t.setDirty&&(!t.dirtyMap||t.dirtyMap.get(e.__pipeline.id))}c=c||{},E(t,function(n,t){if(!c.visualType||c.visualType===n.visualType){var e=l._stageTaskMap.get(n.uid),i=e.seriesTaskMap,o=e.overallTask;if(o){var a,r=o.agentStubMap;r.each(function(t){f(c,t)&&(t.dirty(),a=!0)}),a&&o.dirty(),Gc(o,h);var s=l.getPerformArgs(o,c.block);r.each(function(t){t.perform(s)}),d|=o.perform(s)}else i&&i.each(function(t,e){f(c,t)&&t.dirty();var i=l.getPerformArgs(t,c.block);i.skip=!n.performRawSeries&&u.isSeriesFiltered(t.context.model),Gc(t,h),d|=t.perform(i)})}}),l.unfinished|=d}Bc.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each(function(t){var e=t.overallTask;e&&e.dirty()})},Bc.getPerformArgs=function(t,e){if(t.__pipeline){var i=this._pipelineMap.get(t.__pipeline.id),n=i.context,o=!e&&i.progressiveEnabled&&(!n||n.progressiveRender)&&t.__idxInPipeline>i.blockIndex?i.step:null,a=n&&n.modDataCount;return{step:o,modBy:null!=a?Math.ceil(a/o):null,modDataCount:a}}},Bc.getPipeline=function(t){return this._pipelineMap.get(t)},Bc.updateStreamModes=function(t,e){var i=this._pipelineMap.get(t.uid),n=t.getData().count(),o=i.progressiveEnabled&&e.incrementalPrepareRender&&n>=i.threshold,a=t.get("large")&&n>=t.get("largeThreshold"),r="mod"===t.get("progressiveChunkMode")?n:null;t.pipelineContext=i.context={progressiveRender:o,modDataCount:r,large:a}},Bc.restorePipelines=function(t){var n=this,o=n._pipelineMap=Q();t.eachSeries(function(t){var e=t.getProgressive(),i=t.uid;o.set(i,{id:i,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:e&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(e||700),count:0}),Kc(n,t,t.dataTask)})},Bc.prepareStageTasks=function(){var i=this._stageTaskMap,n=this.ecInstance.getModel(),o=this.api;E(this._allHandlers,function(t){var e=i.get(t.uid)||i.set(t.uid,[]);t.reset&&function(n,o,t,a,r){var s=t.seriesTaskMap||(t.seriesTaskMap=Q()),e=o.seriesType,i=o.getTargetSeries;o.createOnAllSeries?a.eachRawSeries(l):e?a.eachRawSeriesByType(e,l):i&&i(a,r).each(l);function l(t){var e=t.uid,i=s.get(e)||s.set(e,Yh({plan:Uc,reset:Xc,count:qc}));i.context={model:t,ecModel:a,api:r,useClearVisual:o.isVisual&&!o.isLayout,plan:o.plan,reset:o.reset,scheduler:n},Kc(n,t,i)}var u=n._pipelineMap;s.each(function(t,e){u.get(e)||(t.dispose(),s.removeKey(e))})}(this,t,e,n,o),t.overallReset&&function(n,t,e,i,o){var a=e.overallTask=e.overallTask||Yh({reset:Fc});a.context={ecModel:i,api:o,overallReset:t.overallReset,scheduler:n};var r=a.agentStubMap=a.agentStubMap||Q(),s=t.seriesType,l=t.getTargetSeries,u=!0,h=t.modifyOutputEnd;s?i.eachRawSeriesByType(s,c):l?l(i,o).each(c):(u=!1,E(i.getSeries(),c));function c(t){var e=t.uid,i=r.get(e);i||(i=r.set(e,Yh({reset:Wc,onDirty:Zc})),a.dirty()),i.context={model:t,overallProgress:u,modifyOutputEnd:h},i.agent=a,i.__block=u,Kc(n,t,i)}var d=n._pipelineMap;r.each(function(t,e){d.get(e)||(t.dispose(),a.dirty(),r.removeKey(e))})}(this,t,e,n,o)},this)},Bc.prepareView=function(t,e,i,n){var o=t.renderTask,a=o.context;a.model=e,a.ecModel=i,a.api=n,o.__block=!t.incrementalPrepareRender,Kc(this,e,o)},Bc.performDataProcessorTasks=function(t,e){Vc(this,this._dataProcessorHandlers,t,e,{block:!0})},Bc.performVisualTasks=function(t,e,i){Vc(this,this._visualHandlers,t,e,i)},Bc.performSeriesTasks=function(t){var e;t.eachSeries(function(t){e|=t.dataTask.perform()}),this.unfinished|=e},Bc.plan=function(){this._pipelineMap.each(function(t){var e=t.tail;do{if(e.__block){t.blockIndex=e.__idxInPipeline;break}e=e.getUpstream()}while(e)})};var Gc=Bc.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)};function Fc(t){t.overallReset(t.ecModel,t.api,t.payload)}function Wc(t,e){return t.overallProgress&&Hc}function Hc(){this.agent.dirty(),this.getDownstream().dirty()}function Zc(){this.agent&&this.agent.dirty()}function Uc(t){return t.plan&&t.plan(t.model,t.ecModel,t.api,t.payload)}function Xc(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=Vo(t.reset(t.model,t.ecModel,t.api,t.payload));return 1<e.length?O(e,function(t,e){return jc(e)}):Yc}var Yc=jc(0);function jc(a){return function(t,e){var i=e.data,n=e.resetDefines[a];if(n&&n.dataEach)for(var o=t.start;o<t.end;o++)n.dataEach(i,o);else n&&n.progress&&n.progress(t,i)}}function qc(t){return t.data.count()}function Kc(t,e,i){var n=e.uid,o=t._pipelineMap.get(n);o.head||(o.head=i),o.tail&&o.tail.pipe(i),(o.tail=i).__idxInPipeline=o.count++,i.__pipeline=o}zc.wrapStageHandler=function(t,e){return C(t)&&(t={overallReset:t,seriesType:function(t){$c=null;try{t(Jc,Qc)}catch(t){}return $c}(t)}),t.uid=Nl("stageHandler"),e&&(t.visualType=e),t};var $c,Jc={},Qc={};function td(t,e){for(var i in e.prototype)t[i]=et}td(Jc,ih),td(Qc,rh),Jc.eachSeriesByType=Jc.eachRawSeriesByType=function(t){$c=t},Jc.eachComponent=function(t){"series"===t.mainType&&t.subType&&($c=t.subType)};function ed(){return{axisLine:{lineStyle:{color:od}},axisTick:{lineStyle:{color:od}},axisLabel:{textStyle:{color:od}},splitLine:{lineStyle:{type:"dashed",color:"#aaa"}},splitArea:{areaStyle:{color:od}}}}var id=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"],nd={color:id,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],id]},od="#eee",ad=["#dd6b66","#759aa0","#e69d87","#8dc1a9","#ea7e53","#eedd78","#73a373","#73b9bc","#7289ab","#91ca8c","#f49f42"],rd={color:ad,backgroundColor:"#333",tooltip:{axisPointer:{lineStyle:{color:od},crossStyle:{color:od},label:{color:"#000"}}},legend:{textStyle:{color:od}},textStyle:{color:od},title:{textStyle:{color:od}},toolbox:{iconStyle:{normal:{borderColor:od}}},dataZoom:{textStyle:{color:od}},visualMap:{textStyle:{color:od}},timeline:{lineStyle:{color:od},itemStyle:{normal:{color:ad[1]}},label:{normal:{textStyle:{color:od}}},controlStyle:{normal:{color:od,borderColor:od}}},timeAxis:ed(),logAxis:ed(),valueAxis:ed(),categoryAxis:ed(),line:{symbol:"circle"},graph:{color:ad},gauge:{title:{textStyle:{color:od}}},candlestick:{itemStyle:{normal:{color:"#FD1050",color0:"#0CF49B",borderColor:"#FD1050",borderColor0:"#0CF49B"}}}};rd.categoryAxis.splitLine.show=!1,ku.extend({type:"dataset",defaultOption:{seriesLayoutBy:Hu,sourceHeader:null,dimensions:null,source:null},optionUpdated:function(){!function(t){var e=t.option.source,i=Fu;if(V(e))i=Wu;else if(L(e)){0===e.length&&(i=Bu);for(var n=0,o=e.length;n<o;n++){var a=e[n];if(null!=a){if(L(a)){i=Bu;break}if(z(a)){i=Vu;break}}}}else if(z(e)){for(var r in e)if(e.hasOwnProperty(r)&&N(e[r])){i=Gu;break}}else if(null!=e)throw new Error("Invalid data");Yu(t).sourceFormat=i}(this)}}),gc.extend({type:"dataset"});var sd=Ar.extend({type:"ellipse",shape:{cx:0,cy:0,rx:0,ry:0},buildPath:function(t,e){var i=e.cx,n=e.cy,o=e.rx,a=e.ry,r=.5522848*o,s=.5522848*a;t.moveTo(i-o,n),t.bezierCurveTo(i-o,n-s,i-r,n-a,i,n-a),t.bezierCurveTo(i+r,n-a,i+o,n-s,i+o,n),t.bezierCurveTo(i+o,n+s,i+r,n+a,i,n+a),t.bezierCurveTo(i-r,n+a,i-o,n+s,i-o,n),t.closePath()}}),ld=/[\s,]+/;function ud(t){R(t)&&(t=(new DOMParser).parseFromString(t,"text/xml"));for(9===t.nodeType&&(t=t.firstChild);"svg"!==t.nodeName.toLowerCase()||1!==t.nodeType;)t=t.nextSibling;return t}function hd(){this._defs={},this._root=null,this._isDefine=!1,this._isText=!1}hd.prototype.parse=function(t,e){e=e||{};var i=ud(t);if(!i)throw new Error("Illegal svg");var n=new Ci;this._root=n;var o=i.getAttribute("viewBox")||"",a=parseFloat(i.getAttribute("width")||e.width),r=parseFloat(i.getAttribute("height")||e.height);isNaN(a)&&(a=null),isNaN(r)&&(r=null),md(i,n,null,!0);for(var s,l,u=i.firstChild;u;)this._parseNode(u,n),u=u.nextSibling;if(o){var h=j(o).split(ld);4<=h.length&&(s={x:parseFloat(h[0]||0),y:parseFloat(h[1]||0),width:parseFloat(h[2]),height:parseFloat(h[3])})}if(s&&null!=a&&null!=r&&(l=wd(s,a,r),!e.ignoreViewBox)){var c=n;(n=new Ci).add(c),c.scale=l.scale.slice(),c.position=l.position.slice()}return e.ignoreRootClip||null==a||null==r||n.setClipPath(new rs({shape:{x:0,y:0,width:a,height:r}})),{root:n,width:a,height:r,viewBoxRect:s,viewBoxTransform:l}},hd.prototype._parseNode=function(t,e){var i,n,o=t.nodeName.toLowerCase();if("defs"===o?this._isDefine=!0:"text"===o&&(this._isText=!0),this._isDefine){if(n=dd[o]){var a=n.call(this,t),r=t.getAttribute("id");r&&(this._defs[r]=a)}}else(n=cd[o])&&(i=n.call(this,t,e),e.add(i));for(var s=t.firstChild;s;)1===s.nodeType&&this._parseNode(s,i),3===s.nodeType&&this._isText&&this._parseText(s,i),s=s.nextSibling;"defs"===o?this._isDefine=!1:"text"===o&&(this._isText=!1)},hd.prototype._parseText=function(t,e){if(1===t.nodeType){var i=t.getAttribute("dx")||0,n=t.getAttribute("dy")||0;this._textX+=parseFloat(i),this._textY+=parseFloat(n)}var o=new Ur({style:{text:t.textContent,transformText:!0},position:[this._textX||0,this._textY||0]});fd(e,o),md(t,o,this._defs);var a=o.style.fontSize;a&&a<9&&(o.style.fontSize=9,o.scale=o.scale||[1,1],o.scale[0]*=a/9,o.scale[1]*=a/9);var r=o.getBoundingRect();return this._textX+=r.width,e.add(o),o};var cd={g:function(t,e){var i=new Ci;return fd(e,i),md(t,i,this._defs),i},rect:function(t,e){var i=new rs;return fd(e,i),md(t,i,this._defs),i.setShape({x:parseFloat(t.getAttribute("x")||0),y:parseFloat(t.getAttribute("y")||0),width:parseFloat(t.getAttribute("width")||0),height:parseFloat(t.getAttribute("height")||0)}),i},circle:function(t,e){var i=new Yr;return fd(e,i),md(t,i,this._defs),i.setShape({cx:parseFloat(t.getAttribute("cx")||0),cy:parseFloat(t.getAttribute("cy")||0),r:parseFloat(t.getAttribute("r")||0)}),i},line:function(t,e){var i=new ls;return fd(e,i),md(t,i,this._defs),i.setShape({x1:parseFloat(t.getAttribute("x1")||0),y1:parseFloat(t.getAttribute("y1")||0),x2:parseFloat(t.getAttribute("x2")||0),y2:parseFloat(t.getAttribute("y2")||0)}),i},ellipse:function(t,e){var i=new sd;return fd(e,i),md(t,i,this._defs),i.setShape({cx:parseFloat(t.getAttribute("cx")||0),cy:parseFloat(t.getAttribute("cy")||0),rx:parseFloat(t.getAttribute("rx")||0),ry:parseFloat(t.getAttribute("ry")||0)}),i},polygon:function(t,e){var i=t.getAttribute("points");i=i&&pd(i);var n=new Qr({shape:{points:i||[]}});return fd(e,n),md(t,n,this._defs),n},polyline:function(t,e){var i=new Ar;fd(e,i),md(t,i,this._defs);var n=t.getAttribute("points");return n=n&&pd(n),new ts({shape:{points:n||[]}})},image:function(t,e){var i=new Qn;return fd(e,i),md(t,i,this._defs),i.setStyle({image:t.getAttribute("xlink:href"),x:t.getAttribute("x"),y:t.getAttribute("y"),width:t.getAttribute("width"),height:t.getAttribute("height")}),i},text:function(t,e){var i=t.getAttribute("x")||0,n=t.getAttribute("y")||0,o=t.getAttribute("dx")||0,a=t.getAttribute("dy")||0;this._textX=parseFloat(i)+parseFloat(o),this._textY=parseFloat(n)+parseFloat(a);var r=new Ci;return fd(e,r),md(t,r,this._defs),r},tspan:function(t,e){var i=t.getAttribute("x"),n=t.getAttribute("y");null!=i&&(this._textX=parseFloat(i)),null!=n&&(this._textY=parseFloat(n));var o=t.getAttribute("dx")||0,a=t.getAttribute("dy")||0,r=new Ci;return fd(e,r),md(t,r,this._defs),this._textX+=o,this._textY+=a,r},path:function(t,e){var i=Zr(t.getAttribute("d")||"");return fd(e,i),md(t,i,this._defs),i}},dd={lineargradient:function(t){var e=parseInt(t.getAttribute("x1")||0,10),i=parseInt(t.getAttribute("y1")||0,10),n=parseInt(t.getAttribute("x2")||10,10),o=parseInt(t.getAttribute("y2")||0,10),a=new gs(e,i,n,o);return function(t,e){var i=t.firstChild;for(;i;){if(1===i.nodeType){var n=i.getAttribute("offset");n=0<n.indexOf("%")?parseInt(n,10)/100:n?parseFloat(n):0;var o=i.getAttribute("stop-color")||"#000000";e.addColorStop(n,o)}i=i.nextSibling}}(t,a),a},radialgradient:function(t){}};function fd(t,e){t&&t.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),D(e.__inheritedStyle,t.__inheritedStyle))}function pd(t){for(var e=j(t).split(ld),i=[],n=0;n<e.length;n+=2){var o=parseFloat(e[n]),a=parseFloat(e[n+1]);i.push([o,a])}return i}var gd={fill:"fill",stroke:"stroke","stroke-width":"lineWidth",opacity:"opacity","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterLimit","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","text-align":"textAlign","alignment-baseline":"textBaseline"};function md(t,e,i,n){var o=e.__inheritedStyle||{},a="text"===e.type;if(1===t.nodeType&&(function(t,e){var i=t.getAttribute("transform");if(i){i=i.replace(/,/g," ");var n=null,o=[];i.replace(xd,function(t,e,i){o.push(e,i)});for(var a=o.length-1;0<a;a-=2){var r=o[a],s=o[a-1];switch(n=n||ae(),s){case"translate":r=j(r).split(ld),ue(n,n,[parseFloat(r[0]),parseFloat(r[1]||0)]);break;case"scale":r=j(r).split(ld),ce(n,n,[parseFloat(r[0]),parseFloat(r[1]||r[0])]);break;case"rotate":r=j(r).split(ld),he(n,n,parseFloat(r[0]));break;case"skew":r=j(r).split(ld),console.warn("Skew transform is not supported yet");break;case"matrix":r=j(r).split(ld);n[0]=parseFloat(r[0]),n[1]=parseFloat(r[1]),n[2]=parseFloat(r[2]),n[3]=parseFloat(r[3]),n[4]=parseFloat(r[4]),n[5]=parseFloat(r[5])}}e.setLocalTransform(n)}}(t,e),P(o,function(t){var e=t.getAttribute("style"),i={};if(!e)return i;var n,o={};_d.lastIndex=0;for(;null!=(n=_d.exec(e));)o[n[1]]=n[2];for(var a in gd)gd.hasOwnProperty(a)&&null!=o[a]&&(i[gd[a]]=o[a]);return i}(t)),!n))for(var r in gd)if(gd.hasOwnProperty(r)){var s=t.getAttribute(r);null!=s&&(o[gd[r]]=s)}var l=a?"textFill":"fill",u=a?"textStroke":"stroke";e.style=e.style||new Ui;var h=e.style;null!=o.fill&&h.set(l,yd(o.fill,i)),null!=o.stroke&&h.set(u,yd(o.stroke,i)),E(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],function(t){var e="lineWidth"===t&&a?"textStrokeWidth":t;null!=o[t]&&h.set(e,parseFloat(o[t]))}),o.textBaseline&&"auto"!==o.textBaseline||(o.textBaseline="alphabetic"),"alphabetic"===o.textBaseline&&(o.textBaseline="bottom"),"start"===o.textAlign&&(o.textAlign="left"),"end"===o.textAlign&&(o.textAlign="right"),E(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign","textBaseline"],function(t){null!=o[t]&&h.set(t,o[t])}),o.lineDash&&(e.style.lineDash=j(o.lineDash).split(ld)),h[u]&&"none"!==h[u]&&(e[u]=!0),e.__inheritedStyle=o}var vd=/url\(\s*#(.*?)\)/;function yd(t,e){var i=e&&t&&t.match(vd);return i?e[j(i[1])]:t}var xd=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.e,]*)\)/g;var _d=/([^\s:;]+)\s*:\s*([^:;]+)/g;function wd(t,e,i){var n=e/t.width,o=i/t.height,a=Math.min(n,o);return{scale:[a,a],position:[-(t.x+t.width/2)*a+e/2,-(t.y+t.height/2)*a+i/2]}}var bd=Q(),Sd={registerMap:function(t,e,i){var n;return E(n=L(e)?e:e.svg?[{type:"svg",source:e.svg,specialAreas:e.specialAreas}]:(e.geoJson&&!e.features&&(i=e.specialAreas,e=e.geoJson),[{type:"geoJSON",source:e,specialAreas:i}]),function(t){var e=t.type;"geoJson"===e&&(e=t.type="geoJSON"),(0,Md[e])(t)}),bd.set(t,n)},retrieveMap:function(t){return bd.get(t)}},Md={geoJSON:function(t){var e=t.source;t.geoJSON=R(e)?"undefined"!=typeof JSON&&JSON.parse?JSON.parse(e):new Function("return ("+e+");")():e},svg:function(t){t.svgXML=ud(t.source)}},Id=Y,Td=E,Ad=C,Dd=z,Cd=ku.parseClassType,Ld={PROCESSOR:{FILTER:1e3,SERIES_FILTER:800,STATISTIC:5e3},VISUAL:{LAYOUT:1e3,PROGRESSIVE_LAYOUT:1100,GLOBAL:2e3,CHART:3e3,POST_CHART_LAYOUT:3500,COMPONENT:4e3,BRUSH:5e3}},kd="__flagInMainProcess",Pd="__optionUpdated",Nd=/^[a-zA-Z0-9_]+$/;function Od(n,o){return function(t,e,i){!o&&this._disposed||(t=t&&t.toLowerCase(),Ct.prototype[n].call(this,t,e,i))}}function Ed(){Ct.call(this)}function Rd(t,e,i){i=i||{},"string"==typeof e&&(e=sf[e]),this.id,this.group,this._dom=t;var n=this._zr=ko(t,{renderer:i.renderer||"canvas",devicePixelRatio:i.devicePixelRatio,width:i.width,height:i.height});this._throttledZrFlush=Lc(A(n.flush,n),17),(e=k(e))&&Lh(e,!0),this._theme=e,this._chartsViews=[],this._chartsMap={},this._componentsViews=[],this._componentsMap={},this._coordSysMgr=new lh;var o=this._api=function(i){var t=i._coordSysMgr;return P(new rh(i),{getCoordinateSystems:A(t.getCoordinateSystems,t),getComponentByElement:function(t){for(;t;){var e=t.__ecComponentInfo;if(null!=e)return i._model.getComponent(e.mainType,e.index);t=t.parent}}})}(this);function a(t,e){return t.__prio-e.__prio}zi(rf,a),zi(nf,a),this._scheduler=new zc(this,o,nf,rf),Ct.call(this,this._ecEventProcessor=new Qd),this._messageCenter=new Ed,this._initEvents(),this.resize=A(this.resize,this),this._pendingActions=[],n.animation.on("frame",this._onframe,this),function(t,e){t.on("rendered",function(){e.trigger("rendered"),!t.animation.isFinished()||e[Pd]||e._scheduler.unfinished||e._pendingActions.length||e.trigger("finished")})}(n,this),K(this)}Ed.prototype.on=Od("on",!0),Ed.prototype.off=Od("off",!0),Ed.prototype.one=Od("one",!0),b(Ed,Ct);var zd=Rd.prototype;function Bd(t,e,i){if(!this._disposed){var n,o=this._model,a=this._coordSysMgr.getCoordinateSystems();e=Ko(o,e);for(var r=0;r<a.length;r++){var s=a[r];if(s[t]&&null!=(n=s[t](o,e,i)))return n}}}zd._onframe=function(){if(!this._disposed){var t=this._scheduler;if(this[Pd]){var e=this[Pd].silent;this[kd]=!0,Gd(this),Vd.update.call(this),this[kd]=!1,this[Pd]=!1,Zd.call(this,e),Ud.call(this,e)}else if(t.unfinished){var i=1,n=this._model,o=this._api;t.unfinished=!1;do{var a=+new Date;t.performSeriesTasks(n),t.performDataProcessorTasks(n),Wd(this,n),t.performVisualTasks(n),qd(this,this._model,o,"remain"),i-=+new Date-a}while(0<i&&t.unfinished);t.unfinished||this._zr.flush()}}},zd.getDom=function(){return this._dom},zd.getZr=function(){return this._zr},zd.setOption=function(t,e,i){if(!this._disposed){var n;if(Dd(e)&&(i=e.lazyUpdate,n=e.silent,e=e.notMerge),this[kd]=!0,!this._model||e){var o=new ph(this._api),a=this._theme,r=this._model=new ih;r.scheduler=this._scheduler,r.init(null,null,a,o)}this._model.setOption(t,of),i?(this[Pd]={silent:n},this[kd]=!1):(Gd(this),Vd.update.call(this),this._zr.flush(),this[Pd]=!1,this[kd]=!1,Zd.call(this,n),Ud.call(this,n))}},zd.setTheme=function(){console.error("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},zd.getModel=function(){return this._model},zd.getOption=function(){return this._model&&this._model.getOption()},zd.getWidth=function(){return this._zr.getWidth()},zd.getHeight=function(){return this._zr.getHeight()},zd.getDevicePixelRatio=function(){return this._zr.painter.dpr||window.devicePixelRatio||1},zd.getRenderedCanvas=function(t){if(v.canvasSupported)return(t=t||{}).pixelRatio=t.pixelRatio||1,t.backgroundColor=t.backgroundColor||this._model.get("backgroundColor"),this._zr.painter.getRenderedCanvas(t)},zd.getSvgDataURL=function(){if(v.svgSupported){var t=this._zr;return E(t.storage.getDisplayList(),function(t){t.stopAnimation(!0)}),t.painter.toDataURL()}},zd.getDataURL=function(t){if(!this._disposed){var e=(t=t||{}).excludeComponents,i=this._model,n=[],o=this;Td(e,function(t){i.eachComponent({mainType:t},function(t){var e=o._componentsMap[t.__viewId];e.group.ignore||(n.push(e),e.group.ignore=!0)})});var a="svg"===this._zr.painter.getType()?this.getSvgDataURL():this.getRenderedCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return Td(n,function(t){t.group.ignore=!1}),a}},zd.getConnectedDataURL=function(o){if(!this._disposed&&v.canvasSupported){var a="svg"===o.type,r=this.group,s=Math.min,l=Math.max;if(hf[r]){var u=1/0,h=1/0,c=-1/0,d=-1/0,f=[],i=o&&o.pixelRatio||1;E(uf,function(t,e){if(t.group===r){var i=a?t.getZr().painter.getSvgDom().innerHTML:t.getRenderedCanvas(k(o)),n=t.getDom().getBoundingClientRect();u=s(n.left,u),h=s(n.top,h),c=l(n.right,c),d=l(n.bottom,d),f.push({dom:i,left:n.left,top:n.top})}});var t=(c*=i)-(u*=i),e=(d*=i)-(h*=i),n=y(),p=ko(n,{renderer:a?"svg":"canvas"});if(p.resize({width:t,height:e}),a){var g="";return Td(f,function(t){var e=t.left-u,i=t.top-h;g+='<g transform="translate('+e+","+i+')">'+t.dom+"</g>"}),p.painter.getSvgRoot().innerHTML=g,o.connectedBackgroundColor&&p.painter.setBackgroundColor(o.connectedBackgroundColor),p.refreshImmediately(),p.painter.toDataURL()}return o.connectedBackgroundColor&&p.add(new rs({shape:{x:0,y:0,width:t,height:e},style:{fill:o.connectedBackgroundColor}})),Td(f,function(t){var e=new Qn({style:{x:t.left*i-u,y:t.top*i-h,image:t.dom}});p.add(e)}),p.refreshImmediately(),n.toDataURL("image/"+(o&&o.type||"png"))}return this.getDataURL(o)}},zd.convertToPixel=T(Bd,"convertToPixel"),zd.convertFromPixel=T(Bd,"convertFromPixel"),zd.containPixel=function(t,o){var a;if(!this._disposed)return E(t=Ko(this._model,t),function(t,n){0<=n.indexOf("Models")&&E(t,function(t){var e=t.coordinateSystem;if(e&&e.containPoint)a|=!!e.containPoint(o);else if("seriesModels"===n){var i=this._chartsMap[t.__viewId];i&&i.containPoint&&(a|=i.containPoint(o,t))}},this)},this),!!a},zd.getVisual=function(t,e){var i=(t=Ko(this._model,t,{defaultMainType:"series"})).seriesModel.getData(),n=t.hasOwnProperty("dataIndexInside")?t.dataIndexInside:t.hasOwnProperty("dataIndex")?i.indexOfRawIndex(t.dataIndex):null;return null!=n?i.getItemVisual(n,e):i.getVisual(e)},zd.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},zd.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]};var Vd={prepareAndUpdate:function(t){Gd(this),Vd.update.call(this,t)},update:function(t){var e=this._model,i=this._api,n=this._zr,o=this._coordSysMgr,a=this._scheduler;if(e){a.restoreData(e,t),a.performSeriesTasks(e),o.create(e,i),a.performDataProcessorTasks(e,t),Wd(this,e),o.update(e,i),Yd(e),a.performVisualTasks(e,t),jd(this,e,i,t);var r=e.get("backgroundColor")||"transparent";if(v.canvasSupported)n.setBackgroundColor(r);else{var s=Fe(r);r=$e(s,"rgb"),0===s[3]&&(r="transparent")}Kd(e,i)}},updateTransform:function(o){var a=this._model,r=this,s=this._api;if(a){var l=[];a.eachComponent(function(t,e){var i=r.getViewOfComponentModel(e);if(i&&i.__alive)if(i.updateTransform){var n=i.updateTransform(e,a,s,o);n&&n.update&&l.push(i)}else l.push(i)});var n=Q();a.eachSeries(function(t){var e=r._chartsMap[t.__viewId];if(e.updateTransform){var i=e.updateTransform(t,a,s,o);i&&i.update&&n.set(t.uid,1)}else n.set(t.uid,1)}),Yd(a),this._scheduler.performVisualTasks(a,o,{setDirty:!0,dirtyMap:n}),qd(r,a,s,o,n),Kd(a,this._api)}},updateView:function(t){var e=this._model;e&&(_c.markUpdateMethod(t,"updateView"),Yd(e),this._scheduler.performVisualTasks(e,t,{setDirty:!0}),jd(this,this._model,this._api,t),Kd(e,this._api))},updateVisual:function(t){Vd.update.call(this,t)},updateLayout:function(t){Vd.update.call(this,t)}};function Gd(t){var e=t._model,i=t._scheduler;i.restorePipelines(e),i.prepareStageTasks(),Xd(t,"component",e,i),Xd(t,"chart",e,i),i.plan()}function Fd(e,i,n,o,t){var a=e._model;if(o){var r={};r[o+"Id"]=n[o+"Id"],r[o+"Index"]=n[o+"Index"],r[o+"Name"]=n[o+"Name"];var s={mainType:o,query:r};t&&(s.subType=t);var l=n.excludeSeriesId;null!=l&&(l=Q(Vo(l))),a&&a.eachComponent(s,function(t){l&&null!=l.get(t.id)||u(e["series"===o?"_chartsMap":"_componentsMap"][t.__viewId])},e)}else Td(e._componentsViews.concat(e._chartsViews),u);function u(t){t&&t.__alive&&t[i]&&t[i](t.__model,a,e._api,n)}}function Wd(t,e){var i=t._chartsMap,n=t._scheduler;e.eachSeries(function(t){n.updateStreamModes(t,i[t.__viewId])})}function Hd(e,t){var i=e.type,n=e.escapeConnect,o=tf[i],a=o.actionInfo,r=(a.update||"update").split(":"),s=r.pop();r=null!=r[0]&&Cd(r[0]),this[kd]=!0;var l=[e],u=!1;e.batch&&(u=!0,l=O(e.batch,function(t){return(t=D(P({},t),e)).batch=null,t}));var h,c=[],d="highlight"===i||"downplay"===i;Td(l,function(t){(h=(h=o.action(t,this._model,this._api))||P({},t)).type=a.event||h.type,c.push(h),d?Fd(this,s,t,"series"):r&&Fd(this,s,t,r.main,r.sub)},this),"none"===s||d||r||(this[Pd]?(Gd(this),Vd.update.call(this,e),this[Pd]=!1):Vd[s].call(this,e)),h=u?{type:a.event||i,escapeConnect:n,batch:c}:c[0],this[kd]=!1,t||this._messageCenter.trigger(h.type,h)}function Zd(t){for(var e=this._pendingActions;e.length;){var i=e.shift();Hd.call(this,i,t)}}function Ud(t){t||this.trigger("updated")}function Xd(t,e,o,a){for(var r="component"===e,s=r?t._componentsViews:t._chartsViews,l=r?t._componentsMap:t._chartsMap,u=t._zr,h=t._api,i=0;i<s.length;i++)s[i].__alive=!1;function n(t){var e="_ec_"+t.id+"_"+t.type,i=l[e];if(!i){var n=Cd(t.type);(i=new(r?gc.getClass(n.main,n.sub):_c.getClass(n.sub))).init(o,h),l[e]=i,s.push(i),u.add(i.group)}t.__viewId=i.__id=e,i.__alive=!0,i.__model=t,i.group.__ecComponentInfo={mainType:t.mainType,index:t.componentIndex},r||a.prepareView(i,t,o,h)}r?o.eachComponent(function(t,e){"series"!==t&&n(e)}):o.eachSeries(n);for(i=0;i<s.length;){var c=s[i];c.__alive?i++:(r||c.renderTask.dispose(),u.remove(c.group),c.dispose(o,h),s.splice(i,1),delete l[c.__id],c.__id=c.group.__ecComponentInfo=null)}}function Yd(t){t.clearColorPalette(),t.eachSeries(function(t){t.clearColorPalette()})}function jd(t,e,i,n){!function(t,i,n,o,e){Td(e||t._componentsViews,function(t){var e=t.__model;t.render(e,i,n,o),Jd(e,t)})}(t,e,i,n),Td(t._chartsViews,function(t){t.__alive=!1}),qd(t,e,i,n),Td(t._chartsViews,function(t){t.__alive||t.remove(e,i)})}function qd(n,t,e,o,a){var r,s=n._scheduler;t.eachSeries(function(t){var e=n._chartsMap[t.__viewId];e.__alive=!0;var i=e.renderTask;s.updatePayload(i,o),a&&a.get(t.uid)&&i.dirty(),r|=i.perform(s.getPerformArgs(i)),e.group.silent=!!t.get("silent"),Jd(t,e),function(t,e){var i=t.get("blendMode")||null;e.group.traverse(function(t){t.isGroup||t.style.blend!==i&&t.setStyle("blend",i),t.eachPendingDisplayable&&t.eachPendingDisplayable(function(t){t.setStyle("blend",i)})})}(t,e)}),s.unfinished|=r,function(i,t){var e=i._zr.storage,n=0;e.traverse(function(t){n++}),n>t.get("hoverLayerThreshold")&&!v.node&&t.eachSeries(function(t){if(!t.preventUsingHoverLayer){var e=i._chartsMap[t.__viewId];e.__alive&&e.group.traverse(function(t){t.useHoverLayer=!0})}})}(n,t),Ec(n._zr.dom,t)}function Kd(e,i){Td(af,function(t){t(e,i)})}zd.resize=function(t){if(!this._disposed){this._zr.resize(t);var e=this._model;if(this._loadingFX&&this._loadingFX.resize(),e){var i=e.resetOption("media"),n=t&&t.silent;this[kd]=!0,i&&Gd(this),Vd.update.call(this),this[kd]=!1,Zd.call(this,n),Ud.call(this,n)}}},zd.showLoading=function(t,e){if(!this._disposed&&(Dd(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),lf[t])){var i=lf[t](this._api,e),n=this._zr;this._loadingFX=i,n.add(i)}},zd.hideLoading=function(){this._disposed||(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},zd.makeActionFromEvent=function(t){var e=P({},t);return e.type=ef[t.type],e},zd.dispatchAction=function(t,e){this._disposed||(Dd(e)||(e={silent:!!e}),tf[t.type]&&this._model&&(this[kd]?this._pendingActions.push(t):(Hd.call(this,t,e.silent),e.flush?this._zr.flush(!0):!1!==e.flush&&v.browser.weChat&&this._throttledZrFlush(),Zd.call(this,e.silent),Ud.call(this,e.silent))))},zd.appendData=function(t){if(!this._disposed){var e=t.seriesIndex;this.getModel().getSeriesByIndex(e).appendData(t),this._scheduler.unfinished=!0}},zd.on=Od("on",!1),zd.off=Od("off",!1),zd.one=Od("one",!1);var $d=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];function Jd(t,e){var i=t.get("z"),n=t.get("zlevel");e.group.traverse(function(t){"group"!==t.type&&(null!=i&&(t.z=i),null!=n&&(t.zlevel=n))})}function Qd(){this.eventInfo}zd._initEvents=function(){Td($d,function(u){function t(t){var e,i=this.getModel(),n=t.target;if("globalout"===u)e={};else if(n&&null!=n.dataIndex){var o=n.dataModel||i.getSeriesByIndex(n.seriesIndex);e=o&&o.getDataParams(n.dataIndex,n.dataType,n)||{}}else n&&n.eventData&&(e=P({},n.eventData));if(e){var a=e.componentType,r=e.componentIndex;"markLine"!==a&&"markPoint"!==a&&"markArea"!==a||(a="series",r=e.seriesIndex);var s=a&&null!=r&&i.getComponent(a,r),l=s&&this["series"===s.mainType?"_chartsMap":"_componentsMap"][s.__viewId];e.event=t,e.type=u,this._ecEventProcessor.eventInfo={targetEl:n,packedEvent:e,model:s,view:l},this.trigger(u,e)}}t.zrEventfulCallAtLast=!0,this._zr.on(u,t,this)},this),Td(ef,function(t,e){this._messageCenter.on(e,function(t){this.trigger(e,t)},this)},this)},zd.isDisposed=function(){return this._disposed},zd.clear=function(){this._disposed||this.setOption({series:[]},!0)},zd.dispose=function(){if(!this._disposed){this._disposed=!0,Jo(this.getDom(),ff,"");var e=this._api,i=this._model;Td(this._componentsViews,function(t){t.dispose(i,e)}),Td(this._chartsViews,function(t){t.dispose(i,e)}),this._zr.dispose(),delete uf[this.id]}},b(Rd,Ct),Qd.prototype={constructor:Qd,normalizeQuery:function(t){var s={},l={},u={};if(R(t)){var e=Cd(t);s.mainType=e.main||null,s.subType=e.sub||null}else{var h=["Index","Name","Id"],c={name:1,dataIndex:1,dataType:1};E(t,function(t,e){for(var i=!1,n=0;n<h.length;n++){var o=h[n],a=e.lastIndexOf(o);if(0<a&&a===e.length-o.length){var r=e.slice(0,a);"data"!==r&&(s.mainType=r,s[o.toLowerCase()]=t,i=!0)}}c.hasOwnProperty(e)&&(l[e]=t,i=!0),i||(u[e]=t)})}return{cptQuery:s,dataQuery:l,otherQuery:u}},filter:function(t,e,i){var n=this.eventInfo;if(!n)return!0;var o=n.targetEl,a=n.packedEvent,r=n.model,s=n.view;if(!r||!s)return!0;var l=e.cptQuery,u=e.dataQuery;return h(l,r,"mainType")&&h(l,r,"subType")&&h(l,r,"index","componentIndex")&&h(l,r,"name")&&h(l,r,"id")&&h(u,a,"name")&&h(u,a,"dataIndex")&&h(u,a,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(t,e.otherQuery,o,a));function h(t,e,i,n){return null==t[i]||e[n||i]===t[i]}},afterTrigger:function(){this.eventInfo=null}};var tf={},ef={},nf=[],of=[],af=[],rf=[],sf={},lf={},uf={},hf={},cf=new Date-0,df=new Date-0,ff="_echarts_instance_";function pf(t){hf[t]=!1}var gf=pf;function mf(t){return uf[function(t,e){return t.getAttribute?t.getAttribute(e):t[e]}(t,ff)]}function vf(t,e){sf[t]=e}function yf(t){of.push(t)}function xf(t,e){Mf(nf,t,e,1e3)}function _f(t,e,i){"function"==typeof e&&(i=e,e="");var n=Dd(t)?t.type:[t,t={event:e}][0];t.event=(t.event||n).toLowerCase(),e=t.event,Id(Nd.test(n)&&Nd.test(e)),tf[n]||(tf[n]={action:i,actionInfo:t}),ef[e]=n}function wf(t,e){lh.register(t,e)}function bf(t,e){Mf(rf,t,e,1e3,"layout")}function Sf(t,e){Mf(rf,t,e,3e3,"visual")}function Mf(t,e,i,n,o){(Ad(e)||Dd(e))&&(i=e,e=n);var a=zc.wrapStageHandler(i,o);return a.__prio=e,a.__raw=i,t.push(a),a}function If(t,e){lf[t]=e}function Tf(t){return ku.extend(t)}function Af(t){return gc.extend(t)}function Df(t){return sc.extend(t)}function Cf(t){return _c.extend(t)}Sf(2e3,Nc),yf(Lh),xf(900,function(t){var a=Q();t.eachSeries(function(t){var e=t.get("stack");if(e){var i=a.get(e)||a.set(e,[]),n=t.getData(),o={stackResultDimension:n.getCalculationInfo("stackResultDimension"),stackedOverDimension:n.getCalculationInfo("stackedOverDimension"),stackedDimension:n.getCalculationInfo("stackedDimension"),stackedByDimension:n.getCalculationInfo("stackedByDimension"),isStackedByIndex:n.getCalculationInfo("isStackedByIndex"),data:n,seriesModel:t};if(!o.stackedDimension||!o.isStackedByIndex&&!o.stackedByDimension)return;i.length&&n.setCalculationInfo("stackedOnSeries",i[i.length-1].seriesModel),i.push(o)}}),a.each(kh)}),If("default",function(o,a){D(a=a||{},{text:"loading",textColor:"#000",fontSize:"12px",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#c23531",spinnerRadius:10,lineWidth:5,zlevel:0});var t=new Ci,r=new rs({style:{fill:a.maskColor},zlevel:a.zlevel,z:1e4});t.add(r);var s=a.fontSize+" sans-serif",l=new rs({style:{fill:"none",text:a.text,font:s,textPosition:"right",textDistance:10,textFill:a.textColor},zlevel:a.zlevel,z:10001});if(t.add(l),a.showSpinner){var u=new fs({shape:{startAngle:-Rc/2,endAngle:-Rc/2+.1,r:a.spinnerRadius},style:{stroke:a.color,lineCap:"round",lineWidth:a.lineWidth},zlevel:a.zlevel,z:10001});u.animateShape(!0).when(1e3,{endAngle:3*Rc/2}).start("circularInOut"),u.animateShape(!0).when(1e3,{startAngle:3*Rc/2}).delay(300).start("circularInOut"),t.add(u)}return t.resize=function(){var t=pn(a.text,s),e=a.showSpinner?a.spinnerRadius:0,i=(o.getWidth()-2*e-(a.showSpinner&&t?10:0)-t)/2-(a.showSpinner?0:t/2),n=o.getHeight()/2;a.showSpinner&&u.setShape({cx:i,cy:n}),l.setShape({x:i-e,y:n-e,width:2*e,height:2*e}),r.setShape({x:0,y:0,width:o.getWidth(),height:o.getHeight()})},t.resize(),t}),_f({type:"highlight",event:"highlight",update:"highlight"},et),_f({type:"downplay",event:"downplay",update:"downplay"},et),vf("light",nd),vf("dark",rd);function Lf(t){return t}function kf(t,e,i,n,o){this._old=t,this._new=e,this._oldKeyGetter=i||Lf,this._newKeyGetter=n||Lf,this.context=o}function Pf(t,e,i,n,o){for(var a=0;a<t.length;a++){var r="_ec_"+o[n](t[a],a),s=e[r];null==s?(i.push(r),e[r]=a):(s.length||(e[r]=s=[s]),s.push(a))}}kf.prototype={constructor:kf,add:function(t){return this._add=t,this},update:function(t){return this._update=t,this},remove:function(t){return this._remove=t,this},execute:function(){var t=this._old,e=this._new,i={},n=[],o=[];for(Pf(t,{},n,"_oldKeyGetter",this),Pf(e,i,o,"_newKeyGetter",this),a=0;a<t.length;a++){if(null!=(s=i[r=n[a]]))(u=s.length)?(1===u&&(i[r]=null),s=s.shift()):i[r]=null,this._update&&this._update(s,a);else this._remove&&this._remove(a)}for(var a=0;a<o.length;a++){var r=o[a];if(i.hasOwnProperty(r)){var s;if(null==(s=i[r]))continue;if(s.length)for(var l=0,u=s.length;l<u;l++)this._add&&this._add(s[l]);else this._add&&this._add(s)}}}};var Nf=Q(["tooltip","label","itemName","itemId","seriesName"]);function Of(t,e){return t.hasOwnProperty(e)||(t[e]=[]),t[e]}function Ef(t){return"category"===t?"ordinal":"time"===t?"time":"float"}function Rf(t){null!=t&&P(this,t),this.otherDims={}}var zf=z,Bf="undefined",Vf={float:typeof Float64Array==Bf?Array:Float64Array,int:typeof Int32Array==Bf?Array:Int32Array,ordinal:Array,number:Array,time:Array},Gf=typeof Uint32Array==Bf?Array:Uint32Array,Ff=typeof Int32Array==Bf?Array:Int32Array,Wf=typeof Uint16Array==Bf?Array:Uint16Array;function Hf(t){return 65535<t._rawCount?Gf:Wf}var Zf=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_rawData","_chunkSize","_chunkCount","_dimValueGetter","_count","_rawCount","_nameDimIdx","_idDimIdx"],Uf=["_extent","_approximateExtent","_rawExtent"];function Xf(e,i){E(Zf.concat(i.__wrappedMethods||[]),function(t){i.hasOwnProperty(t)&&(e[t]=i[t])}),e.__wrappedMethods=i.__wrappedMethods,E(Uf,function(t){e[t]=k(i[t])}),e._calculationInfo=P(i._calculationInfo)}var Yf=function(t,e){t=t||["x","y"];for(var i={},n=[],o={},a=0;a<t.length;a++){var r=t[a];R(r)?r=new Rf({name:r}):r instanceof Rf||(r=new Rf(r));var s=r.name;r.type=r.type||"float",r.coordDim||(r.coordDim=s,r.coordDimIndex=0),r.otherDims=r.otherDims||{},n.push(s),(i[s]=r).index=a,r.createInvertedIndices&&(o[s]=[])}this.dimensions=n,this._dimensionInfos=i,this.hostModel=e,this.dataType,this._indices=null,this._count=0,this._rawCount=0,this._storage={},this._nameList=[],this._idList=[],this._optionModels=[],this._visual={},this._layout={},this._itemVisuals=[],this.hasItemVisual={},this._itemLayouts=[],this._graphicEls=[],this._chunkSize=1e5,this._chunkCount=0,this._rawData,this._rawExtent={},this._extent={},this._approximateExtent={},this._dimensionsSummary=function(n){var t={},a=t.encode={},r=Q(),s=[],l=[],u=t.userOutput={dimensionNames:n.dimensions.slice(),encode:{}};E(n.dimensions,function(t){var o=n.getDimensionInfo(t),e=o.coordDim;if(e){var i=o.coordDimIndex;Of(a,e)[i]=t,o.isExtraCoord||(r.set(e,1),function(t){return!("ordinal"===t||"time"===t)}(o.type)&&(s[0]=t),Of(u.encode,e)[i]=o.index),o.defaultTooltip&&l.push(t)}Nf.each(function(t,e){var i=Of(a,e),n=o.otherDims[e];null!=n&&!1!==n&&(i[n]=o.name)})});var o=[],h={};r.each(function(t,e){var i=a[e];h[e]=i[0],o=o.concat(i)}),t.dataDimsOnCoord=o,t.encodeFirstDimNotExtra=h;var e=a.label;e&&e.length&&(s=e.slice());var i=a.tooltip;return i&&i.length?l=i.slice():l.length||(l=s.slice()),a.defaultedLabel=s,a.defaultedTooltip=l,t}(this),this._invertedIndicesMap=o,this._calculationInfo={},this.userOutput=this._dimensionsSummary.userOutput},jf=Yf.prototype;function qf(t,e,i,n,o){var a=Vf[e.type],r=n-1,s=e.name,l=t[s][r];if(l&&l.length<i){for(var u=new a(Math.min(o-r*i,i)),h=0;h<l.length;h++)u[h]=l[h];t[s][r]=u}for(var c=n*i;c<o;c+=i)t[s].push(new a(Math.min(o-c,i)))}function Kf(o){var a=o._invertedIndicesMap;E(a,function(t,e){var i=o._dimensionInfos[e].ordinalMeta;if(i){t=a[e]=new Ff(i.categories.length);for(var n=0;n<t.length;n++)t[n]=-1;for(n=0;n<o._count;n++)t[o.get(e,n)]=n}})}function $f(t,e,i){var n;if(null!=e){var o=t._chunkSize,a=Math.floor(i/o),r=i%o,s=t.dimensions[e],l=t._storage[s][a];if(l){n=l[r];var u=t._dimensionInfos[s].ordinalMeta;u&&u.categories.length&&(n=u.categories[n])}}return n}function Jf(t){return t}function Qf(t){return t<this._count&&0<=t?this._indices[t]:-1}function tp(t,e){var i=t._idList[e];return null==i&&(i=$f(t,t._idDimIdx,e)),null==i&&(i="e\0\0"+e),i}function ep(t){return L(t)||(t=[t]),t}function ip(t,e){var i=t.dimensions,n=new Yf(O(i,t.getDimensionInfo,t),t.hostModel);Xf(n,t);for(var o=n._storage={},a=t._storage,r=0;r<i.length;r++){var s=i[r];a[s]&&(0<=_(e,s)?(o[s]=np(a[s]),n._rawExtent[s]=op(),n._extent[s]=null):o[s]=a[s])}return n}function np(t){for(var e,i,n=new Array(t.length),o=0;o<t.length;o++)n[o]=(e=t[o],i=void 0,(i=e.constructor)===Array?e.slice():new i(e));return n}function op(){return[1/0,-1/0]}jf.type="list",jf.hasItemOption=!0,jf.getDimension=function(t){return"number"!=typeof t&&(isNaN(t)||this._dimensionInfos.hasOwnProperty(t))||(t=this.dimensions[t]),t},jf.getDimensionInfo=function(t){return this._dimensionInfos[this.getDimension(t)]},jf.getDimensionsOnCoord=function(){return this._dimensionsSummary.dataDimsOnCoord.slice()},jf.mapDimension=function(t,e){var i=this._dimensionsSummary;if(null==e)return i.encodeFirstDimNotExtra[t];var n=i.encode[t];return!0===e?(n||[]).slice():n&&n[e]},jf.initData=function(t,e,i){(Uu.isInstance(t)||N(t))&&(t=new Ph(t,this.dimensions.length)),this._rawData=t,this._storage={},this._indices=null,this._nameList=e||[],this._idList=[],this._nameRepeatCount={},i||(this.hasItemOption=!1),this.defaultDimValueGetter=Gh[this._rawData.getSource().sourceFormat],this._dimValueGetter=i=i||this.defaultDimValueGetter,this._dimValueGetterArrayRows=Gh.arrayRows,this._rawExtent={},this._initDataFromProvider(0,t.count()),t.pure&&(this.hasItemOption=!1)},jf.getProvider=function(){return this._rawData},jf.appendData=function(t){var e=this._rawData,i=this.count();e.appendData(t);var n=e.count();e.persistent||(n+=i),this._initDataFromProvider(i,n)},jf.appendValues=function(t,e){for(var i=this._chunkSize,n=this._storage,o=this.dimensions,a=o.length,r=this._rawExtent,s=this.count(),l=s+Math.max(t.length,e?e.length:0),u=this._chunkCount,h=0;h<a;h++){r[v=o[h]]||(r[v]=op()),n[v]||(n[v]=[]),qf(n,this._dimensionInfos[v],i,u,l),this._chunkCount=n[v].length}for(var c=new Array(a),d=s;d<l;d++){for(var f=d-s,p=Math.floor(d/i),g=d%i,m=0;m<a;m++){var v=o[m],y=this._dimValueGetterArrayRows(t[f]||c,v,f,m);n[v][p][g]=y;var x=r[v];y<x[0]&&(x[0]=y),y>x[1]&&(x[1]=y)}e&&(this._nameList[d]=e[f])}this._rawCount=this._count=l,this._extent={},Kf(this)},jf._initDataFromProvider=function(t,e){if(!(e<=t)){for(var i,n=this._chunkSize,o=this._rawData,a=this._storage,r=this.dimensions,s=r.length,l=this._dimensionInfos,u=this._nameList,h=this._idList,c=this._rawExtent,d=this._nameRepeatCount={},f=this._chunkCount,p=0;p<s;p++){c[w=r[p]]||(c[w]=op());var g=l[w];0===g.otherDims.itemName&&(i=this._nameDimIdx=p),0===g.otherDims.itemId&&(this._idDimIdx=p),a[w]||(a[w]=[]),qf(a,g,n,f,e),this._chunkCount=a[w].length}for(var m=new Array(s),v=t;v<e;v++){m=o.getItem(v,m);for(var y=Math.floor(v/n),x=v%n,_=0;_<s;_++){var w,b=a[w=r[_]][y],S=this._dimValueGetter(m,w,v,_);b[x]=S;var M=c[w];S<M[0]&&(M[0]=S),S>M[1]&&(M[1]=S)}if(!o.pure){var I=u[v];if(m&&null==I)if(null!=m.name)u[v]=I=m.name;else if(null!=i){var T=r[i],A=a[T][y];if(A){I=A[x];var D=l[T].ordinalMeta;D&&D.categories.length&&(I=D.categories[I])}}var C=null==m?null:m.id;null==C&&null!=I&&(d[I]=d[I]||0,0<d[C=I]&&(C+="__ec__"+d[I]),d[I]++),null!=C&&(h[v]=C)}}!o.persistent&&o.clean&&o.clean(),this._rawCount=this._count=e,this._extent={},Kf(this)}},jf.count=function(){return this._count},jf.getIndices=function(){var t=this._indices;if(t){var e=t.constructor,i=this._count;if(e===Array){o=new e(i);for(var n=0;n<i;n++)o[n]=t[n]}else o=new e(t.buffer,0,i)}else{var o=new(e=Hf(this))(this.count());for(n=0;n<o.length;n++)o[n]=n}return o},jf.get=function(t,e){if(!(0<=e&&e<this._count))return NaN;var i=this._storage;if(!i[t])return NaN;e=this.getRawIndex(e);var n=Math.floor(e/this._chunkSize),o=e%this._chunkSize;return i[t][n][o]},jf.getByRawIndex=function(t,e){if(!(0<=e&&e<this._rawCount))return NaN;var i=this._storage[t];if(!i)return NaN;var n=Math.floor(e/this._chunkSize),o=e%this._chunkSize;return i[n][o]},jf._getFast=function(t,e){var i=Math.floor(e/this._chunkSize),n=e%this._chunkSize;return this._storage[t][i][n]},jf.getValues=function(t,e){var i=[];L(t)||(e=t,t=this.dimensions);for(var n=0,o=t.length;n<o;n++)i.push(this.get(t[n],e));return i},jf.hasValue=function(t){for(var e=this._dimensionsSummary.dataDimsOnCoord,i=0,n=e.length;i<n;i++)if(isNaN(this.get(e[i],t)))return!1;return!0},jf.getDataExtent=function(t){t=this.getDimension(t);var e=this._storage[t],i=op();if(!e)return i;var n,o=this.count();if(!this._indices)return this._rawExtent[t].slice();if(n=this._extent[t])return n.slice();for(var a=(n=i)[0],r=n[1],s=0;s<o;s++){var l=this._getFast(t,this.getRawIndex(s));l<a&&(a=l),r<l&&(r=l)}return n=[a,r],this._extent[t]=n},jf.getApproximateExtent=function(t){return t=this.getDimension(t),this._approximateExtent[t]||this.getDataExtent(t)},jf.setApproximateExtent=function(t,e){e=this.getDimension(e),this._approximateExtent[e]=t.slice()},jf.getCalculationInfo=function(t){return this._calculationInfo[t]},jf.setCalculationInfo=function(t,e){zf(t)?P(this._calculationInfo,t):this._calculationInfo[t]=e},jf.getSum=function(t){var e=0;if(this._storage[t])for(var i=0,n=this.count();i<n;i++){var o=this.get(t,i);isNaN(o)||(e+=o)}return e},jf.getMedian=function(t){var i=[];this.each(t,function(t,e){isNaN(t)||i.push(t)});var e=[].concat(i).sort(function(t,e){return t-e}),n=this.count();return 0===n?0:n%2==1?e[(n-1)/2]:(e[n/2]+e[n/2-1])/2},jf.rawIndexOf=function(t,e){var i=(t&&this._invertedIndicesMap[t])[e];return null==i||isNaN(i)?-1:i},jf.indexOfName=function(t){for(var e=0,i=this.count();e<i;e++)if(this.getName(e)===t)return e;return-1},jf.indexOfRawIndex=function(t){if(t>=this._rawCount||t<0)return-1;if(!this._indices)return t;var e=this._indices,i=e[t];if(null!=i&&i<this._count&&i===t)return t;for(var n=0,o=this._count-1;n<=o;){var a=(n+o)/2|0;if(e[a]<t)n=1+a;else{if(!(e[a]>t))return a;o=a-1}}return-1},jf.indicesOfNearest=function(t,e,i){var n=[];if(!this._storage[t])return n;null==i&&(i=1/0);for(var o=1/0,a=-1,r=0,s=0,l=this.count();s<l;s++){var u=e-this.get(t,s),h=Math.abs(u);h<=i&&((h<o||h===o&&0<=u&&a<0)&&(o=h,a=u,r=0),u===a&&(n[r++]=s))}return n.length=r,n},jf.getRawIndex=Jf,jf.getRawDataItem=function(t){if(this._rawData.persistent)return this._rawData.getItem(this.getRawIndex(t));for(var e=[],i=0;i<this.dimensions.length;i++){var n=this.dimensions[i];e.push(this.get(n,t))}return e},jf.getName=function(t){var e=this.getRawIndex(t);return this._nameList[e]||$f(this,this._nameDimIdx,e)||""},jf.getId=function(t){return tp(this,this.getRawIndex(t))},jf.each=function(t,e,i,n){if(this._count){"function"==typeof t&&(n=i,i=e,e=t,t=[]),i=i||n||this;for(var o=(t=O(ep(t),this.getDimension,this)).length,a=0;a<this.count();a++)switch(o){case 0:e.call(i,a);break;case 1:e.call(i,this.get(t[0],a),a);break;case 2:e.call(i,this.get(t[0],a),this.get(t[1],a),a);break;default:for(var r=0,s=[];r<o;r++)s[r]=this.get(t[r],a);s[r]=a,e.apply(i,s)}}},jf.filterSelf=function(t,e,i,n){if(this._count){"function"==typeof t&&(n=i,i=e,e=t,t=[]),i=i||n||this,t=O(ep(t),this.getDimension,this);for(var o=this.count(),a=new(Hf(this))(o),r=[],s=t.length,l=0,u=t[0],h=0;h<o;h++){var c,d=this.getRawIndex(h);if(0===s)c=e.call(i,h);else if(1===s){var f=this._getFast(u,d);c=e.call(i,f,h)}else{for(var p=0;p<s;p++)r[p]=this._getFast(u,d);r[p]=h,c=e.apply(i,r)}c&&(a[l++]=d)}return l<o&&(this._indices=a),this._count=l,this._extent={},this.getRawIndex=this._indices?Qf:Jf,this}},jf.selectRange=function(t){if(this._count){var e=[];for(var i in t)t.hasOwnProperty(i)&&e.push(i);var n=e.length;if(n){var o=this.count(),a=new(Hf(this))(o),r=0,s=e[0],l=t[s][0],u=t[s][1],h=!1;if(!this._indices){var c=0;if(1===n){for(var d=this._storage[e[0]],f=0;f<this._chunkCount;f++)for(var p=d[f],g=Math.min(this._count-f*this._chunkSize,this._chunkSize),m=0;m<g;m++){(l<=(w=p[m])&&w<=u||isNaN(w))&&(a[r++]=c),c++}h=!0}else if(2===n){d=this._storage[s];var v=this._storage[e[1]],y=t[e[1]][0],x=t[e[1]][1];for(f=0;f<this._chunkCount;f++){p=d[f];var _=v[f];for(g=Math.min(this._count-f*this._chunkSize,this._chunkSize),m=0;m<g;m++){var w=p[m],b=_[m];(l<=w&&w<=u||isNaN(w))&&(y<=b&&b<=x||isNaN(b))&&(a[r++]=c),c++}}h=!0}}if(!h)if(1===n)for(m=0;m<o;m++){var S=this.getRawIndex(m);(l<=(w=this._getFast(s,S))&&w<=u||isNaN(w))&&(a[r++]=S)}else for(m=0;m<o;m++){var M=!0;for(S=this.getRawIndex(m),f=0;f<n;f++){var I=e[f];((w=this._getFast(i,S))<t[I][0]||w>t[I][1])&&(M=!1)}M&&(a[r++]=this.getRawIndex(m))}return r<o&&(this._indices=a),this._count=r,this._extent={},this.getRawIndex=this._indices?Qf:Jf,this}}},jf.mapArray=function(t,e,i,n){"function"==typeof t&&(n=i,i=e,e=t,t=[]),i=i||n||this;var o=[];return this.each(t,function(){o.push(e&&e.apply(this,arguments))},i),o},jf.map=function(t,e,i,n){i=i||n||this;var o=ip(this,t=O(ep(t),this.getDimension,this));o._indices=this._indices,o.getRawIndex=o._indices?Qf:Jf;for(var a=o._storage,r=[],s=this._chunkSize,l=t.length,u=this.count(),h=[],c=o._rawExtent,d=0;d<u;d++){for(var f=0;f<l;f++)h[f]=this.get(t[f],d);h[l]=d;var p=e&&e.apply(i,h);if(null!=p){"object"!=typeof p&&(r[0]=p,p=r);for(var g=this.getRawIndex(d),m=Math.floor(g/s),v=g%s,y=0;y<p.length;y++){var x=t[y],_=p[y],w=c[x],b=a[x];b&&(b[m][v]=_),_<w[0]&&(w[0]=_),_>w[1]&&(w[1]=_)}}}return o},jf.downSample=function(t,e,i,n){for(var o=ip(this,[t]),a=o._storage,r=[],s=Math.floor(1/e),l=a[t],u=this.count(),h=this._chunkSize,c=o._rawExtent[t],d=new(Hf(this))(u),f=0,p=0;p<u;p+=s){u-p<s&&(s=u-p,r.length=s);for(var g=0;g<s;g++){var m=this.getRawIndex(p+g),v=Math.floor(m/h),y=m%h;r[g]=l[v][y]}var x=i(r),_=this.getRawIndex(Math.min(p+n(r,x)||0,u-1)),w=_%h;(l[Math.floor(_/h)][w]=x)<c[0]&&(c[0]=x),x>c[1]&&(c[1]=x),d[f++]=_}return o._count=f,o._indices=d,o.getRawIndex=Qf,o},jf.getItemModel=function(t){var e=this.hostModel;return new Cl(this.getRawDataItem(t),e,e&&e.ecModel)},jf.diff=function(e){var i=this;return new kf(e?e.getIndices():[],this.getIndices(),function(t){return tp(e,t)},function(t){return tp(i,t)})},jf.getVisual=function(t){var e=this._visual;return e&&e[t]},jf.setVisual=function(t,e){if(zf(t))for(var i in t)t.hasOwnProperty(i)&&this.setVisual(i,t[i]);else this._visual=this._visual||{},this._visual[t]=e},jf.setLayout=function(t,e){if(zf(t))for(var i in t)t.hasOwnProperty(i)&&this.setLayout(i,t[i]);else this._layout[t]=e},jf.getLayout=function(t){return this._layout[t]},jf.getItemLayout=function(t){return this._itemLayouts[t]},jf.setItemLayout=function(t,e,i){this._itemLayouts[t]=i?P(this._itemLayouts[t]||{},e):e},jf.clearItemLayouts=function(){this._itemLayouts.length=0},jf.getItemVisual=function(t,e,i){var n=this._itemVisuals[t],o=n&&n[e];return null!=o||i?o:this.getVisual(e)},jf.setItemVisual=function(t,e,i){var n=this._itemVisuals[t]||{},o=this.hasItemVisual;if(this._itemVisuals[t]=n,zf(e))for(var a in e)e.hasOwnProperty(a)&&(n[a]=e[a],o[a]=!0);else n[e]=i,o[e]=!0},jf.clearAllVisual=function(){this._visual={},this._itemVisuals=[],this.hasItemVisual={}};function ap(t){t.seriesIndex=this.seriesIndex,t.dataIndex=this.dataIndex,t.dataType=this.dataType}function rp(t,e,i){Uu.isInstance(e)||(e=Uu.seriesDataToSource(e)),i=i||{},t=(t||[]).slice();for(var n=(i.dimsDef||[]).slice(),o=Q(),a=Q(),l=[],r=function(t,e,i,n){var o=Math.max(t.dimensionsDetectCount||1,e.length,i.length,n||0);return E(e,function(t){var e=t.dimsDef;e&&(o=Math.max(o,e.length))}),o}(e,t,n,i.dimCount),s=0;s<r;s++){var u=n[s]=P({},z(n[s])?n[s]:{name:n[s]}),h=u.name,c=l[s]=new Rf;null!=h&&null==o.get(h)&&(c.name=c.displayName=h,o.set(h,s)),null!=u.type&&(c.type=u.type),null!=u.displayName&&(c.displayName=u.displayName)}var d=i.encodeDef;!d&&i.encodeDefaulter&&(d=i.encodeDefaulter(e,r)),(d=Q(d)).each(function(t,i){if(1===(t=Vo(t).slice()).length&&!R(t[0])&&t[0]<0)d.set(i,!1);else{var n=d.set(i,[]);E(t,function(t,e){R(t)&&(t=o.get(t)),null!=t&&t<r&&(n[e]=t,p(l[t],i,e))})}});var f=0;function p(t,e,i){null!=Nf.get(e)?t.otherDims[e]=i:(t.coordDim=e,t.coordDimIndex=i,a.set(e,!0))}E(t,function(o,t){var a,r,s;if(R(o))a=o,o={};else{a=o.name;var e=o.ordinalMeta;o.ordinalMeta=null,(o=k(o)).ordinalMeta=e,r=o.dimsDef,s=o.otherDims,o.name=o.coordDim=o.coordDimIndex=o.dimsDef=o.otherDims=null}if(!1!==(i=d.get(a))){var i;if(!(i=Vo(i)).length)for(var n=0;n<(r&&r.length||1);n++){for(;f<l.length&&null!=l[f].coordDim;)f++;f<l.length&&i.push(f++)}E(i,function(t,e){var i=l[t];if(p(D(i,o),a,e),null==i.name&&r){var n=r[e];z(n)||(n={name:n}),i.name=i.displayName=n.name,i.defaultTooltip=n.defaultTooltip}s&&D(i.otherDims,s)})}});var g=i.generateCoord,m=i.generateCoordCount,v=null!=m;m=g?m||1:0;for(var y,x,_=g||"value",w=0;w<r;w++){null==(c=l[w]=l[w]||new Rf).coordDim&&(c.coordDim=sp(_,a,v),c.coordDimIndex=0,(!g||m<=0)&&(c.isExtraCoord=!0),m--),null==c.name&&(c.name=sp(c.coordDim,o)),null==c.type&&(y=e,x=w,c.name,th(y.data,y.sourceFormat,y.seriesLayoutBy,y.dimensionsDefine,y.startIndex,x)===Xu.Must||c.isExtraCoord&&(null!=c.otherDims.itemName||null!=c.otherDims.seriesName))&&(c.type="ordinal")}return l}function sp(t,e,i){if(i||null!=e.get(t)){for(var n=0;null!=e.get(t+n);)n++;t+=n}return e.set(t,!0),t}jf.setItemGraphicEl=function(t,e){var i=this.hostModel;e&&(e.dataIndex=t,e.dataType=this.dataType,e.seriesIndex=i&&i.seriesIndex,"group"===e.type&&e.traverse(ap,e)),this._graphicEls[t]=e},jf.getItemGraphicEl=function(t){return this._graphicEls[t]},jf.eachItemGraphicEl=function(i,n){E(this._graphicEls,function(t,e){t&&i&&i.call(n,t,e)})},jf.cloneShallow=function(t){if(!t){var e=O(this.dimensions,this.getDimensionInfo,this);t=new Yf(e,this.hostModel)}if(t._storage=this._storage,Xf(t,this),this._indices){var i=this._indices.constructor;t._indices=new i(this._indices)}else t._indices=null;return t.getRawIndex=t._indices?Qf:Jf,t},jf.wrapMethod=function(t,e){var i=this[t];"function"==typeof i&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var t=i.apply(this,arguments);return e.apply(this,[t].concat(U(arguments)))})},jf.TRANSFERABLE_METHODS=["cloneShallow","downSample","map"],jf.CHANGABLE_METHODS=["filterSelf","selectRange"];var lp=function(t,e){return rp((e=e||{}).coordDimensions||[],t,{dimsDef:e.dimensionsDefine||t.dimensionsDefine,encodeDef:e.encodeDefine||t.encodeDefine,dimCount:e.dimensionsCount,encodeDefaulter:e.encodeDefaulter,generateCoord:e.generateCoord,generateCoordCount:e.generateCoordCount})};function up(t){this.coordSysName=t,this.coordSysDims=[],this.axisMap=Q(),this.categoryAxisMap=Q(),this.firstCategoryDimIndex=null}var hp={cartesian2d:function(t,e,i,n){var o=t.getReferringComponents("xAxis")[0],a=t.getReferringComponents("yAxis")[0];e.coordSysDims=["x","y"],i.set("x",o),i.set("y",a),cp(o)&&(n.set("x",o),e.firstCategoryDimIndex=0),cp(a)&&(n.set("y",a),e.firstCategoryDimIndex,e.firstCategoryDimIndex=1)},singleAxis:function(t,e,i,n){var o=t.getReferringComponents("singleAxis")[0];e.coordSysDims=["single"],i.set("single",o),cp(o)&&(n.set("single",o),e.firstCategoryDimIndex=0)},polar:function(t,e,i,n){var o=t.getReferringComponents("polar")[0],a=o.findAxisModel("radiusAxis"),r=o.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],i.set("radius",a),i.set("angle",r),cp(a)&&(n.set("radius",a),e.firstCategoryDimIndex=0),cp(r)&&(n.set("angle",r),null==e.firstCategoryDimIndex&&(e.firstCategoryDimIndex=1))},geo:function(t,e,i,n){e.coordSysDims=["lng","lat"]},parallel:function(t,o,a,r){var s=t.ecModel,e=s.getComponent("parallel",t.get("parallelIndex")),l=o.coordSysDims=e.dimensions.slice();E(e.parallelAxisIndex,function(t,e){var i=s.getComponent("parallelAxis",t),n=l[e];a.set(n,i),cp(i)&&null==o.firstCategoryDimIndex&&(r.set(n,i),o.firstCategoryDimIndex=e)})}};function cp(t){return"category"===t.get("type")}function dp(t,i,e){var n,o,a,r,s=(e=e||{}).byIndex,l=e.stackedCoordDimension,u=!(!t||!t.get("stack"));if(E(i,function(t,e){R(t)&&(i[e]=t={name:t}),u&&!t.isExtraCoord&&(s||n||!t.ordinalMeta||(n=t),o||"ordinal"===t.type||"time"===t.type||l&&l!==t.coordDim||(o=t))}),!o||s||n||(s=!0),o){a="__\0ecstackresult",r="__\0ecstackedover",n&&(n.createInvertedIndices=!0);var h=o.coordDim,c=o.type,d=0;E(i,function(t){t.coordDim===h&&d++}),i.push({name:a,coordDim:h,coordDimIndex:d,type:c,isExtraCoord:!0,isCalculationCoord:!0}),d++,i.push({name:r,coordDim:r,coordDimIndex:d,type:c,isExtraCoord:!0,isCalculationCoord:!0})}return{stackedDimension:o&&o.name,stackedByDimension:n&&n.name,isStackedByIndex:s,stackedOverDimension:r,stackResultDimension:a}}function fp(t,e){return!!e&&e===t.getCalculationInfo("stackedDimension")}function pp(t,e){return fp(t,e)?t.getCalculationInfo("stackResultDimension"):e}function gp(t,e,i){i=i||{},Uu.isInstance(t)||(t=Uu.seriesDataToSource(t));var n,o=e.get("coordinateSystem"),a=lh.get(o),r=function(t){var e=t.get("coordinateSystem"),i=new up(e),n=hp[e];if(n)return n(t,i,i.axisMap,i.categoryAxisMap),i}(e);r&&(n=O(r.coordSysDims,function(t){var e={name:t},i=r.axisMap.get(t);if(i){var n=i.get("type");e.type=Ef(n)}return e})),n=n||(a&&(a.getDimensionsInfo?a.getDimensionsInfo():a.dimensions.slice())||["x","y"]);var s,l,u=lp(t,{coordDimensions:n,generateCoord:i.generateCoord,encodeDefaulter:i.useEncodeDefaulter?T($u,n,e):null});r&&E(u,function(t,e){var i=t.coordDim,n=r.categoryAxisMap.get(i);n&&(null==s&&(s=e),t.ordinalMeta=n.getOrdinalMeta()),null!=t.otherDims.itemName&&(l=!0)}),l||null==s||(u[s].otherDims.itemName=0);var h=dp(e,u),c=new Yf(u,e);c.setCalculationInfo(h);var d=null!=s&&function(t){if(t.sourceFormat===zu){var e=function(t){var e=0;for(;e<t.length&&null==t[e];)e++;return t[e]}(t.data||[]);return null!=e&&!L(Wo(e))}}(t)?function(t,e,i,n){return n===s?i:this.defaultDimValueGetter(t,e,i,n)}:null;return c.hasItemOption=!1,c.initData(t,null,d),c}function mp(t){this._setting=t||{},this._extent=[1/0,-1/0],this._interval=0,this.init&&this.init.apply(this,arguments)}function vp(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this._map}mp.prototype.parse=function(t){return t},mp.prototype.getSetting=function(t){return this._setting[t]},mp.prototype.contain=function(t){var e=this._extent;return t>=e[0]&&t<=e[1]},mp.prototype.normalize=function(t){var e=this._extent;return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])},mp.prototype.scale=function(t){var e=this._extent;return t*(e[1]-e[0])+e[0]},mp.prototype.unionExtent=function(t){var e=this._extent;t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1])},mp.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},mp.prototype.getExtent=function(){return this._extent.slice()},mp.prototype.setExtent=function(t,e){var i=this._extent;isNaN(t)||(i[0]=t),isNaN(e)||(i[1]=e)},mp.prototype.isBlank=function(){return this._isBlank},mp.prototype.setBlank=function(t){this._isBlank=t},mp.prototype.getLabel=null,oa(mp),ua(mp,{registerWhenExtend:!0}),vp.createByAxisModel=function(t){var e=t.option,i=e.data,n=i&&O(i,_p);return new vp({categories:n,needCollect:!n,deduplication:!1!==e.dedplication})};var yp=vp.prototype;function xp(t){return t._map||(t._map=Q(t.categories))}function _p(t){return z(t)&&null!=t.value?t.value:t+""}yp.getOrdinal=function(t){return xp(this).get(t)},yp.parseAndCollect=function(t){var e,i=this._needCollect;if("string"!=typeof t&&!i)return t;if(i&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,e;var n=xp(this);return null==(e=n.get(t))&&(i?(e=this.categories.length,this.categories[e]=t,n.set(t,e)):e=NaN),e};var wp=mp.prototype,bp=mp.extend({type:"ordinal",init:function(t,e){t&&!L(t)||(t=new vp({categories:t})),this._ordinalMeta=t,this._extent=e||[0,t.categories.length-1]},parse:function(t){return"string"==typeof t?this._ordinalMeta.getOrdinal(t):Math.round(t)},contain:function(t){return t=this.parse(t),wp.contain.call(this,t)&&null!=this._ordinalMeta.categories[t]},normalize:function(t){return wp.normalize.call(this,this.parse(t))},scale:function(t){return Math.round(wp.scale.call(this,t))},getTicks:function(){for(var t=[],e=this._extent,i=e[0];i<=e[1];)t.push(i),i++;return t},getLabel:function(t){if(!this.isBlank())return this._ordinalMeta.categories[t]},count:function(){return this._extent[1]-this._extent[0]+1},unionExtentFromData:function(t,e){this.unionExtent(t.getApproximateExtent(e))},getOrdinalMeta:function(){return this._ordinalMeta},niceTicks:et,niceExtent:et});bp.create=function(){return new bp};var Sp=zl;function Mp(t){return Gl(t)+2}function Ip(t,e,i){t[e]=Math.max(Math.min(t[e],i[1]),i[0])}function Tp(t,e){isFinite(t[0])||(t[0]=e[0]),isFinite(t[1])||(t[1]=e[1]),Ip(t,0,e),Ip(t,1,e),t[0]>t[1]&&(t[0]=t[1])}var Ap=zl,Dp=mp.extend({type:"interval",_interval:0,_intervalPrecision:2,setExtent:function(t,e){var i=this._extent;isNaN(t)||(i[0]=parseFloat(t)),isNaN(e)||(i[1]=parseFloat(e))},unionExtent:function(t){var e=this._extent;t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1]),Dp.prototype.setExtent.call(this,e[0],e[1])},getInterval:function(){return this._interval},setInterval:function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=Mp(t)},getTicks:function(t){var e=this._interval,i=this._extent,n=this._niceExtent,o=this._intervalPrecision,a=[];if(!e)return a;i[0]<n[0]&&(t?a.push(Ap(n[0]-e,o)):a.push(i[0]));for(var r=n[0];r<=n[1]&&(a.push(r),(r=Ap(r+e,o))!==a[a.length-1]);)if(1e4<a.length)return[];var s=a.length?a[a.length-1]:n[1];return i[1]>s&&(t?a.push(Ap(s+e,o)):a.push(i[1])),a},getMinorTicks:function(t){for(var e=this.getTicks(!0),i=[],n=this.getExtent(),o=1;o<e.length;o++){for(var a=e[o],r=e[o-1],s=0,l=[],u=(a-r)/t;s<t-1;){var h=zl(r+(s+1)*u);h>n[0]&&h<n[1]&&l.push(h),s++}i.push(l)}return i},getLabel:function(t,e){if(null==t)return"";var i=e&&e.precision;return null==i?i=Gl(t)||0:"auto"===i&&(i=this._intervalPrecision),tu(t=Ap(t,i,!0))},niceTicks:function(t,e,i){t=t||5;var n=this._extent,o=n[1]-n[0];if(isFinite(o)){o<0&&(o=-o,n.reverse());var a=function(t,e,i,n){var o={},a=t[1]-t[0],r=o.interval=Kl(a/e,!0);null!=i&&r<i&&(r=o.interval=i),null!=n&&n<r&&(r=o.interval=n);var s=o.intervalPrecision=Mp(r);return Tp(o.niceTickExtent=[Sp(Math.ceil(t[0]/r)*r,s),Sp(Math.floor(t[1]/r)*r,s)],t),o}(n,t,e,i);this._intervalPrecision=a.intervalPrecision,this._interval=a.interval,this._niceExtent=a.niceTickExtent}},niceExtent:function(t){var e=this._extent;if(e[0]===e[1])if(0!==e[0]){var i=e[0];t.fixMax||(e[1]+=i/2),e[0]-=i/2}else e[1]=1;var n=e[1]-e[0];isFinite(n)||(e[0]=0,e[1]=1),this.niceTicks(t.splitNumber,t.minInterval,t.maxInterval);var o=this._interval;t.fixMin||(e[0]=Ap(Math.floor(e[0]/o)*o)),t.fixMax||(e[1]=Ap(Math.ceil(e[1]/o)*o))}});Dp.create=function(){return new Dp};var Cp="__ec_stack_",Lp="undefined"!=typeof Float32Array?Float32Array:Array;function kp(t){return t.get("stack")||Cp+t.seriesIndex}function Pp(t){return t.dim+t.index}function Np(t,e){var i=[];return e.eachSeriesByType(t,function(t){Vp(t)&&!Gp(t)&&i.push(t)}),i}function Op(t){var g=function(t){var l={};E(t,function(t){var e=t.coordinateSystem.getBaseAxis();if("time"===e.type||"value"===e.type)for(var i=t.getData(),n=e.dim+"_"+e.index,o=i.mapDimension(e.dim),a=0,r=i.count();a<r;++a){var s=i.get(o,a);l[n]?l[n].push(s):l[n]=[s]}});var e=[];for(var i in l)if(l.hasOwnProperty(i)){var n=l[i];if(n){n.sort(function(t,e){return t-e});for(var o=null,a=1;a<n.length;++a){var r=n[a]-n[a-1];0<r&&(o=null===o?r:Math.min(o,r))}e[i]=o}}return e}(t),m=[];return E(t,function(t){var e,i=t.coordinateSystem.getBaseAxis(),n=i.getExtent();if("category"===i.type)e=i.getBandWidth();else if("value"===i.type||"time"===i.type){var o=i.dim+"_"+i.index,a=g[o],r=Math.abs(n[1]-n[0]),s=i.scale.getExtent(),l=Math.abs(s[1]-s[0]);e=a?r/l*a:r}else{var u=t.getData();e=Math.abs(n[1]-n[0])/u.count()}var h=Rl(t.get("barWidth"),e),c=Rl(t.get("barMaxWidth"),e),d=Rl(t.get("barMinWidth")||1,e),f=t.get("barGap"),p=t.get("barCategoryGap");m.push({bandWidth:e,barWidth:h,barMaxWidth:c,barMinWidth:d,barGap:f,barCategoryGap:p,axisKey:Pp(i),stackId:kp(t)})}),Ep(m)}function Ep(t){var d={};E(t,function(t,e){var i=t.axisKey,n=t.bandWidth,o=d[i]||{bandWidth:n,remainedWidth:n,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},a=o.stacks;d[i]=o;var r=t.stackId;a[r]||o.autoWidthCount++,a[r]=a[r]||{width:0,maxWidth:0};var s=t.barWidth;s&&!a[r].width&&(a[r].width=s,s=Math.min(o.remainedWidth,s),o.remainedWidth-=s);var l=t.barMaxWidth;l&&(a[r].maxWidth=l);var u=t.barMinWidth;u&&(a[r].minWidth=u);var h=t.barGap;null!=h&&(o.gap=h);var c=t.barCategoryGap;null!=c&&(o.categoryGap=c)});var f={};return E(d,function(t,i){f[i]={};var e=t.stacks,n=t.bandWidth,o=Rl(t.categoryGap,n),a=Rl(t.gap,1),r=t.remainedWidth,s=t.autoWidthCount,l=(r-o)/(s+(s-1)*a);l=Math.max(l,0),E(e,function(t){var e=t.maxWidth,i=t.minWidth;if(t.width){n=t.width;e&&(n=Math.min(n,e)),i&&(n=Math.max(n,i)),t.width=n,r-=n+a*n,s--}else{var n=l;e&&e<n&&(n=Math.min(e,r)),i&&n<i&&(n=i),n!==l&&(t.width=n,r-=n+a*n,s--)}}),l=(r-o)/(s+(s-1)*a),l=Math.max(l,0);var u,h=0;E(e,function(t,e){t.width||(t.width=l),h+=(u=t).width*(1+a)}),u&&(h-=u.width*a);var c=-h/2;E(e,function(t,e){f[i][e]=f[i][e]||{bandWidth:n,offset:c,width:t.width},c+=t.width*(1+a)})}),f}function Rp(t,e,i){if(t&&e){var n=t[Pp(e)];return null!=n&&null!=i&&(n=n[kp(i)]),n}}function zp(t,e){var i=Np(t,e),T=Op(i),A={};E(i,function(t){var e=t.getData(),i=t.coordinateSystem,n=i.getBaseAxis(),o=kp(t),a=T[Pp(n)][o],r=a.offset,s=a.width,l=i.getOtherAxis(n),u=t.get("barMinHeight")||0;A[o]=A[o]||[],e.setLayout({bandWidth:a.bandWidth,offset:r,size:s});for(var h=e.mapDimension(l.dim),c=e.mapDimension(n.dim),d=fp(e,h),f=l.isHorizontal(),p=Fp(n,l,d),g=0,m=e.count();g<m;g++){var v,y,x,_,w,b=e.get(h,g),S=e.get(c,g),M=0<=b?"p":"n",I=p;if(d&&(A[o][S]||(A[o][S]={p:p,n:p}),I=A[o][S][M]),f)v=I,y=(w=i.dataToPoint([b,S]))[1]+r,x=w[0]-p,_=s,Math.abs(x)<u&&(x=(x<0?-1:1)*u),isNaN(x)||d&&(A[o][S][M]+=x);else v=(w=i.dataToPoint([S,b]))[0]+r,y=I,x=s,_=w[1]-p,Math.abs(_)<u&&(_=(_<=0?-1:1)*u),isNaN(_)||d&&(A[o][S][M]+=_);e.setItemLayout(g,{x:v,y:y,width:x,height:_})}},this)}var Bp={seriesType:"bar",plan:vc(),reset:function(t){if(Vp(t)&&Gp(t)){var e=t.getData(),c=t.coordinateSystem,d=c.grid.getRect(),f=c.getBaseAxis(),p=c.getOtherAxis(f),g=e.mapDimension(p.dim),m=e.mapDimension(f.dim),v=p.isHorizontal(),y=v?0:1,x=Rp(Op([t]),f,t).width;return.5<x||(x=.5),{progress:function(t,e){var i,n=t.count,o=new Lp(2*n),a=new Lp(2*n),r=new Lp(n),s=[],l=[],u=0,h=0;for(;null!=(i=t.next());)l[y]=e.get(g,i),l[1-y]=e.get(m,i),s=c.dataToPoint(l,null,s),a[u]=v?d.x+d.width:s[0],o[u++]=s[0],a[u]=v?s[1]:d.y+d.height,o[u++]=s[1],r[h++]=i;e.setLayout({largePoints:o,largeDataIndices:r,largeBackgroundPoints:a,barWidth:x,valueAxisStart:Fp(f,p,!1),backgroundStart:v?d.x:d.y,valueAxisHorizontal:v})}}}}};function Vp(t){return t.coordinateSystem&&"cartesian2d"===t.coordinateSystem.type}function Gp(t){return t.pipelineContext&&t.pipelineContext.large}function Fp(t,e){return e.toGlobalCoord(e.dataToCoord("log"===e.type?1:0))}var Wp=Dp.prototype,Hp=Math.ceil,Zp=Math.floor,Up=36e5,Xp=864e5,Yp=Dp.extend({type:"time",getLabel:function(t){var e=this._stepLvl,i=new Date(t);return du(e[0],i,this.getSetting("useUTC"))},niceExtent:function(t){var e=this._extent;if(e[0]===e[1]&&(e[0]-=Xp,e[1]+=Xp),e[1]===-1/0&&e[0]===1/0){var i=new Date;e[1]=+new Date(i.getFullYear(),i.getMonth(),i.getDate()),e[0]=e[1]-Xp}this.niceTicks(t.splitNumber,t.minInterval,t.maxInterval);var n=this._interval;t.fixMin||(e[0]=zl(Zp(e[0]/n)*n)),t.fixMax||(e[1]=zl(Hp(e[1]/n)*n))},niceTicks:function(t,e,i){t=t||10;var n=this._extent,o=n[1]-n[0],a=o/t;null!=e&&a<e&&(a=e),null!=i&&i<a&&(a=i);var r=jp.length,s=function(t,e,i,n){for(;i<n;){var o=i+n>>>1;t[o][1]<e?i=1+o:n=o}return i}(jp,a,0,r),l=jp[Math.min(s,r-1)],u=l[1];"year"===l[0]&&(u*=Kl(o/u/t,!0));var h=this.getSetting("useUTC")?0:60*new Date(+n[0]||+n[1]).getTimezoneOffset()*1e3,c=[Math.round(Hp((n[0]-h)/u)*u+h),Math.round(Zp((n[1]-h)/u)*u+h)];Tp(c,n),this._stepLvl=l,this._interval=u,this._niceExtent=c},parse:function(t){return+Yl(t)}});E(["contain","normalize"],function(e){Yp.prototype[e]=function(t){return Wp[e].call(this,this.parse(t))}});var jp=[["hh:mm:ss",1e3],["hh:mm:ss",5e3],["hh:mm:ss",1e4],["hh:mm:ss",15e3],["hh:mm:ss",3e4],["hh:mm\nMM-dd",6e4],["hh:mm\nMM-dd",3e5],["hh:mm\nMM-dd",6e5],["hh:mm\nMM-dd",9e5],["hh:mm\nMM-dd",18e5],["hh:mm\nMM-dd",Up],["hh:mm\nMM-dd",72e5],["hh:mm\nMM-dd",6*Up],["hh:mm\nMM-dd",432e5],["MM-dd\nyyyy",Xp],["MM-dd\nyyyy",2*Xp],["MM-dd\nyyyy",3*Xp],["MM-dd\nyyyy",4*Xp],["MM-dd\nyyyy",5*Xp],["MM-dd\nyyyy",6*Xp],["week",7*Xp],["MM-dd\nyyyy",864e6],["week",14*Xp],["week",21*Xp],["month",31*Xp],["week",42*Xp],["month",62*Xp],["week",70*Xp],["quarter",95*Xp],["month",31*Xp*4],["month",13392e6],["half-year",16416e6],["month",31*Xp*8],["month",26784e6],["year",380*Xp]];Yp.create=function(t){return new Yp({useUTC:t.ecModel.get("useUTC")})};var qp=mp.prototype,Kp=Dp.prototype,$p=Gl,Jp=zl,Qp=Math.floor,tg=Math.ceil,eg=Math.pow,ig=Math.log,ng=mp.extend({type:"log",base:10,$constructor:function(){mp.apply(this,arguments),this._originalScale=new Dp},getTicks:function(t){var i=this._originalScale,n=this._extent,o=i.getExtent();return O(Kp.getTicks.call(this,t),function(t){var e=zl(eg(this.base,t));return e=t===n[0]&&i.__fixMin?og(e,o[0]):e,e=t===n[1]&&i.__fixMax?og(e,o[1]):e},this)},getMinorTicks:Kp.getMinorTicks,getLabel:Kp.getLabel,scale:function(t){return t=qp.scale.call(this,t),eg(this.base,t)},setExtent:function(t,e){var i=this.base;t=ig(t)/ig(i),e=ig(e)/ig(i),Kp.setExtent.call(this,t,e)},getExtent:function(){var t=this.base,e=qp.getExtent.call(this);e[0]=eg(t,e[0]),e[1]=eg(t,e[1]);var i=this._originalScale,n=i.getExtent();return i.__fixMin&&(e[0]=og(e[0],n[0])),i.__fixMax&&(e[1]=og(e[1],n[1])),e},unionExtent:function(t){this._originalScale.unionExtent(t);var e=this.base;t[0]=ig(t[0])/ig(e),t[1]=ig(t[1])/ig(e),qp.unionExtent.call(this,t)},unionExtentFromData:function(t,e){this.unionExtent(t.getApproximateExtent(e))},niceTicks:function(t){t=t||10;var e=this._extent,i=e[1]-e[0];if(!(i==1/0||i<=0)){var n=jl(i);for(t/i*n<=.5&&(n*=10);!isNaN(n)&&Math.abs(n)<1&&0<Math.abs(n);)n*=10;var o=[zl(tg(e[0]/n)*n),zl(Qp(e[1]/n)*n)];this._interval=n,this._niceExtent=o}},niceExtent:function(t){Kp.niceExtent.call(this,t);var e=this._originalScale;e.__fixMin=t.fixMin,e.__fixMax=t.fixMax}});function og(t,e){return Jp(t,$p(e))}function ag(t,e){var i,n,o,a=t.type,r=e.getMin(),s=e.getMax(),l=t.getExtent();"ordinal"===a?i=e.getCategories().length:(L(n=e.get("boundaryGap"))||(n=[n||0,n||0]),"boolean"==typeof n[0]&&(n=[0,0]),n[0]=Rl(n[0],1),n[1]=Rl(n[1],1),o=l[1]-l[0]||Math.abs(l[0])),"dataMin"===r?r=l[0]:"function"==typeof r&&(r=r({min:l[0],max:l[1]})),"dataMax"===s?s=l[1]:"function"==typeof s&&(s=s({min:l[0],max:l[1]}));var u=null!=r,h=null!=s;null==r&&(r="ordinal"===a?i?0:NaN:l[0]-n[0]*o),null==s&&(s="ordinal"===a?i?i-1:NaN:l[1]+n[1]*o),null!=r&&isFinite(r)||(r=NaN),null!=s&&isFinite(s)||(s=NaN),t.setBlank(F(r)||F(s)||"ordinal"===a&&!t.getOrdinalMeta().categories.length),e.getNeedCrossZero()&&(0<r&&0<s&&!u&&(r=0),r<0&&s<0&&!h&&(s=0));var c=e.ecModel;if(c&&"time"===a){var d,f=Np("bar",c);if(E(f,function(t){d|=t.getBaseAxis()===e.axis}),d){var p=Op(f),g=function(t,e,i,n){var o=i.axis.getExtent(),a=o[1]-o[0],r=Rp(n,i.axis);if(void 0===r)return{min:t,max:e};var s=1/0;E(r,function(t){s=Math.min(t.offset,s)});var l=-1/0;E(r,function(t){l=Math.max(t.offset+t.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,h=e-t,c=h/(1-(s+l)/a)-h;return{min:t-=s/u*c,max:e+=l/u*c}}(r,s,e,p);r=g.min,s=g.max}}return{extent:[r,s],fixMin:u,fixMax:h}}function rg(t,e){var i=ag(t,e),n=i.extent,o=e.get("splitNumber");"log"===t.type&&(t.base=e.get("logBase"));var a=t.type;t.setExtent(n[0],n[1]),t.niceExtent({splitNumber:o,fixMin:i.fixMin,fixMax:i.fixMax,minInterval:"interval"===a||"time"===a?e.get("minInterval"):null,maxInterval:"interval"===a||"time"===a?e.get("maxInterval"):null});var r=e.get("interval");null!=r&&t.setInterval&&t.setInterval(r)}function sg(t,e){if(e=e||t.get("type"))switch(e){case"category":return new bp(t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),[1/0,-1/0]);case"value":return new Dp;default:return(mp.getClass(e)||Dp).create(t)}}function lg(i){var e,n=i.getLabelModel().get("formatter"),o="category"===i.type?i.scale.getExtent()[0]:null;return"string"==typeof n?(e=n,n=function(t){return t=i.scale.getLabel(t),e.replace("{value}",null!=t?t:"")}):"function"==typeof n?function(t,e){return null!=o&&(e=t-o),n(ug(i,t),e)}:function(t){return i.scale.getLabel(t)}}function ug(t,e){return"category"===t.type?t.scale.getLabel(e):e}function hg(t){var e=t.get("interval");return null==e?"auto":e}function cg(t){return"category"===t.type&&0===hg(t.getLabelModel())}E(["contain","normalize"],function(e){ng.prototype[e]=function(t){return t=ig(t)/ig(this.base),qp[e].call(this,t)}}),ng.create=function(){return new ng};var dg={getMin:function(t){var e=this.option,i=t||null==e.rangeStart?e.min:e.rangeStart;return this.axis&&null!=i&&"dataMin"!==i&&"function"!=typeof i&&!F(i)&&(i=this.axis.scale.parse(i)),i},getMax:function(t){var e=this.option,i=t||null==e.rangeEnd?e.max:e.rangeEnd;return this.axis&&null!=i&&"dataMax"!==i&&"function"!=typeof i&&!F(i)&&(i=this.axis.scale.parse(i)),i},getNeedCrossZero:function(){var t=this.option;return null==t.rangeStart&&null==t.rangeEnd&&!t.scale},getCoordSysModel:et,setRange:function(t,e){this.option.rangeStart=t,this.option.rangeEnd=e},resetRange:function(){this.option.rangeStart=this.option.rangeEnd=null}},fg=Cs({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var i=e.cx,n=e.cy,o=e.width/2,a=e.height/2;t.moveTo(i,n-a),t.lineTo(i+o,n+a),t.lineTo(i-o,n+a),t.closePath()}}),pg=Cs({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var i=e.cx,n=e.cy,o=e.width/2,a=e.height/2;t.moveTo(i,n-a),t.lineTo(i+o,n),t.lineTo(i,n+a),t.lineTo(i-o,n),t.closePath()}}),gg=Cs({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var i=e.x,n=e.y,o=e.width/5*3,a=Math.max(o,e.height),r=o/2,s=r*r/(a-r),l=n-a+r+s,u=Math.asin(s/r),h=Math.cos(u)*r,c=Math.sin(u),d=Math.cos(u),f=.6*r,p=.7*r;t.moveTo(i-h,l+s),t.arc(i,l,r,Math.PI-u,2*Math.PI+u),t.bezierCurveTo(i+h-c*f,l+s+d*f,i,n-p,i,n),t.bezierCurveTo(i,n-p,i-h+c*f,l+s+d*f,i-h,l+s),t.closePath()}}),mg=Cs({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var i=e.height,n=e.width,o=e.x,a=e.y,r=n/3*2;t.moveTo(o,a),t.lineTo(o+r,a+i),t.lineTo(o,a+i/4*3),t.lineTo(o-r,a+i),t.lineTo(o,a),t.closePath()}}),vg={line:function(t,e,i,n,o){o.x1=t,o.y1=e+n/2,o.x2=t+i,o.y2=e+n/2},rect:function(t,e,i,n,o){o.x=t,o.y=e,o.width=i,o.height=n},roundRect:function(t,e,i,n,o){o.x=t,o.y=e,o.width=i,o.height=n,o.r=Math.min(i,n)/4},square:function(t,e,i,n,o){var a=Math.min(i,n);o.x=t,o.y=e,o.width=a,o.height=a},circle:function(t,e,i,n,o){o.cx=t+i/2,o.cy=e+n/2,o.r=Math.min(i,n)/2},diamond:function(t,e,i,n,o){o.cx=t+i/2,o.cy=e+n/2,o.width=i,o.height=n},pin:function(t,e,i,n,o){o.x=t+i/2,o.y=e+n/2,o.width=i,o.height=n},arrow:function(t,e,i,n,o){o.x=t+i/2,o.y=e+n/2,o.width=i,o.height=n},triangle:function(t,e,i,n,o){o.cx=t+i/2,o.cy=e+n/2,o.width=i,o.height=n}},yg={};E({line:ls,rect:rs,roundRect:rs,square:rs,circle:Yr,diamond:pg,pin:gg,arrow:mg,triangle:fg},function(t,e){yg[e]=new t});var xg=Cs({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(t,e,i){var n=yn(t,e,i),o=this.shape;return o&&"pin"===o.symbolType&&"inside"===e.textPosition&&(n.y=i.y+.4*i.height),n},buildPath:function(t,e,i){var n=e.symbolType;if("none"!==n){var o=yg[n];o=o||yg[n="rect"],vg[n](e.x,e.y,e.width,e.height,o.shape),o.buildPath(t,o.shape,i)}}});function _g(t,e){if("image"!==this.type){var i=this.style,n=this.shape;n&&"line"===n.symbolType?i.stroke=t:this.__isEmptyBrush?(i.stroke=t,i.fill=e||"#fff"):(i.fill&&(i.fill=t),i.stroke&&(i.stroke=t)),this.dirty(!1)}}function wg(t,e,i,n,o,a,r){var s,l=0===t.indexOf("empty");return l&&(t=t.substr(5,1).toLowerCase()+t.substr(6)),(s=0===t.indexOf("image://")?Ns(t.slice(8),new Di(e,i,n,o),r?"center":"cover"):0===t.indexOf("path://")?Ps(t.slice(7),{},new Di(e,i,n,o),r?"center":"cover"):new xg({shape:{symbolType:t,x:e,y:i,width:n,height:o}})).__isEmptyBrush=l,s.setColor=_g,s.setColor(a),s}var bg={isDimensionStacked:fp,enableDataStack:dp,getStackedDimension:pp};var Sg=(Object.freeze||Object)({createList:function(t){return gp(t.getSource(),t)},getLayoutRect:bu,dataStack:bg,createScale:function(t,e){var i=e;Cl.isInstance(e)||b(i=new Cl(e),dg);var n=sg(i);return n.setExtent(t[0],t[1]),rg(n,i),n},mixinAxisModelCommonMethods:function(t){b(t,dg)},completeDimensions:rp,createDimensions:lp,createSymbol:wg}),Mg=1e-8;function Ig(t,e){return Math.abs(t-e)<Mg}function Tg(t,e,i){var n=0,o=t[0];if(!o)return!1;for(var a=1;a<t.length;a++){var r=t[a];n+=pr(o[0],o[1],r[0],r[1],e,i),o=r}var s=t[0];return Ig(o[0],s[0])&&Ig(o[1],s[1])||(n+=pr(o[0],o[1],s[0],s[1],e,i)),0!==n}function Ag(t,e,i){if(this.name=t,this.geometries=e,i)i=[i[0],i[1]];else{var n=this.getBoundingRect();i=[n.x+n.width/2,n.y+n.height/2]}this.center=i}function Dg(t,e,i){for(var n=[],o=e[0],a=e[1],r=0;r<t.length;r+=2){var s=t.charCodeAt(r)-64,l=t.charCodeAt(r+1)-64;s=s>>1^-(1&s),l=l>>1^-(1&l),o=s+=o,a=l+=a,n.push([s/i,l/i])}return n}Ag.prototype={constructor:Ag,properties:null,getBoundingRect:function(){var t=this._rect;if(t)return t;for(var e=Number.MAX_VALUE,i=[e,e],n=[-e,-e],o=[],a=[],r=this.geometries,s=0;s<r.length;s++){if("polygon"===r[s].type)Wa(r[s].exterior,o,a),St(i,i,o),Mt(n,n,a)}return 0===s&&(i[0]=i[1]=n[0]=n[1]=0),this._rect=new Di(i[0],i[1],n[0]-i[0],n[1]-i[1])},contain:function(t){var e=this.getBoundingRect(),i=this.geometries;if(!e.contain(t[0],t[1]))return!1;t:for(var n=0,o=i.length;n<o;n++)if("polygon"===i[n].type){var a=i[n].exterior,r=i[n].interiors;if(Tg(a,t[0],t[1])){for(var s=0;s<(r?r.length:0);s++)if(Tg(r[s]))continue t;return!0}}return!1},transformTo:function(t,e,i,n){var o=this.getBoundingRect(),a=o.width/o.height;i?n=n||i/a:i=a*n;for(var r=new Di(t,e,i,n),s=o.calculateTransform(r),l=this.geometries,u=0;u<l.length;u++)if("polygon"===l[u].type){for(var h=l[u].exterior,c=l[u].interiors,d=0;d<h.length;d++)bt(h[d],h[d],s);for(var f=0;f<(c?c.length:0);f++)for(d=0;d<c[f].length;d++)bt(c[f][d],c[f][d],s)}(o=this._rect).copy(r),this.center=[o.x+o.width/2,o.y+o.height/2]},cloneShallow:function(t){null==t&&(t=this.name);var e=new Ag(t,this.geometries,this.center);return e._rect=this._rect,e.transformTo=null,e}};function Cg(t,r){return function(t){if(!t.UTF8Encoding)return;var e=t.UTF8Scale;null==e&&(e=1024);for(var i=t.features,n=0;n<i.length;n++)for(var o=i[n].geometry,a=o.coordinates,r=o.encodeOffsets,s=0;s<a.length;s++){var l=a[s];if("Polygon"===o.type)a[s]=Dg(l,r[s],e);else if("MultiPolygon"===o.type)for(var u=0;u<l.length;u++){var h=l[u];l[u]=Dg(h,r[s][u],e)}}t.UTF8Encoding=!1}(t),O(M(t.features,function(t){return t.geometry&&t.properties&&0<t.geometry.coordinates.length}),function(t){var e=t.properties,i=t.geometry,n=i.coordinates,o=[];"Polygon"===i.type&&o.push({type:"polygon",exterior:n[0],interiors:n.slice(1)}),"MultiPolygon"===i.type&&E(n,function(t){t[0]&&o.push({type:"polygon",exterior:t[0],interiors:t.slice(1)})});var a=new Ag(e[r||"name"],o,e.cp);return a.properties=e,a})}var Lg=jo();function kg(t){return"category"===t.type?function(t){var e=t.getLabelModel(),i=Ng(t,e);return!e.get("show")||t.scale.isBlank()?{labels:[],labelCategoryInterval:i.labelCategoryInterval}:i}(t):function(i){var t=i.scale.getTicks(),n=lg(i);return{labels:O(t,function(t,e){return{formattedLabel:n(t,e),rawLabel:i.scale.getLabel(t),tickValue:t}})}}(t)}function Pg(t,e){return"category"===t.type?function(t,e){var i,n,o=Og(t,"ticks"),a=hg(e),r=Eg(o,a);if(r)return r;e.get("show")&&!t.scale.isBlank()||(i=[]);if(C(a))i=Bg(t,a,!0);else if("auto"===a){var s=Ng(t,t.getLabelModel());n=s.labelCategoryInterval,i=O(s.labels,function(t){return t.tickValue})}else i=zg(t,n=a,!0);return Rg(o,a,{ticks:i,tickCategoryInterval:n})}(t,e):{ticks:t.scale.getTicks()}}function Ng(t,e){var i,n=Og(t,"labels"),o=hg(e),a=Eg(n,o);return a||Rg(n,o,{labels:C(o)?Bg(t,o):zg(t,i="auto"===o?function(t){var e=Lg(t).autoInterval;return null!=e?e:Lg(t).autoInterval=t.calculateCategoryInterval()}(t):o),labelCategoryInterval:i})}function Og(t,e){return Lg(t)[e]||(Lg(t)[e]=[])}function Eg(t,e){for(var i=0;i<t.length;i++)if(t[i].key===e)return t[i].value}function Rg(t,e,i){return t.push({key:e,value:i}),i}function zg(t,e,i){var n=lg(t),o=t.scale,a=o.getExtent(),r=t.getLabelModel(),s=[],l=Math.max((e||0)+1,1),u=a[0],h=o.count();0!==u&&1<l&&2<h/l&&(u=Math.round(Math.ceil(u/l)*l));var c=cg(t),d=r.get("showMinLabel")||c,f=r.get("showMaxLabel")||c;d&&u!==a[0]&&g(a[0]);for(var p=u;p<=a[1];p+=l)g(p);function g(t){s.push(i?t:{formattedLabel:n(t),rawLabel:o.getLabel(t),tickValue:t})}return f&&p-l!==a[1]&&g(a[1]),s}function Bg(t,i,n){var o=t.scale,a=lg(t),r=[];return E(o.getTicks(),function(t){var e=o.getLabel(t);i(t,e)&&r.push(n?t:{formattedLabel:a(t),rawLabel:e,tickValue:t})}),r}var Vg=[0,1],Gg=function(t,e,i){this.dim=t,this.scale=e,this._extent=i||[0,0],this.inverse=!1,this.onBand=!1};function Fg(t,e){var i=(t[1]-t[0])/e/2;t[0]+=i,t[1]-=i}Gg.prototype={constructor:Gg,contain:function(t){var e=this._extent,i=Math.min(e[0],e[1]),n=Math.max(e[0],e[1]);return i<=t&&t<=n},containData:function(t){return this.scale.contain(t)},getExtent:function(){return this._extent.slice()},getPixelPrecision:function(t){return Fl(t||this.scale.getExtent(),this._extent)},setExtent:function(t,e){var i=this._extent;i[0]=t,i[1]=e},dataToCoord:function(t,e){var i=this._extent,n=this.scale;return t=n.normalize(t),this.onBand&&"ordinal"===n.type&&Fg(i=i.slice(),n.count()),El(t,Vg,i,e)},coordToData:function(t,e){var i=this._extent,n=this.scale;this.onBand&&"ordinal"===n.type&&Fg(i=i.slice(),n.count());var o=El(t,i,Vg,e);return this.scale.scale(o)},pointToData:function(t,e){},getTicksCoords:function(t){var e=(t=t||{}).tickModel||this.getTickModel(),i=O(Pg(this,e).ticks,function(t){return{coord:this.dataToCoord(t),tickValue:t}},this);return function(t,e,i,n){var o=e.length;if(!t.onBand||i||!o)return;var a,r,s=t.getExtent();if(1===o)e[0].coord=s[0],a=e[1]={coord:s[0]};else{var l=e[o-1].tickValue-e[0].tickValue,u=(e[o-1].coord-e[0].coord)/l;E(e,function(t){t.coord-=u/2});var h=t.scale.getExtent();r=1+h[1]-e[o-1].tickValue,a={coord:e[o-1].coord+u*r},e.push(a)}var c=s[0]>s[1];d(e[0].coord,s[0])&&(n?e[0].coord=s[0]:e.shift());n&&d(s[0],e[0].coord)&&e.unshift({coord:s[0]});d(s[1],a.coord)&&(n?a.coord=s[1]:e.pop());n&&d(a.coord,s[1])&&e.push({coord:s[1]});function d(t,e){return t=zl(t),e=zl(e),c?e<t:t<e}}(this,i,e.get("alignWithLabel"),t.clamp),i},getMinorTicksCoords:function(){if("ordinal"===this.scale.type)return[];var t=this.model.getModel("minorTick").get("splitNumber");return 0<t&&t<100||(t=5),O(this.scale.getMinorTicks(t),function(t){return O(t,function(t){return{coord:this.dataToCoord(t),tickValue:t}},this)},this)},getViewLabels:function(){return kg(this).labels},getLabelModel:function(){return this.model.getModel("axisLabel")},getTickModel:function(){return this.model.getModel("axisTick")},getBandWidth:function(){var t=this._extent,e=this.scale.getExtent(),i=e[1]-e[0]+(this.onBand?1:0);0===i&&(i=1);var n=Math.abs(t[1]-t[0]);return Math.abs(n)/i},isHorizontal:null,getRotate:null,calculateCategoryInterval:function(){return function(t){var e=function(t){var e=t.getLabelModel();return{axisRotate:t.getRotate?t.getRotate():t.isHorizontal&&!t.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}(t),i=lg(t),n=(e.axisRotate-e.labelRotate)/180*Math.PI,o=t.scale,a=o.getExtent(),r=o.count();if(a[1]-a[0]<1)return 0;var s=1;40<r&&(s=Math.max(1,Math.floor(r/40)));for(var l=a[0],u=t.dataToCoord(l+1)-t.dataToCoord(l),h=Math.abs(u*Math.cos(n)),c=Math.abs(u*Math.sin(n)),d=0,f=0;l<=a[1];l+=s){var p,g,m=gn(i(l),e.font,"center","top");p=1.3*m.width,g=1.3*m.height,d=Math.max(d,p,7),f=Math.max(f,g,7)}var v=d/h,y=f/c;isNaN(v)&&(v=1/0),isNaN(y)&&(y=1/0);var x=Math.max(0,Math.floor(Math.min(v,y))),_=Lg(t.model),w=t.getExtent(),b=_.lastAutoInterval,S=_.lastTickCount;return null!=b&&null!=S&&Math.abs(b-x)<=1&&Math.abs(S-r)<=1&&x<b&&_.axisExtend0===w[0]&&_.axisExtend1===w[1]?x=b:(_.lastTickCount=r,_.lastAutoInterval=x,_.axisExtend0=w[0],_.axisExtend1=w[1]),x}(this)}};var Wg=Cg,Hg={};E(["map","each","filter","indexOf","inherits","reduce","filter","bind","curry","isArray","isString","isObject","isFunction","extend","defaults","clone","merge"],function(t){Hg[t]=it[t]});var Zg={};function Ug(t,e){var i=t.mapDimension("defaultedLabel",!0),n=i.length;if(1===n)return Hh(t,e,i[0]);if(n){for(var o=[],a=0;a<i.length;a++){var r=Hh(t,e,i[a]);o.push(r)}return o.join(" ")}}function Xg(t,e,i){Ci.call(this),this.updateData(t,e,i)}E(["extendShape","extendPath","makePath","makeImage","mergePath","resizePath","createIcon","setHoverStyle","setLabelStyle","setTextStyle","setText","getFont","updateProps","initProps","getTransform","clipPointsByRect","clipRectByRect","registerShape","getShapeClass","Group","Image","Text","Circle","Sector","Ring","Polygon","Polyline","Rect","Line","BezierCurve","Arc","IncrementalDisplayable","CompoundPath","LinearGradient","RadialGradient","BoundingRect"],function(t){Zg[t]=bl[t]}),sc.extend({type:"series.line",dependencies:["grid","polar"],getInitialData:function(t,e){return gp(this.getSource(),this,{useEncodeDefaulter:!0})},defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,clip:!0,label:{position:"top"},lineStyle:{width:2,type:"solid"},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0}});var Yg=Xg.prototype,jg=Xg.getSymbolSize=function(t,e){var i=t.getItemVisual(e,"symbolSize");return i instanceof Array?i.slice():[+i,+i]};function qg(t){return[t[0]/2,t[1]/2]}function Kg(t,e){this.parent.drift(t,e)}Yg._createSymbol=function(t,e,i,n,o){this.removeAll();var a=wg(t,-1,-1,2,2,e.getItemVisual(i,"color"),o);a.attr({z2:100,culling:!0,scale:qg(n)}),a.drift=Kg,this._symbolType=t,this.add(a)},Yg.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(t)},Yg.getSymbolPath=function(){return this.childAt(0)},Yg.getScale=function(){return this.childAt(0).scale},Yg.highlight=function(){this.childAt(0).trigger("emphasis")},Yg.downplay=function(){this.childAt(0).trigger("normal")},Yg.setZ=function(t,e){var i=this.childAt(0);i.zlevel=t,i.z=e},Yg.setDraggable=function(t){var e=this.childAt(0);e.draggable=t,e.cursor=t?"move":e.cursor},Yg.updateData=function(t,e,i){this.silent=!1;var n=t.getItemVisual(e,"symbol")||"circle",o=t.hostModel,a=jg(t,e),r=n!==this._symbolType;if(r){var s=t.getItemVisual(e,"symbolKeepAspect");this._createSymbol(n,t,e,a,s)}else{(l=this.childAt(0)).silent=!1,cl(l,{scale:qg(a)},o,e)}if(this._updateCommon(t,e,a,i),r){var l=this.childAt(0),u=i&&i.fadeIn,h={scale:l.scale.slice()};u&&(h.style={opacity:l.style.opacity}),l.scale=[0,0],u&&(l.style.opacity=0),dl(l,h,o,e)}this._seriesModel=o};var $g=["itemStyle"],Jg=["emphasis","itemStyle"],Qg=["label"],tm=["emphasis","label"];function em(t,e){if(!this.incremental&&!this.useHoverLayer)if("emphasis"===e){var i=this.__symbolOriginalScale,n=i[1]/i[0],o={scale:[Math.max(1.1*i[0],i[0]+3),Math.max(1.1*i[1],i[1]+3*n)]};this.animateTo(o,400,"elasticOut")}else"normal"===e&&this.animateTo({scale:this.__symbolOriginalScale},400,"elasticOut")}function im(t){this.group=new Ci,this._symbolCtor=t||Xg}Yg._updateCommon=function(i,t,e,n){var o=this.childAt(0),a=i.hostModel,r=i.getItemVisual(t,"color");"image"!==o.type?o.useStyle({strokeNoScale:!0}):o.setStyle({opacity:null,shadowBlur:null,shadowOffsetX:null,shadowOffsetY:null,shadowColor:null});var s=n&&n.itemStyle,l=n&&n.hoverItemStyle,u=n&&n.symbolOffset,h=n&&n.labelModel,c=n&&n.hoverLabelModel,d=n&&n.hoverAnimation,f=n&&n.cursorStyle;if(!n||i.hasItemOption){var p=n&&n.itemModel?n.itemModel:i.getItemModel(t);s=p.getModel($g).getItemStyle(["color"]),l=p.getModel(Jg).getItemStyle(),u=p.getShallow("symbolOffset"),h=p.getModel(Qg),c=p.getModel(tm),d=p.getShallow("hoverAnimation"),f=p.getShallow("cursor")}else l=P({},l);var g=o.style,m=i.getItemVisual(t,"symbolRotate");o.attr("rotation",(m||0)*Math.PI/180||0),u&&o.attr("position",[Rl(u[0],e[0]),Rl(u[1],e[1])]),f&&o.attr("cursor",f),o.setColor(r,n&&n.symbolInnerColor),o.setStyle(s);var v=i.getItemVisual(t,"opacity");null!=v&&(g.opacity=v);var y=i.getItemVisual(t,"liftZ"),x=o.__z2Origin;null!=y?null==x&&(o.__z2Origin=o.z2,o.z2+=y):null!=x&&(o.z2=x,o.__z2Origin=null);var _=n&&n.useNameLabel;el(g,l,h,c,{labelFetcher:a,labelDataIndex:t,defaultText:function(t,e){return _?i.getName(t):Ug(i,t)},isRectText:!0,autoColor:r}),o.__symbolOriginalScale=qg(e),o.hoverStyle=l,o.highDownOnUpdate=d&&a.isAnimationEnabled()?em:null,$s(o)},Yg.fadeOut=function(t,e){var i=this.childAt(0);this.silent=i.silent=!0,e&&e.keepLabel||(i.style.text=null),cl(i,{style:{opacity:0},scale:[0,0]},this._seriesModel,this.dataIndex,t)},w(Xg,Ci);var nm=im.prototype;function om(t,e,i,n){return e&&!isNaN(e[0])&&!isNaN(e[1])&&!(n.isIgnore&&n.isIgnore(i))&&!(n.clipShape&&!n.clipShape.contain(e[0],e[1]))&&"none"!==t.getItemVisual(i,"symbol")}function am(t){return null==t||z(t)||(t={isIgnore:t}),t||{}}function rm(t){var e=t.hostModel;return{itemStyle:e.getModel("itemStyle").getItemStyle(["color"]),hoverItemStyle:e.getModel("emphasis.itemStyle").getItemStyle(),symbolRotate:e.get("symbolRotate"),symbolOffset:e.get("symbolOffset"),hoverAnimation:e.get("hoverAnimation"),labelModel:e.getModel("label"),hoverLabelModel:e.getModel("emphasis.label"),cursorStyle:e.get("cursor")}}function sm(t,e,i){var n,o=t.getBaseAxis(),a=t.getOtherAxis(o),r=function(t,e){var i=0,n=t.scale.getExtent();"start"===e?i=n[0]:"end"===e?i=n[1]:0<n[0]?i=n[0]:n[1]<0&&(i=n[1]);return i}(a,i),s=o.dim,l=a.dim,u=e.mapDimension(l),h=e.mapDimension(s),c="x"===l||"radius"===l?1:0,d=O(t.dimensions,function(t){return e.mapDimension(t)}),f=e.getCalculationInfo("stackResultDimension");return(n|=fp(e,d[0]))&&(d[0]=f),(n|=fp(e,d[1]))&&(d[1]=f),{dataDimsForPoint:d,valueStart:r,valueAxisDim:l,baseAxisDim:s,stacked:!!n,valueDim:u,baseDim:h,baseDataOffset:c,stackedOverDimension:e.getCalculationInfo("stackedOverDimension")}}function lm(t,e,i,n){var o=NaN;t.stacked&&(o=i.get(i.getCalculationInfo("stackedOverDimension"),n)),isNaN(o)&&(o=t.valueStart);var a=t.baseDataOffset,r=[];return r[a]=i.get(t.baseDim,n),r[1-a]=o,e.dataToPoint(r)}nm.updateData=function(o,a){a=am(a);var r=this.group,s=o.hostModel,l=this._data,u=this._symbolCtor,h=rm(o);l||r.removeAll(),o.diff(l).add(function(t){var e=o.getItemLayout(t);if(om(o,e,t,a)){var i=new u(o,t,h);i.attr("position",e),o.setItemGraphicEl(t,i),r.add(i)}}).update(function(t,e){var i=l.getItemGraphicEl(e),n=o.getItemLayout(t);om(o,n,t,a)?(i?(i.updateData(o,t,h),cl(i,{position:n},s)):(i=new u(o,t)).attr("position",n),r.add(i),o.setItemGraphicEl(t,i)):r.remove(i)}).remove(function(t){var e=l.getItemGraphicEl(t);e&&e.fadeOut(function(){r.remove(e)})}).execute(),this._data=o},nm.isPersistent=function(){return!0},nm.updateLayout=function(){var n=this._data;n&&n.eachItemGraphicEl(function(t,e){var i=n.getItemLayout(e);t.attr("position",i)})},nm.incrementalPrepareUpdate=function(t){this._seriesScope=rm(t),this._data=null,this.group.removeAll()},nm.incrementalUpdate=function(t,e,i){function n(t){t.isGroup||(t.incremental=t.useHoverLayer=!0)}i=am(i);for(var o=t.start;o<t.end;o++){var a=e.getItemLayout(o);if(om(e,a,o,i)){var r=new this._symbolCtor(e,o,this._seriesScope);r.traverse(n),r.attr("position",a),this.group.add(r),e.setItemGraphicEl(o,r)}}},nm.remove=function(t){var e=this.group,i=this._data;i&&t?i.eachItemGraphicEl(function(t){t.fadeOut(function(){e.remove(t)})}):e.removeAll()};var um=St,hm=Mt,cm=ut,dm=at,fm=[],pm=[],gm=[];function mm(t){return isNaN(t[0])||isNaN(t[1])}function vm(t,e,i,n,o,a,r,s,l,u){return"none"!==u&&u?function(t,e,i,n,o,a,r,s,l,u,h){for(var c=0,d=i,f=0;f<n;f++){var p=e[d];if(o<=d||d<0)break;if(mm(p)){if(h){d+=a;continue}break}if(d===i)t[0<a?"moveTo":"lineTo"](p[0],p[1]);else if(0<l){var g=e[c],m="y"===u?1:0,v=(p[m]-g[m])*l;dm(pm,g),pm[m]=g[m]+v,dm(gm,p),gm[m]=p[m]-v,t.bezierCurveTo(pm[0],pm[1],gm[0],gm[1],p[0],p[1])}else t.lineTo(p[0],p[1]);c=d,d+=a}return f}.apply(this,arguments):function(t,e,i,n,o,a,r,s,l,u,h){for(var c=0,d=i,f=0;f<n;f++){var p=e[d];if(o<=d||d<0)break;if(mm(p)){if(h){d+=a;continue}break}if(d===i)t[0<a?"moveTo":"lineTo"](p[0],p[1]),dm(pm,p);else if(0<l){var g=d+a,m=e[g];if(h)for(;m&&mm(e[g]);)m=e[g+=a];var v=.5,y=e[c];if(!(m=e[g])||mm(m))dm(gm,p);else{var x,_;if(mm(m)&&!h&&(m=p),ht(fm,m,y),"x"===u||"y"===u){var w="x"===u?0:1;x=Math.abs(p[w]-y[w]),_=Math.abs(p[w]-m[w])}else x=yt(p,y),_=yt(p,m);cm(gm,p,fm,-l*(1-(v=_/(_+x))))}um(pm,pm,s),hm(pm,pm,r),um(gm,gm,s),hm(gm,gm,r),t.bezierCurveTo(pm[0],pm[1],gm[0],gm[1],p[0],p[1]),cm(pm,p,fm,l*v)}else t.lineTo(p[0],p[1]);c=d,d+=a}return f}.apply(this,arguments)}function ym(t,e){var i=[1/0,1/0],n=[-1/0,-1/0];if(e)for(var o=0;o<t.length;o++){var a=t[o];a[0]<i[0]&&(i[0]=a[0]),a[1]<i[1]&&(i[1]=a[1]),a[0]>n[0]&&(n[0]=a[0]),a[1]>n[1]&&(n[1]=a[1])}return{min:e?i:n,max:e?n:i}}var xm=Ar.extend({type:"ec-polyline",shape:{points:[],smooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},style:{fill:null,stroke:"#000"},brush:Xr(Ar.prototype.brush),buildPath:function(t,e){var i=e.points,n=0,o=i.length,a=ym(i,e.smoothConstraint);if(e.connectNulls){for(;0<o&&mm(i[o-1]);o--);for(;n<o&&mm(i[n]);n++);}for(;n<o;)n+=vm(t,i,n,o,o,1,a.min,a.max,e.smooth,e.smoothMonotone,e.connectNulls)+1}}),_m=Ar.extend({type:"ec-polygon",shape:{points:[],stackedOnPoints:[],smooth:0,stackedOnSmooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},brush:Xr(Ar.prototype.brush),buildPath:function(t,e){var i=e.points,n=e.stackedOnPoints,o=0,a=i.length,r=e.smoothMonotone,s=ym(i,e.smoothConstraint),l=ym(n,e.smoothConstraint);if(e.connectNulls){for(;0<a&&mm(i[a-1]);a--);for(;o<a&&mm(i[o]);o++);}for(;o<a;){var u=vm(t,i,o,a,a,1,s.min,s.max,e.smooth,r,e.connectNulls);vm(t,n,o+u-1,u,a,-1,l.min,l.max,e.stackedOnSmooth,r,e.connectNulls),o+=u+1,t.closePath()}}});function wm(t,e,i){var n=t.getArea(),o=t.getBaseAxis().isHorizontal(),a=n.x,r=n.y,s=n.width,l=n.height,u=i.get("lineStyle.width")||2;a-=u/2,r-=u/2,s+=u,l+=u,a=Math.floor(a),s=Math.round(s);var h=new rs({shape:{x:a,y:r,width:s,height:l}});return e&&(h.shape[o?"width":"height"]=0,dl(h,{shape:{width:s,height:l}},i)),h}function bm(t,e,i){var n=t.getArea(),o=new qr({shape:{cx:zl(t.cx,1),cy:zl(t.cy,1),r0:zl(n.r0,1),r:zl(n.r,1),startAngle:n.startAngle,endAngle:n.endAngle,clockwise:n.clockwise}});return e&&(o.shape.endAngle=n.startAngle,dl(o,{shape:{endAngle:n.endAngle}},i)),o}function Sm(t,e,i){return t?"polar"===t.type?bm(t,e,i):"cartesian2d"===t.type?wm(t,e,i):null:null}function Mm(t,e){if(t.length===e.length){for(var i=0;i<t.length;i++){var n=t[i],o=e[i];if(n[0]!==o[0]||n[1]!==o[1])return}return!0}}function Im(t,e){var i=[],n=[],o=[],a=[];return Wa(t,i,n),Wa(e,o,a),Math.max(Math.abs(i[0]-o[0]),Math.abs(i[1]-o[1]),Math.abs(n[0]-a[0]),Math.abs(n[1]-a[1]))}function Tm(t){return"number"==typeof t?t:t?.5:0}function Am(t,e,i){for(var n=e.getBaseAxis(),o="x"===n.dim||"radius"===n.dim?0:1,a=[],r=0;r<t.length-1;r++){var s=t[r+1],l=t[r];a.push(l);var u=[];switch(i){case"end":u[o]=s[o],u[1-o]=l[1-o],a.push(u);break;case"middle":var h=(l[o]+s[o])/2,c=[];u[o]=c[o]=h,u[1-o]=l[1-o],c[1-o]=s[1-o],a.push(u),a.push(c);break;default:u[o]=l[o],u[1-o]=s[1-o],a.push(u)}}return t[r]&&a.push(t[r]),a}function Dm(t,e,i){var n=t.get("showAllSymbol"),o="auto"===n;if(!n||o){var a=i.getAxesByScale("ordinal")[0];if(a&&(!o||!function(t,e){var i=t.getExtent(),n=Math.abs(i[1]-i[0])/t.scale.count();isNaN(n)&&(n=0);for(var o=e.count(),a=Math.max(1,Math.round(o/5)),r=0;r<o;r+=a)if(1.5*Xg.getSymbolSize(e,r)[t.isHorizontal()?1:0]>n)return!1;return!0}(a,e))){var r=e.mapDimension(a.dim),s={};return E(a.getViewLabels(),function(t){s[t.tickValue]=1}),function(t){return!s.hasOwnProperty(e.get(r,t))}}}}function Cm(t,e,i){if("cartesian2d"!==t.type)return bm(t,e,i);var n=t.getBaseAxis().isHorizontal(),o=wm(t,e,i);if(!i.get("clip",!0)){var a=o.shape,r=Math.max(a.width,a.height);n?(a.y-=r,a.height+=2*r):(a.x-=r,a.width+=2*r)}return o}_c.extend({type:"line",init:function(){var t=new Ci,e=new im;this.group.add(e.group),this._symbolDraw=e,this._lineGroup=t},render:function(t,e,i){var n=t.coordinateSystem,o=this.group,a=t.getData(),r=t.getModel("lineStyle"),s=t.getModel("areaStyle"),l=a.mapArray(a.getItemLayout),u="polar"===n.type,h=this._coordSys,c=this._symbolDraw,d=this._polyline,f=this._polygon,p=this._lineGroup,g=t.get("animation"),m=!s.isEmpty(),v=s.get("origin"),y=function(t,e,i){if(!i.valueDim)return[];for(var n=[],o=0,a=e.count();o<a;o++)n.push(lm(i,t,e,o));return n}(n,a,sm(n,a,v)),x=t.get("showSymbol"),_=x&&!u&&Dm(t,a,n),w=this._data;w&&w.eachItemGraphicEl(function(t,e){t.__temp&&(o.remove(t),w.setItemGraphicEl(e,null))}),x||c.remove(),o.add(p);var b,S=!u&&t.get("step");n&&n.getArea&&t.get("clip",!0)&&(null!=(b=n.getArea()).width?(b.x-=.1,b.y-=.1,b.width+=.2,b.height+=.2):b.r0&&(b.r0-=.5,b.r1+=.5)),this._clipShapeForSymbol=b,d&&h.type===n.type&&S===this._step?(m&&!f?f=this._newPolygon(l,y,n,g):f&&!m&&(p.remove(f),f=this._polygon=null),p.setClipPath(Cm(n,!1,t)),x&&c.updateData(a,{isIgnore:_,clipShape:b}),a.eachItemGraphicEl(function(t){t.stopAnimation(!0)}),Mm(this._stackedOnPoints,y)&&Mm(this._points,l)||(g?this._updateAnimation(a,y,n,i,S,v):(S&&(l=Am(l,n,S),y=Am(y,n,S)),d.setShape({points:l}),f&&f.setShape({points:l,stackedOnPoints:y})))):(x&&c.updateData(a,{isIgnore:_,clipShape:b}),S&&(l=Am(l,n,S),y=Am(y,n,S)),d=this._newPolyline(l,n,g),m&&(f=this._newPolygon(l,y,n,g)),p.setClipPath(Cm(n,!0,t)));var M=function(t,e){var i=t.getVisual("visualMeta");if(i&&i.length&&t.count()&&"cartesian2d"===e.type){for(var n,o,a=i.length-1;0<=a;a--){var r=i[a].dimension,s=t.dimensions[r],l=t.getDimensionInfo(s);if("x"===(n=l&&l.coordDim)||"y"===n){o=i[a];break}}if(o){var u=e.getAxis(n),h=O(o.stops,function(t){return{coord:u.toGlobalCoord(u.dataToCoord(t.value)),color:t.color}}),c=h.length,d=o.outerColors.slice();c&&h[0].coord>h[c-1].coord&&(h.reverse(),d.reverse());var f=h[0].coord-10,p=h[c-1].coord+10,g=p-f;if(g<.001)return"transparent";E(h,function(t){t.offset=(t.coord-f)/g}),h.push({offset:c?h[c-1].offset:.5,color:d[1]||"transparent"}),h.unshift({offset:c?h[0].offset:.5,color:d[0]||"transparent"});var m=new gs(0,0,0,0,h,!0);return m[n]=f,m[n+"2"]=p,m}}}(a,n)||a.getVisual("color");d.useStyle(D(r.getLineStyle(),{fill:"none",stroke:M,lineJoin:"bevel"}));var I=t.get("smooth");if(I=Tm(t.get("smooth")),d.setShape({smooth:I,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")}),f){var T=a.getCalculationInfo("stackedOnSeries"),A=0;f.useStyle(D(s.getAreaStyle(),{fill:M,opacity:.7,lineJoin:"bevel"})),T&&(A=Tm(T.get("smooth"))),f.setShape({smooth:I,stackedOnSmooth:A,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")})}this._data=a,this._coordSys=n,this._stackedOnPoints=y,this._points=l,this._step=S,this._valueOrigin=v},dispose:function(){},highlight:function(t,e,i,n){var o=t.getData(),a=Yo(o,n);if(!(a instanceof Array)&&null!=a&&0<=a){var r=o.getItemGraphicEl(a);if(!r){var s=o.getItemLayout(a);if(!s)return;if(this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(s[0],s[1]))return;(r=new Xg(o,a)).position=s,r.setZ(t.get("zlevel"),t.get("z")),r.ignore=isNaN(s[0])||isNaN(s[1]),r.__temp=!0,o.setItemGraphicEl(a,r),r.stopSymbolAnimation(!0),this.group.add(r)}r.highlight()}else _c.prototype.highlight.call(this,t,e,i,n)},downplay:function(t,e,i,n){var o=t.getData(),a=Yo(o,n);if(null!=a&&0<=a){var r=o.getItemGraphicEl(a);r&&(r.__temp?(o.setItemGraphicEl(a,null),this.group.remove(r)):r.downplay())}else _c.prototype.downplay.call(this,t,e,i,n)},_newPolyline:function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new xm({shape:{points:t},silent:!0,z2:10}),this._lineGroup.add(e),this._polyline=e},_newPolygon:function(t,e){var i=this._polygon;return i&&this._lineGroup.remove(i),i=new _m({shape:{points:t,stackedOnPoints:e},silent:!0}),this._lineGroup.add(i),this._polygon=i},_updateAnimation:function(t,e,i,n,o,a){var r=this._polyline,s=this._polygon,l=t.hostModel,u=function(t,e,i,n,o,a,r,s){for(var l=function(t,e){var i=[];return e.diff(t).add(function(t){i.push({cmd:"+",idx:t})}).update(function(t,e){i.push({cmd:"=",idx:e,idx1:t})}).remove(function(t){i.push({cmd:"-",idx:t})}).execute(),i}(t,e),u=[],h=[],c=[],d=[],f=[],p=[],g=[],m=sm(o,e,r),v=sm(a,t,s),y=0;y<l.length;y++){var x=l[y],_=!0;switch(x.cmd){case"=":var w=t.getItemLayout(x.idx),b=e.getItemLayout(x.idx1);(isNaN(w[0])||isNaN(w[1]))&&(w=b.slice()),u.push(w),h.push(b),c.push(i[x.idx]),d.push(n[x.idx1]),g.push(e.getRawIndex(x.idx1));break;case"+":var S=x.idx;u.push(o.dataToPoint([e.get(m.dataDimsForPoint[0],S),e.get(m.dataDimsForPoint[1],S)])),h.push(e.getItemLayout(S).slice()),c.push(lm(m,o,e,S)),d.push(n[S]),g.push(e.getRawIndex(S));break;case"-":S=x.idx;var M=t.getRawIndex(S);M!==S?(u.push(t.getItemLayout(S)),h.push(a.dataToPoint([t.get(v.dataDimsForPoint[0],S),t.get(v.dataDimsForPoint[1],S)])),c.push(i[S]),d.push(lm(v,a,t,S)),g.push(M)):_=!1}_&&(f.push(x),p.push(p.length))}p.sort(function(t,e){return g[t]-g[e]});var I=[],T=[],A=[],D=[],C=[];for(y=0;y<p.length;y++){S=p[y];I[y]=u[S],T[y]=h[S],A[y]=c[S],D[y]=d[S],C[y]=f[S]}return{current:I,next:T,stackedOnCurrent:A,stackedOnNext:D,status:C}}(this._data,t,this._stackedOnPoints,e,this._coordSys,i,this._valueOrigin,a),h=u.current,c=u.stackedOnCurrent,d=u.next,f=u.stackedOnNext;if(o&&(h=Am(u.current,i,o),c=Am(u.stackedOnCurrent,i,o),d=Am(u.next,i,o),f=Am(u.stackedOnNext,i,o)),3e3<Im(h,d)||s&&3e3<Im(c,f))return r.setShape({points:d}),void(s&&s.setShape({points:d,stackedOnPoints:f}));r.shape.__points=u.current,r.shape.points=h,cl(r,{shape:{points:d}},l),s&&(s.setShape({points:h,stackedOnPoints:c}),cl(s,{shape:{points:d,stackedOnPoints:f}},l));for(var p=[],g=u.status,m=0;m<g.length;m++){if("="===g[m].cmd){var v=t.getItemGraphicEl(g[m].idx1);v&&p.push({el:v,ptIdx:m})}}r.animators&&r.animators.length&&r.animators[0].during(function(){for(var t=0;t<p.length;t++){p[t].el.attr("position",r.shape.__points[p[t].ptIdx])}})},remove:function(t){var i=this.group,n=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),n&&n.eachItemGraphicEl(function(t,e){t.__temp&&(i.remove(t),n.setItemGraphicEl(e,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._data=null}});function Lm(t,r,s){return{seriesType:t,performRawSeries:!0,reset:function(u,t,e){var i=u.getData(),h=u.get("symbol"),c=u.get("symbolSize"),n=u.get("symbolKeepAspect"),d=u.get("symbolRotate"),f=C(h),p=C(c),g=C(d),m=f||p||g,o=!f&&h?h:r,a=p?null:c;if(i.setVisual({legendSymbol:s||o,symbol:o,symbolSize:a,symbolKeepAspect:n,symbolRotate:d}),!t.isSeriesFiltered(u))return{dataEach:i.hasItemOption||m?function(t,e){if(m){var i=u.getRawValue(e),n=u.getDataParams(e);f&&t.setItemVisual(e,"symbol",h(i,n)),p&&t.setItemVisual(e,"symbolSize",c(i,n)),g&&t.setItemVisual(e,"symbolRotate",d(i,n))}if(t.hasItemOption){var o=t.getItemModel(e),a=o.getShallow("symbol",!0),r=o.getShallow("symbolSize",!0),s=o.getShallow("symbolRotate",!0),l=o.getShallow("symbolKeepAspect",!0);null!=a&&t.setItemVisual(e,"symbol",a),null!=r&&t.setItemVisual(e,"symbolSize",r),null!=s&&t.setItemVisual(e,"symbolRotate",s),null!=l&&t.setItemVisual(e,"symbolKeepAspect",l)}}:null}}}}function km(t){return{seriesType:t,plan:vc(),reset:function(t){var e=t.getData(),c=t.coordinateSystem,d=t.pipelineContext.large;if(c){var f=O(c.dimensions,function(t){return e.mapDimension(t)}).slice(0,2),p=f.length,i=e.getCalculationInfo("stackResultDimension");return fp(e,f[0])&&(f[0]=i),fp(e,f[1])&&(f[1]=i),p&&{progress:function(t,e){for(var i=t.end-t.start,n=d&&new Float32Array(i*p),o=t.start,a=0,r=[],s=[];o<t.end;o++){var l;if(1===p){var u=e.get(f[0],o);l=!isNaN(u)&&c.dataToPoint(u,null,s)}else{u=r[0]=e.get(f[0],o);var h=r[1]=e.get(f[1],o);l=!isNaN(u)&&!isNaN(h)&&c.dataToPoint(r,null,s)}d?(n[a++]=l?l[0]:NaN,n[a++]=l?l[1]:NaN):e.setItemLayout(o,l&&l.slice()||[NaN,NaN])}d&&e.setLayout("symbolPoints",n)}}}}}}function Pm(t,e){return Math.round(t.length/2)}var Nm={average:function(t){for(var e=0,i=0,n=0;n<t.length;n++)isNaN(t[n])||(e+=t[n],i++);return 0===i?NaN:e/i},sum:function(t){for(var e=0,i=0;i<t.length;i++)e+=t[i]||0;return e},max:function(t){for(var e=-1/0,i=0;i<t.length;i++)t[i]>e&&(e=t[i]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,i=0;i<t.length;i++)t[i]<e&&(e=t[i]);return isFinite(e)?e:NaN},nearest:function(t){return t[0]}};function Om(t){return this._axes[t]}function Em(t){this._axes={},this._dimList=[],this.name=t||""}function Rm(t){Em.call(this,t)}Em.prototype={constructor:Em,type:"cartesian",getAxis:function(t){return this._axes[t]},getAxes:function(){return O(this._dimList,Om,this)},getAxesByScale:function(e){return e=e.toLowerCase(),M(this.getAxes(),function(t){return t.scale.type===e})},addAxis:function(t){var e=t.dim;this._axes[e]=t,this._dimList.push(e)},dataToCoord:function(t){return this._dataCoordConvert(t,"dataToCoord")},coordToData:function(t){return this._dataCoordConvert(t,"coordToData")},_dataCoordConvert:function(t,e){for(var i=this._dimList,n=t instanceof Array?[]:{},o=0;o<i.length;o++){var a=i[o],r=this._axes[a];n[a]=r[e](t[a])}return n}},Rm.prototype={constructor:Rm,type:"cartesian2d",dimensions:["x","y"],getBaseAxis:function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},containPoint:function(t){var e=this.getAxis("x"),i=this.getAxis("y");return e.contain(e.toLocalCoord(t[0]))&&i.contain(i.toLocalCoord(t[1]))},containData:function(t){return this.getAxis("x").containData(t[0])&&this.getAxis("y").containData(t[1])},dataToPoint:function(t,e,i){var n=this.getAxis("x"),o=this.getAxis("y");return(i=i||[])[0]=n.toGlobalCoord(n.dataToCoord(t[0])),i[1]=o.toGlobalCoord(o.dataToCoord(t[1])),i},clampData:function(t,e){var i=this.getAxis("x").scale,n=this.getAxis("y").scale,o=i.getExtent(),a=n.getExtent(),r=i.parse(t[0]),s=n.parse(t[1]);return(e=e||[])[0]=Math.min(Math.max(Math.min(o[0],o[1]),r),Math.max(o[0],o[1])),e[1]=Math.min(Math.max(Math.min(a[0],a[1]),s),Math.max(a[0],a[1])),e},pointToData:function(t,e){var i=this.getAxis("x"),n=this.getAxis("y");return(e=e||[])[0]=i.coordToData(i.toLocalCoord(t[0])),e[1]=n.coordToData(n.toLocalCoord(t[1])),e},getOtherAxis:function(t){return this.getAxis("x"===t.dim?"y":"x")},getArea:function(){var t=this.getAxis("x").getGlobalExtent(),e=this.getAxis("y").getGlobalExtent(),i=Math.min(t[0],t[1]),n=Math.min(e[0],e[1]);return new Di(i,n,Math.max(t[0],t[1])-i,Math.max(e[0],e[1])-n)}},w(Rm,Em);function zm(t,e,i,n,o){Gg.call(this,t,e,i),this.type=n||"value",this.position=o||"bottom"}zm.prototype={constructor:zm,index:0,getAxesOnZeroOf:null,model:null,isHorizontal:function(){var t=this.position;return"top"===t||"bottom"===t},getGlobalExtent:function(t){var e=this.getExtent();return e[0]=this.toGlobalCoord(e[0]),e[1]=this.toGlobalCoord(e[1]),t&&e[0]>e[1]&&e.reverse(),e},getOtherAxis:function(){this.grid.getOtherAxis()},pointToData:function(t,e){return this.coordToData(this.toLocalCoord(t["x"===this.dim?0:1]),e)},toLocalCoord:null,toGlobalCoord:null},w(zm,Gg);var Bm={show:!0,zlevel:0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#333",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,lineStyle:{color:["#ccc"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.3)","rgba(200,200,200,0.3)"]}}},Vm={};Vm.categoryAxis=m({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},Bm),Vm.valueAxis=m({boundaryGap:[0,0],splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#eee",width:1}}},Bm),Vm.timeAxis=D({scale:!0,min:"dataMin",max:"dataMax"},Vm.valueAxis),Vm.logAxis=D({scale:!0,logBase:10},Vm.valueAxis);function Gm(a,t,r,e){E(Fm,function(o){t.extend({type:a+"Axis."+o,mergeDefaultAndTheme:function(t,e){var i=this.layoutMode,n=i?Iu(t):{};m(t,e.getTheme().get(o+"Axis")),m(t,this.getDefaultOption()),t.type=r(a,t),i&&Mu(t,n,i)},optionUpdated:function(){"category"===this.option.type&&(this.__ordinalMeta=vp.createByAxisModel(this))},getCategories:function(t){var e=this.option;if("category"===e.type)return t?e.data:this.__ordinalMeta.categories},getOrdinalMeta:function(){return this.__ordinalMeta},defaultOption:p([{},Vm[o+"Axis"],e],!0)})}),ku.registerSubTypeDefaulter(a+"Axis",T(r,a))}var Fm=["value","category","time","log"],Wm=ku.extend({type:"cartesian2dAxis",axis:null,init:function(){Wm.superApply(this,"init",arguments),this.resetRange()},mergeOption:function(){Wm.superApply(this,"mergeOption",arguments),this.resetRange()},restoreData:function(){Wm.superApply(this,"restoreData",arguments),this.resetRange()},getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"grid",index:this.option.gridIndex,id:this.option.gridId})[0]}});function Hm(t,e){return e.type||(e.data?"category":"value")}m(Wm.prototype,dg);var Zm={offset:0};function Um(t,e){return t.getCoordSysModel()===e}function Xm(t,e,i){this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this._initCartesian(t,e,i),this.model=t}Gm("x",Wm,Hm,Zm),Gm("y",Wm,Hm,Zm),ku.extend({type:"grid",dependencies:["xAxis","yAxis"],layoutMode:"box",coordinateSystem:null,defaultOption:{show:!1,zlevel:0,z:0,left:"10%",top:60,right:"10%",bottom:60,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"}});var Ym=Xm.prototype;function jm(t,e,i,n){i.getAxesOnZeroOf=function(){return o?[o]:[]};var o,a=t[e],r=i.model,s=r.get("axisLine.onZero"),l=r.get("axisLine.onZeroAxisIndex");if(s){if(null!=l)qm(a[l])&&(o=a[l]);else for(var u in a)if(a.hasOwnProperty(u)&&qm(a[u])&&!n[h(a[u])]){o=a[u];break}o&&(n[h(o)]=!0)}function h(t){return t.dim+"_"+t.index}}function qm(t){return t&&"category"!==t.type&&"time"!==t.type&&function(t){var e=t.scale.getExtent(),i=e[0],n=e[1];return!(0<i&&0<n||i<0&&n<0)}(t)}Ym.type="grid",Ym.axisPointerEnabled=!0,Ym.getRect=function(){return this._rect},Ym.update=function(t,e){var i=this._axesMap;this._updateScale(t,this.model),E(i.x,function(t){rg(t.scale,t.model)}),E(i.y,function(t){rg(t.scale,t.model)});var n={};E(i.x,function(t){jm(i,"y",t,n)}),E(i.y,function(t){jm(i,"x",t,n)}),this.resize(this.model,e)},Ym.resize=function(t,e,i){var o=bu(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()});this._rect=o;var n=this._axesList;function a(){E(n,function(t){var e=t.isHorizontal(),i=e?[0,o.width]:[0,o.height],n=t.inverse?1:0;t.setExtent(i[n],i[1-n]),function(t,e){var i=t.getExtent(),n=i[0]+i[1];t.toGlobalCoord="x"===t.dim?function(t){return t+e}:function(t){return n-t+e},t.toLocalCoord="x"===t.dim?function(t){return t-e}:function(t){return n-t+e}}(t,e?o.x:o.y)})}a(),!i&&t.get("containLabel")&&(E(n,function(t){if(!t.model.get("axisLabel.inside")){var e=function(t){var e=t.model,i=t.scale;if(e.get("axisLabel.show")&&!i.isBlank()){var n,o,a="category"===t.type,r=i.getExtent();o=a?i.count():(n=i.getTicks()).length;var s,l,u,h,c,d,f,p,g,m=t.getLabelModel(),v=lg(t),y=1;40<o&&(y=Math.ceil(o/40));for(var x=0;x<o;x+=y){var _=v(n?n[x]:r[0]+x),w=m.getTextRect(_),b=(l=w,u=m.get("rotate")||0,void 0,h=u*Math.PI/180,c=l.plain(),d=c.width,f=c.height,p=d*Math.cos(h)+f*Math.sin(h),g=d*Math.sin(h)+f*Math.cos(h),new Di(c.x,c.y,p,g));s?s.union(b):s=b}return s}}(t);if(e){var i=t.isHorizontal()?"height":"width",n=t.model.get("axisLabel.margin");o[i]-=e[i]+n,"top"===t.position?o.y+=e.height+n:"left"===t.position&&(o.x+=e.width+n)}}}),a())},Ym.getAxis=function(t,e){var i=this._axesMap[t];if(null!=i){if(null==e)for(var n in i)if(i.hasOwnProperty(n))return i[n];return i[e]}},Ym.getAxes=function(){return this._axesList.slice()},Ym.getCartesian=function(t,e){if(null!=t&&null!=e){var i="x"+t+"y"+e;return this._coordsMap[i]}z(t)&&(e=t.yAxisIndex,t=t.xAxisIndex);for(var n=0,o=this._coordsList;n<o.length;n++)if(o[n].getAxis("x").index===t||o[n].getAxis("y").index===e)return o[n]},Ym.getCartesians=function(){return this._coordsList.slice()},Ym.convertToPixel=function(t,e,i){var n=this._findConvertTarget(t,e);return n.cartesian?n.cartesian.dataToPoint(i):n.axis?n.axis.toGlobalCoord(n.axis.dataToCoord(i)):null},Ym.convertFromPixel=function(t,e,i){var n=this._findConvertTarget(t,e);return n.cartesian?n.cartesian.pointToData(i):n.axis?n.axis.coordToData(n.axis.toLocalCoord(i)):null},Ym._findConvertTarget=function(t,e){var i,n,o=e.seriesModel,a=e.xAxisModel||o&&o.getReferringComponents("xAxis")[0],r=e.yAxisModel||o&&o.getReferringComponents("yAxis")[0],s=e.gridModel,l=this._coordsList;if(o)_(l,i=o.coordinateSystem)<0&&(i=null);else if(a&&r)i=this.getCartesian(a.componentIndex,r.componentIndex);else if(a)n=this.getAxis("x",a.componentIndex);else if(r)n=this.getAxis("y",r.componentIndex);else if(s){s.coordinateSystem===this&&(i=this._coordsList[0])}return{cartesian:i,axis:n}},Ym.containPoint=function(t){var e=this._coordsList[0];if(e)return e.containPoint(t)},Ym._initCartesian=function(r,t,e){var s={left:!1,right:!1,top:!1,bottom:!1},l={x:{},y:{}},u={x:0,y:0};if(t.eachComponent("xAxis",i("x"),this),t.eachComponent("yAxis",i("y"),this),!u.x||!u.y)return this._axesMap={},void(this._axesList=[]);function i(a){return function(t,e){if(Um(t,r)){var i=t.get("position");"x"===a?"top"!==i&&"bottom"!==i&&(i=s.bottom?"top":"bottom"):"left"!==i&&"right"!==i&&(i=s.left?"right":"left"),s[i]=!0;var n=new zm(a,sg(t),[0,0],t.get("type"),i),o="category"===n.type;n.onBand=o&&t.get("boundaryGap"),n.inverse=t.get("inverse"),(t.axis=n).model=t,n.grid=this,n.index=e,this._axesList.push(n),l[a][e]=n,u[a]++}}}E((this._axesMap=l).x,function(o,a){E(l.y,function(t,e){var i="x"+a+"y"+e,n=new Rm(i);n.grid=this,n.model=r,this._coordsMap[i]=n,this._coordsList.push(n),n.addAxis(o),n.addAxis(t)},this)},this)},Ym._updateScale=function(l,u){function h(e,i){E(e.mapDimension(i.dim,!0),function(t){i.scale.unionExtentFromData(e,pp(e,t))})}E(this._axesList,function(t){t.scale.setExtent(1/0,-1/0)}),l.eachSeries(function(t){if(Jm(t)){var e=$m(t,l),i=e[0],n=e[1];if(!Um(i,u)||!Um(n,u))return;var o=this.getCartesian(i.componentIndex,n.componentIndex),a=t.getData(),r=o.getAxis("x"),s=o.getAxis("y");"list"===a.type&&(h(a,r,t),h(a,s,t))}},this)},Ym.getTooltipAxes=function(n){var o=[],a=[];return E(this.getCartesians(),function(t){var e=null!=n&&"auto"!==n?t.getAxis(n):t.getBaseAxis(),i=t.getOtherAxis(e);_(o,e)<0&&o.push(e),_(a,i)<0&&a.push(i)}),{baseAxes:o,otherAxes:a}};var Km=["xAxis","yAxis"];function $m(e){return O(Km,function(t){return e.getReferringComponents(t)[0]})}function Jm(t){return"cartesian2d"===t.get("coordinateSystem")}Xm.create=function(n,o){var a=[];return n.eachComponent("grid",function(t,e){var i=new Xm(t,n,o);i.name="grid_"+e,i.resize(t,o,!0),t.coordinateSystem=i,a.push(i)}),n.eachSeries(function(t){if(Jm(t)){var e=$m(t),i=e[0],n=e[1],o=i.getCoordSysModel().coordinateSystem;t.coordinateSystem=o.getCartesian(i.componentIndex,n.componentIndex)}}),a},Xm.dimensions=Xm.prototype.dimensions=Rm.prototype.dimensions,lh.register("cartesian2d",Xm);function Qm(t,e){this.opt=e,this.axisModel=t,D(e,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0}),this.group=new Ci;var i=new Ci({position:e.position.slice(),rotation:e.rotation});i.updateTransform(),this._transform=i.transform,this._dumbGroup=i}var tv=Math.PI;Qm.prototype={constructor:Qm,hasBuilder:function(t){return!!ev[t]},add:function(t){ev[t].call(this)},getGroup:function(){return this.group}};var ev={axisLine:function(){var a=this.opt,t=this.axisModel;if(t.get("axisLine.show")){var e=this.axisModel.axis.getExtent(),i=this._transform,r=[e[0],0],n=[e[1],0];i&&(bt(r,r,i),bt(n,n,i));var s=P({lineCap:"round"},t.getModel("axisLine.lineStyle").getLineStyle());this.group.add(new ls({anid:"line",subPixelOptimize:!0,shape:{x1:r[0],y1:r[1],x2:n[0],y2:n[1]},style:s,strokeContainThreshold:a.strokeContainThreshold||5,silent:!0,z2:1}));var l=t.get("axisLine.symbol"),o=t.get("axisLine.symbolSize"),u=t.get("axisLine.symbolOffset")||0;if("number"==typeof u&&(u=[u,u]),null!=l){"string"==typeof l&&(l=[l,l]),"string"!=typeof o&&"number"!=typeof o||(o=[o,o]);var h=o[0],c=o[1];E([{rotate:a.rotation+Math.PI/2,offset:u[0],r:0},{rotate:a.rotation-Math.PI/2,offset:u[1],r:Math.sqrt((r[0]-n[0])*(r[0]-n[0])+(r[1]-n[1])*(r[1]-n[1]))}],function(t,e){if("none"!==l[e]&&null!=l[e]){var i=wg(l[e],-h/2,-c/2,h,c,s.stroke,!0),n=t.r+t.offset,o=[r[0]+n*Math.cos(a.rotation),r[1]-n*Math.sin(a.rotation)];i.attr({rotation:t.rotate,position:o,silent:!0,z2:11}),this.group.add(i)}},this)}}},axisTickLabel:function(){var t=this.axisModel,e=this.opt,i=function(t,e,i){var n=e.axis,o=e.getModel("axisTick");if(!o.get("show")||n.scale.isBlank())return;for(var a=o.getModel("lineStyle"),r=i.tickDirection*o.get("length"),s=lv(n.getTicksCoords(),t._transform,r,D(a.getLineStyle(),{stroke:e.get("axisLine.lineStyle.color")}),"ticks"),l=0;l<s.length;l++)t.group.add(s[l]);return s}(this,t,e);!function(t,e,i){if(cg(t.axis))return;var n=t.get("axisLabel.showMinLabel"),o=t.get("axisLabel.showMaxLabel");i=i||[];var a=(e=e||[])[0],r=e[1],s=e[e.length-1],l=e[e.length-2],u=i[0],h=i[1],c=i[i.length-1],d=i[i.length-2];!1===n?(av(a),av(u)):rv(a,r)&&(n?(av(r),av(h)):(av(a),av(u)));!1===o?(av(s),av(c)):rv(l,s)&&(o?(av(l),av(d)):(av(s),av(c)))}(t,function(u,h,c){var d=h.axis;if(!W(c.axisLabelShow,h.get("axisLabel.show"))||d.scale.isBlank())return;var f=h.getModel("axisLabel"),p=f.get("margin"),t=d.getViewLabels(),e=(W(c.labelRotate,f.get("rotate"))||0)*tv/180,g=nv(c.rotation,e,c.labelDirection),m=h.getCategories&&h.getCategories(!0),v=[],y=ov(h),x=h.get("triggerEvent");return E(t,function(t,e){var i=t.tickValue,n=t.formattedLabel,o=t.rawLabel,a=f;m&&m[i]&&m[i].textStyle&&(a=new Cl(m[i].textStyle,f,h.ecModel));var r=a.getTextColor()||h.get("axisLine.lineStyle.color"),s=[d.dataToCoord(i),c.labelOffset+c.labelDirection*p],l=new Ur({anid:"label_"+i,position:s,rotation:g.rotation,silent:y,z2:10});nl(l.style,a,{text:n,textAlign:a.getShallow("align",!0)||g.textAlign,textVerticalAlign:a.getShallow("verticalAlign",!0)||a.getShallow("baseline",!0)||g.textVerticalAlign,textFill:"function"==typeof r?r("category"===d.type?o:"value"===d.type?i+"":i,e):r}),x&&(l.eventData=iv(h),l.eventData.targetType="axisLabel",l.eventData.value=o),u._dumbGroup.add(l),l.updateTransform(),v.push(l),u.group.add(l),l.decomposeTransform()}),v}(this,t,e),i),function(t,e,i){var n=e.axis,o=e.getModel("minorTick");if(!o.get("show")||n.scale.isBlank())return;var a=n.getMinorTicksCoords();if(!a.length)return;for(var r=o.getModel("lineStyle"),s=i.tickDirection*o.get("length"),l=D(r.getLineStyle(),D(e.getModel("axisTick").getLineStyle(),{stroke:e.get("axisLine.lineStyle.color")})),u=0;u<a.length;u++)for(var h=lv(a[u],t._transform,s,l,"minorticks_"+u),c=0;c<h.length;c++)t.group.add(h[c])}(this,t,e)},axisName:function(){var t=this.opt,e=this.axisModel,i=W(t.axisName,e.get("name"));if(i){var n,o,a=e.get("nameLocation"),r=t.nameDirection,s=e.getModel("nameTextStyle"),l=e.get("nameGap")||0,u=this.axisModel.axis.getExtent(),h=u[0]>u[1]?-1:1,c=["start"===a?u[0]-h*l:"end"===a?u[1]+h*l:(u[0]+u[1])/2,sv(a)?t.labelOffset+r*l:0],d=e.get("nameRotate");null!=d&&(d=d*tv/180),sv(a)?n=nv(t.rotation,null!=d?d:t.rotation,r):(n=function(t,e,i,n){var o,a,r=Zl(i-t.rotation),s=n[0]>n[1],l="start"===e&&!s||"start"!==e&&s;o=Ul(r-tv/2)?(a=l?"bottom":"top","center"):Ul(r-1.5*tv)?(a=l?"top":"bottom","center"):(a="middle",r<1.5*tv&&tv/2<r?l?"left":"right":l?"right":"left");return{rotation:r,textAlign:o,textVerticalAlign:a}}(t,a,d||0,u),null!=(o=t.axisNameAvailableWidth)&&(o=Math.abs(o/Math.sin(n.rotation)),isFinite(o)||(o=null)));var f=s.getFont(),p=e.get("nameTruncate",!0)||{},g=p.ellipsis,m=W(t.nameTruncateMaxWidth,p.maxWidth,o),v=null!=g&&null!=m?pu(i,m,f,g,{minChar:2,placeholder:p.placeholder}):i,y=e.get("tooltip",!0),x=e.mainType,_={componentType:x,name:i,$vars:["name"]};_[x+"Index"]=e.componentIndex;var w=new Ur({anid:"name",__fullText:i,__truncatedText:v,position:c,rotation:n.rotation,silent:ov(e),z2:1,tooltip:y&&y.show?P({content:i,formatter:function(){return i},formatterParams:_},y):null});nl(w.style,s,{text:v,textFont:f,textFill:s.getTextColor()||e.get("axisLine.lineStyle.color"),textAlign:s.get("align")||n.textAlign,textVerticalAlign:s.get("verticalAlign")||n.textVerticalAlign}),e.get("triggerEvent")&&(w.eventData=iv(e),w.eventData.targetType="axisName",w.eventData.name=i),this._dumbGroup.add(w),w.updateTransform(),this.group.add(w),w.decomposeTransform()}}},iv=Qm.makeAxisEventDataBase=function(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e},nv=Qm.innerTextLayout=function(t,e,i){var n,o=Zl(e-t);return{rotation:o,textAlign:Ul(o)?(n=0<i?"top":"bottom","center"):Ul(o-tv)?(n=0<i?"bottom":"top","center"):(n="middle",0<o&&o<tv?0<i?"right":"left":0<i?"left":"right"),textVerticalAlign:n}};var ov=Qm.isLabelSilent=function(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)};function av(t){t&&(t.ignore=!0)}function rv(t,e){var i=t&&t.getBoundingRect().clone(),n=e&&e.getBoundingRect().clone();if(i&&n){var o=re([]);return he(o,o,-t.rotation),i.applyTransform(le([],o,t.getLocalTransform())),n.applyTransform(le([],o,e.getLocalTransform())),i.intersect(n)}}function sv(t){return"middle"===t||"center"===t}function lv(t,e,i,n,o){for(var a=[],r=[],s=[],l=0;l<t.length;l++){var u=t[l].coord;r[0]=u,s[r[1]=0]=u,s[1]=i,e&&(bt(r,r,e),bt(s,s,e));var h=new ls({anid:o+"_"+t[l].tickValue,subPixelOptimize:!0,shape:{x1:r[0],y1:r[1],x2:s[0],y2:s[1]},style:n,z2:2,silent:!0});a.push(h)}return a}var uv=E,hv=T;function cv(t,e){var i={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return function(p,g,t){var a=g.getComponent("tooltip"),m=g.getComponent("axisPointer"),v=m.get("link",!0)||[],y=[];uv(t.getCoordinateSystems(),function(c){if(c.axisPointerEnabled){var t=gv(c.model),d=p.coordSysAxesInfo[t]={},f=(p.coordSysMap[t]=c).model.getModel("tooltip",a);if(uv(c.getAxes(),hv(o,!1,null)),c.getTooltipAxes&&a&&f.get("show")){var e="axis"===f.get("trigger"),i="cross"===f.get("axisPointer.type"),n=c.getTooltipAxes(f.get("axisPointer.axis"));(e||i)&&uv(n.baseAxes,hv(o,!i||"cross",e)),i&&uv(n.otherAxes,hv(o,"cross",!1))}}function o(t,e,i){var n=i.model.getModel("axisPointer",m),o=n.get("show");if(o&&("auto"!==o||t||pv(n))){null==e&&(e=n.get("triggerTooltip"));var a=(n=t?function(t,e,i,n,o,a){var r=e.getModel("axisPointer"),s={};uv(["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],function(t){s[t]=k(r.get(t))}),s.snap="category"!==t.type&&!!a,"cross"===r.get("type")&&(s.type="line");var l=s.label||(s.label={});if(null==l.show&&(l.show=!1),"cross"===o){var u=r.get("label.show");if(l.show=null==u||u,!a){var h=s.lineStyle=r.get("crossStyle");h&&D(l,h.textStyle)}}return t.model.getModel("axisPointer",new Cl(s,i,n))}(i,f,m,g,t,e):n).get("snap"),r=gv(i.model),s=e||a||"category"===i.type,l=p.axesInfo[r]={key:r,axis:i,coordSys:c,axisPointerModel:n,triggerTooltip:e,involveSeries:s,snap:a,useHandle:pv(n),seriesModels:[]};d[r]=l,p.seriesInvolved|=s;var u=function(t,e){for(var i=e.model,n=e.dim,o=0;o<t.length;o++){var a=t[o]||{};if(dv(a[n+"AxisId"],i.id)||dv(a[n+"AxisIndex"],i.componentIndex)||dv(a[n+"AxisName"],i.name))return o}}(v,i);if(null!=u){var h=y[u]||(y[u]={axesInfo:{}});h.axesInfo[r]=l,h.mapper=v[u].mapper,l.linkGroup=h}}}})}(i,t,e),i.seriesInvolved&&function(o,t){t.eachSeries(function(i){var n=i.coordinateSystem,t=i.get("tooltip.trigger",!0),e=i.get("tooltip.show",!0);n&&"none"!==t&&!1!==t&&"item"!==t&&!1!==e&&!1!==i.get("axisPointer.show",!0)&&uv(o.coordSysAxesInfo[gv(n.model)],function(t){var e=t.axis;n.getAxis(e.dim)===e&&(t.seriesModels.push(i),null==t.seriesDataCount&&(t.seriesDataCount=0),t.seriesDataCount+=i.getData().count())})},this)}(i,t),i}function dv(t,e){return"all"===t||L(t)&&0<=_(t,e)||t===e}function fv(t){var e=(t.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return e&&e.axesInfo[gv(t)]}function pv(t){return!!t.get("handle.show")}function gv(t){return t.type+"||"+t.id}var mv=Af({type:"axis",_axisPointer:null,axisPointerClass:null,render:function(t,e,i,n){this.axisPointerClass&&function(t){var e=fv(t);if(e){var i=e.axisPointerModel,n=e.axis.scale,o=i.option,a=i.get("status"),r=i.get("value");null!=r&&(r=n.parse(r));var s=pv(i);null==a&&(o.status=s?"show":"hide");var l=n.getExtent().slice();l[0]>l[1]&&l.reverse(),(null==r||r>l[1])&&(r=l[1]),r<l[0]&&(r=l[0]),o.value=r,s&&(o.status=e.axis.scale.isBlank()?"hide":"show")}}(t),mv.superApply(this,"render",arguments),vv(this,t,e,i,n,!0)},updateAxisPointer:function(t,e,i,n,o){vv(this,t,e,i,n,!1)},remove:function(t,e){var i=this._axisPointer;i&&i.remove(e),mv.superApply(this,"remove",arguments)},dispose:function(t,e){yv(this,e),mv.superApply(this,"dispose",arguments)}});function vv(t,e,i,n,o,a){var r=mv.getAxisPointerClass(t.axisPointerClass);if(r){var s=function(t){var e=fv(t);return e&&e.axisPointerModel}(e);s?(t._axisPointer||(t._axisPointer=new r)).render(e,s,n,a):yv(t,n)}}function yv(t,e,i){var n=t._axisPointer;n&&n.dispose(e,i),t._axisPointer=null}var xv=[];function _v(t,e,i){i=i||{};var n=t.coordinateSystem,o=e.axis,a={},r=o.getAxesOnZeroOf()[0],s=o.position,l=r?"onZero":s,u=o.dim,h=n.getRect(),c=[h.x,h.x+h.width,h.y,h.y+h.height],d={left:0,right:1,top:0,bottom:1,onZero:2},f=e.get("offset")||0,p="x"===u?[c[2]-f,c[3]+f]:[c[0]-f,c[1]+f];if(r){var g=r.toGlobalCoord(r.dataToCoord(0));p[d.onZero]=Math.max(Math.min(g,p[1]),p[0])}a.position=["y"===u?p[d[l]]:c[0],"x"===u?p[d[l]]:c[3]],a.rotation=Math.PI/2*("x"===u?0:1);a.labelDirection=a.tickDirection=a.nameDirection={top:-1,bottom:1,left:-1,right:1}[s],a.labelOffset=r?p[d[s]]-p[d.onZero]:0,e.get("axisTick.inside")&&(a.tickDirection=-a.tickDirection),W(i.labelInside,e.get("axisLabel.inside"))&&(a.labelDirection=-a.labelDirection);var m=e.get("axisLabel.rotate");return a.labelRotate="top"===l?-m:m,a.z2=1,a}function wv(t,e,i,n){var o=i.axis;if(!o.scale.isBlank()){var a=i.getModel("splitArea"),r=a.getModel("areaStyle"),s=r.get("color"),l=n.coordinateSystem.getRect(),u=o.getTicksCoords({tickModel:a,clamp:!0});if(u.length){var h=s.length,c=t.__splitAreaColors,d=Q(),f=0;if(c)for(var p=0;p<u.length;p++){var g=c.get(u[p].tickValue);if(null!=g){f=(g+(h-1)*p)%h;break}}var m=o.toGlobalCoord(u[0].coord),v=r.getAreaStyle();s=L(s)?s:[s];for(p=1;p<u.length;p++){var y,x,_,w,b=o.toGlobalCoord(u[p].coord);m=o.isHorizontal()?(y=m,x=l.y,_=b-y,w=l.height,y+_):(y=l.x,x=m,_=l.width,x+(w=b-x));var S=u[p-1].tickValue;null!=S&&d.set(S,f),e.add(new rs({anid:null!=S?"area_"+S:null,shape:{x:y,y:x,width:_,height:w},style:D({fill:s[f]},v),silent:!0})),f=(f+1)%h}t.__splitAreaColors=d}}}function bv(t){t.__splitAreaColors=null}mv.registerAxisPointerClass=function(t,e){xv[t]=e},mv.getAxisPointerClass=function(t){return t&&xv[t]};var Sv=["axisLine","axisTickLabel","axisName"],Mv=["splitArea","splitLine","minorSplitLine"],Iv=mv.extend({type:"cartesianAxis",axisPointerClass:"CartesianAxisPointer",render:function(e,t,i,n){this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new Ci,this.group.add(this._axisGroup),e.get("show")){var a=e.getCoordSysModel(),r=_v(a,e),s=new Qm(e,r);E(Sv,s.add,s),this._axisGroup.add(s.getGroup()),E(Mv,function(t){e.get(t+".show")&&this["_"+t](e,a)},this),ml(o,this._axisGroup,e),Iv.superCall(this,"render",e,t,i,n)}},remove:function(){bv(this)},_splitLine:function(t,e){var i=t.axis;if(!i.scale.isBlank()){var n=t.getModel("splitLine"),o=n.getModel("lineStyle"),a=o.get("color");a=L(a)?a:[a];for(var r=e.coordinateSystem.getRect(),s=i.isHorizontal(),l=0,u=i.getTicksCoords({tickModel:n}),h=[],c=[],d=o.getLineStyle(),f=0;f<u.length;f++){var p=i.toGlobalCoord(u[f].coord);s?(h[0]=p,h[1]=r.y,c[0]=p,c[1]=r.y+r.height):(h[0]=r.x,h[1]=p,c[0]=r.x+r.width,c[1]=p);var g=l++%a.length,m=u[f].tickValue;this._axisGroup.add(new ls({anid:null!=m?"line_"+u[f].tickValue:null,subPixelOptimize:!0,shape:{x1:h[0],y1:h[1],x2:c[0],y2:c[1]},style:D({stroke:a[g]},d),silent:!0}))}}},_minorSplitLine:function(t,e){var i=t.axis,n=t.getModel("minorSplitLine").getModel("lineStyle"),o=e.coordinateSystem.getRect(),a=i.isHorizontal(),r=i.getMinorTicksCoords();if(r.length)for(var s=[],l=[],u=n.getLineStyle(),h=0;h<r.length;h++)for(var c=0;c<r[h].length;c++){var d=i.toGlobalCoord(r[h][c].coord);a?(s[0]=d,s[1]=o.y,l[0]=d,l[1]=o.y+o.height):(s[0]=o.x,s[1]=d,l[0]=o.x+o.width,l[1]=d),this._axisGroup.add(new ls({anid:"minor_line_"+r[h][c].tickValue,subPixelOptimize:!0,shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:u,silent:!0}))}},_splitArea:function(t,e){wv(this,this._axisGroup,t,e)}});Iv.extend({type:"xAxis"}),Iv.extend({type:"yAxis"}),Af({type:"grid",render:function(t,e){this.group.removeAll(),t.get("show")&&this.group.add(new rs({shape:t.coordinateSystem.getRect(),style:D({fill:t.get("backgroundColor")},t.getItemStyle()),silent:!0,z2:-1}))}}),yf(function(t){t.xAxis&&t.yAxis&&!t.grid&&(t.grid={})}),Sf(Lm("line","circle","line")),bf(km("line")),xf(Ld.PROCESSOR.STATISTIC,{seriesType:"line",modifyOutputEnd:!0,reset:function(t,e,i){var n=t.getData(),o=t.get("sampling"),a=t.coordinateSystem;if("cartesian2d"===a.type&&o){var r,s=a.getBaseAxis(),l=a.getOtherAxis(s),u=s.getExtent(),h=u[1]-u[0],c=Math.round(n.count()/h);1<c&&("string"==typeof o?r=Nm[o]:"function"==typeof o&&(r=o),r&&t.setData(n.downSample(n.mapDimension(l.dim),1/c,r,Pm)))}}});var Tv=sc.extend({type:"series.__base_bar__",getInitialData:function(t,e){return gp(this.getSource(),this,{useEncodeDefaulter:!0})},getMarkerPosition:function(t){var e=this.coordinateSystem;if(e){var i=e.dataToPoint(e.clampData(t)),n=this.getData(),o=n.getLayout("offset"),a=n.getLayout("size");return i[e.getBaseAxis().isHorizontal()?0:1]+=o+a/2,i}return[NaN,NaN]},defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod",itemStyle:{},emphasis:{}}});function Av(t,e,i,n,o,a){el(t,e,i.getModel("label"),i.getModel("emphasis.label"),{labelFetcher:o,labelDataIndex:a,defaultText:Ug(o.getData(),a),isRectText:!0,autoColor:n}),Dv(t),Dv(e)}function Dv(t,e){"outside"===t.textPosition&&(t.textPosition=e)}Tv.extend({type:"series.bar",dependencies:["grid","polar"],brushSelector:"rect",getProgressive:function(){return!!this.get("large")&&this.get("progressive")},getProgressiveThreshold:function(){var t=this.get("progressiveThreshold"),e=this.get("largeThreshold");return t<e&&(t=e),t},defaultOption:{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1}}});var Cv=ha([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["stroke","barBorderColor"],["lineWidth","barBorderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),Lv={getBarItemStyle:function(t){var e=Cv(this,t);if(this.getBorderLineDash){var i=this.getBorderLineDash();i&&(e.lineDash=i)}return e}},kv=Cs({type:"sausage",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},buildPath:function(t,e){var i=e.cx,n=e.cy,o=Math.max(e.r0||0,0),a=Math.max(e.r,0),r=.5*(a-o),s=o+r,l=e.startAngle,u=e.endAngle,h=e.clockwise,c=Math.cos(l),d=Math.sin(l),f=Math.cos(u),p=Math.sin(u);(h?u-l<2*Math.PI:l-u<2*Math.PI)&&(t.moveTo(c*o+i,d*o+n),t.arc(c*s+i,d*s+n,r,-Math.PI+l,l,!h)),t.arc(i,n,a,l,u,!h),t.moveTo(f*a+i,p*a+n),t.arc(f*s+i,p*s+n,r,u-2*Math.PI,u-Math.PI,!h),0!==o&&(t.arc(i,n,o,u,l,h),t.moveTo(c*o+i,p*o+n)),t.closePath()}}),Pv=["itemStyle","barBorderWidth"],Nv=[0,0];P(Cl.prototype,Lv),Cf({type:"bar",render:function(t,e,i){this._updateDrawMode(t);var n=t.get("coordinateSystem");return"cartesian2d"!==n&&"polar"!==n||(this._isLargeDraw?this._renderLarge(t,e,i):this._renderNormal(t,e,i)),this.group},incrementalPrepareRender:function(t,e,i){this._clear(),this._updateDrawMode(t)},incrementalRender:function(t,e,i,n){this._incrementalRenderLarge(t,e)},_updateDrawMode:function(t){var e=t.pipelineContext.large;(null==this._isLargeDraw||e^this._isLargeDraw)&&(this._isLargeDraw=e,this._clear())},_renderNormal:function(s,t,e){var l,u=this.group,h=s.getData(),c=this._data,d=s.coordinateSystem,i=d.getBaseAxis();"cartesian2d"===d.type?l=i.isHorizontal():"polar"===d.type&&(l="angle"===i.dim);var f=s.isAnimationEnabled()?s:null,p=s.get("clip",!0),g=function(t,e){var i=t.getArea&&t.getArea();if("cartesian2d"===t.type){var n=t.getBaseAxis();if("category"!==n.type||!n.onBand){var o=e.getLayout("bandWidth");n.isHorizontal()?(i.x-=o,i.width+=2*o):(i.y-=o,i.height+=2*o)}}return i}(d,h);u.removeClipPath();var m=s.get("roundCap",!0),v=s.get("showBackground",!0),y=s.getModel("backgroundStyle"),x=y.get("barBorderRadius")||0,_=[],w=this._backgroundEls||[];h.diff(c).add(function(t){var e=h.getItemModel(t),i=Gv[d.type](h,t,e);if(v){var n=Gv[d.type](h,t),o=function(t,e,i){return new("polar"===t.type?qr:rs)({shape:Xv(e,i,t),silent:!0,z2:0})}(d,l,n);o.useStyle(y.getBarItemStyle()),"cartesian2d"===d.type&&o.setShape("r",x),_[t]=o}if(h.hasValue(t)){if(p)if(Rv[d.type](g,i))return void u.remove(a);var a=zv[d.type](t,i,l,f,!1,m);h.setItemGraphicEl(t,a),u.add(a),Wv(a,h,t,e,i,s,l,"polar"===d.type)}}).update(function(t,e){var i=h.getItemModel(t),n=Gv[d.type](h,t,i);if(v){var o=w[e];o.useStyle(y.getBarItemStyle()),"cartesian2d"===d.type&&o.setShape("r",x),_[t]=o;var a=Gv[d.type](h,t);cl(o,{shape:Xv(l,a,d)},f,t)}var r=c.getItemGraphicEl(e);if(h.hasValue(t)){if(p)if(Rv[d.type](g,n))return void u.remove(r);r?cl(r,{shape:n},f,t):r=zv[d.type](t,n,l,f,!0,m),h.setItemGraphicEl(t,r),u.add(r),Wv(r,h,t,i,n,s,l,"polar"===d.type)}else u.remove(r)}).remove(function(t){var e=c.getItemGraphicEl(t);"cartesian2d"===d.type?e&&Bv(t,f,e):e&&Vv(t,f,e)}).execute();var n=this._backgroundGroup||(this._backgroundGroup=new Ci);n.removeAll();for(var o=0;o<_.length;++o)n.add(_[o]);u.add(n),this._backgroundEls=_,this._data=h},_renderLarge:function(t,e,i){this._clear(),Zv(t,this.group);var n=t.get("clip",!0)?Sm(t.coordinateSystem,!1,t):null;n?this.group.setClipPath(n):this.group.removeClipPath()},_incrementalRenderLarge:function(t,e){this._removeBackground(),Zv(e,this.group,!0)},dispose:et,remove:function(t){this._clear(t)},_clear:function(e){var t=this.group,i=this._data;e&&e.get("animation")&&i&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],i.eachItemGraphicEl(function(t){"sector"===t.type?Vv(t.dataIndex,e,t):Bv(t.dataIndex,e,t)})):t.removeAll(),this._data=null},_removeBackground:function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null}});var Ov=Math.max,Ev=Math.min,Rv={cartesian2d:function(t,e){var i=e.width<0?-1:1,n=e.height<0?-1:1;i<0&&(e.x+=e.width,e.width=-e.width),n<0&&(e.y+=e.height,e.height=-e.height);var o=Ov(e.x,t.x),a=Ev(e.x+e.width,t.x+t.width),r=Ov(e.y,t.y),s=Ev(e.y+e.height,t.y+t.height);e.x=o,e.y=r,e.width=a-o,e.height=s-r;var l=e.width<0||e.height<0;return i<0&&(e.x+=e.width,e.width=-e.width),n<0&&(e.y+=e.height,e.height=-e.height),l},polar:function(t){return!1}},zv={cartesian2d:function(t,e,i,n,o){var a=new rs({shape:P({},e),z2:1});if(a.name="item",n){var r=i?"height":"width",s={};a.shape[r]=0,s[r]=e[r],bl[o?"updateProps":"initProps"](a,{shape:s},n,t)}return a},polar:function(t,e,i,n,o,a){var r=e.startAngle<e.endAngle,s=new(!i&&a?kv:qr)({shape:D({clockwise:r},e),z2:1});if(s.name="item",n){var l=i?"r":"endAngle",u={};s.shape[l]=i?0:e.startAngle,u[l]=e[l],bl[o?"updateProps":"initProps"](s,{shape:u},n,t)}return s}};function Bv(t,e,i){i.style.text=null,cl(i,{shape:{width:0}},e,t,function(){i.parent&&i.parent.remove(i)})}function Vv(t,e,i){i.style.text=null,cl(i,{shape:{r:i.shape.r0}},e,t,function(){i.parent&&i.parent.remove(i)})}var Gv={cartesian2d:function(t,e,i){var n=t.getItemLayout(e),o=i?function(t,e){var i=t.get(Pv)||0,n=isNaN(e.width)?Number.MAX_VALUE:Math.abs(e.width),o=isNaN(e.height)?Number.MAX_VALUE:Math.abs(e.height);return Math.min(i,n,o)}(i,n):0,a=0<n.width?1:-1,r=0<n.height?1:-1;return{x:n.x+a*o/2,y:n.y+r*o/2,width:n.width-a*o,height:n.height-r*o}},polar:function(t,e,i){var n=t.getItemLayout(e);return{cx:n.cx,cy:n.cy,r0:n.r0,r:n.r,startAngle:n.startAngle,endAngle:n.endAngle}}};function Fv(t){return null!=t.startAngle&&null!=t.endAngle&&t.startAngle===t.endAngle}function Wv(t,e,i,n,o,a,r,s){var l=e.getItemVisual(i,"color"),u=e.getItemVisual(i,"opacity"),h=e.getVisual("borderColor"),c=n.getModel("itemStyle"),d=n.getModel("emphasis.itemStyle").getBarItemStyle();s||t.setShape("r",c.get("barBorderRadius")||0),t.useStyle(D({stroke:Fv(o)?"none":h,fill:Fv(o)?"none":l,opacity:u},c.getBarItemStyle()));var f=n.getShallow("cursor");f&&t.attr("cursor",f);r?o.height:o.width;s||Av(t.style,d,n,l,a,i),Fv(o)&&(d.fill=d.stroke="none"),$s(t,d)}var Hv=Ar.extend({type:"largeBar",shape:{points:[]},buildPath:function(t,e){for(var i=e.points,n=this.__startPoint,o=this.__baseDimIdx,a=0;a<i.length;a+=2)n[o]=i[a+o],t.moveTo(n[0],n[1]),t.lineTo(i[a],i[a+1])}});function Zv(t,e,i){var n=t.getData(),o=[],a=n.getLayout("valueAxisHorizontal")?1:0;o[1-a]=n.getLayout("valueAxisStart");var r=n.getLayout("largeDataIndices"),s=n.getLayout("barWidth"),l=t.getModel("backgroundStyle");if(t.get("showBackground",!0)){var u=n.getLayout("largeBackgroundPoints"),h=[];h[1-a]=n.getLayout("backgroundStart");var c=new Hv({shape:{points:u},incremental:!!i,__startPoint:h,__baseDimIdx:a,__largeDataIndices:r,__barWidth:s,silent:!0,z2:0});!function(t,e,i){var n=e.get("borderColor")||e.get("color"),o=e.getItemStyle(["color","borderColor"]);t.useStyle(o),t.style.fill=null,t.style.stroke=n,t.style.lineWidth=i.getLayout("barWidth")}(c,l,n),e.add(c)}var d=new Hv({shape:{points:n.getLayout("largePoints")},incremental:!!i,__startPoint:o,__baseDimIdx:a,__largeDataIndices:r,__barWidth:s});e.add(d),function(t,e,i){var n=i.getVisual("borderColor")||i.getVisual("color"),o=e.getModel("itemStyle").getItemStyle(["color","borderColor"]);t.useStyle(o),t.style.fill=null,t.style.stroke=n,t.style.lineWidth=i.getLayout("barWidth")}(d,t,n),d.seriesIndex=t.seriesIndex,t.get("silent")||(d.on("mousedown",Uv),d.on("mousemove",Uv))}var Uv=Lc(function(t){var e=function(t,e,i){var n=t.__baseDimIdx,o=1-n,a=t.shape.points,r=t.__largeDataIndices,s=Math.abs(t.__barWidth/2),l=t.__startPoint[o];Nv[0]=e,Nv[1]=i;for(var u=Nv[n],h=Nv[1-n],c=u-s,d=u+s,f=0,p=a.length/2;f<p;f++){var g=2*f,m=a[g+n],v=a[g+o];if(c<=m&&m<=d&&(l<=v?l<=h&&h<=v:v<=h&&h<=l))return r[f]}return-1}(this,t.offsetX,t.offsetY);this.dataIndex=0<=e?e:null},30,!1);function Xv(t,e,i){var n,o="polar"===i.type;return n=o?i.getArea():i.grid.getRect(),o?{cx:n.cx,cy:n.cy,r0:t?n.r0:e.r0,r:t?n.r:e.r,startAngle:t?e.startAngle:0,endAngle:t?e.endAngle:2*Math.PI}:{x:t?e.x:n.x,y:t?n.y:e.y,width:t?e.width:n.width,height:t?n.height:e.height}}bf(Ld.VISUAL.LAYOUT,T(zp,"bar")),bf(Ld.VISUAL.PROGRESSIVE_LAYOUT,Bp),Sf({seriesType:"bar",reset:function(t){t.getData().setVisual("legendSymbol","roundRect")}});function Yv(t,e,i){e=L(e)&&{coordDimensions:e}||P({},e);var n=t.getSource(),o=lp(n,e),a=new Yf(o,t);return a.initData(n,i),a}var jv={updateSelectedMap:function(t){this._targetList=L(t)?t.slice():[],this._selectTargetMap=S(t||[],function(t,e){return t.set(e.name,e),t},Q())},select:function(t,e){var i=null!=e?this._targetList[e]:this._selectTargetMap.get(t);"single"===this.get("selectedMode")&&this._selectTargetMap.each(function(t){t.selected=!1}),i&&(i.selected=!0)},unSelect:function(t,e){var i=null!=e?this._targetList[e]:this._selectTargetMap.get(t);i&&(i.selected=!1)},toggleSelected:function(t,e){var i=null!=e?this._targetList[e]:this._selectTargetMap.get(t);if(null!=i)return this[i.selected?"unSelect":"select"](t,e),i.selected},isSelected:function(t,e){var i=null!=e?this._targetList[e]:this._selectTargetMap.get(t);return i&&i.selected}};function qv(i,e){this.getAllNames=function(){var t=e();return t.mapArray(t.getName)},this.containName=function(t){return 0<=e().indexOfName(t)},this.indexOfName=function(t){return i().indexOfName(t)},this.getItemVisual=function(t,e){return i().getItemVisual(t,e)}}var Kv=Df({type:"series.pie",init:function(t){Kv.superApply(this,"init",arguments),this.legendVisualProvider=new qv(A(this.getData,this),A(this.getRawData,this)),this.updateSelectedMap(this._createSelectableList()),this._defaultLabelLine(t)},mergeOption:function(t){Kv.superCall(this,"mergeOption",t),this.updateSelectedMap(this._createSelectableList())},getInitialData:function(t,e){return Yv(this,{coordDimensions:["value"],encodeDefaulter:T(Ju,this)})},_createSelectableList:function(){for(var t=this.getRawData(),e=t.mapDimension("value"),i=[],n=0,o=t.count();n<o;n++)i.push({name:t.getName(n),value:t.get(e,n),selected:Zh(t,n,"selected")});return i},getDataParams:function(t){var e=this.getData(),i=Kv.superCall(this,"getDataParams",t),n=[];return e.each(e.mapDimension("value"),function(t){n.push(t)}),i.percent=Wl(n,t,e.hostModel.get("percentPrecision")),i.$vars.push("percent"),i},_defaultLabelLine:function(t){Go(t,"labelLine",["show"]);var e=t.labelLine,i=t.emphasis.labelLine;e.show=e.show&&t.label.show,i.show=i.show&&t.emphasis.label.show},defaultOption:{zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,minShowLabelAngle:0,selectedOffset:10,hoverOffset:10,avoidLabelOverlap:!0,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:!1,show:!0,position:"outer",alignTo:"none",margin:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1},animationType:"expansion",animationTypeUpdate:"transition",animationEasing:"cubicOut"}});function $v(t,e,i,n){var o=e.getData(),a=this.dataIndex,r=o.getName(a),s=e.get("selectedOffset");n.dispatchAction({type:"pieToggleSelect",from:t,name:r,seriesId:e.id}),o.each(function(t){Jv(o.getItemGraphicEl(t),o.getItemLayout(t),e.isSelected(o.getName(t)),s,i)})}function Jv(t,e,i,n,o){var a=(e.startAngle+e.endAngle)/2,r=i?n:0,s=[Math.cos(a)*r,Math.sin(a)*r];o?t.animate().when(200,{position:s}).start("bounceOut"):t.attr("position",s)}function Qv(t,e){Ci.call(this);var i=new qr({z2:2}),n=new ts,o=new Ur;this.add(i),this.add(n),this.add(o),this.updateData(t,e,!0)}b(Kv,jv);var ty=Qv.prototype;ty.updateData=function(t,e,i){var n=this.childAt(0),o=this.childAt(1),a=this.childAt(2),r=t.hostModel,s=t.getItemModel(e),l=t.getItemLayout(e),u=P({},l);u.label=null;var h=r.getShallow("animationTypeUpdate");i?(n.setShape(u),"scale"===r.getShallow("animationType")?(n.shape.r=l.r0,dl(n,{shape:{r:l.r}},r,e)):(n.shape.endAngle=l.startAngle,cl(n,{shape:{endAngle:l.endAngle}},r,e))):"expansion"===h?n.setShape(u):cl(n,{shape:u},r,e);var c=t.getItemVisual(e,"color");n.useStyle(D({lineJoin:"bevel",fill:c},s.getModel("itemStyle").getItemStyle())),n.hoverStyle=s.getModel("emphasis.itemStyle").getItemStyle();var d=s.getShallow("cursor");d&&n.attr("cursor",d),Jv(this,t.getItemLayout(e),r.isSelected(t.getName(e)),r.get("selectedOffset"),r.get("animation"));var f=!i&&"transition"===h;this._updateLabel(t,e,f),this.highDownOnUpdate=r.get("silent")?null:function(t,e){var i=r.isAnimationEnabled()&&s.get("hoverAnimation");"emphasis"===e?(o.ignore=o.hoverIgnore,a.ignore=a.hoverIgnore,i&&(n.stopAnimation(!0),n.animateTo({shape:{r:l.r+r.get("hoverOffset")}},300,"elasticOut"))):(o.ignore=o.normalIgnore,a.ignore=a.normalIgnore,i&&(n.stopAnimation(!0),n.animateTo({shape:{r:l.r}},300,"elasticOut")))},$s(this)},ty._updateLabel=function(t,e,i){var n=this.childAt(1),o=this.childAt(2),a=t.hostModel,r=t.getItemModel(e),s=t.getItemLayout(e).label,l=t.getItemVisual(e,"color");if(!s||isNaN(s.x)||isNaN(s.y))o.ignore=o.normalIgnore=o.hoverIgnore=n.ignore=n.normalIgnore=n.hoverIgnore=!0;else{var u={points:s.linePoints||[[s.x,s.y],[s.x,s.y],[s.x,s.y]]},h={x:s.x,y:s.y};i?(cl(n,{shape:u},a,e),cl(o,{style:h},a,e)):(n.attr({shape:u}),o.attr({style:h})),o.attr({rotation:s.rotation,origin:[s.x,s.y],z2:10});var c=r.getModel("label"),d=r.getModel("emphasis.label"),f=r.getModel("labelLine"),p=r.getModel("emphasis.labelLine");l=t.getItemVisual(e,"color");el(o.style,o.hoverStyle={},c,d,{labelFetcher:t.hostModel,labelDataIndex:e,defaultText:s.text,autoColor:l,useInsideStyle:!!s.inside},{textAlign:s.textAlign,textVerticalAlign:s.verticalAlign,opacity:t.getItemVisual(e,"opacity")}),o.ignore=o.normalIgnore=!c.get("show"),o.hoverIgnore=!d.get("show"),n.ignore=n.normalIgnore=!f.get("show"),n.hoverIgnore=!p.get("show"),n.setStyle({stroke:l,opacity:t.getItemVisual(e,"opacity")}),n.setStyle(f.getModel("lineStyle").getLineStyle()),n.hoverStyle=p.getModel("lineStyle").getLineStyle();var g=f.get("smooth");g&&!0===g&&(g=.4),n.setShape({smooth:g})}},w(Qv,Ci);function ey(i,t){E(t,function(a){a.update="updateView",_f(a,function(t,e){var o={};return e.eachComponent({mainType:"series",subType:i,query:t},function(i){i[a.method]&&i[a.method](t.name,t.dataIndex);var n=i.getData();n.each(function(t){var e=n.getName(t);o[e]=i.isSelected(e)||!1})}),{name:t.name,selected:o,seriesId:t.seriesId}})})}function iy(n){return{getTargetSeries:function(t){var e={},i=Q();return t.eachSeriesByType(n,function(t){t.__paletteScope=e,i.set(t.uid,t)}),i},reset:function(s,t){var l=s.getRawData(),u={},h=s.getData();h.each(function(t){var e=h.getRawIndex(t);u[e]=t}),l.each(function(t){var e,i=u[t],n=null!=i&&h.getItemVisual(i,"color",!0),o=null!=i&&h.getItemVisual(i,"borderColor",!0);if(n&&o||(e=l.getItemModel(t)),!n){var a=e.get("itemStyle.color")||s.getColorFromPalette(l.getName(t)||t+"",s.__paletteScope,l.count());null!=i&&h.setItemVisual(i,"color",a)}if(!o){var r=e.get("itemStyle.borderColor");null!=i&&h.setItemVisual(i,"borderColor",r)}})}}}_c.extend({type:"pie",init:function(){var t=new Ci;this._sectorGroup=t},render:function(t,e,i,n){if(!n||n.from!==this.uid){var o=t.getData(),a=this._data,r=this.group,s=e.get("animation"),l=!a,u=t.get("animationType"),h=t.get("animationTypeUpdate"),c=T($v,this.uid,t,s,i),d=t.get("selectedMode");if(o.diff(a).add(function(t){var e=new Qv(o,t);l&&"scale"!==u&&e.eachChild(function(t){t.stopAnimation(!0)}),d&&e.on("click",c),o.setItemGraphicEl(t,e),r.add(e)}).update(function(t,e){var i=a.getItemGraphicEl(e);l||"transition"===h||i.eachChild(function(t){t.stopAnimation(!0)}),i.updateData(o,t),i.off("click"),d&&i.on("click",c),r.add(i),o.setItemGraphicEl(t,i)}).remove(function(t){var e=a.getItemGraphicEl(t);r.remove(e)}).execute(),s&&0<o.count()&&(l?"scale"!==u:"transition"!==h)){for(var f=o.getItemLayout(0),p=1;isNaN(f.startAngle)&&p<o.count();++p)f=o.getItemLayout(p);var g=Math.max(i.getWidth(),i.getHeight())/2,m=A(r.removeClipPath,r);r.setClipPath(this._createClipPath(f.cx,f.cy,g,f.startAngle,f.clockwise,m,t,l))}else r.removeClipPath();this._data=o}},dispose:function(){},_createClipPath:function(t,e,i,n,o,a,r,s){var l=new qr({shape:{cx:t,cy:e,r0:0,r:i,startAngle:n,endAngle:n,clockwise:o}});return(s?dl:cl)(l,{shape:{endAngle:n+(o?1:-1)*Math.PI*2}},r,a),l},containPoint:function(t,e){var i=e.getData().getItemLayout(0);if(i){var n=t[0]-i.cx,o=t[1]-i.cy,a=Math.sqrt(n*n+o*o);return a<=i.r&&a>=i.r0}}});var ny=Math.PI/180;function oy(o,t,e,i,n,a,r,s,l,u){function h(t,e,i){for(var n=t;n<e&&!(o[n].y+i>l+r);n++)if(o[n].y+=i,t<n&&n+1<e&&o[n+1].y>o[n].y+o[n].height)return void c(n,i/2);c(e-1,i/2)}function c(t,e){for(var i=t;0<=i&&!(o[i].y-e<l)&&(o[i].y-=e,!(0<i&&o[i].y>o[i-1].y+o[i-1].height));i--);}function d(t,e,i,n,o,a){for(var r=e?Number.MAX_VALUE:0,s=0,l=t.length;s<l;s++)if("none"===t[s].labelAlignTo){var u=Math.abs(t[s].y-n),h=t[s].len,c=t[s].len2,d=u<o+h?Math.sqrt((o+h+c)*(o+h+c)-u*u):Math.abs(t[s].x-i);e&&r<=d&&(d=r-10),!e&&d<=r&&(d=r+10),t[s].x=i+d*a,r=d}}o.sort(function(t,e){return t.y-e.y});for(var f,p=0,g=o.length,m=[],v=[],y=0;y<g;y++){if("outer"===o[y].position&&"labelLine"===o[y].labelAlignTo){var x=o[y].x-u;o[y].linePoints[1][0]+=x,o[y].x=u}(f=o[y].y-p)<0&&h(y,g,-f),p=o[y].y+o[y].height}r-p<0&&c(g-1,p-r);for(y=0;y<g;y++)o[y].y>=e?v.push(o[y]):m.push(o[y]);d(m,!1,t,e,i,n),d(v,!0,t,e,i,n)}function ay(t){return"center"===t.position}function ry(L,k,P,t,N,e){var O,E,R=L.getData(),z=[],B=!1,V=(L.get("minShowLabelAngle")||0)*ny;R.each(function(t){var e=R.getItemLayout(t),i=R.getItemModel(t),n=i.getModel("label"),o=n.get("position")||i.get("emphasis.label.position"),a=n.get("distanceToLabelLine"),r=n.get("alignTo"),s=Rl(n.get("margin"),P),l=n.get("bleedMargin"),u=n.getFont(),h=i.getModel("labelLine"),c=h.get("length");c=Rl(c,P);var d=h.get("length2");if(d=Rl(d,P),!(e.angle<V)){var f,p,g,m,v=(e.startAngle+e.endAngle)/2,y=Math.cos(v),x=Math.sin(v);O=e.cx,E=e.cy;var _,w=L.getFormattedLabel(t,"normal")||R.getName(t),b=gn(w,u,m,"top"),S="inside"===o||"inner"===o;if("center"===o)f=e.cx,p=e.cy,m="center";else{var M=(S?(e.r+e.r0)/2*y:e.r*y)+O,I=(S?(e.r+e.r0)/2*x:e.r*x)+E;if(f=M+3*y,p=I+3*x,!S){var T=M+y*(c+k-e.r),A=I+x*(c+k-e.r),D=T+(y<0?-1:1)*d;f="edge"===r?y<0?N+s:N+P-s:D+(y<0?-a:a),g=[[M,I],[T,A],[D,p=A]]}m=S?"center":"edge"===r?0<y?"right":"left":0<y?"left":"right"}var C=n.get("rotate");_="number"==typeof C?C*(Math.PI/180):C?y<0?-v+Math.PI:-v:0,B=!!_,e.label={x:f,y:p,position:o,height:b.height,len:c,len2:d,linePoints:g,textAlign:m,verticalAlign:"middle",rotation:_,inside:S,labelDistance:a,labelAlignTo:r,labelMargin:s,bleedMargin:l,textRect:b,text:w,font:u},S||z.push(e.label)}}),!B&&L.get("avoidLabelOverlap")&&function(t,e,i,n,o,a,r,s){for(var l=[],u=[],h=Number.MAX_VALUE,c=-Number.MAX_VALUE,d=0;d<t.length;d++)ay(t[d])||(t[d].x<e?(h=Math.min(h,t[d].x),l.push(t[d])):(c=Math.max(c,t[d].x),u.push(t[d])));for(oy(u,e,i,n,1,0,a,0,s,c),oy(l,e,i,n,-1,0,a,0,s,h),d=0;d<t.length;d++){var f=t[d];if(!ay(f)){var p=f.linePoints;if(p){var g,m="edge"===f.labelAlignTo,v=f.textRect.width;(g=m?f.x<e?p[2][0]-f.labelDistance-r-f.labelMargin:r+o-f.labelMargin-p[2][0]-f.labelDistance:f.x<e?f.x-r-f.bleedMargin:r+o-f.x-f.bleedMargin)<f.textRect.width&&(f.text=xn(f.text,g,f.font),"edge"===f.labelAlignTo&&(v=pn(f.text,f.font)));var y=p[1][0]-p[2][0];m?f.x<e?p[2][0]=r+f.labelMargin+v+f.labelDistance:p[2][0]=r+o-f.labelMargin-v-f.labelDistance:(f.x<e?p[2][0]=f.x+f.labelDistance:p[2][0]=f.x-f.labelDistance,p[1][0]=p[2][0]+y),p[1][1]=p[2][1]=f.y}}}}(z,O,E,k,P,t,N,e)}var sy=2*Math.PI,ly=Math.PI/180;function uy(t){return{seriesType:t,reset:function(t,e){var n=e.findComponents({mainType:"legend"});if(n&&n.length){var o=t.getData();o.filterSelf(function(t){for(var e=o.getName(t),i=0;i<n.length;i++)if(!n[i].isSelected(e))return!1;return!0})}}}}ey("pie",[{type:"pieToggleSelect",event:"pieselectchanged",method:"toggleSelected"},{type:"pieSelect",event:"pieselected",method:"select"},{type:"pieUnSelect",event:"pieunselected",method:"unSelect"}]),Sf(iy("pie")),bf(T(function(t,e,A,i){e.eachSeriesByType(t,function(t){var o=t.getData(),e=o.mapDimension("value"),a=function(t,e){return bu(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,A),i=t.get("center"),n=t.get("radius");L(n)||(n=[0,n]),L(i)||(i=[i,i]);var r=Rl(a.width,A.getWidth()),s=Rl(a.height,A.getHeight()),l=Math.min(r,s),u=Rl(i[0],r)+a.x,h=Rl(i[1],s)+a.y,c=Rl(n[0],l/2),d=Rl(n[1],l/2),f=-t.get("startAngle")*ly,p=t.get("minAngle")*ly,g=0;o.each(e,function(t){isNaN(t)||g++});var m=o.getSum(e),v=Math.PI/(m||g)*2,y=t.get("clockwise"),x=t.get("roseType"),_=t.get("stillShowZeroSum"),w=o.getDataExtent(e);w[0]=0;var b=sy,S=0,M=f,I=y?1:-1;if(o.each(e,function(t,e){var i;if(isNaN(t))o.setItemLayout(e,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:y,cx:u,cy:h,r0:c,r:x?NaN:d,viewRect:a});else{(i="area"!==x?0===m&&_?v:t*v:sy/g)<p?b-=i=p:S+=t;var n=M+I*i;o.setItemLayout(e,{angle:i,startAngle:M,endAngle:n,clockwise:y,cx:u,cy:h,r0:c,r:x?El(t,w,[c,d]):d,viewRect:a}),M=n}}),b<sy&&g)if(b<=.001){var T=sy/g;o.each(e,function(t,e){if(!isNaN(t)){var i=o.getItemLayout(e);i.angle=T,i.startAngle=f+I*e*T,i.endAngle=f+I*(e+1)*T}})}else v=b/S,M=f,o.each(e,function(t,e){if(!isNaN(t)){var i=o.getItemLayout(e),n=i.angle===p?p:t*v;i.startAngle=M,i.endAngle=M+I*n,M+=I*n}});ry(t,d,a.width,a.height,a.x,a.y)})},"pie")),xf(uy("pie")),sc.extend({type:"series.scatter",dependencies:["grid","polar","geo","singleAxis","calendar"],getInitialData:function(t,e){return gp(this.getSource(),this,{useEncodeDefaulter:!0})},brushSelector:"point",getProgressive:function(){var t=this.option.progressive;return null==t?this.option.large?5e3:this.get("progressive"):t},getProgressiveThreshold:function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?1e4:this.get("progressiveThreshold"):t},defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},clip:!0}});var hy=Cs({shape:{points:null},symbolProxy:null,softClipShape:null,buildPath:function(t,e){var i=e.points,n=e.size,o=this.symbolProxy,a=o.shape;if(!((t.getContext?t.getContext():t)&&n[0]<4))for(var r=0;r<i.length;){var s=i[r++],l=i[r++];isNaN(s)||isNaN(l)||this.softClipShape&&!this.softClipShape.contain(s,l)||(a.x=s-n[0]/2,a.y=l-n[1]/2,a.width=n[0],a.height=n[1],o.buildPath(t,a,!0))}},afterBrush:function(t){var e=this.shape,i=e.points,n=e.size;if(n[0]<4){this.setTransform(t);for(var o=0;o<i.length;){var a=i[o++],r=i[o++];isNaN(a)||isNaN(r)||this.softClipShape&&!this.softClipShape.contain(a,r)||t.fillRect(a-n[0]/2,r-n[1]/2,n[0],n[1])}this.restoreTransform(t)}},findDataIndex:function(t,e){for(var i=this.shape,n=i.points,o=i.size,a=Math.max(o[0],4),r=Math.max(o[1],4),s=n.length/2-1;0<=s;s--){var l=2*s,u=n[l]-a/2,h=n[1+l]-r/2;if(u<=t&&h<=e&&t<=u+a&&e<=h+r)return s}return-1}});function cy(){this.group=new Ci}var dy=cy.prototype;function fy(t,e,i){Gg.call(this,t,e,i),this.type="value",this.angle=0,this.name="",this.model}function py(t,e,i){this._model=t,this.dimensions=[],this._indicatorAxes=O(t.getIndicatorModels(),function(t,e){var i="indicator_"+e,n=new fy(i,"log"===t.get("axisType")?new ng:new Dp);return n.name=t.get("name"),(n.model=t).axis=n,this.dimensions.push(i),n},this),this.resize(t,i),this.cx,this.cy,this.r,this.r0,this.startAngle}dy.isPersistent=function(){return!this._incremental},dy.updateData=function(t,e){this.group.removeAll();var i=new hy({rectHover:!0,cursor:"default"});i.setShape({points:t.getLayout("symbolPoints")}),this._setCommon(i,t,!1,e),this.group.add(i),this._incremental=null},dy.updateLayout=function(t){if(!this._incremental){var n=t.getLayout("symbolPoints");this.group.eachChild(function(t){if(null!=t.startIndex){var e=2*(t.endIndex-t.startIndex),i=4*t.startIndex*2;n=new Float32Array(n.buffer,i,e)}t.setShape("points",n)})}},dy.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clearIncremental(),2e6<t.count()?(this._incremental||(this._incremental=new vs({silent:!0})),this.group.add(this._incremental)):this._incremental=null},dy.incrementalUpdate=function(t,e,i){var n;this._incremental?(n=new hy,this._incremental.addDisplayable(n,!0)):((n=new hy({rectHover:!0,cursor:"default",startIndex:t.start,endIndex:t.end})).incremental=!0,this.group.add(n)),n.setShape({points:e.getLayout("symbolPoints")}),this._setCommon(n,e,!!this._incremental,i)},dy._setCommon=function(i,t,e,n){var o=t.hostModel;n=n||{};var a=t.getVisual("symbolSize");i.setShape("size",a instanceof Array?a:[a,a]),i.softClipShape=n.clipShape||null,i.symbolProxy=wg(t.getVisual("symbol"),0,0,0,0),i.setColor=i.symbolProxy.setColor;var r=i.shape.size[0]<4;i.useStyle(o.getModel("itemStyle").getItemStyle(r?["color","shadowBlur","shadowColor"]:["color"]));var s=t.getVisual("color");s&&i.setColor(s),e||(i.seriesIndex=o.seriesIndex,i.on("mousemove",function(t){i.dataIndex=null;var e=i.findDataIndex(t.offsetX,t.offsetY);0<=e&&(i.dataIndex=e+(i.startIndex||0))}))},dy.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},dy._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()},Cf({type:"scatter",render:function(t,e,i){var n=t.getData();this._updateSymbolDraw(n,t).updateData(n,{clipShape:this._getClipShape(t)}),this._finished=!0},incrementalPrepareRender:function(t,e,i){var n=t.getData();this._updateSymbolDraw(n,t).incrementalPrepareUpdate(n),this._finished=!1},incrementalRender:function(t,e,i){this._symbolDraw.incrementalUpdate(t,e.getData(),{clipShape:this._getClipShape(e)}),this._finished=t.end===e.getData().count()},updateTransform:function(t,e,i){var n=t.getData();if(this.group.dirty(),!this._finished||1e4<n.count()||!this._symbolDraw.isPersistent())return{update:!0};var o=km().reset(t);o.progress&&o.progress({start:0,end:n.count()},n),this._symbolDraw.updateLayout(n)},_getClipShape:function(t){var e=t.coordinateSystem,i=e&&e.getArea&&e.getArea();return t.get("clip",!0)?i:null},_updateSymbolDraw:function(t,e){var i=this._symbolDraw,n=e.pipelineContext.large;return i&&n===this._isLargeDraw||(i&&i.remove(),i=this._symbolDraw=n?new cy:new im,this._isLargeDraw=n,this.group.removeAll()),this.group.add(i.group),i},remove:function(t,e){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},dispose:function(){}}),Sf(Lm("scatter","circle")),bf(km("scatter")),w(fy,Gg),py.prototype.getIndicatorAxes=function(){return this._indicatorAxes},py.prototype.dataToPoint=function(t,e){var i=this._indicatorAxes[e];return this.coordToPoint(i.dataToCoord(t),e)},py.prototype.coordToPoint=function(t,e){var i=this._indicatorAxes[e].angle;return[this.cx+t*Math.cos(i),this.cy-t*Math.sin(i)]},py.prototype.pointToData=function(t){var e=t[0]-this.cx,i=t[1]-this.cy,n=Math.sqrt(e*e+i*i);e/=n,i/=n;for(var o,a=Math.atan2(-i,e),r=1/0,s=-1,l=0;l<this._indicatorAxes.length;l++){var u=this._indicatorAxes[l],h=Math.abs(a-u.angle);h<r&&(o=u,s=l,r=h)}return[s,+(o&&o.coordToData(n))]},py.prototype.resize=function(t,e){var i=t.get("center"),n=e.getWidth(),o=e.getHeight(),a=Math.min(n,o)/2;this.cx=Rl(i[0],n),this.cy=Rl(i[1],o),this.startAngle=t.get("startAngle")*Math.PI/180;var r=t.get("radius");"string"!=typeof r&&"number"!=typeof r||(r=[0,r]),this.r0=Rl(r[0],a),this.r=Rl(r[1],a),E(this._indicatorAxes,function(t,e){t.setExtent(this.r0,this.r);var i=this.startAngle+e*Math.PI*2/this._indicatorAxes.length;i=Math.atan2(Math.sin(i),Math.cos(i)),t.angle=i},this)},py.prototype.update=function(n,t){var o=this._indicatorAxes,a=this._model;E(o,function(t){t.scale.setExtent(1/0,-1/0)}),n.eachSeriesByType("radar",function(t,e){if("radar"===t.get("coordinateSystem")&&n.getComponent("radar",t.get("radarIndex"))===a){var i=t.getData();E(o,function(t){t.scale.unionExtentFromData(i,i.mapDimension(t.dim))})}},this);var c=a.get("splitNumber");function d(t){var e=Math.pow(10,Math.floor(Math.log(t)/Math.LN10)),i=t/e;return 2===i?i=5:i*=2,i*e}E(o,function(t,e){var i=ag(t.scale,t.model).extent;rg(t.scale,t.model);var n=t.model,o=t.scale,a=n.getMin(),r=n.getMax(),s=o.getInterval();if(null!=a&&null!=r)o.setExtent(+a,+r),o.setInterval((r-a)/c);else if(null!=a)for(;u=a+s*c,o.setExtent(+a,u),o.setInterval(s),s=d(s),u<i[1]&&isFinite(u)&&isFinite(i[1]););else if(null!=r)for(;h=r-s*c,o.setExtent(h,+r),o.setInterval(s),s=d(s),h>i[0]&&isFinite(h)&&isFinite(i[0]););else{var l=o.getTicks().length-1;c<l&&(s=d(s));var u,h=zl((u=Math.ceil(i[1]/s)*s)-s*c);o.setExtent(h,u),o.setInterval(s)}})},py.dimensions=[],py.create=function(i,n){var o=[];return i.eachComponent("radar",function(t){var e=new py(t,i,n);o.push(e),t.coordinateSystem=e}),i.eachSeriesByType("radar",function(t){"radar"===t.get("coordinateSystem")&&(t.coordinateSystem=o[t.get("radarIndex")||0])}),o},lh.register("radar",py);var gy=Vm.valueAxis;function my(t,e){return D({show:e},t)}Tf({type:"radar",optionUpdated:function(){var o=this.get("boundaryGap"),a=this.get("splitNumber"),r=this.get("scale"),s=this.get("axisLine"),l=this.get("axisTick"),u=this.get("axisType"),h=this.get("axisLabel"),c=this.get("name"),d=this.get("name.show"),f=this.get("name.formatter"),p=this.get("nameGap"),g=this.get("triggerEvent"),t=O(this.get("indicator")||[],function(t){null!=t.max&&0<t.max&&!t.min?t.min=0:null!=t.min&&t.min<0&&!t.max&&(t.max=0);var e=c;if(null!=t.color&&(e=D({color:t.color},c)),t=m(k(t),{boundaryGap:o,splitNumber:a,scale:r,axisLine:s,axisTick:l,axisType:u,axisLabel:h,name:t.text,nameLocation:"end",nameGap:p,nameTextStyle:e,triggerEvent:g},!1),d||(t.name=""),"string"==typeof f){var i=t.name;t.name=f.replace("{value}",null!=i?i:"")}else"function"==typeof f&&(t.name=f(t.name,t));var n=P(new Cl(t,null,this.ecModel),dg);return n.mainType="radar",n.componentIndex=this.componentIndex,n},this);this.getIndicatorModels=function(){return t}},defaultOption:{zlevel:0,z:0,center:["50%","50%"],radius:"75%",startAngle:90,name:{show:!0},boundaryGap:[0,0],splitNumber:5,nameGap:15,scale:!1,shape:"polygon",axisLine:m({lineStyle:{color:"#bbb"}},gy.axisLine),axisLabel:my(gy.axisLabel,!1),axisTick:my(gy.axisTick,!1),axisType:"interval",splitLine:my(gy.splitLine,!0),splitArea:my(gy.splitArea,!0),indicator:[]}});var vy=["axisLine","axisTickLabel","axisName"];Af({type:"radar",render:function(t,e,i){this.group.removeAll(),this._buildAxes(t),this._buildSplitLineAndArea(t)},_buildAxes:function(t){var e=t.coordinateSystem;E(O(e.getIndicatorAxes(),function(t){return new Qm(t.model,{position:[e.cx,e.cy],rotation:t.angle,labelDirection:-1,tickDirection:-1,nameDirection:1})}),function(t){E(vy,t.add,t),this.group.add(t.getGroup())},this)},_buildSplitLineAndArea:function(t){var n=t.coordinateSystem,e=n.getIndicatorAxes();if(e.length){var i=t.get("shape"),o=t.getModel("splitLine"),a=t.getModel("splitArea"),r=o.getModel("lineStyle"),s=a.getModel("areaStyle"),l=o.get("show"),u=a.get("show"),h=r.get("color"),c=s.get("color");h=L(h)?h:[h],c=L(c)?c:[c];var d=[],f=[];if("circle"===i)for(var p=e[0].getTicksCoords(),g=n.cx,m=n.cy,v=0;v<p.length;v++){if(l)d[I(d,h,v)].push(new Yr({shape:{cx:g,cy:m,r:p[v].coord}}));if(u&&v<p.length-1)f[I(f,c,v)].push(new Kr({shape:{cx:g,cy:m,r0:p[v].coord,r:p[v+1].coord}}))}else{var y,x=O(e,function(t,e){var i=t.getTicksCoords();return y=null==y?i.length-1:Math.min(i.length-1,y),O(i,function(t){return n.coordToPoint(t.coord,e)})}),_=[];for(v=0;v<=y;v++){for(var w=[],b=0;b<e.length;b++)w.push(x[b][v]);if(w[0]&&w.push(w[0].slice()),l)d[I(d,h,v)].push(new ts({shape:{points:w}}));if(u&&_)f[I(f,c,v-1)].push(new Qr({shape:{points:w.concat(_)}}));_=w.slice().reverse()}}var S=r.getLineStyle(),M=s.getAreaStyle();E(f,function(t,e){this.group.add(Es(t,{style:D({stroke:"none",fill:c[e%c.length]},M),silent:!0}))},this),E(d,function(t,e){this.group.add(Es(t,{style:D({fill:"none",stroke:h[e%h.length]},S),silent:!0}))},this)}function I(t,e,i){var n=i%e.length;return t[n]=t[n]||[],n}}});var yy=sc.extend({type:"series.radar",dependencies:["radar"],init:function(t){yy.superApply(this,"init",arguments),this.legendVisualProvider=new qv(A(this.getData,this),A(this.getRawData,this))},getInitialData:function(t,e){return Yv(this,{generateCoord:"indicator_",generateCoordCount:1/0})},formatTooltip:function(n){var o=this.getData(),t=this.coordinateSystem.getIndicatorAxes(),e=this.getData().getName(n);return au(""===e?this.name:e)+"<br/>"+O(t,function(t,e){var i=o.get(o.mapDimension(t.dim),n);return au(t.name+" : "+i)}).join("<br />")},getTooltipPosition:function(t){if(null!=t)for(var e=this.getData(),i=this.coordinateSystem,n=e.getValues(O(i.dimensions,function(t){return e.mapDimension(t)}),t,!0),o=0,a=n.length;o<a;o++)if(!isNaN(n[o])){var r=i.getIndicatorAxes();return i.coordToPoint(r[o].dataToCoord(n[o]),o)}},defaultOption:{zlevel:0,z:2,coordinateSystem:"radar",legendHoverLink:!0,radarIndex:0,lineStyle:{width:2,type:"solid"},label:{position:"top"},symbol:"emptyCircle",symbolSize:4}});Cf({type:"radar",render:function(l,t,e){var i=l.coordinateSystem,g=this.group,m=l.getData(),s=this._data;function u(t,e){var i=t.getItemVisual(e,"symbol")||"circle",n=t.getItemVisual(e,"color");if("none"!==i){var o=function(t){return L(t)||(t=[+t,+t]),t}(t.getItemVisual(e,"symbolSize")),a=wg(i,-1,-1,2,2,n);return a.attr({style:{strokeNoScale:!0},z2:100,scale:[o[0]/2,o[1]/2]}),a}}function h(t,e,i,n,o,a){i.removeAll();for(var r=0;r<e.length-1;r++){var s=u(n,o);s&&(t[s.__dimIdx=r]?(s.attr("position",t[r]),bl[a?"initProps":"updateProps"](s,{position:e[r]},l,o)):s.attr("position",e[r]),i.add(s))}}function c(t){return O(t,function(t){return[i.cx,i.cy]})}m.diff(s).add(function(t){var e=m.getItemLayout(t);if(e){var i=new Qr,n=new ts,o={shape:{points:e}};i.shape.points=c(e),n.shape.points=c(e),dl(i,o,l,t),dl(n,o,l,t);var a=new Ci,r=new Ci;a.add(n),a.add(i),a.add(r),h(n.shape.points,e,r,m,t,!0),m.setItemGraphicEl(t,a)}}).update(function(t,e){var i=s.getItemGraphicEl(e),n=i.childAt(0),o=i.childAt(1),a=i.childAt(2),r={shape:{points:m.getItemLayout(t)}};r.shape.points&&(h(n.shape.points,r.shape.points,a,m,t,!1),cl(n,r,l),cl(o,r,l),m.setItemGraphicEl(t,i))}).remove(function(t){g.remove(s.getItemGraphicEl(t))}).execute(),m.eachItemGraphicEl(function(t,i){var e=m.getItemModel(i),n=t.childAt(0),o=t.childAt(1),a=t.childAt(2),r=m.getItemVisual(i,"color");g.add(t),n.useStyle(D(e.getModel("lineStyle").getLineStyle(),{fill:"none",stroke:r})),n.hoverStyle=e.getModel("emphasis.lineStyle").getLineStyle();var s=e.getModel("areaStyle"),l=e.getModel("emphasis.areaStyle"),u=s.isEmpty()&&s.parentModel.isEmpty(),h=l.isEmpty()&&l.parentModel.isEmpty();h=h&&u,o.ignore=u,o.useStyle(D(s.getAreaStyle(),{fill:r,opacity:.7})),o.hoverStyle=l.getAreaStyle();var c=e.getModel("itemStyle").getItemStyle(["color"]),d=e.getModel("emphasis.itemStyle").getItemStyle(),f=e.getModel("label"),p=e.getModel("emphasis.label");a.eachChild(function(t){t.setStyle(c),t.hoverStyle=k(d);var e=m.get(m.dimensions[t.__dimIdx],i);null!=e&&!isNaN(e)||(e=""),el(t.style,t.hoverStyle,f,p,{labelFetcher:m.hostModel,labelDataIndex:i,labelDimIndex:t.__dimIdx,defaultText:e,autoColor:r,isRectText:!0})}),t.highDownOnUpdate=function(t,e){o.attr("ignore","emphasis"===e?h:u)},$s(t)}),this._data=m},remove:function(){this.group.removeAll(),this._data=null},dispose:function(){}});function xy(t){return!isNaN(t[0])&&!isNaN(t[1])}function _y(t){return[t.cx,t.cy]}Sf(iy("radar")),Sf(Lm("radar","circle")),bf(function(t){t.eachSeriesByType("radar",function(t){var i=t.getData(),o=[],a=t.coordinateSystem;if(a){var e=a.getIndicatorAxes();E(e,function(t,n){i.each(i.mapDimension(e[n].dim),function(t,e){o[e]=o[e]||[];var i=a.dataToPoint(t,n);o[e][n]=xy(i)?i:_y(a)})}),i.each(function(t){var e=I(o[t],function(t){return xy(t)})||_y(a);o[t].push(e.slice()),i.setItemLayout(t,o[t])})}})}),xf(uy("radar")),yf(function(i){var t=i.polar;if(t){L(t)||(t=[t]);var n=[];E(t,function(t,e){t.indicator?(t.type&&!t.shape&&(t.shape=t.type),i.radar=i.radar||[],L(i.radar)||(i.radar=[i.radar]),i.radar.push(t)):n.push(t)}),i.polar=n}E(i.series,function(t){t&&"radar"===t.type&&t.polarIndex&&(t.radarIndex=t.polarIndex)})});for(var wy=[126,25],by=[[[0,3.5],[7,11.2],[15,11.9],[30,7],[42,.7],[52,.7],[56,7.7],[59,.7],[64,.7],[64,0],[5,0],[0,3.5]],[[13,16.1],[19,14.7],[16,21.7],[11,23.1],[13,16.1]],[[12,32.2],[14,38.5],[15,38.5],[13,32.2],[12,32.2]],[[16,47.6],[12,53.2],[13,53.2],[18,47.6],[16,47.6]],[[6,64.4],[8,70],[9,70],[8,64.4],[6,64.4]],[[23,82.6],[29,79.8],[30,79.8],[25,82.6],[23,82.6]],[[37,70.7],[43,62.3],[44,62.3],[39,70.7],[37,70.7]],[[48,51.1],[51,45.5],[53,45.5],[50,51.1],[48,51.1]],[[51,35],[51,28.7],[53,28.7],[53,35],[51,35]],[[52,22.4],[55,17.5],[56,17.5],[53,22.4],[52,22.4]],[[58,12.6],[62,7],[63,7],[60,12.6],[58,12.6]],[[0,3.5],[0,93.1],[64,93.1],[64,0],[63,0],[63,92.4],[1,92.4],[1,3.5],[0,3.5]]],Sy=0;Sy<by.length;Sy++)for(var My=0;My<by[Sy].length;My++)by[Sy][My][0]/=10.5,by[Sy][My][1]/=-14,by[Sy][My][0]+=wy[0],by[Sy][My][1]+=wy[1];var Iy={"南海诸岛":[32,80],"广东":[0,-10],"香港":[10,5],"澳门":[-10,10],"天津":[5,5]},Ty={Russia:[100,60],"United States":[-99,38],"United States of America":[-99,38]},Ay=[[[123.45165252685547,25.73527164402261],[123.49731445312499,25.73527164402261],[123.49731445312499,25.750734064600884],[123.45165252685547,25.750734064600884],[123.45165252685547,25.73527164402261]]],Dy=jo(),Cy={load:function(n,t,e){var i=Dy(t).parsed;if(i)return i;var o,a=t.specialAreas||{},r=t.geoJSON;try{o=r?Cg(r,e):[]}catch(t){throw new Error("Invalid geoJson format\n"+t.message)}return function(t,e){"china"===t&&e.push(new Ag("南海诸岛",O(by,function(t){return{type:"polygon",exterior:t}}),wy))}(n,o),E(o,function(t){var e=t.name;!function(t,e){if("china"===t){var i=Iy[e.name];if(i){var n=e.center;n[0]+=i[0]/10.5,n[1]+=-i[1]/14}}}(n,t),function(t,e){if("world"===t){var i=Ty[e.name];if(i){var n=e.center;n[0]=i[0],n[1]=i[1]}}}(n,t),function(t,e){"china"===t&&"台湾"===e.name&&e.geometries.push({type:"polygon",exterior:Ay[0]})}(n,t);var i=a[e];i&&t.transformTo(i.left,i.top,i.width,i.height)}),Dy(t).parsed={regions:o,boundingRect:function(t){for(var e,i=0;i<t.length;i++){var n=t[i].getBoundingRect();(e=e||n.clone()).union(n)}return e}(o)}}};var Ly=jo();function ky(t,e){var i,n,o=t.svgXML;try{Y(null!=(n=(i=o&&function(t,e){return(new hd).parse(t,e)}(o,{ignoreViewBox:!0,ignoreRootClip:!0})||{}).root))}catch(t){throw new Error("Invalid svg format\n"+t.message)}var a=i.width,r=i.height,s=i.viewBoxRect;if(e||(e=null==a||null==r?n.getBoundingRect():new Di(0,0,0,0),null!=a&&(e.width=a),null!=r&&(e.height=r)),s){var l=wd(s,e.width,e.height),u=n;(n=new Ci).add(u),u.scale=l.scale,u.position=l.position}return n.setClipPath(new rs({shape:e.plain()})),{root:n,boundingRect:e}}var Py={geoJSON:Cy,svg:{load:function(t,e){var i=Ly(e).originRoot;if(i)return{root:i,boundingRect:Ly(e).boundingRect};var n=ky(e);return Ly(e).originRoot=n.root,Ly(e).boundingRect=n.boundingRect,n},makeGraphic:function(t,e,i){var n=Ly(e),o=n.rootMap||(n.rootMap=Q()),a=o.get(i);if(a)return a;var r=n.originRoot,s=n.boundingRect;return a=n.originRootHostKey?ky(e,s).root:(n.originRootHostKey=i,r),o.set(i,a)},removeGraphic:function(t,e,i){var n=Ly(e),o=n.rootMap;o&&o.removeKey(i),i===n.originRootHostKey&&(n.originRootHostKey=null)}}},Ny={load:function(n,o,a){var r,s=[],l=Q(),u=Q();return E(Ey(n),function(t){var e=Py[t.type].load(n,t,a);E(e.regions,function(t){var e=t.name;o&&o.hasOwnProperty(e)&&(t=t.cloneShallow(e=o[e])),s.push(t),l.set(e,t),u.set(e,t.center)});var i=e.boundingRect;i&&(r?r.union(i):r=i.clone())}),{regions:s,regionsMap:l,nameCoordMap:u,boundingRect:r||new Di(0,0,0,0)}},makeGraphic:Oy("makeGraphic"),removeGraphic:Oy("removeGraphic")};function Oy(a){return function(i,n){var t=Ey(i),o=[];return E(t,function(t){var e=Py[t.type][a];e&&o.push(e(i,t,n))}),o}}function Ey(t){return Sd.retrieveMap(t)||[]}b(sc.extend({type:"series.map",dependencies:["geo"],layoutMode:"box",needsDrawMap:!1,seriesGroup:[],getInitialData:function(t){for(var e=Yv(this,{coordDimensions:["value"],encodeDefaulter:T(Ju,this)}),i=e.mapDimension("value"),n=Q(),o=[],a=[],r=0,s=e.count();r<s;r++){var l=e.getName(r);n.set(l,!0),o.push({name:l,value:e.get(i,r),selected:Zh(e,r,"selected")})}return E(Ny.load(this.getMapType(),this.option.nameMap,this.option.nameProperty).regions,function(t){var e=t.name;n.get(e)||(o.push({name:e}),a.push(e))}),this.updateSelectedMap(o),e.appendValues([],a),e},getHostGeoModel:function(){var t=this.option.geoIndex;return null!=t?this.dependentModels.geo[t]:null},getMapType:function(){return(this.getHostGeoModel()||this).option.map},getRawValue:function(t){var e=this.getData();return e.get(e.mapDimension("value"),t)},getRegionModel:function(t){var e=this.getData();return e.getItemModel(e.indexOfName(t))},formatTooltip:function(t){for(var e=this.getData(),i=tu(this.getRawValue(t)),n=e.getName(t),o=this.seriesGroup,a=[],r=0;r<o.length;r++){var s=o[r].originalData.indexOfName(n),l=e.mapDimension("value");isNaN(o[r].originalData.get(l,s))||a.push(au(o[r].name))}return a.join(", ")+"<br />"+au(n+" : "+i)},getTooltipPosition:function(t){if(null!=t){var e=this.getData().getName(t),i=this.coordinateSystem,n=i.getRegion(e);return n&&i.dataToPoint(n.center)}},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},defaultOption:{zlevel:0,z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:.75,showLegendSymbol:!0,dataRangeHoverLink:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}},nameProperty:"name"}}),jv);var Ry="\0_ec_interaction_mutex";function zy(t,e){return!!By(t)[e]}function By(t){return t[Ry]||(t[Ry]={})}function Vy(i){this.pointerChecker,this._zr=i,this._opt={};var t=A,n=t(Gy,this),o=t(Fy,this),a=t(Wy,this),r=t(Hy,this),s=t(Zy,this);Ct.call(this),this.setPointerChecker=function(t){this.pointerChecker=t},this.enable=function(t,e){this.disable(),this._opt=D(k(e)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),null==t&&(t=!0),!0!==t&&"move"!==t&&"pan"!==t||(i.on("mousedown",n),i.on("mousemove",o),i.on("mouseup",a)),!0!==t&&"scale"!==t&&"zoom"!==t||(i.on("mousewheel",r),i.on("pinch",s))},this.disable=function(){i.off("mousedown",n),i.off("mousemove",o),i.off("mouseup",a),i.off("mousewheel",r),i.off("pinch",s)},this.dispose=this.disable,this.isDragging=function(){return this._dragging},this.isPinching=function(){return this._pinching}}function Gy(t){if(!(Yt(t)||t.target&&t.target.draggable)){var e=t.offsetX,i=t.offsetY;this.pointerChecker&&this.pointerChecker(t,e,i)&&(this._x=e,this._y=i,this._dragging=!0)}}function Fy(t){if(this._dragging&&Yy("moveOnMouseMove",t,this._opt)&&"pinch"!==t.gestureEvent&&!zy(this._zr,"globalPan")){var e=t.offsetX,i=t.offsetY,n=this._x,o=this._y,a=e-n,r=i-o;this._x=e,this._y=i,this._opt.preventDefaultMouseMove&&Xt(t.event),Xy(this,"pan","moveOnMouseMove",t,{dx:a,dy:r,oldX:n,oldY:o,newX:e,newY:i})}}function Wy(t){Yt(t)||(this._dragging=!1)}function Hy(t){var e=Yy("zoomOnMouseWheel",t,this._opt),i=Yy("moveOnMouseWheel",t,this._opt),n=t.wheelDelta,o=Math.abs(n),a=t.offsetX,r=t.offsetY;if(0!==n&&(e||i)){if(e){var s=3<o?1.4:1<o?1.2:1.1;Uy(this,"zoom","zoomOnMouseWheel",t,{scale:0<n?s:1/s,originX:a,originY:r})}if(i){var l=Math.abs(n);Uy(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:(0<n?1:-1)*(3<l?.4:1<l?.15:.05),originX:a,originY:r})}}}function Zy(t){zy(this._zr,"globalPan")||Uy(this,"zoom",null,t,{scale:1<t.pinchScale?1.1:1/1.1,originX:t.pinchX,originY:t.pinchY})}function Uy(t,e,i,n,o){t.pointerChecker&&t.pointerChecker(n,o.originX,o.originY)&&(Xt(n.event),Xy(t,e,i,n,o))}function Xy(t,e,i,n,o){o.isAvailableBehavior=A(Yy,null,i,n),t.trigger(e,o)}function Yy(t,e,i){var n=i[t];return!t||n&&(!R(n)||e.event[n+"Key"])}function jy(t,e,i){var n=t.target,o=n.position;o[0]+=e,o[1]+=i,n.dirty()}function qy(t,e,i,n){var o=t.target,a=t.zoomLimit,r=o.position,s=o.scale,l=t.zoom=t.zoom||1;if(l*=e,a){var u=a.min||0,h=a.max||1/0;l=Math.max(Math.min(h,l),u)}var c=l/t.zoom;t.zoom=l,r[0]-=(i-r[0])*(c-1),r[1]-=(n-r[1])*(c-1),s[0]*=c,s[1]*=c,o.dirty()}_f({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},function(){}),b(Vy,Ct);var Ky={axisPointer:1,tooltip:1,brush:1};function $y(t,e,i){var n=e.getComponentByElement(t.topTarget),o=n&&n.coordinateSystem;return n&&n!==i&&!Ky[n.mainType]&&o&&o.model!==i}function Jy(t){var e=t.getItemStyle(),i=t.get("areaColor");return null!=i&&(e.fill=i),e}function Qy(i,t){t.eachChild(function(e){E(e.__regions,function(t){e.trigger(i.isSelected(t.name)?"emphasis":"normal")})})}function tx(t,e){var i=new Ci;this.uid=Nl("ec_map_draw"),this._controller=new Vy(t.getZr()),this._controllerHost={target:e?i:null},this.group=i,this._updateGroup=e,this._mouseDownFlag,this._mapName,this._initialized,i.add(this._regionsGroup=new Ci),i.add(this._backgroundGroup=new Ci)}tx.prototype={constructor:tx,draw:function(_,t,e,i,n){var w="geo"===_.mainType,b=_.getData&&_.getData();w&&t.eachComponent({mainType:"series",subType:"map"},function(t){b||t.getHostGeoModel()!==_||(b=t.getData())});var o=_.coordinateSystem;this._updateBackground(o);var S,M=this._regionsGroup,I=this.group,a=o.getTransformInfo(),T=!M.childAt(0)||n;if(T)I.transform=a.roamTransform,I.decomposeTransform(),I.dirty();else{var r=new ve;r.transform=a.roamTransform,r.decomposeTransform();var s={scale:r.scale,position:r.position};S=r.scale,cl(I,s,_)}var A=a.rawScale,D=a.rawPosition;M.removeAll();var C=["itemStyle"],L=["emphasis","itemStyle"],k=["label"],P=["emphasis","label"],N=Q();E(o.regions,function(t){var e=N.get(t.name)||N.set(t.name,new Ci),a=new ps({segmentIgnoreThreshold:1,shape:{paths:[]}});e.add(a);var i,n=(x=_.getRegionModel(t.name)||_).getModel(C),o=x.getModel(L),r=Jy(n),s=Jy(o),l=x.getModel(k),u=x.getModel(P);if(b){i=b.indexOfName(t.name);var h=b.getItemVisual(i,"color",!0);h&&(r.fill=h)}function c(t){return[t[0]*A[0]+D[0],t[1]*A[1]+D[1]]}E(t.geometries,function(t){if("polygon"===t.type){for(var e=[],i=0;i<t.exterior.length;++i)e.push(c(t.exterior[i]));a.shape.paths.push(new Qr({segmentIgnoreThreshold:1,shape:{points:e}}));for(i=0;i<(t.interiors?t.interiors.length:0);++i){for(var n=t.interiors[i],o=(e=[],0);o<n.length;++o)e.push(c(n[o]));a.shape.paths.push(new Qr({segmentIgnoreThreshold:1,shape:{points:e}}))}}}),a.setStyle(r),a.style.strokeNoScale=!0,a.culling=!0;var d=l.get("show"),f=u.get("show"),p=b&&isNaN(b.get(b.mapDimension("value"),i)),g=b&&b.getItemLayout(i);if(w||p&&(d||f)||g&&g.showLabel){var m,v=w?t.name:i;(!b||0<=i)&&(m=_);var y=new Ur({position:c(t.center.slice()),scale:[1/I.scale[0],1/I.scale[1]],z2:10,silent:!0});if(el(y.style,y.hoverStyle={},l,u,{labelFetcher:m,labelDataIndex:v,defaultText:t.name,useInsideStyle:!1},{textAlign:"center",textVerticalAlign:"middle"}),!T)cl(y,{scale:[1/S[0],1/S[1]]},_);e.add(y)}if(b)b.setItemGraphicEl(i,e);else{var x=_.getRegionModel(t.name);a.eventData={componentType:"geo",componentIndex:_.componentIndex,geoIndex:_.componentIndex,name:t.name,region:x&&x.option||{}}}(e.__regions||(e.__regions=[])).push(t),e.highDownSilentOnTouch=!!_.get("selectedMode"),$s(e,s),M.add(e)}),this._updateController(_,t,e),function(n,o,a,r,s){a.off("click"),a.off("mousedown"),o.get("selectedMode")&&(a.on("mousedown",function(){n._mouseDownFlag=!0}),a.on("click",function(t){if(n._mouseDownFlag){n._mouseDownFlag=!1;for(var e=t.target;!e.__regions;)e=e.parent;if(e){var i={type:("geo"===o.mainType?"geo":"map")+"ToggleSelect",batch:O(e.__regions,function(t){return{name:t.name,from:s.uid}})};i[o.mainType+"Id"]=o.id,r.dispatchAction(i),Qy(o,a)}}}))}(this,_,M,e,i),Qy(_,M)},remove:function(){this._regionsGroup.removeAll(),this._backgroundGroup.removeAll(),this._controller.dispose(),this._mapName&&Ny.removeGraphic(this._mapName,this.uid),this._mapName=null,this._controllerHost={}},_updateBackground:function(t){var e=t.map;this._mapName!==e&&E(Ny.makeGraphic(e,this.uid),function(t){this._backgroundGroup.add(t)},this),this._mapName=e},_updateController:function(n,t,o){var a=n.coordinateSystem,e=this._controller,i=this._controllerHost;i.zoomLimit=n.get("scaleLimit"),i.zoom=a.getZoom(),e.enable(n.get("roam")||!1);var r=n.mainType;function s(){var t={type:"geoRoam",componentType:r};return t[r+"Id"]=n.id,t}e.off("pan").on("pan",function(t){this._mouseDownFlag=!1,jy(i,t.dx,t.dy),o.dispatchAction(P(s(),{dx:t.dx,dy:t.dy}))},this),e.off("zoom").on("zoom",function(t){if(this._mouseDownFlag=!1,qy(i,t.scale,t.originX,t.originY),o.dispatchAction(P(s(),{zoom:t.scale,originX:t.originX,originY:t.originY})),this._updateGroup){var e=this.group.scale;this._regionsGroup.traverse(function(t){"text"===t.type&&t.attr("scale",[1/e[0],1/e[1]])})}},this),e.setPointerChecker(function(t,e,i){return a.getViewRectAfterRoam().contain(e,i)&&!$y(t,o,n)})}};var ex="__seriesMapHighDown",ix="__seriesMapCallKey";function nx(t){var e=this[ex];e&&e.recordVersion===this[ix]&&ox(e,t)}function ox(t,e){var i=t.circle,n=t.labelModel,o=t.hoverLabelModel,a=t.emphasisText,r=t.normalText;e?(i.style.extendFrom(nl({},o,{text:o.get("show")?a:null},{isRectText:!0,useInsideStyle:!1},!0)),i.__mapOriginalZ2=i.z2,i.z2+=bs):(nl(i.style,n,{text:n.get("show")?r:null,textPosition:n.getShallow("position")||"bottom"},{isRectText:!0,useInsideStyle:!1}),i.dirty(!1),null!=i.__mapOriginalZ2&&(i.z2=i.__mapOriginalZ2,i.__mapOriginalZ2=null))}function ax(t,e,i){var n=t.getZoom(),o=t.getCenter(),a=e.zoom,r=t.dataToPoint(o);if(null!=e.dx&&null!=e.dy){r[0]-=e.dx,r[1]-=e.dy;o=t.pointToData(r);t.setCenter(o)}if(null!=a){if(i){var s=i.min||0,l=i.max||1/0;a=Math.max(Math.min(n*a,l),s)/n}t.scale[0]*=a,t.scale[1]*=a;var u=t.position,h=(e.originX-u[0])*(a-1),c=(e.originY-u[1])*(a-1);u[0]-=h,u[1]-=c,t.updateTransform();o=t.pointToData(r);t.setCenter(o),t.setZoom(a*n)}return{center:t.getCenter(),zoom:t.getZoom()}}Cf({type:"map",render:function(t,e,i,n){if(!n||"mapToggleSelect"!==n.type||n.from!==this.uid){var o=this.group;if(o.removeAll(),!t.getHostGeoModel()){if(n&&"geoRoam"===n.type&&"series"===n.componentType&&n.seriesId===t.id)(a=this._mapDraw)&&o.add(a.group);else if(t.needsDrawMap){var a=this._mapDraw||new tx(i,!0);o.add(a.group),a.draw(t,e,i,this,n),this._mapDraw=a}else this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;t.get("showLegendSymbol")&&e.getComponent("legend")&&this._renderSymbols(t,e,i)}}},remove:function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null,this.group.removeAll()},dispose:function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null},_renderSymbols:function(x,t,e){var _=x.originalData,w=this.group;_.each(_.mapDimension("value"),function(t,e){if(!isNaN(t)){var i=_.getItemLayout(e);if(i&&i.point){var n=i.point,o=i.offset,a=new Yr({style:{fill:x.getData().getVisual("color")},shape:{cx:n[0]+9*o,cy:n[1],r:3},silent:!0,z2:8+(o?0:bs+1)});if(!o){var r=x.mainSeries.getData(),s=_.getName(e),l=r.indexOfName(s),u=_.getItemModel(e),h=u.getModel("label"),c=u.getModel("emphasis.label"),d=r.getItemGraphicEl(l),f=H(x.getFormattedLabel(l,"normal"),s),p=H(x.getFormattedLabel(l,"emphasis"),f),g=d[ex],m=Math.random();if(!g){g=d[ex]={};var v=T(nx,!0),y=T(nx,!1);d.on("mouseover",v).on("mouseout",y).on("emphasis",v).on("normal",y)}P(g,{recordVersion:d[ix]=m,circle:a,labelModel:h,hoverLabelModel:c,emphasisText:p,normalText:f}),ox(g,!1)}w.add(a)}}})}}),_f({type:"geoRoam",event:"geoRoam",update:"updateTransform"},function(n,t){var o=n.componentType||"series";t.eachComponent({mainType:o,query:n},function(t){var e=t.coordinateSystem;if("geo"===e.type){var i=ax(e,n,t.get("scaleLimit"));t.setCenter&&t.setCenter(i.center),t.setZoom&&t.setZoom(i.zoom),"series"===o&&E(t.seriesGroup,function(t){t.setCenter(i.center),t.setZoom(i.zoom)})}})});var rx=bt;function sx(){ve.call(this)}function lx(t){this.name=t,this.zoomLimit,ve.call(this),this._roamTransformable=new sx,this._rawTransformable=new sx,this._center,this._zoom}function ux(t,e,i,n){var o=i.seriesModel,a=o?o.coordinateSystem:null;return a===this?a[t](n):null}function hx(t,e,i,n){lx.call(this,t),this.map=e;var o=Ny.load(e,i);this._nameCoordMap=o.nameCoordMap,this._regionsMap=o.regionsMap,this._invertLongitute=null==n||n,this.regions=o.regions,this._rect=o.boundingRect}function cx(t,e,i,n){var o=i.geoModel,a=i.seriesModel,r=o?o.coordinateSystem:a?a.coordinateSystem||(a.getReferringComponents("geo")[0]||{}).coordinateSystem:null;return r===this?r[t](n):null}function dx(t,e){var i=t.get("boundingCoords");if(null!=i){var n=i[0],o=i[1];isNaN(n[0])||isNaN(n[1])||isNaN(o[0])||isNaN(o[1])||this.setBoundingRect(n[0],n[1],o[0]-n[0],o[1]-n[1])}var a,r=this.getBoundingRect(),s=t.get("layoutCenter"),l=t.get("layoutSize"),u=e.getWidth(),h=e.getHeight(),c=r.width/r.height*this.aspectScale,d=!1;if(s&&l&&(s=[Rl(s[0],u),Rl(s[1],h)],l=Rl(l,Math.min(u,h)),isNaN(s[0])||isNaN(s[1])||isNaN(l)||(d=!0)),d){var f={};1<c?(f.width=l,f.height=l/c):(f.height=l,f.width=l*c),f.y=s[1]-f.height/2,f.x=s[0]-f.width/2}else(a=t.getBoxLayoutParams()).aspect=c,f=bu(a,{width:u,height:h});this.setViewRect(f.x,f.y,f.width,f.height),this.setCenter(t.get("center")),this.setZoom(t.get("zoom"))}function fx(i,t){E(t.get("geoCoord"),function(t,e){i.addGeoCoord(e,t)})}b(sx,ve),lx.prototype={constructor:lx,type:"view",dimensions:["x","y"],setBoundingRect:function(t,e,i,n){return this._rect=new Di(t,e,i,n),this._rect},getBoundingRect:function(){return this._rect},setViewRect:function(t,e,i,n){this.transformTo(t,e,i,n),this._viewRect=new Di(t,e,i,n)},transformTo:function(t,e,i,n){var o=this.getBoundingRect(),a=this._rawTransformable;a.transform=o.calculateTransform(new Di(t,e,i,n)),a.decomposeTransform(),this._updateTransform()},setCenter:function(t){t&&(this._center=t,this._updateCenterAndZoom())},setZoom:function(t){t=t||1;var e=this.zoomLimit;e&&(null!=e.max&&(t=Math.min(e.max,t)),null!=e.min&&(t=Math.max(e.min,t))),this._zoom=t,this._updateCenterAndZoom()},getDefaultCenter:function(){var t=this.getBoundingRect();return[t.x+t.width/2,t.y+t.height/2]},getCenter:function(){return this._center||this.getDefaultCenter()},getZoom:function(){return this._zoom||1},getRoamTransform:function(){return this._roamTransformable.getLocalTransform()},_updateCenterAndZoom:function(){var t=this._rawTransformable.getLocalTransform(),e=this._roamTransformable,i=this.getDefaultCenter(),n=this.getCenter(),o=this.getZoom();n=bt([],n,t),i=bt([],i,t),e.origin=n,e.position=[i[0]-n[0],i[1]-n[1]],e.scale=[o,o],this._updateTransform()},_updateTransform:function(){var t=this._roamTransformable,e=this._rawTransformable;(e.parent=t).updateTransform(),e.updateTransform(),se(this.transform||(this.transform=[]),e.transform||ae()),this._rawTransform=e.getLocalTransform(),this.invTransform=this.invTransform||[],de(this.invTransform,this.transform),this.decomposeTransform()},getTransformInfo:function(){var t=this._roamTransformable.transform,e=this._rawTransformable;return{roamTransform:t?U(t):ae(),rawScale:U(e.scale),rawPosition:U(e.position)}},getViewRect:function(){return this._viewRect},getViewRectAfterRoam:function(){var t=this.getBoundingRect().clone();return t.applyTransform(this.transform),t},dataToPoint:function(t,e,i){var n=e?this._rawTransform:this.transform;return i=i||[],n?rx(i,t,n):at(i,t)},pointToData:function(t){var e=this.invTransform;return e?rx([],t,e):[t[0],t[1]]},convertToPixel:T(ux,"dataToPoint"),convertFromPixel:T(ux,"pointToData"),containPoint:function(t){return this.getViewRectAfterRoam().contain(t[0],t[1])}},b(lx,ve),hx.prototype={constructor:hx,type:"geo",dimensions:["lng","lat"],containCoord:function(t){for(var e=this.regions,i=0;i<e.length;i++)if(e[i].contain(t))return!0;return!1},transformTo:function(t,e,i,n){var o=this.getBoundingRect(),a=this._invertLongitute;o=o.clone(),a&&(o.y=-o.y-o.height);var r=this._rawTransformable;if(r.transform=o.calculateTransform(new Di(t,e,i,n)),r.decomposeTransform(),a){var s=r.scale;s[1]=-s[1]}r.updateTransform(),this._updateTransform()},getRegion:function(t){return this._regionsMap.get(t)},getRegionByCoord:function(t){for(var e=this.regions,i=0;i<e.length;i++)if(e[i].contain(t))return e[i]},addGeoCoord:function(t,e){this._nameCoordMap.set(t,e)},getGeoCoord:function(t){return this._nameCoordMap.get(t)},getBoundingRect:function(){return this._rect},dataToPoint:function(t,e,i){if("string"==typeof t&&(t=this.getGeoCoord(t)),t)return lx.prototype.dataToPoint.call(this,t,e,i)},convertToPixel:T(cx,"dataToPoint"),convertFromPixel:T(cx,"pointToData")},b(hx,lx);var px={dimensions:hx.prototype.dimensions,create:function(t,s){var l=[];t.eachComponent("geo",function(t,e){var i=t.get("map"),n=t.get("aspectScale"),o=!0,a=Sd.retrieveMap(i);a&&a[0]&&"svg"===a[0].type?(null==n&&(n=1),o=!1):null==n&&(n=.75);var r=new hx(i+e,i,t.get("nameMap"),o);r.aspectScale=n,r.zoomLimit=t.get("scaleLimit"),l.push(r),fx(r,t),(t.coordinateSystem=r).model=t,r.resize=dx,r.resize(t,s)}),t.eachSeries(function(t){if("geo"===t.get("coordinateSystem")){var e=t.get("geoIndex")||0;t.coordinateSystem=l[e]}});var i={};return t.eachSeriesByType("map",function(t){if(!t.getHostGeoModel()){var e=t.getMapType();i[e]=i[e]||[],i[e].push(t)}}),E(i,function(t,e){var i=new hx(e,e,p(O(t,function(t){return t.get("nameMap")})));i.zoomLimit=W.apply(null,O(t,function(t){return t.get("scaleLimit")})),l.push(i),i.resize=dx,i.aspectScale=t[0].get("aspectScale"),i.resize(t[0],s),E(t,function(t){fx(t.coordinateSystem=i,t)})}),l},getFilledRegions:function(t,e,i){for(var n=(t||[]).slice(),o=Q(),a=0;a<n.length;a++)o.set(n[a].name,n[a]);return E(Ny.load(e,i).regions,function(t){var e=t.name;o.get(e)||n.push({name:e})}),n}};wf("geo",px);bf(function(i){var o={};i.eachSeriesByType("map",function(t){var e=t.getMapType();if(!t.getHostGeoModel()&&!o[e]){var l={};E(t.seriesGroup,function(t){var r=t.coordinateSystem,s=t.originalData;t.get("showLegendSymbol")&&i.getComponent("legend")&&s.each(s.mapDimension("value"),function(t,e){var i=s.getName(e),n=r.getRegion(i);if(n&&!isNaN(t)){var o=l[i]||0,a=r.dataToPoint(n.center);l[i]=o+1,s.setItemLayout(e,{point:a,offset:o})}})});var n=t.getData();n.each(function(t){var e=n.getName(t),i=n.getItemLayout(t)||{};i.showLabel=!l[e],n.setItemLayout(t,i)}),o[e]=!0}})}),Sf(function(t){t.eachSeriesByType("map",function(t){var e=t.get("color"),i=t.getModel("itemStyle"),n=i.get("areaColor"),o=i.get("color")||e[t.seriesIndex%e.length];t.getData().setVisual({areaColor:n,color:o})})}),xf(Ld.PROCESSOR.STATISTIC,function(t){var n={};t.eachSeriesByType("map",function(t){var e=t.getHostGeoModel(),i=e?"o"+e.id:"i"+t.getMapType();(n[i]=n[i]||[]).push(t)}),E(n,function(t,e){for(var i=function(u,h){var c={};return E(u,function(n){n.each(n.mapDimension("value"),function(t,e){var i="ec-"+n.getName(e);c[i]=c[i]||[],isNaN(t)||c[i].push(t)})}),u[0].map(u[0].mapDimension("value"),function(t,e){for(var i,n="ec-"+u[0].getName(e),o=0,a=1/0,r=-1/0,s=c[n].length,l=0;l<s;l++)a=Math.min(a,c[n][l]),r=Math.max(r,c[n][l]),o+=c[n][l];return i="min"===h?a:"max"===h?r:"average"===h?o/s:o,0===s?NaN:i})}(O(t,function(t){return t.getData()}),t[0].get("mapValueCalculation")),n=0;n<t.length;n++)t[n].originalData=t[n].getData();for(n=0;n<t.length;n++)(t[n].seriesGroup=t)[n].needsDrawMap=0===n&&!t[n].getHostGeoModel(),t[n].setData(i.cloneShallow()),t[n].mainSeries=t[0]})}),yf(function(t){var e=[];E(t.series,function(t){t&&"map"===t.type&&(e.push(t),t.map=t.map||t.mapType,D(t,t.mapLocation))})}),ey("map",[{type:"mapToggleSelect",event:"mapselectchanged",method:"toggleSelected"},{type:"mapSelect",event:"mapselected",method:"select"},{type:"mapUnSelect",event:"mapunselected",method:"unSelect"}]);var gx=E,mx="\0__link_datas",vx="\0__link_mainData";function yx(i){var n=i.mainData,t=i.datas;t||(t={main:n},i.datasAttr={main:"data"}),i.datas=i.mainData=null,Mx(n,t,i),gx(t,function(e){gx(n.TRANSFERABLE_METHODS,function(t){e.wrapMethod(t,T(xx,i))})}),n.wrapMethod("cloneShallow",T(bx,i)),gx(n.CHANGABLE_METHODS,function(t){n.wrapMethod(t,T(_x,i))}),Y(t[n.dataType]===n)}function xx(t,e){if(function(t){return t[vx]===t}(this)){var i=P({},this[mx]);Mx(i[this.dataType]=e,i,t)}else Ix(e,this.dataType,this[vx],t);return e}function _x(t,e){return t.struct&&t.struct.update(this),e}function bx(i,n){return gx(n[mx],function(t,e){t!==n&&Ix(t.cloneShallow(),e,n,i)}),n}function Sx(t){var e=this[vx];return null==t||null==e?e:e[mx][t]}function Mx(i,t,n){i[mx]={},gx(t,function(t,e){Ix(t,e,i,n)})}function Ix(t,e,i,n){(i[mx][e]=t)[vx]=i,t.dataType=e,n.struct&&(t[n.structAttr]=n.struct,n.struct[n.datasAttr[e]]=t),t.getLinkedData=Sx}function Tx(t,e){this.name=t||"",this.depth=0,this.height=0,this.parentNode=null,this.dataIndex=-1,this.children=[],this.viewChildren=[],this.hostTree=e}function Ax(e,t){this.root,this.data,this._nodes=[],this.hostModel=e,this.levelModels=O(t||[],function(t){return new Cl(t,e,e.ecModel)})}function Dx(t,e){var i=e.children;t.parentNode!==e&&(i.push(t),t.parentNode=e)}function Cx(t,e){var i=t.isExpand?t.children:[],n=t.parentNode.children,o=t.hierNode.i?n[t.hierNode.i-1]:null;if(i.length){!function(t){var e=t.children,i=e.length,n=0,o=0;for(;0<=--i;){var a=e[i];a.hierNode.prelim+=n,a.hierNode.modifier+=n,o+=a.hierNode.change,n+=a.hierNode.shift+o}}(t);var a=(i[0].hierNode.prelim+i[i.length-1].hierNode.prelim)/2;o?(t.hierNode.prelim=o.hierNode.prelim+e(t,o),t.hierNode.modifier=t.hierNode.prelim-a):t.hierNode.prelim=a}else o&&(t.hierNode.prelim=o.hierNode.prelim+e(t,o));t.parentNode.hierNode.defaultAncestor=function(t,e,i,n){if(e){for(var o=t,a=t,r=a.parentNode.children[0],s=e,l=o.hierNode.modifier,u=a.hierNode.modifier,h=r.hierNode.modifier,c=s.hierNode.modifier;s=Nx(s),a=Ox(a),s&&a;){o=Nx(o),r=Ox(r),o.hierNode.ancestor=t;var d=s.hierNode.prelim+c-a.hierNode.prelim-u+n(s,a);0<d&&(Ex((p=t,g=i,(f=s).hierNode.ancestor.parentNode===p.parentNode?f.hierNode.ancestor:g),t,d),u+=d,l+=d),c+=s.hierNode.modifier,u+=a.hierNode.modifier,l+=o.hierNode.modifier,h+=r.hierNode.modifier}s&&!Nx(o)&&(o.hierNode.thread=s,o.hierNode.modifier+=c-l),a&&!Ox(r)&&(r.hierNode.thread=a,r.hierNode.modifier+=u-h,i=t)}var f,p,g;return i}(t,o,t.parentNode.hierNode.defaultAncestor||n[0],e)}function Lx(t){var e=t.hierNode.prelim+t.parentNode.hierNode.modifier;t.setLayout({x:e},!0),t.hierNode.modifier+=t.parentNode.hierNode.modifier}function kx(t){return arguments.length?t:Rx}function Px(t,e){var i={};return t-=Math.PI/2,i.x=e*Math.cos(t),i.y=e*Math.sin(t),i}function Nx(t){var e=t.children;return e.length&&t.isExpand?e[e.length-1]:t.hierNode.thread}function Ox(t){var e=t.children;return e.length&&t.isExpand?e[0]:t.hierNode.thread}function Ex(t,e,i){var n=i/(e.hierNode.i-t.hierNode.i);e.hierNode.change-=n,e.hierNode.shift+=i,e.hierNode.modifier+=i,e.hierNode.prelim+=i,t.hierNode.change+=n}function Rx(t,e){return t.parentNode===e.parentNode?1:2}Tx.prototype={constructor:Tx,isRemoved:function(){return this.dataIndex<0},eachNode:function(t,e,i){"function"==typeof t&&(i=e,e=t,t=null),R(t=t||{})&&(t={order:t});var n,o=t.order||"preorder",a=this[t.attr||"children"];"preorder"===o&&(n=e.call(i,this));for(var r=0;!n&&r<a.length;r++)a[r].eachNode(t,e,i);"postorder"===o&&e.call(i,this)},updateDepthAndHeight:function(t){var e=0;this.depth=t;for(var i=0;i<this.children.length;i++){var n=this.children[i];n.updateDepthAndHeight(t+1),n.height>e&&(e=n.height)}this.height=e+1},getNodeById:function(t){if(this.getId()===t)return this;for(var e=0,i=this.children,n=i.length;e<n;e++){var o=i[e].getNodeById(t);if(o)return o}},contains:function(t){if(t===this)return!0;for(var e=0,i=this.children,n=i.length;e<n;e++){var o=i[e].contains(t);if(o)return o}},getAncestors:function(t){for(var e=[],i=t?this:this.parentNode;i;)e.push(i),i=i.parentNode;return e.reverse(),e},getValue:function(t){var e=this.hostTree.data;return e.get(e.getDimension(t||"value"),this.dataIndex)},setLayout:function(t,e){0<=this.dataIndex&&this.hostTree.data.setItemLayout(this.dataIndex,t,e)},getLayout:function(){return this.hostTree.data.getItemLayout(this.dataIndex)},getModel:function(t){if(!(this.dataIndex<0)){var e=this.hostTree.data.getItemModel(this.dataIndex),i=this.getLevelModel();return i?e.getModel(t,i.getModel(t)):e.getModel(t)}},getLevelModel:function(){return(this.hostTree.levelModels||[])[this.depth]},setVisual:function(t,e){0<=this.dataIndex&&this.hostTree.data.setItemVisual(this.dataIndex,t,e)},getVisual:function(t,e){return this.hostTree.data.getItemVisual(this.dataIndex,t,e)},getRawIndex:function(){return this.hostTree.data.getRawIndex(this.dataIndex)},getId:function(){return this.hostTree.data.getId(this.dataIndex)},isAncestorOf:function(t){for(var e=t.parentNode;e;){if(e===this)return!0;e=e.parentNode}return!1},isDescendantOf:function(t){return t!==this&&t.isAncestorOf(this)}},Ax.prototype={constructor:Ax,type:"tree",eachNode:function(t,e,i){this.root.eachNode(t,e,i)},getNodeByDataIndex:function(t){var e=this.data.getRawIndex(t);return this._nodes[e]},getNodeByName:function(t){return this.root.getNodeByName(t)},update:function(){for(var t=this.data,e=this._nodes,i=0,n=e.length;i<n;i++)e[i].dataIndex=-1;for(i=0,n=t.count();i<n;i++)e[t.getRawIndex(i)].dataIndex=i},clearLayouts:function(){this.data.clearItemLayouts()}},Ax.createTree=function(t,e,i,n){var s=new Ax(e,i&&i.levels),l=[],u=1;!function t(e,i){var n=e.value;u=Math.max(u,L(n)?n.length:1);l.push(e);var o=new Tx(e.name,s);i?Dx(o,i):s.root=o;s._nodes.push(o);var a=e.children;if(a)for(var r=0;r<a.length;r++)t(a[r],o)}(t),s.root.updateDepthAndHeight(0);var o=lp(l,{coordDimensions:["value"],dimensionsCount:u}),a=new Yf(o,e);return a.initData(l),n&&n(a),yx({mainData:a,struct:s,structAttr:"tree"}),s.update(),s},sc.extend({type:"series.tree",layoutInfo:null,layoutMode:"box",getInitialData:function(t){var e={name:t.name,children:t.data},n=new Cl(t.leaves||{},this,this.ecModel),o=Ax.createTree(e,this,{},function(t){t.wrapMethod("getItemModel",function(t,e){var i=o.getNodeByDataIndex(e);return i.children.length&&i.isExpand||(t.parentModel=n),t})});var i=0;o.eachNode("preorder",function(t){t.depth>i&&(i=t.depth)});var a=t.expandAndCollapse&&0<=t.initialTreeDepth?t.initialTreeDepth:i;return o.root.eachNode("preorder",function(t){var e=t.hostTree.data.getRawDataItem(t.dataIndex);t.isExpand=e&&null!=e.collapsed?!e.collapsed:t.depth<=a}),o.data},getOrient:function(){var t=this.get("orient");return"horizontal"===t?t="LR":"vertical"===t&&(t="TB"),t},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},formatTooltip:function(t){for(var e=this.getData().tree,i=e.root.children[0],n=e.getNodeByDataIndex(t),o=n.getValue(),a=n.name;n&&n!==i;)a=n.parentNode.name+"."+a,n=n.parentNode;return au(a+(isNaN(o)||null==o?"":" : "+o))},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderColor:"#c23531",borderWidth:1.5},label:{show:!0,color:"#555"},leaves:{label:{show:!0}},animationEasing:"linear",animationDuration:700,animationDurationUpdate:1e3}});var zx=Cs({shape:{parentPoint:[],childPoints:[],orient:"",forkPosition:""},style:{stroke:"#000",fill:null},buildPath:function(t,e){var i=e.childPoints,n=i.length,o=e.parentPoint,a=i[0],r=i[n-1];if(1===n)return t.moveTo(o[0],o[1]),void t.lineTo(a[0],a[1]);var s=e.orient,l="TB"===s||"BT"===s?0:1,u=1-l,h=Rl(e.forkPosition,1),c=[];c[l]=o[l],c[u]=o[u]+(r[u]-o[u])*h,t.moveTo(o[0],o[1]),t.lineTo(c[0],c[1]),t.moveTo(a[0],a[1]),c[l]=a[l],t.lineTo(c[0],c[1]),c[l]=r[l],t.lineTo(c[0],c[1]),t.lineTo(r[0],r[1]);for(var d=1;d<n-1;d++){var f=i[d];t.moveTo(f[0],f[1]),c[l]=f[l],t.lineTo(c[0],c[1])}}});function Bx(t,e){var i=t.getItemLayout(e);return i&&!isNaN(i.x)&&!isNaN(i.y)&&"none"!==t.getItemVisual(e,"symbol")}function Vx(t,e,i){return i.itemModel=e,i.itemStyle=e.getModel("itemStyle").getItemStyle(),i.hoverItemStyle=e.getModel("emphasis.itemStyle").getItemStyle(),i.lineStyle=e.getModel("lineStyle").getLineStyle(),i.labelModel=e.getModel("label"),i.hoverLabelModel=e.getModel("emphasis.label"),!1===t.isExpand&&0!==t.children.length?i.symbolInnerColor=i.itemStyle.fill:i.symbolInnerColor="#fff",i}function Gx(t,e,i,n,o,a){var r=!i,s=t.tree.getNodeByDataIndex(e),l=s.getModel(),u=(a=Vx(s,l,a),t.tree.root),h=s.parentNode===u?s:s.parentNode||s,c=t.getItemGraphicEl(h.dataIndex),d=h.getLayout(),f=c?{x:c.position[0],y:c.position[1],rawX:c.__radialOldRawX,rawY:c.__radialOldRawY}:d,p=s.getLayout();r?(i=new Xg(t,e,a)).attr("position",[f.x,f.y]):i.updateData(t,e,a),i.__radialOldRawX=i.__radialRawX,i.__radialOldRawY=i.__radialRawY,i.__radialRawX=p.rawX,i.__radialRawY=p.rawY,n.add(i),t.setItemGraphicEl(e,i),cl(i,{position:[p.x,p.y]},o);var g=i.getSymbolPath();if("radial"===a.layout){var m,v,y=u.children[0],x=y.getLayout(),_=y.children.length;if(p.x===x.x&&!0===s.isExpand){var w={};w.x=(y.children[0].getLayout().x+y.children[_-1].getLayout().x)/2,w.y=(y.children[0].getLayout().y+y.children[_-1].getLayout().y)/2,(m=Math.atan2(w.y-x.y,w.x-x.x))<0&&(m=2*Math.PI+m),(v=w.x<x.x)&&(m-=Math.PI)}else(m=Math.atan2(p.y-x.y,p.x-x.x))<0&&(m=2*Math.PI+m),0===s.children.length||0!==s.children.length&&!1===s.isExpand?(v=p.x<x.x)&&(m-=Math.PI):(v=p.x>x.x)||(m-=Math.PI);var b=v?"left":"right",S=a.labelModel.get("rotate"),M=S*(Math.PI/180);g.setStyle({textPosition:a.labelModel.get("position")||b,textRotation:null==S?-m:M,textOrigin:"center",verticalAlign:"middle"})}!function(t,e,i,n,o,a,r,s,l){var u=l.edgeShape,h=n.__edge;if("curve"===u)e.parentNode&&e.parentNode!==i&&cl(h=h||(n.__edge=new ds({shape:Wx(l,o,o),style:D({opacity:0,strokeNoScale:!0},l.lineStyle)})),{shape:Wx(l,a,r),style:{opacity:1}},t);else if("polyline"===u&&"orthogonal"===l.layout&&e!==i&&e.children&&0!==e.children.length&&!0===e.isExpand){for(var c=e.children,d=[],f=0;f<c.length;f++){var p=c[f].getLayout();d.push([p.x,p.y])}cl(h=h||(n.__edge=new zx({shape:{parentPoint:[r.x,r.y],childPoints:[[r.x,r.y]],orient:l.orient,forkPosition:l.edgeForkPosition},style:D({opacity:0,strokeNoScale:!0},l.lineStyle)})),{shape:{parentPoint:[r.x,r.y],childPoints:d},style:{opacity:1}},t)}s.add(h)}(o,s,u,i,f,d,p,n,a)}function Fx(t,e,i,n,o,a){for(var r,s=t.tree.getNodeByDataIndex(e),l=t.tree.root,u=s.getModel(),h=(a=Vx(s,u,a),s.parentNode===l?s:s.parentNode||s),c=a.edgeShape;null==(r=h.getLayout());)h=h.parentNode===l?h:h.parentNode||h;cl(i,{position:[r.x+1,r.y+1]},o,function(){n.remove(i),t.setItemGraphicEl(e,null)}),i.fadeOut(null,{keepLabel:!0});var d=t.getItemGraphicEl(h.dataIndex).__edge,f=i.__edge||(!1===h.isExpand||1===h.children.length?d:void 0);c=a.edgeShape;f&&("curve"===c?cl(f,{shape:Wx(a,r,r),style:{opacity:0}},o,function(){n.remove(f)}):"polyline"===c&&"orthogonal"===a.layout&&cl(f,{shape:{parentPoint:[r.x,r.y],childPoints:[[r.x,r.y]]},style:{opacity:0}},o,function(){n.remove(f)}))}function Wx(t,e,i){var n,o,a,r,s,l,u,h,c=t.orient;if("radial"!==t.layout)return s=e.x,u=e.y,l=i.x,h=i.y,"LR"!==c&&"RL"!==c||(n=s+(l-s)*t.curvature,o=u,a=l+(s-l)*t.curvature,r=h),"TB"!==c&&"BT"!==c||(n=s,o=u+(h-u)*t.curvature,a=l,r=h+(u-h)*t.curvature),{x1:s,y1:u,x2:l,y2:h,cpx1:n,cpy1:o,cpx2:a,cpy2:r};s=e.rawX,u=e.rawY,l=i.rawX,h=i.rawY;var d=Px(s,u),f=Px(s,u+(h-u)*t.curvature),p=Px(l,h+(u-h)*t.curvature),g=Px(l,h);return{x1:d.x,y1:d.y,x2:g.x,y2:g.y,cpx1:f.x,cpy1:f.y,cpx2:p.x,cpy2:p.y}}function Hx(t,e){for(var i,n=[t];i=n.pop();)if(e(i),i.isExpand){var o=i.children;if(o.length)for(var a=o.length-1;0<=a;a--)n.push(o[a])}}Cf({type:"tree",init:function(t,e){this._oldTree,this._mainGroup=new Ci,this._controller=new Vy(e.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},render:function(n,t,i,e){var o=n.getData(),a=n.layoutInfo,r=this._mainGroup,s=n.get("layout");"radial"===s?r.attr("position",[a.x+a.width/2,a.y+a.height/2]):r.attr("position",[a.x,a.y]),this._updateViewCoordSys(n,a,s),this._updateController(n,t,i);var l=this._data,u={expandAndCollapse:n.get("expandAndCollapse"),layout:s,edgeShape:n.get("edgeShape"),edgeForkPosition:n.get("edgeForkPosition"),orient:n.getOrient(),curvature:n.get("lineStyle.curveness"),symbolRotate:n.get("symbolRotate"),symbolOffset:n.get("symbolOffset"),hoverAnimation:n.get("hoverAnimation"),useNameLabel:!0,fadeIn:!0};o.diff(l).add(function(t){Bx(o,t)&&Gx(o,t,null,r,n,u)}).update(function(t,e){var i=l.getItemGraphicEl(e);Bx(o,t)?Gx(o,t,i,r,n,u):i&&Fx(l,e,i,r,n,u)}).remove(function(t){var e=l.getItemGraphicEl(t);e&&Fx(l,t,e,r,n,u)}).execute(),this._nodeScaleRatio=n.get("nodeScaleRatio"),this._updateNodeAndLinkScale(n),!0===u.expandAndCollapse&&o.eachItemGraphicEl(function(t,e){t.off("click").on("click",function(){i.dispatchAction({type:"treeExpandAndCollapse",seriesId:n.id,dataIndex:e})})}),this._data=o},_updateViewCoordSys:function(t){var i=t.getData(),n=[];i.each(function(t){var e=i.getItemLayout(t);!e||isNaN(e.x)||isNaN(e.y)||n.push([+e.x,+e.y])});var e=[],o=[];Wa(n,e,o);var a=this._min,r=this._max;o[0]-e[0]==0&&(e[0]=a?a[0]:e[0]-1,o[0]=r?r[0]:o[0]+1),o[1]-e[1]==0&&(e[1]=a?a[1]:e[1]-1,o[1]=r?r[1]:o[1]+1);var s=t.coordinateSystem=new lx;s.zoomLimit=t.get("scaleLimit"),s.setBoundingRect(e[0],e[1],o[0]-e[0],o[1]-e[1]),s.setCenter(t.get("center")),s.setZoom(t.get("zoom")),this.group.attr({position:s.position,scale:s.scale}),this._viewCoordSys=s,this._min=e,this._max=o},_updateController:function(o,t,a){var e=this._controller,i=this._controllerHost,r=this.group;e.setPointerChecker(function(t,e,i){var n=r.getBoundingRect();return n.applyTransform(r.transform),n.contain(e,i)&&!$y(t,a,o)}),e.enable(o.get("roam")),i.zoomLimit=o.get("scaleLimit"),i.zoom=o.coordinateSystem.getZoom(),e.off("pan").off("zoom").on("pan",function(t){jy(i,t.dx,t.dy),a.dispatchAction({seriesId:o.id,type:"treeRoam",dx:t.dx,dy:t.dy})},this).on("zoom",function(t){qy(i,t.scale,t.originX,t.originY),a.dispatchAction({seriesId:o.id,type:"treeRoam",zoom:t.scale,originX:t.originX,originY:t.originY}),this._updateNodeAndLinkScale(o)},this)},_updateNodeAndLinkScale:function(t){var e=t.getData(),i=this._getNodeGlobalScale(t),n=[i,i];e.eachItemGraphicEl(function(t,e){t.attr("scale",n)})},_getNodeGlobalScale:function(t){var e=t.coordinateSystem;if("view"!==e.type)return 1;var i=this._nodeScaleRatio,n=e.scale,o=n&&n[0]||1;return((e.getZoom()-1)*i+1)/o},dispose:function(){this._controller&&this._controller.dispose(),this._controllerHost={}},remove:function(){this._mainGroup.removeAll(),this._data=null}}),_f({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(n,t){t.eachComponent({mainType:"series",subType:"tree",query:n},function(t){var e=n.dataIndex,i=t.getData().tree.getNodeByDataIndex(e);i.isExpand=!i.isExpand})}),_f({type:"treeRoam",event:"treeRoam",update:"none"},function(i,t){t.eachComponent({mainType:"series",subType:"tree",query:i},function(t){var e=ax(t.coordinateSystem,i);t.setCenter&&t.setCenter(e.center),t.setZoom&&t.setZoom(e.zoom)})});function Zx(t,e,i){if(t&&0<=_(e,t.type)){var n=i.getData().tree.root,o=t.targetNode;if("string"==typeof o&&(o=n.getNodeById(o)),o&&n.contains(o))return{node:o};var a=t.targetNodeId;if(null!=a&&(o=n.getNodeById(a)))return{node:o}}}function Ux(t){for(var e=[];t;)(t=t.parentNode)&&e.push(t);return e.reverse()}function Xx(t,e){return 0<=_(Ux(t),e)}function Yx(t,e){for(var i=[];t;){var n=t.dataIndex;i.push({name:t.name,dataIndex:n,value:e.getRawValue(n)}),t=t.parentNode}return i.reverse(),i}Sf(Lm("tree","circle")),bf(function(t,e){t.eachSeriesByType("tree",function(t){!function(t,e){var i=function(t,e){return bu(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,e);t.layoutInfo=i;var n=t.get("layout"),o=0,a=0,r=null;r="radial"===n?(o=2*Math.PI,a=Math.min(i.height,i.width)/2,kx(function(t,e){return(t.parentNode===e.parentNode?1:2)/t.depth})):(o=i.width,a=i.height,kx());var s=t.getData().tree.root,l=s.children[0];if(l){!function(t){t.hierNode={defaultAncestor:null,ancestor:t,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var e,i,n=[t];e=n.pop();)if(i=e.children,e.isExpand&&i.length)for(var o=i.length-1;0<=o;o--){var a=i[o];a.hierNode={defaultAncestor:null,ancestor:a,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},n.push(a)}}(s),function(t,e,i){for(var n,o=[t],a=[];n=o.pop();)if(a.push(n),n.isExpand){var r=n.children;if(r.length)for(var s=0;s<r.length;s++)o.push(r[s])}for(;n=a.pop();)e(n,i)}(l,Cx,r),s.hierNode.modifier=-l.hierNode.prelim,Hx(l,Lx);var u=l,h=l,c=l;Hx(l,function(t){var e=t.getLayout().x;e<u.getLayout().x&&(u=t),e>h.getLayout().x&&(h=t),t.depth>c.depth&&(c=t)});var d=u===h?1:r(u,h)/2,f=d-u.getLayout().x,p=0,g=0,m=0,v=0;if("radial"===n)p=o/(h.getLayout().x+d+f),g=a/(c.depth-1||1),Hx(l,function(t){m=(t.getLayout().x+f)*p,v=(t.depth-1)*g;var e=Px(m,v);t.setLayout({x:e.x,y:e.y,rawX:m,rawY:v},!0)});else{var y=t.getOrient();"RL"===y||"LR"===y?(g=a/(h.getLayout().x+d+f),p=o/(c.depth-1||1),Hx(l,function(t){v=(t.getLayout().x+f)*g,m="LR"===y?(t.depth-1)*p:o-(t.depth-1)*p,t.setLayout({x:m,y:v},!0)})):"TB"!==y&&"BT"!==y||(p=o/(h.getLayout().x+d+f),g=a/(c.depth-1||1),Hx(l,function(t){m=(t.getLayout().x+f)*p,v="TB"===y?(t.depth-1)*g:a-(t.depth-1)*g,t.setLayout({x:m,y:v},!0)}))}}}(t,e)})}),sc.extend({type:"series.treemap",layoutMode:"box",dependencies:["grid","polar"],preventUsingHoverLayer:!0,_viewRoot:null,defaultOption:{progressive:0,left:"center",top:"middle",right:null,bottom:null,width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.1024,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",borderColor:"rgba(255,255,255,0.7)",borderWidth:1,shadowColor:"rgba(150,150,150,1)",shadowBlur:3,shadowOffsetX:0,shadowOffsetY:0,textStyle:{color:"#fff"}},emphasis:{textStyle:{}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",ellipsis:!0},upperLabel:{show:!1,position:[0,"50%"],height:20,color:"#fff",ellipsis:!0,verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],color:"#fff",ellipsis:!0,verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},getInitialData:function(t,e){var i={name:t.name,children:t.data};!function i(t){var n=0;E(t.children,function(t){i(t);var e=t.value;L(e)&&(e=e[0]),n+=e});var e=t.value;L(e)&&(e=e[0]);null!=e&&!isNaN(e)||(e=n);e<0&&(e=0);L(t.value)?t.value[0]=e:t.value=e}(i);var n=t.levels||[],o=O((n=t.levels=function(t,e){var n,i=e.get("color");if(!i)return;if(E(t=t||[],function(t){var e=new Cl(t),i=e.get("color");(e.get("itemStyle.color")||i&&"none"!==i)&&(n=!0)}),!n){(t[0]||(t[0]={})).color=i.slice()}return t}(n,e))||[],function(t){return new Cl(t,this,e)},this),a=Ax.createTree(i,this,null,function(t){t.wrapMethod("getItemModel",function(t,e){var i=a.getNodeByDataIndex(e),n=o[i.depth];return n&&(t.parentModel=n),t})});return a.data},optionUpdated:function(){this.resetViewRoot()},formatTooltip:function(t){var e=this.getData(),i=this.getRawValue(t),n=L(i)?tu(i[0]):tu(i);return au(e.getName(t)+": "+n)},getDataParams:function(t){var e=sc.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(t);return e.treePathInfo=Yx(i,this),e},setLayoutInfo:function(t){this.layoutInfo=this.layoutInfo||{},P(this.layoutInfo,t)},mapIdToIndex:function(t){var e=this._idIndexMap;e||(e=this._idIndexMap=Q(),this._idIndexMapCount=0);var i=e.get(t);return null==i&&e.set(t,i=this._idIndexMapCount++),i},getViewRoot:function(){return this._viewRoot},resetViewRoot:function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getRawData().tree.root;t&&(t===e||e.contains(t))||(this._viewRoot=e)}});var jx=5;function qx(t){this.group=new Ci,t.add(this.group)}function Kx(t,e,i,n,o,a){var r=[[o?t:t-jx,e],[t+i,e],[t+i,e+n],[o?t:t-jx,e+n]];return a||r.splice(2,0,[t+i+jx,e+n/2]),o||r.push([t,e+n/2]),r}qx.prototype={constructor:qx,render:function(t,e,i,n){var o=t.getModel("breadcrumb"),a=this.group;if(a.removeAll(),o.get("show")&&i){var r=o.getModel("itemStyle"),s=r.getModel("textStyle"),l={pos:{left:o.get("left"),right:o.get("right"),top:o.get("top"),bottom:o.get("bottom")},box:{width:e.getWidth(),height:e.getHeight()},emptyItemWidth:o.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(i,l,s),this._renderContent(t,l,r,s,n),Su(a,l.pos,l.box)}},_prepare:function(t,e,i){for(var n=t;n;n=n.parentNode){var o=n.getModel().get("name"),a=i.getTextRect(o),r=Math.max(a.width+16,e.emptyItemWidth);e.totalWidth+=r+8,e.renderList.push({node:n,text:o,width:r})}},_renderContent:function(t,e,i,n,o){for(var a,r,s=0,l=e.emptyItemWidth,u=t.get("breadcrumb.height"),h=function(t,e,i){var n=e.width,o=e.height,a=Rl(t.x,n),r=Rl(t.y,o),s=Rl(t.x2,n),l=Rl(t.y2,o);return(isNaN(a)||isNaN(parseFloat(t.x)))&&(a=0),(isNaN(s)||isNaN(parseFloat(t.x2)))&&(s=n),(isNaN(r)||isNaN(parseFloat(t.y)))&&(r=0),(isNaN(l)||isNaN(parseFloat(t.y2)))&&(l=o),i=iu(i||0),{width:Math.max(s-a-i[1]-i[3],0),height:Math.max(l-r-i[0]-i[2],0)}}(e.pos,e.box),c=e.totalWidth,d=e.renderList,f=d.length-1;0<=f;f--){var p=d[f],g=p.node,m=p.width,v=p.text;c>h.width&&(c-=m-l,m=l,v=null);var y=new Qr({shape:{points:Kx(s,0,m,u,f===d.length-1,0===f)},style:D(i.getItemStyle(),{lineJoin:"bevel",text:v,textFill:n.getTextColor(),textFont:n.getFont()}),z:10,onclick:T(o,g)});this.group.add(y),a=t,r=g,y.eventData={componentType:"series",componentSubType:"treemap",componentIndex:a.componentIndex,seriesIndex:a.componentIndex,seriesName:a.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:r&&r.dataIndex,name:r&&r.name},treePathInfo:r&&Yx(r,a)},s+=m+8}},remove:function(){this.group.removeAll()}};function $x(t){var e=s_(t);return e.stroke=e.fill=e.lineWidth=null,e}var Jx=A,Qx=Ci,t_=rs,e_=E,i_=["label"],n_=["emphasis","label"],o_=["upperLabel"],a_=["emphasis","upperLabel"],r_=10,s_=ha([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]);function l_(h,r,s,l,u,e,c,t,i,n){if(c){var d=c.getLayout(),o=h.getData();if(o.setItemGraphicEl(c.dataIndex,null),d&&d.isInView){var f=d.width,p=d.height,g=d.borderWidth,m=d.invisible,v=c.getRawIndex(),y=t&&t.getRawIndex(),a=c.viewChildren,x=d.upperHeight,_=a&&a.length,w=c.getModel("itemStyle"),b=c.getModel("emphasis.itemStyle"),S=L("nodeGroup",Qx);if(S){if(i.add(S),S.attr("position",[d.x||0,d.y||0]),S.__tmNodeWidth=f,S.__tmNodeHeight=p,d.isAboveViewRoot)return S;var M=c.getModel(),I=L("background",t_,n,1);if(I&&function(t,e,i){if(e.dataIndex=c.dataIndex,e.seriesIndex=h.seriesIndex,e.setShape({x:0,y:0,width:f,height:p}),m)A(e);else{e.invisible=!1;var n=c.getVisual("borderColor",!0),o=b.get("borderColor"),a=$x(w);a.fill=n;var r=s_(b);if(r.fill=o,i){var s=f-2*g;D(a,r,n,s,x,{x:g,y:0,width:s,height:x})}else a.text=r.text=null;e.setStyle(a),Us(e,r)}t.add(e)}(S,I,_&&d.upperLabelHeight),_)Qs(S)&&Js(S,!1),I&&(Js(I,!0),o.setItemGraphicEl(c.dataIndex,I));else{var T=L("content",t_,n,2);T&&function(t,e){e.dataIndex=c.dataIndex,e.seriesIndex=h.seriesIndex;var i=Math.max(f-2*g,0),n=Math.max(p-2*g,0);if(e.culling=!0,e.setShape({x:g,y:g,width:i,height:n}),m)A(e);else{e.invisible=!1;var o=c.getVisual("color",!0),a=$x(w);a.fill=o;var r=s_(b);D(a,r,o,i,n),e.setStyle(a),Us(e,r)}t.add(e)}(S,T),I&&Qs(I)&&Js(I,!1),Js(S,!0),o.setItemGraphicEl(c.dataIndex,S)}return S}}}function A(t){t.invisible||e.push(t)}function D(t,e,i,n,o,a){var r=M.get("name"),s=M.getModel(a?o_:i_),l=M.getModel(a?a_:n_),u=s.getShallow("show");el(t,e,s,l,{defaultText:u?r:null,autoColor:i,isRectText:!0,labelFetcher:h,labelDataIndex:c.dataIndex,labelProp:a?"upperLabel":"label"}),C(t,a,d),C(e,a,d),a&&(t.textRect=k(a)),t.truncate=u&&s.get("ellipsis")?{outerWidth:n,outerHeight:o,minChar:2}:null}function C(t,e,i){var n=t.text;if(!e&&i.isLeafRoot&&null!=n){var o=h.get("drillDownIcon",!0);t.text=o?o+" "+n:n}}function L(t,e,i,n){var o=null!=y&&s[t][y],a=u[t];return o?(s[t][y]=null,function(t,e,i){(t[v]={}).old="nodeGroup"===i?e.position.slice():P({},e.shape)}(a,o,t)):m||((o=new e({z:function(t,e){var i=t*r_+e;return(i-1)/i}(i,n)})).__tmDepth=i,function(t,e,i){var n=t[v]={},o=c.parentNode;if(o&&(!l||"drillDown"===l.direction)){var a=0,r=0,s=u.background[o.getRawIndex()];!l&&s&&s.old&&(a=s.old.width,r=s.old.height),n.old="nodeGroup"===i?[0,r]:{x:a,y:r,width:0,height:0}}n.fadein="nodeGroup"!==i}(a,0,o.__tmStorageName=t)),r[t][v]=o}}Cf({type:"treemap",init:function(t,e){this._containerGroup,this._storage={nodeGroup:[],background:[],content:[]},this._oldTree,this._breadcrumb,this._controller,this._state="ready"},render:function(t,e,i,n){if(!(_(e.findComponents({mainType:"series",subType:"treemap",query:n}),t)<0)){this.seriesModel=t,this.api=i,this.ecModel=e;var o=Zx(n,["treemapZoomToNode","treemapRootToNode"],t),a=n&&n.type,r=t.layoutInfo,s=!this._oldTree,l=this._storage,u="treemapRootToNode"===a&&o&&l?{rootNodeGroup:l.nodeGroup[o.node.getRawIndex()],direction:n.direction}:null,h=this._giveContainerGroup(r),c=this._doRender(h,t,u);s||a&&"treemapZoomToNode"!==a&&"treemapRootToNode"!==a?c.renderFinally():this._doAnimation(h,c,t,u),this._resetController(i),this._renderBreadcrumb(t,i,o)}},_giveContainerGroup:function(t){var e=this._containerGroup;return e||(e=this._containerGroup=new Qx,this._initEvents(e),this.group.add(e)),e.attr("position",[t.x,t.y]),e},_doRender:function(t,e,i){var n=e.getData().tree,o=this._oldTree,a={nodeGroup:[],background:[],content:[]},r={nodeGroup:[],background:[],content:[]},s=this._storage,l=[],c=T(l_,e,r,s,i,a,l);!function a(r,s,l,u,h){u?e_(s=r,function(t,e){t.isRemoved()||i(e,e)}):new kf(s,r,t,t).add(i).update(i).remove(T(i,null)).execute();function t(t){return t.getId()}function i(t,e){var i=null!=t?r[t]:null,n=null!=e?s[e]:null,o=c(i,n,l,h);o&&a(i&&i.viewChildren||[],n&&n.viewChildren||[],o,u,h+1)}}(n.root?[n.root]:[],o&&o.root?[o.root]:[],t,n===o||!o,0);var u,h,d=(h={nodeGroup:[],background:[],content:[]},(u=s)&&e_(u,function(t,e){var i=h[e];e_(t,function(t){t&&(i.push(t),t.__tmWillDelete=1)})}),h);return this._oldTree=n,this._storage=r,{lastsForAnimation:a,willDeleteEls:d,renderFinally:function(){e_(d,function(t){e_(t,function(t){t.parent&&t.parent.remove(t)})}),e_(l,function(t){t.invisible=!0,t.dirty()})}}},_doAnimation:function(t,a,e,s){if(e.get("animation")){var l=e.get("animationDurationUpdate"),u=e.get("animationEasing"),h=function(){var a,r=[],s={};return{add:function(t,e,i,n,o){return R(n)&&(o=n,n=0),!s[t.id]&&(s[t.id]=1,r.push({el:t,target:e,time:i,delay:n,easing:o}),!0)},done:function(t){return a=t,this},start:function(){for(var t=r.length,e=0,i=r.length;e<i;e++){var n=r[e];n.el.animateTo(n.target,n.time,n.delay,n.easing,o)}return this;function o(){--t||(r.length=0,s={},a&&a())}}}}();e_(a.willDeleteEls,function(t,r){e_(t,function(t,e){if(!t.invisible){var i,n=t.parent;if(s&&"drillDown"===s.direction)i=n===s.rootNodeGroup?{shape:{x:0,y:0,width:n.__tmNodeWidth,height:n.__tmNodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var o=0,a=0;n.__tmWillDelete||(o=n.__tmNodeWidth/2,a=n.__tmNodeHeight/2),i="nodeGroup"===r?{position:[o,a],style:{opacity:0}}:{shape:{x:o,y:a,width:0,height:0},style:{opacity:0}}}i&&h.add(t,i,l,u)}})}),e_(this._storage,function(t,o){e_(t,function(t,e){var i=a.lastsForAnimation[o][e],n={};i&&("nodeGroup"===o?i.old&&(n.position=t.position.slice(),t.attr("position",i.old)):(i.old&&(n.shape=P({},t.shape),t.setShape(i.old)),i.fadein?(t.setStyle("opacity",0),n.style={opacity:1}):1!==t.style.opacity&&(n.style={opacity:1})),h.add(t,n,l,u))})},this),this._state="animating",h.done(Jx(function(){this._state="ready",a.renderFinally()},this)).start()}},_resetController:function(t){var e=this._controller;e||((e=this._controller=new Vy(t.getZr())).enable(this.seriesModel.get("roam")),e.on("pan",Jx(this._onPan,this)),e.on("zoom",Jx(this._onZoom,this)));var n=new Di(0,0,t.getWidth(),t.getHeight());e.setPointerChecker(function(t,e,i){return n.contain(e,i)})},_clearController:function(){var t=this._controller;t&&(t.dispose(),t=null)},_onPan:function(t){if("animating"!==this._state&&(3<Math.abs(t.dx)||3<Math.abs(t.dy))){var e=this.seriesModel.getData().tree.root;if(!e)return;var i=e.getLayout();if(!i)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:i.x+t.dx,y:i.y+t.dy,width:i.width,height:i.height}})}},_onZoom:function(t){var e=t.originX,i=t.originY;if("animating"!==this._state){var n=this.seriesModel.getData().tree.root;if(!n)return;var o=n.getLayout();if(!o)return;var a=new Di(o.x,o.y,o.width,o.height),r=this.seriesModel.layoutInfo;e-=r.x,i-=r.y;var s=ae();ue(s,s,[-e,-i]),ce(s,s,[t.scale,t.scale]),ue(s,s,[e,i]),a.applyTransform(s),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:a.x,y:a.y,width:a.width,height:a.height}})}},_initEvents:function(t){t.on("click",function(t){if("ready"===this._state){var e=this.seriesModel.get("nodeClick",!0);if(e){var i=this.findTarget(t.offsetX,t.offsetY);if(i){var n=i.node;if(n.getLayout().isLeafRoot)this._rootToNode(i);else if("zoomToNode"===e)this._zoomToNode(i);else if("link"===e){var o=n.hostTree.data.getItemModel(n.dataIndex),a=o.get("link",!0),r=o.get("target",!0)||"blank";a&&gu(a,r)}}}}},this)},_renderBreadcrumb:function(e,t,i){i=i||((i=null!=e.get("leafDepth",!0)?{node:e.getViewRoot()}:this.findTarget(t.getWidth()/2,t.getHeight()/2))||{node:e.getData().tree.root}),(this._breadcrumb||(this._breadcrumb=new qx(this.group))).render(e,t,i.node,Jx(function(t){"animating"!==this._state&&(Xx(e.getViewRoot(),t)?this._rootToNode({node:t}):this._zoomToNode({node:t}))},this))},remove:function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage={nodeGroup:[],background:[],content:[]},this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},dispose:function(){this._clearController()},_zoomToNode:function(t){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},_rootToNode:function(t){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},findTarget:function(o,a){var r;return this.seriesModel.getViewRoot().eachNode({attr:"viewChildren",order:"preorder"},function(t){var e=this._storage.background[t.getRawIndex()];if(e){var i=e.transformCoordToLocal(o,a),n=e.shape;if(!(n.x<=i[0]&&i[0]<=n.x+n.width&&n.y<=i[1]&&i[1]<=n.y+n.height))return!1;r={node:t,offsetX:i[0],offsetY:i[1]}}},this),r}});for(var u_=function(){},h_=["treemapZoomToNode","treemapRender","treemapMove"],c_=0;c_<h_.length;c_++)_f({type:h_[c_],update:"updateView"},u_);_f({type:"treemapRootToNode",update:"updateView"},function(o,t){t.eachComponent({mainType:"series",subType:"treemap",query:o},function(t,e){var i=Zx(o,["treemapZoomToNode","treemapRootToNode"],t);if(i){var n=t.getViewRoot();n&&(o.direction=Xx(n,i.node)?"rollUp":"drillDown"),t.resetViewRoot(i.node)}})});var d_=E,f_=z,p_=-1,g_=function(t){var e=t.mappingMethod,i=t.type,n=this.option=k(t);this.type=i,this.mappingMethod=e,this._normalizeData=T_[e];var o=m_[i];this.applyVisual=o.applyVisual,this.getColorMapper=o.getColorMapper,this._doMap=o._doMap[e],"piecewise"===e?(v_(n),function(i){var t=i.pieceList;i.hasSpecialVisual=!1,E(t,function(t,e){t.originIndex=e,null!=t.visual&&(i.hasSpecialVisual=!0)})}(n)):"category"===e?n.categories?function(t){var e=t.categories,i=t.visual,n=t.categoryMap={};if(d_(e,function(t,e){n[t]=e}),!L(i)){var o=[];z(i)?d_(i,function(t,e){var i=n[e];o[null!=i?i:p_]=t}):o[p_]=i,i=I_(t,o)}for(var a=e.length-1;0<=a;a--)null==i[a]&&(delete n[e[a]],e.pop())}(n):v_(n,!0):(Y("linear"!==e||n.dataExtent),v_(n))};g_.prototype={constructor:g_,mapValueToVisual:function(t){var e=this._normalizeData(t);return this._doMap(e,t)},getNormalizer:function(){return A(this._normalizeData,this)}};var m_=g_.visualHandlers={color:{applyVisual:__("color"),getColorMapper:function(){var o=this.option;return A("category"===o.mappingMethod?function(t,e){return e||(t=this._normalizeData(t)),w_.call(this,t)}:function(t,e,i){var n=!!i;return e||(t=this._normalizeData(t)),i=Ue(t,o.parsedVisual,i),n?i:$e(i,"rgba")},this)},_doMap:{linear:function(t){return $e(Ue(t,this.option.parsedVisual),"rgba")},category:w_,piecewise:function(t,e){var i=M_.call(this,e);return null==i&&(i=$e(Ue(t,this.option.parsedVisual),"rgba")),i},fixed:b_}},colorHue:y_(function(t,e){return qe(t,e)}),colorSaturation:y_(function(t,e){return qe(t,null,e)}),colorLightness:y_(function(t,e){return qe(t,null,null,e)}),colorAlpha:y_(function(t,e){return Ke(t,e)}),opacity:{applyVisual:__("opacity"),_doMap:S_([0,1])},liftZ:{applyVisual:__("liftZ"),_doMap:{linear:b_,category:b_,piecewise:b_,fixed:b_}},symbol:{applyVisual:function(t,e,i){var n=this.mapValueToVisual(t);if(R(n))i("symbol",n);else if(f_(n))for(var o in n)n.hasOwnProperty(o)&&i(o,n[o])},_doMap:{linear:x_,category:w_,piecewise:function(t,e){var i=M_.call(this,e);return null==i&&(i=x_.call(this,t)),i},fixed:b_}},symbolSize:{applyVisual:__("symbolSize"),_doMap:S_([0,1])}};function v_(t,e){var i=t.visual,n=[];z(i)?d_(i,function(t){n.push(t)}):null!=i&&n.push(i);e||1!==n.length||{color:1,symbol:1}.hasOwnProperty(t.type)||(n[1]=n[0]),I_(t,n)}function y_(n){return{applyVisual:function(t,e,i){t=this.mapValueToVisual(t),i("color",n(e("color"),t))},_doMap:S_([0,1])}}function x_(t){var e=this.option.visual;return e[Math.round(El(t,[0,1],[0,e.length-1],!0))]||{}}function __(n){return function(t,e,i){i(n,this.mapValueToVisual(t))}}function w_(t){var e=this.option.visual;return e[this.option.loop&&t!==p_?t%e.length:t]}function b_(){return this.option.visual[0]}function S_(n){return{linear:function(t){return El(t,n,this.option.visual,!0)},category:w_,piecewise:function(t,e){var i=M_.call(this,e);return null==i&&(i=El(t,n,this.option.visual,!0)),i},fixed:b_}}function M_(t){var e=this.option,i=e.pieceList;if(e.hasSpecialVisual){var n=i[g_.findPieceIndex(t,i)];if(n&&n.visual)return n.visual[this.type]}}function I_(t,e){return t.visual=e,"color"===t.type&&(t.parsedVisual=O(e,function(t){return Fe(t)})),e}var T_={linear:function(t){return El(t,this.option.dataExtent,[0,1],!0)},piecewise:function(t){var e=this.option.pieceList,i=g_.findPieceIndex(t,e,!0);if(null!=i)return El(i,[0,e.length-1],[0,1],!0)},category:function(t){var e=this.option.categories?this.option.categoryMap[t]:t;return null==e?p_:e},fixed:et};function A_(t,e,i){return t?e<=i:e<i}g_.listVisualTypes=function(){var i=[];return E(m_,function(t,e){i.push(e)}),i},g_.addVisualHandler=function(t,e){m_[t]=e},g_.isValidType=function(t){return m_.hasOwnProperty(t)},g_.eachVisual=function(t,e,i){z(t)?E(t,e,i):e.call(i,t)},g_.mapVisual=function(t,n,o){var a,r=L(t)?[]:z(t)?{}:(a=!0,null);return g_.eachVisual(t,function(t,e){var i=n.call(o,t,e);a?r=i:r[e]=i}),r},g_.retrieveVisuals=function(i){var n,o={};return i&&d_(m_,function(t,e){i.hasOwnProperty(e)&&(o[e]=i[e],n=!0)}),n?o:null},g_.prepareVisualTypes=function(t){if(f_(t)){var i=[];d_(t,function(t,e){i.push(e)}),t=i}else{if(!L(t))return[];t=t.slice()}return t.sort(function(t,e){return"color"===e&&"color"!==t&&0===t.indexOf("color")?1:-1}),t},g_.dependsOn=function(t,e){return"color"===e?!(!t||0!==t.indexOf(e)):t===e},g_.findPieceIndex=function(n,t,e){for(var o,a=1/0,i=0,r=t.length;i<r;i++){var s=t[i].value;if(null!=s){if(s===n||"string"==typeof s&&s===n+"")return i;e&&c(s,i)}}for(i=0,r=t.length;i<r;i++){var l=t[i],u=l.interval,h=l.close;if(u){if(u[0]===-1/0){if(A_(h[1],n,u[1]))return i}else if(u[1]===1/0){if(A_(h[0],u[0],n))return i}else if(A_(h[0],u[0],n)&&A_(h[1],n,u[1]))return i;e&&c(u[0],i),e&&c(u[1],i)}}if(e)return n===1/0?t.length-1:n===-1/0?0:o;function c(t,e){var i=Math.abs(t-n);i<a&&(a=i,o=e)}};var D_=L,C_="itemStyle",L_={seriesType:"treemap",reset:function(t,e,i,n){var o=t.getData().tree,a=o.root,r=t.getModel(C_);a.isRemoved()||!function n(t,e,o,a,r,s){var l=t.getModel();var i=t.getLayout();if(!i||i.invisible||!i.isInView)return;var u=t.getModel(C_);var h=o[t.depth];var c=k_(u,e,h,a);var d=u.get("borderColor");var f=u.get("borderColorSaturation");var p;null!=f&&(p=P_(c),g=f,d=null!=(m=p)?qe(m,null,null,g):null);var g,m;t.setVisual("borderColor",d);var v=t.viewChildren;if(v&&v.length){var y=O_(t,l,i,u,c,v);E(v,function(t,e){if(t.depth>=r.length||t===r[t.depth]){var i=R_(l,c,t,e,y,s);n(t,i,o,a,r,s)}})}else p=P_(c),t.setVisual("color",p)}(a,{},O(o.levelModels,function(t){return t?t.get(C_):null}),r,t.getViewRoot().getAncestors(),t)}};function k_(i,n,o,a){var r=P({},n);return E(["color","colorAlpha","colorSaturation"],function(t){var e=i.get(t,!0);null==e&&o&&(e=o[t]),null==e&&(e=n[t]),null==e&&(e=a.get(t)),null!=e&&(r[t]=e)}),r}function P_(t){var e=N_(t,"color");if(e){var i=N_(t,"colorAlpha"),n=N_(t,"colorSaturation");return n&&(e=qe(e,null,null,n)),i&&(e=Ke(e,i)),e}}function N_(t,e){var i=t[e];if(null!=i&&"none"!==i)return i}function O_(t,e,i,n,o,a){if(a&&a.length){var r=E_(e,"color")||null!=o.color&&"none"!==o.color&&(E_(e,"colorAlpha")||E_(e,"colorSaturation"));if(r){var s=e.get("visualMin"),l=e.get("visualMax"),u=i.dataExtent.slice();null!=s&&s<u[0]&&(u[0]=s),null!=l&&l>u[1]&&(u[1]=l);var h=e.get("colorMappingBy"),c={type:r.name,dataExtent:u,visual:r.range};"color"!==c.type||"index"!==h&&"id"!==h?c.mappingMethod="linear":(c.mappingMethod="category",c.loop=!0);var d=new g_(c);return d.__drColorMappingBy=h,d}}}function E_(t,e){var i=t.get(e);return D_(i)&&i.length?{name:e,range:i}:null}function R_(t,e,i,n,o,a){var r=P({},e);if(o){var s=o.type,l="color"===s&&o.__drColorMappingBy,u="index"===l?n:"id"===l?a.mapIdToIndex(i.getId()):i.getValue(t.get("visualDimension"));r[s]=o.mapValueToVisual(u)}return r}var z_=Math.max,B_=Math.min,V_=W,G_=E,F_=["itemStyle","borderWidth"],W_=["itemStyle","gapWidth"],H_=["upperLabel","show"],Z_=["upperLabel","height"],U_={seriesType:"treemap",reset:function(t,e,i,n){var o=i.getWidth(),a=i.getHeight(),r=t.option,s=bu(t.getBoxLayoutParams(),{width:i.getWidth(),height:i.getHeight()}),l=r.size||[],u=Rl(V_(s.width,l[0]),o),h=Rl(V_(s.height,l[1]),a),c=n&&n.type,d=Zx(n,["treemapZoomToNode","treemapRootToNode"],t),f="treemapRender"===c||"treemapMove"===c?n.rootRect:null,p=t.getViewRoot(),g=Ux(p);if("treemapMove"!==c){var m="treemapZoomToNode"===c?function(t,e,i,n,o){var a,r=(e||{}).node,s=[n,o];if(!r||r===i)return s;var l=n*o,u=l*t.option.zoomToNodeRatio;for(;a=r.parentNode;){for(var h=0,c=a.children,d=0,f=c.length;d<f;d++)h+=c[d].getValue();var p=r.getValue();if(0===p)return s;u*=h/p;var g=a.getModel(),m=g.get(F_),v=Math.max(m,q_(g));u+=4*m*m+(3*m+v)*Math.pow(u,.5),Hl<u&&(u=Hl),r=a}u<l&&(u=l);var y=Math.pow(u/l,.5);return[n*y,o*y]}(t,d,p,u,h):f?[f.width,f.height]:[u,h],v=r.sort;v&&"asc"!==v&&"desc"!==v&&(v="desc");var y={squareRatio:r.squareRatio,sort:v,leafDepth:r.leafDepth};p.hostTree.clearLayouts();var x={x:0,y:0,width:m[0],height:m[1],area:m[0]*m[1]};p.setLayout(x),function t(e,i,n,o){var a;var r;if(e.isRemoved())return;var s=e.getLayout();a=s.width;r=s.height;var l=e.getModel();var u=l.get(F_);var h=l.get(W_)/2;var c=q_(l);var d=Math.max(u,c);var f=u-h;var p=d-h;var l=e.getModel();e.setLayout({borderWidth:u,upperHeight:d,upperLabelHeight:c},!0);a=z_(a-2*f,0);r=z_(r-f-p,0);var g=a*r;var m=X_(e,l,g,i,n,o);if(!m.length)return;var v={x:f,y:p,width:a,height:r};var y=B_(a,r);var x=1/0;var _=[];_.area=0;for(var w=0,b=m.length;w<b;){var S=m[w];_.push(S),_.area+=S.getLayout().area;var M=Y_(_,y,i.squareRatio);x=M<=x?(w++,M):(_.area-=_.pop().getLayout().area,j_(_,y,v,h,!1),y=B_(v.width,v.height),_.length=_.area=0,1/0)}_.length&&j_(_,y,v,h,!0);if(!n){var I=l.get("childrenVisibleMin");null!=I&&g<I&&(n=!0)}for(var w=0,b=m.length;w<b;w++)t(m[w],i,n,o+1)}(p,y,!1,0);x=p.getLayout();G_(g,function(t,e){var i=(g[e+1]||p).getValue();t.setLayout(P({dataExtent:[i,i],borderWidth:0,upperHeight:0},x))})}var _=t.getData().tree.root;_.setLayout(function(t,e,i){if(e)return{x:e.x,y:e.y};var n={x:0,y:0};if(!i)return n;var o=i.node,a=o.getLayout();if(!a)return n;var r=[a.width/2,a.height/2],s=o;for(;s;){var l=s.getLayout();r[0]+=l.x,r[1]+=l.y,s=s.parentNode}return{x:t.width/2-r[0],y:t.height/2-r[1]}}(s,f,d),!0),t.setLayoutInfo(s),function e(t,i,n,o,a){var r=t.getLayout();var s=n[a];var l=s&&s===t;if(s&&!l||a===n.length&&t!==o)return;t.setLayout({isInView:!0,invisible:!l&&!i.intersect(r),isAboveViewRoot:l},!0);var u=new Di(i.x-r.x,i.y-r.y,i.width,i.height);G_(t.viewChildren||[],function(t){e(t,u,n,o,a+1)})}(_,new Di(-s.x,-s.y,o,a),g,p,0)}};function X_(t,e,i,n,o,a){var r=t.children||[],s=n.sort;"asc"!==s&&"desc"!==s&&(s=null);var l=null!=n.leafDepth&&n.leafDepth<=a;if(o&&!l)return t.viewChildren=[];!function(t,n){n&&t.sort(function(t,e){var i="asc"===n?t.getValue()-e.getValue():e.getValue()-t.getValue();return 0==i?"asc"===n?t.dataIndex-e.dataIndex:e.dataIndex-t.dataIndex:i})}(r=M(r,function(t){return!t.isRemoved()}),s);var u=function(t,e,i){for(var n=0,o=0,a=e.length;o<a;o++)n+=e[o].getValue();var r=t.get("visualDimension");if(e&&e.length)if("value"===r&&i)s=[e[e.length-1].getValue(),e[0].getValue()],"asc"===i&&s.reverse();else{var s=[1/0,-1/0];G_(e,function(t){var e=t.getValue(r);e<s[0]&&(s[0]=e),e>s[1]&&(s[1]=e)})}else s=[NaN,NaN];return{sum:n,dataExtent:s}}(e,r,s);if(0===u.sum)return t.viewChildren=[];if(u.sum=function(t,e,i,n,o){if(!n)return i;for(var a=t.get("visibleMin"),r=o.length,s=r,l=r-1;0<=l;l--){var u=o["asc"===n?r-l-1:l].getValue();u/i*e<a&&(s=l,i-=u)}return"asc"===n?o.splice(0,r-s):o.splice(s,r-s),i}(e,i,u.sum,s,r),0===u.sum)return t.viewChildren=[];for(var h=0,c=r.length;h<c;h++){var d=r[h].getValue()/u.sum*i;r[h].setLayout({area:d})}return l&&(r.length&&t.setLayout({isLeafRoot:!0},!0),r.length=0),t.viewChildren=r,t.setLayout({dataExtent:u.dataExtent},!0),r}function Y_(t,e,i){for(var n,o=0,a=1/0,r=0,s=t.length;r<s;r++)(n=t[r].getLayout().area)&&(n<a&&(a=n),o<n&&(o=n));var l=t.area*t.area,u=e*e*i;return l?z_(u*o/l,l/(u*a)):1/0}function j_(t,e,i,n,o){var a=e===i.width?0:1,r=1-a,s=["x","y"],l=["width","height"],u=i[s[a]],h=e?t.area/e:0;(o||h>i[l[r]])&&(h=i[l[r]]);for(var c=0,d=t.length;c<d;c++){var f=t[c],p={},g=h?f.getLayout().area/h:0,m=p[l[r]]=z_(h-2*n,0),v=i[s[a]]+i[l[a]]-u,y=c===d-1||v<g?v:g,x=p[l[a]]=z_(y-2*n,0);p[s[r]]=i[s[r]]+B_(n,m/2),p[s[a]]=u+B_(n,x/2),u+=y,f.setLayout(p,!0)}i[s[r]]+=h,i[l[r]]-=h}function q_(t){return t.get(H_)?t.get(Z_):0}function K_(t){return"_EC_"+t}Sf(L_),bf(U_);function $_(t){this._directed=t||!1,this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this.data,this.edgeData}var J_=$_.prototype;function Q_(t,e){this.id=null==t?"":t,this.inEdges=[],this.outEdges=[],this.edges=[],this.hostGraph,this.dataIndex=null==e?-1:e}function tw(t,e,i){this.node1=t,this.node2=e,this.dataIndex=null==i?-1:i}J_.type="graph",J_.isDirected=function(){return this._directed},J_.addNode=function(t,e){t=null==t?""+e:""+t;var i=this._nodesMap;if(!i[K_(t)]){var n=new Q_(t,e);return(n.hostGraph=this).nodes.push(n),i[K_(t)]=n}},J_.getNodeByIndex=function(t){var e=this.data.getRawIndex(t);return this.nodes[e]},J_.getNodeById=function(t){return this._nodesMap[K_(t)]},J_.addEdge=function(t,e,i){var n=this._nodesMap,o=this._edgesMap;if("number"==typeof t&&(t=this.nodes[t]),"number"==typeof e&&(e=this.nodes[e]),Q_.isInstance(t)||(t=n[K_(t)]),Q_.isInstance(e)||(e=n[K_(e)]),t&&e){var a=t.id+"-"+e.id;if(!o[a]){var r=new tw(t,e,i);return(r.hostGraph=this)._directed&&(t.outEdges.push(r),e.inEdges.push(r)),t.edges.push(r),t!==e&&e.edges.push(r),this.edges.push(r),o[a]=r}}},J_.getEdgeByIndex=function(t){var e=this.edgeData.getRawIndex(t);return this.edges[e]},J_.getEdge=function(t,e){Q_.isInstance(t)&&(t=t.id),Q_.isInstance(e)&&(e=e.id);var i=this._edgesMap;return this._directed?i[t+"-"+e]:i[t+"-"+e]||i[e+"-"+t]},J_.eachNode=function(t,e){for(var i=this.nodes,n=i.length,o=0;o<n;o++)0<=i[o].dataIndex&&t.call(e,i[o],o)},J_.eachEdge=function(t,e){for(var i=this.edges,n=i.length,o=0;o<n;o++)0<=i[o].dataIndex&&0<=i[o].node1.dataIndex&&0<=i[o].node2.dataIndex&&t.call(e,i[o],o)},J_.breadthFirstTraverse=function(t,e,i,n){if(Q_.isInstance(e)||(e=this._nodesMap[K_(e)]),e){for(var o="out"===i?"outEdges":"in"===i?"inEdges":"edges",a=0;a<this.nodes.length;a++)this.nodes[a].__visited=!1;if(!t.call(n,e,null))for(var r=[e];r.length;){var s=r.shift(),l=s[o];for(a=0;a<l.length;a++){var u=l[a],h=u.node1===s?u.node2:u.node1;if(!h.__visited){if(t.call(n,h,s))return;r.push(h),h.__visited=!0}}}}},J_.update=function(){for(var t=this.data,i=this.edgeData,e=this.nodes,n=this.edges,o=0,a=e.length;o<a;o++)e[o].dataIndex=-1;for(o=0,a=t.count();o<a;o++)e[t.getRawIndex(o)].dataIndex=o;i.filterSelf(function(t){var e=n[i.getRawIndex(t)];return 0<=e.node1.dataIndex&&0<=e.node2.dataIndex});for(o=0,a=n.length;o<a;o++)n[o].dataIndex=-1;for(o=0,a=i.count();o<a;o++)n[i.getRawIndex(o)].dataIndex=o},J_.clone=function(){for(var t=new $_(this._directed),e=this.nodes,i=this.edges,n=0;n<e.length;n++)t.addNode(e[n].id,e[n].dataIndex);for(n=0;n<i.length;n++){var o=i[n];t.addEdge(o.node1.id,o.node2.id,o.dataIndex)}return t},Q_.prototype={constructor:Q_,degree:function(){return this.edges.length},inDegree:function(){return this.inEdges.length},outDegree:function(){return this.outEdges.length},getModel:function(t){if(!(this.dataIndex<0))return this.hostGraph.data.getItemModel(this.dataIndex).getModel(t)}},tw.prototype.getModel=function(t){if(!(this.dataIndex<0))return this.hostGraph.edgeData.getItemModel(this.dataIndex).getModel(t)};function ew(i,n){return{getValue:function(t){var e=this[i][n];return e.get(e.getDimension(t||"value"),this.dataIndex)},setVisual:function(t,e){0<=this.dataIndex&&this[i][n].setItemVisual(this.dataIndex,t,e)},getVisual:function(t,e){return this[i][n].getItemVisual(this.dataIndex,t,e)},setLayout:function(t,e){0<=this.dataIndex&&this[i][n].setItemLayout(this.dataIndex,t,e)},getLayout:function(){return this[i][n].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[i][n].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[i][n].getRawIndex(this.dataIndex)}}}b(Q_,ew("hostGraph","data")),b(tw,ew("hostGraph","edgeData")),$_.Node=Q_,$_.Edge=tw,ra(Q_),ra(tw);function iw(t,e,i,n,o){for(var a=new $_(n),r=0;r<t.length;r++)a.addNode(W(t[r].id,t[r].name,r),r);var s=[],l=[],u=0;for(r=0;r<e.length;r++){var h=e[r],c=h.source,d=h.target;a.addEdge(c,d,u)&&(l.push(h),s.push(W(h.id,c+" > "+d)),u++)}var f,p=i.get("coordinateSystem");if("cartesian2d"===p||"polar"===p)f=gp(t,i);else{var g=lh.get(p),m=g&&"view"!==g.type&&g.dimensions||[];_(m,"value")<0&&m.concat(["value"]);var v=lp(t,{coordDimensions:m});(f=new Yf(v,i)).initData(t)}var y=new Yf(["value"],i);return y.initData(l,s),o&&o(f,y),yx({mainData:f,struct:a,structAttr:"graph",datas:{node:f,edge:y},datasAttr:{node:"data",edge:"edgeData"}}),a.update(),a}var nw=Df({type:"series.graph",init:function(t){nw.superApply(this,"init",arguments);var e=this;function i(){return e._categoriesData}this.legendVisualProvider=new qv(i,i),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},mergeOption:function(t){nw.superApply(this,"mergeOption",arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},mergeDefaultAndTheme:function(t){nw.superApply(this,"mergeDefaultAndTheme",arguments),Go(t,["edgeLabel"],["show"])},getInitialData:function(t,s){var e=t.edges||t.links||[],i=t.data||t.nodes||[],l=this;if(i&&e)return iw(i,e,this,!0,function(t,e){t.wrapMethod("getItemModel",function(t){var e=l._categoriesModels[t.getShallow("category")];return e&&(e.parentModel=t.parentModel,t.parentModel=e),t});var i=l.getModel("edgeLabel"),n=new Cl({label:i.option},i.parentModel,s),o=l.getModel("emphasis.edgeLabel"),a=new Cl({emphasis:{label:o.option}},o.parentModel,s);function r(t){return(t=this.parsePath(t))&&"label"===t[0]?n:t&&"emphasis"===t[0]&&"label"===t[1]?a:this.parentModel}e.wrapMethod("getItemModel",function(t){return t.customizeGetParent(r),t})}).data},getGraph:function(){return this.getData().graph},getEdgeData:function(){return this.getGraph().edgeData},getCategoriesData:function(){return this._categoriesData},formatTooltip:function(t,e,i){if("edge"!==i)return nw.superApply(this,"formatTooltip",arguments);var n=this.getData(),o=this.getDataParams(t,i),a=n.graph.getEdgeByIndex(t),r=n.getName(a.node1.dataIndex),s=n.getName(a.node2.dataIndex),l=[];return null!=r&&l.push(r),null!=s&&l.push(s),l=au(l.join(" > ")),o.value&&(l+=" : "+au(o.value)),l},_updateCategoriesData:function(){var t=O(this.option.categories||[],function(t){return null!=t.value?t:P({value:0},t)}),e=new Yf(["value"],this);e.initData(t),this._categoriesData=e,this._categoriesModels=e.mapArray(function(t){return e.getItemModel(t,!0)})},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},isAnimationEnabled:function(){return nw.superCall(this,"isAnimationEnabled")&&!("force"===this.get("layout")&&this.get("force.layoutAnimation"))},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",legendHoverLink:!0,hoverAnimation:!0,layout:null,focusNodeAdjacency:!1,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,curveness:0,opacity:.5},emphasis:{label:{show:!0}}}}),ow=ls.prototype,aw=ds.prototype;function rw(t){return isNaN(+t.cpx1)||isNaN(+t.cpy1)}var sw=Cs({type:"ec-line",style:{stroke:"#000",fill:null},shape:{x1:0,y1:0,x2:0,y2:0,percent:1,cpx1:null,cpy1:null},buildPath:function(t,e){this[rw(e)?"_buildPathLine":"_buildPathCurve"](t,e)},_buildPathLine:ow.buildPath,_buildPathCurve:aw.buildPath,pointAt:function(t){return this[rw(this.shape)?"_pointAtLine":"_pointAtCurve"](t)},_pointAtLine:ow.pointAt,_pointAtCurve:aw.pointAt,tangentAt:function(t){var e=this.shape,i=rw(e)?[e.x2-e.x1,e.y2-e.y1]:this._tangentAtCurve(t);return mt(i,i)},_tangentAtCurve:aw.tangentAt}),lw=["fromSymbol","toSymbol"];function uw(t){return"_"+t+"Type"}function hw(t,e,i){var n=e.getItemVisual(i,"color"),o=e.getItemVisual(i,t),a=e.getItemVisual(i,t+"Size");if(o&&"none"!==o){L(a)||(a=[a,a]);var r=wg(o,-a[0]/2,-a[1]/2,a[0],a[1],n);return r.name=t,r}}function cw(t,e){t.x1=e[0][0],t.y1=e[0][1],t.x2=e[1][0],t.y2=e[1][1],t.percent=1;var i=e[2];i?(t.cpx1=i[0],t.cpy1=i[1]):(t.cpx1=NaN,t.cpy1=NaN)}function dw(t,e,i){Ci.call(this),this._createLine(t,e,i)}var fw=dw.prototype;function pw(t){this._ctor=t||dw,this.group=new Ci}fw.beforeUpdate=function(){var t=this.childOfName("fromSymbol"),e=this.childOfName("toSymbol"),i=this.childOfName("label");if(t||e||!i.ignore){for(var n=1,o=this.parent;o;)o.scale&&(n/=o.scale[0]),o=o.parent;var a=this.childOfName("line");if(this.__dirty||a.__dirty){var r=a.shape.percent,s=a.pointAt(0),l=a.pointAt(r),u=ht([],l,s);if(mt(u,u),t){t.attr("position",s);var h=a.tangentAt(0);t.attr("rotation",Math.PI/2-Math.atan2(h[1],h[0])),t.attr("scale",[n*r,n*r])}if(e){e.attr("position",l);h=a.tangentAt(1);e.attr("rotation",-Math.PI/2-Math.atan2(h[1],h[0])),e.attr("scale",[n*r,n*r])}if(!i.ignore){var c,d,f,p;i.attr("position",l);var g=i.__labelDistance,m=g[0]*n,v=g[1]*n,y=r/2,x=[(h=a.tangentAt(y))[1],-h[0]],_=a.pointAt(y);0<x[1]&&(x[0]=-x[0],x[1]=-x[1]);var w,b=h[0]<0?-1:1;if("start"!==i.__position&&"end"!==i.__position){var S=-Math.atan2(h[1],h[0]);l[0]<s[0]&&(S=Math.PI+S),i.attr("rotation",S)}switch(i.__position){case"insideStartTop":case"insideMiddleTop":case"insideEndTop":case"middle":w=-v,f="bottom";break;case"insideStartBottom":case"insideMiddleBottom":case"insideEndBottom":w=v,f="top";break;default:w=0,f="middle"}switch(i.__position){case"end":c=[u[0]*m+l[0],u[1]*v+l[1]],d=.8<u[0]?"left":u[0]<-.8?"right":"center",f=.8<u[1]?"top":u[1]<-.8?"bottom":"middle";break;case"start":c=[-u[0]*m+s[0],-u[1]*v+s[1]],d=.8<u[0]?"right":u[0]<-.8?"left":"center",f=.8<u[1]?"bottom":u[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":c=[m*b+s[0],s[1]+w],d=h[0]<0?"right":"left",p=[-m*b,-w];break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":c=[_[0],_[1]+w],d="center",p=[0,-w];break;case"insideEndTop":case"insideEnd":case"insideEndBottom":c=[-m*b+l[0],l[1]+w],d=0<=h[0]?"right":"left",p=[m*b,-w]}i.attr({style:{textVerticalAlign:i.__verticalAlign||f,textAlign:i.__textAlign||d},position:c,scale:[n,n],origin:p})}}}},fw._createLine=function(i,n,t){var e=i.hostModel,o=function(t){var e=new sw({name:"line",subPixelOptimize:!0});return cw(e.shape,t),e}(i.getItemLayout(n));o.shape.percent=0,dl(o,{shape:{percent:1}},e,n),this.add(o);var a=new Ur({name:"label",lineLabelOriginalOpacity:1});this.add(a),E(lw,function(t){var e=hw(t,i,n);this.add(e),this[uw(t)]=i.getItemVisual(n,t)},this),this._updateCommonStl(i,n,t)},fw.updateData=function(o,a,t){var e=o.hostModel,i=this.childOfName("line"),n=o.getItemLayout(a),r={shape:{}};cw(r.shape,n),cl(i,r,e,a),E(lw,function(t){var e=o.getItemVisual(a,t),i=uw(t);if(this[i]!==e){this.remove(this.childOfName(t));var n=hw(t,o,a);this.add(n)}this[i]=e},this),this._updateCommonStl(o,a,t)},fw._updateCommonStl=function(t,e,i){var n=t.hostModel,o=this.childOfName("line"),a=i&&i.lineStyle,r=i&&i.hoverLineStyle,s=i&&i.labelModel,l=i&&i.hoverLabelModel;if(!i||t.hasItemOption){var u=t.getItemModel(e);a=u.getModel("lineStyle").getLineStyle(),r=u.getModel("emphasis.lineStyle").getLineStyle(),s=u.getModel("label"),l=u.getModel("emphasis.label")}var h=t.getItemVisual(e,"color"),c=Z(t.getItemVisual(e,"opacity"),a.opacity,1);o.useStyle(D({strokeNoScale:!0,fill:"none",stroke:h,opacity:c},a)),o.hoverStyle=r,E(lw,function(t){var e=this.childOfName(t);e&&(e.setColor(h),e.setStyle({opacity:c}))},this);var d,f,p=s.getShallow("show"),g=l.getShallow("show"),m=this.childOfName("label");if((p||g)&&(d=h||"#000",null==(f=n.getFormattedLabel(e,"normal",t.dataType)))){var v=n.getRawValue(e);f=null==v?t.getName(e):isFinite(v)?zl(v):v}var y=p?f:null,x=g?H(n.getFormattedLabel(e,"emphasis",t.dataType),f):null,_=m.style;if(null!=y||null!=x){nl(m.style,s,{text:y},{autoColor:d}),m.__textAlign=_.textAlign,m.__verticalAlign=_.textVerticalAlign,m.__position=s.get("position")||"middle";var w=s.get("distance");L(w)||(w=[w,w]),m.__labelDistance=w}m.hoverStyle=null!=x?{text:x,textFill:l.getTextColor(!0),fontStyle:l.getShallow("fontStyle"),fontWeight:l.getShallow("fontWeight"),fontSize:l.getShallow("fontSize"),fontFamily:l.getShallow("fontFamily")}:{text:null},m.ignore=!p&&!g,$s(this)},fw.highlight=function(){this.trigger("emphasis")},fw.downplay=function(){this.trigger("normal")},fw.updateLayout=function(t,e){this.setLinePoints(t.getItemLayout(e))},fw.setLinePoints=function(t){var e=this.childOfName("line");cw(e.shape,t),e.dirty()},w(dw,Ci);var gw=pw.prototype;function mw(t){var e=t.hostModel;return{lineStyle:e.getModel("lineStyle").getLineStyle(),hoverLineStyle:e.getModel("emphasis.lineStyle").getLineStyle(),labelModel:e.getModel("label"),hoverLabelModel:e.getModel("emphasis.label")}}function vw(t){return isNaN(t[0])||isNaN(t[1])}function yw(t){return!vw(t[0])&&!vw(t[1])}function xw(t){var e=t.coordinateSystem;if("view"!==e.type)return 1;var i=t.option.nodeScaleRatio,n=e.scale,o=n&&n[0]||1;return((e.getZoom()-1)*i+1)/o}function _w(t){var e=t.getVisual("symbolSize");return e instanceof Array&&(e=(e[0]+e[1])/2),+e}gw.isPersistent=function(){return!0},gw.updateData=function(i){var n=this,e=n.group,o=n._lineData;n._lineData=i,o||e.removeAll();var a=mw(i);i.diff(o).add(function(t){!function(t,e,i,n){if(!yw(e.getItemLayout(i)))return;var o=new t._ctor(e,i,n);e.setItemGraphicEl(i,o),t.group.add(o)}(n,i,t,a)}).update(function(t,e){!function(t,e,i,n,o,a){var r=e.getItemGraphicEl(n);if(!yw(i.getItemLayout(o)))return t.group.remove(r);r?r.updateData(i,o,a):r=new t._ctor(i,o,a);i.setItemGraphicEl(o,r),t.group.add(r)}(n,o,i,e,t,a)}).remove(function(t){e.remove(o.getItemGraphicEl(t))}).execute()},gw.updateLayout=function(){var i=this._lineData;i&&i.eachItemGraphicEl(function(t,e){t.updateLayout(i,e)},this)},gw.incrementalPrepareUpdate=function(t){this._seriesScope=mw(t),this._lineData=null,this.group.removeAll()},gw.incrementalUpdate=function(t,e){function i(t){t.isGroup||function(t){return t.animators&&0<t.animators.length}(t)||(t.incremental=t.useHoverLayer=!0)}for(var n=t.start;n<t.end;n++){if(yw(e.getItemLayout(n))){var o=new this._ctor(e,n,this._seriesScope);o.traverse(i),this.group.add(o),e.setItemGraphicEl(n,o)}}},gw.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},gw._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()};var ww=[],bw=[],Sw=[],Mw=La,Iw=_t,Tw=Math.abs;function Aw(t,e,i){for(var n,o=t[0],a=t[1],r=t[2],s=1/0,l=i*i,u=.1,h=.1;h<=.9;h+=.1){ww[0]=Mw(o[0],a[0],r[0],h),ww[1]=Mw(o[1],a[1],r[1],h),(f=Tw(Iw(ww,e)-l))<s&&(s=f,n=h)}for(var c=0;c<32;c++){var d=n+u;bw[0]=Mw(o[0],a[0],r[0],n),bw[1]=Mw(o[1],a[1],r[1],n),Sw[0]=Mw(o[0],a[0],r[0],d),Sw[1]=Mw(o[1],a[1],r[1],d);var f=Iw(bw,e)-l;if(Tw(f)<.01)break;var p=Iw(Sw,e)-l;u/=2,f<0?0<=p?n+=u:n-=u:0<=p?n-=u:n+=u}return n}function Dw(t,l){var u=[],h=Na,c=[[],[],[]],d=[[],[]],f=[];l/=2,t.eachEdge(function(t,e){var i=t.getLayout(),n=t.getVisual("fromSymbol"),o=t.getVisual("toSymbol");i.__original||(i.__original=[rt(i[0]),rt(i[1])],i[2]&&i.__original.push(rt(i[2])));var a=i.__original;if(null!=i[2]){if(at(c[0],a[0]),at(c[1],a[2]),at(c[2],a[1]),n&&"none"!==n){var r=_w(t.node1),s=Aw(c,a[0],r*l);h(c[0][0],c[1][0],c[2][0],s,u),c[0][0]=u[3],c[1][0]=u[4],h(c[0][1],c[1][1],c[2][1],s,u),c[0][1]=u[3],c[1][1]=u[4]}if(o&&"none"!==o){r=_w(t.node2),s=Aw(c,a[1],r*l);h(c[0][0],c[1][0],c[2][0],s,u),c[1][0]=u[1],c[2][0]=u[2],h(c[0][1],c[1][1],c[2][1],s,u),c[1][1]=u[1],c[2][1]=u[2]}at(i[0],c[0]),at(i[1],c[2]),at(i[2],c[1])}else{if(at(d[0],a[0]),at(d[1],a[1]),ht(f,d[1],d[0]),mt(f,f),n&&"none"!==n){r=_w(t.node1);ut(d[0],d[0],f,r*l)}if(o&&"none"!==o){r=_w(t.node2);ut(d[1],d[1],f,-r*l)}at(i[0],d[0]),at(i[1],d[1])}})}var Cw="__focusNodeAdjacency",Lw="__unfocusNodeAdjacency",kw=["itemStyle","opacity"],Pw=["lineStyle","opacity"];function Nw(t,e){var i=t.getVisual("opacity");return null!=i?i:t.getModel().get(e)}function Ow(t,e,i){var n=t.getGraphicEl(),o=Nw(t,e);null!=i&&(null==o&&(o=1),o*=i),n.downplay&&n.downplay(),n.traverse(function(t){if(!t.isGroup){var e=t.lineLabelOriginalOpacity;null!=e&&null==i||(e=o),t.setStyle("opacity",e)}})}function Ew(t,e){var i=Nw(t,e),n=t.getGraphicEl();n.traverse(function(t){t.isGroup||t.setStyle("opacity",i)}),n.highlight&&n.highlight()}Cf({type:"graph",init:function(t,e){var i=new im,n=new pw,o=this.group;this._controller=new Vy(e.getZr()),this._controllerHost={target:o},o.add(i.group),o.add(n.group),this._symbolDraw=i,this._lineDraw=n,this._firstRender=!0},render:function(o,t,a){var r=this,e=o.coordinateSystem;this._model=o;var i=this._symbolDraw,n=this._lineDraw,s=this.group;if("view"===e.type){var l={position:e.position,scale:e.scale};this._firstRender?s.attr(l):cl(s,l,o)}Dw(o.getGraph(),xw(o));var u=o.getData();i.updateData(u);var h=o.getEdgeData();n.updateData(h),this._updateNodeAndLinkScale(),this._updateController(o,t,a),clearTimeout(this._layoutTimeout);var c=o.forceLayout,d=o.get("force.layoutAnimation");c&&this._startForceLayoutIteration(c,d),u.eachItemGraphicEl(function(t,e){var i=u.getItemModel(e);t.off("drag").off("dragend");var n=i.get("draggable");n&&t.on("drag",function(){c&&(c.warmUp(),this._layouting||this._startForceLayoutIteration(c,d),c.setFixed(e),u.setItemLayout(e,t.position))},this).on("dragend",function(){c&&c.setUnfixed(e)},this),t.setDraggable(n&&c),t[Cw]&&t.off("mouseover",t[Cw]),t[Lw]&&t.off("mouseout",t[Lw]),i.get("focusNodeAdjacency")&&(t.on("mouseover",t[Cw]=function(){r._clearTimer(),a.dispatchAction({type:"focusNodeAdjacency",seriesId:o.id,dataIndex:t.dataIndex})}),t.on("mouseout",t[Lw]=function(){r._dispatchUnfocus(a)}))},this),u.graph.eachEdge(function(t){var e=t.getGraphicEl();e[Cw]&&e.off("mouseover",e[Cw]),e[Lw]&&e.off("mouseout",e[Lw]),t.getModel().get("focusNodeAdjacency")&&(e.on("mouseover",e[Cw]=function(){r._clearTimer(),a.dispatchAction({type:"focusNodeAdjacency",seriesId:o.id,edgeDataIndex:t.dataIndex})}),e.on("mouseout",e[Lw]=function(){r._dispatchUnfocus(a)}))});var f="circular"===o.get("layout")&&o.get("circular.rotateLabel"),p=u.getLayout("cx"),g=u.getLayout("cy");u.eachItemGraphicEl(function(t,e){var i=u.getItemModel(e).get("label.rotate")||0,n=t.getSymbolPath();if(f){var o=u.getItemLayout(e),a=Math.atan2(o[1]-g,o[0]-p);a<0&&(a=2*Math.PI+a);var r=o[0]<p;r&&(a-=Math.PI);var s=r?"left":"right";il(n,{textRotation:-a,textPosition:s,textOrigin:"center"},{textPosition:s})}else il(n,{textRotation:i*=Math.PI/180})}),this._firstRender=!1},dispose:function(){this._controller&&this._controller.dispose(),this._controllerHost={},this._clearTimer()},_dispatchUnfocus:function(t,e){var i=this;this._clearTimer(),this._unfocusDelayTimer=setTimeout(function(){i._unfocusDelayTimer=null,t.dispatchAction({type:"unfocusNodeAdjacency",seriesId:i._model.id})},500)},_clearTimer:function(){this._unfocusDelayTimer&&(clearTimeout(this._unfocusDelayTimer),this._unfocusDelayTimer=null)},focusNodeAdjacency:function(t,e,i,n){var o=t.getData().graph,a=n.dataIndex,r=n.edgeDataIndex,s=o.getNodeByIndex(a),l=o.getEdgeByIndex(r);(s||l)&&(o.eachNode(function(t){Ow(t,kw,.1)}),o.eachEdge(function(t){Ow(t,Pw,.1)}),s&&(Ew(s,kw),E(s.edges,function(t){t.dataIndex<0||(Ew(t,Pw),Ew(t.node1,kw),Ew(t.node2,kw))})),l&&(Ew(l,Pw),Ew(l.node1,kw),Ew(l.node2,kw)))},unfocusNodeAdjacency:function(t,e,i,n){var o=t.getData().graph;o.eachNode(function(t){Ow(t,kw)}),o.eachEdge(function(t){Ow(t,Pw)})},_startForceLayoutIteration:function(t,i){var n=this;!function e(){t.step(function(t){n.updateLayout(n._model),(n._layouting=!t)&&(i?n._layoutTimeout=setTimeout(e,16):e())})}()},_updateController:function(o,t,a){var e=this._controller,i=this._controllerHost,r=this.group;e.setPointerChecker(function(t,e,i){var n=r.getBoundingRect();return n.applyTransform(r.transform),n.contain(e,i)&&!$y(t,a,o)}),"view"===o.coordinateSystem.type?(e.enable(o.get("roam")),i.zoomLimit=o.get("scaleLimit"),i.zoom=o.coordinateSystem.getZoom(),e.off("pan").off("zoom").on("pan",function(t){jy(i,t.dx,t.dy),a.dispatchAction({seriesId:o.id,type:"graphRoam",dx:t.dx,dy:t.dy})}).on("zoom",function(t){qy(i,t.scale,t.originX,t.originY),a.dispatchAction({seriesId:o.id,type:"graphRoam",zoom:t.scale,originX:t.originX,originY:t.originY}),this._updateNodeAndLinkScale(),Dw(o.getGraph(),xw(o)),this._lineDraw.updateLayout()},this)):e.disable()},_updateNodeAndLinkScale:function(){var t=this._model,e=t.getData(),i=xw(t),n=[i,i];e.eachItemGraphicEl(function(t,e){t.attr("scale",n)})},updateLayout:function(t){Dw(t.getGraph(),xw(t)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},remove:function(t,e){this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()}}),_f({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},function(){}),_f({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},function(){});_f({type:"graphRoam",event:"graphRoam",update:"none"},function(i,t){t.eachComponent({mainType:"series",query:i},function(t){var e=ax(t.coordinateSystem,i);t.setCenter&&t.setCenter(e.center),t.setZoom&&t.setZoom(e.zoom)})});function Rw(t){return t instanceof Array||(t=[t,t]),t}function zw(t){var e=t.coordinateSystem;if(!e||"view"===e.type){var i=t.getGraph();i.eachNode(function(t){var e=t.getModel();t.setLayout([+e.get("x"),+e.get("y")])}),Bw(i)}}function Bw(t){t.eachEdge(function(t){var e=t.getModel().get("lineStyle.curveness")||0,i=rt(t.node1.getLayout()),n=rt(t.node2.getLayout()),o=[i,n];+e&&o.push([(i[0]+n[0])/2-(i[1]-n[1])*e,(i[1]+n[1])/2-(n[0]-i[0])*e]),t.setLayout(o)})}var Vw=Math.PI,Gw=[];function Fw(t,e){var i=t.coordinateSystem;if(!i||"view"===i.type){var n=i.getBoundingRect(),o=t.getData(),a=o.graph,s=n.width/2+n.x,l=n.height/2+n.y,r=Math.min(n.width,n.height)/2,u=o.count();o.setLayout({cx:s,cy:l}),u&&(Ww[e](t,i,a,o,r,s,l,u),a.eachEdge(function(t){var e,i=t.getModel().get("lineStyle.curveness")||0,n=rt(t.node1.getLayout()),o=rt(t.node2.getLayout()),a=(n[0]+o[0])/2,r=(n[1]+o[1])/2;+i&&(e=[s*(i*=3)+a*(1-i),l*i+r*(1-i)]),t.setLayout([n,o,e])}))}}var Ww={value:function(t,e,i,n,o,a,r,s){var l=0,u=n.getSum("value"),h=2*Math.PI/(u||s);i.eachNode(function(t){var e=t.getValue("value"),i=h*(u?e:1)/2;l+=i,t.setLayout([o*Math.cos(l)+a,o*Math.sin(l)+r]),l+=i})},symbolSize:function(t,e,i,n,o,a,r,s){var l=0;Gw.length=s;var u=xw(t);i.eachNode(function(t){var e=_w(t);isNaN(e)&&(e=2),e<0&&(e=0),e*=u;var i=Math.asin(e/2/o);isNaN(i)&&(i=Vw/2),Gw[t.dataIndex]=i,l+=2*i});var h=(2*Vw-l)/s/2,c=0;i.eachNode(function(t){var e=h+Gw[t.dataIndex];c+=e,t.setLayout([o*Math.cos(c)+a,o*Math.sin(c)+r]),c+=e})}},Hw=ut;xf(function(t){var a=t.findComponents({mainType:"legend"});a&&a.length&&t.eachSeriesByType("graph",function(t){var e=t.getCategoriesData(),n=t.getGraph().data,o=e.mapArray(e.getName);n.filterSelf(function(t){var e=n.getItemModel(t).getShallow("category");if(null!=e){"number"==typeof e&&(e=o[e]);for(var i=0;i<a.length;i++)if(!a[i].isSelected(e))return!1}return!0})},this)}),Sf(Lm("graph","circle",null)),Sf(function(t){var h={};t.eachSeriesByType("graph",function(s){var l=s.getCategoriesData(),o=s.getData(),u={};l.each(function(t){var e=l.getName(t);u["ec-"+e]=t;var i=l.getItemModel(t),n=i.get("itemStyle.color")||s.getColorFromPalette(e,h);l.setItemVisual(t,"color",n);for(var o=["opacity","symbol","symbolSize","symbolKeepAspect"],a=0;a<o.length;a++){var r=i.getShallow(o[a],!0);null!=r&&l.setItemVisual(t,o[a],r)}}),l.count()&&o.each(function(t){var e=o.getItemModel(t).getShallow("category");if(null!=e){"string"==typeof e&&(e=u["ec-"+e]);for(var i=["color","opacity","symbol","symbolSize","symbolKeepAspect"],n=0;n<i.length;n++)null==o.getItemVisual(t,i[n],!0)&&o.setItemVisual(t,i[n],l.getItemVisual(e,i[n]))}})})}),Sf(function(t){t.eachSeriesByType("graph",function(t){var s=t.getGraph(),l=t.getEdgeData(),e=Rw(t.get("edgeSymbol")),i=Rw(t.get("edgeSymbolSize")),u="lineStyle.color".split("."),h="lineStyle.opacity".split(".");l.setVisual("fromSymbol",e&&e[0]),l.setVisual("toSymbol",e&&e[1]),l.setVisual("fromSymbolSize",i&&i[0]),l.setVisual("toSymbolSize",i&&i[1]),l.setVisual("color",t.get(u)),l.setVisual("opacity",t.get(h)),l.each(function(t){var e=l.getItemModel(t),i=s.getEdgeByIndex(t),n=Rw(e.getShallow("symbol",!0)),o=Rw(e.getShallow("symbolSize",!0)),a=e.get(u),r=e.get(h);switch(a){case"source":a=i.node1.getVisual("color");break;case"target":a=i.node2.getVisual("color")}n[0]&&i.setVisual("fromSymbol",n[0]),n[1]&&i.setVisual("toSymbol",n[1]),o[0]&&i.setVisual("fromSymbolSize",o[0]),o[1]&&i.setVisual("toSymbolSize",o[1]),i.setVisual("color",a),i.setVisual("opacity",r)})})}),bf(function(t,e){t.eachSeriesByType("graph",function(t){var e=t.get("layout"),i=t.coordinateSystem;if(i&&"view"!==i.type){var n=t.getData(),o=[];E(i.dimensions,function(t){o=o.concat(n.mapDimension(t,!0))});for(var a=0;a<n.count();a++){for(var r=[],s=!1,l=0;l<o.length;l++){var u=n.get(o[l],a);isNaN(u)||(s=!0),r.push(u)}s?n.setItemLayout(a,i.dataToPoint(r)):n.setItemLayout(a,[NaN,NaN])}Bw(n.graph)}else e&&"none"!==e||zw(t)})}),bf(Ld.VISUAL.POST_CHART_LAYOUT,function(t){t.eachSeriesByType("graph",function(t){"circular"===t.get("layout")&&Fw(t,"symbolSize")})}),bf(function(t){t.eachSeriesByType("graph",function(t){if(!(l=t.coordinateSystem)||"view"===l.type)if("force"===t.get("layout")){var c=t.preservedPoints||{},d=t.getGraph(),f=d.data,e=d.edgeData,i=t.getModel("force"),n=i.get("initLayout");t.preservedPoints?f.each(function(t){var e=f.getId(t);f.setItemLayout(t,c[e]||[NaN,NaN])}):n&&"none"!==n?"circular"===n&&Fw(t,"value"):zw(t);var o=f.getDataExtent("value"),a=e.getDataExtent("value"),r=i.get("repulsion"),s=i.get("edgeLength");L(r)||(r=[r,r]),L(s)||(s=[s,s]),s=[s[1],s[0]];var l,u=f.mapArray("value",function(t,e){var i=f.getItemLayout(e),n=El(t,o,r);return isNaN(n)&&(n=(r[0]+r[1])/2),{w:n,rep:n,fixed:f.getItemModel(e).get("fixed"),p:!i||isNaN(i[0])||isNaN(i[1])?null:i}}),h=e.mapArray("value",function(t,e){var i=d.getEdgeByIndex(e),n=El(t,a,s);isNaN(n)&&(n=(s[0]+s[1])/2);var o=i.getModel();return{n1:u[i.node1.dataIndex],n2:u[i.node2.dataIndex],d:n,curveness:o.get("lineStyle.curveness")||0,ignoreForceLayout:o.get("ignoreForceLayout")}}),p=(l=t.coordinateSystem).getBoundingRect(),g=function(f,p,t){for(var e=t.rect,i=e.width,n=e.height,g=[e.x+i/2,e.y+n/2],m=null==t.gravity?.1:t.gravity,o=0;o<f.length;o++){var a=f[o];a.p||(a.p=ot(i*(Math.random()-.5)+g[0],n*(Math.random()-.5)+g[1])),a.pp=rt(a.p),a.edges=null}var r=null==t.friction?.6:t.friction,v=r;return{warmUp:function(){v=.8*r},setFixed:function(t){f[t].fixed=!0},setUnfixed:function(t){f[t].fixed=!1},step:function(t){for(var e=[],i=f.length,n=0;n<p.length;n++){var o=p[n];if(!o.ignoreForceLayout){var a=o.n1;ht(e,(u=o.n2).p,a.p);var r=ct(e)-o.d,s=u.w/(a.w+u.w);isNaN(s)&&(s=0),mt(e,e),a.fixed||Hw(a.p,a.p,e,s*r*v),u.fixed||Hw(u.p,u.p,e,-(1-s)*r*v)}}for(n=0;n<i;n++){(d=f[n]).fixed||(ht(e,g,d.p),Hw(d.p,d.p,e,m*v))}for(n=0;n<i;n++){a=f[n];for(var l=n+1;l<i;l++){var u;ht(e,(u=f[l]).p,a.p),0===(r=ct(e))&&(st(e,Math.random()-.5,Math.random()-.5),r=1);var h=(a.rep+u.rep)/r/r;a.fixed||Hw(a.pp,a.pp,e,h),u.fixed||Hw(u.pp,u.pp,e,-h)}}var c=[];for(n=0;n<i;n++){var d;(d=f[n]).fixed||(ht(c,d.p,d.pp),Hw(d.p,d.p,c,v),at(d.pp,d.p))}v*=.992,t&&t(f,p,v<.01)}}}(u,h,{rect:p,gravity:i.get("gravity"),friction:i.get("friction")}),m=g.step;g.step=function(h){for(var t=0,e=u.length;t<e;t++)u[t].fixed&&at(u[t].p,d.getNodeByIndex(t).getLayout());m(function(t,e,i){for(var n=0,o=t.length;n<o;n++)t[n].fixed||d.getNodeByIndex(n).setLayout(t[n].p),c[f.getId(n)]=t[n].p;for(n=0,o=e.length;n<o;n++){var a=e[n],r=d.getEdgeByIndex(n),s=a.n1.p,l=a.n2.p,u=r.getLayout();(u=u?u.slice():[])[0]=u[0]||[],u[1]=u[1]||[],at(u[0],s),at(u[1],l),+a.curveness&&(u[2]=[(s[0]+l[0])/2-(s[1]-l[1])*a.curveness,(s[1]+l[1])/2-(l[0]-s[0])*a.curveness]),r.setLayout(u)}h&&h(i)})},t.forceLayout=g,t.preservedPoints=c,g.step()}else t.forceLayout=null})}),wf("graphView",{create:function(t,d){var f=[];return t.eachSeriesByType("graph",function(t){var e=t.get("coordinateSystem");if(!e||"view"===e){var i=t.getData(),n=[],o=[];Wa(i.mapArray(function(t){var e=i.getItemModel(t);return[+e.get("x"),+e.get("y")]}),n,o),o[0]-n[0]==0&&(o[0]+=1,n[0]-=1),o[1]-n[1]==0&&(o[1]+=1,n[1]-=1);var a=(o[0]-n[0])/(o[1]-n[1]),r=function(t,e,i){var n=t.getBoxLayoutParams();return n.aspect=i,bu(n,{width:e.getWidth(),height:e.getHeight()})}(t,d,a);isNaN(a)&&(n=[r.x,r.y],o=[r.x+r.width,r.y+r.height]);var s=o[0]-n[0],l=o[1]-n[1],u=r.width,h=r.height,c=t.coordinateSystem=new lx;c.zoomLimit=t.get("scaleLimit"),c.setBoundingRect(n[0],n[1],s,l),c.setViewRect(r.x,r.y,u,h),c.setCenter(t.get("center")),c.setZoom(t.get("zoom")),f.push(c)}}),f}});sc.extend({type:"series.gauge",getInitialData:function(t,e){return Yv(this,["value"])},defaultOption:{zlevel:0,z:2,center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,lineStyle:{color:[[.2,"#91c7ae"],[.8,"#63869e"],[1,"#c23531"]],width:30}},splitLine:{show:!0,length:30,lineStyle:{color:"#eee",width:2,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:8,lineStyle:{color:"#eee",width:1,type:"solid"}},axisLabel:{show:!0,distance:5,color:"auto"},pointer:{show:!0,length:"80%",width:8},itemStyle:{color:"auto"},title:{show:!0,offsetCenter:[0,"-40%"],color:"#333",fontSize:15},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"auto",fontSize:30}}});var Zw=Ar.extend({type:"echartsGaugePointer",shape:{angle:0,width:10,r:10,x:0,y:0},buildPath:function(t,e){var i=Math.cos,n=Math.sin,o=e.r,a=e.width,r=e.angle,s=e.x-i(r)*a*(o/3<=a?1:2),l=e.y-n(r)*a*(o/3<=a?1:2);r=e.angle-Math.PI/2,t.moveTo(s,l),t.lineTo(e.x+i(r)*a,e.y+n(r)*a),t.lineTo(e.x+i(e.angle)*o,e.y+n(e.angle)*o),t.lineTo(e.x-i(r)*a,e.y-n(r)*a),t.lineTo(s,l)}});function Uw(t,e){return e&&("string"==typeof e?t=e.replace("{value}",null!=t?t:""):"function"==typeof e&&(t=e(t))),t}var Xw=2*Math.PI,Yw=(_c.extend({type:"gauge",render:function(t,e,i){this.group.removeAll();var n=t.get("axisLine.lineStyle.color"),o=function(t,e){var i=t.get("center"),n=e.getWidth(),o=e.getHeight(),a=Math.min(n,o);return{cx:Rl(i[0],e.getWidth()),cy:Rl(i[1],e.getHeight()),r:Rl(t.get("radius"),a/2)}}(t,i);this._renderMain(t,e,i,n,o)},dispose:function(){},_renderMain:function(t,e,i,n,o){for(var a=this.group,r=t.getModel("axisLine"),s=r.getModel("lineStyle"),l=t.get("clockwise"),u=-t.get("startAngle")/180*Math.PI,h=((g=-t.get("endAngle")/180*Math.PI)-u)%Xw,c=u,d=s.get("width"),f=r.get("show"),p=0;f&&p<n.length;p++){var g,m=Math.min(Math.max(n[p][0],0),1),v=new qr({shape:{startAngle:c,endAngle:g=u+h*m,cx:o.cx,cy:o.cy,clockwise:l,r0:o.r-d,r:o.r},silent:!0});v.setStyle({fill:n[p][1]}),v.setStyle(s.getLineStyle(["color","borderWidth","borderColor"])),a.add(v),c=g}function y(t){if(t<=0)return n[0][1];for(var e=0;e<n.length;e++)if(n[e][0]>=t&&(0===e?0:n[e-1][0])<t)return n[e][1];return n[e-1][1]}if(!l){var x=u;u=g,g=x}this._renderTicks(t,e,i,y,o,u,g,l),this._renderPointer(t,e,i,y,o,u,g,l),this._renderTitle(t,e,i,y,o),this._renderDetail(t,e,i,y,o)},_renderTicks:function(t,e,i,n,o,a,r,s){for(var l=this.group,u=o.cx,h=o.cy,c=o.r,d=+t.get("min"),f=+t.get("max"),p=t.getModel("splitLine"),g=t.getModel("axisTick"),m=t.getModel("axisLabel"),v=t.get("splitNumber"),y=g.get("splitNumber"),x=Rl(p.get("length"),c),_=Rl(g.get("length"),c),w=a,b=(r-a)/v,S=b/y,M=p.getModel("lineStyle").getLineStyle(),I=g.getModel("lineStyle").getLineStyle(),T=0;T<=v;T++){var A=Math.cos(w),D=Math.sin(w);if(p.get("show")){var C=new ls({shape:{x1:A*c+u,y1:D*c+h,x2:A*(c-x)+u,y2:D*(c-x)+h},style:M,silent:!0});"auto"===M.stroke&&C.setStyle({stroke:n(T/v)}),l.add(C)}if(m.get("show")){var L=Uw(zl(T/v*(f-d)+d),m.get("formatter")),k=m.get("distance"),P=n(T/v);l.add(new Ur({style:nl({},m,{text:L,x:A*(c-x-k)+u,y:D*(c-x-k)+h,textVerticalAlign:D<-.4?"top":.4<D?"bottom":"middle",textAlign:A<-.4?"left":.4<A?"right":"center"},{autoColor:P}),silent:!0}))}if(g.get("show")&&T!==v){for(var N=0;N<=y;N++){A=Math.cos(w),D=Math.sin(w);var O=new ls({shape:{x1:A*c+u,y1:D*c+h,x2:A*(c-_)+u,y2:D*(c-_)+h},silent:!0,style:I});"auto"===I.stroke&&O.setStyle({stroke:n((T+N/y)/v)}),l.add(O),w+=S}w-=S}else w+=b}},_renderPointer:function(n,t,e,o,a,i,r,s){var l=this.group,u=this._data;if(n.get("pointer.show")){var h=[+n.get("min"),+n.get("max")],c=[i,r],d=n.getData(),f=d.mapDimension("value");d.diff(u).add(function(t){var e=new Zw({shape:{angle:i}});dl(e,{shape:{angle:El(d.get(f,t),h,c,!0)}},n),l.add(e),d.setItemGraphicEl(t,e)}).update(function(t,e){var i=u.getItemGraphicEl(e);cl(i,{shape:{angle:El(d.get(f,t),h,c,!0)}},n),l.add(i),d.setItemGraphicEl(t,i)}).remove(function(t){var e=u.getItemGraphicEl(t);l.remove(e)}).execute(),d.eachItemGraphicEl(function(t,e){var i=d.getItemModel(e),n=i.getModel("pointer");t.setShape({x:a.cx,y:a.cy,width:Rl(n.get("width"),a.r),r:Rl(n.get("length"),a.r)}),t.useStyle(i.getModel("itemStyle").getItemStyle()),"auto"===t.style.fill&&t.setStyle("fill",o(El(d.get(f,e),h,[0,1],!0))),$s(t,i.getModel("emphasis.itemStyle").getItemStyle())}),this._data=d}else u&&u.eachItemGraphicEl(function(t){l.remove(t)})},_renderTitle:function(t,e,i,n,o){var a=t.getData(),r=a.mapDimension("value"),s=t.getModel("title");if(s.get("show")){var l=s.get("offsetCenter"),u=o.cx+Rl(l[0],o.r),h=o.cy+Rl(l[1],o.r),c=+t.get("min"),d=+t.get("max"),f=n(El(t.getData().get(r,0),[c,d],[0,1],!0));this.group.add(new Ur({silent:!0,style:nl({},s,{x:u,y:h,text:a.getName(0),textAlign:"center",textVerticalAlign:"middle"},{autoColor:f,forceRich:!0})}))}},_renderDetail:function(t,e,i,n,o){var a=t.getModel("detail"),r=+t.get("min"),s=+t.get("max");if(a.get("show")){var l=a.get("offsetCenter"),u=o.cx+Rl(l[0],o.r),h=o.cy+Rl(l[1],o.r),c=Rl(a.get("width"),o.r),d=Rl(a.get("height"),o.r),f=t.getData(),p=f.get(f.mapDimension("value"),0),g=n(El(p,[r,s],[0,1],!0));this.group.add(new Ur({silent:!0,style:nl({},a,{x:u,y:h,text:Uw(p,a.get("formatter")),textWidth:isNaN(c)?null:c,textHeight:isNaN(d)?null:d,textAlign:"center",textVerticalAlign:"middle"},{autoColor:g,forceRich:!0})}))}}}),Df({type:"series.funnel",init:function(t){Yw.superApply(this,"init",arguments),this.legendVisualProvider=new qv(A(this.getData,this),A(this.getRawData,this)),this._defaultLabelLine(t)},getInitialData:function(t,e){return Yv(this,{coordDimensions:["value"],encodeDefaulter:T(Ju,this)})},_defaultLabelLine:function(t){Go(t,"labelLine",["show"]);var e=t.labelLine,i=t.emphasis.labelLine;e.show=e.show&&t.label.show,i.show=i.show&&t.emphasis.label.show},getDataParams:function(t){var e=this.getData(),i=Yw.superCall(this,"getDataParams",t),n=e.mapDimension("value"),o=e.getSum(n);return i.percent=o?+(e.get(n,t)/o*100).toFixed(2):0,i.$vars.push("percent"),i},defaultOption:{zlevel:0,z:2,legendHoverLink:!0,left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1,type:"solid"}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}}}}));function jw(t,e){Ci.call(this);var i=new Qr,n=new ts,o=new Ur;this.add(i),this.add(n),this.add(o),this.highDownOnUpdate=function(t,e){"emphasis"===e?(n.ignore=n.hoverIgnore,o.ignore=o.hoverIgnore):(n.ignore=n.normalIgnore,o.ignore=o.normalIgnore)},this.updateData(t,e,!0)}var qw=jw.prototype,Kw=["itemStyle","opacity"];qw.updateData=function(t,e,i){var n=this.childAt(0),o=t.hostModel,a=t.getItemModel(e),r=t.getItemLayout(e),s=t.getItemModel(e).get(Kw);s=null==s?1:s,n.useStyle({}),i?(n.setShape({points:r.points}),n.setStyle({opacity:0}),dl(n,{style:{opacity:s}},o,e)):cl(n,{style:{opacity:s},shape:{points:r.points}},o,e);var l=a.getModel("itemStyle"),u=t.getItemVisual(e,"color");n.setStyle(D({lineJoin:"round",fill:u},l.getItemStyle(["opacity"]))),n.hoverStyle=l.getModel("emphasis").getItemStyle(),this._updateLabel(t,e),$s(this)},qw._updateLabel=function(t,e){var i=this.childAt(1),n=this.childAt(2),o=t.hostModel,a=t.getItemModel(e),r=t.getItemLayout(e).label,s=t.getItemVisual(e,"color");cl(i,{shape:{points:r.linePoints||r.linePoints}},o,e),cl(n,{style:{x:r.x,y:r.y}},o,e),n.attr({rotation:r.rotation,origin:[r.x,r.y],z2:10});var l=a.getModel("label"),u=a.getModel("emphasis.label"),h=a.getModel("labelLine"),c=a.getModel("emphasis.labelLine");s=t.getItemVisual(e,"color");el(n.style,n.hoverStyle={},l,u,{labelFetcher:t.hostModel,labelDataIndex:e,defaultText:t.getName(e),autoColor:s,useInsideStyle:!!r.inside},{textAlign:r.textAlign,textVerticalAlign:r.verticalAlign}),n.ignore=n.normalIgnore=!l.get("show"),n.hoverIgnore=!u.get("show"),i.ignore=i.normalIgnore=!h.get("show"),i.hoverIgnore=!c.get("show"),i.setStyle({stroke:s}),i.setStyle(h.getModel("lineStyle").getLineStyle()),i.hoverStyle=c.getModel("lineStyle").getLineStyle()},w(jw,Ci);_c.extend({type:"funnel",render:function(t,e,i){var n=t.getData(),o=this._data,a=this.group;n.diff(o).add(function(t){var e=new jw(n,t);n.setItemGraphicEl(t,e),a.add(e)}).update(function(t,e){var i=o.getItemGraphicEl(e);i.updateData(n,t),a.add(i),n.setItemGraphicEl(t,i)}).remove(function(t){var e=o.getItemGraphicEl(t);a.remove(e)}).execute(),this._data=n},remove:function(){this.group.removeAll(),this._data=null},dispose:function(){}});Sf(iy("funnel")),bf(function(t,w,e){t.eachSeriesByType("funnel",function(t){var o=t.getData(),a=o.mapDimension("value"),e=t.get("sort"),r=function(t,e){return bu(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,w),i=function(t,e){for(var i=t.mapDimension("value"),n=t.mapArray(i,function(t){return t}),o=[],a="ascending"===e,r=0,s=t.count();r<s;r++)o[r]=r;return"function"==typeof e?o.sort(e):"none"!==e&&o.sort(function(t,e){return a?n[t]-n[e]:n[e]-n[t]}),o}(o,e),s=[Rl(t.get("minSize"),r.width),Rl(t.get("maxSize"),r.width)],n=o.getDataExtent(a),l=t.get("min"),u=t.get("max");null==l&&(l=Math.min(n[0],0)),null==u&&(u=n[1]);function h(t,e){var i,n=El(o.get(a,t)||0,[l,u],s,!0);switch(c){case"left":i=r.x;break;case"center":i=r.x+(r.width-n)/2;break;case"right":i=r.x+r.width-n}return[[i,e],[i+n,e]]}var c=t.get("funnelAlign"),d=t.get("gap"),f=(r.height-d*(o.count()-1))/o.count(),p=r.y;"ascending"===e&&(f=-f,d=-d,p+=r.height,i=i.reverse());for(var g=0;g<i.length;g++){var m=i[g],v=i[g+1],y=o.getItemModel(m).get("itemStyle.height");null==y?y=f:(y=Rl(y,r.height),"ascending"===e&&(y=-y));var x=h(m,p),_=h(v,p+y);p+=y+d,o.setItemLayout(m,{points:x.concat(_.slice().reverse())})}!function(g){g.each(function(t){var e,i,n,o,a=g.getItemModel(t),r=a.getModel("label").get("position"),s=a.getModel("labelLine"),l=g.getItemLayout(t),u=l.points,h="inner"===r||"inside"===r||"center"===r||"insideLeft"===r||"insideRight"===r;if(h)e="insideLeft"===r?(i=(u[0][0]+u[3][0])/2+5,n=(u[0][1]+u[3][1])/2,"left"):"insideRight"===r?(i=(u[1][0]+u[2][0])/2-5,n=(u[1][1]+u[2][1])/2,"right"):(i=(u[0][0]+u[1][0]+u[2][0]+u[3][0])/4,n=(u[0][1]+u[1][1]+u[2][1]+u[3][1])/4,"center"),o=[[i,n],[i,n]];else{var c,d,f,p=s.get("length");e="left"===r?(c=(u[3][0]+u[0][0])/2,d=(u[3][1]+u[0][1])/2,i=(f=c-p)-5,"right"):"right"===r?(c=(u[1][0]+u[2][0])/2,d=(u[1][1]+u[2][1])/2,i=(f=c+p)+5,"left"):"rightTop"===r?(c=u[1][0],d=u[1][1],i=(f=c+p)+5,"top"):"rightBottom"===r?(c=u[2][0],d=u[2][1],i=(f=c+p)+5,"bottom"):"leftTop"===r?(c=u[0][0],d=u[1][1],i=(f=c-p)-5,"right"):"leftBottom"===r?(c=u[3][0],d=u[2][1],i=(f=c-p)-5,"right"):(c=(u[1][0]+u[2][0])/2,d=(u[1][1]+u[2][1])/2,i=(f=c+p)+5,"left");o=[[c,d],[f,d]],n=d}l.label={linePoints:o,x:i,y:n,verticalAlign:"middle",textAlign:e,inside:h}})}(o)})}),xf(uy("funnel"));function $w(t,e,i,n,o){Gg.call(this,t,e,i),this.type=n||"value",this.axisIndex=o}$w.prototype={constructor:$w,model:null,isHorizontal:function(){return"horizontal"!==this.coordinateSystem.getModel().get("layout")}},w($w,Gg);function Jw(t,e,i,n,o,a){t=t||0;var r=i[1]-i[0];if(null!=o&&(o=tb(o,[0,r])),null!=a&&(a=Math.max(a,null!=o?o:0)),"all"===n){var s=Math.abs(e[1]-e[0]);o=a=tb(s=tb(s,[0,r]),[o,a]),n=0}e[0]=tb(e[0],i),e[1]=tb(e[1],i);var l=Qw(e,n);e[n]+=t;var u=o||0,h=i.slice();l.sign<0?h[0]+=u:h[1]-=u,e[n]=tb(e[n],h);var c=Qw(e,n);return null!=o&&(c.sign!==l.sign||c.span<o)&&(e[1-n]=e[n]+l.sign*o),c=Qw(e,n),null!=a&&c.span>a&&(e[1-n]=e[n]+c.sign*a),e}function Qw(t,e){var i=t[e]-t[1-e];return{span:Math.abs(i),sign:0<i?-1:i<0?1:e?-1:1}}function tb(t,e){return Math.min(null!=e[1]?e[1]:1/0,Math.max(null!=e[0]?e[0]:-1/0,t))}var eb=E,ib=Math.min,nb=Math.max,ob=Math.floor,ab=Math.ceil,rb=zl,sb=Math.PI;function lb(t,e,i){this._axesMap=Q(),this._axesLayout={},this.dimensions=t.dimensions,this._rect,this._model=t,this._init(t,e,i)}function ub(t,e){return ib(nb(t,e[0]),e[1])}lb.prototype={type:"parallel",constructor:lb,_init:function(t,r,e){var i=t.dimensions,s=t.parallelAxisIndex;eb(i,function(t,e){var i=s[e],n=r.getComponent("parallelAxis",i),o=this._axesMap.set(t,new $w(t,sg(n),[0,0],n.get("type"),i)),a="category"===o.type;o.onBand=a&&n.get("boundaryGap"),o.inverse=n.get("inverse"),(n.axis=o).model=n,o.coordinateSystem=n.coordinateSystem=this},this)},update:function(t,e){this._updateAxesFromSeries(this._model,t)},containPoint:function(t){var e=this._makeLayoutInfo(),i=e.axisBase,n=e.layoutBase,o=e.pixelDimIndex,a=t[1-o],r=t[o];return i<=a&&a<=i+e.axisLength&&n<=r&&r<=n+e.layoutLength},getModel:function(){return this._model},_updateAxesFromSeries:function(e,n){n.eachSeries(function(t){if(e.contains(t,n)){var i=t.getData();eb(this.dimensions,function(t){var e=this._axesMap.get(t);e.scale.unionExtentFromData(i,i.mapDimension(t)),rg(e.scale,e.model)},this)}},this)},resize:function(t,e){this._rect=bu(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()}),this._layoutAxes()},getRect:function(){return this._rect},_makeLayoutInfo:function(){var t,e=this._model,i=this._rect,n=["x","y"],o=["width","height"],a=e.get("layout"),r="horizontal"===a?0:1,s=i[o[r]],l=[0,s],u=this.dimensions.length,h=ub(e.get("axisExpandWidth"),l),c=ub(e.get("axisExpandCount")||0,[0,u]),d=e.get("axisExpandable")&&3<u&&c<u&&1<c&&0<h&&0<s,f=e.get("axisExpandWindow");f?(t=ub(f[1]-f[0],l),f[1]=f[0]+t):(t=ub(h*(c-1),l),(f=[h*(e.get("axisExpandCenter")||ob(u/2))-t/2])[1]=f[0]+t);var p=(s-t)/(u-c);p<3&&(p=0);var g=[ob(rb(f[0]/h,1))+1,ab(rb(f[1]/h,1))-1],m=p/h*f[0];return{layout:a,pixelDimIndex:r,layoutBase:i[n[r]],layoutLength:s,axisBase:i[n[1-r]],axisLength:i[o[1-r]],axisExpandable:d,axisExpandWidth:h,axisCollapseWidth:p,axisExpandWindow:f,axisCount:u,winInnerIndices:g,axisExpandWindow0Pos:m}},_layoutAxes:function(){var l=this._rect,t=this._axesMap,e=this.dimensions,u=this._makeLayoutInfo(),h=u.layout;t.each(function(t){var e=[0,u.axisLength],i=t.inverse?1:0;t.setExtent(e[i],e[1-i])}),eb(e,function(t,e){var i=(u.axisExpandable?function(t,e){var i,n,o=e.layoutLength,a=e.axisExpandWidth,r=e.axisCount,s=e.axisCollapseWidth,l=e.winInnerIndices,u=s,h=!1;t<l[0]?(i=t*s,n=s):t<=l[1]?(i=e.axisExpandWindow0Pos+t*a-e.axisExpandWindow[0],u=a,h=!0):(i=o-(r-1-t)*s,n=s);return{position:i,axisNameAvailableWidth:u,axisLabelShow:h,nameTruncateMaxWidth:n}}:function(t,e){var i=e.layoutLength/(e.axisCount-1);return{position:i*t,axisNameAvailableWidth:i,axisLabelShow:!0}})(e,u),n={horizontal:{x:i.position,y:u.axisLength},vertical:{x:0,y:i.position}},o={horizontal:sb/2,vertical:0},a=[n[h].x+l.x,n[h].y+l.y],r=o[h],s=ae();he(s,s,r),ue(s,s,a),this._axesLayout[t]={position:a,rotation:r,transform:s,axisNameAvailableWidth:i.axisNameAvailableWidth,axisLabelShow:i.axisLabelShow,nameTruncateMaxWidth:i.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},getAxis:function(t){return this._axesMap.get(t)},dataToPoint:function(t,e){return this.axisCoordToPoint(this._axesMap.get(e).dataToCoord(t),e)},eachActiveState:function(e,t,i,n){null==i&&(i=0),null==n&&(n=e.count());var o=this._axesMap,a=this.dimensions,r=[],s=[];E(a,function(t){r.push(e.mapDimension(t)),s.push(o.get(t).model)});for(var l=this.hasAxisBrushed(),u=i;u<n;u++){var h;if(l){h="active";for(var c=e.getValues(r,u),d=0,f=a.length;d<f;d++){if("inactive"===s[d].getActiveState(c[d])){h="inactive";break}}}else h="normal";t(h,u)}},hasAxisBrushed:function(){for(var t=this.dimensions,e=this._axesMap,i=!1,n=0,o=t.length;n<o;n++)"normal"!==e.get(t[n]).model.getActiveState()&&(i=!0);return i},axisCoordToPoint:function(t,e){return pl([t,0],this._axesLayout[e].transform)},getAxisLayout:function(t){return k(this._axesLayout[t])},getSlidedAxisExpandWindow:function(t){var e=this._makeLayoutInfo(),i=e.pixelDimIndex,n=e.axisExpandWindow.slice(),o=n[1]-n[0],a=[0,e.axisExpandWidth*(e.axisCount-1)];if(!this.containPoint(t))return{behavior:"none",axisExpandWindow:n};var r,s=t[i]-e.layoutBase-e.axisExpandWindow0Pos,l="slide",u=e.axisCollapseWidth,h=this._model.get("axisExpandSlideTriggerArea"),c=null!=h[0];if(u)c&&u&&s<o*h[0]?(l="jump",r=s-o*h[2]):c&&u&&s>o*(1-h[0])?(l="jump",r=s-o*(1-h[2])):0<=(r=s-o*h[1])&&(r=s-o*(1-h[1]))<=0&&(r=0),(r*=e.axisExpandWidth/u)?Jw(r,n,a,"all"):l="none";else{o=n[1]-n[0];(n=[nb(0,a[1]*s/o-o/2)])[1]=ib(a[1],n[0]+o),n[0]=n[1]-o}return{axisExpandWindow:n,behavior:l}}},lh.register("parallel",{create:function(n,o){var a=[];return n.eachComponent("parallel",function(t,e){var i=new lb(t,n,o);i.name="parallel_"+e,i.resize(t,o),(t.coordinateSystem=i).model=t,a.push(i)}),n.eachSeries(function(t){if("parallel"===t.get("coordinateSystem")){var e=n.queryComponents({mainType:"parallel",index:t.get("parallelIndex"),id:t.get("parallelId")})[0];t.coordinateSystem=e.coordinateSystem}}),a}});var hb=ku.extend({type:"baseParallelAxis",axis:null,activeIntervals:[],getAreaSelectStyle:function(){return ha([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},setActiveIntervals:function(t){var e=this.activeIntervals=k(t);if(e)for(var i=e.length-1;0<=i;i--)Bl(e[i])},getActiveState:function(t){var e=this.activeIntervals;if(!e.length)return"normal";if(null==t||isNaN(t))return"inactive";if(1===e.length){var i=e[0];if(i[0]<=t&&t<=i[1])return"active"}else for(var n=0,o=e.length;n<o;n++)if(e[n][0]<=t&&t<=e[n][1])return"active";return"inactive"}});m(hb.prototype,dg),Gm("parallel",hb,function(t,e){return e.type||(e.data?"category":"value")},{type:"value",dim:null,areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10}),ku.extend({type:"parallel",dependencies:["parallelAxis"],coordinateSystem:null,dimensions:null,parallelAxisIndex:null,layoutMode:"box",defaultOption:{zlevel:0,z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},init:function(){ku.prototype.init.apply(this,arguments),this.mergeOption({})},mergeOption:function(t){var e=this.option;t&&m(e,t,!0),this._initDimensions()},contains:function(t,e){var i=t.get("parallelIndex");return null!=i&&e.getComponent("parallel",i)===this},setAxisExpand:function(e){E(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(t){e.hasOwnProperty(t)&&(this.option[t]=e[t])},this)},_initDimensions:function(){var e=this.dimensions=[],i=this.parallelAxisIndex=[];E(M(this.dependentModels.parallelAxis,function(t){return(t.get("parallelIndex")||0)===this.componentIndex},this),function(t){e.push("dim"+t.get("dim")),i.push(t.componentIndex)})}});_f({type:"axisAreaSelect",event:"axisAreaSelected"},function(e,t){t.eachComponent({mainType:"parallelAxis",query:e},function(t){t.axis.model.setActiveIntervals(e.intervals)})}),_f("parallelAxisExpand",function(e,t){t.eachComponent({mainType:"parallel",query:e},function(t){t.setAxisExpand(e)})});var cb=T,db=E,fb=O,pb=Math.min,gb=Math.max,mb=Math.pow,vb=1e4,yb=6,xb=6,_b="globalPan",wb={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},bb={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},Sb={brushStyle:{lineWidth:2,stroke:"rgba(0,0,0,0.3)",fill:"rgba(0,0,0,0.1)"},transformable:!0,brushMode:"single",removeOnClick:!1},Mb=0;function Ib(t){Ct.call(this),this._zr=t,this.group=new Ci,this._brushType,this._brushOption,this._panels,this._track=[],this._dragging,this._covers=[],this._creatingCover,this._creatingPanel,this._enableGlobalPan,this._uid="brushController_"+Mb++,this._handlers={},db($b,function(t,e){this._handlers[e]=A(t,this)},this)}function Tb(t,e){var i=Qb[e.brushType].createCover(t,e);return i.__brushOption=e,Cb(i,e),t.group.add(i),i}function Ab(t,e){var i=kb(e);return i.endCreating&&(i.endCreating(t,e),Cb(e,e.__brushOption)),e}function Db(t,e){var i=e.__brushOption;kb(e).updateCoverShape(t,e,i.range,i)}function Cb(t,e){var i=e.z;null==i&&(i=vb),t.traverse(function(t){t.z=i,t.z2=i})}function Lb(t,e){kb(e).updateCommon(t,e),Db(t,e)}function kb(t){return Qb[t.__brushOption.brushType]}function Pb(t,e,i){var n,o=t._panels;if(!o)return!0;var a=t._transform;return db(o,function(t){t.isTargetByCursor(e,i,a)&&(n=t)}),n}function Nb(t,e){var i=t._panels;if(!i)return!0;var n=e.__brushOption.panelId;return null==n||i[n]}function Ob(e){var t=e._covers,i=t.length;return db(t,function(t){e.group.remove(t)},e),t.length=0,!!i}function Eb(t,e){var i=fb(t._covers,function(t){var e=t.__brushOption,i=k(e.range);return{brushType:e.brushType,panelId:e.panelId,range:i}});t.trigger("brush",i,{isEnd:!!e.isEnd,removeOnClick:!!e.removeOnClick})}function Rb(t){var e=t.length-1;return e<0&&(e=0),[t[0],t[e]]}function zb(e,i,t,n){var o=new Ci;return o.add(new rs({name:"main",style:Fb(t),silent:!0,draggable:!0,cursor:"move",drift:cb(e,i,o,"nswe"),ondragend:cb(Eb,i,{isEnd:!0})})),db(n,function(t){o.add(new rs({name:t,style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:cb(e,i,o,t),ondragend:cb(Eb,i,{isEnd:!0})}))}),o}function Bb(t,e,i,n){var o=n.brushStyle.lineWidth||0,a=gb(o,xb),r=i[0][0],s=i[1][0],l=r-o/2,u=s-o/2,h=i[0][1],c=i[1][1],d=h-a+o/2,f=c-a+o/2,p=h-r,g=c-s,m=p+o,v=g+o;Gb(t,e,"main",r,s,p,g),n.transformable&&(Gb(t,e,"w",l,u,a,v),Gb(t,e,"e",d,u,a,v),Gb(t,e,"n",l,u,m,a),Gb(t,e,"s",l,f,m,a),Gb(t,e,"nw",l,u,a,a),Gb(t,e,"ne",d,u,a,a),Gb(t,e,"sw",l,f,a,a),Gb(t,e,"se",d,f,a,a))}function Vb(n,o){var t=o.__brushOption,a=t.transformable,e=o.childAt(0);e.useStyle(Fb(t)),e.attr({silent:!a,cursor:a?"move":"default"}),db(["w","e","n","s","se","sw","ne","nw"],function(t){var e=o.childOfName(t),i=function t(e,i){{if(1<i.length){i=i.split("");var n=[t(e,i[0]),t(e,i[1])];return"e"!==n[0]&&"w"!==n[0]||n.reverse(),n.join("")}var o={w:"left",e:"right",n:"top",s:"bottom"},a={left:"w",right:"e",top:"n",bottom:"s"},n=gl(o[i],fl(e.group));return a[n]}}(n,t);e&&e.attr({silent:!a,invisible:!a,cursor:a?bb[i]+"-resize":null})})}function Gb(t,e,i,n,o,a,r){var s=e.childOfName(i);s&&s.setShape(function(t){var e=pb(t[0][0],t[1][0]),i=pb(t[0][1],t[1][1]),n=gb(t[0][0],t[1][0]),o=gb(t[0][1],t[1][1]);return{x:e,y:i,width:n-e,height:o-i}}(Xb(t,e,[[n,o],[n+a,o+r]])))}function Fb(t){return D({strokeNoScale:!0},t.brushStyle)}function Wb(t,e,i,n){var o=[pb(t,i),pb(e,n)],a=[gb(t,i),gb(e,n)];return[[o[0],a[0]],[o[1],a[1]]]}function Hb(t,e,i,n,o,a,r,s){var l=n.__brushOption,u=t(l.range),h=Ub(i,a,r);db(o.split(""),function(t){var e=wb[t];u[e[0]][e[1]]+=h[e[0]]}),l.range=e(Wb(u[0][0],u[1][0],u[0][1],u[1][1])),Lb(i,n),Eb(i,{isEnd:!1})}function Zb(t,e,i,n,o){var a=e.__brushOption.range,r=Ub(t,i,n);db(a,function(t){t[0]+=r[0],t[1]+=r[1]}),Lb(t,e),Eb(t,{isEnd:!1})}function Ub(t,e,i){var n=t.group,o=n.transformCoordToLocal(e,i),a=n.transformCoordToLocal(0,0);return[o[0]-a[0],o[1]-a[1]]}function Xb(t,e,i){var n=Nb(t,e);return n&&!0!==n?n.clipPath(i,t._transform):k(i)}function Yb(t){var e=t.event;e.preventDefault&&e.preventDefault()}function jb(t,e,i){return t.childOfName("main").contain(e,i)}function qb(t,e,i,n){var o,a=t._creatingCover,r=t._creatingPanel,s=t._brushOption;if(t._track.push(i.slice()),function(t){var e=t._track;if(!e.length)return!1;var i=e[e.length-1],n=e[0],o=i[0]-n[0],a=i[1]-n[1],r=mb(o*o+a*a,.5);return yb<r}(t)||a){if(r&&!a){"single"===s.brushMode&&Ob(t);var l=k(s);l.brushType=Kb(l.brushType,r),l.panelId=!0===r?null:r.panelId,a=t._creatingCover=Tb(t,l),t._covers.push(a)}if(a){var u=Qb[Kb(t._brushType,r)];a.__brushOption.range=u.getCreatingRange(Xb(t,a,t._track)),n&&(Ab(t,a),u.updateCommon(t,a)),Db(t,a),o={isEnd:n}}}else n&&"single"===s.brushMode&&s.removeOnClick&&Pb(t,e,i)&&Ob(t)&&(o={isEnd:n,removeOnClick:!0});return o}function Kb(t,e){return"auto"===t?e.defaultBrushType:t}Ib.prototype={constructor:Ib,enableBrush:function(t){return this._brushType&&function(t){var e=t._zr;(function(t,e,i){var n=By(t);n[e]===i&&(n[e]=null)})(e,_b,t._uid),function(i,t){db(t,function(t,e){i.off(e,t)})}(e,t._handlers),t._brushType=t._brushOption=null}(this),t.brushType&&function(t,e){var i=t._zr;t._enableGlobalPan||function(t,e,i){By(t)[e]=i}(i,_b,t._uid);(function(i,t){db(t,function(t,e){i.on(e,t)})})(i,t._handlers),t._brushType=e.brushType,t._brushOption=m(k(Sb),e,!0)}(this,t),this},setPanels:function(t){if(t&&t.length){var e=this._panels={};E(t,function(t){e[t.panelId]=k(t)})}else this._panels=null;return this},mount:function(t){t=t||{},this._enableGlobalPan=t.enableGlobalPan;var e=this.group;return this._zr.add(e),e.attr({position:t.position||[0,0],rotation:t.rotation||0,scale:t.scale||[1,1]}),this._transform=e.getLocalTransform(),this},eachCover:function(t,e){db(this._covers,t,e)},updateCovers:function(o){o=O(o,function(t){return m(k(Sb),t,!0)});var i="\0-brush-index-",a=this._covers,r=this._covers=[],s=this,l=this._creatingCover;return new kf(a,o,function(t,e){return n(t.__brushOption,e)},n).add(t).update(t).remove(function(t){a[t]!==l&&s.group.remove(a[t])}).execute(),this;function n(t,e){return(null!=t.id?t.id:i+e)+"-"+t.brushType}function t(t,e){var i=o[t];if(null!=e&&a[e]===l)r[t]=a[e];else{var n=r[t]=null!=e?(a[e].__brushOption=i,a[e]):Ab(s,Tb(s,i));Lb(s,n)}}},unmount:function(){return this.enableBrush(!1),Ob(this),this._zr.remove(this.group),this},dispose:function(){this.unmount(),this.off()}},b(Ib,Ct);var $b={mousedown:function(t){if(this._dragging)Jb(this,t);else if(!t.target||!t.target.draggable){Yb(t);var e=this.group.transformCoordToLocal(t.offsetX,t.offsetY);this._creatingCover=null,(this._creatingPanel=Pb(this,t,e))&&(this._dragging=!0,this._track=[e.slice()])}},mousemove:function(t){var e=t.offsetX,i=t.offsetY,n=this.group.transformCoordToLocal(e,i);if(function(t,e,i){if(t._brushType&&!function(t,e,i){var n=t._zr;return e<0||e>n.getWidth()||i<0||i>n.getHeight()}(t,e)){var n=t._zr,o=t._covers,a=Pb(t,e,i);if(!t._dragging)for(var r=0;r<o.length;r++){var s=o[r].__brushOption;if(a&&(!0===a||s.panelId===a.panelId)&&Qb[s.brushType].contain(o[r],i[0],i[1]))return}a&&n.setCursorStyle("crosshair")}}(this,t,n),this._dragging){Yb(t);var o=qb(this,t,n,!1);o&&Eb(this,o)}},mouseup:function(t){Jb(this,t)}};function Jb(t,e){if(t._dragging){Yb(e);var i=e.offsetX,n=e.offsetY,o=t.group.transformCoordToLocal(i,n),a=qb(t,e,o,!0);t._dragging=!1,t._track=[],t._creatingCover=null,a&&Eb(t,a)}}var Qb={lineX:tS(0),lineY:tS(1),rect:{createCover:function(t,e){return zb(cb(Hb,function(t){return t},function(t){return t}),t,e,["w","e","n","s","se","sw","ne","nw"])},getCreatingRange:function(t){var e=Rb(t);return Wb(e[1][0],e[1][1],e[0][0],e[0][1])},updateCoverShape:function(t,e,i,n){Bb(t,e,i,n)},updateCommon:Vb,contain:jb},polygon:{createCover:function(t,e){var i=new Ci;return i.add(new ts({name:"main",style:Fb(e),silent:!0})),i},getCreatingRange:function(t){return t},endCreating:function(t,e){e.remove(e.childAt(0)),e.add(new Qr({name:"main",draggable:!0,drift:cb(Zb,t,e),ondragend:cb(Eb,t,{isEnd:!0})}))},updateCoverShape:function(t,e,i,n){e.childAt(0).setShape({points:Xb(t,e,i)})},updateCommon:Vb,contain:jb}};function tS(l){return{createCover:function(t,e){return zb(cb(Hb,function(t){var e=[t,[0,100]];return l&&e.reverse(),e},function(t){return t[l]}),t,e,[["w","e"],["n","s"]][l])},getCreatingRange:function(t){var e=Rb(t);return[pb(e[0][l],e[1][l]),gb(e[0][l],e[1][l])]},updateCoverShape:function(t,e,i,n){var o,a=Nb(t,e);if(!0!==a&&a.getLinearBrushOtherExtent)o=a.getLinearBrushOtherExtent(l,t._transform);else{var r=t._zr;o=[0,[r.getWidth(),r.getHeight()][1-l]]}var s=[i,o];l&&s.reverse(),Bb(t,e,s,n)},updateCommon:Vb,contain:jb}}function eS(i){return i=oS(i),function(t,e){return vl(t,i)}}function iS(o,a){return o=oS(o),function(t){var e=null!=a?a:t,i=e?o.width:o.height,n=e?o.x:o.y;return[n,n+(i||0)]}}function nS(n,o,a){return n=oS(n),function(t,e,i){return n.contain(e[0],e[1])&&!$y(t,o,a)}}function oS(t){return Di.create(t)}var aS=["axisLine","axisTickLabel","axisName"],rS=Af({type:"parallelAxis",init:function(t,e){rS.superApply(this,"init",arguments),(this._brushController=new Ib(e.getZr())).on("brush",A(this._onBrush,this))},render:function(t,e,i,n){if(!function(t,e,i){return i&&"axisAreaSelect"===i.type&&e.findComponents({mainType:"parallelAxis",query:i})[0]===t}(t,e,n)){this.axisModel=t,this.api=i,this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new Ci,this.group.add(this._axisGroup),t.get("show")){var a=function(t,e){return e.getComponent("parallel",t.get("parallelIndex"))}(t,e),r=a.coordinateSystem,s=t.getAreaSelectStyle(),l=s.width,u=t.axis.dim,h=P({strokeContainThreshold:l},r.getAxisLayout(u)),c=new Qm(t,h);E(aS,c.add,c),this._axisGroup.add(c.getGroup()),this._refreshBrushController(h,s,t,a,l,i);var d=n&&!1===n.animation?null:t;ml(o,this._axisGroup,d)}}},_refreshBrushController:function(t,e,i,n,o,a){var r=i.axis.getExtent(),s=r[1]-r[0],l=Math.min(30,.1*Math.abs(s)),u=Di.create({x:r[0],y:-o/2,width:s,height:o});u.x-=l,u.width+=2*l,this._brushController.mount({enableGlobalPan:!0,rotation:t.rotation,position:t.position}).setPanels([{panelId:"pl",clipPath:eS(u),isTargetByCursor:nS(u,a,n),getLinearBrushOtherExtent:iS(u,0)}]).enableBrush({brushType:"lineX",brushStyle:e,removeOnClick:!0}).updateCovers(function(t){var e=t.axis;return O(t.activeIntervals,function(t){return{brushType:"lineX",panelId:"pl",range:[e.dataToCoord(t[0],!0),e.dataToCoord(t[1],!0)]}})}(i))},_onBrush:function(t,e){var i=this.axisModel,n=i.axis,o=O(t,function(t){return[n.coordToData(t.range[0],!0),n.coordToData(t.range[1],!0)]});!i.option.realtime!==e.isEnd&&!e.removeOnClick||this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:i.id,intervals:o})},dispose:function(){this._brushController.dispose()}});Af({type:"parallel",render:function(t,e,i){this._model=t,this._api=i,this._handlers||(this._handlers={},E(sS,function(t,e){i.getZr().on(e,this._handlers[e]=A(t,this))},this)),kc(this,"_throttledDispatchExpand",t.get("axisExpandRate"),"fixRate")},dispose:function(t,i){E(this._handlers,function(t,e){i.getZr().off(e,t)}),this._handlers=null},_throttledDispatchExpand:function(t){this._dispatchExpand(t)},_dispatchExpand:function(t){t&&this._api.dispatchAction(P({type:"parallelAxisExpand"},t))}});var sS={mousedown:function(t){lS(this,"click")&&(this._mouseDownPoint=[t.offsetX,t.offsetY])},mouseup:function(t){var e=this._mouseDownPoint;if(lS(this,"click")&&e){var i=[t.offsetX,t.offsetY];if(5<Math.pow(e[0]-i[0],2)+Math.pow(e[1]-i[1],2))return;var n=this._model.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]);"none"!==n.behavior&&this._dispatchExpand({axisExpandWindow:n.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(t){if(!this._mouseDownPoint&&lS(this,"mousemove")){var e=this._model,i=e.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]),n=i.behavior;"jump"===n&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand("none"===n?null:{axisExpandWindow:i.axisExpandWindow,animation:"jump"===n&&null})}}};function lS(t,e){var i=t._model;return i.get("axisExpandable")&&i.get("axisExpandTriggerOn")===e}yf(function(t){!function(t){if(t.parallel)return;var e=!1;E(t.series,function(t){t&&"parallel"===t.type&&(e=!0)}),e&&(t.parallel=[{}])}(t),function(n){E(Vo(n.parallelAxis),function(t){if(z(t)){var e=t.parallelIndex||0,i=Vo(n.parallel)[e];i&&i.parallelAxisDefault&&m(t,i.parallelAxisDefault,!1)}})}(t)}),sc.extend({type:"series.parallel",dependencies:["parallel"],visualColorAccessPath:"lineStyle.color",getInitialData:function(t,e){var i=this.getSource();return function(t,e){if(t.encodeDefine)return;var i=e.ecModel.getComponent("parallel",e.get("parallelIndex"));if(!i)return;var n=t.encodeDefine=Q();E(i.dimensions,function(t){var e=function(t){return+t.replace("dim","")}(t);n.set(t,e)})}(i,this),gp(i,this)},getRawIndicesByActiveState:function(i){var t=this.coordinateSystem,n=this.getData(),o=[];return t.eachActiveState(n,function(t,e){i===t&&o.push(n.getRawIndex(e))}),o},defaultOption:{zlevel:0,z:2,coordinateSystem:"parallel",parallelIndex:0,label:{show:!1},inactiveOpacity:.05,activeOpacity:1,lineStyle:{width:1,opacity:.45,type:"solid"},emphasis:{label:{show:!1}},progressive:500,smooth:!1,animationEasing:"linear"}});_c.extend({type:"parallel",init:function(){this._dataGroup=new Ci,this.group.add(this._dataGroup),this._data,this._initialized},render:function(a,t,e,r){var i=this._dataGroup,s=a.getData(),l=this._data,u=a.coordinateSystem,h=u.dimensions,c=cS(a);if(s.diff(l).add(function(t){dS(hS(s,i,t,h,u),s,t,c)}).update(function(t,e){var i=l.getItemGraphicEl(e),n=uS(s,t,h,u);s.setItemGraphicEl(t,i);var o=r&&!1===r.animation?null:a;cl(i,{shape:{points:n}},o,t),dS(i,s,t,c)}).remove(function(t){var e=l.getItemGraphicEl(t);i.remove(e)}).execute(),!this._initialized){this._initialized=!0;var n=function(t,e,i){var n=t.model,o=t.getRect(),a=new rs({shape:{x:o.x,y:o.y,width:o.width,height:o.height}}),r="horizontal"===n.get("layout")?"width":"height";return a.setShape(r,0),dl(a,{shape:{width:o.width,height:o.height}},e,i),a}(u,a,function(){setTimeout(function(){i.removeClipPath()})});i.setClipPath(n)}this._data=s},incrementalPrepareRender:function(t,e,i){this._initialized=!0,this._data=null,this._dataGroup.removeAll()},incrementalRender:function(t,e,i){for(var n=e.getData(),o=e.coordinateSystem,a=o.dimensions,r=cS(e),s=t.start;s<t.end;s++){var l=hS(n,this._dataGroup,s,a,o);l.incremental=!0,dS(l,n,s,r)}},dispose:function(){},remove:function(){this._dataGroup&&this._dataGroup.removeAll(),this._data=null}});function uS(t,e,i,n){for(var o,a=[],r=0;r<i.length;r++){var s=i[r],l=t.get(t.mapDimension(s),e);o=l,("category"===n.getAxis(s).type?null==o:null==o||isNaN(o))||a.push(n.dataToPoint(l,s))}return a}function hS(t,e,i,n,o){var a=uS(t,i,n,o),r=new ts({shape:{points:a},silent:!0,z2:10});return e.add(r),t.setItemGraphicEl(i,r),r}function cS(t){var e=t.get("smooth",!0);return!0===e&&(e=.3),{lineStyle:t.getModel("lineStyle").getLineStyle(),smooth:null!=e?e:.3}}function dS(t,e,i,n){var o=n.lineStyle;e.hasItemOption&&(o=e.getItemModel(i).getModel("lineStyle").getLineStyle());t.useStyle(o);var a=t.style;a.fill=null,a.stroke=e.getItemVisual(i,"color"),a.opacity=e.getItemVisual(i,"opacity"),n.smooth&&(t.shape.smooth=n.smooth)}var fS=["lineStyle","normal","opacity"];Sf({seriesType:"parallel",reset:function(t,e,i){var n=t.getModel("itemStyle"),o=t.getModel("lineStyle"),a=e.get("color"),r=o.get("color")||n.get("color")||a[t.seriesIndex%a.length],s=t.get("inactiveOpacity"),l=t.get("activeOpacity"),u=t.getModel("lineStyle").getLineStyle(),h=t.coordinateSystem,c=t.getData(),d={normal:u.opacity,active:l,inactive:s};return c.setVisual("color",r),{progress:function(t,o){h.eachActiveState(o,function(t,e){var i=d[t];if("normal"===t&&o.hasItemOption){var n=o.getItemModel(e).get(fS,!0);null!=n&&(i=n)}o.setItemVisual(e,"opacity",i)},t.start,t.end)}}}});var pS=sc.extend({type:"series.sankey",layoutInfo:null,levelModels:null,getInitialData:function(t,e){for(var i=t.edges||t.links,n=t.data||t.nodes,o=t.levels,a=this.levelModels={},r=0;r<o.length;r++)null!=o[r].depth&&0<=o[r].depth&&(a[o[r].depth]=new Cl(o[r],this,e));if(n&&i)return iw(n,i,this,!0,function(t,e){t.wrapMethod("getItemModel",function(t,n){return t.customizeGetParent(function(t){var e=this.parentModel,i=e.getData().getItemLayout(n).depth;return e.levelModels[i]||this.parentModel}),t}),e.wrapMethod("getItemModel",function(t,n){return t.customizeGetParent(function(t){var e=this.parentModel,i=e.getGraph().getEdgeByIndex(n).node1.getLayout().depth;return e.levelModels[i]||this.parentModel}),t})}).data},setNodePosition:function(t,e){var i=this.option.data[t];i.localX=e[0],i.localY=e[1]},getGraph:function(){return this.getData().graph},getEdgeData:function(){return this.getGraph().edgeData},formatTooltip:function(t,e,i){if("edge"===i){var n=this.getDataParams(t,i),o=n.data,a=o.source+" -- "+o.target;return n.value&&(a+=" : "+n.value),au(a)}if("node"!==i)return pS.superCall(this,"formatTooltip",t,e);var r=this.getGraph().getNodeByIndex(t).getLayout().value,s=this.getDataParams(t,i).data.name;if(r)a=s+" : "+r;return au(a)},optionUpdated:function(){var t=this.option;!0===t.focusNodeAdjacency&&(t.focusNodeAdjacency="allEdges")},getDataParams:function(t,e){var i=pS.superCall(this,"getDataParams",t,e);if(null==i.value&&"node"===e){var n=this.getGraph().getNodeByIndex(t).getLayout().value;i.value=n}return i},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",layout:null,left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,focusNodeAdjacency:!1,layoutIterations:32,label:{show:!0,position:"right",color:"#000",fontSize:12},levels:[],nodeAlign:"justify",itemStyle:{borderWidth:1,borderColor:"#333"},lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},animationEasing:"linear",animationDuration:1e3}}),gS=["itemStyle","opacity"],mS=["emphasis","itemStyle","opacity"],vS=["lineStyle","opacity"],yS=["emphasis","lineStyle","opacity"];function xS(t,e){return t.getVisual("opacity")||t.getModel().get(e)}function _S(t,e,i){var n=t.getGraphicEl(),o=xS(t,e);null!=i&&(null==o&&(o=1),o*=i),n.downplay&&n.downplay(),n.traverse(function(t){"group"!==t.type&&t.setStyle("opacity",o)})}function wS(t,e){var i=xS(t,e),n=t.getGraphicEl();n.traverse(function(t){"group"!==t.type&&t.setStyle("opacity",i)}),n.highlight&&n.highlight()}var bS=Cs({shape:{x1:0,y1:0,x2:0,y2:0,cpx1:0,cpy1:0,cpx2:0,cpy2:0,extent:0,orient:""},buildPath:function(t,e){var i=e.extent;t.moveTo(e.x1,e.y1),t.bezierCurveTo(e.cpx1,e.cpy1,e.cpx2,e.cpy2,e.x2,e.y2),"vertical"===e.orient?(t.lineTo(e.x2+i,e.y2),t.bezierCurveTo(e.cpx2+i,e.cpy2,e.cpx1+i,e.cpy1,e.x1+i,e.y1)):(t.lineTo(e.x2,e.y2+i),t.bezierCurveTo(e.cpx2,e.cpy2+i,e.cpx1,e.cpy1+i,e.x1,e.y1+i)),t.closePath()},highlight:function(){this.trigger("emphasis")},downplay:function(){this.trigger("normal")}});Cf({type:"sankey",_model:null,_focusAdjacencyDisabled:!1,render:function(w,t,n){var o=this,e=w.getGraph(),b=this.group,i=w.layoutInfo,S=i.width,M=i.height,u=w.getData(),I=w.getData("edge"),T=w.get("orient");this._model=w,b.removeAll(),b.attr("position",[i.x,i.y]),e.eachEdge(function(t){var e=new bS;e.dataIndex=t.dataIndex,e.seriesIndex=w.seriesIndex,e.dataType="edge";var i,n,o,a,r,s,l,u,h=t.getModel("lineStyle"),c=h.get("curveness"),d=t.node1.getLayout(),f=t.node1.getModel(),p=f.get("localX"),g=f.get("localY"),m=t.node2.getLayout(),v=t.node2.getModel(),y=v.get("localX"),x=v.get("localY"),_=t.getLayout();switch(e.shape.extent=Math.max(1,_.dy),u="vertical"===(e.shape.orient=T)?(i=(null!=p?p*S:d.x)+_.sy,n=(null!=g?g*M:d.y)+d.dy,o=(null!=y?y*S:m.x)+_.ty,r=i,s=n*(1-c)+(a=null!=x?x*M:m.y)*c,l=o,n*c+a*(1-c)):(i=(null!=p?p*S:d.x)+d.dx,n=(null!=g?g*M:d.y)+_.sy,r=i*(1-c)+(o=null!=y?y*S:m.x)*c,s=n,l=i*c+o*(1-c),a=(null!=x?x*M:m.y)+_.ty),e.setShape({x1:i,y1:n,x2:o,y2:a,cpx1:r,cpy1:s,cpx2:l,cpy2:u}),e.setStyle(h.getItemStyle()),e.style.fill){case"source":e.style.fill=t.node1.getVisual("color");break;case"target":e.style.fill=t.node2.getVisual("color")}$s(e,t.getModel("emphasis.lineStyle").getItemStyle()),b.add(e),I.setItemGraphicEl(t.dataIndex,e)}),e.eachNode(function(t){var e=t.getLayout(),i=t.getModel(),n=i.get("localX"),o=i.get("localY"),a=i.getModel("label"),r=i.getModel("emphasis.label"),s=new rs({shape:{x:null!=n?n*S:e.x,y:null!=o?o*M:e.y,width:e.dx,height:e.dy},style:i.getModel("itemStyle").getItemStyle()}),l=t.getModel("emphasis.itemStyle").getItemStyle();el(s.style,l,a,r,{labelFetcher:w,labelDataIndex:t.dataIndex,defaultText:t.id,isRectText:!0}),s.setStyle("fill",t.getVisual("color")),$s(s,l),b.add(s),u.setItemGraphicEl(t.dataIndex,s),s.dataType="node"}),u.eachItemGraphicEl(function(t,i){var e=u.getItemModel(i);e.get("draggable")&&(t.drift=function(t,e){o._focusAdjacencyDisabled=!0,this.shape.x+=t,this.shape.y+=e,this.dirty(),n.dispatchAction({type:"dragNode",seriesId:w.id,dataIndex:u.getRawIndex(i),localX:this.shape.x/S,localY:this.shape.y/M})},t.ondragend=function(){o._focusAdjacencyDisabled=!1},t.draggable=!0,t.cursor="move"),t.highlight=function(){this.trigger("emphasis")},t.downplay=function(){this.trigger("normal")},t.focusNodeAdjHandler&&t.off("mouseover",t.focusNodeAdjHandler),t.unfocusNodeAdjHandler&&t.off("mouseout",t.unfocusNodeAdjHandler),e.get("focusNodeAdjacency")&&(t.on("mouseover",t.focusNodeAdjHandler=function(){o._focusAdjacencyDisabled||(o._clearTimer(),n.dispatchAction({type:"focusNodeAdjacency",seriesId:w.id,dataIndex:t.dataIndex}))}),t.on("mouseout",t.unfocusNodeAdjHandler=function(){o._focusAdjacencyDisabled||o._dispatchUnfocus(n)}))}),I.eachItemGraphicEl(function(t,e){var i=I.getItemModel(e);t.focusNodeAdjHandler&&t.off("mouseover",t.focusNodeAdjHandler),t.unfocusNodeAdjHandler&&t.off("mouseout",t.unfocusNodeAdjHandler),i.get("focusNodeAdjacency")&&(t.on("mouseover",t.focusNodeAdjHandler=function(){o._focusAdjacencyDisabled||(o._clearTimer(),n.dispatchAction({type:"focusNodeAdjacency",seriesId:w.id,edgeDataIndex:t.dataIndex}))}),t.on("mouseout",t.unfocusNodeAdjHandler=function(){o._focusAdjacencyDisabled||o._dispatchUnfocus(n)}))}),!this._data&&w.get("animation")&&b.setClipPath(function(t,e,i){var n=new rs({shape:{x:t.x-10,y:t.y-10,width:0,height:t.height+20}});return dl(n,{shape:{width:t.width+20}},e,i),n}(b.getBoundingRect(),w,function(){b.removeClipPath()})),this._data=w.getData()},dispose:function(){this._clearTimer()},_dispatchUnfocus:function(t){var e=this;this._clearTimer(),this._unfocusDelayTimer=setTimeout(function(){e._unfocusDelayTimer=null,t.dispatchAction({type:"unfocusNodeAdjacency",seriesId:e._model.id})},500)},_clearTimer:function(){this._unfocusDelayTimer&&(clearTimeout(this._unfocusDelayTimer),this._unfocusDelayTimer=null)},focusNodeAdjacency:function(t,e,i,n){var o=t.getData(),a=o.graph,r=n.dataIndex,s=o.getItemModel(r),l=n.edgeDataIndex;if(null!=r||null!=l){var u=a.getNodeByIndex(r),h=a.getEdgeByIndex(l);if(a.eachNode(function(t){_S(t,gS,.1)}),a.eachEdge(function(t){_S(t,vS,.1)}),u){wS(u,mS);var c=s.get("focusNodeAdjacency");"outEdges"===c?E(u.outEdges,function(t){t.dataIndex<0||(wS(t,yS),wS(t.node2,mS))}):"inEdges"===c?E(u.inEdges,function(t){t.dataIndex<0||(wS(t,yS),wS(t.node1,mS))}):"allEdges"===c&&E(u.edges,function(t){t.dataIndex<0||(wS(t,yS),t.node1!==u&&wS(t.node1,mS),t.node2!==u&&wS(t.node2,mS))})}h&&(wS(h,yS),wS(h.node1,mS),wS(h.node2,mS))}},unfocusNodeAdjacency:function(t,e,i,n){var o=t.getGraph();o.eachNode(function(t){_S(t,gS)}),o.eachEdge(function(t){_S(t,vS)})}}),_f({type:"dragNode",event:"dragnode",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"sankey",query:e},function(t){t.setNodePosition(e.dataIndex,[e.localX,e.localY])})});function SS(t){var e=t.hostGraph.data.getRawDataItem(t.dataIndex);return null!=e.depth&&0<=e.depth}function MS(t,l,u,h,c){var d="vertical"===c?"x":"y";E(t,function(t){var e,i,n;t.sort(function(t,e){return t.getLayout()[d]-e.getLayout()[d]});for(var o=0,a=t.length,r="vertical"===c?"dx":"dy",s=0;s<a;s++)0<(n=o-(i=t[s]).getLayout()[d])&&(e=i.getLayout()[d]+n,"vertical"===c?i.setLayout({x:e},!0):i.setLayout({y:e},!0)),o=i.getLayout()[d]+i.getLayout()[r]+l;if(0<(n=o-l-("vertical"===c?h:u)))for(e=i.getLayout()[d]-n,"vertical"===c?i.setLayout({x:e},!0):i.setLayout({y:e},!0),o=e,s=a-2;0<=s;--s)0<(n=(i=t[s]).getLayout()[d]+i.getLayout()[r]+l-o)&&(e=i.getLayout()[d]-n,"vertical"===c?i.setLayout({x:e},!0):i.setLayout({y:e},!0)),o=i.getLayout()[d]})}function IS(t,a,r){E(t.slice().reverse(),function(t){E(t,function(t){if(t.outEdges.length){var e=PS(t.outEdges,TS,r)/PS(t.outEdges,kS,r);if(isNaN(e)){var i=t.outEdges.length;e=i?PS(t.outEdges,AS,r)/i:0}if("vertical"===r){var n=t.getLayout().x+(e-LS(t,r))*a;t.setLayout({x:n},!0)}else{var o=t.getLayout().y+(e-LS(t,r))*a;t.setLayout({y:o},!0)}}})})}function TS(t,e){return LS(t.node2,e)*t.getValue()}function AS(t,e){return LS(t.node2,e)}function DS(t,e){return LS(t.node1,e)*t.getValue()}function CS(t,e){return LS(t.node1,e)}function LS(t,e){return"vertical"===e?t.getLayout().x+t.getLayout().dx/2:t.getLayout().y+t.getLayout().dy/2}function kS(t){return t.getValue()}function PS(t,e,i){for(var n=0,o=t.length,a=-1;++a<o;){var r=+e.call(t,t[a],i);isNaN(r)||(n+=r)}return n}function NS(t,a,r){E(t,function(t){E(t,function(t){if(t.inEdges.length){var e=PS(t.inEdges,DS,r)/PS(t.inEdges,kS,r);if(isNaN(e)){var i=t.inEdges.length;e=i?PS(t.inEdges,CS,r)/i:0}if("vertical"===r){var n=t.getLayout().x+(e-LS(t,r))*a;t.setLayout({x:n},!0)}else{var o=t.getLayout().y+(e-LS(t,r))*a;t.setLayout({y:o},!0)}}})})}bf(function(t,u,e){t.eachSeriesByType("sankey",function(t){var e=t.get("nodeWidth"),i=t.get("nodeGap"),n=function(t,e){return bu(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,u),o=(t.layoutInfo=n).width,a=n.height,r=t.getGraph(),s=r.nodes,l=r.edges;!function(t){E(t,function(t){var e=PS(t.outEdges,kS),i=PS(t.inEdges,kS),n=t.getValue()||0,o=Math.max(e,i,n);t.setLayout({value:o},!0)})}(s),function(t,e,i,n,o,a,r,s,l){(function(t,e,i,n,o,a,r){for(var s=[],l=[],u=[],h=[],c=0,d=0;d<e.length;d++)s[d]=1;for(d=0;d<t.length;d++)l[d]=t[d].inEdges.length,0===l[d]&&u.push(t[d]);var f=-1;for(;u.length;){for(var p=0;p<u.length;p++){var g=u[p],m=g.hostGraph.data.getRawDataItem(g.dataIndex),v=null!=m.depth&&0<=m.depth;v&&m.depth>f&&(f=m.depth),g.setLayout({depth:v?m.depth:c},!0),"vertical"===a?g.setLayout({dy:i},!0):g.setLayout({dx:i},!0);for(var y=0;y<g.outEdges.length;y++){var x=g.outEdges[y],_=e.indexOf(x);s[_]=0;var w=x.node2,b=t.indexOf(w);0==--l[b]&&h.indexOf(w)<0&&h.push(w)}}++c,u=h,h=[]}for(d=0;d<s.length;d++)if(1===s[d])throw new Error("Sankey is a DAG, the original data has cycle!");var S=c-1<f?f:c-1;r&&"left"!==r&&function(t,e,i,n){if("right"===e){for(var o=[],a=t,r=0;a.length;){for(var s=0;s<a.length;s++){var l=a[s];l.setLayout({skNodeHeight:r},!0);for(var u=0;u<l.inEdges.length;u++){var h=l.inEdges[u];o.indexOf(h.node1)<0&&o.push(h.node1)}}a=o,o=[],++r}E(t,function(t){SS(t)||t.setLayout({depth:Math.max(0,n-t.getLayout().skNodeHeight)},!0)})}else"justify"===e&&function(t,e){E(t,function(t){SS(t)||t.outEdges.length||t.setLayout({depth:e},!0)})}(t,n)}(t,r,0,S);!function(t,i,n){E(t,function(t){var e=t.getLayout().depth*i;"vertical"===n?t.setLayout({y:e},!0):t.setLayout({x:e},!0)})}(t,"vertical"===a?(o-i)/S:(n-i)/S,a)})(t,e,i,o,a,s,l),function(t,e,i,n,o,a,r){var s=function(t,e){var i=[],n="vertical"===e?"y":"x",o=ta(t,function(t){return t.getLayout()[n]});return o.keys.sort(function(t,e){return t-e}),E(o.keys,function(t){i.push(o.buckets.get(t))}),i}(t,r);(function(t,e,o,a,r,s){var l=1/0;E(t,function(t){var e=t.length,i=0;E(t,function(t){i+=t.getLayout().value});var n="vertical"===s?(a-(e-1)*r)/i:(o-(e-1)*r)/i;n<l&&(l=n)}),E(t,function(t){E(t,function(t,e){var i=t.getLayout().value*l;"vertical"===s?(t.setLayout({x:e},!0),t.setLayout({dx:i},!0)):(t.setLayout({y:e},!0),t.setLayout({dy:i},!0))})}),E(e,function(t){var e=+t.getValue()*l;t.setLayout({dy:e},!0)})})(s,e,i,n,o,r),MS(s,o,i,n,r);for(var l=1;0<a;a--)IS(s,l*=.99,r),MS(s,o,i,n,r),NS(s,l,r),MS(s,o,i,n,r)}(t,e,a,o,n,r,s),function(t,e){var i="vertical"===e?"x":"y";E(t,function(t){t.outEdges.sort(function(t,e){return t.node2.getLayout()[i]-e.node2.getLayout()[i]}),t.inEdges.sort(function(t,e){return t.node1.getLayout()[i]-e.node1.getLayout()[i]})}),E(t,function(t){var e=0,i=0;E(t.outEdges,function(t){t.setLayout({sy:e},!0),e+=t.getLayout().dy}),E(t.inEdges,function(t){t.setLayout({ty:i},!0),i+=t.getLayout().dy})})}(t,s)}(s,l,e,i,o,a,0!==M(s,function(t){return 0===t.getLayout().value}).length?0:t.get("layoutIterations"),t.get("orient"),t.get("nodeAlign"))})}),Sf(function(t,e){t.eachSeriesByType("sankey",function(n){var t=n.getGraph().nodes;if(t.length){var o=1/0,a=-1/0;E(t,function(t){var e=t.getLayout().value;e<o&&(o=e),a<e&&(a=e)}),E(t,function(t){var e=new g_({type:"color",mappingMethod:"linear",dataExtent:[o,a],visual:n.get("color")}).mapValueToVisual(t.getLayout().value),i=t.getModel().get("itemStyle.color");null!=i?t.setVisual("color",i):t.setVisual("color",e)})}})});var OS={_baseAxisDim:null,getInitialData:function(t,e){var i,n,o=e.getComponent("xAxis",this.get("xAxisIndex")),a=e.getComponent("yAxis",this.get("yAxisIndex")),r=o.get("type"),s=a.get("type");"category"===r?(t.layout="horizontal",i=o.getOrdinalMeta(),n=!0):"category"===s?(t.layout="vertical",i=a.getOrdinalMeta(),n=!0):t.layout=t.layout||"horizontal";var l=["x","y"],u="horizontal"===t.layout?0:1,h=this._baseAxisDim=l[u],c=l[1-u],d=[o,a],f=d[u].get("type"),p=d[1-u].get("type"),g=t.data;if(g&&n){var m=[];E(g,function(t,e){var i;t.value&&L(t.value)?(i=t.value.slice(),t.value.unshift(e)):L(t)?(i=t.slice(),t.unshift(e)):i=t,m.push(i)}),t.data=m}var v=this.defaultValueDimensions,y=[{name:h,type:Ef(f),ordinalMeta:i,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:c,type:Ef(p),dimsDef:v.slice()}];return Yv(this,{coordDimensions:y,dimensionsCount:v.length+1,encodeDefaulter:T($u,y,this)})},getBaseAxis:function(){var t=this._baseAxisDim;return this.ecModel.getComponent(t+"Axis",this.get(t+"AxisIndex")).axis}};b(sc.extend({type:"series.boxplot",dependencies:["xAxis","yAxis","grid"],defaultValueDimensions:[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],dimensions:null,defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:2,shadowOffsetY:2,shadowColor:"rgba(0,0,0,0.4)"}},animationEasing:"elasticOut",animationDuration:800}}),OS,!0);var ES=["itemStyle"],RS=["emphasis","itemStyle"],zS=(_c.extend({type:"boxplot",render:function(t,e,i){var o=t.getData(),a=this.group,r=this._data;this._data||a.removeAll();var s="horizontal"===t.get("layout")?1:0;o.diff(r).add(function(t){if(o.hasValue(t)){var e=BS(o.getItemLayout(t),o,t,s,!0);o.setItemGraphicEl(t,e),a.add(e)}}).update(function(t,e){var i=r.getItemGraphicEl(e);if(o.hasValue(t)){var n=o.getItemLayout(t);i?VS(n,i,o,t):i=BS(n,o,t,s),a.add(i),o.setItemGraphicEl(t,i)}else a.remove(i)}).remove(function(t){var e=r.getItemGraphicEl(t);e&&a.remove(e)}).execute(),this._data=o},remove:function(t){var e=this.group,i=this._data;this._data=null,i&&i.eachItemGraphicEl(function(t){t&&e.remove(t)})},dispose:et}),Ar.extend({type:"boxplotBoxPath",shape:{},buildPath:function(t,e){var i=e.points,n=0;for(t.moveTo(i[n][0],i[n][1]),n++;n<4;n++)t.lineTo(i[n][0],i[n][1]);for(t.closePath();n<i.length;n++)t.moveTo(i[n][0],i[n][1]),n++,t.lineTo(i[n][0],i[n][1])}}));function BS(t,e,i,n,o){var a=t.ends,r=new zS({shape:{points:o?function(t,e,i){return O(t,function(t){return(t=t.slice())[e]=i.initBaseline,t})}(a,n,t):a}});return VS(t,r,e,i,o),r}function VS(t,e,i,n,o){var a=i.hostModel;(0,bl[o?"initProps":"updateProps"])(e,{shape:{points:t.ends}},a,n);var r=i.getItemModel(n),s=r.getModel(ES),l=i.getItemVisual(n,"color"),u=s.getItemStyle(["borderColor"]);u.stroke=l,u.strokeNoScale=!0,e.useStyle(u),e.z2=100,$s(e,r.getModel(RS).getItemStyle())}var GS=["itemStyle","borderColor"],FS=E;Sf(function(n,t){var o=n.get("color");n.eachRawSeriesByType("boxplot",function(t){var e=o[t.seriesIndex%o.length],i=t.getData();i.setVisual({legendSymbol:"roundRect",color:t.get(GS)||e}),n.isSeriesFiltered(t)||i.each(function(t){var e=i.getItemModel(t);i.setItemVisual(t,{color:e.get(GS,!0)})})})}),bf(function(t){var e=function(t){var n=[],o=[];return t.eachSeriesByType("boxplot",function(t){var e=t.getBaseAxis(),i=_(o,e);i<0&&(i=o.length,o[i]=e,n[i]={axis:e,seriesModels:[]}),n[i].seriesModels.push(t)}),n}(t);FS(e,function(i){var t=i.seriesModels;t.length&&(function(t){var e,i,n=t.axis,o=t.seriesModels,a=o.length,r=t.boxWidthList=[],s=t.boxOffsetList=[],l=[];if("category"===n.type)i=n.getBandWidth();else{var u=0;FS(o,function(t){u=Math.max(u,t.getData().count())}),e=n.getExtent(),Math.abs(e[1]-e[0])}FS(o,function(t){var e=t.get("boxWidth");L(e)||(e=[e,e]),l.push([Rl(e[0],i)||0,Rl(e[1],i)||0])});var h=.8*i-2,c=h/a*.3,d=(h-c*(a-1))/a,f=d/2-h/2;FS(o,function(t,e){s.push(f),f+=c+d,r.push(Math.min(Math.max(d,l[e][0]),l[e][1]))})}(i),FS(t,function(t,e){!function(t,r,e){var s=t.coordinateSystem,l=t.getData(),a=e/2,u="horizontal"===t.get("layout")?0:1,h=1-u,i=["x","y"],n=l.mapDimension(i[u]),o=l.mapDimension(i[h],!0);if(null==n||o.length<5)return;for(var c=0;c<l.count();c++){var d=l.get(n,c),f=x(d,o[2],c),p=x(d,o[0],c),g=x(d,o[1],c),m=x(d,o[3],c),v=x(d,o[4],c),y=[];_(y,g,0),_(y,m,1),y.push(p,g,v,m),w(y,p),w(y,v),w(y,f),l.setItemLayout(c,{initBaseline:f[h],ends:y})}function x(t,e,i){var n,o=l.get(e,i),a=[];return a[u]=t,a[h]=o,isNaN(t)||isNaN(o)?n=[NaN,NaN]:(n=s.dataToPoint(a))[u]+=r,n}function _(t,e,i){var n=e.slice(),o=e.slice();n[u]+=a,o[u]-=a,i?t.push(n,o):t.push(o,n)}function w(t,e){var i=e.slice(),n=e.slice();i[u]-=a,n[u]+=a,t.push(i,n)}}(t,i.boxOffsetList[e],i.boxWidthList[e])}))})}),b(sc.extend({type:"series.candlestick",dependencies:["xAxis","yAxis","grid"],defaultValueDimensions:[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],dimensions:null,defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,layout:null,clip:!0,itemStyle:{color:"#c23531",color0:"#314656",borderWidth:1,borderColor:"#c23531",borderColor0:"#314656"},emphasis:{itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationUpdate:!1,animationEasing:"linear",animationDuration:300},getShadowDim:function(){return"open"},brushSelector:function(t,e,i){var n=e.getItemLayout(t);return n&&i.rect(n.brushRect)}}),OS,!0);var WS=["itemStyle"],HS=["emphasis","itemStyle"],ZS=["color","color0","borderColor","borderColor0"],US=(_c.extend({type:"candlestick",render:function(t,e,i){this.group.removeClipPath(),this._updateDrawMode(t),this._isLargeDraw?this._renderLarge(t):this._renderNormal(t)},incrementalPrepareRender:function(t,e,i){this._clear(),this._updateDrawMode(t)},incrementalRender:function(t,e,i,n){this._isLargeDraw?this._incrementalRenderLarge(t,e):this._incrementalRenderNormal(t,e)},_updateDrawMode:function(t){var e=t.pipelineContext.large;(null==this._isLargeDraw||e^this._isLargeDraw)&&(this._isLargeDraw=e,this._clear())},_renderNormal:function(o){var a=o.getData(),r=this._data,s=this.group,l=a.getLayout("isSimpleBox"),u=o.get("clip",!0),t=o.coordinateSystem,h=t.getArea&&t.getArea();this._data||s.removeAll(),a.diff(r).add(function(t){if(a.hasValue(t)){var e,i=a.getItemLayout(t);if(u&&YS(h,i))return;dl(e=XS(i,t,!0),{shape:{points:i.ends}},o,t),jS(e,a,t,l),s.add(e),a.setItemGraphicEl(t,e)}}).update(function(t,e){var i=r.getItemGraphicEl(e);if(a.hasValue(t)){var n=a.getItemLayout(t);u&&YS(h,n)?s.remove(i):(i?cl(i,{shape:{points:n.ends}},o,t):i=XS(n,t),jS(i,a,t,l),s.add(i),a.setItemGraphicEl(t,i))}else s.remove(i)}).remove(function(t){var e=r.getItemGraphicEl(t);e&&s.remove(e)}).execute(),this._data=a},_renderLarge:function(t){this._clear(),KS(t,this.group);var e=t.get("clip",!0)?Sm(t.coordinateSystem,!1,t):null;e?this.group.setClipPath(e):this.group.removeClipPath()},_incrementalRenderNormal:function(t,e){for(var i,n=e.getData(),o=n.getLayout("isSimpleBox");null!=(i=t.next());){var a;jS(a=XS(n.getItemLayout(i),i),n,i,o),a.incremental=!0,this.group.add(a)}},_incrementalRenderLarge:function(t,e){KS(e,this.group,!0)},remove:function(t){this._clear()},_clear:function(){this.group.removeAll(),this._data=null},dispose:et}),Ar.extend({type:"normalCandlestickBox",shape:{},buildPath:function(t,e){var i=e.points;this.__simpleBox?(t.moveTo(i[4][0],i[4][1]),t.lineTo(i[6][0],i[6][1])):(t.moveTo(i[0][0],i[0][1]),t.lineTo(i[1][0],i[1][1]),t.lineTo(i[2][0],i[2][1]),t.lineTo(i[3][0],i[3][1]),t.closePath(),t.moveTo(i[4][0],i[4][1]),t.lineTo(i[5][0],i[5][1]),t.moveTo(i[6][0],i[6][1]),t.lineTo(i[7][0],i[7][1]))}}));function XS(t,e,i){var n=t.ends;return new US({shape:{points:i?function(t,e){return O(t,function(t){return(t=t.slice())[1]=e.initBaseline,t})}(n,t):n},z2:100})}function YS(t,e){for(var i=!0,n=0;n<e.ends.length;n++)if(t.contain(e.ends[n][0],e.ends[n][1])){i=!1;break}return i}function jS(t,e,i,n){var o=e.getItemModel(i),a=o.getModel(WS),r=e.getItemVisual(i,"color"),s=e.getItemVisual(i,"borderColor")||r,l=a.getItemStyle(ZS);t.useStyle(l),t.style.strokeNoScale=!0,t.style.fill=r,t.style.stroke=s,t.__simpleBox=n,$s(t,o.getModel(HS).getItemStyle())}var qS=Ar.extend({type:"largeCandlestickBox",shape:{},buildPath:function(t,e){for(var i=e.points,n=0;n<i.length;)if(this.__sign===i[n++]){var o=i[n++];t.moveTo(o,i[n++]),t.lineTo(o,i[n++])}else n+=3}});function KS(t,e,i){var n=t.getData(),o=n.getLayout("largePoints"),a=new qS({shape:{points:o},__sign:1});e.add(a);var r=new qS({shape:{points:o},__sign:-1});e.add(r),$S(1,a,t,n),$S(-1,r,t,n),i&&(a.incremental=!0,r.incremental=!0)}function $S(t,e,i,n){var o=0<t?"P":"N",a=n.getVisual("borderColor"+o)||n.getVisual("color"+o),r=i.getModel(WS).getItemStyle(ZS);e.useStyle(r),e.style.fill=null,e.style.stroke=a}var JS=["itemStyle","borderColor"],QS=["itemStyle","borderColor0"],tM=["itemStyle","color"],eM=["itemStyle","color0"],iM={seriesType:"candlestick",plan:vc(),performRawSeries:!0,reset:function(t,e){if(t.getData().setVisual({legendSymbol:"roundRect",colorP:a(1,t),colorN:a(-1,t),borderColorP:r(1,t),borderColorN:r(-1,t)}),!e.isSeriesFiltered(t))return!t.pipelineContext.large&&{progress:function(t,e){var i;for(;null!=(i=t.next());){var n=e.getItemModel(i),o=e.getItemLayout(i).sign;e.setItemVisual(i,{color:a(o,n),borderColor:r(o,n)})}}};function a(t,e){return e.get(0<t?tM:eM)}function r(t,e){return e.get(0<t?JS:QS)}}},nM="undefined"!=typeof Float32Array?Float32Array:Array,oM={seriesType:"candlestick",plan:vc(),reset:function(t){var x=t.coordinateSystem,e=t.getData(),_=function(t,e){var i,n=t.getBaseAxis(),o="category"===n.type?n.getBandWidth():(i=n.getExtent(),Math.abs(i[1]-i[0])/e.count()),a=Rl(H(t.get("barMaxWidth"),o),o),r=Rl(H(t.get("barMinWidth"),1),o),s=t.get("barWidth");return null!=s?Rl(s,o):Math.max(Math.min(o/2,a),r)}(t,e),i=["x","y"],w=e.mapDimension(i[0]),n=e.mapDimension(i[1],!0),b=n[0],S=n[1],M=n[2],I=n[3];if(e.setLayout({candleWidth:_,isSimpleBox:_<=1.3}),!(null==w||n.length<4))return{progress:t.pipelineContext.large?function(t,e){var i,n,o=new nM(4*t.count),a=0,r=[],s=[];for(;null!=(n=t.next());){var l=e.get(w,n),u=e.get(b,n),h=e.get(S,n),c=e.get(M,n),d=e.get(I,n);isNaN(l)||isNaN(c)||isNaN(d)?(o[a++]=NaN,a+=3):(o[a++]=aM(e,n,u,h,S),r[0]=l,r[1]=c,i=x.dataToPoint(r,null,s),o[a++]=i?i[0]:NaN,o[a++]=i?i[1]:NaN,r[1]=d,i=x.dataToPoint(r,null,s),o[a++]=i?i[1]:NaN)}e.setLayout("largePoints",o)}:function(t,e){var i;for(;null!=(i=t.next());){var n=e.get(w,i),o=e.get(b,i),a=e.get(S,i),r=e.get(M,i),s=e.get(I,i),l=Math.min(o,a),u=Math.max(o,a),h=g(l,n),c=g(u,n),d=g(r,n),f=g(s,n),p=[];m(p,c,0),m(p,h,1),p.push(y(f),y(c),y(d),y(h)),e.setItemLayout(i,{sign:aM(e,i,o,a,S),initBaseline:a<o?c[1]:h[1],ends:p,brushRect:v(r,s,n)})}function g(t,e){var i=[];return i[0]=e,i[1]=t,isNaN(e)||isNaN(t)?[NaN,NaN]:x.dataToPoint(i)}function m(t,e,i){var n=e.slice(),o=e.slice();n[0]=zs(n[0]+_/2,1,!1),o[0]=zs(o[0]-_/2,1,!0),i?t.push(n,o):t.push(o,n)}function v(t,e,i){var n=g(t,i),o=g(e,i);return n[0]-=_/2,o[0]-=_/2,{x:n[0],y:n[1],width:_,height:o[1]-n[1]}}function y(t){return t[0]=zs(t[0],1),t}}}}};function aM(t,e,i,n,o){return n<i?-1:i<n?1:0<e?t.get(o,e-1)<=n?1:-1:1}yf(function(t){t&&L(t.series)&&E(t.series,function(t){z(t)&&"k"===t.type&&(t.type="candlestick")})}),Sf(iM),bf(oM),sc.extend({type:"series.effectScatter",dependencies:["grid","polar"],getInitialData:function(t,e){return gp(this.getSource(),this,{useEncodeDefaulter:!0})},brushSelector:"point",defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,effectType:"ripple",progressive:0,showEffectOn:"render",rippleEffect:{period:4,scale:2.5,brushType:"fill"},symbolSize:10}});function rM(t,e){var i=e.rippleEffectColor||e.color;t.eachChild(function(t){t.attr({z:e.z,zlevel:e.zlevel,style:{stroke:"stroke"===e.brushType?i:null,fill:"fill"===e.brushType?i:null}})})}function sM(t,e){Ci.call(this);var i=new Xg(t,e),n=new Ci;this.add(i),this.add(n),n.beforeUpdate=function(){this.attr(i.getScale())},this.updateData(t,e)}var lM=sM.prototype;lM.stopEffectAnimation=function(){this.childAt(1).removeAll()},lM.startEffectAnimation=function(t){for(var e=t.symbolType,i=t.color,n=this.childAt(1),o=0;o<3;o++){var a=wg(e,-1,-1,2,2,i);a.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scale:[.5,.5]});var r=-o/3*t.period+t.effectOffset;a.animate("",!0).when(t.period,{scale:[t.rippleScale/2,t.rippleScale/2]}).delay(r).start(),a.animateStyle(!0).when(t.period,{opacity:0}).delay(r).start(),n.add(a)}rM(n,t)},lM.updateEffectAnimation=function(t){for(var e=this._effectCfg,i=this.childAt(1),n=["symbolType","period","rippleScale"],o=0;o<n.length;o++){var a=n[o];if(e[a]!==t[a])return this.stopEffectAnimation(),void this.startEffectAnimation(t)}rM(i,t)},lM.highlight=function(){this.trigger("emphasis")},lM.downplay=function(){this.trigger("normal")},lM.updateData=function(t,e){var i=t.hostModel;this.childAt(0).updateData(t,e);var n=this.childAt(1),o=t.getItemModel(e),a=t.getItemVisual(e,"symbol"),r=function(t){return L(t)||(t=[+t,+t]),t}(t.getItemVisual(e,"symbolSize")),s=t.getItemVisual(e,"color");n.attr("scale",r),n.traverse(function(t){t.attr({fill:s})});var l=o.getShallow("symbolOffset");if(l){var u=n.position;u[0]=Rl(l[0],r[0]),u[1]=Rl(l[1],r[1])}var h=t.getItemVisual(e,"symbolRotate");n.rotation=(h||0)*Math.PI/180||0;var c={};if(c.showEffectOn=i.get("showEffectOn"),c.rippleScale=o.get("rippleEffect.scale"),c.brushType=o.get("rippleEffect.brushType"),c.period=1e3*o.get("rippleEffect.period"),c.effectOffset=e/t.count(),c.z=o.getShallow("z")||0,c.zlevel=o.getShallow("zlevel")||0,c.symbolType=a,c.color=s,c.rippleEffectColor=o.get("rippleEffect.color"),this.off("mouseover").off("mouseout").off("emphasis").off("normal"),"render"===c.showEffectOn)this._effectCfg?this.updateEffectAnimation(c):this.startEffectAnimation(c),this._effectCfg=c;else{this._effectCfg=null,this.stopEffectAnimation();var d=this.childAt(0),f=function(){d.highlight(),"render"!==c.showEffectOn&&this.startEffectAnimation(c)},p=function(){d.downplay(),"render"!==c.showEffectOn&&this.stopEffectAnimation()};this.on("mouseover",f,this).on("mouseout",p,this).on("emphasis",f,this).on("normal",p,this)}this._effectCfg=c},lM.fadeOut=function(t){this.off("mouseover").off("mouseout").off("emphasis").off("normal"),t&&t()},w(sM,Ci),Cf({type:"effectScatter",init:function(){this._symbolDraw=new im(sM)},render:function(t,e,i){var n=t.getData(),o=this._symbolDraw;o.updateData(n),this.group.add(o.group)},updateTransform:function(t,e,i){var n=t.getData();this.group.dirty();var o=km().reset(t);o.progress&&o.progress({start:0,end:n.count()},n),this._symbolDraw.updateLayout(n)},_updateGroupTransform:function(t){var e=t.coordinateSystem;e&&e.getRoamTransform&&(this.group.transform=fe(e.getRoamTransform()),this.group.decomposeTransform())},remove:function(t,e){this._symbolDraw&&this._symbolDraw.remove(e)},dispose:function(){}}),Sf(Lm("effectScatter","circle")),bf(km("effectScatter"));var uM="undefined"==typeof Uint32Array?Array:Uint32Array,hM="undefined"==typeof Float64Array?Array:Float64Array;function cM(t){var e=t.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(t.data=O(e,function(t){var e={coords:[t[0].coord,t[1].coord]};return t[0].name&&(e.fromName=t[0].name),t[1].name&&(e.toName=t[1].name),p([e,t[0],t[1]])}))}var dM=sc.extend({type:"series.lines",dependencies:["grid","polar"],visualColorAccessPath:"lineStyle.color",init:function(t){t.data=t.data||[],cM(t);var e=this._processFlatCoordsArray(t.data);this._flatCoords=e.flatCoords,this._flatCoordsOffset=e.flatCoordsOffset,e.flatCoords&&(t.data=new Float32Array(e.count)),dM.superApply(this,"init",arguments)},mergeOption:function(t){if(t.data=t.data||[],cM(t),t.data){var e=this._processFlatCoordsArray(t.data);this._flatCoords=e.flatCoords,this._flatCoordsOffset=e.flatCoordsOffset,e.flatCoords&&(t.data=new Float32Array(e.count))}dM.superApply(this,"mergeOption",arguments)},appendData:function(t){var e=this._processFlatCoordsArray(t.data);e.flatCoords&&(this._flatCoords?(this._flatCoords=tt(this._flatCoords,e.flatCoords),this._flatCoordsOffset=tt(this._flatCoordsOffset,e.flatCoordsOffset)):(this._flatCoords=e.flatCoords,this._flatCoordsOffset=e.flatCoordsOffset),t.data=new Float32Array(e.count)),this.getRawData().appendData(t.data)},_getCoordsFromItemModel:function(t){var e=this.getData().getItemModel(t);return e.option instanceof Array?e.option:e.getShallow("coords")},getLineCoordsCount:function(t){return this._flatCoordsOffset?this._flatCoordsOffset[2*t+1]:this._getCoordsFromItemModel(t).length},getLineCoords:function(t,e){if(this._flatCoordsOffset){for(var i=this._flatCoordsOffset[2*t],n=this._flatCoordsOffset[2*t+1],o=0;o<n;o++)e[o]=e[o]||[],e[o][0]=this._flatCoords[i+2*o],e[o][1]=this._flatCoords[i+2*o+1];return n}var a=this._getCoordsFromItemModel(t);for(o=0;o<a.length;o++)e[o]=e[o]||[],e[o][0]=a[o][0],e[o][1]=a[o][1];return a.length},_processFlatCoordsArray:function(t){var e=0;if(this._flatCoords&&(e=this._flatCoords.length),"number"!=typeof t[0])return{flatCoordsOffset:null,flatCoords:null,count:t.length};for(var i=t.length,n=new uM(i),o=new hM(i),a=0,r=0,s=0,l=0;l<i;){s++;var u=t[l++];n[r++]=a+e,n[r++]=u;for(var h=0;h<u;h++){var c=t[l++],d=t[l++];o[a++]=c,o[a++]=d}}return{flatCoordsOffset:new Uint32Array(n.buffer,0,r),flatCoords:o,count:s}},getInitialData:function(t,e){var a=new Yf(["value"],this);return a.hasItemOption=!1,a.initData(t.data,[],function(t,e,i,n){if(t instanceof Array)return NaN;a.hasItemOption=!0;var o=t.value;return null!=o?o instanceof Array?o[n]:o:void 0}),a},formatTooltip:function(t){var e=this.getData().getItemModel(t),i=e.get("name");if(i)return i;var n=e.get("fromName"),o=e.get("toName"),a=[];return null!=n&&a.push(n),null!=o&&a.push(o),au(a.join(" > "))},preventIncremental:function(){return!!this.get("effect.show")},getProgressive:function(){var t=this.option.progressive;return null==t?this.option.large?1e4:this.get("progressive"):t},getProgressiveThreshold:function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?2e4:this.get("progressiveThreshold"):t},defaultOption:{coordinateSystem:"geo",zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}}});function fM(t,e,i){Ci.call(this),this.add(this.createLine(t,e,i)),this._updateEffectSymbol(t,e)}var pM=fM.prototype;function gM(t,e,i){Ci.call(this),this._createPolyline(t,e,i)}pM.createLine=function(t,e,i){return new dw(t,e,i)},pM._updateEffectSymbol=function(t,e){var i=t.getItemModel(e).getModel("effect"),n=i.get("symbolSize"),o=i.get("symbol");L(n)||(n=[n,n]);var a=i.get("color")||t.getItemVisual(e,"color"),r=this.childAt(1);this._symbolType!==o&&(this.remove(r),(r=wg(o,-.5,-.5,1,1,a)).z2=100,r.culling=!0,this.add(r)),r&&(r.setStyle("shadowColor",a),r.setStyle(i.getItemStyle(["color"])),r.attr("scale",n),r.setColor(a),r.attr("scale",n),this._symbolType=o,this._symbolScale=n,this._updateEffectAnimation(t,i,e))},pM._updateEffectAnimation=function(e,t,i){var n=this.childAt(1);if(n){var o=this,a=e.getItemLayout(i),r=1e3*t.get("period"),s=t.get("loop"),l=t.get("constantSpeed"),u=W(t.get("delay"),function(t){return t/e.count()*r/3}),h="function"==typeof u;if(n.ignore=!0,this.updateAnimationPoints(n,a),0<l&&(r=this.getLineLength(n)/l*1e3),r!==this._period||s!==this._loop){n.stopAnimation();var c=u;h&&(c=u(i)),0<n.__t&&(c=-r*n.__t),n.__t=0;var d=n.animate("",s).when(r,{__t:1}).delay(c).during(function(){o.updateSymbolPosition(n)});s||d.done(function(){o.remove(n)}),d.start()}this._period=r,this._loop=s}},pM.getLineLength=function(t){return yt(t.__p1,t.__cp1)+yt(t.__cp1,t.__p2)},pM.updateAnimationPoints=function(t,e){t.__p1=e[0],t.__p2=e[1],t.__cp1=e[2]||[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2]},pM.updateData=function(t,e,i){this.childAt(0).updateData(t,e,i),this._updateEffectSymbol(t,e)},pM.updateSymbolPosition=function(t){var e=t.__p1,i=t.__p2,n=t.__cp1,o=t.__t,a=t.position,r=[a[0],a[1]],s=La,l=ka;a[0]=s(e[0],n[0],i[0],o),a[1]=s(e[1],n[1],i[1],o);var u=l(e[0],n[0],i[0],o),h=l(e[1],n[1],i[1],o);if(t.rotation=-Math.atan2(h,u)-Math.PI/2,"line"===this._symbolType||"rect"===this._symbolType||"roundRect"===this._symbolType)if(void 0!==t.__lastT&&t.__lastT<t.__t){var c=1.05*yt(r,a);t.attr("scale",[t.scale[0],c]),1===o&&(a[0]=r[0]+(a[0]-r[0])/2,a[1]=r[1]+(a[1]-r[1])/2)}else if(1===t.__lastT){c=2*yt(e,a);t.attr("scale",[t.scale[0],c])}else t.attr("scale",this._symbolScale);t.__lastT=t.__t,t.ignore=!1},pM.updateLayout=function(t,e){this.childAt(0).updateLayout(t,e);var i=t.getItemModel(e).getModel("effect");this._updateEffectAnimation(t,i,e)},w(fM,Ci);var mM=gM.prototype;function vM(t,e,i){fM.call(this,t,e,i),this._lastFrame=0,this._lastFramePercent=0}mM._createPolyline=function(t,e,i){var n=t.getItemLayout(e),o=new ts({shape:{points:n}});this.add(o),this._updateCommonStl(t,e,i)},mM.updateData=function(t,e,i){var n=t.hostModel;cl(this.childAt(0),{shape:{points:t.getItemLayout(e)}},n,e),this._updateCommonStl(t,e,i)},mM._updateCommonStl=function(t,e,i){var n=this.childAt(0),o=t.getItemModel(e),a=t.getItemVisual(e,"color"),r=i&&i.lineStyle,s=i&&i.hoverLineStyle;i&&!t.hasItemOption||(r=o.getModel("lineStyle").getLineStyle(),s=o.getModel("emphasis.lineStyle").getLineStyle()),n.useStyle(D({strokeNoScale:!0,fill:"none",stroke:a},r)),n.hoverStyle=s,$s(this)},mM.updateLayout=function(t,e){this.childAt(0).setShape("points",t.getItemLayout(e))},w(gM,Ci);var yM=vM.prototype;yM.createLine=function(t,e,i){return new gM(t,e,i)},yM.updateAnimationPoints=function(t,e){this._points=e;for(var i=[0],n=0,o=1;o<e.length;o++){var a=e[o-1],r=e[o];n+=yt(a,r),i.push(n)}if(0!==n){for(o=0;o<i.length;o++)i[o]/=n;this._offsets=i,this._length=n}},yM.getLineLength=function(t){return this._length},yM.updateSymbolPosition=function(t){var e=t.__t,i=this._points,n=this._offsets,o=i.length;if(n){var a=this._lastFrame;if(e<this._lastFramePercent){for(r=Math.min(a+1,o-1);0<=r&&!(n[r]<=e);r--);r=Math.min(r,o-2)}else{for(var r=a;r<o&&!(n[r]>e);r++);r=Math.min(r-1,o-2)}wt(t.position,i[r],i[r+1],(e-n[r])/(n[r+1]-n[r]));var s=i[r+1][0]-i[r][0],l=i[r+1][1]-i[r][1];t.rotation=-Math.atan2(l,s)-Math.PI/2,this._lastFrame=r,this._lastFramePercent=e,t.ignore=!1}},w(vM,fM);var xM=Cs({shape:{polyline:!1,curveness:0,segs:[]},buildPath:function(t,e){var i=e.segs,n=e.curveness;if(e.polyline)for(var o=0;o<i.length;){var a=i[o++];if(0<a){t.moveTo(i[o++],i[o++]);for(var r=1;r<a;r++)t.lineTo(i[o++],i[o++])}}else for(o=0;o<i.length;){var s=i[o++],l=i[o++],u=i[o++],h=i[o++];if(t.moveTo(s,l),0<n){var c=(s+u)/2-(l-h)*n,d=(l+h)/2-(u-s)*n;t.quadraticCurveTo(c,d,u,h)}else t.lineTo(u,h)}},findDataIndex:function(t,e){var i=this.shape,n=i.segs,o=i.curveness;if(i.polyline)for(var a=0,r=0;r<n.length;){var s=n[r++];if(0<s)for(var l=n[r++],u=n[r++],h=1;h<s;h++){if(sr(l,u,c=n[r++],d=n[r++]))return a}a++}else for(a=0,r=0;r<n.length;){l=n[r++],u=n[r++];var c=n[r++],d=n[r++];if(0<o){if(ur(l,u,(l+c)/2-(u-d)*o,(u+d)/2-(c-l)*o,c,d))return a}else if(sr(l,u,c,d))return a;a++}return-1}});function _M(){this.group=new Ci}var wM=_M.prototype;wM.isPersistent=function(){return!this._incremental},wM.updateData=function(t){this.group.removeAll();var e=new xM({rectHover:!0,cursor:"default"});e.setShape({segs:t.getLayout("linesPoints")}),this._setCommon(e,t),this.group.add(e),this._incremental=null},wM.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clearIncremental(),5e5<t.count()?(this._incremental||(this._incremental=new vs({silent:!0})),this.group.add(this._incremental)):this._incremental=null},wM.incrementalUpdate=function(t,e){var i=new xM;i.setShape({segs:e.getLayout("linesPoints")}),this._setCommon(i,e,!!this._incremental),this._incremental?this._incremental.addDisplayable(i,!0):(i.rectHover=!0,i.cursor="default",i.__startIndex=t.start,this.group.add(i))},wM.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},wM._setCommon=function(i,t,e){var n=t.hostModel;i.setShape({polyline:n.get("polyline"),curveness:n.get("lineStyle.curveness")}),i.useStyle(n.getModel("lineStyle").getLineStyle()),i.style.strokeNoScale=!0;var o=t.getVisual("color");o&&i.setStyle("stroke",o),i.setStyle("fill"),e||(i.seriesIndex=n.seriesIndex,i.on("mousemove",function(t){i.dataIndex=null;var e=i.findDataIndex(t.offsetX,t.offsetY);0<e&&(i.dataIndex=e+i.__startIndex)}))},wM._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()};var bM={seriesType:"lines",plan:vc(),reset:function(g){var m=g.coordinateSystem,v=g.get("polyline"),y=g.pipelineContext.large;return{progress:function(t,e){var i=[];if(y){var n,o=t.end-t.start;if(v){for(var a=0,r=t.start;r<t.end;r++)a+=g.getLineCoordsCount(r);n=new Float32Array(o+2*a)}else n=new Float32Array(4*o);var s=0,l=[];for(r=t.start;r<t.end;r++){var u=g.getLineCoords(r,i);v&&(n[s++]=u);for(var h=0;h<u;h++)l=m.dataToPoint(i[h],!1,l),n[s++]=l[0],n[s++]=l[1]}e.setLayout("linesPoints",n)}else for(r=t.start;r<t.end;r++){var c=e.getItemModel(r),d=(u=g.getLineCoords(r,i),[]);if(v)for(var f=0;f<u;f++)d.push(m.dataToPoint(i[f]));else{d[0]=m.dataToPoint(i[0]),d[1]=m.dataToPoint(i[1]);var p=c.get("lineStyle.curveness");+p&&(d[2]=[(d[0][0]+d[1][0])/2-(d[0][1]-d[1][1])*p,(d[0][1]+d[1][1])/2-(d[1][0]-d[0][0])*p])}e.setItemLayout(r,d)}}}}};function SM(t){return t instanceof Array||(t=[t,t]),t}Cf({type:"lines",init:function(){},render:function(t,e,i){var n=t.getData(),o=this._updateLineDraw(n,t),a=t.get("zlevel"),r=t.get("effect.trailLength"),s=i.getZr(),l="svg"===s.painter.getType();l||s.painter.getLayer(a).clear(!0),null==this._lastZlevel||l||s.configLayer(this._lastZlevel,{motionBlur:!1}),this._showEffect(t)&&r&&(l||s.configLayer(a,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(r/10+.9,1),0)})),o.updateData(n);var u=t.get("clip",!0)&&Sm(t.coordinateSystem,!1,t);u?this.group.setClipPath(u):this.group.removeClipPath(),this._lastZlevel=a,this._finished=!0},incrementalPrepareRender:function(t,e,i){var n=t.getData();this._updateLineDraw(n,t).incrementalPrepareUpdate(n),this._clearLayer(i),this._finished=!1},incrementalRender:function(t,e,i){this._lineDraw.incrementalUpdate(t,e.getData()),this._finished=t.end===e.getData().count()},updateTransform:function(t,e,i){var n=t.getData(),o=t.pipelineContext;if(!this._finished||o.large||o.progressiveRender)return{update:!0};var a=bM.reset(t);a.progress&&a.progress({start:0,end:n.count()},n),this._lineDraw.updateLayout(),this._clearLayer(i)},_updateLineDraw:function(t,e){var i=this._lineDraw,n=this._showEffect(e),o=!!e.get("polyline"),a=e.pipelineContext.large;return i&&n===this._hasEffet&&o===this._isPolyline&&a===this._isLargeDraw||(i&&i.remove(),i=this._lineDraw=a?new _M:new pw(o?n?vM:gM:n?fM:dw),this._hasEffet=n,this._isPolyline=o,this._isLargeDraw=a,this.group.removeAll()),this.group.add(i.group),i},_showEffect:function(t){return!!t.get("effect.show")},_clearLayer:function(t){var e=t.getZr();"svg"===e.painter.getType()||null==this._lastZlevel||e.painter.getLayer(this._lastZlevel).clear(!0)},remove:function(t,e){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(e)},dispose:function(){}});var MM="lineStyle.opacity".split("."),IM={seriesType:"lines",reset:function(t,e,i){var n=SM(t.get("symbol")),o=SM(t.get("symbolSize")),a=t.getData();return a.setVisual("fromSymbol",n&&n[0]),a.setVisual("toSymbol",n&&n[1]),a.setVisual("fromSymbolSize",o&&o[0]),a.setVisual("toSymbolSize",o&&o[1]),a.setVisual("opacity",t.get(MM)),{dataEach:a.hasItemOption?function(t,e){var i=t.getItemModel(e),n=SM(i.getShallow("symbol",!0)),o=SM(i.getShallow("symbolSize",!0)),a=i.get(MM);n[0]&&t.setItemVisual(e,"fromSymbol",n[0]),n[1]&&t.setItemVisual(e,"toSymbol",n[1]),o[0]&&t.setItemVisual(e,"fromSymbolSize",o[0]),o[1]&&t.setItemVisual(e,"toSymbolSize",o[1]),t.setItemVisual(e,"opacity",a)}:null}}};bf(bM),Sf(IM),sc.extend({type:"series.heatmap",getInitialData:function(t,e){return gp(this.getSource(),this,{generateCoord:"value"})},preventIncremental:function(){var t=lh.get(this.get("coordinateSystem"));if(t&&t.dimensions)return"lng"===t.dimensions[0]&&"lat"===t.dimensions[1]},defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0}});function TM(){var t=y();this.canvas=t,this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={}}TM.prototype={update:function(t,e,i,n,o,a){var r=this._getBrush(),s=this._getGradient(t,o,"inRange"),l=this._getGradient(t,o,"outOfRange"),u=this.pointSize+this.blurSize,h=this.canvas,c=h.getContext("2d"),d=t.length;h.width=e,h.height=i;for(var f=0;f<d;++f){var p=t[f],g=p[0],m=p[1],v=n(p[2]);c.globalAlpha=v,c.drawImage(r,g-u,m-u)}if(!h.width||!h.height)return h;for(var y=c.getImageData(0,0,h.width,h.height),x=y.data,_=0,w=x.length,b=this.minOpacity,S=this.maxOpacity-b;_<w;){v=x[_+3]/256;var M=4*Math.floor(255*v);if(0<v){var I=a(v)?s:l;0<v&&(v=v*S+b),x[_++]=I[M],x[_++]=I[1+M],x[_++]=I[2+M],x[_++]=I[3+M]*v*256}else _+=4}return c.putImageData(y,0,0),h},_getBrush:function(){var t=this._brushCanvas||(this._brushCanvas=y()),e=this.pointSize+this.blurSize,i=2*e;t.width=i,t.height=i;var n=t.getContext("2d");return n.clearRect(0,0,i,i),n.shadowOffsetX=i,n.shadowBlur=this.blurSize,n.shadowColor="#000",n.beginPath(),n.arc(-e,e,this.pointSize,0,2*Math.PI,!0),n.closePath(),n.fill(),t},_getGradient:function(t,e,i){for(var n=this._gradientPixels,o=n[i]||(n[i]=new Uint8ClampedArray(1024)),a=[0,0,0,0],r=0,s=0;s<256;s++)e[i](s/255,!0,a),o[r++]=a[0],o[r++]=a[1],o[r++]=a[2],o[r++]=a[3];return o}},Cf({type:"heatmap",render:function(i,t,e){var n;t.eachComponent("visualMap",function(e){e.eachTargetSeries(function(t){t===i&&(n=e)})}),this.group.removeAll(),this._incrementalDisplayable=null;var o=i.coordinateSystem;"cartesian2d"===o.type||"calendar"===o.type?this._renderOnCartesianAndCalendar(i,e,0,i.getData().count()):function(t){var e=t.dimensions;return"lng"===e[0]&&"lat"===e[1]}(o)&&this._renderOnGeo(o,i,n,e)},incrementalPrepareRender:function(t,e,i){this.group.removeAll()},incrementalRender:function(t,e,i,n){e.coordinateSystem&&this._renderOnCartesianAndCalendar(e,n,t.start,t.end,!0)},_renderOnCartesianAndCalendar:function(t,e,i,n,o){var a,r,s=t.coordinateSystem;if("cartesian2d"===s.type){var l=s.getAxis("x"),u=s.getAxis("y");a=l.getBandWidth(),r=u.getBandWidth()}for(var h=this.group,c=t.getData(),d="emphasis.itemStyle",f="emphasis.label",p=t.getModel("itemStyle").getItemStyle(["color"]),g=t.getModel(d).getItemStyle(),m=t.getModel("label"),v=t.getModel(f),y=s.type,x="cartesian2d"===y?[c.mapDimension("x"),c.mapDimension("y"),c.mapDimension("value")]:[c.mapDimension("time"),c.mapDimension("value")],_=i;_<n;_++){var w;if("cartesian2d"===y){if(isNaN(c.get(x[2],_)))continue;var b=s.dataToPoint([c.get(x[0],_),c.get(x[1],_)]);w=new rs({shape:{x:Math.floor(Math.round(b[0])-a/2),y:Math.floor(Math.round(b[1])-r/2),width:Math.ceil(a),height:Math.ceil(r)},style:{fill:c.getItemVisual(_,"color"),opacity:c.getItemVisual(_,"opacity")}})}else{if(isNaN(c.get(x[1],_)))continue;w=new rs({z2:1,shape:s.dataToRect([c.get(x[0],_)]).contentShape,style:{fill:c.getItemVisual(_,"color"),opacity:c.getItemVisual(_,"opacity")}})}var S=c.getItemModel(_);c.hasItemOption&&(p=S.getModel("itemStyle").getItemStyle(["color"]),g=S.getModel(d).getItemStyle(),m=S.getModel("label"),v=S.getModel(f));var M=t.getRawValue(_),I="-";M&&null!=M[2]&&(I=M[2]),el(p,g,m,v,{labelFetcher:t,labelDataIndex:_,defaultText:I,isRectText:!0}),w.setStyle(p),$s(w,c.hasItemOption?g:P({},g)),(w.incremental=o)&&(w.useHoverLayer=!0),h.add(w),c.setItemGraphicEl(_,w)}},_renderOnGeo:function(o,t,e,i){var n=e.targetVisuals.inRange,a=e.targetVisuals.outOfRange,r=t.getData(),s=this._hmLayer||this._hmLayer||new TM;s.blurSize=t.get("blurSize"),s.pointSize=t.get("pointSize"),s.minOpacity=t.get("minOpacity"),s.maxOpacity=t.get("maxOpacity");var l=o.getViewRect().clone(),u=o.getRoamTransform();l.applyTransform(u);var h=Math.max(l.x,0),c=Math.max(l.y,0),d=Math.min(l.width+l.x,i.getWidth()),f=Math.min(l.height+l.y,i.getHeight()),p=d-h,g=f-c,m=[r.mapDimension("lng"),r.mapDimension("lat"),r.mapDimension("value")],v=r.mapArray(m,function(t,e,i){var n=o.dataToPoint([t,e]);return n[0]-=h,n[1]-=c,n.push(i),n}),y=e.getExtent(),x="visualMap.continuous"===e.type?function(t,e){var i=t[1]-t[0];return e=[(e[0]-t[0])/i,(e[1]-t[0])/i],function(t){return t>=e[0]&&t<=e[1]}}(y,e.option.range):function(e,n,o){var i=e[1]-e[0],a=(n=O(n,function(t){return{interval:[(t.interval[0]-e[0])/i,(t.interval[1]-e[0])/i]}})).length,r=0;return function(t){for(var e=r;e<a;e++){if((i=n[e].interval)[0]<=t&&t<=i[1]){r=e;break}}if(e===a)for(e=r-1;0<=e;e--){var i;if((i=n[e].interval)[0]<=t&&t<=i[1]){r=e;break}}return 0<=e&&e<a&&o[e]}}(y,e.getPieceList(),e.option.selected);s.update(v,p,g,n.color.getNormalizer(),{inRange:n.color.getColorMapper(),outOfRange:a.color.getColorMapper()},x);var _=new Qn({style:{width:p,height:g,x:h,y:c,image:s.canvas},silent:!0});this.group.add(_)},dispose:function(){}});var AM=Tv.extend({type:"series.pictorialBar",dependencies:["grid"],defaultOption:{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",progressive:0,hoverAnimation:!1},getInitialData:function(t){return t.stack=null,AM.superApply(this,"getInitialData",arguments)}}),DM=["itemStyle","borderWidth"],CM=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],LM=new Yr;Cf({type:"pictorialBar",render:function(t,e,i){var r=this.group,s=t.getData(),l=this._data,n=t.coordinateSystem,o=!!n.getBaseAxis().isHorizontal(),a=n.grid.getRect(),u={ecSize:{width:i.getWidth(),height:i.getHeight()},seriesModel:t,coordSys:n,coordSysExtent:[[a.x,a.x+a.width],[a.y,a.y+a.height]],isHorizontal:o,valueDim:CM[+o],categoryDim:CM[1-o]};return s.diff(l).add(function(t){if(s.hasValue(t)){var e=BM(s,t),i=kM(s,t,e,u),n=WM(s,u,i);s.setItemGraphicEl(t,n),r.add(n),YM(n,u,i)}}).update(function(t,e){var i=l.getItemGraphicEl(e);if(s.hasValue(t)){var n=BM(s,t),o=kM(s,t,n,u),a=ZM(s,o);i&&a!==i.__pictorialShapeStr&&(r.remove(i),s.setItemGraphicEl(t,null),i=null),i?function(t,e,i){var n=i.animationModel,o=i.dataIndex;cl(t.__pictorialBundle,{position:i.bundlePosition.slice()},n,o),i.symbolRepeat?OM(t,e,i,!0):EM(t,e,i,!0);RM(t,i,!0),zM(t,e,i,!0)}(i,u,o):i=WM(s,u,o,!0),s.setItemGraphicEl(t,i),i.__pictorialSymbolMeta=o,r.add(i),YM(i,u,o)}else r.remove(i)}).remove(function(t){var e=l.getItemGraphicEl(t);e&&HM(l,t,e.__pictorialSymbolMeta.animationModel,e)}).execute(),this._data=s,this.group},dispose:et,remove:function(e,t){var i=this.group,n=this._data;e.get("animation")?n&&n.eachItemGraphicEl(function(t){HM(n,t.dataIndex,e,t)}):i.removeAll()}});function kM(t,e,i,n){var o=t.getItemLayout(e),a=i.get("symbolRepeat"),r=i.get("symbolClip"),s=i.get("symbolPosition")||"start",l=(i.get("symbolRotate")||0)*Math.PI/180||0,u=i.get("symbolPatternSize")||2,h=i.isAnimationEnabled(),c={dataIndex:e,layout:o,itemModel:i,symbolType:t.getItemVisual(e,"symbol")||"circle",color:t.getItemVisual(e,"color"),symbolClip:r,symbolRepeat:a,symbolRepeatDirection:i.get("symbolRepeatDirection"),symbolPatternSize:u,rotation:l,animationModel:h?i:null,hoverAnimation:h&&i.get("hoverAnimation"),z2:i.getShallow("z",!0)||0};!function(t,e,i,n,o){var a,r=n.valueDim,s=t.get("symbolBoundingData"),l=n.coordSys.getOtherAxis(n.coordSys.getBaseAxis()),u=l.toGlobalCoord(l.dataToCoord(0)),h=1-+(i[r.wh]<=0);if(L(s)){var c=[PM(l,s[0])-u,PM(l,s[1])-u];c[1]<c[0]&&c.reverse(),a=c[h]}else a=null!=s?PM(l,s)-u:e?n.coordSysExtent[r.index][h]-u:i[r.wh];o.boundingLength=a,e&&(o.repeatCutLength=i[r.wh]);o.pxSign=0<a?1:a<0?-1:0}(i,a,o,n,c),function(t,e,i,n,o,a,r,s,l,u){var h=l.valueDim,c=l.categoryDim,d=Math.abs(i[c.wh]),f=t.getItemVisual(e,"symbolSize");f=L(f)?f.slice():(null==f&&(f="100%"),[f,f]);f[c.index]=Rl(f[c.index],d),f[h.index]=Rl(f[h.index],n?d:Math.abs(a)),u.symbolSize=f,(u.symbolScale=[f[0]/s,f[1]/s])[h.index]*=(l.isHorizontal?-1:1)*r}(t,e,o,a,0,c.boundingLength,c.pxSign,u,n,c),function(t,e,i,n,o){var a=t.get(DM)||0;a&&(LM.attr({scale:e.slice(),rotation:i}),LM.updateTransform(),a/=LM.getLineScale(),a*=e[n.valueDim.index]);o.valueLineWidth=a}(i,c.symbolScale,l,n,c);var d=c.symbolSize,f=i.get("symbolOffset");return L(f)&&(f=[Rl(f[0],d[0]),Rl(f[1],d[1])]),function(t,e,i,n,o,a,r,s,l,u,h,c){var d=h.categoryDim,f=h.valueDim,p=c.pxSign,g=Math.max(e[f.index]+s,0),m=g;if(n){var v=Math.abs(l),y=W(t.get("symbolMargin"),"15%")+"",x=!1;y.lastIndexOf("!")===y.length-1&&(x=!0,y=y.slice(0,y.length-1)),y=Rl(y,e[f.index]);var _=Math.max(g+2*y,0),w=x?0:2*y,b=Jl(n),S=b?n:jM((v+w)/_);_=g+2*(y=(v-S*g)/2/(x?S:S-1)),w=x?0:2*y,b||"fixed"===n||(S=u?jM((Math.abs(u)+w)/_):0),m=S*_-w,c.repeatTimes=S,c.symbolMargin=y}var M=p*(m/2),I=c.pathPosition=[];I[d.index]=i[d.wh]/2,I[f.index]="start"===r?M:"end"===r?l-M:l/2,a&&(I[0]+=a[0],I[1]+=a[1]);var T=c.bundlePosition=[];T[d.index]=i[d.xy],T[f.index]=i[f.xy];var A=c.barRectShape=P({},i);A[f.wh]=p*Math.max(Math.abs(i[f.wh]),Math.abs(I[f.index]+M)),A[d.wh]=i[d.wh];var D=c.clipShape={};D[d.xy]=-i[d.xy],D[d.wh]=h.ecSize[d.wh],D[f.xy]=0,D[f.wh]=i[f.wh]}(i,d,o,a,0,f,s,c.valueLineWidth,c.boundingLength,c.repeatCutLength,n,c),c}function PM(t,e){return t.toGlobalCoord(t.dataToCoord(t.scale.parse(e)))}function NM(t){var e=t.symbolPatternSize,i=wg(t.symbolType,-e/2,-e/2,e,e,t.color);return i.attr({culling:!0}),"image"!==i.type&&i.setStyle({strokeNoScale:!0}),i}function OM(t,e,o,i){var n=t.__pictorialBundle,a=o.symbolSize,r=o.valueLineWidth,s=o.pathPosition,l=e.valueDim,u=o.repeatTimes||0,h=0,c=a[e.valueDim.index]+r+2*o.symbolMargin;for(UM(t,function(t){t.__pictorialAnimationIndex=h,t.__pictorialRepeatTimes=u,h<u?XM(t,null,p(h),o,i):XM(t,null,{scale:[0,0]},o,i,function(){n.remove(t)}),FM(t,o),h++});h<u;h++){var d=NM(o);d.__pictorialAnimationIndex=h,d.__pictorialRepeatTimes=u,n.add(d);var f=p(h);XM(d,{position:f.position,scale:[0,0]},{scale:f.scale,rotation:f.rotation},o,i),d.on("mouseover",g).on("mouseout",m),FM(d,o)}function p(t){var e=s.slice(),i=o.pxSign,n=t;return("start"===o.symbolRepeatDirection?0<i:i<0)&&(n=u-1-t),e[l.index]=c*(n-u/2+.5)+s[l.index],{position:e,scale:o.symbolScale.slice(),rotation:o.rotation}}function g(){UM(t,function(t){t.trigger("emphasis")})}function m(){UM(t,function(t){t.trigger("normal")})}}function EM(t,e,i,n){var o=t.__pictorialBundle,a=t.__pictorialMainPath;a?XM(a,null,{position:i.pathPosition.slice(),scale:i.symbolScale.slice(),rotation:i.rotation},i,n):(a=t.__pictorialMainPath=NM(i),o.add(a),XM(a,{position:i.pathPosition.slice(),scale:[0,0],rotation:i.rotation},{scale:i.symbolScale.slice()},i,n),a.on("mouseover",function(){this.trigger("emphasis")}).on("mouseout",function(){this.trigger("normal")})),FM(a,i)}function RM(t,e,i){var n=P({},e.barRectShape),o=t.__pictorialBarRect;o?XM(o,null,{shape:n},e,i):(o=t.__pictorialBarRect=new rs({z2:2,shape:n,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),t.add(o))}function zM(t,e,i,n){if(i.symbolClip){var o=t.__pictorialClipPath,a=P({},i.clipShape),r=e.valueDim,s=i.animationModel,l=i.dataIndex;if(o)cl(o,{shape:a},s,l);else{a[r.wh]=0,o=new rs({shape:a}),t.__pictorialBundle.setClipPath(o),t.__pictorialClipPath=o;var u={};u[r.wh]=i.clipShape[r.wh],bl[n?"updateProps":"initProps"](o,{shape:u},s,l)}}}function BM(t,e){var i=t.getItemModel(e);return i.getAnimationDelayParams=VM,i.isAnimationEnabled=GM,i}function VM(t){return{index:t.__pictorialAnimationIndex,count:t.__pictorialRepeatTimes}}function GM(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function FM(t,e){t.off("emphasis").off("normal");var i=e.symbolScale.slice();e.hoverAnimation&&t.on("emphasis",function(){this.animateTo({scale:[1.1*i[0],1.1*i[1]]},400,"elasticOut")}).on("normal",function(){this.animateTo({scale:i.slice()},400,"elasticOut")})}function WM(t,e,i,n){var o=new Ci,a=new Ci;return o.add(a),(o.__pictorialBundle=a).attr("position",i.bundlePosition.slice()),i.symbolRepeat?OM(o,e,i):EM(o,0,i),RM(o,i,n),zM(o,e,i,n),o.__pictorialShapeStr=ZM(t,i),o.__pictorialSymbolMeta=i,o}function HM(t,e,i,n){var o=n.__pictorialBarRect;o&&(o.style.text=null);var a=[];UM(n,function(t){a.push(t)}),n.__pictorialMainPath&&a.push(n.__pictorialMainPath),n.__pictorialClipPath&&(i=null),E(a,function(t){cl(t,{scale:[0,0]},i,e,function(){n.parent&&n.parent.remove(n)})}),t.setItemGraphicEl(e,null)}function ZM(t,e){return[t.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function UM(e,i,n){E(e.__pictorialBundle.children(),function(t){t!==e.__pictorialBarRect&&i.call(n,t)})}function XM(t,e,i,n,o,a){e&&t.attr(e),n.symbolClip&&!o?i&&t.attr(i):i&&bl[o?"updateProps":"initProps"](t,i,n.animationModel,n.dataIndex,a)}function YM(t,e,i){var n=i.color,o=i.dataIndex,a=i.itemModel,r=a.getModel("itemStyle").getItemStyle(["color"]),s=a.getModel("emphasis.itemStyle").getItemStyle(),l=a.getShallow("cursor");UM(t,function(t){t.setColor(n),t.setStyle(D({fill:n,opacity:i.opacity},r)),$s(t,s),l&&(t.cursor=l),t.z2=i.z2});var u={},h=(e.valueDim.posDesc[+(0<i.boundingLength)],t.__pictorialBarRect);Av(h.style,u,a,n,e.seriesModel,o),$s(h,u)}function jM(t){var e=Math.round(t);return Math.abs(t-e)<1e-4?e:Math.ceil(t)}bf(T(zp,"pictorialBar")),Sf(Lm("pictorialBar","roundRect"));function qM(t,e,i,n,o){Gg.call(this,t,e,i),this.type=n||"value",this.position=o||"bottom",this.orient=null}function KM(t,e,i){this.dimension="single",this.dimensions=["single"],this._axis=null,this._rect,this._init(t,e,i),this.model=t}function $M(t,e){e=e||{};var i=t.coordinateSystem,n=t.axis,o={},a=n.position,r=n.orient,s=i.getRect(),l=[s.x,s.x+s.width,s.y,s.y+s.height],u={horizontal:{top:l[2],bottom:l[3]},vertical:{left:l[0],right:l[1]}};o.position=["vertical"===r?u.vertical[a]:l[0],"horizontal"===r?u.horizontal[a]:l[3]];o.rotation=Math.PI/2*{horizontal:0,vertical:1}[r];o.labelDirection=o.tickDirection=o.nameDirection={top:-1,bottom:1,right:1,left:-1}[a],t.get("axisTick.inside")&&(o.tickDirection=-o.tickDirection),W(e.labelInside,t.get("axisLabel.inside"))&&(o.labelDirection=-o.labelDirection);var h=e.rotate;return null==h&&(h=t.get("axisLabel.rotate")),o.labelRotation="top"===a?-h:h,o.z2=1,o}qM.prototype={constructor:qM,model:null,isHorizontal:function(){var t=this.position;return"top"===t||"bottom"===t},pointToData:function(t,e){return this.coordinateSystem.pointToData(t,e)[0]},toGlobalCoord:null,toLocalCoord:null},w(qM,Gg),lh.register("single",{create:function(n,o){var a=[];return n.eachComponent("singleAxis",function(t,e){var i=new KM(t,n,o);i.name="single_"+e,i.resize(t,o),t.coordinateSystem=i,a.push(i)}),n.eachSeries(function(t){if("singleAxis"===t.get("coordinateSystem")){var e=n.queryComponents({mainType:"singleAxis",index:t.get("singleAxisIndex"),id:t.get("singleAxisId")})[0];t.coordinateSystem=e&&e.coordinateSystem}}),a},dimensions:(KM.prototype={type:"singleAxis",axisPointerEnabled:!0,constructor:KM,_init:function(t,e,i){var n=this.dimension,o=new qM(n,sg(t),[0,0],t.get("type"),t.get("position")),a="category"===o.type;o.onBand=a&&t.get("boundaryGap"),o.inverse=t.get("inverse"),o.orient=t.get("orient"),(t.axis=o).model=t,(o.coordinateSystem=this)._axis=o},update:function(t,e){t.eachSeries(function(t){if(t.coordinateSystem===this){var e=t.getData();E(e.mapDimension(this.dimension,!0),function(t){this._axis.scale.unionExtentFromData(e,t)},this),rg(this._axis.scale,this._axis.model)}},this)},resize:function(t,e){this._rect=bu({left:t.get("left"),top:t.get("top"),right:t.get("right"),bottom:t.get("bottom"),width:t.get("width"),height:t.get("height")},{width:e.getWidth(),height:e.getHeight()}),this._adjustAxis()},getRect:function(){return this._rect},_adjustAxis:function(){var t=this._rect,e=this._axis,i=e.isHorizontal(),n=i?[0,t.width]:[0,t.height],o=e.reverse?1:0;e.setExtent(n[o],n[1-o]),this._updateAxisTransform(e,i?t.x:t.y)},_updateAxisTransform:function(t,e){var i=t.getExtent(),n=i[0]+i[1],o=t.isHorizontal();t.toGlobalCoord=o?function(t){return t+e}:function(t){return n-t+e},t.toLocalCoord=o?function(t){return t-e}:function(t){return n-t+e}},getAxis:function(){return this._axis},getBaseAxis:function(){return this._axis},getAxes:function(){return[this._axis]},getTooltipAxes:function(){return{baseAxes:[this.getAxis()]}},containPoint:function(t){var e=this.getRect(),i=this.getAxis();return"horizontal"===i.orient?i.contain(i.toLocalCoord(t[0]))&&t[1]>=e.y&&t[1]<=e.y+e.height:i.contain(i.toLocalCoord(t[1]))&&t[0]>=e.y&&t[0]<=e.y+e.height},pointToData:function(t){var e=this.getAxis();return[e.coordToData(e.toLocalCoord(t["horizontal"===e.orient?0:1]))]},dataToPoint:function(t){var e=this.getAxis(),i=this.getRect(),n=[],o="horizontal"===e.orient?0:1;return t instanceof Array&&(t=t[0]),n[o]=e.toGlobalCoord(e.dataToCoord(+t)),n[1-o]=0==o?i.y+i.height/2:i.x+i.width/2,n}}).dimensions});var JM=["axisLine","axisTickLabel","axisName"],QM=["splitArea","splitLine"],tI=mv.extend({type:"singleAxis",axisPointerClass:"SingleAxisPointer",render:function(e,t,i,n){var o=this.group;o.removeAll();var a=this._axisGroup;this._axisGroup=new Ci;var r=$M(e),s=new Qm(e,r);E(JM,s.add,s),o.add(this._axisGroup),o.add(s.getGroup()),E(QM,function(t){e.get(t+".show")&&this["_"+t](e)},this),ml(a,this._axisGroup,e),tI.superCall(this,"render",e,t,i,n)},remove:function(){bv(this)},_splitLine:function(t){var e=t.axis;if(!e.scale.isBlank()){var i=t.getModel("splitLine"),n=i.getModel("lineStyle"),o=n.get("width"),a=n.get("color");a=a instanceof Array?a:[a];for(var r=t.coordinateSystem.getRect(),s=e.isHorizontal(),l=[],u=0,h=e.getTicksCoords({tickModel:i}),c=[],d=[],f=0;f<h.length;++f){var p=e.toGlobalCoord(h[f].coord);s?(c[0]=p,c[1]=r.y,d[0]=p,d[1]=r.y+r.height):(c[0]=r.x,c[1]=p,d[0]=r.x+r.width,d[1]=p);var g=u++%a.length;l[g]=l[g]||[],l[g].push(new ls({subPixelOptimize:!0,shape:{x1:c[0],y1:c[1],x2:d[0],y2:d[1]},style:{lineWidth:o},silent:!0}))}for(f=0;f<l.length;++f)this.group.add(Es(l[f],{style:{stroke:a[f%a.length],lineDash:n.getLineDash(o),lineWidth:o},silent:!0}))}},_splitArea:function(t){wv(this,this._axisGroup,t,t)}}),eI=ku.extend({type:"singleAxis",layoutMode:"box",axis:null,coordinateSystem:null,getCoordSysModel:function(){return this}});m(eI.prototype,dg),Gm("single",eI,function(t,e){return e.type||(e.data?"category":"value")},{left:"5%",top:"5%",right:"5%",bottom:"5%",type:"value",position:"bottom",orient:"horizontal",axisLine:{show:!0,lineStyle:{width:1,type:"solid"}},tooltip:{show:!0},axisTick:{show:!0,length:6,lineStyle:{width:1}},axisLabel:{show:!0,interval:"auto"},splitLine:{show:!0,lineStyle:{type:"dashed",opacity:.2}}});function iI(t,e){var i,n=[],o=t.seriesIndex;if(null==o||!(i=e.getSeriesByIndex(o)))return{point:[]};var a=i.getData(),r=Yo(a,t);if(null==r||r<0||L(r))return{point:[]};var s=a.getItemGraphicEl(r),l=i.coordinateSystem;if(i.getTooltipPosition)n=i.getTooltipPosition(r)||[];else if(l&&l.dataToPoint)n=l.dataToPoint(a.getValues(O(l.dimensions,function(t){return a.mapDimension(t)}),r,!0))||[];else if(s){var u=s.getBoundingRect().clone();u.applyTransform(s.transform),n=[u.x+u.width/2,u.y+u.height/2]}return{point:n,el:s}}var nI=E,oI=T,aI=jo();function rI(t,e,i,n,o){var a=t.axis;if(!a.scale.isBlank()&&a.containData(e))if(t.involveSeries){var r=function(l,t){var u=t.axis,h=u.dim,c=l,d=[],f=Number.MAX_VALUE,p=-1;return nI(t.seriesModels,function(e,t){var i,n,o=e.getData().mapDimension(h,!0);if(e.getAxisTooltipData){var a=e.getAxisTooltipData(o,l,u);n=a.dataIndices,i=a.nestestValue}else{if(!(n=e.getData().indicesOfNearest(o[0],l,"category"===u.type?.5:null)).length)return;i=e.getData().get(o[0],n[0])}if(null!=i&&isFinite(i)){var r=l-i,s=Math.abs(r);s<=f&&((s<f||0<=r&&p<0)&&(f=s,p=r,c=i,d.length=0),nI(n,function(t){d.push({seriesIndex:e.seriesIndex,dataIndexInside:t,dataIndex:e.getData().getRawIndex(t)})}))}}),{payloadBatch:d,snapToValue:c}}(e,t),s=r.payloadBatch,l=r.snapToValue;s[0]&&null==o.seriesIndex&&P(o,s[0]),!n&&t.snap&&a.containData(l)&&null!=l&&(e=l),i.showPointer(t,e,s,o),i.showTooltip(t,r,l)}else i.showPointer(t,e)}function sI(t,e,i,n){t[e.key]={value:i,payloadBatch:n}}function lI(t,e,i,n){var o=i.payloadBatch,a=e.axis,r=a.model,s=e.axisPointerModel;if(e.triggerTooltip&&o.length){var l=e.coordSys.model,u=gv(l),h=t.map[u];h||(h=t.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},t.list.push(h)),h.dataByAxis.push({axisDim:a.dim,axisIndex:r.componentIndex,axisType:r.type,axisId:r.id,value:n,valueLabelOpt:{precision:s.get("label.precision"),formatter:s.get("label.formatter")},seriesDataIndices:o.slice()})}}function uI(t){var e=t.axis.model,i={},n=i.axisDim=t.axis.dim;return i.axisIndex=i[n+"AxisIndex"]=e.componentIndex,i.axisName=i[n+"AxisName"]=e.name,i.axisId=i[n+"AxisId"]=e.id,i}function hI(t){return!t||null==t[0]||isNaN(t[0])||null==t[1]||isNaN(t[1])}Tf({type:"axisPointer",coordSysAxesInfo:null,defaultOption:{show:"auto",triggerOn:null,zlevel:0,z:50,type:"line",snap:!1,triggerTooltip:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#aaa",width:1,type:"solid"},shadowStyle:{color:"rgba(150,150,150,0.3)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,shadowBlur:3,shadowColor:"#aaa"},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}}});var cI=jo(),dI=E;function fI(t,e,i){if(!v.node){var n=e.getZr();cI(n).records||(cI(n).records={}),function(o,a){if(cI(o).initialized)return;function t(t,n){o.on(t,function(e){var i=function(i){var n={showTip:[],hideTip:[]},o=function(t){var e=n[t.type];e?e.push(t):(t.dispatchAction=o,i.dispatchAction(t))};return{dispatchAction:o,pendings:n}}(a);dI(cI(o).records,function(t){t&&n(t,e,i.dispatchAction)}),function(t,e){var i,n=t.showTip.length,o=t.hideTip.length;n?i=t.showTip[n-1]:o&&(i=t.hideTip[o-1]);i&&(i.dispatchAction=null,e.dispatchAction(i))}(i.pendings,a)})}cI(o).initialized=!0,t("click",T(gI,"click")),t("mousemove",T(gI,"mousemove")),t("globalout",pI)}(n,e),(cI(n).records[t]||(cI(n).records[t]={})).handler=i}}function pI(t,e,i){t.handler("leave",null,i)}function gI(t,e,i,n){e.handler(t,i,n)}function mI(t,e){if(!v.node){var i=e.getZr();(cI(i).records||{})[t]&&(cI(i).records[t]=null)}}var vI=Af({type:"axisPointer",render:function(t,e,i){var n=e.getComponent("tooltip"),o=t.get("triggerOn")||n&&n.get("triggerOn")||"mousemove|click";fI("axisPointer",i,function(t,e,i){"none"!==o&&("leave"===t||0<=o.indexOf(t))&&i({type:"updateAxisPointer",currTrigger:t,x:e&&e.offsetX,y:e&&e.offsetY})})},remove:function(t,e){mI(e.getZr(),"axisPointer"),vI.superApply(this._model,"remove",arguments)},dispose:function(t,e){mI("axisPointer",e),vI.superApply(this._model,"dispose",arguments)}}),yI=jo(),xI=k,_I=A;function wI(){}function bI(t,e,i,n){!function i(n,t){{if(z(n)&&z(t)){var o=!0;return E(t,function(t,e){o=o&&i(n[e],t)}),!!o}return n===t}}(yI(i).lastProp,n)&&(yI(i).lastProp=n,e?cl(i,n,t):(i.stopAnimation(),i.attr(n)))}function SI(t,e){t[e.get("label.show")?"show":"hide"]()}function MI(t){return{position:t.position.slice(),rotation:t.rotation||0}}function II(t,e,i){var n=e.get("z"),o=e.get("zlevel");t&&t.traverse(function(t){"group"!==t.type&&(null!=n&&(t.z=n),null!=o&&(t.zlevel=o),t.silent=i)})}function TI(t){var e,i=t.get("type"),n=t.getModel(i+"Style");return"line"===i?(e=n.getLineStyle()).fill=null:"shadow"===i&&((e=n.getAreaStyle()).stroke=null),e}function AI(t,e,i,n,o){var a=DI(i.get("value"),e.axis,e.ecModel,i.get("seriesDataIndices"),{precision:i.get("label.precision"),formatter:i.get("label.formatter")}),r=i.getModel("label"),s=iu(r.get("padding")||0),l=r.getFont(),u=gn(a,l),h=o.position,c=u.width+s[1]+s[3],d=u.height+s[0]+s[2],f=o.align;"right"===f&&(h[0]-=c),"center"===f&&(h[0]-=c/2);var p=o.verticalAlign;"bottom"===p&&(h[1]-=d),"middle"===p&&(h[1]-=d/2),function(t,e,i,n){var o=n.getWidth(),a=n.getHeight();t[0]=Math.min(t[0]+e,o)-e,t[1]=Math.min(t[1]+i,a)-i,t[0]=Math.max(t[0],0),t[1]=Math.max(t[1],0)}(h,c,d,n);var g=r.get("backgroundColor");g&&"auto"!==g||(g=e.get("axisLine.lineStyle.color")),t.label={shape:{x:0,y:0,width:c,height:d,r:r.get("borderRadius")},position:h.slice(),style:{text:a,textFont:l,textFill:r.getTextColor(),textPosition:"inside",textPadding:s,fill:g,stroke:r.get("borderColor")||"transparent",lineWidth:r.get("borderWidth")||0,shadowBlur:r.get("shadowBlur"),shadowColor:r.get("shadowColor"),shadowOffsetX:r.get("shadowOffsetX"),shadowOffsetY:r.get("shadowOffsetY")},z2:10}}function DI(t,e,o,i,n){t=e.scale.parse(t);var a=e.scale.getLabel(t,{precision:n.precision}),r=n.formatter;if(r){var s={value:ug(e,t),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};E(i,function(t){var e=o.getSeriesByIndex(t.seriesIndex),i=t.dataIndexInside,n=e&&e.getDataParams(i);n&&s.seriesData.push(n)}),R(r)?a=r.replace("{value}",a):C(r)&&(a=r(s))}return a}function CI(t,e,i){var n=ae();return he(n,n,i.rotation),ue(n,n,i.position),pl([t.dataToCoord(e),(i.labelOffset||0)+(i.labelDirection||1)*(i.labelMargin||0)],n)}function LI(t,e,i,n,o,a){var r=Qm.innerTextLayout(i.rotation,0,i.labelDirection);i.labelMargin=o.get("label.margin"),AI(e,n,o,a,{position:CI(n.axis,t,i),align:r.textAlign,verticalAlign:r.textVerticalAlign})}function kI(t,e,i){return{x1:t[i=i||0],y1:t[1-i],x2:e[i],y2:e[1-i]}}function PI(t,e,i){return{x:t[i=i||0],y:t[1-i],width:e[i],height:e[1-i]}}function NI(t,e,i,n,o,a){return{cx:t,cy:e,r0:i,r:n,startAngle:o,endAngle:a,clockwise:!0}}oa((wI.prototype={_group:null,_lastGraphicKey:null,_handle:null,_dragging:!1,_lastValue:null,_lastStatus:null,_payloadInfo:null,animationThreshold:15,render:function(t,e,i,n){var o=e.get("value"),a=e.get("status");if(this._axisModel=t,this._axisPointerModel=e,this._api=i,n||this._lastValue!==o||this._lastStatus!==a){this._lastValue=o,this._lastStatus=a;var r=this._group,s=this._handle;if(!a||"hide"===a)return r&&r.hide(),void(s&&s.hide());r&&r.show(),s&&s.show();var l={};this.makeElOption(l,o,t,e,i);var u=l.graphicKey;u!==this._lastGraphicKey&&this.clear(i),this._lastGraphicKey=u;var h=this._moveAnimation=this.determineAnimation(t,e);if(r){var c=T(bI,e,h);this.updatePointerEl(r,l,c,e),this.updateLabelEl(r,l,c,e)}else r=this._group=new Ci,this.createPointerEl(r,l,t,e),this.createLabelEl(r,l,t,e),i.getZr().add(r);II(r,e,!0),this._renderHandle(o)}},remove:function(t){this.clear(t)},dispose:function(t){this.clear(t)},determineAnimation:function(t,e){var i=e.get("animation"),n=t.axis,o="category"===n.type,a=e.get("snap");if(!a&&!o)return!1;if("auto"!==i&&null!=i)return!0===i;var r=this.animationThreshold;if(o&&n.getBandWidth()>r)return!0;if(a){var s=fv(t).seriesDataCount,l=n.getExtent();return Math.abs(l[0]-l[1])/s>r}return!1},makeElOption:function(t,e,i,n,o){},createPointerEl:function(t,e,i,n){var o=e.pointer;if(o){var a=yI(t).pointerEl=new bl[o.type](xI(e.pointer));t.add(a)}},createLabelEl:function(t,e,i,n){if(e.label){var o=yI(t).labelEl=new rs(xI(e.label));t.add(o),SI(o,n)}},updatePointerEl:function(t,e,i){var n=yI(t).pointerEl;n&&e.pointer&&(n.setStyle(e.pointer.style),i(n,{shape:e.pointer.shape}))},updateLabelEl:function(t,e,i,n){var o=yI(t).labelEl;o&&(o.setStyle(e.label.style),i(o,{shape:e.label.shape,position:e.label.position}),SI(o,n))},_renderHandle:function(t){if(!this._dragging&&this.updateHandleTransform){var e,i=this._axisPointerModel,n=this._api.getZr(),o=this._handle,a=i.getModel("handle"),r=i.get("status");if(!a.get("show")||!r||"hide"===r)return o&&n.remove(o),void(this._handle=null);this._handle||(e=!0,o=this._handle=yl(a.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){Xt(t.event)},onmousedown:_I(this._onHandleDragMove,this,0,0),drift:_I(this._onHandleDragMove,this),ondragend:_I(this._onHandleDragEnd,this)}),n.add(o)),II(o,i,!1);o.setStyle(a.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var s=a.get("size");L(s)||(s=[s,s]),o.attr("scale",[s[0]/2,s[1]/2]),kc(this,"_doDispatchAxisPointer",a.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,e)}},_moveHandleToValue:function(t,e){bI(this._axisPointerModel,!e&&this._moveAnimation,this._handle,MI(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},_onHandleDragMove:function(t,e){var i=this._handle;if(i){this._dragging=!0;var n=this.updateHandleTransform(MI(i),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=n,i.stopAnimation(),i.attr(MI(n)),yI(i).lastProp=null,this._doDispatchAxisPointer()}},_doDispatchAxisPointer:function(){if(this._handle){var t=this._payloadInfo,e=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:e.axis.dim,axisIndex:e.componentIndex}]})}},_onHandleDragEnd:function(t){if(this._dragging=!1,this._handle){var e=this._axisPointerModel.get("value");this._moveHandleToValue(e),this._api.dispatchAction({type:"hideTip"})}},getHandleTransform:null,updateHandleTransform:null,clear:function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),i=this._group,n=this._handle;e&&i&&(this._lastGraphicKey=null,i&&e.remove(i),n&&e.remove(n),this._group=null,this._handle=null,this._payloadInfo=null)},doClear:function(){},buildLabel:function(t,e,i){return{x:t[i=i||0],y:t[1-i],width:e[i],height:e[1-i]}}}).constructor=wI);var OI=wI.extend({makeElOption:function(t,e,i,n,o){var a=i.axis,r=a.grid,s=n.get("type"),l=EI(r,a).getOtherAxis(a).getGlobalExtent(),u=a.toGlobalCoord(a.dataToCoord(e,!0));if(s&&"none"!==s){var h=TI(n),c=RI[s](a,u,l);c.style=h,t.graphicKey=c.type,t.pointer=c}LI(e,t,_v(r.model,i),i,n,o)},getHandleTransform:function(t,e,i){var n=_v(e.axis.grid.model,e,{labelInside:!1});return n.labelMargin=i.get("handle.margin"),{position:CI(e.axis,t,n),rotation:n.rotation+(n.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,i,n){var o=i.axis,a=o.grid,r=o.getGlobalExtent(!0),s=EI(a,o).getOtherAxis(o).getGlobalExtent(),l="x"===o.dim?0:1,u=t.position;u[l]+=e[l],u[l]=Math.min(r[1],u[l]),u[l]=Math.max(r[0],u[l]);var h=(s[1]+s[0])/2,c=[h,h];c[l]=u[l];return{position:u,rotation:t.rotation,cursorPoint:c,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][l]}}});function EI(t,e){var i={};return i[e.dim+"AxisIndex"]=e.index,t.getCartesian(i)}var RI={line:function(t,e,i){return{type:"Line",subPixelOptimize:!0,shape:kI([e,i[0]],[e,i[1]],zI(t))}},shadow:function(t,e,i){var n=Math.max(1,t.getBandWidth()),o=i[1]-i[0];return{type:"Rect",shape:PI([e-n/2,i[0]],[n,o],zI(t))}}};function zI(t){return"x"===t.dim?0:1}mv.registerAxisPointerClass("CartesianAxisPointer",OI),yf(function(t){if(t){t.axisPointer&&0!==t.axisPointer.length||(t.axisPointer={});var e=t.axisPointer.link;e&&!L(e)&&(t.axisPointer.link=[e])}}),xf(Ld.PROCESSOR.STATISTIC,function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=cv(t,e)}),_f({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},function(t,e,i){var n=t.currTrigger,r=[t.x,t.y],o=t,a=t.dispatchAction||A(i.dispatchAction,i),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){hI(r)&&(r=iI({seriesIndex:o.seriesIndex,dataIndex:o.dataIndex},e).point);var l=hI(r),u=o.axesInfo,h=s.axesInfo,c="leave"===n||hI(r),d={},f={},p={list:[],map:{}},g={showPointer:oI(sI,f),showTooltip:oI(lI,p)};nI(s.coordSysMap,function(t,e){var a=l||t.containPoint(r);nI(s.coordSysAxesInfo[e],function(t,e){var i=t.axis,n=function(t,e){for(var i=0;i<(t||[]).length;i++){var n=t[i];if(e.axis.dim===n.axisDim&&e.axis.model.componentIndex===n.axisIndex)return n}}(u,t);if(!c&&a&&(!u||n)){var o=n&&n.value;null!=o||l||(o=i.pointToData(r)),null!=o&&rI(t,o,g,!1,d)}})});var m={};return nI(h,function(o,t){var a=o.linkGroup;a&&!f[t]&&nI(a.axesInfo,function(t,e){var i=f[e];if(t!==o&&i){var n=i.value;a.mapper&&(n=o.axis.scale.parse(a.mapper(n,uI(t),uI(o)))),m[o.key]=n}})}),nI(m,function(t,e){rI(h[e],t,g,!0,d)}),function(o,t,e){var a=e.axesInfo=[];nI(t,function(t,e){var i=t.axisPointerModel.option,n=o[e];n?(t.useHandle||(i.status="show"),i.value=n.value,i.seriesDataIndices=(n.payloadBatch||[]).slice()):t.useHandle||(i.status="hide"),"show"===i.status&&a.push({axisDim:t.axis.dim,axisIndex:t.axis.model.componentIndex,value:i.value})})}(f,h,d),function(t,e,i,n){if(hI(e)||!t.list.length)return n({type:"hideTip"});var o=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};n({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:i.tooltipOption,position:i.position,dataIndexInside:o.dataIndexInside,dataIndex:o.dataIndex,seriesIndex:o.seriesIndex,dataByCoordSys:t.list})}(p,r,t,a),function(t,e,i){var n=i.getZr(),o="axisPointerLastHighlights",a=aI(n)[o]||{},r=aI(n)[o]={};nI(t,function(t,e){var i=t.axisPointerModel.option;"show"===i.status&&nI(i.seriesDataIndices,function(t){var e=t.seriesIndex+" | "+t.dataIndex;r[e]=t})});var s=[],l=[];E(a,function(t,e){r[e]||l.push(t)}),E(r,function(t,e){a[e]||s.push(t)}),l.length&&i.dispatchAction({type:"downplay",escapeConnect:!0,batch:l}),s.length&&i.dispatchAction({type:"highlight",escapeConnect:!0,batch:s})}(h,0,i),d}});var BI=["x","y"],VI=["width","height"],GI=wI.extend({makeElOption:function(t,e,i,n,o){var a=i.axis,r=a.coordinateSystem,s=HI(r,1-WI(a)),l=r.dataToPoint(e)[0],u=n.get("type");if(u&&"none"!==u){var h=TI(n),c=FI[u](a,l,s);c.style=h,t.graphicKey=c.type,t.pointer=c}LI(e,t,$M(i),i,n,o)},getHandleTransform:function(t,e,i){var n=$M(e,{labelInside:!1});return n.labelMargin=i.get("handle.margin"),{position:CI(e.axis,t,n),rotation:n.rotation+(n.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,i,n){var o=i.axis,a=o.coordinateSystem,r=WI(o),s=HI(a,r),l=t.position;l[r]+=e[r],l[r]=Math.min(s[1],l[r]),l[r]=Math.max(s[0],l[r]);var u=HI(a,1-r),h=(u[1]+u[0])/2,c=[h,h];return c[r]=l[r],{position:l,rotation:t.rotation,cursorPoint:c,tooltipOption:{verticalAlign:"middle"}}}}),FI={line:function(t,e,i){return{type:"Line",subPixelOptimize:!0,shape:kI([e,i[0]],[e,i[1]],WI(t))}},shadow:function(t,e,i){var n=t.getBandWidth(),o=i[1]-i[0];return{type:"Rect",shape:PI([e-n/2,i[0]],[n,o],WI(t))}}};function WI(t){return t.isHorizontal()?0:1}function HI(t,e){var i=t.getRect();return[i[BI[e]],i[BI[e]]+i[VI[e]]]}mv.registerAxisPointerClass("SingleAxisPointer",GI),Af({type:"single"});var ZI=sc.extend({type:"series.themeRiver",dependencies:["singleAxis"],nameMap:null,init:function(t){ZI.superApply(this,"init",arguments),this.legendVisualProvider=new qv(A(this.getData,this),A(this.getRawData,this))},fixData:function(t){var e=t.length,i=ta(t,function(t){return t[2]}),n=[];i.buckets.each(function(t,e){n.push({name:e,dataList:t})});for(var o=n.length,a=-1,r=-1,s=0;s<o;++s){var l=n[s].dataList.length;a<l&&(a=l,r=s)}for(var u=0;u<o;++u)if(u!==r)for(var h=n[u].name,c=0;c<a;++c){for(var d=n[r].dataList[c][0],f=n[u].dataList.length,p=-1,g=0;g<f;++g){if(n[u].dataList[g][0]===d){p=g;break}}-1===p&&(t[e]=[],t[e][0]=d,t[e][1]=0,t[e][2]=h,e++)}return t},getInitialData:function(t,e){for(var i=e.queryComponents({mainType:"singleAxis",index:this.get("singleAxisIndex"),id:this.get("singleAxisId")})[0].get("type"),n=M(t.data,function(t){return void 0!==t[2]}),o=this.fixData(n||[]),a=[],r=this.nameMap=Q(),s=0,l=0;l<o.length;++l)a.push(o[l][2]),r.get(o[l][2])||(r.set(o[l][2],s),s++);var u=lp(o,{coordDimensions:["single"],dimensionsDefine:[{name:"time",type:Ef(i)},{name:"value",type:"float"},{name:"name",type:"ordinal"}],encodeDefine:{single:0,value:1,itemName:2}}),h=new Yf(u,this);return h.initData(o),h},getLayerSeries:function(){for(var i=this.getData(),t=i.count(),e=[],n=0;n<t;++n)e[n]=n;var o=i.mapDimension("single"),a=ta(e,function(t){return i.get("name",t)}),r=[];return a.buckets.each(function(t,e){t.sort(function(t,e){return i.get(o,t)-i.get(o,e)}),r.push({name:e,indices:t})}),r},getAxisTooltipData:function(t,e,i){L(t)||(t=t?[t]:[]);for(var n,o=this.getData(),a=this.getLayerSeries(),r=[],s=a.length,l=0;l<s;++l){for(var u=Number.MAX_VALUE,h=-1,c=a[l].indices.length,d=0;d<c;++d){var f=o.get(t[0],a[l].indices[d]),p=Math.abs(f-e);p<=u&&(n=f,u=p,h=a[l].indices[d])}r.push(h)}return{dataIndices:r,nestestValue:n}},formatTooltip:function(t){var e=this.getData(),i=e.getName(t),n=e.get(e.mapDimension("value"),t);return!isNaN(n)&&null!=n||(n="-"),au(i+" : "+n)},defaultOption:{zlevel:0,z:2,coordinateSystem:"singleAxis",boundaryGap:["10%","10%"],singleAxisIndex:0,animationEasing:"linear",label:{margin:4,show:!0,position:"left",color:"#000",fontSize:11},emphasis:{label:{show:!0}}}});Cf({type:"themeRiver",init:function(){this._layers=[]},render:function(b,t,e){var S=b.getData(),M=this.group,I=b.getLayerSeries(),i=S.getLayout("layoutInfo"),n=i.rect,o=i.boundaryGap;function a(t){return t.name}M.attr("position",[0,n.y+o[0]]);var r=new kf(this._layersSeries||[],I,a,a),T={};function s(t,e,i){var n=this._layers;if("remove"!==t){for(var o,a,r,s=[],l=[],u=I[e].indices,h=0;h<u.length;h++){var c=S.getItemLayout(u[h]),d=c.x,f=c.y0,p=c.y;s.push([d,f]),l.push([d,f+p]),o=S.getItemVisual(u[h],"color")}var g=S.getItemLayout(u[0]),m=S.getItemModel(u[h-1]),v=m.getModel("label"),y=v.get("margin");if("add"===t){var x=T[e]=new Ci;a=new _m({shape:{points:s,stackedOnPoints:l,smooth:.4,stackedOnSmooth:.4,smoothConstraint:!1},z2:0}),r=new Ur({style:{x:g.x-y,y:g.y0+g.y/2}}),x.add(a),x.add(r),M.add(x),a.setClipPath(function(t,e,i){var n=new rs({shape:{x:t.x-10,y:t.y-10,width:0,height:t.height+20}});return dl(n,{shape:{width:t.width+20,height:t.height+20}},e,i),n}(a.getBoundingRect(),b,function(){a.removeClipPath()}))}else{x=n[i];a=x.childAt(0),r=x.childAt(1),M.add(x),T[e]=x,cl(a,{shape:{points:s,stackedOnPoints:l}},b),cl(r,{style:{x:g.x-y,y:g.y0+g.y/2}},b)}var _=m.getModel("emphasis.itemStyle"),w=m.getModel("itemStyle");nl(r.style,v,{text:v.get("show")?b.getFormattedLabel(u[h-1],"normal")||S.getName(u[h-1]):null,textVerticalAlign:"middle"}),a.setStyle(P({fill:o},w.getItemStyle(["color"]))),$s(a,_.getItemStyle())}else M.remove(n[e])}r.add(A(s,this,"add")).update(A(s,this,"update")).remove(A(s,this,"remove")).execute(),this._layersSeries=I,this._layers=T},dispose:function(){}});function UI(i,t,e){if(i.count())for(var n,o=t.coordinateSystem,a=t.getLayerSeries(),r=i.mapDimension("single"),s=i.mapDimension("value"),l=O(a,function(t){return O(t.indices,function(t){var e=o.dataToPoint(i.get(r,t));return e[1]=i.get(s,t),e})}),u=function(t){for(var e=t.length,i=t[0].length,n=[],o=[],a=0,r={},s=0;s<i;++s){for(var l=0,u=0;l<e;++l)u+=t[l][s][1];a<u&&(a=u),n.push(u)}for(var h=0;h<i;++h)o[h]=(a-n[h])/2;for(var c=a=0;c<i;++c){var d=n[c]+o[c];a<d&&(a=d)}return r.y0=o,r.max=a,r}(l),h=u.y0,c=e/u.max,d=a.length,f=a[0].indices.length,p=0;p<f;++p){n=h[p]*c,i.setItemLayout(a[0].indices[p],{layerIndex:0,x:l[0][p][0],y0:n,y:l[0][p][1]*c});for(var g=1;g<d;++g)n+=l[g-1][p][1]*c,i.setItemLayout(a[g].indices[p],{layerIndex:g,x:l[g][p][0],y0:n,y:l[g][p][1]*c})}}bf(function(t,e){t.eachSeriesByType("themeRiver",function(t){var e=t.getData(),i=t.coordinateSystem,n={},o=i.getRect();n.rect=o;var a=t.get("boundaryGap"),r=i.getAxis();(n.boundaryGap=a,"horizontal"===r.orient)?(a[0]=Rl(a[0],o.height),a[1]=Rl(a[1],o.height),UI(e,t,o.height-a[0]-a[1])):(a[0]=Rl(a[0],o.width),a[1]=Rl(a[1],o.width),UI(e,t,o.width-a[0]-a[1]));e.setLayout("layoutInfo",n)})}),Sf(function(t){t.eachSeriesByType("themeRiver",function(o){var a=o.getData(),r=o.getRawData(),s=o.get("color"),l=Q();a.each(function(t){l.set(a.getRawIndex(t),t)}),r.each(function(t){var e=r.getName(t),i=s[(o.nameMap.get(e)-1)%s.length];r.setItemVisual(t,"color",i);var n=l.get(t);null!=n&&a.setItemVisual(n,"color",i)})})}),xf(uy("themeRiver")),sc.extend({type:"series.sunburst",_viewRoot:null,getInitialData:function(t,e){var i={name:t.name,children:t.data};!function i(t){var n=0;E(t.children,function(t){i(t);var e=t.value;L(e)&&(e=e[0]),n+=e});var e=t.value;L(e)&&(e=e[0]);null!=e&&!isNaN(e)||(e=n);e<0&&(e=0);L(t.value)?t.value[0]=e:t.value=e}(i);var n=t.levels||[],o={};return o.levels=n,Ax.createTree(i,this,o).data},optionUpdated:function(){this.resetViewRoot()},getDataParams:function(t){var e=sc.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(t);return e.treePathInfo=Yx(i,this),e},defaultOption:{zlevel:0,z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,percentPrecision:2,stillShowZeroSum:!0,highlightPolicy:"descendant",nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},highlight:{itemStyle:{opacity:1}},downplay:{itemStyle:{opacity:.5},label:{opacity:.6}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicOut",data:[],levels:[],sort:"desc"},getViewRoot:function(){return this._viewRoot},resetViewRoot:function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getRawData().tree.root;t&&(t===e||e.contains(t))||(this._viewRoot=e)}});var XI="none",YI="ancestor",jI="self",qI=2,KI=4;function $I(t,e,i){Ci.call(this);var n=new qr({z2:qI});n.seriesIndex=e.seriesIndex;var o=new Ur({z2:KI,silent:t.getModel("label").get("silent")});function a(){o.ignore=o.hoverIgnore}function r(){o.ignore=o.normalIgnore}this.add(n),this.add(o),this.updateData(!0,t,"normal",e,i),this.on("emphasis",a).on("normal",r).on("mouseover",a).on("mouseout",r)}var JI=$I.prototype;JI.updateData=function(t,e,i,n,o){(this.node=e).piece=this,n=n||this._seriesModel,o=o||this._ecModel;var a=this.childAt(0);a.dataIndex=e.dataIndex;var r=e.getModel(),s=e.getLayout(),l=P({},s);l.label=null;var u=function(t,e,i){var n=t.getVisual("color"),o=t.getVisual("visualMeta");o&&0!==o.length||(n=null);var a=t.getModel("itemStyle").get("color");{if(a)return a;if(n)return n;if(0===t.depth)return i.option.color[0];var r=i.option.color.length;a=i.option.color[function(t){var e=t;for(;1<e.depth;)e=e.parentNode;return _(t.getAncestors()[0].children,e)}(t)%r]}return a}(e,0,o);!function(t,e,i){e.getData().setItemVisual(t.dataIndex,"color",i)}(e,n,u);var h,c=r.getModel("itemStyle").getItemStyle();"normal"===i?h=c:h=m(r.getModel(i+".itemStyle").getItemStyle(),c);h=D({lineJoin:"bevel",fill:h.fill||u},h),t?(a.setShape(l),a.shape.r=s.r0,cl(a,{shape:{r:s.r}},n,e.dataIndex),a.useStyle(h)):"object"==typeof h.fill&&h.fill.type||"object"==typeof a.style.fill&&a.style.fill.type?(cl(a,{shape:l},n),a.useStyle(h)):cl(a,{shape:l,style:h},n),this._updateLabel(n,u,i);var d=r.getShallow("cursor");if(d&&a.attr("cursor",d),t){var f=n.getShallow("highlightPolicy");this._initEvents(a,e,n,f)}this._seriesModel=n||this._seriesModel,this._ecModel=o||this._ecModel,$s(this)},JI.onEmphasis=function(e){var i=this;this.node.hostTree.root.eachNode(function(t){t.piece&&(i.node===t?t.piece.updateData(!1,t,"emphasis"):!function(t,e,i){return i!==XI&&(i===jI?t===e:i===YI?t===e||t.isAncestorOf(e):t===e||t.isDescendantOf(e))}(t,i.node,e)?e!==XI&&t.piece.childAt(0).trigger("downplay"):t.piece.childAt(0).trigger("highlight"))})},JI.onNormal=function(){this.node.hostTree.root.eachNode(function(t){t.piece&&t.piece.updateData(!1,t,"normal")})},JI.onHighlight=function(){this.updateData(!1,this.node,"highlight")},JI.onDownplay=function(){this.updateData(!1,this.node,"downplay")},JI._updateLabel=function(t,e,i){var n=this.node.getModel(),o=n.getModel("label"),a="normal"===i||"emphasis"===i?o:n.getModel(i+".label"),r=n.getModel("emphasis.label"),s=W(t.getFormattedLabel(this.node.dataIndex,i,null,null,"label"),this.node.name);!1===S("show")&&(s="");var l=this.node.getLayout(),u=a.get("minAngle");null==u&&(u=o.get("minAngle")),u=u/180*Math.PI;var h=l.endAngle-l.startAngle;null!=u&&Math.abs(h)<u&&(s="");var c=this.childAt(1);el(c.style,c.hoverStyle||{},o,r,{defaultText:a.getShallow("show")?s:null,autoColor:e,useInsideStyle:!0});var d,f=(l.startAngle+l.endAngle)/2,p=Math.cos(f),g=Math.sin(f),m=S("position"),v=S("distance")||0,y=S("align");"outside"===m?(d=l.r+v,y=f>Math.PI/2?"right":"left"):y&&"center"!==y?"left"===y?(d=l.r0+v,f>Math.PI/2&&(y="right")):"right"===y&&(d=l.r-v,f>Math.PI/2&&(y="left")):(d=(l.r+l.r0)/2,y="center"),c.attr("style",{text:s,textAlign:y,textVerticalAlign:S("verticalAlign")||"middle",opacity:S("opacity")});var x=d*p+l.cx,_=d*g+l.cy;c.attr("position",[x,_]);var w=S("rotate"),b=0;function S(t){var e=a.get(t);return null==e?o.get(t):e}"radial"===w?(b=-f)<-Math.PI/2&&(b+=Math.PI):"tangential"===w?(b=Math.PI/2-f)>Math.PI/2?b-=Math.PI:b<-Math.PI/2&&(b+=Math.PI):"number"==typeof w&&(b=w*Math.PI/180),c.attr("rotation",b)},JI._initEvents=function(t,e,i,n){t.off("mouseover").off("mouseout").off("emphasis").off("normal");function o(){r.onEmphasis(n)}function a(){r.onNormal()}var r=this;i.isAnimationEnabled()&&t.on("mouseover",o).on("mouseout",a).on("emphasis",o).on("normal",a).on("downplay",function(){r.onDownplay()}).on("highlight",function(){r.onHighlight()})},w($I,Ci);_c.extend({type:"sunburst",init:function(){},render:function(o,a,t,e){var n=this;this.seriesModel=o,this.api=t,this.ecModel=a;var r=o.getData(),s=r.tree.root,i=o.getViewRoot(),l=this.group,u=o.get("renderLabelForZeroData"),h=[];i.eachNode(function(t){h.push(t)});var c=this._oldChildren||[];if(function(i,n){if(0===i.length&&0===n.length)return;function t(t){return t.getId()}function e(t,e){!function(t,e){u||!t||t.getValue()||(t=null);if(t!==s&&e!==s)if(e&&e.piece)t?(e.piece.updateData(!1,t,"normal",o,a),r.setItemGraphicEl(t.dataIndex,e.piece)):function(t){if(!t)return;t.piece&&(l.remove(t.piece),t.piece=null)}(e);else if(t){var i=new $I(t,o,a);l.add(i),r.setItemGraphicEl(t.dataIndex,i)}}(null==t?null:i[t],null==e?null:n[e])}new kf(n,i,t,t).add(e).update(e).remove(T(e,null)).execute()}(h,c),function(t,e){if(0<e.depth){n.virtualPiece?n.virtualPiece.updateData(!1,t,"normal",o,a):(n.virtualPiece=new $I(t,o,a),l.add(n.virtualPiece)),e.piece._onclickEvent&&e.piece.off("click",e.piece._onclickEvent);var i=function(t){n._rootToNode(e.parentNode)};e.piece._onclickEvent=i,n.virtualPiece.on("click",i)}else n.virtualPiece&&(l.remove(n.virtualPiece),n.virtualPiece=null)}(s,i),e&&e.highlight&&e.highlight.piece){var d=o.getShallow("highlightPolicy");e.highlight.piece.onEmphasis(d)}else if(e&&e.unhighlight){var f=this.virtualPiece;!f&&s.children.length&&(f=s.children[0].piece),f&&f.onNormal()}this._initEvents(),this._oldChildren=h},dispose:function(){},_initEvents:function(){function t(o){var a=!1;r.seriesModel.getViewRoot().eachNode(function(t){if(!a&&t.piece&&t.piece.childAt(0)===o.target){var e=t.getModel().get("nodeClick");if("rootToNode"===e)r._rootToNode(t);else if("link"===e){var i=t.getModel(),n=i.get("link");if(n)gu(n,i.get("target",!0)||"_blank")}a=!0}})}var r=this;this.group._onclickEvent&&this.group.off("click",this.group._onclickEvent),this.group.on("click",t),this.group._onclickEvent=t},_rootToNode:function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:"sunburstRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},containPoint:function(t,e){var i=e.getData().getItemLayout(0);if(i){var n=t[0]-i.cx,o=t[1]-i.cy,a=Math.sqrt(n*n+o*o);return a<=i.r&&a>=i.r0}}});var QI="sunburstRootToNode";_f({type:QI,update:"updateView"},function(o,t){t.eachComponent({mainType:"series",subType:"sunburst",query:o},function(t,e){var i=Zx(o,[QI],t);if(i){var n=t.getViewRoot();n&&(o.direction=Xx(n,i.node)?"rollUp":"drillDown"),t.resetViewRoot(i.node)}})});var tT="sunburstHighlight";_f({type:tT,update:"updateView"},function(n,t){t.eachComponent({mainType:"series",subType:"sunburst",query:n},function(t,e){var i=Zx(n,[tT],t);i&&(n.highlight=i.node)})});_f({type:"sunburstUnhighlight",update:"updateView"},function(i,t){t.eachComponent({mainType:"series",subType:"sunburst",query:i},function(t,e){i.unhighlight=!0})});var eT=Math.PI/180;function iT(t,e){if("function"==typeof e)return t.sort(e);var n="asc"===e;return t.sort(function(t,e){var i=(t.getValue()-e.getValue())*(n?1:-1);return 0==i?(t.dataIndex-e.dataIndex)*(n?-1:1):i})}function nT(a,r){return r=r||[0,0],O(["x","y"],function(t,e){var i=this.getAxis(t),n=r[e],o=a[e]/2;return"category"===i.type?i.getBandWidth():Math.abs(i.dataToCoord(n-o)-i.dataToCoord(n+o))},this)}Sf(T(iy,"sunburst")),bf(T(function(t,e,C,i){e.eachSeriesByType(t,function(t){var e=t.get("center"),i=t.get("radius");L(i)||(i=[0,i]),L(e)||(e=[e,e]);var n=C.getWidth(),o=C.getHeight(),h=Math.min(n,o),c=Rl(e[0],n),d=Rl(e[1],o),f=Rl(i[0],h/2),a=Rl(i[1],h/2),r=-t.get("startAngle")*eT,p=t.get("minAngle")*eT,g=t.getData().tree.root,s=t.getViewRoot(),m=s.depth,l=t.get("sort");null!=l&&!function e(t,i){var n=t.children||[];t.children=iT(n,i);n.length&&E(t.children,function(t){e(t,i)})}(s,l);var u=0;E(s.children,function(t){isNaN(t.getValue())||u++});var v=s.getValue(),y=Math.PI/(v||u)*2,x=0<s.depth,_=s.height-(x?-1:1),w=(a-f)/(_||1),b=t.get("clockwise"),S=t.get("stillShowZeroSum"),M=b?1:-1,I=function(t,e){if(t){var i=e;if(t!==g){var n=t.getValue(),o=0===v&&S?y:n*y;o<p&&(o=p),i=e+M*o;var a=t.depth-m-(x?-1:1),r=f+w*a,s=f+w*(1+a),l=t.getModel();null!=l.get("r0")&&(r=Rl(l.get("r0"),h/2)),null!=l.get("r")&&(s=Rl(l.get("r"),h/2)),t.setLayout({angle:o,startAngle:e,endAngle:i,clockwise:b,cx:c,cy:d,r0:r,r:s})}if(t.children&&t.children.length){var u=0;E(t.children,function(t){u+=I(t,e+u)})}return i-e}};if(x){var T=f,A=f+w,D=2*Math.PI;g.setLayout({angle:D,startAngle:r,endAngle:r+D,clockwise:b,cx:c,cy:d,r0:T,r:A})}I(s,r)})},"sunburst")),xf(T(uy,"sunburst"));function oT(a,r){return r=r||[0,0],O([0,1],function(t){var e=r[t],i=a[t]/2,n=[],o=[];return n[t]=e-i,o[t]=e+i,n[1-t]=o[1-t]=r[1-t],Math.abs(this.dataToPoint(n)[t]-this.dataToPoint(o)[t])},this)}function aT(t,e){var i=this.getAxis(),n=e instanceof Array?e[0]:e,o=(t instanceof Array?t[0]:t)/2;return"category"===i.type?i.getBandWidth():Math.abs(i.dataToCoord(n-o)-i.dataToCoord(n+o))}function rT(s,l){return O(["Radius","Angle"],function(t,e){var i=this["get"+t+"Axis"](),n=l[e],o=s[e]/2,a="dataTo"+t,r="category"===i.type?i.getBandWidth():Math.abs(i[a](n-o)-i[a](n+o));return"Angle"===t&&(r=r*Math.PI/180),r},this)}var sT=Ss,lT=["itemStyle"],uT=["emphasis","itemStyle"],hT=["label"],cT=["emphasis","label"],dT="e\0\0",fT={cartesian2d:function(e){var t=e.grid.getRect();return{coordSys:{type:"cartesian2d",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(t){return e.dataToPoint(t)},size:A(nT,e)}}},geo:function(e){var t=e.getBoundingRect();return{coordSys:{type:"geo",x:t.x,y:t.y,width:t.width,height:t.height,zoom:e.getZoom()},api:{coord:function(t){return e.dataToPoint(t)},size:A(oT,e)}}},singleAxis:function(e){var t=e.getRect();return{coordSys:{type:"singleAxis",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(t){return e.dataToPoint(t)},size:A(aT,e)}}},polar:function(o){var a=o.getRadiusAxis(),r=o.getAngleAxis(),t=a.getExtent();return t[0]>t[1]&&t.reverse(),{coordSys:{type:"polar",cx:o.cx,cy:o.cy,r:t[1],r0:t[0]},api:{coord:A(function(t){var e=a.dataToRadius(t[0]),i=r.dataToAngle(t[1]),n=o.coordToPoint([e,i]);return n.push(e,i*Math.PI/180),n}),size:A(rT,o)}}},calendar:function(i){var t=i.getRect(),e=i.getRangeInfo();return{coordSys:{type:"calendar",x:t.x,y:t.y,width:t.width,height:t.height,cellWidth:i.getCellWidth(),cellHeight:i.getCellHeight(),rangeInfo:{start:e.start,end:e.end,weeks:e.weeks,dayCount:e.allDay}},api:{coord:function(t,e){return i.dataToPoint(t,e)}}}}};function pT(t,e,i,n,o){null==i[t]||o||(e[t]=i[t],i[t]=n[t])}function gT(a,r,e,t){var i=a.get("renderItem"),n=a.coordinateSystem,o={};n&&(o=n.prepareCustoms?n.prepareCustoms():fT[n.type](n));var s,l,u,h,c,d=D({getWidth:t.getWidth,getHeight:t.getHeight,getZr:t.getZr,getDevicePixelRatio:t.getDevicePixelRatio,value:function(t,e){return null==e&&(e=s),r.get(r.getDimension(t||0),e)},style:function(t,e){null==e&&(e=s),g(e);var i=l.getModel(lT).getItemStyle();null!=c&&(i.fill=c);var n=r.getItemVisual(e,"opacity");null!=n&&(i.opacity=n);var o=t?_T(t,u):u;return nl(i,o,null,{autoColor:c,isRectText:!0}),i.text=o.getShallow("show")?H(a.getFormattedLabel(e,"normal"),Ug(r,e)):null,t&&wT(i,t),i},styleEmphasis:function(t,e){null==e&&(e=s),g(e);var i=l.getModel(uT).getItemStyle(),n=t?_T(t,h):h;return nl(i,n,null,{isRectText:!0},!0),i.text=n.getShallow("show")?Z(a.getFormattedLabel(e,"emphasis"),a.getFormattedLabel(e,"normal"),Ug(r,e)):null,t&&wT(i,t),i},visual:function(t,e){return null==e&&(e=s),r.getItemVisual(e,t)},barLayout:function(t){if(n.getBaseAxis){return function(t){var e=[],i=t.axis;if("category"===i.type){for(var n=i.getBandWidth(),o=0;o<t.count;o++)e.push(D({bandWidth:n,axisKey:"axis0",stackId:Cp+o},t));var a=Ep(e),r=[];for(o=0;o<t.count;o++){var s=a.axis0[Cp+o];s.offsetCenter=s.offset+s.width/2,r.push(s)}return r}}(D({axis:n.getBaseAxis()},t))}},currentSeriesIndices:function(){return e.getCurrentSeriesIndices()},font:function(t){return ul(t,e)}},o.api||{}),f={context:{},seriesId:a.id,seriesName:a.name,seriesIndex:a.seriesIndex,coordSys:o.coordSys,dataInsideLength:r.count(),encode:function(o){var a={};return E(o.dimensions,function(t,e){var i=o.getDimensionInfo(t);if(!i.isExtraCoord){var n=i.coordDim;(a[n]=a[n]||[])[i.coordDimIndex]=e}}),a}(a.getData())},p=!0;return function(t,e){return s=t,p=!0,i&&i(D({dataIndexInside:t,dataIndex:r.getRawIndex(t),actionType:e?e.type:null},f),d)};function g(t){null==t&&(t=s),p&&(l=r.getItemModel(t),u=l.getModel(hT),h=l.getModel(cT),c=r.getItemVisual(t,"color"),p=!1)}}function mT(t,e,i,n,o,a){return(t=vT(t,e,i,n,o,a,!0))&&a.setItemGraphicEl(e,t),t}function vT(t,e,i,n,o,a,r){var s=!i,l=(i=i||{}).type,u=i.shape,h=i.style;if(t&&(s||null!=l&&l!==t.__customGraphicType||"path"===l&&function(t){return t&&(t.hasOwnProperty("pathData")||t.hasOwnProperty("d"))}(u)&&ST(u)!==t.__customPathData||"image"===l&&MT(h,"image")&&h.image!==t.__customImagePath||"text"===l&&MT(u,"text")&&h.text!==t.__customText)&&(o.remove(t),t=null),!s){var c=!t;return function(e,t,i,n,o,a,r){var s={},l=i.style||{};if(i.shape&&(s.shape=k(i.shape)),i.position&&(s.position=i.position.slice()),i.scale&&(s.scale=i.scale.slice()),i.origin&&(s.origin=i.origin.slice()),i.rotation&&(s.rotation=i.rotation),"image"===e.type&&i.style){var u=s.style={};E(["x","y","width","height"],function(t){pT(t,u,l,e.style,a)})}if("text"===e.type&&i.style){u=s.style={};E(["x","y"],function(t){pT(t,u,l,e.style,a)}),!l.hasOwnProperty("textFill")&&l.fill&&(l.textFill=l.fill),!l.hasOwnProperty("textStroke")&&l.stroke&&(l.textStroke=l.stroke)}if("group"!==e.type&&(e.useStyle(l),a)){e.style.opacity=0;var h=l.opacity;null==h&&(h=1),dl(e,{style:{opacity:h}},n,t)}a?e.attr(s):cl(e,s,n,t),i.hasOwnProperty("z2")&&e.attr("z2",i.z2||0),i.hasOwnProperty("silent")&&e.attr("silent",i.silent),i.hasOwnProperty("invisible")&&e.attr("invisible",i.invisible),i.hasOwnProperty("ignore")&&e.attr("ignore",i.ignore),i.hasOwnProperty("info")&&e.attr("info",i.info);var c=i.styleEmphasis;Us(e,c),r&&Js(e,!1!==c)}(t=t||function(t){var e,i=t.type;if("path"===i){var n=t.shape,o=null!=n.width&&null!=n.height?{x:n.x||0,y:n.y||0,width:n.width,height:n.height}:null,a=ST(n);(e=Ps(a,null,o,n.layout||"center")).__customPathData=a}else if("image"===i)(e=new Qn({})).__customImagePath=t.style.image;else if("text"===i)(e=new Ur({})).__customText=t.style.text;else if("group"===i)e=new Ci;else{if("compoundPath"===i)throw new Error('"compoundPath" is not supported yet.');e=new(ks(i))}return e.__customGraphicType=i,e.name=t.name,e}(i),e,i,n,0,c,r),"group"===l&&function(t,e,i,n,o){var a=i.children,r=a?a.length:0,s=i.$mergeChildren,l="byName"===s||i.diffChildrenByName,u=!1===s;if(!r&&!l&&!u)return;if(l)return function(t){new kf(t.oldChildren,t.newChildren,yT,yT,t).add(xT).update(xT).remove(bT).execute()}({oldChildren:t.children()||[],newChildren:a||[],dataIndex:e,animatableModel:n,group:t,data:o});u&&t.removeAll();for(var h=0;h<r;h++)a[h]&&vT(t.childAt(h),e,a[h],n,t,o)}(t,e,i,n,a),o.add(t),t}}function yT(t,e){var i=t&&t.name;return null!=i?i:dT+e}function xT(t,e){var i=this.context,n=null!=t?i.newChildren[t]:null;vT(null!=e?i.oldChildren[e]:null,i.dataIndex,n,i.animatableModel,i.group,i.data)}function _T(i,t){var n=new Cl({},t);return E(sT,function(t,e){i.hasOwnProperty(t)&&(n.option[e]=i[t])}),n}function wT(t,e){for(var i in e)!e.hasOwnProperty(i)&&sT.hasOwnProperty(i)||(t[i]=e[i])}function bT(t){var e=this.context,i=e.oldChildren[t];i&&e.group.remove(i)}function ST(t){return t&&(t.pathData||t.d)}function MT(t,e){return t&&t.hasOwnProperty(e)}function IT(t){return t.get("stack")||"__ec_stack_"+t.seriesIndex}function TT(t,e){return e.dim+t.model.componentIndex}function AT(t,e){Gg.call(this,"radius",t,e),this.type="category"}sc.extend({type:"series.custom",dependencies:["grid","polar","geo","singleAxis","calendar"],defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,useTransform:!0,clip:!1},getInitialData:function(t,e){return gp(this.getSource(),this)},getDataParams:function(t,e,i){var n=sc.prototype.getDataParams.apply(this,arguments);return i&&(n.info=i.info),n}}),_c.extend({type:"custom",_data:null,render:function(i,t,e,n){var o=this._data,a=i.getData(),r=this.group,s=gT(i,a,t,e);a.diff(o).add(function(t){mT(null,t,s(t,n),i,r,a)}).update(function(t,e){mT(o.getItemGraphicEl(e),t,s(t,n),i,r,a)}).remove(function(t){var e=o.getItemGraphicEl(t);e&&r.remove(e)}).execute();var l=i.get("clip",!0)?Sm(i.coordinateSystem,!1,i):null;l?r.setClipPath(l):r.removeClipPath(),this._data=a},incrementalPrepareRender:function(t,e,i){this.group.removeAll(),this._data=null},incrementalRender:function(t,e,i,n,o){var a=e.getData(),r=gT(e,a,i,n);function s(t){t.isGroup||(t.incremental=!0,t.useHoverLayer=!0)}for(var l=t.start;l<t.end;l++){mT(null,l,r(l,o),e,this.group,a).traverse(s)}},dispose:et,filterForExposedEvent:function(t,e,i,n){var o=e.element;if(null==o||i.name===o)return!0;for(;(i=i.parent)&&i!==this.group;)if(i.name===o)return!0;return!1}}),AT.prototype={constructor:AT,pointToData:function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},dataToRadius:Gg.prototype.dataToCoord,radiusToData:Gg.prototype.coordToData},w(AT,Gg);var DT=jo();function CT(t,e){e=e||[0,360],Gg.call(this,"angle",t,e),this.type="category"}CT.prototype={constructor:CT,pointToData:function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},dataToAngle:Gg.prototype.dataToCoord,angleToData:Gg.prototype.coordToData,calculateCategoryInterval:function(){var t=this.getLabelModel(),e=this.scale,i=e.getExtent(),n=e.count();if(i[1]-i[0]<1)return 0;var o=i[0],a=this.dataToCoord(o+1)-this.dataToCoord(o),r=Math.abs(a),s=gn(o,t.getFont(),"center","top"),l=Math.max(s.height,7)/r;isNaN(l)&&(l=1/0);var u=Math.max(0,Math.floor(l)),h=DT(this.model),c=h.lastAutoInterval,d=h.lastTickCount;return null!=c&&null!=d&&Math.abs(c-u)<=1&&Math.abs(d-n)<=1&&u<c?u=c:(h.lastTickCount=n,h.lastAutoInterval=u),u}},w(CT,Gg);function LT(t){this.name=t||"",this.cx=0,this.cy=0,this._radiusAxis=new AT,this._angleAxis=new CT,this._radiusAxis.polar=this._angleAxis.polar=this}LT.prototype={type:"polar",axisPointerEnabled:!0,constructor:LT,dimensions:["radius","angle"],model:null,containPoint:function(t){var e=this.pointToCoord(t);return this._radiusAxis.contain(e[0])&&this._angleAxis.contain(e[1])},containData:function(t){return this._radiusAxis.containData(t[0])&&this._angleAxis.containData(t[1])},getAxis:function(t){return this["_"+t+"Axis"]},getAxes:function(){return[this._radiusAxis,this._angleAxis]},getAxesByScale:function(t){var e=[],i=this._angleAxis,n=this._radiusAxis;return i.scale.type===t&&e.push(i),n.scale.type===t&&e.push(n),e},getAngleAxis:function(){return this._angleAxis},getRadiusAxis:function(){return this._radiusAxis},getOtherAxis:function(t){var e=this._angleAxis;return t===e?this._radiusAxis:e},getBaseAxis:function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},getTooltipAxes:function(t){var e=null!=t&&"auto"!==t?this.getAxis(t):this.getBaseAxis();return{baseAxes:[e],otherAxes:[this.getOtherAxis(e)]}},dataToPoint:function(t,e){return this.coordToPoint([this._radiusAxis.dataToRadius(t[0],e),this._angleAxis.dataToAngle(t[1],e)])},pointToData:function(t,e){var i=this.pointToCoord(t);return[this._radiusAxis.radiusToData(i[0],e),this._angleAxis.angleToData(i[1],e)]},pointToCoord:function(t){var e=t[0]-this.cx,i=t[1]-this.cy,n=this.getAngleAxis(),o=n.getExtent(),a=Math.min(o[0],o[1]),r=Math.max(o[0],o[1]);n.inverse?a=r-360:r=a+360;var s=Math.sqrt(e*e+i*i);e/=s,i/=s;for(var l=Math.atan2(-i,e)/Math.PI*180,u=l<a?1:-1;l<a||r<l;)l+=360*u;return[s,l]},coordToPoint:function(t){var e=t[0],i=t[1]/180*Math.PI;return[Math.cos(i)*e+this.cx,-Math.sin(i)*e+this.cy]},getArea:function(){var t=this.getAngleAxis(),e=this.getRadiusAxis().getExtent().slice();e[0]>e[1]&&e.reverse();var i=t.getExtent(),n=Math.PI/180;return{cx:this.cx,cy:this.cy,r0:e[0],r:e[1],startAngle:-i[0]*n,endAngle:-i[1]*n,clockwise:t.inverse,contain:function(t,e){var i=t-this.cx,n=e-this.cy,o=i*i+n*n,a=this.r,r=this.r0;return o<=a*a&&r*r<=o}}}};var kT=ku.extend({type:"polarAxis",axis:null,getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"polar",index:this.option.polarIndex,id:this.option.polarId})[0]}});m(kT.prototype,dg);var PT={splitNumber:5};function NT(t,e){return e.type||(e.data?"category":"value")}function OT(t,e){var i=this,n=i.getAngleAxis(),o=i.getRadiusAxis();if(n.scale.setExtent(1/0,-1/0),o.scale.setExtent(1/0,-1/0),t.eachSeries(function(t){if(t.coordinateSystem===i){var e=t.getData();E(e.mapDimension("radius",!0),function(t){o.scale.unionExtentFromData(e,pp(e,t))}),E(e.mapDimension("angle",!0),function(t){n.scale.unionExtentFromData(e,pp(e,t))})}}),rg(n.scale,n.model),rg(o.scale,o.model),"category"===n.type&&!n.onBand){var a=n.getExtent(),r=360/n.scale.count();n.inverse?a[1]+=r:a[1]-=r,n.setExtent(a[0],a[1])}}function ET(t,e){if(t.type=e.get("type"),t.scale=sg(e),t.onBand=e.get("boundaryGap")&&"category"===t.type,t.inverse=e.get("inverse"),"angleAxis"===e.mainType){t.inverse^=e.get("clockwise");var i=e.get("startAngle");t.setExtent(i,i+(t.inverse?-360:360))}(e.axis=t).model=e}Gm("angle",kT,NT,{startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:!1}}),Gm("radius",kT,NT,PT),Tf({type:"polar",dependencies:["polarAxis","angleAxis"],coordinateSystem:null,findAxisModel:function(t){var e;return this.ecModel.eachComponent(t,function(t){t.getCoordSysModel()===this&&(e=t)},this),e},defaultOption:{zlevel:0,z:0,center:["50%","50%"],radius:"80%"}}),lh.register("polar",{dimensions:LT.prototype.dimensions,create:function(i,s){var l=[];return i.eachComponent("polar",function(t,e){var i=new LT(e);i.update=OT;var n=i.getRadiusAxis(),o=i.getAngleAxis(),a=t.findAxisModel("radiusAxis"),r=t.findAxisModel("angleAxis");ET(n,a),ET(o,r),function(t,e,i){var n=e.get("center"),o=i.getWidth(),a=i.getHeight();t.cx=Rl(n[0],o),t.cy=Rl(n[1],a);var r=t.getRadiusAxis(),s=Math.min(o,a)/2,l=e.get("radius");null==l?l=[0,"100%"]:L(l)||(l=[0,l]),l=[Rl(l[0],s),Rl(l[1],s)],r.inverse?r.setExtent(l[1],l[0]):r.setExtent(l[0],l[1])}(i,t,s),l.push(i),(t.coordinateSystem=i).model=t}),i.eachSeries(function(t){if("polar"===t.get("coordinateSystem")){var e=i.queryComponents({mainType:"polar",index:t.get("polarIndex"),id:t.get("polarId")})[0];t.coordinateSystem=e.coordinateSystem}}),l}});var RT=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function zT(t,e,i){e[1]>e[0]&&(e=e.slice().reverse());var n=t.coordToPoint([e[0],i]),o=t.coordToPoint([e[1],i]);return{x1:n[0],y1:n[1],x2:o[0],y2:o[1]}}function BT(t){return t.getRadiusAxis().inverse?0:1}function VT(t){var e=t[0],i=t[t.length-1];e&&i&&Math.abs(Math.abs(e.coord-i.coord)-360)<1e-4&&t.pop()}mv.extend({type:"angleAxis",axisPointerClass:"PolarAxisPointer",render:function(e,t){if(this.group.removeAll(),e.get("show")){var i=e.axis,n=i.polar,o=n.getRadiusAxis().getExtent(),a=i.getTicksCoords(),r=i.getMinorTicksCoords(),s=O(i.getViewLabels(),function(t){return(t=k(t)).coord=i.dataToCoord(t.tickValue),t});VT(s),VT(a),E(RT,function(t){!e.get(t+".show")||i.scale.isBlank()&&"axisLine"!==t||this["_"+t](e,n,a,r,o,s)},this)}},_axisLine:function(t,e,i,n,o){var a,r=t.getModel("axisLine.lineStyle"),s=BT(e),l=s?0:1;(a=0===o[l]?new Yr({shape:{cx:e.cx,cy:e.cy,r:o[s]},style:r.getLineStyle(),z2:1,silent:!0}):new Kr({shape:{cx:e.cx,cy:e.cy,r:o[s],r0:o[l]},style:r.getLineStyle(),z2:1,silent:!0})).style.fill=null,this.group.add(a)},_axisTick:function(t,e,i,n,o){var a=t.getModel("axisTick"),r=(a.get("inside")?-1:1)*a.get("length"),s=o[BT(e)],l=O(i,function(t){return new ls({shape:zT(e,[s,s+r],t.coord)})});this.group.add(Es(l,{style:D(a.getModel("lineStyle").getLineStyle(),{stroke:t.get("axisLine.lineStyle.color")})}))},_minorTick:function(t,e,i,n,o){if(n.length){for(var a=t.getModel("axisTick"),r=t.getModel("minorTick"),s=(a.get("inside")?-1:1)*r.get("length"),l=o[BT(e)],u=[],h=0;h<n.length;h++)for(var c=0;c<n[h].length;c++)u.push(new ls({shape:zT(e,[l,l+s],n[h][c].coord)}));this.group.add(Es(u,{style:D(r.getModel("lineStyle").getLineStyle(),D(a.getLineStyle(),{stroke:t.get("axisLine.lineStyle.color")}))}))}},_axisLabel:function(c,d,t,e,f,i){var p=c.getCategories(!0),g=c.getModel("axisLabel"),m=g.get("margin"),v=c.get("triggerEvent");E(i,function(t,e){var i=g,n=t.tickValue,o=f[BT(d)],a=d.coordToPoint([o+m,t.coord]),r=d.cx,s=d.cy,l=Math.abs(a[0]-r)/o<.3?"center":a[0]>r?"left":"right",u=Math.abs(a[1]-s)/o<.3?"middle":a[1]>s?"top":"bottom";p&&p[n]&&p[n].textStyle&&(i=new Cl(p[n].textStyle,g,g.ecModel));var h=new Ur({silent:Qm.isLabelSilent(c)});this.group.add(h),nl(h.style,i,{x:a[0],y:a[1],textFill:i.getTextColor()||c.get("axisLine.lineStyle.color"),text:t.formattedLabel,textAlign:l,textVerticalAlign:u}),v&&(h.eventData=Qm.makeAxisEventDataBase(c),h.eventData.targetType="axisLabel",h.eventData.value=t.rawLabel)},this)},_splitLine:function(t,e,i,n,o){var a=t.getModel("splitLine").getModel("lineStyle"),r=a.get("color"),s=0;r=r instanceof Array?r:[r];for(var l=[],u=0;u<i.length;u++){var h=s++%r.length;l[h]=l[h]||[],l[h].push(new ls({shape:zT(e,o,i[u].coord)}))}for(u=0;u<l.length;u++)this.group.add(Es(l[u],{style:D({stroke:r[u%r.length]},a.getLineStyle()),silent:!0,z:t.get("z")}))},_minorSplitLine:function(t,e,i,n,o){if(n.length){for(var a=t.getModel("minorSplitLine").getModel("lineStyle"),r=[],s=0;s<n.length;s++)for(var l=0;l<n[s].length;l++)r.push(new ls({shape:zT(e,o,n[s][l].coord)}));this.group.add(Es(r,{style:a.getLineStyle(),silent:!0,z:t.get("z")}))}},_splitArea:function(t,e,i,n,o){if(i.length){var a=t.getModel("splitArea").getModel("areaStyle"),r=a.get("color"),s=0;r=r instanceof Array?r:[r];for(var l=[],u=Math.PI/180,h=-i[0].coord*u,c=Math.min(o[0],o[1]),d=Math.max(o[0],o[1]),f=t.get("clockwise"),p=1;p<i.length;p++){var g=s++%r.length;l[g]=l[g]||[],l[g].push(new qr({shape:{cx:e.cx,cy:e.cy,r0:c,r:d,startAngle:h,endAngle:-i[p].coord*u,clockwise:f},silent:!0})),h=-i[p].coord*u}for(p=0;p<l.length;p++)this.group.add(Es(l[p],{style:D({fill:r[p%r.length]},a.getAreaStyle()),silent:!0}))}}});var GT=["axisLine","axisTickLabel","axisName"],FT=["splitLine","splitArea","minorSplitLine"];mv.extend({type:"radiusAxis",axisPointerClass:"PolarAxisPointer",render:function(e,t){if(this.group.removeAll(),e.get("show")){var i=e.axis,n=i.polar,o=n.getAngleAxis(),a=i.getTicksCoords(),r=i.getMinorTicksCoords(),s=o.getExtent()[0],l=i.getExtent(),u=function(t,e,i){return{position:[t.cx,t.cy],rotation:i/180*Math.PI,labelDirection:-1,tickDirection:-1,nameDirection:1,labelRotate:e.getModel("axisLabel").get("rotate"),z2:1}}(n,e,s),h=new Qm(e,u);E(GT,h.add,h),this.group.add(h.getGroup()),E(FT,function(t){e.get(t+".show")&&!i.scale.isBlank()&&this["_"+t](e,n,s,l,a,r)},this)}},_splitLine:function(t,e,i,n,o){var a=t.getModel("splitLine").getModel("lineStyle"),r=a.get("color"),s=0;r=r instanceof Array?r:[r];for(var l=[],u=0;u<o.length;u++){var h=s++%r.length;l[h]=l[h]||[],l[h].push(new Yr({shape:{cx:e.cx,cy:e.cy,r:o[u].coord}}))}for(u=0;u<l.length;u++)this.group.add(Es(l[u],{style:D({stroke:r[u%r.length],fill:null},a.getLineStyle()),silent:!0}))},_minorSplitLine:function(t,e,i,n,o,a){if(a.length){for(var r=t.getModel("minorSplitLine").getModel("lineStyle"),s=[],l=0;l<a.length;l++)for(var u=0;u<a[l].length;u++)s.push(new Yr({shape:{cx:e.cx,cy:e.cy,r:a[l][u].coord}}));this.group.add(Es(s,{style:D({fill:null},r.getLineStyle()),silent:!0}))}},_splitArea:function(t,e,i,n,o){if(o.length){var a=t.getModel("splitArea").getModel("areaStyle"),r=a.get("color"),s=0;r=r instanceof Array?r:[r];for(var l=[],u=o[0].coord,h=1;h<o.length;h++){var c=s++%r.length;l[c]=l[c]||[],l[c].push(new qr({shape:{cx:e.cx,cy:e.cy,r0:u,r:o[h].coord,startAngle:0,endAngle:2*Math.PI},silent:!0})),u=o[h].coord}for(h=0;h<l.length;h++)this.group.add(Es(l[h],{style:D({fill:r[h%r.length]},a.getAreaStyle()),silent:!0}))}}});var WT=wI.extend({makeElOption:function(t,e,i,n,o){var a=i.axis;"angle"===a.dim&&(this.animationThreshold=Math.PI/18);var r,s=a.polar,l=s.getOtherAxis(a).getExtent();r=a["dataTo"+fu(a.dim)](e);var u=n.get("type");if(u&&"none"!==u){var h=TI(n),c=HT[u](a,s,r,l,h);c.style=h,t.graphicKey=c.type,t.pointer=c}var d=n.get("label.margin");AI(t,i,n,o,function(t,e,i,n,o){var a=e.axis,r=a.dataToCoord(t),s=n.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l,u,h,c=n.getRadiusAxis().getExtent();if("radius"===a.dim){var d=ae();he(d,d,s),ue(d,d,[n.cx,n.cy]),l=pl([r,-o],d);var f=e.getModel("axisLabel").get("rotate")||0,p=Qm.innerTextLayout(s,f*Math.PI/180,-1);u=p.textAlign,h=p.textVerticalAlign}else{var g=c[1];l=n.coordToPoint([g+o,r]);var m=n.cx,v=n.cy;u=Math.abs(l[0]-m)/g<.3?"center":l[0]>m?"left":"right",h=Math.abs(l[1]-v)/g<.3?"middle":l[1]>v?"top":"bottom"}return{position:l,align:u,verticalAlign:h}}(e,i,0,s,d))}});var HT={line:function(t,e,i,n,o){return"angle"===t.dim?{type:"Line",shape:kI(e.coordToPoint([n[0],i]),e.coordToPoint([n[1],i]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r:i}}},shadow:function(t,e,i,n,o){var a=Math.max(1,t.getBandWidth()),r=Math.PI/180;return"angle"===t.dim?{type:"Sector",shape:NI(e.cx,e.cy,n[0],n[1],(-i-a/2)*r,(a/2-i)*r)}:{type:"Sector",shape:NI(e.cx,e.cy,i-a/2,i+a/2,0,2*Math.PI)}}};function ZT(n,t){t.update="updateView",_f(t,function(t,e){var i={};return e.eachComponent({mainType:"geo",query:t},function(e){e[n](t.name),E(e.coordinateSystem.regions,function(t){i[t.name]=e.isSelected(t.name)||!1})}),{selected:i,name:t.name}})}mv.registerAxisPointerClass("PolarAxisPointer",WT),bf(T(function(t,e,i){var N={},O=function(t){var g={};E(t,function(t,e){var i=t.getData(),n=t.coordinateSystem,o=n.getBaseAxis(),a=TT(n,o),r=o.getExtent(),s="category"===o.type?o.getBandWidth():Math.abs(r[1]-r[0])/i.count(),l=g[a]||{bandWidth:s,remainedWidth:s,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},u=l.stacks;g[a]=l;var h=IT(t);u[h]||l.autoWidthCount++,u[h]=u[h]||{width:0,maxWidth:0};var c=Rl(t.get("barWidth"),s),d=Rl(t.get("barMaxWidth"),s),f=t.get("barGap"),p=t.get("barCategoryGap");c&&!u[h].width&&(c=Math.min(l.remainedWidth,c),u[h].width=c,l.remainedWidth-=c),d&&(u[h].maxWidth=d),null!=f&&(l.gap=f),null!=p&&(l.categoryGap=p)});var d={};return E(g,function(t,i){d[i]={};var e=t.stacks,n=t.bandWidth,o=Rl(t.categoryGap,n),a=Rl(t.gap,1),r=t.remainedWidth,s=t.autoWidthCount,l=(r-o)/(s+(s-1)*a);l=Math.max(l,0),E(e,function(t,e){var i=t.maxWidth;i&&i<l&&(i=Math.min(i,r),t.width&&(i=Math.min(i,t.width)),r-=i,t.width=i,s--)}),l=(r-o)/(s+(s-1)*a),l=Math.max(l,0);var u,h=0;E(e,function(t,e){t.width||(t.width=l),h+=(u=t).width*(1+a)}),u&&(h-=u.width*a);var c=-h/2;E(e,function(t,e){d[i][e]=d[i][e]||{offset:c,width:t.width},c+=t.width*(1+a)})}),d}(M(e.getSeriesByType(t),function(t){return!e.isSeriesFiltered(t)&&t.coordinateSystem&&"polar"===t.coordinateSystem.type}));e.eachSeriesByType(t,function(t){if("polar"===t.coordinateSystem.type){var e=t.getData(),i=t.coordinateSystem,n=i.getBaseAxis(),o=TT(i,n),a=IT(t),r=O[o][a],s=r.offset,l=r.width,u=i.getOtherAxis(n),h=t.coordinateSystem.cx,c=t.coordinateSystem.cy,d=t.get("barMinHeight")||0,f=t.get("barMinAngle")||0;N[a]=N[a]||[];for(var p=e.mapDimension(u.dim),g=e.mapDimension(n.dim),m=fp(e,p),v="radius"!==n.dim||!t.get("roundCap",!0),y=u.getExtent()[0],x=0,_=e.count();x<_;x++){var w,b,S,M,I=e.get(p,x),T=e.get(g,x),A=0<=I?"p":"n",D=y;if(m&&(N[a][T]||(N[a][T]={p:y,n:y}),D=N[a][T][A]),"radius"===u.dim){var C=u.dataToRadius(I)-y,L=n.dataToAngle(T);Math.abs(C)<d&&(C=(C<0?-1:1)*d),b=(w=D)+C,M=(S=L-s)-l,m&&(N[a][T][A]=b)}else{var k=u.dataToAngle(I,v)-y,P=n.dataToRadius(T);Math.abs(k)<f&&(k=(k<0?-1:1)*f),b=(w=P+s)+l,M=(S=D)+k,m&&(N[a][T][A]=M)}e.setItemLayout(x,{cx:h,cy:c,r0:w,r:b,startAngle:-S*Math.PI/180,endAngle:-M*Math.PI/180})}}},this)},"bar")),Af({type:"polar"}),b(ku.extend({type:"geo",coordinateSystem:null,layoutMode:"box",init:function(t){ku.prototype.init.apply(this,arguments),Go(t,"label",["show"])},optionUpdated:function(){var t=this.option,i=this;t.regions=px.getFilledRegions(t.regions,t.map,t.nameMap),this._optionModelMap=S(t.regions||[],function(t,e){return e.name&&t.set(e.name,new Cl(e,i)),t},Q()),this.updateSelectedMap(t.regions)},defaultOption:{zlevel:0,z:0,show:!0,left:"center",top:"center",aspectScale:null,silent:!1,map:"",boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",color:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},regions:[]},getRegionModel:function(t){return this._optionModelMap.get(t)||new Cl(null,this,this.ecModel)},getFormattedLabel:function(t,e){var i=this.getRegionModel(t).get("label"+("normal"===e?".":e+".")+"formatter"),n={name:t};return"function"==typeof i?(n.status=e,i(n)):"string"==typeof i?i.replace("{a}",null!=t?t:""):void 0},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t}}),jv),Af({type:"geo",init:function(t,e){var i=new tx(e,!0);this._mapDraw=i,this.group.add(i.group)},render:function(t,e,i,n){if(!n||"geoToggleSelect"!==n.type||n.from!==this.uid){var o=this._mapDraw;t.get("show")?o.draw(t,e,i,this,n):this._mapDraw.group.removeAll(),this.group.silent=t.get("silent")}},dispose:function(){this._mapDraw&&this._mapDraw.remove()}}),ZT("toggleSelected",{type:"geoToggleSelect",event:"geoselectchanged"}),ZT("select",{type:"geoSelect",event:"geoselected"}),ZT("unSelect",{type:"geoUnSelect",event:"geounselected"});function UT(t,e,i){this._model=t}function XT(t,e,i,n){var o=i.calendarModel,a=i.seriesModel,r=o?o.coordinateSystem:a?a.coordinateSystem:null;return r===this?r[t](n):null}UT.prototype={constructor:UT,type:"calendar",dimensions:["time","value"],getDimensionsInfo:function(){return[{name:"time",type:"time"},"value"]},getRangeInfo:function(){return this._rangeInfo},getModel:function(){return this._model},getRect:function(){return this._rect},getCellWidth:function(){return this._sw},getCellHeight:function(){return this._sh},getOrient:function(){return this._orient},getFirstDayOfWeek:function(){return this._firstDayOfWeek},getDateInfo:function(t){var e=(t=Yl(t)).getFullYear(),i=t.getMonth()+1;i=i<10?"0"+i:i;var n=t.getDate();n=n<10?"0"+n:n;var o=t.getDay();return{y:e,m:i,d:n,day:o=Math.abs((o+7-this.getFirstDayOfWeek())%7),time:t.getTime(),formatedDate:e+"-"+i+"-"+n,date:t}},getNextNDay:function(t,e){return 0===(e=e||0)||(t=new Date(this.getDateInfo(t).time)).setDate(t.getDate()+e),this.getDateInfo(t)},update:function(t,e){this._firstDayOfWeek=+this._model.getModel("dayLabel").get("firstDay"),this._orient=this._model.get("orient"),this._lineWidth=this._model.getModel("itemStyle").getItemStyle().lineWidth||0,this._rangeInfo=this._getRangeInfo(this._initRangeOption());var i=this._rangeInfo.weeks||1,n=["width","height"],o=this._model.get("cellSize").slice(),a=this._model.getBoxLayoutParams(),r="horizontal"===this._orient?[i,7]:[7,i];E([0,1],function(t){u(o,t)&&(a[n[t]]=o[t]*r[t])});var s={width:e.getWidth(),height:e.getHeight()},l=this._rect=bu(a,s);function u(t,e){return null!=t[e]&&"auto"!==t[e]}E([0,1],function(t){u(o,t)||(o[t]=l[n[t]]/r[t])}),this._sw=o[0],this._sh=o[1]},dataToPoint:function(t,e){L(t)&&(t=t[0]),null==e&&(e=!0);var i=this.getDateInfo(t),n=this._rangeInfo,o=i.formatedDate;if(e&&!(i.time>=n.start.time&&i.time<n.end.time+864e5))return[NaN,NaN];var a=i.day,r=this._getRangeInfo([n.start.time,o]).nthWeek;return"vertical"===this._orient?[this._rect.x+a*this._sw+this._sw/2,this._rect.y+r*this._sh+this._sh/2]:[this._rect.x+r*this._sw+this._sw/2,this._rect.y+a*this._sh+this._sh/2]},pointToData:function(t){var e=this.pointToDate(t);return e&&e.time},dataToRect:function(t,e){var i=this.dataToPoint(t,e);return{contentShape:{x:i[0]-(this._sw-this._lineWidth)/2,y:i[1]-(this._sh-this._lineWidth)/2,width:this._sw-this._lineWidth,height:this._sh-this._lineWidth},center:i,tl:[i[0]-this._sw/2,i[1]-this._sh/2],tr:[i[0]+this._sw/2,i[1]-this._sh/2],br:[i[0]+this._sw/2,i[1]+this._sh/2],bl:[i[0]-this._sw/2,i[1]+this._sh/2]}},pointToDate:function(t){var e=Math.floor((t[0]-this._rect.x)/this._sw)+1,i=Math.floor((t[1]-this._rect.y)/this._sh)+1,n=this._rangeInfo.range;return"vertical"===this._orient?this._getDateByWeeksAndDay(i,e-1,n):this._getDateByWeeksAndDay(e,i-1,n)},convertToPixel:T(XT,"dataToPoint"),convertFromPixel:T(XT,"pointToData"),_initRangeOption:function(){var t=this._model.get("range"),e=t;if(L(e)&&1===e.length&&(e=e[0]),/^\d{4}$/.test(e)&&(t=[e+"-01-01",e+"-12-31"]),/^\d{4}[\/|-]\d{1,2}$/.test(e)){var i=this.getDateInfo(e),n=i.date;n.setMonth(n.getMonth()+1);var o=this.getNextNDay(n,-1);t=[i.formatedDate,o.formatedDate]}/^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(e)&&(t=[e,e]);var a=this._getRangeInfo(t);return a.start.time>a.end.time&&t.reverse(),t},_getRangeInfo:function(t){var e;(t=[this.getDateInfo(t[0]),this.getDateInfo(t[1])])[0].time>t[1].time&&(e=!0,t.reverse());var i=Math.floor(t[1].time/864e5)-Math.floor(t[0].time/864e5)+1,n=new Date(t[0].time),o=n.getDate(),a=t[1].date.getDate();n.setDate(o+i-1);var r=n.getDate();if(r!==a)for(var s=0<n.getTime()-t[1].time?1:-1;(r=n.getDate())!==a&&0<(n.getTime()-t[1].time)*s;)i-=s,n.setDate(r-s);var l=Math.floor((i+t[0].day+6)/7),u=e?1-l:l-1;return e&&t.reverse(),{range:[t[0].formatedDate,t[1].formatedDate],start:t[0],end:t[1],allDay:i,weeks:l,nthWeek:u,fweek:t[0].day,lweek:t[1].day}},_getDateByWeeksAndDay:function(t,e,i){var n=this._getRangeInfo(i);if(t>n.weeks||0===t&&e<n.fweek||t===n.weeks&&e>n.lweek)return!1;var o=7*(t-1)-n.fweek+e,a=new Date(n.start.time);return a.setDate(n.start.d+o),this.getDateInfo(a)}},UT.dimensions=UT.prototype.dimensions,UT.getDimensionsInfo=UT.prototype.getDimensionsInfo,UT.create=function(i,n){var o=[];return i.eachComponent("calendar",function(t){var e=new UT(t,i,n);o.push(e),t.coordinateSystem=e}),i.eachSeries(function(t){"calendar"===t.get("coordinateSystem")&&(t.coordinateSystem=o[t.get("calendarIndex")||0])}),o},lh.register("calendar",UT);var YT=ku.extend({type:"calendar",coordinateSystem:null,defaultOption:{zlevel:0,z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#ccc"},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",nameMap:"en",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",nameMap:"en",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},init:function(t,e,i,n){var o=Iu(t);YT.superApply(this,"init",arguments),jT(t,o)},mergeOption:function(t,e){YT.superApply(this,"mergeOption",arguments),jT(this.option,t)}});function jT(t,e){var i=t.cellSize;L(i)?1===i.length&&(i[1]=i[0]):i=t.cellSize=[i,i];var n=O([0,1],function(t){return function(t,e){return null!=t[xu[e][0]]||null!=t[xu[e][1]]&&null!=t[xu[e][2]]}(e,t)&&(i[t]="auto"),null!=i[t]&&"auto"!==i[t]});Mu(t,e,{type:"box",ignoreSize:n})}var qT={EN:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],CN:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},KT={EN:["S","M","T","W","T","F","S"],CN:["日","一","二","三","四","五","六"]};Af({type:"calendar",_tlpoints:null,_blpoints:null,_firstDayOfMonth:null,_firstDayPoints:null,render:function(t,e,i){var n=this.group;n.removeAll();var o=t.coordinateSystem,a=o.getRangeInfo(),r=o.getOrient();this._renderDayRect(t,a,n),this._renderLines(t,a,r,n),this._renderYearText(t,a,r,n),this._renderMonthText(t,r,n),this._renderWeekText(t,a,r,n)},_renderDayRect:function(t,e,i){for(var n=t.coordinateSystem,o=t.getModel("itemStyle").getItemStyle(),a=n.getCellWidth(),r=n.getCellHeight(),s=e.start.time;s<=e.end.time;s=n.getNextNDay(s,1).time){var l=n.dataToRect([s],!1).tl,u=new rs({shape:{x:l[0],y:l[1],width:a,height:r},cursor:"default",style:o});i.add(u)}},_renderLines:function(i,t,n,o){var a=this,r=i.coordinateSystem,s=i.getModel("splitLine.lineStyle").getLineStyle(),l=i.get("splitLine.show"),e=s.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var u=t.start,h=0;u.time<=t.end.time;h++){d(u.formatedDate),0===h&&(u=r.getDateInfo(t.start.y+"-"+t.start.m));var c=u.date;c.setMonth(c.getMonth()+1),u=r.getDateInfo(c)}function d(t){a._firstDayOfMonth.push(r.getDateInfo(t)),a._firstDayPoints.push(r.dataToRect([t],!1).tl);var e=a._getLinePointsOfOneWeek(i,t,n);a._tlpoints.push(e[0]),a._blpoints.push(e[e.length-1]),l&&a._drawSplitline(e,s,o)}d(r.getNextNDay(t.end.time,1).formatedDate),l&&this._drawSplitline(a._getEdgesPoints(a._tlpoints,e,n),s,o),l&&this._drawSplitline(a._getEdgesPoints(a._blpoints,e,n),s,o)},_getEdgesPoints:function(t,e,i){var n=[t[0].slice(),t[t.length-1].slice()],o="horizontal"===i?0:1;return n[0][o]=n[0][o]-e/2,n[1][o]=n[1][o]+e/2,n},_drawSplitline:function(t,e,i){var n=new ts({z2:20,shape:{points:t},style:e});i.add(n)},_getLinePointsOfOneWeek:function(t,e,i){var n=t.coordinateSystem;e=n.getDateInfo(e);for(var o=[],a=0;a<7;a++){var r=n.getNextNDay(e.time,a),s=n.dataToRect([r.time],!1);o[2*r.day]=s.tl,o[2*r.day+1]=s["horizontal"===i?"bl":"tr"]}return o},_formatterLabel:function(t,e){return"string"==typeof t&&t?uu(t,e):"function"==typeof t?t(e):e.nameMap},_yearTextPositionControl:function(t,e,i,n,o){e=e.slice();var a=["center","bottom"];"bottom"===n?(e[1]+=o,a=["center","top"]):"left"===n?e[0]-=o:"right"===n?(e[0]+=o,a=["center","top"]):e[1]-=o;var r=0;return"left"!==n&&"right"!==n||(r=Math.PI/2),{rotation:r,position:e,style:{textAlign:a[0],textVerticalAlign:a[1]}}},_renderYearText:function(t,e,i,n){var o=t.getModel("yearLabel");if(o.get("show")){var a=o.get("margin"),r=o.get("position");r=r||("horizontal"!==i?"top":"left");var s=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],l=(s[0][0]+s[1][0])/2,u=(s[0][1]+s[1][1])/2,h="horizontal"===i?0:1,c={top:[l,s[h][1]],bottom:[l,s[1-h][1]],left:[s[1-h][0],u],right:[s[h][0],u]},d=e.start.y;+e.end.y>+e.start.y&&(d=d+"-"+e.end.y);var f=o.get("formatter"),p={start:e.start.y,end:e.end.y,nameMap:d},g=this._formatterLabel(f,p),m=new Ur({z2:30});nl(m.style,o,{text:g}),m.attr(this._yearTextPositionControl(m,c[r],i,r,a)),n.add(m)}},_monthTextPositionControl:function(t,e,i,n,o){var a="left",r="top",s=t[0],l=t[1];return"horizontal"===i?(l+=o,e&&(a="center"),"start"===n&&(r="bottom")):(s+=o,e&&(r="middle"),"start"===n&&(a="right")),{x:s,y:l,textAlign:a,textVerticalAlign:r}},_renderMonthText:function(t,e,i){var n=t.getModel("monthLabel");if(n.get("show")){var o=n.get("nameMap"),a=n.get("margin"),r=n.get("position"),s=n.get("align"),l=[this._tlpoints,this._blpoints];R(o)&&(o=qT[o.toUpperCase()]||[]);var u="start"===r?0:1,h="horizontal"===e?0:1;a="start"===r?-a:a;for(var c="center"===s,d=0;d<l[u].length-1;d++){var f=l[u][d].slice(),p=this._firstDayOfMonth[d];if(c){var g=this._firstDayPoints[d];f[h]=(g[h]+l[0][d+1][h])/2}var m=n.get("formatter"),v=o[+p.m-1],y={yyyy:p.y,yy:(p.y+"").slice(2),MM:p.m,M:+p.m,nameMap:v},x=this._formatterLabel(m,y),_=new Ur({z2:30});P(nl(_.style,n,{text:x}),this._monthTextPositionControl(f,c,e,r,a)),i.add(_)}}},_weekTextPositionControl:function(t,e,i,n,o){var a="center",r="middle",s=t[0],l=t[1],u="start"===i;return"horizontal"===e?(s=s+n+(u?1:-1)*o[0]/2,a=u?"right":"left"):(l=l+n+(u?1:-1)*o[1]/2,r=u?"bottom":"top"),{x:s,y:l,textAlign:a,textVerticalAlign:r}},_renderWeekText:function(t,e,i,n){var o=t.getModel("dayLabel");if(o.get("show")){var a=t.coordinateSystem,r=o.get("position"),s=o.get("nameMap"),l=o.get("margin"),u=a.getFirstDayOfWeek();R(s)&&(s=KT[s.toUpperCase()]||[]);var h=a.getNextNDay(e.end.time,7-e.lweek).time,c=[a.getCellWidth(),a.getCellHeight()];l=Rl(l,c["horizontal"===i?0:1]),"start"===r&&(h=a.getNextNDay(e.start.time,-(7+e.fweek)).time,l=-l);for(var d=0;d<7;d++){var f,p=a.getNextNDay(h,d),g=a.dataToRect([p.time],!1).center;f=Math.abs((d+u)%7);var m=new Ur({z2:30});P(nl(m.style,o,{text:s[f]}),this._weekTextPositionControl(g,i,r,l,c)),n.add(m)}}}});var $T={path:null,compoundPath:null,group:Ci,image:Qn,text:Ur};yf(function(t){var e=t.graphic;L(e)?e[0]&&e[0].elements?t.graphic=[t.graphic[0]]:t.graphic=[{elements:e}]:e&&!e.elements&&(t.graphic=[{elements:[e]}])});var JT=Tf({type:"graphic",defaultOption:{elements:[],parentId:null},_elOptionsToUpdate:null,mergeOption:function(t){var e=this.option.elements;this.option.elements=null,JT.superApply(this,"mergeOption",arguments),this.option.elements=e},optionUpdated:function(t,e){var i=this.option,n=(e?i:t).elements,o=i.elements=e?[]:i.elements,a=[];this._flatten(n,a);var r=Ho(o,a);Zo(r);var s=this._elOptionsToUpdate=[];E(r,function(t,e){var i=t.option;i&&(s.push(i),function(t,e){var i=t.exist;if(e.id=t.keyInfo.id,!e.type&&i&&(e.type=i.type),null==e.parentId){var n=e.parentOption;n?e.parentId=n.id:i&&(e.parentId=i.parentId)}e.parentOption=null}(t,i),function(t,e,i){var n=P({},i),o=t[e],a=i.$action||"merge";"merge"===a?o?(m(o,n,!0),Mu(o,n,{ignoreSize:!0}),Tu(i,o)):t[e]=n:"replace"===a?t[e]=n:"remove"===a&&o&&(t[e]=null)}(o,e,i),function(t,e){if(!t)return;t.hv=e.hv=[eA(e,["left","right"]),eA(e,["top","bottom"])],"group"===t.type&&(null==t.width&&(t.width=e.width=0),null==t.height&&(t.height=e.height=0))}(o[e],i))},this);for(var l=o.length-1;0<=l;l--)null==o[l]?o.splice(l,1):delete o[l].$action},_flatten:function(t,i,n){E(t,function(t){if(t){n&&(t.parentOption=n),i.push(t);var e=t.children;"group"===t.type&&e&&this._flatten(e,i,t),delete t.children}},this)},useElOptionsToUpdate:function(){var t=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,t}});function QT(t,e,i,n){var o=i.type,a=new($T.hasOwnProperty(o)?$T[o]:ks(o))(i);e.add(a),n.set(t,a),a.__ecGraphicId=t}function tA(t,e){var i=t&&t.parent;i&&("group"===t.type&&t.traverse(function(t){tA(t,e)}),e.removeKey(t.__ecGraphicId),i.remove(t))}function eA(e,t){var i;return E(t,function(t){null!=e[t]&&"auto"!==e[t]&&(i=!0)}),i}Af({type:"graphic",init:function(t,e){this._elMap=Q(),this._lastGraphicModel},render:function(t,e,i){t!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=t,this._updateElements(t),this._relocate(t,i)},_updateElements:function(u){var t=u.useElOptionsToUpdate();if(t){var h=this._elMap,c=this.group;E(t,function(t){var e=t.$action,i=t.id,n=h.get(i),o=t.parentId,a=null!=o?h.get(o):c,r=t.style;"text"===t.type&&r&&(t.hv&&t.hv[1]&&(r.textVerticalAlign=r.textBaseline=null),!r.hasOwnProperty("textFill")&&r.fill&&(r.textFill=r.fill),!r.hasOwnProperty("textStroke")&&r.stroke&&(r.textStroke=r.stroke));var s=function(e){return e=P({},e),E(["id","parentId","$action","hv","bounding"].concat(yu),function(t){delete e[t]}),e}(t);e&&"merge"!==e?"replace"===e?(tA(n,h),QT(i,a,s,h)):"remove"===e&&tA(n,h):n?n.attr(s):QT(i,a,s,h);var l=h.get(i);l&&(l.__ecGraphicWidthOption=t.width,l.__ecGraphicHeightOption=t.height,function(t,e){var i=t.eventData;t.silent||t.ignore||i||(i=t.eventData={componentType:"graphic",componentIndex:e.componentIndex,name:t.name});i&&(i.info=t.info)}(l,u))})}},_relocate:function(t,e){for(var i=t.option.elements,n=this.group,o=this._elMap,a=e.getWidth(),r=e.getHeight(),s=0;s<i.length;s++){var l=i[s];if((h=o.get(l.id))&&h.isGroup){var u=(c=h.parent)===n;h.__ecGraphicWidth=Rl(h.__ecGraphicWidthOption,u?a:c.__ecGraphicWidth)||0,h.__ecGraphicHeight=Rl(h.__ecGraphicHeightOption,u?r:c.__ecGraphicHeight)||0}}for(s=i.length-1;0<=s;s--){var h,c;l=i[s];if(h=o.get(l.id))Su(h,l,(c=h.parent)===n?{width:a,height:r}:{width:c.__ecGraphicWidth,height:c.__ecGraphicHeight},null,{hv:l.hv,boundingMode:l.bounding})}},_clear:function(){var e=this._elMap;e.each(function(t){tA(t,e)}),this._elMap=Q()},dispose:function(){this._clear()}});var iA={};function nA(t,e){iA[t]=e}function oA(t){return iA[t]}var aA=Tf({type:"toolbox",layoutMode:{type:"box",ignoreSize:!0},optionUpdated:function(){aA.superApply(this,"optionUpdated",arguments),E(this.option.feature,function(t,e){var i=oA(e);i&&m(t,i.defaultOption)})},defaultOption:{show:!0,z:6,zlevel:0,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}},tooltip:{show:!1}}});function rA(t,e){var i=iu(e.get("padding")),n=e.getItemStyle(["color","opacity"]);return n.fill=e.get("backgroundColor"),t=new rs({shape:{x:t.x-i[3],y:t.y-i[0],width:t.width+i[1]+i[3],height:t.height+i[0]+i[2],r:e.get("borderRadius")},style:n,silent:!0,z2:-1})}Af({type:"toolbox",render:function(h,c,d,l){var f=this.group;if(f.removeAll(),h.get("show")){var p=+h.get("itemSize"),u=h.get("feature")||{},g=this._features||(this._features={}),m=[];E(u,function(t,e){m.push(e)}),new kf(this._featureNames||[],m).add(t).update(t).remove(T(t,null)).execute(),this._featureNames=m,function(t,e,i){var n=e.getBoxLayoutParams(),o=e.get("padding"),a={width:i.getWidth(),height:i.getHeight()},r=bu(n,a,o);wu(e.get("orient"),t,e.get("itemGap"),r.width,r.height),Su(t,n,a,o)}(f,h,d),f.add(rA(f.getBoundingRect(),h)),f.eachChild(function(t){var e=t.__title,i=t.hoverStyle;if(i&&e){var n=gn(e,An(i)),o=t.position[0]+f.position[0],a=!1;t.position[1]+f.position[1]+p+n.height>d.getHeight()&&(i.textPosition="top",a=!0);var r=a?-5-n.height:p+8;o+n.width/2>d.getWidth()?(i.textPosition=["100%",r],i.textAlign="right"):o-n.width/2<0&&(i.textPosition=[0,r],i.textAlign="left")}})}function t(t,e){var i,n=m[t],o=m[e],a=u[n],r=new Cl(a,h,h.ecModel);if(l&&null!=l.newTitle&&l.featureName===n&&(a.title=l.newTitle),n&&!o){if(function(t){return 0===t.indexOf("my")}(n))i={model:r,onclick:r.option.onclick,featureName:n};else{var s=oA(n);if(!s)return;i=new s(r,c,d)}g[n]=i}else{if(!(i=g[o]))return;i.model=r,i.ecModel=c,i.api=d}n||!o?r.get("show")&&!i.unusable?(function(o,a,t){var r=o.getModel("iconStyle"),s=o.getModel("emphasis.iconStyle"),e=a.getIcons?a.getIcons():o.get("icon"),l=o.get("title")||{};if("string"==typeof e){var i=e,n=l;l={},(e={})[t]=i,l[t]=n}var u=o.iconPaths={};E(e,function(t,e){var i=yl(t,{},{x:-p/2,y:-p/2,width:p,height:p});i.setStyle(r.getItemStyle()),i.hoverStyle=s.getItemStyle(),i.setStyle({text:l[e],textAlign:s.get("textAlign"),textBorderRadius:s.get("textBorderRadius"),textPadding:s.get("textPadding"),textFill:null});var n=h.getModel("tooltip");n&&n.get("show")&&i.attr("tooltip",P({content:l[e],formatter:n.get("formatter",!0)||function(){return l[e]},formatterParams:{componentType:"toolbox",name:e,title:l[e],$vars:["name","title"]},position:n.get("position",!0)||"bottom"},n.option)),$s(i),h.get("showTitle")&&(i.__title=l[e],i.on("mouseover",function(){var t=s.getItemStyle(),e="vertical"===h.get("orient")?null==h.get("right")?"right":"left":null==h.get("bottom")?"bottom":"top";i.setStyle({textFill:s.get("textFill")||t.fill||t.stroke||"#000",textBackgroundColor:s.get("textBackgroundColor"),textPosition:s.get("textPosition")||e})}).on("mouseout",function(){i.setStyle({textFill:null,textBackgroundColor:null})})),i.trigger(o.get("iconStatus."+e)||"normal"),f.add(i),i.on("click",A(a.onclick,a,c,d,e)),u[e]=i})}(r,i,n),r.setIconStatus=function(t,e){var i=this.option,n=this.iconPaths;i.iconStatus=i.iconStatus||{},i.iconStatus[t]=e,n[t]&&n[t].trigger(e)},i.render&&i.render(r,c,d,l)):i.remove&&i.remove(c,d):i.dispose&&i.dispose(c,d)}},updateView:function(t,e,i,n){E(this._features,function(t){t.updateView&&t.updateView(t.model,e,i,n)})},remove:function(e,i){E(this._features,function(t){t.remove&&t.remove(e,i)}),this.group.removeAll()},dispose:function(e,i){E(this._features,function(t){t.dispose&&t.dispose(e,i)})}});var sA=Oc.toolbox.saveAsImage;function lA(t){this.model=t}lA.defaultOption={show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:sA.title,type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],pixelRatio:1,lang:sA.lang.slice()},lA.prototype.unusable=!v.canvasSupported,lA.prototype.onclick=function(t,e){var i=this.model,n=i.get("name")||t.get("title.0.text")||"echarts",o="svg"===e.getZr().painter.getType()?"svg":i.get("type",!0)||"png",a=e.getConnectedDataURL({type:o,backgroundColor:i.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",connectedBackgroundColor:i.get("connectedBackgroundColor"),excludeComponents:i.get("excludeComponents"),pixelRatio:i.get("pixelRatio")});if("function"!=typeof MouseEvent||v.browser.ie||v.browser.edge)if(window.navigator.msSaveOrOpenBlob){for(var r=atob(a.split(",")[1]),s=r.length,l=new Uint8Array(s);s--;)l[s]=r.charCodeAt(s);var u=new Blob([l]);window.navigator.msSaveOrOpenBlob(u,n+"."+o)}else{var h=i.get("lang"),c='<body style="margin:0;"><img src="'+a+'" style="max-width:100%;" title="'+(h&&h[0]||"")+'" /></body>';window.open().document.write(c)}else{var d=document.createElement("a");d.download=n+"."+o,d.target="_blank",d.href=a;var f=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!1});d.dispatchEvent(f)}},nA("saveAsImage",lA);var uA=Oc.toolbox.magicType,hA="__ec_magicType_stack__";function cA(t){this.model=t}cA.defaultOption={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:k(uA.title),option:{},seriesIndex:{}};var dA=cA.prototype;dA.getIcons=function(){var t=this.model,e=t.get("icon"),i={};return E(t.get("type"),function(t){e[t]&&(i[t]=e[t])}),i};var fA={line:function(t,e,i,n){if("bar"===t)return m({id:e,type:"line",data:i.get("data"),stack:i.get("stack"),markPoint:i.get("markPoint"),markLine:i.get("markLine")},n.get("option.line")||{},!0)},bar:function(t,e,i,n){if("line"===t)return m({id:e,type:"bar",data:i.get("data"),stack:i.get("stack"),markPoint:i.get("markPoint"),markLine:i.get("markLine")},n.get("option.bar")||{},!0)},stack:function(t,e,i,n){var o=i.get("stack")===hA;if("line"===t||"bar"===t)return n.setIconStatus("stack",o?"normal":"emphasis"),m({id:e,stack:o?"":hA},n.get("option.stack")||{},!0)}},pA=[["line","bar"],["stack"]];dA.onclick=function(u,t,h){var c=this.model,e=c.get("seriesIndex."+h);if(fA[h]){var i,d={series:[]};if(E(pA,function(t){0<=_(t,h)&&E(t,function(t){c.setIconStatus(t,"normal")})}),c.setIconStatus(h,"emphasis"),u.eachComponent({mainType:"series",query:null==e?null:{seriesIndex:e}},function(t){var e=t.subType,i=t.id,n=fA[h](e,i,t,c);n&&(D(n,t.option),d.series.push(n));var o=t.coordinateSystem;if(o&&"cartesian2d"===o.type&&("line"===h||"bar"===h)){var a=o.getAxesByScale("ordinal")[0];if(a){var r=a.dim+"Axis",s=u.queryComponents({mainType:r,index:t.get(name+"Index"),id:t.get(name+"Id")})[0].componentIndex;d[r]=d[r]||[];for(var l=0;l<=s;l++)d[r][s]=d[r][s]||{};d[r][s].boundaryGap="bar"===h}}}),"stack"===h)i=d.series&&d.series[0]&&d.series[0].stack===hA?m({stack:uA.title.tiled},uA.title):k(uA.title);t.dispatchAction({type:"changeMagicType",currentType:h,newOption:d,newTitle:i,featureName:"magicType"})}},_f({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(t,e){e.mergeOption(t.newOption)}),nA("magicType",cA);var gA=Oc.toolbox.dataView,mA=new Array(60).join("-"),vA="\t";function yA(t){var e=function(t){var o={},a=[],r=[];return t.eachRawSeries(function(t){var e=t.coordinateSystem;if(!e||"cartesian2d"!==e.type&&"polar"!==e.type)a.push(t);else{var i=e.getBaseAxis();if("category"===i.type){var n=i.dim+"_"+i.index;o[n]||(o[n]={categoryAxis:i,valueAxis:e.getOtherAxis(i),series:[]},r.push({axisDim:i.dim,axisIndex:i.index})),o[n].series.push(t)}else a.push(t)}}),{seriesGroupByCategoryAxis:o,other:a,meta:r}}(t);return{value:M([function(t){var h=[];return E(t,function(t,e){var i=t.categoryAxis,n=t.valueAxis.dim,o=[" "].concat(O(t.series,function(t){return t.name})),a=[i.model.getCategories()];E(t.series,function(t){a.push(t.getRawData().mapArray(n,function(t){return t}))});for(var r=[o.join(vA)],s=0;s<a[0].length;s++){for(var l=[],u=0;u<a.length;u++)l.push(a[u][s]);r.push(l.join(vA))}h.push(r.join("\n"))}),h.join("\n\n"+mA+"\n\n")}(e.seriesGroupByCategoryAxis),function(t){return O(t,function(t){var o=t.getRawData(),a=[t.name],r=[];return o.each(o.dimensions,function(){for(var t=arguments.length,e=arguments[t-1],i=o.getName(e),n=0;n<t-1;n++)r[n]=arguments[n];a.push((i?i+vA:"")+r.join(vA))}),a.join("\n")}).join("\n\n"+mA+"\n\n")}(e.other)],function(t){return t.replace(/[\n\t\s]/g,"")}).join("\n\n"+mA+"\n\n"),meta:e.meta}}function xA(t){return t.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}var _A=new RegExp("["+vA+"]+","g");function wA(t,a){var e=t.split(new RegExp("\n*"+mA+"\n*","g")),r={series:[]};return E(e,function(t,e){if(function(t){if(0<=t.slice(0,t.indexOf("\n")).indexOf(vA))return!0}(t)){var i=function(t){for(var e=t.split(/\n+/g),i=[],n=O(xA(e.shift()).split(_A),function(t){return{name:t,data:[]}}),o=0;o<e.length;o++){var a=xA(e[o]).split(_A);i.push(a.shift());for(var r=0;r<a.length;r++)n[r]&&(n[r].data[o]=a[r])}return{series:n,categories:i}}(t),n=a[e],o=n.axisDim+"Axis";n&&(r[o]=r[o]||[],r[o][n.axisIndex]={data:i.categories},r.series=r.series.concat(i.series))}else{i=function(t){for(var e=t.split(/\n+/g),i=xA(e.shift()),n=[],o=0;o<e.length;o++){var a,r=xA(e[o]).split(_A),s="",l=!1;a=isNaN(r[0])?(l=!0,s=r[0],r=r.slice(1),n[o]={name:s,value:[]},n[o].value):n[o]=[];for(var u=0;u<r.length;u++)a.push(+r[u]);1===a.length&&(l?n[o].value=a[0]:n[o]=a[0])}return{name:i,data:n}}(t);r.series.push(i)}}),r}function bA(t){this._dom=null,this.model=t}bA.defaultOption={show:!0,readOnly:!1,optionToContent:null,contentToOption:null,icon:"M17.5,17.3H33 M17.5,17.3H33 M45.4,29.5h-28 M11.5,2v56H51V14.8L38.4,2H11.5z M38.4,2.2v12.7H51 M45.4,41.7h-28",title:k(gA.title),lang:k(gA.lang),backgroundColor:"#fff",textColor:"#000",textareaColor:"#fff",textareaBorderColor:"#333",buttonColor:"#c23531",buttonTextColor:"#fff"},bA.prototype.onclick=function(t,e){var i=e.getDom(),n=this.model;this._dom&&i.removeChild(this._dom);var o=document.createElement("div");o.style.cssText="position:absolute;left:5px;top:5px;bottom:5px;right:5px;",o.style.backgroundColor=n.get("backgroundColor")||"#fff";var a=document.createElement("h4"),r=n.get("lang")||[];a.innerHTML=r[0]||n.get("title"),a.style.cssText="margin: 10px 20px;",a.style.color=n.get("textColor");var s=document.createElement("div"),l=document.createElement("textarea");s.style.cssText="display:block;width:100%;overflow:auto;";var u=n.get("optionToContent"),h=n.get("contentToOption"),c=yA(t);if("function"==typeof u){var d=u(e.getOption());"string"==typeof d?s.innerHTML=d:G(d)&&s.appendChild(d)}else s.appendChild(l),l.readOnly=n.get("readOnly"),l.style.cssText="width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;",l.style.color=n.get("textColor"),l.style.borderColor=n.get("textareaBorderColor"),l.style.backgroundColor=n.get("textareaColor"),l.value=c.value;var f=c.meta,p=document.createElement("div");p.style.cssText="position:absolute;bottom:0;left:0;right:0;";var g="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",m=document.createElement("div"),v=document.createElement("div");g+=";background-color:"+n.get("buttonColor"),g+=";color:"+n.get("buttonTextColor");var y=this;function x(){i.removeChild(o),y._dom=null}Ut(m,"click",x),Ut(v,"click",function(){var t;try{t="function"==typeof h?h(s,e.getOption()):wA(l.value,f)}catch(t){throw x(),new Error("Data view format error "+t)}t&&e.dispatchAction({type:"changeDataView",newOption:t}),x()}),m.innerHTML=r[1],v.innerHTML=r[2],v.style.cssText=g,m.style.cssText=g,n.get("readOnly")||p.appendChild(v),p.appendChild(m),o.appendChild(a),o.appendChild(s),o.appendChild(p),s.style.height=i.clientHeight-80+"px",i.appendChild(o),this._dom=o},bA.prototype.remove=function(t,e){this._dom&&e.getDom().removeChild(this._dom)},bA.prototype.dispose=function(t,e){this.remove(t,e)},nA("dataView",bA),_f({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},function(t,n){var o=[];E(t.newOption.series,function(t){var e=n.getSeriesByName(t.name)[0];if(e){var i=e.get("data");o.push({name:t.name,data:function(t,n){return O(t,function(t,e){var i=n&&n[e];return z(i)&&!L(i)?(z(t)&&!L(t)&&(t=t.value),D({value:t},i)):t})}(t.data,i)})}else o.push(P({type:"scatter"},t))}),n.mergeOption(D({series:o},t.newOption))});var SA=E,MA=_,IA=T,TA=["dataToPoint","pointToData"],AA=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"];function DA(t,e,i){var n=this._targetInfoList=[],o={},a=kA(e,t);SA(PA,function(t,e){i&&i.include&&!(0<=MA(i.include,e))||t(a,n,o)})}var CA=DA.prototype;function LA(t){return t[0]>t[1]&&t.reverse(),t}function kA(t,e){return Ko(t,e,{includeMainTypes:AA})}CA.setOutputRanges=function(t,e){this.matchOutputRanges(t,e,function(t,e,i){if((t.coordRanges||(t.coordRanges=[])).push(e),!t.coordRange){t.coordRange=e;var n=EA[t.brushType](0,i,e);t.__rangeOffset={offset:zA[t.brushType](n.values,t.range,[1,1]),xyMinMax:n.xyMinMax}}})},CA.matchOutputRanges=function(t,n,o){SA(t,function(i){var t=this.findTargetInfo(i,n);t&&!0!==t&&E(t.coordSyses,function(t){var e=EA[i.brushType](1,t,i.range);o(i,e.values,t,n)})},this)},CA.setInputRanges=function(t,o){SA(t,function(t){var e=this.findTargetInfo(t,o);if(t.range=t.range||[],e&&!0!==e){t.panelId=e.panelId;var i=EA[t.brushType](0,e.coordSys,t.coordRange),n=t.__rangeOffset;t.range=n?zA[t.brushType](i.values,n.offset,function(t,e){var i=VA(t),n=VA(e),o=[i[0]/n[0],i[1]/n[1]];return isNaN(o[0])&&(o[0]=1),isNaN(o[1])&&(o[1]=1),o}(i.xyMinMax,n.xyMinMax)):i.values}},this)},CA.makePanelOpts=function(i,n){return O(this._targetInfoList,function(t){var e=t.getPanelRect();return{panelId:t.panelId,defaultBrushType:n&&n(t),clipPath:eS(e),isTargetByCursor:nS(e,i,t.coordSysModel),getLinearBrushOtherExtent:iS(e)}})},CA.controlSeries=function(t,e,i){var n=this.findTargetInfo(t,i);return!0===n||n&&0<=MA(n.coordSyses,e.coordinateSystem)},CA.findTargetInfo=function(t,e){for(var i=this._targetInfoList,n=kA(e,t),o=0;o<i.length;o++){var a=i[o],r=t.panelId;if(r){if(a.panelId===r)return a}else for(o=0;o<NA.length;o++)if(NA[o](n,a))return a}return!0};var PA={grid:function(t,n){var o=t.xAxisModels,a=t.yAxisModels,e=t.gridModels,i=Q(),r={},s={};(o||a||e)&&(SA(o,function(t){var e=t.axis.grid.model;i.set(e.id,e),r[e.id]=!0}),SA(a,function(t){var e=t.axis.grid.model;i.set(e.id,e),s[e.id]=!0}),SA(e,function(t){i.set(t.id,t),r[t.id]=!0,s[t.id]=!0}),i.each(function(t){var e=t.coordinateSystem,i=[];SA(e.getCartesians(),function(t,e){(0<=MA(o,t.getAxis("x").model)||0<=MA(a,t.getAxis("y").model))&&i.push(t)}),n.push({panelId:"grid--"+t.id,gridModel:t,coordSysModel:t,coordSys:i[0],coordSyses:i,getPanelRect:OA.grid,xAxisDeclared:r[t.id],yAxisDeclared:s[t.id]})}))},geo:function(t,i){SA(t.geoModels,function(t){var e=t.coordinateSystem;i.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:e,coordSyses:[e],getPanelRect:OA.geo})})}},NA=[function(t,e){var i=t.xAxisModel,n=t.yAxisModel,o=t.gridModel;return!o&&i&&(o=i.axis.grid.model),!o&&n&&(o=n.axis.grid.model),o&&o===e.gridModel},function(t,e){var i=t.geoModel;return i&&i===e.geoModel}],OA={grid:function(){return this.coordSys.grid.getRect().clone()},geo:function(){var t=this.coordSys,e=t.getBoundingRect().clone();return e.applyTransform(fl(t)),e}},EA={lineX:IA(RA,0),lineY:IA(RA,1),rect:function(t,e,i){var n=e[TA[t]]([i[0][0],i[1][0]]),o=e[TA[t]]([i[0][1],i[1][1]]),a=[LA([n[0],o[0]]),LA([n[1],o[1]])];return{values:a,xyMinMax:a}},polygon:function(i,n,t){var o=[[1/0,-1/0],[1/0,-1/0]];return{values:O(t,function(t){var e=n[TA[i]](t);return o[0][0]=Math.min(o[0][0],e[0]),o[1][0]=Math.min(o[1][0],e[1]),o[0][1]=Math.max(o[0][1],e[0]),o[1][1]=Math.max(o[1][1],e[1]),e}),xyMinMax:o}}};function RA(t,e,i,n){var o=i.getAxis(["x","y"][t]),a=LA(O([0,1],function(t){return e?o.coordToData(o.toLocalCoord(n[t])):o.toGlobalCoord(o.dataToCoord(n[t]))})),r=[];return r[t]=a,r[1-t]=[NaN,NaN],{values:a,xyMinMax:r}}var zA={lineX:IA(BA,0),lineY:IA(BA,1),rect:function(t,e,i){return[[t[0][0]-i[0]*e[0][0],t[0][1]-i[0]*e[0][1]],[t[1][0]-i[1]*e[1][0],t[1][1]-i[1]*e[1][1]]]},polygon:function(t,i,n){return O(t,function(t,e){return[t[0]-n[0]*i[e][0],t[1]-n[1]*i[e][1]]})}};function BA(t,e,i,n){return[e[0]-n[t]*i[0],e[1]-n[t]*i[1]]}function VA(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[NaN,NaN]}var GA=E,FA="\0_ec_hist_store";function WA(t){var e=t[FA];return e=e||(t[FA]=[{}])}ku.registerSubTypeDefaulter("dataZoom",function(){return"slider"});var HA=["cartesian2d","polar","singleAxis"];var ZA,UA,XA,YA,jA=(UA=["axisIndex","axis","index","id"],XA=O(ZA=(ZA=["x","y","z","radius","angle","single"]).slice(),fu),YA=O(UA=(UA||[]).slice(),fu),function(o,a){E(ZA,function(t,e){for(var i={name:t,capital:XA[e]},n=0;n<UA.length;n++)i[UA[n]]=t+YA[n];o.call(a,i)})});function qA(o,a,r){return function(t){var e,i={nodes:[],records:{}};if(a(function(t){i.records[t.name]={}}),!t)return i;for(s(t,i);e=!1,o(n),e;);function n(t){!function(t,e){return 0<=_(e.nodes,t)}(t,i)&&function(t,i){var n=!1;return a(function(e){E(r(t,e)||[],function(t){i.records[e.name][t]&&(n=!0)})}),n}(t,i)&&(s(t,i),e=!0)}return i};function s(t,i){i.nodes.push(t),a(function(e){E(r(t,e)||[],function(t){i.records[e.name][t]=!0})})}}function KA(t,e,i,n){this._dimName=t,this._axisIndex=e,this._valueWindow,this._percentWindow,this._dataExtent,this._minMaxSpan,this.ecModel=n,this._dataZoomModel=i}var $A=E,JA=Bl;function QA(t,e){var i=t.getAxisModel(),n=t._percentWindow,o=t._valueWindow;if(n){var a=Fl(o,[0,500]);a=Math.min(a,20);var r=e||0===n[0]&&100===n[1];i.setRange(r?null:+o[0].toFixed(a),r?null:+o[1].toFixed(a))}}KA.prototype={constructor:KA,hostedBy:function(t){return this._dataZoomModel===t},getDataValueWindow:function(){return this._valueWindow.slice()},getDataPercentWindow:function(){return this._percentWindow.slice()},getTargetSeriesModels:function(){var n=[],o=this.ecModel;return o.eachSeries(function(t){if(function(t){return 0<=_(HA,t)}(t.get("coordinateSystem"))){var e=this._dimName,i=o.queryComponents({mainType:e+"Axis",index:t.get(e+"AxisIndex"),id:t.get(e+"AxisId")})[0];this._axisIndex===(i&&i.componentIndex)&&n.push(t)}},this),n},getAxisModel:function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},getOtherAxisModel:function(){var t,e,i,n=this._dimName,o=this.ecModel,a=this.getAxisModel();return t="x"===n||"y"===n?(e="gridIndex","x"===n?"y":"x"):(e="polarIndex","angle"===n?"radius":"angle"),o.eachComponent(t+"Axis",function(t){(t.get(e)||0)===(a.get(e)||0)&&(i=t)}),i},getMinMaxSpan:function(){return k(this._minMaxSpan)},calculateDataWindow:function(o){var a,r=this._dataExtent,s=this.getAxisModel().axis.scale,l=this._dataZoomModel.getRangePropMode(),u=[0,100],h=[],c=[];$A(["start","end"],function(t,e){var i=o[t],n=o[t+"Value"];"percent"===l[e]?(null==i&&(i=u[e]),n=s.parse(El(i,u,r))):(a=!0,i=El(n=null==n?r[e]:s.parse(n),r,u)),c[e]=n,h[e]=i}),JA(c),JA(h);var d=this._minMaxSpan;function t(t,e,i,n,o){var a=o?"Span":"ValueSpan";Jw(0,t,i,"all",d["min"+a],d["max"+a]);for(var r=0;r<2;r++)e[r]=El(t[r],i,n,!0),o&&(e[r]=s.parse(e[r]))}return a?t(c,h,r,u,!1):t(h,c,u,r,!0),{valueWindow:c,percentWindow:h}},reset:function(t){if(t===this._dataZoomModel){var e=this.getTargetSeriesModels();this._dataExtent=function(t,e,i){var n=[1/0,-1/0];$A(i,function(t){var i=t.getData();i&&$A(i.mapDimension(e,!0),function(t){var e=i.getApproximateExtent(t);e[0]<n[0]&&(n[0]=e[0]),e[1]>n[1]&&(n[1]=e[1])})}),n[1]<n[0]&&(n=[NaN,NaN]);return function(t,e){var i=t.getAxisModel(),n=i.getMin(!0),o="category"===i.get("type"),a=o&&i.getCategories().length;null!=n&&"dataMin"!==n&&"function"!=typeof n?e[0]=n:o&&(e[0]=0<a?0:NaN);var r=i.getMax(!0);null!=r&&"dataMax"!==r&&"function"!=typeof r?e[1]=r:o&&(e[1]=0<a?a-1:NaN);i.get("scale",!0)||(0<e[0]&&(e[0]=0),e[1]<0&&(e[1]=0))}(t,n),n}(this,this._dimName,e),function(n){var o=n._minMaxSpan={},a=n._dataZoomModel,r=n._dataExtent;$A(["min","max"],function(t){var e=a.get(t+"Span"),i=a.get(t+"ValueSpan");null!=i&&(i=n.getAxisModel().axis.scale.parse(i)),null!=i?e=El(r[0]+i,r,[0,100],!0):null!=e&&(i=El(e,[0,100],r,!0)-r[0]),o[t+"Span"]=e,o[t+"ValueSpan"]=i})}(this);var i=this.calculateDataWindow(t.settledOption);this._valueWindow=i.valueWindow,this._percentWindow=i.percentWindow,QA(this)}},restore:function(t){t===this._dataZoomModel&&(this._valueWindow=this._percentWindow=null,QA(this,!0))},filterData:function(t,e){if(t===this._dataZoomModel){var n=this._dimName,i=this.getTargetSeriesModels(),o=t.get("filterMode"),c=this._valueWindow;"none"!==o&&$A(i,function(i){var u=i.getData(),h=u.mapDimension(n,!0);h.length&&("weakFilter"===o?u.filterSelf(function(t){for(var e,i,n,o=0;o<h.length;o++){var a=u.get(h[o],t),r=!isNaN(a),s=a<c[0],l=a>c[1];if(r&&!s&&!l)return!0;r&&(n=!0),s&&(e=!0),l&&(i=!0)}return n&&e&&i}):$A(h,function(t){if("empty"===o)i.setData(u=u.map(t,function(t){return function(t){return t>=c[0]&&t<=c[1]}(t)?t:NaN}));else{var e={};e[t]=c,u.selectRange(e)}}),$A(h,function(t){u.setApproximateExtent(c,t)}))})}}};var tD=E,eD=jA,iD=Tf({type:"dataZoom",dependencies:["xAxis","yAxis","zAxis","radiusAxis","angleAxis","singleAxis","series"],defaultOption:{zlevel:0,z:4,orient:null,xAxisIndex:null,yAxisIndex:null,filterMode:"filter",throttle:null,start:0,end:100,startValue:null,endValue:null,minSpan:null,maxSpan:null,minValueSpan:null,maxValueSpan:null,rangeMode:null},init:function(t,e,i){this._dataIntervalByAxis={},this._dataInfo={},this._axisProxies={},this.textStyleModel,this._autoThrottle=!0,this._rangePropMode=["percent","percent"];var n=nD(t);this.settledOption=n,this.mergeDefaultAndTheme(t,i),this.doInit(n)},mergeOption:function(t){var e=nD(t);m(this.option,t,!0),m(this.settledOption,e,!0),this.doInit(e)},doInit:function(t){var i=this.option;v.canvasSupported||(i.realtime=!1),this._setDefaultThrottle(t),oD(this,t);var n=this.settledOption;tD([["start","startValue"],["end","endValue"]],function(t,e){"value"===this._rangePropMode[e]&&(i[t[0]]=n[t[0]]=null)},this),this.textStyleModel=this.getModel("textStyle"),this._resetTarget(),this._giveAxisProxies()},_giveAxisProxies:function(){var r=this._axisProxies;this.eachTargetAxis(function(t,e,i,n){var o=this.dependentModels[t.axis][e],a=o.__dzAxisProxy||(o.__dzAxisProxy=new KA(t.name,e,this,n));r[t.name+"_"+e]=a},this)},_resetTarget:function(){var i=this.option,t=this._judgeAutoMode();eD(function(t){var e=t.axisIndex;i[e]=Vo(i[e])},this),"axisIndex"===t?this._autoSetAxisIndex():"orient"===t&&this._autoSetOrient()},_judgeAutoMode:function(){var e=this.option,i=!1;eD(function(t){null!=e[t.axisIndex]&&(i=!0)},this);var t=e.orient;return null==t&&i?"orient":i?void 0:(null==t&&(e.orient="horizontal"),"axisIndex")},_autoSetAxisIndex:function(){var a=!0,e=this.get("orient",!0),r=this.option,t=this.dependentModels;if(a){var i="vertical"===e?"y":"x";t[i+"Axis"].length?(r[i+"AxisIndex"]=[0],a=!1):tD(t.singleAxis,function(t){a&&t.get("orient",!0)===e&&(r.singleAxisIndex=[t.componentIndex],a=!1)})}a&&eD(function(t){if(a){var e=[],i=this.dependentModels[t.axis];if(i.length&&!e.length)for(var n=0,o=i.length;n<o;n++)"category"===i[n].get("type")&&e.push(n);(r[t.axisIndex]=e).length&&(a=!1)}},this),a&&this.ecModel.eachSeries(function(o){this._isSeriesHasAllAxesTypeOf(o,"value")&&eD(function(t){var e=r[t.axisIndex],i=o.get(t.axisIndex),n=o.get(t.axisId);_(e,i=o.ecModel.queryComponents({mainType:t.axis,index:i,id:n})[0].componentIndex)<0&&e.push(i)})},this)},_autoSetOrient:function(){var e;this.eachTargetAxis(function(t){e=e||t.name},this),this.option.orient="y"===e?"vertical":"horizontal"},_isSeriesHasAllAxesTypeOf:function(n,o){var a=!0;return eD(function(t){var e=n.get(t.axisIndex),i=this.dependentModels[t.axis][e];i&&i.get("type")===o||(a=!1)},this),a},_setDefaultThrottle:function(t){if(t.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var e=this.ecModel.option;this.option.throttle=e.animation&&0<e.animationDurationUpdate?100:20}},getFirstTargetAxisModel:function(){var i;return eD(function(t){if(null==i){var e=this.get(t.axisIndex);e.length&&(i=this.dependentModels[t.axis][e[0]])}},this),i},eachTargetAxis:function(i,n){var o=this.ecModel;eD(function(e){tD(this.get(e.axisIndex),function(t){i.call(n,e,t,this,o)},this)},this)},getAxisProxy:function(t,e){return this._axisProxies[t+"_"+e]},getAxisModel:function(t,e){var i=this.getAxisProxy(t,e);return i&&i.getAxisModel()},setRawRange:function(e){var i=this.option,n=this.settledOption;tD([["start","startValue"],["end","endValue"]],function(t){null==e[t[0]]&&null==e[t[1]]||(i[t[0]]=n[t[0]]=e[t[0]],i[t[1]]=n[t[1]]=e[t[1]])},this),oD(this,e)},setCalculatedRange:function(e){var i=this.option;tD(["start","startValue","end","endValue"],function(t){i[t]=e[t]})},getPercentRange:function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},getValueRange:function(t,e){if(null!=t||null!=e)return this.getAxisProxy(t,e).getDataValueWindow();var i=this.findRepresentativeAxisProxy();return i?i.getDataValueWindow():void 0},findRepresentativeAxisProxy:function(t){if(t)return t.__dzAxisProxy;var e=this._axisProxies;for(var i in e)if(e.hasOwnProperty(i)&&e[i].hostedBy(this))return e[i];for(var i in e)if(e.hasOwnProperty(i)&&!e[i].hostedBy(this))return e[i]},getRangePropMode:function(){return this._rangePropMode.slice()}});function nD(e){var i={};return tD(["start","end","startValue","endValue","throttle"],function(t){e.hasOwnProperty(t)&&(i[t]=e[t])}),i}function oD(t,o){var a=t._rangePropMode,r=t.get("rangeMode");tD([["start","startValue"],["end","endValue"]],function(t,e){var i=null!=o[t[0]],n=null!=o[t[1]];i&&!n?a[e]="percent":!i&&n?a[e]="value":r?a[e]=r[e]:i&&(a[e]="percent")})}var aD=gc.extend({type:"dataZoom",render:function(t,e,i,n){this.dataZoomModel=t,this.ecModel=e,this.api=i},getTargetCoordInfo:function(){var t=this.dataZoomModel,o=this.ecModel,a={};return t.eachTargetAxis(function(t,e){var i=o.getComponent(t.axis,e);if(i){var n=i.getCoordSysModel();n&&function(t,e,i,n){for(var o,a=0;a<i.length;a++)if(i[a].model===t){o=i[a];break}o||i.push(o={model:t,axisModels:[],coordIndex:n});o.axisModels.push(e)}(n,i,a[n.mainType]||(a[n.mainType]=[]),n.componentIndex)}},this),a}});iD.extend({type:"dataZoom.select"}),aD.extend({type:"dataZoom.select"}),xf({getTargetSeries:function(t){var n=Q();return t.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(t,e,i){E(i.getAxisProxy(t.name,e).getTargetSeriesModels(),function(t){n.set(t.uid,t)})})}),n},modifyOutputEnd:!0,overallReset:function(t,n){t.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(t,e,i){i.getAxisProxy(t.name,e).reset(i,n)}),t.eachTargetAxis(function(t,e,i){i.getAxisProxy(t.name,e).filterData(i,n)})}),t.eachComponent("dataZoom",function(t){var e=t.findRepresentativeAxisProxy(),i=e.getDataPercentWindow(),n=e.getDataValueWindow();t.setCalculatedRange({start:i[0],end:i[1],startValue:n[0],endValue:n[1]})})}}),_f("dataZoom",function(i,t){var n=qA(A(t.eachComponent,t,"dataZoom"),jA,function(t,e){return t.get(e.axisIndex)}),o=[];t.eachComponent({mainType:"dataZoom",query:i},function(t,e){o.push.apply(o,n(t).nodes)}),E(o,function(t,e){t.setRawRange({start:i.start,end:i.end,startValue:i.startValue,endValue:i.endValue})})});var rD=Oc.toolbox.dataZoom,sD=E;function lD(t,e,i){(this._brushController=new Ib(i.getZr())).on("brush",A(this._onBrush,this)).mount(),this._isZoomActive}lD.defaultOption={show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:k(rD.title)};var uD=lD.prototype;uD.render=function(t,e,i,n){this.model=t,this.ecModel=e,this.api=i,function(t,e,i,n,o){var a=i._isZoomActive;n&&"takeGlobalCursor"===n.type&&(a="dataZoomSelect"===n.key&&n.dataZoomSelectActive);i._isZoomActive=a,t.setIconStatus("zoom",a?"emphasis":"normal");var r=new DA(cD(t.option),e,{include:["grid"]});i._brushController.setPanels(r.makePanelOpts(o,function(t){return t.xAxisDeclared&&!t.yAxisDeclared?"lineX":!t.xAxisDeclared&&t.yAxisDeclared?"lineY":"rect"})).enableBrush(!!a&&{brushType:"auto",brushStyle:{lineWidth:0,fill:"rgba(0,0,0,0.2)"}})}(t,e,this,n,i),function(t,e){t.setIconStatus("back",1<function(t){return WA(t).length}(e)?"emphasis":"normal")}(t,e)},uD.onclick=function(t,e,i){hD[i].call(this)},uD.remove=function(t,e){this._brushController.unmount()},uD.dispose=function(t,e){this._brushController.dispose()};var hD={zoom:function(){var t=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:t})},back:function(){this._dispatchZoomAction(function(t){var n=WA(t),e=n[n.length-1];1<n.length&&n.pop();var o={};return GA(e,function(t,e){for(var i=n.length-1;0<=i;i--){if(t=n[i][e]){o[e]=t;break}}}),o}(this.ecModel))}};function cD(e){var i={};return E(["xAxisIndex","yAxisIndex"],function(t){i[t]=e[t],null==i[t]&&(i[t]="all"),!1!==i[t]&&"none"!==i[t]||(i[t]=[])}),i}uD._onBrush=function(t,e){if(e.isEnd&&t.length){var s={},l=this.ecModel;this._brushController.updateCovers([]),new DA(cD(this.model.option),l,{include:["grid"]}).matchOutputRanges(t,l,function(t,e,i){if("cartesian2d"===i.type){var n=t.brushType;"rect"===n?(o("x",i,e[0]),o("y",i,e[1])):o({lineX:"x",lineY:"y"}[n],i,e)}}),function(a,t){var r=WA(a);GA(t,function(t,e){for(var i=r.length-1;0<=i;i--){if(r[i][e])break}if(i<0){var n=a.queryComponents({mainType:"dataZoom",subType:"select",id:e})[0];if(n){var o=n.getPercentRange();r[0][e]={dataZoomId:e,start:o[0],end:o[1]}}}}),r.push(t)}(l,s),this._dispatchZoomAction(s)}function o(t,e,i){var n=e.getAxis(t),o=n.model,a=function(e,i,t){var n;return t.eachComponent({mainType:"dataZoom",subType:"select"},function(t){t.getAxisModel(e,i.componentIndex)&&(n=t)}),n}(t,o,l),r=a.findRepresentativeAxisProxy(o).getMinMaxSpan();null==r.minValueSpan&&null==r.maxValueSpan||(i=Jw(0,i.slice(),n.scale.getExtent(),0,r.minValueSpan,r.maxValueSpan)),a&&(s[a.id]={dataZoomId:a.id,startValue:i[0],endValue:i[1]})}},uD._dispatchZoomAction=function(t){var i=[];sD(t,function(t,e){i.push(k(t))}),i.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:i})},nA("dataZoom",lD),yf(function(s){if(s){var l=s.dataZoom||(s.dataZoom=[]);L(l)||(s.dataZoom=l=[l]);var t=s.toolbox;if(t&&(L(t)&&(t=t[0]),t&&t.feature)){var e=t.feature.dataZoom;i("xAxis",e),i("yAxis",e)}}function i(n,o){if(o){var a=n+"Index",r=o[a];null==r||"all"===r||L(r)||(r=!1===r||"none"===r?[]:[r]),function(t,e){var i=s[t];L(i)||(i=i?[i]:[]);sD(i,e)}(n,function(t,e){if(null==r||"all"===r||-1!==_(r,e)){var i={type:"select",$fromToolbox:!0,filterMode:o.filterMode||"filter",id:"\0_ec_\0toolbox-dataZoom_"+n+e};i[a]=e,l.push(i)}})}}});var dD=Oc.toolbox.restore;function fD(t){this.model=t}fD.defaultOption={show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:dD.title},fD.prototype.onclick=function(t,e,i){!function(t){t[FA]=null}(t),e.dispatchAction({type:"restore",from:this.uid})},nA("restore",fD),_f({type:"restore",event:"restore",update:"prepareAndUpdate"},function(t,e){e.resetOption("recreate")}),Tf({type:"tooltip",dependencies:["axisPointer"],defaultOption:{zlevel:0,z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:!1,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"rgba(50,50,50,0.7)",borderColor:"#333",borderRadius:4,borderWidth:0,padding:5,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#fff",fontSize:14}}});var pD=E,gD=eu,mD=["","-webkit-","-moz-","-o-"];function vD(o){var a=[],t=o.get("transitionDuration"),e=o.get("backgroundColor"),i=o.getModel("textStyle"),n=o.get("padding");return t&&a.push(function(t){var e="cubic-bezier(0.23, 1, 0.32, 1)",i="left "+t+"s "+e+",top "+t+"s "+e;return O(mD,function(t){return t+"transition:"+i}).join(";")}(t)),e&&(v.canvasSupported?a.push("background-Color:"+e):(a.push("background-Color:#"+Ze(e)),a.push("filter:alpha(opacity=70)"))),pD(["width","color","radius"],function(t){var e="border-"+t,i=gD(e),n=o.get(i);null!=n&&a.push(e+":"+n+("color"===t?"":"px"))}),a.push(function(i){var n=[],t=i.get("fontSize"),e=i.getTextColor();return e&&n.push("color:"+e),n.push("font:"+i.getFont()),t&&n.push("line-height:"+Math.round(3*t/2)+"px"),pD(["decoration","align"],function(t){var e=i.get(t);e&&n.push("text-"+t+":"+e)}),n.join(";")}(i)),null!=n&&a.push("padding:"+iu(n).join("px ")+"px"),a.join(";")+";"}function yD(t,e,i,n,o){var a=e&&e.painter;if(i){var r=a&&a.getViewportRoot();r&&function(t,e,i,n,o){Rt(Et,e,n,o,!0)&&Rt(t,i,Et[0],Et[1])}(t,r,document.body,n,o)}else{t[0]=n,t[1]=o;var s=a&&a.getViewportRootOffset();s&&(t[0]+=s.offsetLeft,t[1]+=s.offsetTop)}}function xD(t,e,i){if(v.wxa)return null;var n=document.createElement("div");n.domBelongToZr=!0,this.el=n;var o=this._zr=e.getZr(),a=this._appendToBody=i&&i.appendToBody;this._styleCoord=[0,0],yD(this._styleCoord,o,a,e.getWidth()/2,e.getHeight()/2),a?document.body.appendChild(n):t.appendChild(n),this._container=t,this._show=!1,this._hideTimeout;var r=this;n.onmouseenter=function(){r._enterable&&(clearTimeout(r._hideTimeout),r._show=!0),r._inContent=!0},n.onmousemove=function(t){if(t=t||window.event,!r._enterable){var e=o.handler;Zt(o.painter.getViewportRoot(),t,!0),e.dispatch("mousemove",t)}},n.onmouseleave=function(){r._enterable&&r._show&&r.hideLater(r._hideDelay),r._inContent=!1}}function _D(t){this._zr=t.getZr(),this._show=!1,this._hideTimeout}xD.prototype={constructor:xD,_enterable:!0,update:function(){var t=this._container,e=t.currentStyle||document.defaultView.getComputedStyle(t),i=t.style;"absolute"!==i.position&&"absolute"!==e.position&&(i.position="relative")},show:function(t){clearTimeout(this._hideTimeout);var e=this.el,i=this._styleCoord;e.style.cssText="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+vD(t)+";left:"+i[0]+"px;top:"+i[1]+"px;"+(t.get("extraCssText")||""),e.style.display=e.innerHTML?"block":"none",e.style.pointerEvents=this._enterable?"auto":"none",this._show=!0},setContent:function(t){this.el.innerHTML=null==t?"":t},setEnterable:function(t){this._enterable=t},getSize:function(){var t=this.el;return[t.clientWidth,t.clientHeight]},moveTo:function(t,e){var i=this._styleCoord;yD(i,this._zr,this._appendToBody,t,e);var n=this.el.style;n.left=i[0]+"px",n.top=i[1]+"px"},hide:function(){this.el.style.display="none",this._show=!1},hideLater:function(t){!this._show||this._inContent&&this._enterable||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(A(this.hide,this),t)):this.hide())},isShow:function(){return this._show},dispose:function(){this.el.parentNode.removeChild(this.el)},getOuterSize:function(){var t=this.el.clientWidth,e=this.el.clientHeight;if(document.defaultView&&document.defaultView.getComputedStyle){var i=document.defaultView.getComputedStyle(this.el);i&&(t+=parseInt(i.borderLeftWidth,10)+parseInt(i.borderRightWidth,10),e+=parseInt(i.borderTopWidth,10)+parseInt(i.borderBottomWidth,10))}return{width:t,height:e}}},_D.prototype={constructor:_D,_enterable:!0,update:function(){},show:function(t){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.attr("show",!0),this._show=!0},setContent:function(t,e,i){this.el&&this._zr.remove(this.el);for(var n={},o=t,a="{marker",r=o.indexOf(a);0<=r;){var s=o.indexOf("|}"),l=o.substr(r+a.length,s-r-a.length);-1<l.indexOf("sub")?n["marker"+l]={textWidth:4,textHeight:4,textBorderRadius:2,textBackgroundColor:e[l],textOffset:[3,0]}:n["marker"+l]={textWidth:10,textHeight:10,textBorderRadius:5,textBackgroundColor:e[l]},r=(o=o.substr(s+1)).indexOf("{marker")}this.el=new Ur({style:{rich:n,text:t,textLineHeight:20,textBackgroundColor:i.get("backgroundColor"),textBorderRadius:i.get("borderRadius"),textFill:i.get("textStyle.color"),textPadding:i.get("padding")},z:i.get("z")}),this._zr.add(this.el);var u=this;this.el.on("mouseover",function(){u._enterable&&(clearTimeout(u._hideTimeout),u._show=!0),u._inContent=!0}),this.el.on("mouseout",function(){u._enterable&&u._show&&u.hideLater(u._hideDelay),u._inContent=!1})},setEnterable:function(t){this._enterable=t},getSize:function(){var t=this.el.getBoundingRect();return[t.width,t.height]},moveTo:function(t,e){this.el&&this.el.attr("position",[t,e])},hide:function(){this.el&&this.el.hide(),this._show=!1},hideLater:function(t){!this._show||this._inContent&&this._enterable||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(A(this.hide,this),t)):this.hide())},isShow:function(){return this._show},getOuterSize:function(){var t=this.getSize();return{width:t[0],height:t[1]}}};var wD=A,bD=E,SD=Rl,MD=new rs({shape:{x:-1,y:-1,width:2,height:2}});function ID(t){for(var e=t.pop();t.length;){var i=t.pop();i&&(Cl.isInstance(i)&&(i=i.get("tooltip",!0)),"string"==typeof i&&(i={formatter:i}),e=new Cl(i,e,e.ecModel))}return e}function TD(t,e){return t.dispatchAction||A(e.dispatchAction,e)}function AD(t){return"center"===t||"middle"===t}Af({type:"tooltip",init:function(t,e){if(!v.node){var i,n=t.getComponent("tooltip"),o=n.get("renderMode");this._renderMode=Qo(o),"html"===this._renderMode?(i=new xD(e.getDom(),e,{appendToBody:n.get("appendToBody",!0)}),this._newLine="<br/>"):(i=new _D(e),this._newLine="\n"),this._tooltipContent=i}},render:function(t,e,i){if(!v.node){this.group.removeAll(),this._tooltipModel=t,this._ecModel=e,this._api=i,this._lastDataByCoordSys=null,this._alwaysShowContent=t.get("alwaysShowContent");var n=this._tooltipContent;n.update(),n.setEnterable(t.get("enterable")),this._initGlobalListener(),this._keepShow()}},_initGlobalListener:function(){var n=this._tooltipModel.get("triggerOn");fI("itemTooltip",this._api,wD(function(t,e,i){"none"!==n&&(0<=n.indexOf(t)?this._tryShow(e,i):"leave"===t&&this._hide(i))},this))},_keepShow:function(){var t=this._tooltipModel,e=this._ecModel,i=this._api;if(null!=this._lastX&&null!=this._lastY&&"none"!==t.get("triggerOn")){var n=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){i.isDisposed()||n.manuallyShowTip(t,e,i,{x:n._lastX,y:n._lastY})})}},manuallyShowTip:function(t,e,i,n){if(n.from!==this.uid&&!v.node){var o=TD(n,i);this._ticket="";var a=n.dataByCoordSys;if(n.tooltip&&null!=n.x&&null!=n.y){var r=MD;r.position=[n.x,n.y],r.update(),r.tooltip=n.tooltip,this._tryShow({offsetX:n.x,offsetY:n.y,target:r},o)}else if(a)this._tryShow({offsetX:n.x,offsetY:n.y,position:n.position,dataByCoordSys:n.dataByCoordSys,tooltipOption:n.tooltipOption},o);else if(null!=n.seriesIndex){if(this._manuallyAxisShowTip(t,e,i,n))return;var s=iI(n,e),l=s.point[0],u=s.point[1];null!=l&&null!=u&&this._tryShow({offsetX:l,offsetY:u,position:n.position,target:s.el},o)}else null!=n.x&&null!=n.y&&(i.dispatchAction({type:"updateAxisPointer",x:n.x,y:n.y}),this._tryShow({offsetX:n.x,offsetY:n.y,position:n.position,target:i.getZr().findHover(n.x,n.y).target},o))}},manuallyHideTip:function(t,e,i,n){var o=this._tooltipContent;!this._alwaysShowContent&&this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=null,n.from!==this.uid&&this._hide(TD(n,i))},_manuallyAxisShowTip:function(t,e,i,n){var o=n.seriesIndex,a=n.dataIndex,r=e.getComponent("axisPointer").coordSysAxesInfo;if(null!=o&&null!=a&&null!=r){var s=e.getSeriesByIndex(o);if(s)if("axis"===(t=ID([s.getData().getItemModel(a),s,(s.coordinateSystem||{}).model,t])).get("trigger"))return i.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:a,position:n.position}),!0}},_tryShow:function(t,e){var i=t.target;if(this._tooltipModel){this._lastX=t.offsetX,this._lastY=t.offsetY;var n=t.dataByCoordSys;n&&n.length?this._showAxisTooltip(n,t):i&&null!=i.dataIndex?(this._lastDataByCoordSys=null,this._showSeriesItemTooltip(t,i,e)):i&&i.tooltip?(this._lastDataByCoordSys=null,this._showComponentItemTooltip(t,i,e)):(this._lastDataByCoordSys=null,this._hide(e))}},_showOrMove:function(t,e){var i=t.get("showDelay");e=A(e,this),clearTimeout(this._showTimout),0<i?this._showTimout=setTimeout(e,i):e()},_showAxisTooltip:function(t,e){var d=this._ecModel,i=this._tooltipModel,n=[e.offsetX,e.offsetY],o=[],f=[],a=ID([e.tooltipOption,i]),p=this._renderMode,r=this._newLine,g={};bD(t,function(t){bD(t.dataByAxis,function(s){var l=d.getComponent(s.axisDim+"Axis",s.axisIndex),u=s.value,h=[];if(l&&null!=u){var c=DI(u,l.axis,d,s.seriesDataIndices,s.valueLabelOpt);E(s.seriesDataIndices,function(t){var e=d.getSeriesByIndex(t.seriesIndex),i=t.dataIndexInside,n=e&&e.getDataParams(i);if(n.axisDim=s.axisDim,n.axisIndex=s.axisIndex,n.axisType=s.axisType,n.axisId=s.axisId,n.axisValue=ug(l.axis,u),n.axisValueLabel=c,n){f.push(n);var o,a=e.formatTooltip(i,!0,null,p);if(z(a)){o=a.html;var r=a.markers;m(g,r)}else o=a;h.push(o)}});var t=c;"html"!==p?o.push(h.join(r)):o.push((t?au(t)+r:"")+h.join(r))}})},this),o.reverse(),o=o.join(this._newLine+this._newLine);var s=e.position;this._showOrMove(a,function(){this._updateContentNotChangedOnAxis(t)?this._updatePosition(a,s,n[0],n[1],this._tooltipContent,f):this._showTooltipContent(a,o,f,Math.random(),n[0],n[1],s,void 0,g)})},_showSeriesItemTooltip:function(t,e,i){var n=this._ecModel,o=e.seriesIndex,a=n.getSeriesByIndex(o),r=e.dataModel||a,s=e.dataIndex,l=e.dataType,u=r.getData(l),h=ID([u.getItemModel(s),r,a&&(a.coordinateSystem||{}).model,this._tooltipModel]),c=h.get("trigger");if(null==c||"item"===c){var d,f,p=r.getDataParams(s,l),g=r.formatTooltip(s,!1,l,this._renderMode);f=z(g)?(d=g.html,g.markers):(d=g,null);var m="item_"+r.name+"_"+s;this._showOrMove(h,function(){this._showTooltipContent(h,d,p,m,t.offsetX,t.offsetY,t.position,t.target,f)}),i({type:"showTip",dataIndexInside:s,dataIndex:u.getRawIndex(s),seriesIndex:o,from:this.uid})}},_showComponentItemTooltip:function(t,e,i){var n=e.tooltip;if("string"==typeof n){n={content:n,formatter:n}}var o=new Cl(n,this._tooltipModel,this._ecModel),a=o.get("content"),r=Math.random();this._showOrMove(o,function(){this._showTooltipContent(o,a,o.get("formatterParams")||{},r,t.offsetX,t.offsetY,t.position,e)}),i({type:"showTip",from:this.uid})},_showTooltipContent:function(i,t,n,e,o,a,r,s,l){if(this._ticket="",i.get("showContent")&&i.get("show")){var u=this._tooltipContent,h=i.get("formatter");r=r||i.get("position");var c=t;if(h&&"string"==typeof h)c=lu(h,n,!0);else if("function"==typeof h){var d=wD(function(t,e){t===this._ticket&&(u.setContent(e,l,i),this._updatePosition(i,r,o,a,u,n,s))},this);this._ticket=e,c=h(n,e,d)}u.setContent(c,l,i),u.show(i),this._updatePosition(i,r,o,a,u,n,s)}},_updatePosition:function(t,e,i,n,o,a,r){var s=this._api.getWidth(),l=this._api.getHeight();e=e||t.get("position");var u=o.getSize(),h=t.get("align"),c=t.get("verticalAlign"),d=r&&r.getBoundingRect().clone();if(r&&d.applyTransform(r.transform),"function"==typeof e&&(e=e([i,n],a,o.el,d,{viewSize:[s,l],contentSize:u.slice()})),L(e))i=SD(e[0],s),n=SD(e[1],l);else if(z(e)){e.width=u[0],e.height=u[1];var f=bu(e,{width:s,height:l});i=f.x,n=f.y,c=h=null}else if("string"==typeof e&&r){i=(p=function(t,e,i){var n=i[0],o=i[1],a=0,r=0,s=e.width,l=e.height;switch(t){case"inside":a=e.x+s/2-n/2,r=e.y+l/2-o/2;break;case"top":a=e.x+s/2-n/2,r=e.y-o-5;break;case"bottom":a=e.x+s/2-n/2,r=e.y+l+5;break;case"left":a=e.x-n-5,r=e.y+l/2-o/2;break;case"right":a=e.x+s+5,r=e.y+l/2-o/2}return[a,r]}(e,d,u))[0],n=p[1]}else{var p;i=(p=function(t,e,i,n,o,a,r){var s=i.getOuterSize(),l=s.width,u=s.height;null!=a&&(n<t+l+a?t-=l+a:t+=a);null!=r&&(o<e+u+r?e-=u+r:e+=r);return[t,e]}(i,n,o,s,l,h?null:20,c?null:20))[0],n=p[1]}h&&(i-=AD(h)?u[0]/2:"right"===h?u[0]:0),c&&(n-=AD(c)?u[1]/2:"bottom"===c?u[1]:0),t.get("confine")&&(i=(p=function(t,e,i,n,o){var a=i.getOuterSize(),r=a.width,s=a.height;return t=Math.min(t+r,n)-r,e=Math.min(e+s,o)-s,t=Math.max(t,0),e=Math.max(e,0),[t,e]}(i,n,o,s,l))[0],n=p[1]);o.moveTo(i,n)},_updateContentNotChangedOnAxis:function(n){var t=this._lastDataByCoordSys,r=!!t&&t.length===n.length;return r&&bD(t,function(t,e){var i=t.dataByAxis||{},a=(n[e]||{}).dataByAxis||[];(r&=i.length===a.length)&&bD(i,function(t,e){var i=a[e]||{},n=t.seriesDataIndices||[],o=i.seriesDataIndices||[];(r&=t.value===i.value&&t.axisType===i.axisType&&t.axisId===i.axisId&&n.length===o.length)&&bD(n,function(t,e){var i=o[e];r&=t.seriesIndex===i.seriesIndex&&t.dataIndex===i.dataIndex})})}),this._lastDataByCoordSys=n,!!r},_hide:function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},dispose:function(t,e){v.node||(this._tooltipContent.dispose(),mI("itemTooltip",e))}}),_f({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},function(){}),_f({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},function(){});var DD=["rect","polygon","keep","clear"];var CD=E;function LD(t){if(t)for(var e in t)if(t.hasOwnProperty(e))return!0}function kD(t,e,a){var i={};return CD(e,function(n){var o=i[n]=function(){function t(){}return t.prototype.__hidden=t.prototype,new t}();CD(t[n],function(t,e){if(g_.isValidType(e)){var i={type:e,visual:t};a&&a(i,n),o[e]=new g_(i),"opacity"===e&&((i=k(i)).type="colorAlpha",o.__hidden.__alphaForOpacity=new g_(i))}})}),i}function PD(e,i,t){var n;E(t,function(t){i.hasOwnProperty(t)&&LD(i[t])&&(n=!0)}),n&&E(t,function(t){i.hasOwnProperty(t)&&LD(i[t])?e[t]=k(i[t]):delete e[t]})}var ND={lineX:OD(0),lineY:OD(1),rect:{point:function(t,e,i){return t&&i.boundingRect.contain(t[0],t[1])},rect:function(t,e,i){return t&&i.boundingRect.intersect(t)}},polygon:{point:function(t,e,i){return t&&i.boundingRect.contain(t[0],t[1])&&Tg(i.range,t[0],t[1])},rect:function(t,e,i){var n=i.range;if(!t||n.length<=1)return!1;var o=t.x,a=t.y,r=t.width,s=t.height,l=n[0];return!!(Tg(n,o,a)||Tg(n,o+r,a)||Tg(n,o,a+s)||Tg(n,o+r,a+s)||Di.create(t).contain(l[0],l[1])||xl(o,a,o+r,a,n)||xl(o,a,o,a+s,n)||xl(o+r,a,o+r,a+s,n)||xl(o,a+s,o+r,a+s,n))||void 0}}};function OD(a){var r=["x","y"],s=["width","height"];return{point:function(t,e,i){if(t){var n=i.range;return ED(t[a],n)}},rect:function(t,e,i){if(t){var n=i.range,o=[t[r[a]],t[r[a]]+t[s[a]]];return o[1]<o[0]&&o.reverse(),ED(o[0],n)||ED(o[1],n)||ED(n[0],o)||ED(n[1],o)}}}}function ED(t,e){return e[0]<=t&&t<=e[1]}var RD=["inBrush","outOfBrush"],zD="__ecBrushSelect",BD="__ecInBrushSelectEvent",VD=Ld.VISUAL.BRUSH;function GD(e){e.eachComponent({mainType:"brush"},function(t){(t.brushTargetManager=new DA(t.option,e)).setInputRanges(t.areas,e)})}function FD(t,e){if(!t.isDisposed()){var i=t.getZr();i[BD]=!0,t.dispatchAction({type:"brushSelect",batch:e}),i[BD]=!1}}function WD(t,e,i,n){for(var o=0,a=e.length;o<a;o++){var r=e[o];if(t[r.brushType](n,i,r.selectors,r))return!0}}function HD(t){var r=t.brushSelector;if(R(r)){var e=[];return E(ND,function(a,t){e[t]=function(t,e,i,n){var o=e.getItemLayout(t);return a[r](o,i,n)}}),e}if(C(r)){var i={};return E(ND,function(t,e){i[e]=r}),i}return r}bf(VD,function(t,e,i){t.eachComponent({mainType:"brush"},function(t){i&&"takeGlobalCursor"===i.type&&t.setBrushOption("brush"===i.key?i.brushOption:{brushType:!1})}),GD(t)}),Sf(VD,function(p,t,e){var o,g,m=[];p.eachComponent({mainType:"brush"},function(a,t){var s={brushId:a.id,brushIndex:t,brushName:a.name,areas:k(a.areas),selected:[]};m.push(s);var e=a.option,i=e.brushLink,n=[],l=[],u=[],h=0;t||(o=e.throttleType,g=e.throttleDelay);var r=O(a.areas,function(t){return function(i){var n=i.selectors={};return E(ND[i.brushType],function(e,t){n[t]=function(t){return e(t,n,i)}}),i}(D({boundingRect:ZD[t.brushType](t)},t))}),c=kD(a.option,RD,function(t){t.mappingMethod="fixed"});function d(t){return"all"===i||n[t]}function f(t){return!!t.length}L(i)&&E(i,function(t){n[t]=1}),p.eachSeries(function(t,e){var i=u[e]=[];"parallel"===t.subType?function(t,e){var i=t.coordinateSystem;h|=i.hasAxisBrushed(),d(e)&&i.eachActiveState(t.getData(),function(t,e){"active"===t&&(l[e]=1)})}(t,e):function(e,t,i){var n=HD(e);if(!n||function(t,e){var i=t.option.seriesIndex;return null!=i&&"all"!==i&&(L(i)?_(i,e)<0:e!==i)}(a,t))return;if(E(r,function(t){n[t.brushType]&&a.brushTargetManager.controlSeries(t,e,p)&&i.push(t),h|=f(i)}),d(t)&&f(i)){var o=e.getData();o.each(function(t){WD(n,i,o,t)&&(l[t]=1)})}}(t,e,i)}),p.eachSeries(function(t,e){var i={seriesId:t.id,seriesIndex:e,seriesName:t.name,dataIndex:[]};s.selected.push(i);var n=HD(t),o=u[e],a=t.getData(),r=d(e)?function(t){return l[t]?(i.dataIndex.push(a.getRawIndex(t)),"inBrush"):"outOfBrush"}:function(t){return WD(n,o,a,t)?(i.dataIndex.push(a.getRawIndex(t)),"inBrush"):"outOfBrush"};(d(e)?h:f(o))&&function(t,u,h,c,d,f){var p,g={};function m(t){return h.getItemVisual(p,t)}function v(t,e){h.setItemVisual(p,t,e)}function e(t,e){p=null==f?t:e;var i=h.getRawDataItem(p);if(!i||!1!==i.visualMap)for(var n=c.call(d,t),o=u[n],a=g[n],r=0,s=a.length;r<s;r++){var l=a[r];o[l]&&o[l].applyVisual(t,m,v)}}E(t,function(t){var e=g_.prepareVisualTypes(u[t]);g[t]=e}),null==f?h.each(e):h.each([f],e)}(RD,c,a,r)})}),function(t,e,i,n,o){if(!o)return;var a=t.getZr();if(a[BD])return;a[zD]||(a[zD]=FD);kc(a,zD,i,e)(t,n)}(t,o,g,m,e)});var ZD={lineX:et,lineY:et,rect:function(t){return UD(t.range)},polygon:function(t){for(var e,i=t.range,n=0,o=i.length;n<o;n++){e=e||[[1/0,-1/0],[1/0,-1/0]];var a=i[n];a[0]<e[0][0]&&(e[0][0]=a[0]),a[0]>e[0][1]&&(e[0][1]=a[0]),a[1]<e[1][0]&&(e[1][0]=a[1]),a[1]>e[1][1]&&(e[1][1]=a[1])}return e&&UD(e)}};function UD(t){return new Di(t[0][0],t[1][0],t[0][1]-t[0][0],t[1][1]-t[1][0])}var XD=["#ddd"];Tf({type:"brush",dependencies:["geo","grid","xAxis","yAxis","parallel","series"],defaultOption:{toolbox:null,brushLink:null,seriesIndex:"all",geoIndex:null,xAxisIndex:null,yAxisIndex:null,brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(120,140,180,0.3)",borderColor:"rgba(120,140,180,0.8)"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},areas:[],brushType:null,brushOption:{},coordInfoList:[],optionUpdated:function(t,e){var i=this.option;e||PD(i,t,["inBrush","outOfBrush"]);var n=i.inBrush=i.inBrush||{};i.outOfBrush=i.outOfBrush||{color:XD},n.hasOwnProperty("liftZ")||(n.liftZ=5)},setAreas:function(t){t&&(this.areas=O(t,function(t){return YD(this.option,t)},this))},setBrushOption:function(t){this.brushOption=YD(this.option,t),this.brushType=this.brushOption.brushType}});function YD(t,e){return m({brushType:t.brushType,brushMode:t.brushMode,transformable:t.transformable,brushStyle:new Cl(t.brushStyle).getItemStyle(),removeOnClick:t.removeOnClick,z:t.z},e,!0)}function jD(t,e,i,n){n&&n.$from===t.id||this._brushController.setPanels(t.brushTargetManager.makePanelOpts(i)).enableBrush(t.brushOption).updateCovers(t.areas.slice())}Af({type:"brush",init:function(t,e){this.ecModel=t,this.api=e,this.model,(this._brushController=new Ib(e.getZr())).on("brush",A(this._onBrush,this)).mount()},render:function(t){return this.model=t,jD.apply(this,arguments)},updateTransform:function(t,e){return GD(e),jD.apply(this,arguments)},updateView:jD,dispose:function(){this._brushController.dispose()},_onBrush:function(t,e){var i=this.model.id;this.model.brushTargetManager.setOutputRanges(t,this.ecModel),e.isEnd&&!e.removeOnClick||this.api.dispatchAction({type:"brush",brushId:i,areas:k(t),$from:i}),e.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:i,areas:k(t),$from:i})}}),_f({type:"brush",event:"brush"},function(e,t){t.eachComponent({mainType:"brush",query:e},function(t){t.setAreas(e.areas)})}),_f({type:"brushSelect",event:"brushSelected",update:"none"},function(){}),_f({type:"brushEnd",event:"brushEnd",update:"none"},function(){});var qD=Oc.toolbox.brush;function KD(t,e,i){this.model=t,this.ecModel=e,this.api=i,this._brushType,this._brushMode}KD.defaultOption={show:!0,type:["rect","polygon","lineX","lineY","keep","clear"],icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:k(qD.title)};var $D=KD.prototype;$D.render=$D.updateView=function(e,t,i){var n,o,a;t.eachComponent({mainType:"brush"},function(t){n=t.brushType,o=t.brushOption.brushMode||"single",a|=t.areas.length}),this._brushType=n,this._brushMode=o,E(e.get("type",!0),function(t){e.setIconStatus(t,("keep"===t?"multiple"===o:"clear"===t?a:t===n)?"emphasis":"normal")})},$D.getIcons=function(){var t=this.model,e=t.get("icon",!0),i={};return E(t.get("type",!0),function(t){e[t]&&(i[t]=e[t])}),i},$D.onclick=function(t,e,i){var n=this._brushType,o=this._brushMode;"clear"===i?(e.dispatchAction({type:"axisAreaSelect",intervals:[]}),e.dispatchAction({type:"brush",command:"clear",areas:[]})):e.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"keep"===i?n:n!==i&&i,brushMode:"keep"===i?"multiple"===o?"single":"multiple":o}})},nA("brush",KD),yf(function(t,e){var i=t&&t.brush;if(L(i)||(i=i?[i]:[]),i.length){var n=[];E(i,function(t){var e=t.hasOwnProperty("toolbox")?t.toolbox:[];e instanceof Array&&(n=n.concat(e))});var o=t&&t.toolbox;L(o)&&(o=o[0]),o||(o={feature:{}},t.toolbox=[o]);var a=o.feature||(o.feature={}),r=a.brush||(a.brush={}),s=r.type||(r.type=[]);s.push.apply(s,n),function(i){var e={};E(i,function(t){e[t]=1}),i.length=0,E(e,function(t,e){i.push(e)})}(s),e&&!s.length&&s.push.apply(s,DD)}}),Tf({type:"title",layoutMode:{type:"box",ignoreSize:!0},defaultOption:{zlevel:0,z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bolder",color:"#333"},subtextStyle:{color:"#aaa"}}}),Af({type:"title",render:function(t,e,i){if(this.group.removeAll(),t.get("show")){var n=this.group,o=t.getModel("textStyle"),a=t.getModel("subtextStyle"),r=t.get("textAlign"),s=H(t.get("textBaseline"),t.get("textVerticalAlign")),l=new Ur({style:nl({},o,{text:t.get("text"),textFill:o.getTextColor()},{disableBox:!0}),z2:10}),u=l.getBoundingRect(),h=t.get("subtext"),c=new Ur({style:nl({},a,{text:h,textFill:a.getTextColor(),y:u.height+t.get("itemGap"),textVerticalAlign:"top"},{disableBox:!0}),z2:10}),d=t.get("link"),f=t.get("sublink"),p=t.get("triggerEvent",!0);l.silent=!d&&!p,c.silent=!f&&!p,d&&l.on("click",function(){gu(d,"_"+t.get("target"))}),f&&c.on("click",function(){gu(d,"_"+t.get("subtarget"))}),l.eventData=c.eventData=p?{componentType:"title",componentIndex:t.componentIndex}:null,n.add(l),h&&n.add(c);var g=n.getBoundingRect(),m=t.getBoxLayoutParams();m.width=g.width,m.height=g.height;var v=bu(m,{width:i.getWidth(),height:i.getHeight()},t.get("padding"));r||("middle"===(r=t.get("left")||t.get("right"))&&(r="center"),"right"===r?v.x+=v.width:"center"===r&&(v.x+=v.width/2)),s||("center"===(s=t.get("top")||t.get("bottom"))&&(s="middle"),"bottom"===s?v.y+=v.height:"middle"===s&&(v.y+=v.height/2),s=s||"top"),n.attr("position",[v.x,v.y]);var y={textAlign:r,textVerticalAlign:s};l.setStyle(y),c.setStyle(y),g=n.getBoundingRect();var x=v.margin,_=t.getItemStyle(["color","opacity"]);_.fill=t.get("backgroundColor");var w=new rs({shape:{x:g.x-x[3],y:g.y-x[0],width:g.width+x[1]+x[3],height:g.height+x[0]+x[2],r:t.get("borderRadius")},style:_,subPixelOptimize:!0,silent:!0});n.add(w)}}});function JD(t){var e=t.itemStyle||(t.itemStyle={}),i=e.emphasis||(e.emphasis={}),n=t.label||t.label||{},o=n.normal||(n.normal={}),a={normal:1,emphasis:1};E(n,function(t,e){a[e]||QD(o,e)||(o[e]=t)}),i.label&&!QD(n,"emphasis")&&(n.emphasis=i.label,delete i.label)}function QD(t,e){return t.hasOwnProperty(e)}ku.registerSubTypeDefaulter("timeline",function(){return"slider"}),_f({type:"timelineChange",event:"timelineChanged",update:"prepareAndUpdate"},function(t,e){var i=e.getComponent("timeline");return i&&null!=t.currentIndex&&(i.setCurrentIndex(t.currentIndex),!i.get("loop",!0)&&i.isIndexMax()&&i.setPlayState(!1)),e.resetOption("timeline"),D({currentIndex:i.option.currentIndex},t)}),_f({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},function(t,e){var i=e.getComponent("timeline");i&&null!=t.playState&&i.setPlayState(t.playState)});var tC=ku.extend({type:"timeline",layoutMode:"box",defaultOption:{zlevel:0,z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},init:function(t,e,i){this._data,this._names,this.mergeDefaultAndTheme(t,i),this._initData()},mergeOption:function(t){tC.superApply(this,"mergeOption",arguments),this._initData()},setCurrentIndex:function(t){null==t&&(t=this.option.currentIndex);var e=this._data.count();this.option.loop?t=(t%e+e)%e:(e<=t&&(t=e-1),t<0&&(t=0)),this.option.currentIndex=t},getCurrentIndex:function(){return this.option.currentIndex},isIndexMax:function(){return this.getCurrentIndex()>=this._data.count()-1},setPlayState:function(t){this.option.autoPlay=!!t},getPlayState:function(){return!!this.option.autoPlay},_initData:function(){var t=this.option,e=t.data||[],i=t.axisType,o=this._names=[];if("category"===i){var a=[];E(e,function(t,e){var i,n=Wo(t);z(t)?(i=k(t)).value=e:i=e,a.push(i),R(n)||null!=n&&!isNaN(n)||(n=""),o.push(n+"")}),e=a}var n={category:"ordinal",time:"time"}[i]||"number";(this._data=new Yf([{name:"value",type:n}],this)).initData(e,o)},getData:function(){return this._data},getCategories:function(){if("category"===this.get("axisType"))return this._names.slice()}});b(tC.extend({type:"timeline.slider",defaultOption:{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"emptyCircle",symbolSize:10,lineStyle:{show:!0,width:2,color:"#304654"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#304654"},itemStyle:{color:"#304654",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:13,color:"#c23531",borderWidth:5,borderColor:"rgba(194,53,49, 0.5)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:22,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"path://M18.6,50.8l22.5-22.5c0.2-0.2,0.3-0.4,0.3-0.7c0-0.3-0.1-0.5-0.3-0.7L18.7,4.4c-0.1-0.1-0.2-0.3-0.2-0.5 c0-0.4,0.3-0.8,0.8-0.8c0.2,0,0.5,0.1,0.6,0.3l23.5,23.5l0,0c0.2,0.2,0.3,0.4,0.3,0.7c0,0.3-0.1,0.5-0.3,0.7l-0.1,0.1L19.7,52 c-0.1,0.1-0.3,0.2-0.5,0.2c-0.4,0-0.8-0.3-0.8-0.8C18.4,51.2,18.5,51,18.6,50.8z",prevIcon:"path://M43,52.8L20.4,30.3c-0.2-0.2-0.3-0.4-0.3-0.7c0-0.3,0.1-0.5,0.3-0.7L42.9,6.4c0.1-0.1,0.2-0.3,0.2-0.5 c0-0.4-0.3-0.8-0.8-0.8c-0.2,0-0.5,0.1-0.6,0.3L18.3,28.8l0,0c-0.2,0.2-0.3,0.4-0.3,0.7c0,0.3,0.1,0.5,0.3,0.7l0.1,0.1L41.9,54 c0.1,0.1,0.3,0.2,0.5,0.2c0.4,0,0.8-0.3,0.8-0.8C43.2,53.2,43.1,53,43,52.8z",color:"#304654",borderColor:"#304654",borderWidth:1},emphasis:{label:{show:!0,color:"#c23531"},itemStyle:{color:"#c23531"},controlStyle:{color:"#c23531",borderColor:"#c23531",borderWidth:2}},data:[]}}),Xh);function eC(t,e,i,n){Gg.call(this,t,e,i),this.type=n||"value",this.model=null}var iC=gc.extend({type:"timeline"});eC.prototype={constructor:eC,getLabelModel:function(){return this.model.getModel("label")},isHorizontal:function(){return"horizontal"===this.model.get("orient")}},w(eC,Gg);var nC=A,oC=E,aC=Math.PI;function rC(t,e,i,n,o,a){var r=e.get("color");o?(o.setColor(r),i.add(o),a&&a.onUpdate(o)):((o=wg(t.get("symbol"),-1,-1,2,2,r)).setStyle("strokeNoScale",!0),i.add(o),a&&a.onCreate(o));var s=e.getItemStyle(["color","symbol","symbolSize"]);o.setStyle(s),n=m({rectHover:!0,z2:100},n,!0);var l=t.get("symbolSize");(l=l instanceof Array?l.slice():[+l,+l])[0]/=2,l[1]/=2,n.scale=l;var u=t.get("symbolOffset");if(u){var h=n.position=n.position||[0,0];h[0]+=Rl(u[0],l[0]),h[1]+=Rl(u[1],l[1])}var c=t.get("symbolRotate");return n.rotation=(c||0)*Math.PI/180||0,o.attr(n),o.updateTransform(),o}function sC(t,e,i,n,o){if(!t.dragging){var a=n.getModel("checkpointStyle"),r=i.dataToCoord(n.getData().get(["value"],e));o||!a.get("animation",!0)?t.attr({position:[r,0]}):(t.stopAnimation(!0),t.animateTo({position:[r,0]},a.get("animationDuration",!0),a.get("animationEasing",!0)))}}iC.extend({type:"timeline.slider",init:function(t,e){this.api=e,this._axis,this._viewRect,this._timer,this._currentPointer,this._mainGroup,this._labelGroup},render:function(e,t,i,n){if(this.model=e,this.api=i,this.ecModel=t,this.group.removeAll(),e.get("show",!0)){var o=this._layout(e,i),a=this._createGroup("mainGroup"),r=this._createGroup("labelGroup"),s=this._axis=this._createAxis(o,e);e.formatTooltip=function(t){return au(s.scale.getLabel(t))},oC(["AxisLine","AxisTick","Control","CurrentPointer"],function(t){this["_render"+t](o,a,s,e)},this),this._renderAxisLabel(o,r,s,e),this._position(o,e)}this._doPlayStop()},remove:function(){this._clearTimer(),this.group.removeAll()},dispose:function(){this._clearTimer()},_layout:function(t,e){var i=t.get("label.position"),n=t.get("orient"),o=function(t,e){return bu(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()},t.get("padding"))}(t,e);null==i||"auto"===i?i="horizontal"===n?o.y+o.height/2<e.getHeight()/2?"-":"+":o.x+o.width/2<e.getWidth()/2?"+":"-":isNaN(i)&&(i={horizontal:{top:"-",bottom:"+"},vertical:{left:"-",right:"+"}}[n][i]);var a,r,s,l,u={horizontal:"center",vertical:0<=i||"+"===i?"left":"right"},h={horizontal:0<=i||"+"===i?"top":"bottom",vertical:"middle"},c={horizontal:0,vertical:aC/2},d="vertical"===n?o.height:o.width,f=t.getModel("controlStyle"),p=f.get("show",!0),g=p?f.get("itemSize"):0,m=p?f.get("itemGap"):0,v=g+m,y=t.get("label.rotate")||0;y=y*aC/180;var x=f.get("position",!0),_=p&&f.get("showPlayBtn",!0),w=p&&f.get("showPrevBtn",!0),b=p&&f.get("showNextBtn",!0),S=0,M=d;return"left"===x||"bottom"===x?(_&&(a=[0,0],S+=v),w&&(r=[S,0],S+=v)):(_&&(a=[M-g,0],M-=v),w&&(r=[0,0],S+=v)),b&&(s=[M-g,0],M-=v),l=[S,M],t.get("inverse")&&l.reverse(),{viewRect:o,mainLength:d,orient:n,rotation:c[n],labelRotation:y,labelPosOpt:i,labelAlign:t.get("label.align")||u[n],labelBaseline:t.get("label.verticalAlign")||t.get("label.baseline")||h[n],playPosition:a,prevBtnPosition:r,nextBtnPosition:s,axisExtent:l,controlSize:g,controlGap:m}},_position:function(t,e){var i=this._mainGroup,n=this._labelGroup,o=t.viewRect;if("vertical"===t.orient){var a=ae(),r=o.x,s=o.y+o.height;ue(a,a,[-r,-s]),he(a,a,-aC/2),ue(a,a,[r,s]),(o=o.clone()).applyTransform(a)}var l=m(o),u=m(i.getBoundingRect()),h=m(n.getBoundingRect()),c=i.position,d=n.position;d[0]=c[0]=l[0][0];var f,p=t.labelPosOpt;isNaN(p)?(v(c,u,l,1,f="+"===p?0:1),v(d,h,l,1,1-f)):(v(c,u,l,1,f=0<=p?0:1),d[1]=c[1]+p);function g(t){var e=t.position;t.origin=[l[0][0]-e[0],l[1][0]-e[1]]}function m(t){return[[t.x,t.x+t.width],[t.y,t.y+t.height]]}function v(t,e,i,n,o){t[n]+=i[n][o]-e[n][o]}i.attr("position",c),n.attr("position",d),i.rotation=n.rotation=t.rotation,g(i),g(n)},_createAxis:function(t,e){var i=e.getData(),n=e.get("axisType"),o=sg(e,n);o.getTicks=function(){return i.mapArray(["value"],function(t){return t})};var a=i.getDataExtent("value");o.setExtent(a[0],a[1]),o.niceTicks();var r=new eC("value",o,t.axisExtent,n);return r.model=e,r},_createGroup:function(t){var e=this["_"+t]=new Ci;return this.group.add(e),e},_renderAxisLine:function(t,e,i,n){var o=i.getExtent();n.get("lineStyle.show")&&e.add(new ls({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:P({lineCap:"round"},n.getModel("lineStyle").getLineStyle()),silent:!0,z2:1}))},_renderAxisTick:function(t,s,l,u){var h=u.getData(),e=l.scale.getTicks();oC(e,function(t){var e=l.dataToCoord(t),i=h.getItemModel(t),n=i.getModel("itemStyle"),o=i.getModel("emphasis.itemStyle"),a={position:[e,0],onclick:nC(this._changeTimeline,this,t)},r=rC(i,n,s,a);$s(r,o.getItemStyle()),i.get("tooltip")?(r.dataIndex=t,r.dataModel=u):r.dataIndex=r.dataModel=null},this)},_renderAxisLabel:function(s,l,u,t){if(u.getLabelModel().get("show")){var h=t.getData(),e=u.getViewLabels();oC(e,function(t){var e=t.tickValue,i=h.getItemModel(e),n=i.getModel("label"),o=i.getModel("emphasis.label"),a=u.dataToCoord(t.tickValue),r=new Ur({position:[a,0],rotation:s.labelRotation-s.rotation,onclick:nC(this._changeTimeline,this,e),silent:!1});nl(r.style,n,{text:t.formattedLabel,textAlign:s.labelAlign,textVerticalAlign:s.labelBaseline}),l.add(r),$s(r,nl({},o))},this)}},_renderControl:function(t,a,e,r){var s=t.controlSize,l=t.rotation,u=r.getModel("controlStyle").getItemStyle(),h=r.getModel("emphasis.controlStyle").getItemStyle(),c=[0,-s/2,s,s],i=r.getPlayState(),n=r.get("inverse",!0);function o(t,e,i,n){if(t){var o=function(t,e,i,n){return Ps(t.get(e).replace(/^path:\/\//,""),k(n||{}),new Di(i[0],i[1],i[2],i[3]),"center")}(r,e,c,{position:t,origin:[s/2,0],rotation:n?-l:0,rectHover:!0,style:u,onclick:i});a.add(o),$s(o,h)}}o(t.nextBtnPosition,"controlStyle.nextIcon",nC(this._changeTimeline,this,n?"-":"+")),o(t.prevBtnPosition,"controlStyle.prevIcon",nC(this._changeTimeline,this,n?"+":"-")),o(t.playPosition,"controlStyle."+(i?"stopIcon":"playIcon"),nC(this._handlePlayClick,this,!i),!0)},_renderCurrentPointer:function(t,e,i,n){var o=n.getData(),a=n.getCurrentIndex(),r=o.getItemModel(a).getModel("checkpointStyle"),s=this,l={onCreate:function(t){t.draggable=!0,t.drift=nC(s._handlePointerDrag,s),t.ondragend=nC(s._handlePointerDragend,s),sC(t,a,i,n,!0)},onUpdate:function(t){sC(t,a,i,n)}};this._currentPointer=rC(r,r,this._mainGroup,{},this._currentPointer,l)},_handlePlayClick:function(t){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:t,from:this.uid})},_handlePointerDrag:function(t,e,i){this._clearTimer(),this._pointerChangeTimeline([i.offsetX,i.offsetY])},_handlePointerDragend:function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},_pointerChangeTimeline:function(t,e){var i=this._toAxisCoord(t)[0],n=Bl(this._axis.getExtent().slice());i>n[1]&&(i=n[1]),i<n[0]&&(i=n[0]),this._currentPointer.position[0]=i,this._currentPointer.dirty();var o=this._findNearestTick(i),a=this.model;(e||o!==a.getCurrentIndex()&&a.get("realtime"))&&this._changeTimeline(o)},_doPlayStop:function(){this._clearTimer(),this.model.getPlayState()&&(this._timer=setTimeout(nC(function(){var t=this.model;this._changeTimeline(t.getCurrentIndex()+(t.get("rewind",!0)?-1:1))},this),this.model.get("playInterval")))},_toAxisCoord:function(t){return pl(t,this._mainGroup.getLocalTransform(),!0)},_findNearestTick:function(o){var a,t=this.model.getData(),r=1/0,s=this._axis;return t.each(["value"],function(t,e){var i=s.dataToCoord(t),n=Math.abs(i-o);n<r&&(r=n,a=e)}),a},_clearTimer:function(){this._timer&&(clearTimeout(this._timer),this._timer=null)},_changeTimeline:function(t){var e=this.model.getCurrentIndex();"+"===t?t=e+1:"-"===t&&(t=e-1),this.api.dispatchAction({type:"timelineChange",currentIndex:t,from:this.uid})}}),yf(function(t){var e=t&&t.timeline;L(e)||(e=e?[e]:[]),E(e,function(t){t&&function(t){var e=t.type,i={number:"value",time:"time"};i[e]&&(t.axisType=i[e],delete t.type);if(JD(t),QD(t,"controlPosition")){var n=t.controlStyle||(t.controlStyle={});QD(n,"position")||(n.position=t.controlPosition),"none"!==n.position||QD(n,"show")||(n.show=!1,delete n.position),delete t.controlPosition}E(t.data||[],function(t){z(t)&&!L(t)&&(!QD(t,"value")&&QD(t,"name")&&(t.value=t.name),JD(t))})}(t)})});var lC=tu,uC=au;function hC(t){Go(t,"label",["show"])}var cC=Tf({type:"marker",dependencies:["series","grid","polar","geo"],init:function(t,e,i){this.mergeDefaultAndTheme(t,i),this._mergeOption(t,i,!1,!0)},isAnimationEnabled:function(){if(v.node)return!1;var t=this.__hostSeries;return this.getShallow("animation")&&t&&t.isAnimationEnabled()},mergeOption:function(t,e){this._mergeOption(t,e,!1,!1)},_mergeOption:function(t,n,e,o){var a=this.constructor,r=this.mainType+"Model";e||n.eachSeries(function(t){var e=t.get(this.mainType,!0),i=t[r];e&&e.data?(i?i._mergeOption(e,n,!0):(o&&hC(e),E(e.data,function(t){t instanceof Array?(hC(t[0]),hC(t[1])):hC(t)}),P(i=new a(e,this,n),{mainType:this.mainType,seriesIndex:t.seriesIndex,name:t.name,createdBySelf:!0}),i.__hostSeries=t),t[r]=i):t[r]=null},this)},formatTooltip:function(t){var e=this.getData(),i=this.getRawValue(t),n=L(i)?O(i,lC).join(", "):lC(i),o=e.getName(t),a=uC(this.name);return null==i&&!o||(a+="<br />"),o&&(a+=uC(o),null!=i&&(a+=" : ")),null!=i&&(a+=uC(n)),a},getData:function(){return this._data},setData:function(t){this._data=t}});b(cC,Xh),cC.extend({type:"markPoint",defaultOption:{zlevel:0,z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}}});var dC=_;function fC(t,e,i,n,o,a){var r=[],s=fp(e,n)?e.getCalculationInfo("stackResultDimension"):n,l=_C(e,s,t),u=e.indicesOfNearest(s,l)[0];r[o]=e.get(i,u),r[a]=e.get(s,u);var h=e.get(n,u),c=Vl(e.get(n,u));return 0<=(c=Math.min(c,20))&&(r[a]=+r[a].toFixed(c)),[r,h]}var pC=T,gC={min:pC(fC,"min"),max:pC(fC,"max"),average:pC(fC,"average")};function mC(t,e){var i=t.getData(),n=t.coordinateSystem;if(e&&!function(t){return!isNaN(parseFloat(t.x))&&!isNaN(parseFloat(t.y))}(e)&&!L(e.coord)&&n){var o=n.dimensions,a=vC(e,i,n,t);if((e=k(e)).type&&gC[e.type]&&a.baseAxis&&a.valueAxis){var r=dC(o,a.baseAxis.dim),s=dC(o,a.valueAxis.dim),l=gC[e.type](i,a.baseDataDim,a.valueDataDim,r,s);e.coord=l[0],e.value=l[1]}else{for(var u=[null!=e.xAxis?e.xAxis:e.radiusAxis,null!=e.yAxis?e.yAxis:e.angleAxis],h=0;h<2;h++)gC[u[h]]&&(u[h]=_C(i,i.mapDimension(o[h]),u[h]));e.coord=u}}return e}function vC(t,e,i,n){var o={};return null!=t.valueIndex||null!=t.valueDim?(o.valueDataDim=null!=t.valueIndex?e.getDimension(t.valueIndex):t.valueDim,o.valueAxis=i.getAxis(function(t,e){var i=t.getData(),n=i.dimensions;e=i.getDimension(e);for(var o=0;o<n.length;o++){var a=i.getDimensionInfo(n[o]);if(a.name===e)return a.coordDim}}(n,o.valueDataDim)),o.baseAxis=i.getOtherAxis(o.valueAxis),o.baseDataDim=e.mapDimension(o.baseAxis.dim)):(o.baseAxis=n.getBaseAxis(),o.valueAxis=i.getOtherAxis(o.baseAxis),o.baseDataDim=e.mapDimension(o.baseAxis.dim),o.valueDataDim=e.mapDimension(o.valueAxis.dim)),o}function yC(t,e){return!(t&&t.containData&&e.coord&&!function(t){return!(isNaN(parseFloat(t.x))&&isNaN(parseFloat(t.y)))}(e))||t.containData(e.coord)}function xC(t,e,i,n){return n<2?t.coord&&t.coord[n]:t.value}function _C(t,e,i){if("average"!==i)return"median"===i?t.getMedian(e):t.getDataExtent(e,!0)["max"===i?1:0];var n=0,o=0;return t.each(e,function(t,e){isNaN(t)||(n+=t,o++)}),n/o}var wC=Af({type:"marker",init:function(){this.markerGroupMap=Q()},render:function(t,i,n){var e=this.markerGroupMap;e.each(function(t){t.__keep=!1});var o=this.type+"Model";i.eachSeries(function(t){var e=t[o];e&&this.renderSeries(t,e,i,n)},this),e.each(function(t){t.__keep||this.group.remove(t.group)},this)},renderSeries:function(){}});function bC(s,l,u){var h=l.coordinateSystem;s.each(function(t){var e,i=s.getItemModel(t),n=Rl(i.get("x"),u.getWidth()),o=Rl(i.get("y"),u.getHeight());if(isNaN(n)||isNaN(o)){if(l.getMarkerPosition)e=l.getMarkerPosition(s.getValues(s.dimensions,t));else if(h){var a=s.get(h.dimensions[0],t),r=s.get(h.dimensions[1],t);e=h.dataToPoint([a,r])}}else e=[n,o];isNaN(n)||(e[0]=n),isNaN(o)||(e[1]=o),s.setItemLayout(t,e)})}wC.extend({type:"markPoint",updateTransform:function(t,e,i){e.eachSeries(function(t){var e=t.markPointModel;e&&(bC(e.getData(),t,i),this.markerGroupMap.get(t.id).updateLayout(e))},this)},renderSeries:function(t,l,e,i){var n=t.coordinateSystem,o=t.id,u=t.getData(),a=this.markerGroupMap,r=a.get(o)||a.set(o,new im),h=function(t,e,i){var n;n=t?O(t&&t.dimensions,function(t){return D({name:t},e.getData().getDimensionInfo(e.getData().mapDimension(t))||{})}):[{name:"value",type:"float"}];var o=new Yf(n,i),a=O(i.get("data"),T(mC,e));t&&(a=M(a,T(yC,t)));return o.initData(a,null,t?xC:function(t){return t.value}),o}(n,t,l);l.setData(h),bC(l.getData(),t,i),h.each(function(t){var e=h.getItemModel(t),i=e.getShallow("symbol"),n=e.getShallow("symbolSize"),o=C(i),a=C(n);if(o||a){var r=l.getRawValue(t),s=l.getDataParams(t);o&&(i=i(r,s)),a&&(n=n(r,s))}h.setItemVisual(t,{symbol:i,symbolSize:n,color:e.get("itemStyle.color")||u.getVisual("color")})}),r.updateData(h),this.group.add(r.group),h.eachItemGraphicEl(function(t){t.traverse(function(t){t.dataModel=l})}),r.__keep=!0,r.group.silent=l.get("silent")||t.get("silent")}}),yf(function(t){t.markPoint=t.markPoint||{}}),cC.extend({type:"markLine",defaultOption:{zlevel:0,z:5,symbol:["circle","arrow"],symbolSize:[8,16],precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"}});function SC(t,e,i,n){var o=t.getData(),a=n.type;if(!L(n)&&("min"===a||"max"===a||"average"===a||"median"===a||null!=n.xAxis||null!=n.yAxis)){var r,s;if(null!=n.yAxis||null!=n.xAxis)r=e.getAxis(null!=n.yAxis?"y":"x"),s=W(n.yAxis,n.xAxis);else{var l=vC(n,o,e,t);r=l.valueAxis,s=_C(o,pp(o,l.valueDataDim),a)}var u="x"===r.dim?0:1,h=1-u,c=k(n),d={};c.type=null,c.coord=[],d.coord=[],c.coord[h]=-1/0,d.coord[h]=1/0;var f=i.get("precision");0<=f&&"number"==typeof s&&(s=+s.toFixed(Math.min(f,20))),c.coord[u]=d.coord[u]=s,n=[c,d,{type:a,valueIndex:n.valueIndex,value:s}]}return(n=[mC(t,n[0]),mC(t,n[1]),P({},n[2])])[2].type=n[2].type||"",m(n[2],n[0]),m(n[2],n[1]),n}function MC(t){return!isNaN(t)&&!isFinite(t)}function IC(t,e,i,n){var o=1-t,a=n.dimensions[t];return MC(e[o])&&MC(i[o])&&e[t]===i[t]&&n.getAxis(a).containData(e[t])}function TC(t,e){if("cartesian2d"===t.type){var i=e[0].coord,n=e[1].coord;if(i&&n&&(IC(1,i,n,t)||IC(0,i,n,t)))return!0}return yC(t,e[0])&&yC(t,e[1])}function AC(t,e,i,n,o){var a,r=n.coordinateSystem,s=t.getItemModel(e),l=Rl(s.get("x"),o.getWidth()),u=Rl(s.get("y"),o.getHeight());if(isNaN(l)||isNaN(u)){if(n.getMarkerPosition)a=n.getMarkerPosition(t.getValues(t.dimensions,e));else{var h=r.dimensions,c=t.get(h[0],e),d=t.get(h[1],e);a=r.dataToPoint([c,d])}if("cartesian2d"===r.type){var f=r.getAxis("x"),p=r.getAxis("y");h=r.dimensions;MC(t.get(h[0],e))?a[0]=f.toGlobalCoord(f.getExtent()[i?0:1]):MC(t.get(h[1],e))&&(a[1]=p.toGlobalCoord(p.getExtent()[i?0:1]))}isNaN(l)||(a[0]=l),isNaN(u)||(a[1]=u)}else a=[l,u];t.setItemLayout(e,a)}wC.extend({type:"markLine",updateTransform:function(t,e,a){e.eachSeries(function(e){var t=e.markLineModel;if(t){var i=t.getData(),n=t.__from,o=t.__to;n.each(function(t){AC(n,t,!0,e,a),AC(o,t,!1,e,a)}),i.each(function(t){i.setItemLayout(t,[n.getItemLayout(t),o.getItemLayout(t)])}),this.markerGroupMap.get(e.id).updateLayout()}},this)},renderSeries:function(o,i,t,a){var e=o.coordinateSystem,n=o.id,r=o.getData(),s=this.markerGroupMap,l=s.get(n)||s.set(n,new pw);this.group.add(l.group);var u=function(t,e,i){var n;n=t?O(t&&t.dimensions,function(t){return D({name:t},e.getData().getDimensionInfo(e.getData().mapDimension(t))||{})}):[{name:"value",type:"float"}];var o=new Yf(n,i),a=new Yf(n,i),r=new Yf([],i),s=O(i.get("data"),T(SC,e,t,i));t&&(s=M(s,T(TC,t)));var l=t?xC:function(t){return t.value};return o.initData(O(s,function(t){return t[0]}),null,l),a.initData(O(s,function(t){return t[1]}),null,l),r.initData(O(s,function(t){return t[2]})),r.hasItemOption=!0,{from:o,to:a,line:r}}(e,o,i),h=u.from,c=u.to,d=u.line;i.__from=h,i.__to=c,i.setData(d);var f=i.get("symbol"),p=i.get("symbolSize");function g(t,e,i){var n=t.getItemModel(e);AC(t,e,i,o,a),t.setItemVisual(e,{symbolSize:n.get("symbolSize")||p[i?0:1],symbol:n.get("symbol",!0)||f[i?0:1],color:n.get("itemStyle.color")||r.getVisual("color")})}L(f)||(f=[f,f]),"number"==typeof p&&(p=[p,p]),u.from.each(function(t){g(h,t,!0),g(c,t,!1)}),d.each(function(t){var e=d.getItemModel(t).get("lineStyle.color");d.setItemVisual(t,{color:e||h.getItemVisual(t,"color")}),d.setItemLayout(t,[h.getItemLayout(t),c.getItemLayout(t)]),d.setItemVisual(t,{fromSymbolSize:h.getItemVisual(t,"symbolSize"),fromSymbol:h.getItemVisual(t,"symbol"),toSymbolSize:c.getItemVisual(t,"symbolSize"),toSymbol:c.getItemVisual(t,"symbol")})}),l.updateData(d),u.line.eachItemGraphicEl(function(t,e){t.traverse(function(t){t.dataModel=i})}),l.__keep=!0,l.group.silent=i.get("silent")||o.get("silent")}}),yf(function(t){t.markLine=t.markLine||{}}),cC.extend({type:"markArea",defaultOption:{zlevel:0,z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}}});function DC(t,e,i,n){var o=mC(t,n[0]),a=mC(t,n[1]),r=W,s=o.coord,l=a.coord;s[0]=r(s[0],-1/0),s[1]=r(s[1],-1/0),l[0]=r(l[0],1/0),l[1]=r(l[1],1/0);var u=p([{},o,a]);return u.coord=[o.coord,a.coord],u.x0=o.x,u.y0=o.y,u.x1=a.x,u.y1=a.y,u}function CC(t){return!isNaN(t)&&!isFinite(t)}function LC(t,e,i){var n=1-t;return CC(e[n])&&CC(i[n])}function kC(t,e){var i=e.coord[0],n=e.coord[1];return!("cartesian2d"!==t.type||!i||!n||!LC(1,i,n)&&!LC(0,i,n))||(yC(t,{coord:i,x:e.x0,y:e.y0})||yC(t,{coord:n,x:e.x1,y:e.y1}))}function PC(t,e,i,n,o){var a,r=n.coordinateSystem,s=t.getItemModel(e),l=Rl(s.get(i[0]),o.getWidth()),u=Rl(s.get(i[1]),o.getHeight());if(isNaN(l)||isNaN(u)){if(n.getMarkerPosition)a=n.getMarkerPosition(t.getValues(i,e));else{var h=[f=t.get(i[0],e),p=t.get(i[1],e)];r.clampData&&r.clampData(h,h),a=r.dataToPoint(h,!0)}if("cartesian2d"===r.type){var c=r.getAxis("x"),d=r.getAxis("y"),f=t.get(i[0],e),p=t.get(i[1],e);CC(f)?a[0]=c.toGlobalCoord(c.getExtent()["x0"===i[0]?0:1]):CC(p)&&(a[1]=d.toGlobalCoord(d.getExtent()["y0"===i[1]?0:1]))}isNaN(l)||(a[0]=l),isNaN(u)||(a[1]=u)}else a=[l,u];return a}var NC=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]];wC.extend({type:"markArea",updateTransform:function(t,e,o){e.eachSeries(function(i){var t=i.markAreaModel;if(t){var n=t.getData();n.each(function(e){var t=O(NC,function(t){return PC(n,e,t,i,o)});n.setItemLayout(e,t),n.getItemGraphicEl(e).setShape("points",t)})}},this)},renderSeries:function(i,r,t,n){var e=i.coordinateSystem,o=i.id,a=i.getData(),s=this.markerGroupMap,l=s.get(o)||s.set(o,{group:new Ci});this.group.add(l.group),l.__keep=!0;var u=function(t,i,e){var n,o;o=t?(n=O(t&&t.dimensions,function(t){var e=i.getData();return D({name:t},e.getDimensionInfo(e.mapDimension(t))||{})}),new Yf(O(["x0","y0","x1","y1"],function(t,e){return{name:t,type:n[e%2].type}}),e)):new Yf(n=[{name:"value",type:"float"}],e);var a=O(e.get("data"),T(DC,i,t,e));t&&(a=M(a,T(kC,t)));var r=t?function(t,e,i,n){return t.coord[Math.floor(n/2)][n%2]}:function(t){return t.value};return o.initData(a,null,r),o.hasItemOption=!0,o}(e,i,r);r.setData(u),u.each(function(e){u.setItemLayout(e,O(NC,function(t){return PC(u,e,t,i,n)})),u.setItemVisual(e,{color:a.getVisual("color")})}),u.diff(l.__data).add(function(t){var e=new Qr({shape:{points:u.getItemLayout(t)}});u.setItemGraphicEl(t,e),l.group.add(e)}).update(function(t,e){var i=l.__data.getItemGraphicEl(e);cl(i,{shape:{points:u.getItemLayout(t)}},r,t),l.group.add(i),u.setItemGraphicEl(t,i)}).remove(function(t){var e=l.__data.getItemGraphicEl(t);l.group.remove(e)}).execute(),u.eachItemGraphicEl(function(t,e){var i=u.getItemModel(e),n=i.getModel("label"),o=i.getModel("emphasis.label"),a=u.getItemVisual(e,"color");t.useStyle(D(i.getModel("itemStyle").getItemStyle(),{fill:Ke(a,.4),stroke:a})),t.hoverStyle=i.getModel("emphasis.itemStyle").getItemStyle(),el(t.style,t.hoverStyle,n,o,{labelFetcher:r,labelDataIndex:e,defaultText:u.getName(e)||"",isRectText:!0,autoColor:a}),$s(t,{}),t.dataModel=r}),l.__data=u,l.group.silent=r.get("silent")||i.get("silent")}}),yf(function(t){t.markArea=t.markArea||{}});var OC=Oc.legend.selector,EC={all:{type:"all",title:k(OC.all)},inverse:{type:"inverse",title:k(OC.inverse)}},RC=Tf({type:"legend.plain",dependencies:["series"],layoutMode:{type:"box",ignoreSize:!0},init:function(t,e,i){this.mergeDefaultAndTheme(t,i),t.selected=t.selected||{},this._updateSelector(t)},mergeOption:function(t){RC.superCall(this,"mergeOption",t),this._updateSelector(t)},_updateSelector:function(t){var i=t.selector;!0===i&&(i=t.selector=["all","inverse"]),L(i)&&E(i,function(t,e){R(t)&&(t={type:t}),i[e]=m(t,EC[t.type])})},optionUpdated:function(){this._updateData(this.ecModel);var t=this._data;if(t[0]&&"single"===this.get("selectedMode")){for(var e=!1,i=0;i<t.length;i++){var n=t[i].get("name");if(this.isSelected(n)){this.select(n),e=!0;break}}e||this.select(t[0].get("name"))}},_updateData:function(o){var a=[],r=[];o.eachRawSeries(function(t){var e,i=t.name;if(r.push(i),t.legendVisualProvider){var n=t.legendVisualProvider.getAllNames();o.isSeriesFiltered(t)||(r=r.concat(n)),n.length?a=a.concat(n):e=!0}else e=!0;e&&Uo(t)&&a.push(t.name)}),this._availableNames=r;var t=O(this.get("data")||a,function(t){return"string"!=typeof t&&"number"!=typeof t||(t={name:t}),new Cl(t,this,this.ecModel)},this);this._data=t},getData:function(){return this._data},select:function(t){var e=this.option.selected;"single"===this.get("selectedMode")&&E(this._data,function(t){e[t.get("name")]=!1});e[t]=!0},unSelect:function(t){"single"!==this.get("selectedMode")&&(this.option.selected[t]=!1)},toggleSelected:function(t){var e=this.option.selected;e.hasOwnProperty(t)||(e[t]=!0),this[e[t]?"unSelect":"select"](t)},allSelect:function(){var t=this._data,e=this.option.selected;E(t,function(t){e[t.get("name",!0)]=!0})},inverseSelect:function(){var t=this._data,i=this.option.selected;E(t,function(t){var e=t.get("name",!0);i.hasOwnProperty(e)||(i[e]=!0),i[e]=!i[e]})},isSelected:function(t){var e=this.option.selected;return!(e.hasOwnProperty(t)&&!e[t])&&0<=_(this._availableNames,t)},getOrient:function(){return"vertical"===this.get("orient")?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},defaultOption:{zlevel:0,z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",itemStyle:{borderWidth:0},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:" sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}}});function zC(t,e,i){var o,a={},r="toggleSelected"===t;return i.eachComponent("legend",function(n){r&&null!=o?n[o?"select":"unSelect"](e.name):"allSelect"===t||"inverseSelect"===t?n[t]():(n[t](e.name),o=n.isSelected(e.name)),E(n.getData(),function(t){var e=t.get("name");if("\n"!==e&&""!==e){var i=n.isSelected(e);a.hasOwnProperty(e)?a[e]=a[e]&&i:a[e]=i}})}),"allSelect"===t||"inverseSelect"===t?{selected:a}:{name:e.name,selected:a}}_f("legendToggleSelect","legendselectchanged",T(zC,"toggleSelected")),_f("legendAllSelect","legendselectall",T(zC,"allSelect")),_f("legendInverseSelect","legendinverseselect",T(zC,"inverseSelect")),_f("legendSelect","legendselected",T(zC,"select")),_f("legendUnSelect","legendunselected",T(zC,"unSelect"));var BC=T,VC=E,GC=Ci,FC=Af({type:"legend.plain",newlineDisabled:!1,init:function(){this.group.add(this._contentGroup=new GC),this._backgroundEl,this.group.add(this._selectorGroup=new GC),this._isFirstRender=!0},getContentGroup:function(){return this._contentGroup},getSelectorGroup:function(){return this._selectorGroup},render:function(t,e,i){var n=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),t.get("show",!0)){var o=t.get("align"),a=t.get("orient");o&&"auto"!==o||(o="right"===t.get("left")&&"vertical"===a?"right":"left");var r=t.get("selector",!0),s=t.get("selectorPosition",!0);!r||s&&"auto"!==s||(s="horizontal"===a?"end":"start"),this.renderInner(o,t,e,i,r,a,s);var l=t.getBoxLayoutParams(),u={width:i.getWidth(),height:i.getHeight()},h=t.get("padding"),c=bu(l,u,h),d=this.layoutInner(t,o,c,n,r,s),f=bu(D({width:d.width,height:d.height},l),u,h);this.group.attr("position",[f.x-d.x,f.y-d.y]),this.group.add(this._backgroundEl=rA(d,t))}},resetInner:function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},renderInner:function(u,h,c,d,t,e,i){var f=this.getContentGroup(),p=Q(),g=h.get("selectedMode"),m=[];c.eachRawSeries(function(t){t.get("legendHoverLink")||m.push(t.id)}),VC(h.getData(),function(a,r){var s=a.get("name");if(this.newlineDisabled||""!==s&&"\n"!==s){var t=c.getSeriesByName(s)[0];if(!p.get(s))if(t){var e=t.getData(),i=e.getVisual("color"),n=e.getVisual("borderColor");"function"==typeof i&&(i=i(t.getDataParams(0))),"function"==typeof n&&(n=n(t.getDataParams(0)));var o=e.getVisual("legendSymbol")||"roundRect",l=e.getVisual("symbol");this._createItem(s,r,a,h,o,l,u,i,n,g).on("click",BC(HC,s,null,d,m)).on("mouseover",BC(ZC,t.name,null,d,m)).on("mouseout",BC(UC,t.name,null,d,m)),p.set(s,!0)}else c.eachRawSeries(function(t){if(!p.get(s)&&t.legendVisualProvider){var e=t.legendVisualProvider;if(!e.containName(s))return;var i=e.indexOfName(s),n=e.getItemVisual(i,"color"),o=e.getItemVisual(i,"borderColor");this._createItem(s,r,a,h,"roundRect",null,u,n,o,g).on("click",BC(HC,null,s,d,m)).on("mouseover",BC(ZC,null,s,d,m)).on("mouseout",BC(UC,null,s,d,m)),p.set(s,!0)}},this)}else f.add(new GC({newline:!0}))},this),t&&this._createSelector(t,h,d,e,i)},_createSelector:function(t,a,r,e,i){var s=this.getSelectorGroup();VC(t,function(t){!function(t){var e=t.type,i=new Ur({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){r.dispatchAction({type:"all"===e?"legendAllSelect":"legendInverseSelect"})}});s.add(i);var n=a.getModel("selectorLabel"),o=a.getModel("emphasis.selectorLabel");el(i.style,i.hoverStyle={},n,o,{defaultText:t.title,isRectText:!1}),$s(i)}(t)})},_createItem:function(t,e,i,n,o,a,r,s,l,u){var h=n.get("itemWidth"),c=n.get("itemHeight"),d=n.get("inactiveColor"),f=n.get("inactiveBorderColor"),p=n.get("symbolKeepAspect"),g=n.getModel("itemStyle"),m=n.isSelected(t),v=new GC,y=i.getModel("textStyle"),x=i.get("icon"),_=i.getModel("tooltip"),w=_.parentModel,b=wg(o=x||o,0,0,h,c,m?s:d,null==p||p);if(v.add(WC(b,o,g,l,f,m)),!x&&a&&(a!==o||"none"===a)){var S=.8*c;"none"===a&&(a="circle");var M=wg(a,(h-S)/2,(c-S)/2,S,S,m?s:d,null==p||p);v.add(WC(M,a,g,l,f,m))}var I="left"===r?h+5:-5,T=r,A=n.get("formatter"),D=t;"string"==typeof A&&A?D=A.replace("{name}",null!=t?t:""):"function"==typeof A&&(D=A(t)),v.add(new Ur({style:nl({},y,{text:D,x:I,y:c/2,textFill:m?y.getTextColor():d,textAlign:T,textVerticalAlign:"middle"})}));var C=new rs({shape:v.getBoundingRect(),invisible:!0,tooltip:_.get("show")?P({content:t,formatter:w.get("formatter",!0)||function(){return t},formatterParams:{componentType:"legend",legendIndex:n.componentIndex,name:t,$vars:["name"]}},_.option):null});return v.add(C),v.eachChild(function(t){t.silent=!0}),C.silent=!u,this.getContentGroup().add(v),$s(v),v.__legendDataIndex=e,v},layoutInner:function(t,e,i,n,o,a){var r=this.getContentGroup(),s=this.getSelectorGroup();wu(t.get("orient"),r,t.get("itemGap"),i.width,i.height);var l=r.getBoundingRect(),u=[-l.x,-l.y];if(o){wu("horizontal",s,t.get("selectorItemGap",!0));var h=s.getBoundingRect(),c=[-h.x,-h.y],d=t.get("selectorButtonGap",!0),f=t.getOrient().index,p=0===f?"width":"height",g=0===f?"height":"width",m=0===f?"y":"x";"end"===a?c[f]+=l[p]+d:u[f]+=h[p]+d,c[1-f]+=l[g]/2-h[g]/2,s.attr("position",c),r.attr("position",u);var v={x:0,y:0};return v[p]=l[p]+d+h[p],v[g]=Math.max(l[g],h[g]),v[m]=Math.min(0,h[m]+c[1-f]),v}return r.attr("position",u),this.group.getBoundingRect()},remove:function(){this.getContentGroup().removeAll(),this._isFirstRender=!0}});function WC(t,e,i,n,o,a){var r;return"line"!==e&&e.indexOf("empty")<0?(r=i.getItemStyle(),t.style.stroke=n,a||(r.stroke=o)):r=i.getItemStyle(["borderWidth","borderColor"]),t.setStyle(r)}function HC(t,e,i,n){UC(t,e,i,n),i.dispatchAction({type:"legendToggleSelect",name:null!=t?t:e}),ZC(t,e,i,n)}function ZC(t,e,i,n){var o=i.getZr().storage.getDisplayList()[0];o&&o.useHoverLayer||i.dispatchAction({type:"highlight",seriesName:t,name:e,excludeSeriesId:n})}function UC(t,e,i,n){var o=i.getZr().storage.getDisplayList()[0];o&&o.useHoverLayer||i.dispatchAction({type:"downplay",seriesName:t,name:e,excludeSeriesId:n})}xf(Ld.PROCESSOR.SERIES_FILTER,function(t){var i=t.findComponents({mainType:"legend"});i&&i.length&&t.filterSeries(function(t){for(var e=0;e<i.length;e++)if(!i[e].isSelected(t.name))return!1;return!0})}),ku.registerSubTypeDefaulter("legend",function(){return"plain"});var XC=RC.extend({type:"legend.scroll",setScrollDataIndex:function(t){this.option.scrollDataIndex=t},defaultOption:{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:"end",pageFormatter:"{current}/{total}",pageIcons:{horizontal:["M0,0L12,-10L12,10z","M0,0L-12,-10L-12,10z"],vertical:["M0,0L20,0L10,-20z","M0,0L20,0L10,20z"]},pageIconColor:"#2f4554",pageIconInactiveColor:"#aaa",pageIconSize:15,pageTextStyle:{color:"#333"},animationDurationUpdate:800},init:function(t,e,i,n){var o=Iu(t);XC.superCall(this,"init",t,e,i,n),YC(this,t,o)},mergeOption:function(t,e){XC.superCall(this,"mergeOption",t,e),YC(this,this.option,t)}});function YC(t,e,i){var n=[1,1];n[t.getOrient().index]=0,Mu(e,i,{type:"box",ignoreSize:n})}var jC=Ci,qC=["width","height"],KC=["x","y"],$C=FC.extend({type:"legend.scroll",newlineDisabled:!0,init:function(){$C.superCall(this,"init"),this._currentIndex=0,this.group.add(this._containerGroup=new jC),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new jC),this._showController},resetInner:function(){$C.superCall(this,"resetInner"),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},renderInner:function(t,o,e,a,i,n,r){var s=this;$C.superCall(this,"renderInner",t,o,e,a,i,n,r);var l=this._controllerGroup,u=o.get("pageIconSize",!0);L(u)||(u=[u,u]),c("pagePrev",0);var h=o.getModel("pageTextStyle");function c(t,e){var i=t+"DataIndex",n=yl(o.get("pageIcons",!0)[o.getOrient().name][e],{onclick:A(s._pageGo,s,i,o,a)},{x:-u[0]/2,y:-u[1]/2,width:u[0],height:u[1]});n.name=t,l.add(n)}l.add(new Ur({name:"pageText",style:{textFill:h.getTextColor(),font:h.getFont(),textVerticalAlign:"middle",textAlign:"center"},silent:!0})),c("pageNext",1)},layoutInner:function(t,e,i,n,o,a){var r=this.getSelectorGroup(),s=t.getOrient().index,l=qC[s],u=KC[s],h=qC[1-s],c=KC[1-s];o&&wu("horizontal",r,t.get("selectorItemGap",!0));var d=t.get("selectorButtonGap",!0),f=r.getBoundingRect(),p=[-f.x,-f.y],g=k(i);o&&(g[l]=i[l]-f[l]-d);var m=this._layoutContentAndController(t,n,g,s,l,h,c);if(o){if("end"===a)p[s]+=m[l]+d;else{var v=f[l]+d;p[s]-=v,m[u]-=v}m[l]+=f[l]+d,p[1-s]+=m[c]+m[h]/2-f[h]/2,m[h]=Math.max(m[h],f[h]),m[c]=Math.min(m[c],f[c]+p[1-s]),r.attr("position",p)}return m},_layoutContentAndController:function(t,e,i,n,o,a,r){var s=this.getContentGroup(),l=this._containerGroup,u=this._controllerGroup;wu(t.get("orient"),s,t.get("itemGap"),n?i.width:null,n?null:i.height),wu("horizontal",u,t.get("pageButtonItemGap",!0));var h=s.getBoundingRect(),c=u.getBoundingRect(),d=this._showController=h[o]>i[o],f=[-h.x,-h.y];e||(f[n]=s.position[n]);var p=[0,0],g=[-c.x,-c.y],m=H(t.get("pageButtonGap",!0),t.get("itemGap",!0));d&&("end"===t.get("pageButtonPosition",!0)?g[n]+=i[o]-c[o]:p[n]+=c[o]+m);g[1-n]+=h[a]/2-c[a]/2,s.attr("position",f),l.attr("position",p),u.attr("position",g);var v={x:0,y:0};if(v[o]=d?i[o]:h[o],v[a]=Math.max(h[a],c[a]),v[r]=Math.min(0,c[r]+g[1-n]),l.__rectSize=i[o],d){var y={x:0,y:0};y[o]=Math.max(i[o]-c[o]-m,0),y[a]=v[a],l.setClipPath(new rs({shape:y})),l.__rectSize=y[o]}else u.eachChild(function(t){t.attr({invisible:!0,silent:!0})});var x=this._getPageInfo(t);return null!=x.pageIndex&&cl(s,{position:x.contentPosition},d&&t),this._updatePageInfoView(t,x),v},_pageGo:function(t,e,i){var n=this._getPageInfo(e)[t];null!=n&&i.dispatchAction({type:"legendScroll",scrollDataIndex:n,legendId:e.id})},_updatePageInfoView:function(n,o){var a=this._controllerGroup;E(["pagePrev","pageNext"],function(t){var e=null!=o[t+"DataIndex"],i=a.childOfName(t);i&&(i.setStyle("fill",e?n.get("pageIconColor",!0):n.get("pageIconInactiveColor",!0)),i.cursor=e?"pointer":"default")});var t=a.childOfName("pageText"),e=n.get("pageFormatter"),i=o.pageIndex,r=null!=i?i+1:0,s=o.pageCount;t&&e&&t.setStyle("text",R(e)?e.replace("{current}",r).replace("{total}",s):e({current:r,total:s}))},_getPageInfo:function(t){var e=t.get("scrollDataIndex",!0),i=this.getContentGroup(),n=this._containerGroup.__rectSize,o=t.getOrient().index,a=qC[o],r=KC[o],s=this._findTargetItemIndex(e),l=i.children(),u=l[s],h=l.length,c=h?1:0,d={contentPosition:i.position.slice(),pageCount:c,pageIndex:c-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!u)return d;var f=y(u);d.contentPosition[o]=-f.s;for(var p=s+1,g=f,m=f,v=null;p<=h;++p)(!(v=y(l[p]))&&m.e>g.s+n||v&&!x(v,g.s))&&(g=m.i>g.i?m:v)&&(null==d.pageNextDataIndex&&(d.pageNextDataIndex=g.i),++d.pageCount),m=v;for(p=s-1,g=f,m=f,v=null;-1<=p;--p)(v=y(l[p]))&&x(m,v.s)||!(g.i<m.i)||(m=g,null==d.pagePrevDataIndex&&(d.pagePrevDataIndex=g.i),++d.pageCount,++d.pageIndex),g=v;return d;function y(t){if(t){var e=t.getBoundingRect(),i=e[r]+t.position[o];return{s:i,e:i+e[a],i:t.__legendDataIndex}}}function x(t,e){return t.e>=e&&t.s<=e+n}},_findTargetItemIndex:function(n){return this._showController?(this.getContentGroup().eachChild(function(t,e){var i=t.__legendDataIndex;null==a&&null!=i&&(a=e),i===n&&(o=e)}),null!=o?o:a):0;var o,a}});_f("legendScroll","legendscroll",function(t,e){var i=t.scrollDataIndex;null!=i&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},function(t){t.setScrollDataIndex(i)})});iD.extend({type:"dataZoom.slider",layoutMode:"box",defaultOption:{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#2f4554",width:.5,opacity:.3},areaStyle:{color:"rgba(47,69,84,0.3)",opacity:.3}},borderColor:"#ddd",fillerColor:"rgba(167,183,204,0.4)",handleIcon:"M8.2,13.6V3.9H6.3v9.7H3.1v14.9h3.3v9.7h1.8v-9.7h3.3V13.6H8.2z M9.7,24.4H4.8v-1.4h4.9V24.4z M9.7,19.1H4.8v-1.4h4.9V19.1z",handleSize:"100%",handleStyle:{color:"#a7b7cc"},labelPrecision:null,labelFormatter:null,showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#333"}}});var JC=rs,QC=El,tL=Bl,eL=A,iL=E,nL="horizontal",oL="vertical",aL=["line","bar","candlestick","scatter"],rL=aD.extend({type:"dataZoom.slider",init:function(t,e){this._displayables={},this._orient,this._range,this._handleEnds,this._size,this._handleWidth,this._handleHeight,this._location,this._dragging,this._dataShadowInfo,this.api=e},render:function(t,e,i,n){rL.superApply(this,"render",arguments),kc(this,"_dispatchZoomAction",this.dataZoomModel.get("throttle"),"fixRate"),this._orient=t.get("orient"),!1!==this.dataZoomModel.get("show")?(n&&"dataZoom"===n.type&&n.from===this.uid||this._buildView(),this._updateView()):this.group.removeAll()},remove:function(){rL.superApply(this,"remove",arguments),Pc(this,"_dispatchZoomAction")},dispose:function(){rL.superApply(this,"dispose",arguments),Pc(this,"_dispatchZoomAction")},_buildView:function(){var t=this.group;t.removeAll(),this._resetLocation(),this._resetInterval();var e=this._displayables.barGroup=new Ci;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(e),this._positionGroup()},_resetLocation:function(){var t=this.dataZoomModel,e=this.api,i=this._findCoordRect(),n={width:e.getWidth(),height:e.getHeight()},o=this._orient===nL?{right:n.width-i.x-i.width,top:n.height-30-7,width:i.width,height:30}:{right:7,top:i.y,width:30,height:i.height},a=Iu(t.option);E(["right","top","width","height"],function(t){"ph"===a[t]&&(a[t]=o[t])});var r=bu(a,n,t.padding);this._location={x:r.x,y:r.y},this._size=[r.width,r.height],this._orient===oL&&this._size.reverse()},_positionGroup:function(){var t=this.group,e=this._location,i=this._orient,n=this.dataZoomModel.getFirstTargetAxisModel(),o=n&&n.get("inverse"),a=this._displayables.barGroup,r=(this._dataShadowInfo||{}).otherAxisInverse;a.attr(i!==nL||o?i===nL&&o?{scale:r?[-1,1]:[-1,-1]}:i!==oL||o?{scale:r?[-1,-1]:[-1,1],rotation:Math.PI/2}:{scale:r?[1,-1]:[1,1],rotation:Math.PI/2}:{scale:r?[1,1]:[1,-1]});var s=t.getBoundingRect([a]);t.attr("position",[e.x-s.x,e.y-s.y])},_getViewExtent:function(){return[0,this._size[0]]},_renderBackground:function(){var t=this.dataZoomModel,e=this._size,i=this._displayables.barGroup;i.add(new JC({silent:!0,shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:t.get("backgroundColor")},z2:-40})),i.add(new JC({shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:"transparent"},z2:0,onclick:A(this._onClickPanelClick,this)}))},_renderDataShadow:function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(t){var e=this._size,i=t.series,n=i.getRawData(),o=i.getShadowDim?i.getShadowDim():t.otherDim;if(null!=o){var a=n.getDataExtent(o),r=.3*(a[1]-a[0]);a=[a[0]-r,a[1]+r];var s,l=[0,e[1]],u=[0,e[0]],h=[[e[0],0],[0,0]],c=[],d=u[1]/(n.count()-1),f=0,p=Math.round(n.count()/e[0]);n.each([o],function(t,e){if(0<p&&e%p)f+=d;else{var i=null==t||isNaN(t)||""===t,n=i?0:QC(t,a,l,!0);i&&!s&&e?(h.push([h[h.length-1][0],0]),c.push([c[c.length-1][0],0])):!i&&s&&(h.push([f,0]),c.push([f,0])),h.push([f,n]),c.push([f,n]),f+=d,s=i}});var g=this.dataZoomModel;this._displayables.barGroup.add(new Qr({shape:{points:h},style:D({fill:g.get("dataBackgroundColor")},g.getModel("dataBackground.areaStyle").getAreaStyle()),silent:!0,z2:-20})),this._displayables.barGroup.add(new ts({shape:{points:c},style:g.getModel("dataBackground.lineStyle").getLineStyle(),silent:!0,z2:-19}))}}},_prepareDataShadowInfo:function(){var t=this.dataZoomModel,s=t.get("showDataShadow");if(!1!==s){var l,u=this.ecModel;return t.eachTargetAxis(function(a,r){E(t.getAxisProxy(a.name,r).getTargetSeriesModels(),function(t){if(!(l||!0!==s&&_(aL,t.get("type"))<0)){var e,i=u.getComponent(a.axis,r).axis,n=function(t){return{x:"y",y:"x",radius:"angle",angle:"radius"}[t]}(a.name),o=t.coordinateSystem;null!=n&&o.getOtherAxis&&(e=o.getOtherAxis(i).inverse),n=t.getData().mapDimension(n),l={thisAxis:i,series:t,thisDim:a.name,otherDim:n,otherAxisInverse:e}}},this)},this),l}},_renderHandle:function(){var t=this._displayables,a=t.handles=[],r=t.handleLabels=[],s=this._displayables.barGroup,e=this._size,l=this.dataZoomModel;s.add(t.filler=new JC({draggable:!0,cursor:sL(this._orient),drift:eL(this._onDragMove,this,"all"),ondragstart:eL(this._showDataInfo,this,!0),ondragend:eL(this._onDragEnd,this),onmouseover:eL(this._showDataInfo,this,!0),onmouseout:eL(this._showDataInfo,this,!1),style:{fill:l.get("fillerColor"),textPosition:"inside"}})),s.add(new JC({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:e[0],height:e[1]},style:{stroke:l.get("dataBackgroundColor")||l.get("borderColor"),lineWidth:1,fill:"rgba(0,0,0,0)"}})),iL([0,1],function(t){var e=yl(l.get("handleIcon"),{cursor:sL(this._orient),draggable:!0,drift:eL(this._onDragMove,this,t),ondragend:eL(this._onDragEnd,this),onmouseover:eL(this._showDataInfo,this,!0),onmouseout:eL(this._showDataInfo,this,!1)},{x:-1,y:0,width:2,height:2}),i=e.getBoundingRect();this._handleHeight=Rl(l.get("handleSize"),this._size[1]),this._handleWidth=i.width/i.height*this._handleHeight,e.setStyle(l.getModel("handleStyle").getItemStyle());var n=l.get("handleColor");null!=n&&(e.style.fill=n),s.add(a[t]=e);var o=l.textStyleModel;this.group.add(r[t]=new Ur({silent:!0,invisible:!0,style:{x:0,y:0,text:"",textVerticalAlign:"middle",textAlign:"center",textFill:o.getTextColor(),textFont:o.getFont()},z2:10}))},this)},_resetInterval:function(){var t=this._range=this.dataZoomModel.getPercentRange(),e=this._getViewExtent();this._handleEnds=[QC(t[0],[0,100],e,!0),QC(t[1],[0,100],e,!0)]},_updateInterval:function(t,e){var i=this.dataZoomModel,n=this._handleEnds,o=this._getViewExtent(),a=i.findRepresentativeAxisProxy().getMinMaxSpan(),r=[0,100];Jw(e,n,o,i.get("zoomLock")?"all":t,null!=a.minSpan?QC(a.minSpan,r,o,!0):null,null!=a.maxSpan?QC(a.maxSpan,r,o,!0):null);var s=this._range,l=this._range=tL([QC(n[0],o,r,!0),QC(n[1],o,r,!0)]);return!s||s[0]!==l[0]||s[1]!==l[1]},_updateView:function(t){var n=this._displayables,o=this._handleEnds,e=tL(o.slice()),a=this._size;iL([0,1],function(t){var e=n.handles[t],i=this._handleHeight;e.attr({scale:[i/2,i/2],position:[o[t],a[1]/2-i/2]})},this),n.filler.setShape({x:e[0],y:0,width:e[1]-e[0],height:a[1]}),this._updateDataInfo(t)},_updateDataInfo:function(t){var e=this.dataZoomModel,a=this._displayables,r=a.handleLabels,s=this._orient,l=["",""];if(e.get("showDetail")){var i=e.findRepresentativeAxisProxy();if(i){var n=i.getAxisModel().axis,o=this._range,u=t?i.calculateDataWindow({start:o[0],end:o[1]}).valueWindow:i.getDataValueWindow();l=[this._formatLabel(u[0],n),this._formatLabel(u[1],n)]}}var h=tL(this._handleEnds.slice());function c(t){var e=fl(a.handles[t].parent,this.group),i=gl(0===t?"right":"left",e),n=this._handleWidth/2+5,o=pl([h[t]+(0===t?-n:n),this._size[1]/2],e);r[t].setStyle({x:o[0],y:o[1],textVerticalAlign:s===nL?"middle":i,textAlign:s===nL?i:"center",text:l[t]})}c.call(this,0),c.call(this,1)},_formatLabel:function(t,e){var i=this.dataZoomModel,n=i.get("labelFormatter"),o=i.get("labelPrecision");null!=o&&"auto"!==o||(o=e.getPixelPrecision());var a=null==t||isNaN(t)?"":"category"===e.type||"time"===e.type?e.scale.getLabel(Math.round(t)):t.toFixed(Math.min(o,20));return C(n)?n(t,a):R(n)?n.replace("{value}",a):a},_showDataInfo:function(t){t=this._dragging||t;var e=this._displayables.handleLabels;e[0].attr("invisible",!t),e[1].attr("invisible",!t)},_onDragMove:function(t,e,i,n){this._dragging=!0,Xt(n.event);var o=pl([e,i],this._displayables.barGroup.getLocalTransform(),!0),a=this._updateInterval(t,o[0]),r=this.dataZoomModel.get("realtime");this._updateView(!r),a&&r&&this._dispatchZoomAction()},_onDragEnd:function(){this._dragging=!1,this._showDataInfo(!1),this.dataZoomModel.get("realtime")||this._dispatchZoomAction()},_onClickPanelClick:function(t){var e=this._size,i=this._displayables.barGroup.transformCoordToLocal(t.offsetX,t.offsetY);if(!(i[0]<0||i[0]>e[0]||i[1]<0||i[1]>e[1])){var n=this._handleEnds,o=(n[0]+n[1])/2,a=this._updateInterval("all",i[0]-o);this._updateView(),a&&this._dispatchZoomAction()}},_dispatchZoomAction:function(){var t=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,start:t[0],end:t[1]})},_findCoordRect:function(){var i;if(iL(this.getTargetCoordInfo(),function(t){if(!i&&t.length){var e=t[0].model.coordinateSystem;i=e.getRect&&e.getRect()}}),!i){var t=this.api.getWidth(),e=this.api.getHeight();i={x:.2*t,y:.2*e,width:.6*t,height:.6*e}}return i}});function sL(t){return"vertical"===t?"ns-resize":"ew-resize"}iD.extend({type:"dataZoom.inside",defaultOption:{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}});var lL="\0_ec_dataZoom_roams";function uL(t,n){var e=cL(t),o=n.dataZoomId,a=n.coordId;E(e,function(t,e){var i=t.dataZoomInfos;i[o]&&_(n.allCoordIds,a)<0&&(delete i[o],t.count--)}),dL(e);var i=e[a];i||((i=e[a]={coordId:a,dataZoomInfos:{},count:0}).controller=function(t,r){var e=new Vy(t.getZr());return E(["pan","zoom","scrollMove"],function(a){e.on(a,function(n){var o=[];E(r.dataZoomInfos,function(t){if(n.isAvailableBehavior(t.dataZoomModel.option)){var e=(t.getRange||{})[a],i=e&&e(r.controller,n);!t.dataZoomModel.get("disabled",!0)&&i&&o.push({dataZoomId:t.dataZoomId,start:i[0],end:i[1]})}}),o.length&&r.dispatchAction(o)})}),e}(t,i),i.dispatchAction=T(fL,t)),i.dataZoomInfos[o]||i.count++,i.dataZoomInfos[o]=n;var r=function(t){var n,o={type_true:2,type_move:1,type_false:0,type_undefined:-1},a=!0;return E(t,function(t){var e=t.dataZoomModel,i=!e.get("disabled",!0)&&(!e.get("zoomLock",!0)||"move");o["type_"+n]<o["type_"+i]&&(n=i),a&=e.get("preventDefaultMouseMove",!0)}),{controlType:n,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!a}}}(i.dataZoomInfos);i.controller.enable(r.controlType,r.opt),i.controller.setPointerChecker(n.containsPoint),kc(i,"dispatchAction",n.dataZoomModel.get("throttle",!0),"fixRate")}function hL(t){return t.type+"\0_"+t.id}function cL(t){var e=t.getZr();return e[lL]||(e[lL]={})}function dL(i){E(i,function(t,e){t.count||(t.controller.dispose(),delete i[e])})}function fL(t,e){t.dispatchAction({type:"dataZoom",batch:e})}var pL=A,gL=aD.extend({type:"dataZoom.inside",init:function(t,e){this._range},render:function(r,t,s,e){gL.superApply(this,"render",arguments),this._range=r.getPercentRange(),E(this.getTargetCoordInfo(),function(t,o){var a=O(t,function(t){return hL(t.model)});E(t,function(e){var n=e.model,i={};E(["pan","zoom","scrollMove"],function(t){i[t]=pL(mL[t],this,e,o)},this),uL(s,{coordId:hL(n),allCoordIds:a,containsPoint:function(t,e,i){return n.coordinateSystem.containPoint([e,i])},dataZoomId:r.id,dataZoomModel:r,getRange:i})},this)},this)},dispose:function(){!function(t,i){var e=cL(t);E(e,function(t){t.controller.dispose();var e=t.dataZoomInfos;e[i]&&(delete e[i],t.count--)}),dL(e)}(this.api,this.dataZoomModel.id),gL.superApply(this,"dispose",arguments),this._range=null}}),mL={zoom:function(t,e,i,n){var o=this._range,a=o.slice(),r=t.axisModels[0];if(r){var s=xL[e](null,[n.originX,n.originY],r,i,t),l=(0<s.signal?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(a[1]-a[0])+a[0],u=Math.max(1/n.scale,0);a[0]=(a[0]-l)*u+l,a[1]=(a[1]-l)*u+l;var h=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();return Jw(0,a,[0,100],0,h.minSpan,h.maxSpan),this._range=a,o[0]!==a[0]||o[1]!==a[1]?a:void 0}},pan:vL(function(t,e,i,n,o,a){var r=xL[n]([a.oldX,a.oldY],[a.newX,a.newY],e,o,i);return r.signal*(t[1]-t[0])*r.pixel/r.pixelLength}),scrollMove:vL(function(t,e,i,n,o,a){return xL[n]([0,0],[a.scrollDelta,a.scrollDelta],e,o,i).signal*(t[1]-t[0])*a.scrollDelta})};function vL(l){return function(t,e,i,n){var o=this._range,a=o.slice(),r=t.axisModels[0];if(r){var s=l(a,r,t,e,i,n);return Jw(s,a,[0,100],"all"),this._range=a,o[0]!==a[0]||o[1]!==a[1]?a:void 0}}}function yL(t){var e=t&&t.visualMap;L(e)||(e=e?[e]:[]),_L(e,function(t){if(t){wL(t,"splitList")&&!wL(t,"pieces")&&(t.pieces=t.splitList,delete t.splitList);var e=t.pieces;e&&L(e)&&_L(e,function(t){z(t)&&(wL(t,"start")&&!wL(t,"min")&&(t.min=t.start),wL(t,"end")&&!wL(t,"max")&&(t.max=t.end))})}})}var xL={grid:function(t,e,i,n,o){var a=i.axis,r={},s=o.model.coordinateSystem.getRect();return t=t||[0,0],"x"===a.dim?(r.pixel=e[0]-t[0],r.pixelLength=s.width,r.pixelStart=s.x,r.signal=a.inverse?1:-1):(r.pixel=e[1]-t[1],r.pixelLength=s.height,r.pixelStart=s.y,r.signal=a.inverse?-1:1),r},polar:function(t,e,i,n,o){var a=i.axis,r={},s=o.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return t=t?s.pointToCoord(t):[0,0],e=s.pointToCoord(e),"radiusAxis"===i.mainType?(r.pixel=e[0]-t[0],r.pixelLength=l[1]-l[0],r.pixelStart=l[0],r.signal=a.inverse?1:-1):(r.pixel=e[1]-t[1],r.pixelLength=u[1]-u[0],r.pixelStart=u[0],r.signal=a.inverse?-1:1),r},singleAxis:function(t,e,i,n,o){var a=i.axis,r=o.model.coordinateSystem.getRect(),s={};return t=t||[0,0],"horizontal"===a.orient?(s.pixel=e[0]-t[0],s.pixelLength=r.width,s.pixelStart=r.x,s.signal=a.inverse?1:-1):(s.pixel=e[1]-t[1],s.pixelLength=r.height,s.pixelStart=r.y,s.signal=a.inverse?-1:1),s}},_L=E;function wL(t,e){return t&&t.hasOwnProperty&&t.hasOwnProperty(e)}ku.registerSubTypeDefaulter("visualMap",function(t){return t.categories||(t.pieces?0<t.pieces.length:0<t.splitNumber)&&!t.calculable?"piecewise":"continuous"});var bL=Ld.VISUAL.COMPONENT;function SL(t,e,i,n){for(var o=e.targetVisuals[n],a=g_.prepareVisualTypes(o),r={color:t.getData().getVisual("color")},s=0,l=a.length;s<l;s++){var u=a[s],h=o["opacity"===u?"__alphaForOpacity":u];h&&h.applyVisual(i,c,d)}return r.color;function c(t){return r[t]}function d(t,e){r[t]=e}}Sf(bL,{createOnAllSeries:!0,reset:function(i,t){var n=[];return t.eachComponent("visualMap",function(t){var e=i.pipelineContext;!t.isTargetSeries(i)||e&&e.large||n.push(function(t,f,p,g){var m={};return E(t,function(t){var e=g_.prepareVisualTypes(f[t]);m[t]=e}),{progress:function(t,i){function e(t){return i.getItemVisual(o,t)}function n(t,e){i.setItemVisual(o,t,e)}var o;for(null!=g&&(g=i.getDimension(g));null!=(o=t.next());){var a=i.getRawDataItem(o);if(!a||!1!==a.visualMap)for(var r=null!=g?i.get(g,o,!0):o,s=p(r),l=f[s],u=m[s],h=0,c=u.length;h<c;h++){var d=u[h];l[d]&&l[d].applyVisual(r,e,n)}}}}}(t.stateList,t.targetVisuals,A(t.getValueState,t),t.getDataDimension(i.getData())))}),n}}),Sf(bL,{createOnAllSeries:!0,reset:function(o,t){var a=o.getData(),r=[];t.eachComponent("visualMap",function(t){if(t.isTargetSeries(o)){var e=t.getVisualMeta(A(SL,null,o,t))||{stops:[],outerColors:[]},i=t.getDataDimension(a),n=a.getDimensionInfo(i);null!=n&&(e.dimension=n.index,r.push(e))}}),o.getData().setVisual("visualMeta",r)}});var ML=function(t,e,i){var n=k((IL[t]||{})[e]);return i&&L(n)?n[n.length-1]:n},IL={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}},TL=g_.mapVisual,AL=g_.eachVisual,DL=L,CL=E,LL=Bl,kL=El,PL=Tf({type:"visualMap",dependencies:["series"],stateList:["inRange","outOfRange"],replacableOptionKeys:["inRange","outOfRange","target","controller","color"],dataBound:[-1/0,1/0],layoutMode:{type:"box",ignoreSize:!0},defaultOption:{show:!0,zlevel:0,z:4,seriesIndex:"all",min:0,max:200,dimension:null,inRange:null,outOfRange:null,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,color:null,formatter:null,text:null,textStyle:{color:"#333"}},init:function(t,e,i){this._dataExtent,this.targetVisuals={},this.controllerVisuals={},this.textStyleModel,this.itemSize,this.mergeDefaultAndTheme(t,i)},optionUpdated:function(t,e){var i=this.option;v.canvasSupported||(i.realtime=!1),e||PD(i,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},resetVisual:function(t){var e=this.stateList;t=A(t,this),this.controllerVisuals=kD(this.option.controller,e,t),this.targetVisuals=kD(this.option.target,e,t)},getTargetSeriesIndices:function(){var t=this.option.seriesIndex,i=[];return null==t||"all"===t?this.ecModel.eachSeries(function(t,e){i.push(e)}):i=Vo(t),i},eachTargetSeries:function(e,i){E(this.getTargetSeriesIndices(),function(t){e.call(i,this.ecModel.getSeriesByIndex(t))},this)},isTargetSeries:function(e){var i=!1;return this.eachTargetSeries(function(t){t===e&&(i=!0)}),i},formatValueText:function(t,e,i){var n,o,a=this.option,r=a.precision,s=this.dataBound,l=a.formatter;return i=i||["<",">"],L(t)&&(t=t.slice(),n=!0),o=e?t:n?[u(t[0]),u(t[1])]:u(t),R(l)?l.replace("{value}",n?o[0]:o).replace("{value2}",n?o[1]:o):C(l)?n?l(t[0],t[1]):l(t):n?t[0]===s[0]?i[0]+" "+o[1]:t[1]===s[1]?i[1]+" "+o[0]:o[0]+" - "+o[1]:o;function u(t){return t===s[0]?"min":t===s[1]?"max":(+t).toFixed(Math.min(r,20))}},resetExtent:function(){var t=this.option,e=LL([t.min,t.max]);this._dataExtent=e},getDataDimension:function(t){var e=this.option.dimension,i=t.dimensions;if(null!=e||i.length){if(null!=e)return t.getDimension(e);for(var n=t.dimensions,o=n.length-1;0<=o;o--){var a=n[o];if(!t.getDimensionInfo(a).isCalculationCoord)return a}}},getExtent:function(){return this._dataExtent.slice()},completeVisualOption:function(){var t=this.ecModel,e=this.option,i={inRange:e.inRange,outOfRange:e.outOfRange},n=e.target||(e.target={}),o=e.controller||(e.controller={});m(n,i),m(o,i);var u=this.isCategory();function a(n){DL(e.color)&&!n.inRange&&(n.inRange={color:e.color.slice().reverse()}),n.inRange=n.inRange||{color:t.get("gradientColor")},CL(this.stateList,function(t){var e=n[t];if(R(e)){var i=ML(e,"active",u);i?(n[t]={},n[t][e]=i):delete n[t]}},this)}a.call(this,n),a.call(this,o),function(t,e,i){var n=t[e],o=t[i];n&&!o&&(o=t[i]={},CL(n,function(t,e){if(g_.isValidType(e)){var i=ML(e,"inactive",u);null!=i&&(o[e]=i,"color"!==e||o.hasOwnProperty("opacity")||o.hasOwnProperty("colorAlpha")||(o.opacity=[0,0]))}}))}.call(this,n,"inRange","outOfRange"),function(a){var r=(a.inRange||{}).symbol||(a.outOfRange||{}).symbol,s=(a.inRange||{}).symbolSize||(a.outOfRange||{}).symbolSize,l=this.get("inactiveColor");CL(this.stateList,function(t){var e=this.itemSize,i=a[t];null==(i=i||(a[t]={color:u?l:[l]})).symbol&&(i.symbol=r&&k(r)||(u?"roundRect":["roundRect"])),null==i.symbolSize&&(i.symbolSize=s&&k(s)||(u?e[0]:[e[0],e[0]])),i.symbol=TL(i.symbol,function(t){return"none"===t||"square"===t?"roundRect":t});var n=i.symbolSize;if(null!=n){var o=-1/0;AL(n,function(t){o<t&&(o=t)}),i.symbolSize=TL(n,function(t){return kL(t,[0,o],[0,e[0]],!0)})}},this)}.call(this,o)},resetItemSize:function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},isCategory:function(){return!!this.option.categories},setSelected:et,getValueState:et,getVisualMeta:et}),NL=[20,140],OL=PL.extend({type:"visualMap.continuous",defaultOption:{align:"auto",calculable:!1,range:null,realtime:!0,itemHeight:null,itemWidth:null,hoverLink:!0,hoverLinkDataSize:null,hoverLinkOnHandle:null},optionUpdated:function(t,e){OL.superApply(this,"optionUpdated",arguments),this.resetExtent(),this.resetVisual(function(t){t.mappingMethod="linear",t.dataExtent=this.getExtent()}),this._resetRange()},resetItemSize:function(){OL.superApply(this,"resetItemSize",arguments);var t=this.itemSize;"horizontal"===this._orient&&t.reverse(),null!=t[0]&&!isNaN(t[0])||(t[0]=NL[0]),null!=t[1]&&!isNaN(t[1])||(t[1]=NL[1])},_resetRange:function(){var t=this.getExtent(),e=this.option.range;!e||e.auto?(t.auto=1,this.option.range=t):L(e)&&(e[0]>e[1]&&e.reverse(),e[0]=Math.max(e[0],t[0]),e[1]=Math.min(e[1],t[1]))},completeVisualOption:function(){PL.prototype.completeVisualOption.apply(this,arguments),E(this.stateList,function(t){var e=this.option.controller[t].symbolSize;e&&e[0]!==e[1]&&(e[0]=0)},this)},setSelected:function(t){this.option.range=t.slice(),this._resetRange()},getSelected:function(){var t=this.getExtent(),e=Bl((this.get("range")||[]).slice());return e[0]>t[1]&&(e[0]=t[1]),e[1]>t[1]&&(e[1]=t[1]),e[0]<t[0]&&(e[0]=t[0]),e[1]<t[0]&&(e[1]=t[0]),e},getValueState:function(t){var e=this.option.range,i=this.getExtent();return(e[0]<=i[0]||e[0]<=t)&&(e[1]>=i[1]||t<=e[1])?"inRange":"outOfRange"},findTargetDataIndices:function(n){var o=[];return this.eachTargetSeries(function(t){var i=[],e=t.getData();e.each(this.getDataDimension(e),function(t,e){n[0]<=t&&t<=n[1]&&i.push(e)},this),o.push({seriesId:t.id,dataIndex:i})},this),o},getVisualMeta:function(i){var t=EL(this,"outOfRange",this.getExtent()),e=EL(this,"inRange",this.option.range.slice()),n=[];function o(t,e){n.push({value:t,color:i(t,e)})}for(var a=0,r=0,s=e.length,l=t.length;r<l&&(!e.length||t[r]<=e[0]);r++)t[r]<e[a]&&o(t[r],"outOfRange");for(var u=1;a<s;a++,u=0)u&&n.length&&o(e[a],"outOfRange"),o(e[a],"inRange");for(u=1;r<l;r++)(!e.length||e[e.length-1]<t[r])&&(u&&(n.length&&o(n[n.length-1].value,"outOfRange"),u=0),o(t[r],"outOfRange"));var h=n.length;return{stops:n,outerColors:[h?n[0].color:"transparent",h?n[h-1].color:"transparent"]}}});function EL(t,e,i){if(i[0]===i[1])return i.slice();for(var n=(i[1]-i[0])/200,o=i[0],a=[],r=0;r<=200&&o<i[1];r++)a.push(o),o+=n;return a.push(i[1]),a}var RL=Af({type:"visualMap",autoPositionValues:{left:1,right:1,top:1,bottom:1},init:function(t,e){this.ecModel=t,this.api=e,this.visualMapModel},render:function(t,e,i,n){!1!==(this.visualMapModel=t).get("show")?this.doRender.apply(this,arguments):this.group.removeAll()},renderBackground:function(t){var e=this.visualMapModel,i=iu(e.get("padding")||0),n=t.getBoundingRect();t.add(new rs({z2:-1,silent:!0,shape:{x:n.x-i[3],y:n.y-i[0],width:n.width+i[3]+i[1],height:n.height+i[0]+i[2]},style:{fill:e.get("backgroundColor"),stroke:e.get("borderColor"),lineWidth:e.get("borderWidth")}}))},getControllerVisual:function(i,n,o){var t=(o=o||{}).forceState,e=this.visualMapModel,a={};if("symbol"===n&&(a.symbol=e.get("itemSymbol")),"color"===n){var r=e.get("contentColor");a.color=r}function s(t){return a[t]}function l(t,e){a[t]=e}var u=e.controllerVisuals[t||e.getValueState(i)];return E(g_.prepareVisualTypes(u),function(t){var e=u[t];o.convertOpacityToAlpha&&"opacity"===t&&(t="colorAlpha",e=u.__alphaForOpacity),g_.dependsOn(t,n)&&e&&e.applyVisual(i,s,l)}),a[n]},positionGroup:function(t){var e=this.visualMapModel,i=this.api;Su(t,e.getBoxLayoutParams(),{width:i.getWidth(),height:i.getHeight()})},doRender:et});function zL(t,e,i){var n=t.option,o=n.align;if(null!=o&&"auto"!==o)return o;for(var a={width:e.getWidth(),height:e.getHeight()},r="horizontal"===n.orient?1:0,s=[["left","right","width"],["top","bottom","height"]],l=s[r],u=[0,null,10],h={},c=0;c<3;c++)h[s[1-r][c]]=u[c],h[l[c]]=2===c?i[0]:n[l[c]];var d=[["x","width",3],["y","height",0]][r],f=bu(h,a,n.padding);return l[(f.margin[d[2]]||0)+f[d[0]]+.5*f[d[1]]<.5*a[d[1]]?0:1]}function BL(t,e){return E(t||[],function(t){null!=t.dataIndex&&(t.dataIndexInside=t.dataIndex,t.dataIndex=null),t.highlightKey="visualMap"+(e?e.componentIndex:"")}),t}var VL=El,GL=E,FL=Math.min,WL=Math.max,HL=RL.extend({type:"visualMap.continuous",init:function(){HL.superApply(this,"init",arguments),this._shapes={},this._dataInterval=[],this._handleEnds=[],this._orient,this._useHandle,this._hoverLinkDataIndices=[],this._dragging,this._hovering},doRender:function(t,e,i,n){n&&"selectDataRange"===n.type&&n.from===this.uid||this._buildView()},_buildView:function(){this.group.removeAll();var t=this.visualMapModel,e=this.group;this._orient=t.get("orient"),this._useHandle=t.get("calculable"),this._resetInterval(),this._renderBar(e);var i=t.get("text");this._renderEndsText(e,i,0),this._renderEndsText(e,i,1),this._updateView(!0),this.renderBackground(e),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(e)},_renderEndsText:function(t,e,i){if(e){var n=e[1-i];n=null!=n?n+"":"";var o=this.visualMapModel,a=o.get("textGap"),r=o.itemSize,s=this._shapes.barGroup,l=this._applyTransform([r[0]/2,0===i?-a:r[1]+a],s),u=this._applyTransform(0===i?"bottom":"top",s),h=this._orient,c=this.visualMapModel.textStyleModel;this.group.add(new Ur({style:{x:l[0],y:l[1],textVerticalAlign:"horizontal"===h?"middle":u,textAlign:"horizontal"===h?u:"center",text:n,textFont:c.getFont(),textFill:c.getTextColor()}}))}},_renderBar:function(t){var e=this.visualMapModel,i=this._shapes,n=e.itemSize,o=this._orient,a=this._useHandle,r=zL(e,this.api,n),s=i.barGroup=this._createBarGroup(r);s.add(i.outOfRange=ZL()),s.add(i.inRange=ZL(null,a?XL(this._orient):null,A(this._dragHandle,this,"all",!1),A(this._dragHandle,this,"all",!0)));var l=e.textStyleModel.getTextRect("国"),u=WL(l.width,l.height);a&&(i.handleThumbs=[],i.handleLabels=[],i.handleLabelPoints=[],this._createHandle(s,0,n,u,o,r),this._createHandle(s,1,n,u,o,r)),this._createIndicator(s,n,u,o),t.add(s)},_createHandle:function(t,e,i,n,o){var a=A(this._dragHandle,this,e,!1),r=A(this._dragHandle,this,e,!0),s=ZL(function(t,e){return 0===t?[[0,0],[e,0],[e,-e]]:[[0,0],[e,0],[e,e]]}(e,n),XL(this._orient),a,r);s.position[0]=i[0],t.add(s);var l=this.visualMapModel.textStyleModel,u=new Ur({draggable:!0,drift:a,onmousemove:function(t){Xt(t.event)},ondragend:r,style:{x:0,y:0,text:"",textFont:l.getFont(),textFill:l.getTextColor()}});this.group.add(u);var h=["horizontal"===o?n/2:1.5*n,"horizontal"===o?0===e?-1.5*n:1.5*n:0===e?-n/2:n/2],c=this._shapes;c.handleThumbs[e]=s,c.handleLabelPoints[e]=h,c.handleLabels[e]=u},_createIndicator:function(t,e,i,n){var o=ZL([[0,0]],"move");o.position[0]=e[0],o.attr({invisible:!0,silent:!0}),t.add(o);var a=this.visualMapModel.textStyleModel,r=new Ur({silent:!0,invisible:!0,style:{x:0,y:0,text:"",textFont:a.getFont(),textFill:a.getTextColor()}});this.group.add(r);var s=["horizontal"===n?i/2:9,0],l=this._shapes;l.indicator=o,l.indicatorLabel=r,l.indicatorLabelPoint=s},_dragHandle:function(t,e,i,n){if(this._useHandle){if(this._dragging=!e,!e){var o=this._applyTransform([i,n],this._shapes.barGroup,!0);this._updateInterval(t,o[1]),this._updateView()}e===!this.visualMapModel.get("realtime")&&this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),e?this._hovering||this._clearHoverLinkToSeries():UL(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[t],!1)}},_resetInterval:function(){var t=this.visualMapModel,e=this._dataInterval=t.getSelected(),i=t.getExtent(),n=[0,t.itemSize[1]];this._handleEnds=[VL(e[0],i,n,!0),VL(e[1],i,n,!0)]},_updateInterval:function(t,e){e=e||0;var i=this.visualMapModel,n=this._handleEnds,o=[0,i.itemSize[1]];Jw(e,n,o,t,0);var a=i.getExtent();this._dataInterval=[VL(n[0],o,a,!0),VL(n[1],o,a,!0)]},_updateView:function(t){var e=this.visualMapModel,i=e.getExtent(),n=this._shapes,o=[0,e.itemSize[1]],a=t?o:this._handleEnds,r=this._createBarVisual(this._dataInterval,i,a,"inRange"),s=this._createBarVisual(i,i,o,"outOfRange");n.inRange.setStyle({fill:r.barColor,opacity:r.opacity}).setShape("points",r.barPoints),n.outOfRange.setStyle({fill:s.barColor,opacity:s.opacity}).setShape("points",s.barPoints),this._updateHandle(a,r)},_createBarVisual:function(t,e,i,n){var o={forceState:n,convertOpacityToAlpha:!0},a=this._makeColorGradient(t,o),r=[this.getControllerVisual(t[0],"symbolSize",o),this.getControllerVisual(t[1],"symbolSize",o)],s=this._createBarPoints(i,r);return{barColor:new gs(0,0,0,1,a),barPoints:s,handlesColor:[a[0].color,a[a.length-1].color]}},_makeColorGradient:function(t,e){var i=[],n=(t[1]-t[0])/100;i.push({color:this.getControllerVisual(t[0],"color",e),offset:0});for(var o=1;o<100;o++){var a=t[0]+n*o;if(a>t[1])break;i.push({color:this.getControllerVisual(a,"color",e),offset:o/100})}return i.push({color:this.getControllerVisual(t[1],"color",e),offset:1}),i},_createBarPoints:function(t,e){var i=this.visualMapModel.itemSize;return[[i[0]-e[0],t[0]],[i[0],t[0]],[i[0],t[1]],[i[0]-e[1],t[1]]]},_createBarGroup:function(t){var e=this._orient,i=this.visualMapModel.get("inverse");return new Ci("horizontal"!==e||i?"horizontal"===e&&i?{scale:"bottom"===t?[-1,1]:[1,1],rotation:-Math.PI/2}:"vertical"!==e||i?{scale:"left"===t?[1,1]:[-1,1]}:{scale:"left"===t?[1,-1]:[-1,-1]}:{scale:"bottom"===t?[1,1]:[-1,1],rotation:Math.PI/2})},_updateHandle:function(n,o){if(this._useHandle){var a=this._shapes,r=this.visualMapModel,s=a.handleThumbs,l=a.handleLabels;GL([0,1],function(t){var e=s[t];e.setStyle("fill",o.handlesColor[t]),e.position[1]=n[t];var i=pl(a.handleLabelPoints[t],fl(e,this.group));l[t].setStyle({x:i[0],y:i[1],text:r.formatValueText(this._dataInterval[t]),textVerticalAlign:"middle",textAlign:this._applyTransform("horizontal"===this._orient?0===t?"bottom":"top":"left",a.barGroup)})},this)}},_showIndicator:function(t,e,i,n){var o=this.visualMapModel,a=o.getExtent(),r=o.itemSize,s=[0,r[1]],l=VL(t,a,s,!0),u=this._shapes,h=u.indicator;if(h){h.position[1]=l,h.attr("invisible",!1),h.setShape("points",function(t,e,i,n){return t?[[0,-FL(e,WL(i,0))],[6,0],[0,FL(e,WL(n-i,0))]]:[[0,0],[5,-5],[5,5]]}(!!i,n,l,r[1]));var c=this.getControllerVisual(t,"color",{convertOpacityToAlpha:!0});h.setStyle("fill",c);var d=pl(u.indicatorLabelPoint,fl(h,this.group)),f=u.indicatorLabel;f.attr("invisible",!1);var p=this._applyTransform("left",u.barGroup),g=this._orient;f.setStyle({text:(i||"")+o.formatValueText(e),textVerticalAlign:"horizontal"===g?p:"middle",textAlign:"horizontal"===g?"center":p,x:d[0],y:d[1]})}},_enableHoverLinkToSeries:function(){var n=this;this._shapes.barGroup.on("mousemove",function(t){if(n._hovering=!0,!n._dragging){var e=n.visualMapModel.itemSize,i=n._applyTransform([t.offsetX,t.offsetY],n._shapes.barGroup,!0,!0);i[1]=FL(WL(0,i[1]),e[1]),n._doHoverLinkToSeries(i[1],0<=i[0]&&i[0]<=e[0])}}).on("mouseout",function(){n._hovering=!1,n._dragging||n._clearHoverLinkToSeries()})},_enableHoverLinkFromSeries:function(){var t=this.api.getZr();this.visualMapModel.option.hoverLink?(t.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),t.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},_doHoverLinkToSeries:function(t,e){var i=this.visualMapModel,n=i.itemSize;if(i.option.hoverLink){var o=[0,n[1]],a=i.getExtent();t=FL(WL(o[0],t),o[1]);var r=function(t,e,i){var n=6,o=t.get("hoverLinkDataSize");o&&(n=VL(o,e,i,!0)/2);return n}(i,a,o),s=[t-r,t+r],l=VL(t,o,a,!0),u=[VL(s[0],o,a,!0),VL(s[1],o,a,!0)];s[0]<o[0]&&(u[0]=-1/0),o[1]<s[1]&&(u[1]=1/0),e&&(u[0]===-1/0?this._showIndicator(l,u[1],"< ",r):u[1]===1/0?this._showIndicator(l,u[0],"> ",r):this._showIndicator(l,l,"≈ ",r));var h=this._hoverLinkDataIndices,c=[];(e||UL(i))&&(c=this._hoverLinkDataIndices=i.findTargetDataIndices(u));var d=function(t,e){var i={},n={};return o(t||[],i),o(e||[],n,i),[a(i),a(n)];function o(t,e,i){for(var n=0,o=t.length;n<o;n++)for(var a=t[n].seriesId,r=Vo(t[n].dataIndex),s=i&&i[a],l=0,u=r.length;l<u;l++){var h=r[l];s&&s[h]?s[h]=null:(e[a]||(e[a]={}))[h]=1}}function a(t,e){var i=[];for(var n in t)if(t.hasOwnProperty(n)&&null!=t[n])if(e)i.push(+n);else{var o=a(t[n],!0);o.length&&i.push({seriesId:n,dataIndex:o})}return i}}(h,c);this._dispatchHighDown("downplay",BL(d[0],i)),this._dispatchHighDown("highlight",BL(d[1],i))}},_hoverLinkFromSeriesMouseOver:function(t){var e=t.target,i=this.visualMapModel;if(e&&null!=e.dataIndex){var n=this.ecModel.getSeriesByIndex(e.seriesIndex);if(i.isTargetSeries(n)){var o=n.getData(e.dataType),a=o.get(i.getDataDimension(o),e.dataIndex,!0);isNaN(a)||this._showIndicator(a,a)}}},_hideIndicator:function(){var t=this._shapes;t.indicator&&t.indicator.attr("invisible",!0),t.indicatorLabel&&t.indicatorLabel.attr("invisible",!0)},_clearHoverLinkToSeries:function(){this._hideIndicator();var t=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",BL(t,this.visualMapModel)),t.length=0},_clearHoverLinkFromSeries:function(){this._hideIndicator();var t=this.api.getZr();t.off("mouseover",this._hoverLinkFromSeriesMouseOver),t.off("mouseout",this._hideIndicator)},_applyTransform:function(t,e,i,n){var o=fl(e,n?null:this.group);return bl[L(t)?"applyTransform":"transformDirection"](t,o,i)},_dispatchHighDown:function(t,e){e&&e.length&&this.api.dispatchAction({type:t,batch:e})},dispose:function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},remove:function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()}});function ZL(t,e,i,n){return new Qr({shape:{points:t},draggable:!!i,cursor:e,drift:i,onmousemove:function(t){Xt(t.event)},ondragend:n})}function UL(t){var e=t.get("hoverLinkOnHandle");return!!(null==e?t.get("realtime"):e)}function XL(t){return"vertical"===t?"ns-resize":"ew-resize"}_f({type:"selectDataRange",event:"dataRangeSelected",update:"update"},function(e,t){t.eachComponent({mainType:"visualMap",query:e},function(t){t.setSelected(e.selected)})}),yf(yL);var YL=PL.extend({type:"visualMap.piecewise",defaultOption:{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieceList:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0,showLabel:null},optionUpdated:function(t,e){YL.superApply(this,"optionUpdated",arguments),this._pieceList=[],this.resetExtent();var i=this._mode=this._determineMode();jL[this._mode].call(this),this._resetSelected(t,e);var n=this.option.categories;this.resetVisual(function(t,e){"categories"===i?(t.mappingMethod="category",t.categories=k(n)):(t.dataExtent=this.getExtent(),t.mappingMethod="piecewise",t.pieceList=O(this._pieceList,function(t){t=k(t);return"inRange"!==e&&(t.visual=null),t}))})},completeVisualOption:function(){var n=this.option,i={},t=g_.listVisualTypes(),o=this.isCategory();function a(t,e,i){return t&&t[e]&&(z(t[e])?t[e].hasOwnProperty(i):t[e]===i)}E(n.pieces,function(e){E(t,function(t){e.hasOwnProperty(t)&&(i[t]=1)})}),E(i,function(t,e){var i=0;E(this.stateList,function(t){i|=a(n,t,e)||a(n.target,t,e)},this),i||E(this.stateList,function(t){(n[t]||(n[t]={}))[e]=ML(e,"inRange"===t?"active":"inactive",o)})},this),PL.prototype.completeVisualOption.apply(this,arguments)},_resetSelected:function(t,e){var i=this.option,n=this._pieceList,o=(e?i:t).selected||{};if(i.selected=o,E(n,function(t,e){var i=this.getSelectedMapKey(t);o.hasOwnProperty(i)||(o[i]=!0)},this),"single"===i.selectedMode){var a=!1;E(n,function(t,e){var i=this.getSelectedMapKey(t);o[i]&&(a?o[i]=!1:a=!0)},this)}},getSelectedMapKey:function(t){return"categories"===this._mode?t.value+"":t.index+""},getPieceList:function(){return this._pieceList},_determineMode:function(){var t=this.option;return t.pieces&&0<t.pieces.length?"pieces":this.option.categories?"categories":"splitNumber"},setSelected:function(t){this.option.selected=k(t)},getValueState:function(t){var e=g_.findPieceIndex(t,this._pieceList);return null!=e&&this.option.selected[this.getSelectedMapKey(this._pieceList[e])]?"inRange":"outOfRange"},findTargetDataIndices:function(n){var o=[];return this.eachTargetSeries(function(t){var i=[],e=t.getData();e.each(this.getDataDimension(e),function(t,e){g_.findPieceIndex(t,this._pieceList)===n&&i.push(e)},this),o.push({seriesId:t.id,dataIndex:i})},this),o},getRepresentValue:function(t){var e;if(this.isCategory())e=t.value;else if(null!=t.value)e=t.value;else{var i=t.interval||[];e=i[0]===-1/0&&i[1]===1/0?0:(i[0]+i[1])/2}return e},getVisualMeta:function(o){if(!this.isCategory()){var a=[],r=[],s=this,t=this._pieceList.slice();if(t.length){var e=t[0].interval[0];e!==-1/0&&t.unshift({interval:[-1/0,e]}),(e=t[t.length-1].interval[1])!==1/0&&t.push({interval:[e,1/0]})}else t.push({interval:[-1/0,1/0]});var i=-1/0;return E(t,function(t){var e=t.interval;e&&(e[0]>i&&n([i,e[0]],"outOfRange"),n(e.slice()),i=e[1])},this),{stops:a,outerColors:r}}function n(t,e){var i=s.getRepresentValue({interval:t});e=e||s.getValueState(i);var n=o(i,e);t[0]===-1/0?r[0]=n:t[1]===1/0?r[1]=n:a.push({value:t[0],color:n},{value:t[1],color:n})}}}),jL={splitNumber:function(){var t=this.option,e=this._pieceList,i=Math.min(t.precision,20),n=this.getExtent(),o=t.splitNumber;o=Math.max(parseInt(o,10),1),t.splitNumber=o;for(var a=(n[1]-n[0])/o;+a.toFixed(i)!==a&&i<5;)i++;t.precision=i,a=+a.toFixed(i),t.minOpen&&e.push({interval:[-1/0,n[0]],close:[0,0]});for(var r=0,s=n[0];r<o;s+=a,r++){var l=r===o-1?n[1]:s+a;e.push({interval:[s,l],close:[1,1]})}t.maxOpen&&e.push({interval:[n[1],1/0],close:[0,0]}),$l(e),E(e,function(t,e){t.index=e,t.text=this.formatValueText(t.interval)},this)},categories:function(){var t=this.option;E(t.categories,function(t){this._pieceList.push({text:this.formatValueText(t,!0),value:t})},this),qL(t,this._pieceList)},pieces:function(){var t=this.option,d=this._pieceList;E(t.pieces,function(t,e){z(t)||(t={value:t});var i={text:"",index:e};if(null!=t.label&&(i.text=t.label),t.hasOwnProperty("value")){var n=i.value=t.value;i.interval=[n,n],i.close=[1,1]}else{for(var o=i.interval=[],a=i.close=[0,0],r=[1,0,1],s=[-1/0,1/0],l=[],u=0;u<2;u++){for(var h=[["gte","gt","min"],["lte","lt","max"]][u],c=0;c<3&&null==o[u];c++)o[u]=t[h[c]],a[u]=r[c],l[u]=2===c;null==o[u]&&(o[u]=s[u])}l[0]&&o[1]===1/0&&(a[0]=0),l[1]&&o[0]===-1/0&&(a[1]=0),o[0]===o[1]&&a[0]&&a[1]&&(i.value=o[0])}i.visual=g_.retrieveVisuals(t),d.push(i)},this),qL(t,d),$l(d),E(d,function(t){var e=t.close,i=[["<","≤"][e[1]],[">","≥"][e[0]]];t.text=t.text||this.formatValueText(null!=t.value?t.value:t.interval,!1,i)},this)}};function qL(t,e){var i=t.inverse;("vertical"===t.orient?!i:i)&&e.reverse()}RL.extend({type:"visualMap.piecewise",doRender:function(){var a=this.group;a.removeAll();var r=this.visualMapModel,s=r.get("textGap"),t=r.textStyleModel,l=t.getFont(),u=t.getTextColor(),h=this._getItemAlign(),c=r.itemSize,e=this._getViewData(),i=e.endsText,d=W(r.get("showLabel",!0),!i);i&&this._renderEndsText(a,i[0],c,d,h),E(e.viewPieceList,function(t){var e=t.piece,i=new Ci;i.onclick=A(this._onItemClick,this,e),this._enableHoverLink(i,t.indexInModelPieceList);var n=r.getRepresentValue(e);if(this._createItemSymbol(i,n,[0,0,c[0],c[1]]),d){var o=this.visualMapModel.getValueState(n);i.add(new Ur({style:{x:"right"===h?-s:c[0]+s,y:c[1]/2,text:e.text,textVerticalAlign:"middle",textAlign:h,textFont:l,textFill:u,opacity:"outOfRange"===o?.5:1}}))}a.add(i)},this),i&&this._renderEndsText(a,i[1],c,d,h),wu(r.get("orient"),a,r.get("itemGap")),this.renderBackground(a),this.positionGroup(a)},_enableHoverLink:function(t,i){function e(t){var e=this.visualMapModel;e.option.hoverLink&&this.api.dispatchAction({type:t,batch:BL(e.findTargetDataIndices(i),e)})}t.on("mouseover",A(e,this,"highlight")).on("mouseout",A(e,this,"downplay"))},_getItemAlign:function(){var t=this.visualMapModel,e=t.option;if("vertical"===e.orient)return zL(t,this.api,t.itemSize);var i=e.align;return i&&"auto"!==i||(i="left"),i},_renderEndsText:function(t,e,i,n,o){if(e){var a=new Ci,r=this.visualMapModel.textStyleModel;a.add(new Ur({style:{x:n?"right"===o?i[0]:0:i[0]/2,y:i[1]/2,textVerticalAlign:"middle",textAlign:n?o:"center",text:e,textFont:r.getFont(),textFill:r.getTextColor()}})),t.add(a)}},_getViewData:function(){var t=this.visualMapModel,e=O(t.getPieceList(),function(t,e){return{piece:t,indexInModelPieceList:e}}),i=t.get("text"),n=t.get("orient"),o=t.get("inverse");return("horizontal"===n?o:!o)?e.reverse():i=i&&i.slice().reverse(),{viewPieceList:e,endsText:i}},_createItemSymbol:function(t,e,i){t.add(wg(this.getControllerVisual(e,"symbol"),i[0],i[1],i[2],i[3],this.getControllerVisual(e,"color")))},_onItemClick:function(t){var e=this.visualMapModel,i=e.option,n=k(i.selected),o=e.getSelectedMapKey(t);"single"===i.selectedMode?(n[o]=!0,E(n,function(t,e){n[e]=e===o})):n[o]=!n[o],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:n})}});yf(yL);var KL,$L="urn:schemas-microsoft-com:vml",JL="undefined"==typeof window?null:window,QL=!1,tk=JL&&JL.document;function ek(t){return KL(t)}if(tk&&!v.canvasSupported)try{tk.namespaces.zrvml||tk.namespaces.add("zrvml",$L),KL=function(t){return tk.createElement("<zrvml:"+t+' class="zrvml">')}}catch(t){KL=function(t){return tk.createElement("<"+t+' xmlns="'+$L+'" class="zrvml">')}}var ik,nk=rr.CMD,ok=Math.round,ak=Math.sqrt,rk=Math.abs,sk=Math.cos,lk=Math.sin,uk=Math.max;if(!v.canvasSupported){var hk=",",ck="progid:DXImageTransform.Microsoft",dk=21600,fk=dk/2,pk=function(t){t.style.cssText="position:absolute;left:0;top:0;width:1px;height:1px;",t.coordsize=dk+","+dk,t.coordorigin="0,0"},gk=function(t,e,i){return"rgb("+[t,e,i].join(",")+")"},mk=function(t,e){e&&t&&e.parentNode!==t&&t.appendChild(e)},vk=function(t,e){e&&t&&e.parentNode===t&&t.removeChild(e)},yk=function(t,e,i){return 1e5*(parseFloat(t)||0)+1e3*(parseFloat(e)||0)+i},xk=Yn,_k=function(t,e,i){var n=Fe(e);i=+i,isNaN(i)&&(i=1),n&&(t.color=gk(n[0],n[1],n[2]),t.opacity=i*n[3])},wk=function(t,e,i,n){var o="fill"===e,a=t.getElementsByTagName(e)[0];null!=i[e]&&"none"!==i[e]&&(o||!o&&i.lineWidth)?(t[o?"filled":"stroked"]="true",i[e]instanceof cs&&vk(t,a),a=a||ek(e),o?function(t,e,i){var n,o,a=e.fill;if(null!=a)if(a instanceof cs){var r,s=0,l=[0,0],u=0,h=1,c=i.getBoundingRect(),d=c.width,f=c.height;if("linear"===a.type){r="gradient";var p=i.transform,g=[a.x*d,a.y*f],m=[a.x2*d,a.y2*f];p&&(bt(g,g,p),bt(m,m,p));var v=m[0]-g[0],y=m[1]-g[1];(s=180*Math.atan2(v,y)/Math.PI)<0&&(s+=360),s<1e-6&&(s=0)}else{r="gradientradial";g=[a.x*d,a.y*f],p=i.transform;var x=i.scale,_=d,w=f;l=[(g[0]-c.x)/_,(g[1]-c.y)/w],p&&bt(g,g,p),_/=x[0]*dk,w/=x[1]*dk;var b=uk(_,w);u=0/b,h=2*a.r/b-u}var S=a.colorStops.slice();S.sort(function(t,e){return t.offset-e.offset});for(var M=S.length,I=[],T=[],A=0;A<M;A++){var D=S[A],C=(n=D.color,void 0,o=Fe(n),[gk(o[0],o[1],o[2]),o[3]]);T.push(D.offset*h+u+" "+C[0]),0!==A&&A!==M-1||I.push(C)}if(2<=M){var L=I[0][0],k=I[1][0],P=I[0][1]*e.opacity,N=I[1][1]*e.opacity;t.type=r,t.method="none",t.focus="100%",t.angle=s,t.color=L,t.color2=k,t.colors=T.join(","),t.opacity=N,t.opacity2=P}"radial"===r&&(t.focusposition=l.join(","))}else _k(t,a,e.opacity)}(a,i,n):function(t,e){e.lineDash&&(t.dashstyle=e.lineDash.join(" ")),null==e.stroke||e.stroke instanceof cs||_k(t,e.stroke,e.opacity)}(a,i),mk(t,a)):(t[o?"filled":"stroked"]="false",vk(t,a))},bk=[[],[],[]];Ar.prototype.brushVML=function(t){var e=this.style,i=this._vmlEl;i||(i=ek("shape"),pk(i),this._vmlEl=i),wk(i,"fill",e,this),wk(i,"stroke",e,this);var n=this.transform,o=null!=n,a=i.getElementsByTagName("stroke")[0];if(a){var r=e.lineWidth;if(o&&!e.strokeNoScale){var s=n[0]*n[3]-n[1]*n[2];r*=ak(rk(s))}a.weight=r+"px"}var l=this.path||(this.path=new rr);this.__dirtyPath&&(l.beginPath(),l.subPixelOptimize=!1,this.buildPath(l,this.shape),l.toStatic(),this.__dirtyPath=!1),i.path=function(t,e){var i,n,o,a,r,s,l=nk.M,u=nk.C,h=nk.L,c=nk.A,d=nk.Q,f=[],p=t.data,g=t.len();for(a=0;a<g;){switch(n="",i=0,o=p[a++]){case l:n=" m ",i=1,r=p[a++],s=p[a++],bk[0][0]=r,bk[0][1]=s;break;case h:n=" l ",i=1,r=p[a++],s=p[a++],bk[0][0]=r,bk[0][1]=s;break;case d:case u:n=" c ",i=3;var m,v,y=p[a++],x=p[a++],_=p[a++],w=p[a++];o===d?(_=((m=_)+2*y)/3,w=((v=w)+2*x)/3,y=(r+2*y)/3,x=(s+2*x)/3):(m=p[a++],v=p[a++]),bk[0][0]=y,bk[0][1]=x,bk[1][0]=_,bk[1][1]=w,r=bk[2][0]=m,s=bk[2][1]=v;break;case c:var b=0,S=0,M=1,I=1,T=0;e&&(b=e[4],S=e[5],M=ak(e[0]*e[0]+e[1]*e[1]),I=ak(e[2]*e[2]+e[3]*e[3]),T=Math.atan2(-e[1]/I,e[0]/M));var A=p[a++],D=p[a++],C=p[a++],L=p[a++],k=p[a++]+T,P=p[a++]+k+T;a++;var N=p[a++],O=A+sk(k)*C,E=D+lk(k)*L,R=(y=A+sk(P)*C,x=D+lk(P)*L,N?" wa ":" at ");Math.abs(O-y)<1e-4&&(.01<Math.abs(P-k)?N&&(O+=.0125):Math.abs(E-D)<1e-4?N&&O<A||!N&&A<O?x-=.0125:x+=.0125:N&&E<D||!N&&D<E?y+=.0125:y-=.0125),f.push(R,ok(((A-C)*M+b)*dk-fk),hk,ok(((D-L)*I+S)*dk-fk),hk,ok(((A+C)*M+b)*dk-fk),hk,ok(((D+L)*I+S)*dk-fk),hk,ok((O*M+b)*dk-fk),hk,ok((E*I+S)*dk-fk),hk,ok((y*M+b)*dk-fk),hk,ok((x*I+S)*dk-fk)),r=y,s=x;break;case nk.R:var z=bk[0],B=bk[1];z[0]=p[a++],z[1]=p[a++],B[0]=z[0]+p[a++],B[1]=z[1]+p[a++],e&&(bt(z,z,e),bt(B,B,e)),z[0]=ok(z[0]*dk-fk),B[0]=ok(B[0]*dk-fk),z[1]=ok(z[1]*dk-fk),B[1]=ok(B[1]*dk-fk),f.push(" m ",z[0],hk,z[1]," l ",B[0],hk,z[1]," l ",B[0],hk,B[1]," l ",z[0],hk,B[1]);break;case nk.Z:f.push(" x ")}if(0<i){f.push(n);for(var V=0;V<i;V++){var G=bk[V];e&&bt(G,G,e),f.push(ok(G[0]*dk-fk),hk,ok(G[1]*dk-fk),V<i-1?hk:"")}}}return f.join("")}(l,this.transform),i.style.zIndex=yk(this.zlevel,this.z,this.z2),mk(t,i),null!=e.text?this.drawRectText(t,this.getBoundingRect()):this.removeRectText(t)},Ar.prototype.onRemove=function(t){vk(t,this._vmlEl),this.removeRectText(t)},Ar.prototype.onAdd=function(t){mk(t,this._vmlEl),this.appendRectText(t)};Qn.prototype.brushVML=function(t){var e,i,n=this.style,o=n.image;if(function(t){return"object"==typeof t&&t.tagName&&"IMG"===t.tagName.toUpperCase()}(o)){var a=o.src;if(a===this._imageSrc)e=this._imageWidth,i=this._imageHeight;else{var r=o.runtimeStyle,s=r.width,l=r.height;r.width="auto",r.height="auto",e=o.width,i=o.height,r.width=s,r.height=l,this._imageSrc=a,this._imageWidth=e,this._imageHeight=i}o=a}else o===this._imageSrc&&(e=this._imageWidth,i=this._imageHeight);if(o){var u=n.x||0,h=n.y||0,c=n.width,d=n.height,f=n.sWidth,p=n.sHeight,g=n.sx||0,m=n.sy||0,v=f&&p,y=this._vmlEl;y||(y=tk.createElement("div"),pk(y),this._vmlEl=y);var x,_=y.style,w=!1,b=1,S=1;if(this.transform&&(x=this.transform,b=ak(x[0]*x[0]+x[1]*x[1]),S=ak(x[2]*x[2]+x[3]*x[3]),w=x[1]||x[2]),w){var M=[u,h],I=[u+c,h],T=[u,h+d],A=[u+c,h+d];bt(M,M,x),bt(I,I,x),bt(T,T,x),bt(A,A,x);var D=uk(M[0],I[0],T[0],A[0]),C=uk(M[1],I[1],T[1],A[1]),L=[];L.push("M11=",x[0]/b,hk,"M12=",x[2]/S,hk,"M21=",x[1]/b,hk,"M22=",x[3]/S,hk,"Dx=",ok(u*b+x[4]),hk,"Dy=",ok(h*S+x[5])),_.padding="0 "+ok(D)+"px "+ok(C)+"px 0",_.filter=ck+".Matrix("+L.join("")+", SizingMethod=clip)"}else x&&(u=u*b+x[4],h=h*S+x[5]),_.filter="",_.left=ok(u)+"px",_.top=ok(h)+"px";var k=this._imageEl,P=this._cropEl;k||(k=tk.createElement("div"),this._imageEl=k);var N=k.style;if(v){if(e&&i)N.width=ok(b*e*c/f)+"px",N.height=ok(S*i*d/p)+"px";else{var O=new Image,E=this;O.onload=function(){O.onload=null,e=O.width,i=O.height,N.width=ok(b*e*c/f)+"px",N.height=ok(S*i*d/p)+"px",E._imageWidth=e,E._imageHeight=i,E._imageSrc=o},O.src=o}P||((P=tk.createElement("div")).style.overflow="hidden",this._cropEl=P);var R=P.style;R.width=ok((c+g*c/f)*b),R.height=ok((d+m*d/p)*S),R.filter=ck+".Matrix(Dx="+-g*c/f*b+",Dy="+-m*d/p*S+")",P.parentNode||y.appendChild(P),k.parentNode!==P&&P.appendChild(k)}else N.width=ok(b*c)+"px",N.height=ok(S*d)+"px",y.appendChild(k),P&&P.parentNode&&(y.removeChild(P),this._cropEl=null);var z="",B=n.opacity;B<1&&(z+=".Alpha(opacity="+ok(100*B)+") "),z+=ck+".AlphaImageLoader(src="+o+", SizingMethod=scale)",N.filter=z,y.style.zIndex=yk(this.zlevel,this.z,this.z2),mk(t,y),null!=n.text&&this.drawRectText(t,this.getBoundingRect())}},Qn.prototype.onRemove=function(t){vk(t,this._vmlEl),this._vmlEl=null,this._cropEl=null,this._imageEl=null,this.removeRectText(t)},Qn.prototype.onAdd=function(t){mk(t,this._vmlEl),this.appendRectText(t)};var Sk,Mk="normal",Ik={},Tk=0,Ak=document.createElement("div");ik=function(t,e){var i=tk;Sk||((Sk=i.createElement("div")).style.cssText="position:absolute;top:-20000px;left:0;padding:0;margin:0;border:none;white-space:pre;",tk.body.appendChild(Sk));try{Sk.style.font=e}catch(t){}return Sk.innerHTML="",Sk.appendChild(i.createTextNode(t)),{width:Sk.offsetWidth}},fn["measureText"]=ik;for(var Dk=new Di,Ck=function(t,e,i,n){var o=this.style;this.__dirty&&En(o);var a=o.text;if(null!=a&&(a+=""),a){if(o.rich){var r=In(a,o);a=[];for(var s=0;s<r.lines.length;s++){for(var l=r.lines[s].tokens,u=[],h=0;h<l.length;h++)u.push(l[h].text);a.push(u.join(""))}a=a.join("\n")}var c,d,f=o.textAlign,p=o.textVerticalAlign,g=function(t){var e=Ik[t];if(!e){100<Tk&&(Tk=0,Ik={});var i,n=Ak.style;try{n.font=t,i=n.fontFamily.split(",")[0]}catch(t){}e={style:n.fontStyle||Mk,variant:n.fontVariant||Mk,weight:n.fontWeight||Mk,size:0|parseFloat(n.fontSize||12),family:i||"Microsoft YaHei"},Ik[t]=e,Tk++}return e}(o.font),m=g.style+" "+g.variant+" "+g.weight+" "+g.size+'px "'+g.family+'"';i=i||gn(a,m,f,p,o.textPadding,o.textLineHeight);var v=this.transform;if(v&&!n&&(Dk.copy(e),Dk.applyTransform(v),e=Dk),n)c=e.x,d=e.y;else{var y=o.textPosition;if(y instanceof Array)c=e.x+xk(y[0],e.width),d=e.y+xk(y[1],e.height),f=f||"left";else{var x=this.calculateTextPosition?this.calculateTextPosition({},o,e):yn({},o,e);c=x.x,d=x.y,f=f||x.textAlign,p=p||x.textVerticalAlign}}c=mn(c,i.width,f),d=vn(d,i.height,p),d+=i.height/2;var _,w,b,S=ek,M=this._textVmlEl;M?w=(_=(b=M.firstChild).nextSibling).nextSibling:(M=S("line"),_=S("path"),w=S("textpath"),b=S("skew"),w.style["v-text-align"]="left",pk(M),_.textpathok=!0,w.on=!0,M.from="0 0",M.to="1000 0.05",mk(M,b),mk(M,_),mk(M,w),this._textVmlEl=M);var I=[c,d],T=M.style;v&&n?(bt(I,I,v),b.on=!0,b.matrix=v[0].toFixed(3)+hk+v[2].toFixed(3)+hk+v[1].toFixed(3)+hk+v[3].toFixed(3)+",0,0",b.offset=(ok(I[0])||0)+","+(ok(I[1])||0),b.origin="0 0",T.left="0px",T.top="0px"):(b.on=!1,T.left=ok(c)+"px",T.top=ok(d)+"px"),w.string=function(t){return String(t).replace(/&/g,"&amp;").replace(/"/g,"&quot;")}(a);try{w.style.font=m}catch(t){}wk(M,"fill",{fill:o.textFill,opacity:o.opacity},this),wk(M,"stroke",{stroke:o.textStroke,opacity:o.opacity,lineDash:o.lineDash||null},this),M.style.zIndex=yk(this.zlevel,this.z,this.z2),mk(t,M)}},Lk=function(t){vk(t,this._textVmlEl),this._textVmlEl=null},kk=function(t){mk(t,this._textVmlEl)},Pk=[Kn,Jn,Qn,Ar,Ur],Nk=0;Nk<Pk.length;Nk++){var Ok=Pk[Nk].prototype;Ok.drawRectText=Ck,Ok.removeRectText=Lk,Ok.appendRectText=kk}Ur.prototype.brushVML=function(t){var e=this.style;null!=e.text?this.drawRectText(t,{x:e.x||0,y:e.y||0,width:0,height:0},this.getBoundingRect(),!0):this.removeRectText(t)},Ur.prototype.onRemove=function(t){this.removeRectText(t)},Ur.prototype.onAdd=function(t){this.appendRectText(t)}}function Ek(t){return parseInt(t,10)}function Rk(t,e){!function(){if(!QL&&tk){QL=!0;var t=tk.styleSheets;t.length<31?tk.createStyleSheet().addRule(".zrvml","behavior:url(#default#VML)"):t[0].addRule(".zrvml","behavior:url(#default#VML)")}}(),this.root=t,this.storage=e;var i=document.createElement("div"),n=document.createElement("div");i.style.cssText="display:inline-block;overflow:hidden;position:relative;width:300px;height:150px;",n.style.cssText="position:absolute;left:0;top:0;",t.appendChild(i),this._vmlRoot=n,this._vmlViewport=i,this.resize();var o=e.delFromStorage,a=e.addToStorage;e.delFromStorage=function(t){o.call(e,t),t&&t.onRemove&&t.onRemove(n)},e.addToStorage=function(t){t.onAdd&&t.onAdd(n),a.call(e,t)},this._firstPaint=!0}Rk.prototype={constructor:Rk,getType:function(){return"vml"},getViewportRoot:function(){return this._vmlViewport},getViewportRootOffset:function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},refresh:function(){var t=this.storage.getDisplayList(!0,!0);this._paintList(t)},_paintList:function(t){for(var e=this._vmlRoot,i=0;i<t.length;i++){var n=t[i];n.invisible||n.ignore?(n.__alreadyNotVisible||n.onRemove(e),n.__alreadyNotVisible=!0):(n.__alreadyNotVisible&&n.onAdd(e),n.__alreadyNotVisible=!1,n.__dirty&&(n.beforeBrush&&n.beforeBrush(),(n.brushVML||n.brush).call(n,e),n.afterBrush&&n.afterBrush())),n.__dirty=!1}this._firstPaint&&(this._vmlViewport.appendChild(e),this._firstPaint=!1)},resize:function(t,e){t=null==t?this._getWidth():t,e=null==e?this._getHeight():e;if(this._width!==t||this._height!==e){this._width=t,this._height=e;var i=this._vmlViewport.style;i.width=t+"px",i.height=e+"px"}},dispose:function(){this.root.innerHTML="",this._vmlRoot=this._vmlViewport=this.storage=null},getWidth:function(){return this._width},getHeight:function(){return this._height},clear:function(){this._vmlViewport&&this.root.removeChild(this._vmlViewport)},_getWidth:function(){var t=this.root,e=t.currentStyle;return(t.clientWidth||Ek(e.width))-Ek(e.paddingLeft)-Ek(e.paddingRight)|0},_getHeight:function(){var t=this.root,e=t.currentStyle;return(t.clientHeight||Ek(e.height))-Ek(e.paddingTop)-Ek(e.paddingBottom)|0}},E(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","toDataURL","pathToImage"],function(t){Rk.prototype[t]=function(t){return function(){vi('In IE8.0 VML mode painter not support method "'+t+'"')}}(t)}),Po("vml",Rk);function zk(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}var Bk=rr.CMD,Vk=Array.prototype.join,Gk="none",Fk=Math.round,Wk=Math.sin,Hk=Math.cos,Zk=Math.PI,Uk=2*Math.PI,Xk=180/Zk,Yk=1e-4;function jk(t){return Fk(1e4*t)/1e4}function qk(t){return t<Yk&&-Yk<t}function Kk(t,e){e&&$k(t,"transform","matrix("+Vk.call(e,",")+")")}function $k(t,e,i){i&&("linear"===i.type||"radial"===i.type)||t.setAttribute(e,i)}function Jk(t,e,i,n){if(function(t,e){var i=e?t.textFill:t.fill;return null!=i&&i!==Gk}(e,i)){var o=i?e.textFill:e.fill;$k(t,"fill",o="transparent"===o?Gk:o),$k(t,"fill-opacity",null!=e.fillOpacity?e.fillOpacity*e.opacity:e.opacity)}else $k(t,"fill",Gk);if(function(t,e){var i=e?t.textStroke:t.stroke;return null!=i&&i!==Gk}(e,i)){var a=i?e.textStroke:e.stroke;$k(t,"stroke",a="transparent"===a?Gk:a),$k(t,"stroke-width",(i?e.textStrokeWidth:e.lineWidth)/(!i&&e.strokeNoScale?n.getLineScale():1)),$k(t,"paint-order",i?"stroke":"fill"),$k(t,"stroke-opacity",null!=e.strokeOpacity?e.strokeOpacity:e.opacity),e.lineDash?($k(t,"stroke-dasharray",e.lineDash.join(",")),$k(t,"stroke-dashoffset",Fk(e.lineDashOffset||0))):$k(t,"stroke-dasharray",""),e.lineCap&&$k(t,"stroke-linecap",e.lineCap),e.lineJoin&&$k(t,"stroke-linejoin",e.lineJoin),e.miterLimit&&$k(t,"stroke-miterlimit",e.miterLimit)}else $k(t,"stroke",Gk)}var Qk={};Qk.brush=function(t){var e=t.style,i=t.__svgEl;i||(i=zk("path"),t.__svgEl=i),t.path||t.createPathProxy();var n=t.path;if(t.__dirtyPath){n.beginPath(),n.subPixelOptimize=!1,t.buildPath(n,t.shape),t.__dirtyPath=!1;var o=function(t){for(var e=[],i=t.data,n=t.len(),o=0;o<n;){var a="",r=0;switch(i[o++]){case Bk.M:a="M",r=2;break;case Bk.L:a="L",r=2;break;case Bk.Q:a="Q",r=4;break;case Bk.C:a="C",r=6;break;case Bk.A:var s=i[o++],l=i[o++],u=i[o++],h=i[o++],c=i[o++],d=i[o++],f=i[o++],p=i[o++],g=Math.abs(d),m=qk(g-Uk)||(p?Uk<=d:Uk<=-d),v=0<d?d%Uk:d%Uk+Uk,y=!1;y=!!m||!qk(g)&&Zk<=v==!!p;var x=jk(s+u*Hk(c)),_=jk(l+h*Wk(c));m&&(d=p?Uk-1e-4:1e-4-Uk,y=!0,9===o&&e.push("M",x,_));var w=jk(s+u*Hk(c+d)),b=jk(l+h*Wk(c+d));e.push("A",jk(u),jk(h),Fk(f*Xk),+y,+p,w,b);break;case Bk.Z:a="Z";break;case Bk.R:w=jk(i[o++]),b=jk(i[o++]);var S=jk(i[o++]),M=jk(i[o++]);e.push("M",w,b,"L",w+S,b,"L",w+S,b+M,"L",w,b+M,"L",w,b)}a&&e.push(a);for(var I=0;I<r;I++)e.push(jk(i[o++]))}return e.join(" ")}(n);o.indexOf("NaN")<0&&$k(i,"d",o)}Jk(i,e,!1,t),Kk(i,t.transform),null!=e.text?rP(t,t.getBoundingRect()):lP(t)};var tP={brush:function(t){var e=t.style,i=e.image;i instanceof HTMLImageElement&&(i=i.src);if(i){var n=e.x||0,o=e.y||0,a=e.width,r=e.height,s=t.__svgEl;s||(s=zk("image"),t.__svgEl=s),i!==t.__imageSrc&&(function(t,e,i){t.setAttributeNS("http://www.w3.org/1999/xlink",e,i)}(s,"href",i),t.__imageSrc=i),$k(s,"width",a),$k(s,"height",r),$k(s,"x",n),$k(s,"y",o),Kk(s,t.transform),null!=e.text?rP(t,t.getBoundingRect()):lP(t)}}},eP={},iP=new Di,nP={},oP=[],aP={left:"start",right:"end",center:"middle",middle:"middle"},rP=function(t,e){var i=t.style,n=t.transform,o=t instanceof Ur||i.transformText;t.__dirty&&En(i);var a=i.text;if(null!=a&&(a+=""),qn(a,i)){null==a&&(a=""),!o&&n&&(iP.copy(e),iP.applyTransform(n),e=iP);var r=t.__textSvgEl;r||(r=zk("text"),t.__textSvgEl=r);var s=r.style,l=i.font||dn,u=r.__computedFont;l!==r.__styleFont&&(s.font=r.__styleFont=l,u=r.__computedFont=s.font);var h=i.textPadding,c=i.textLineHeight,d=t.__textCotentBlock;d&&!t.__dirtyText||(d=t.__textCotentBlock=Mn(a,u,h,c,i.truncate));var f=d.outerHeight,p=d.lineHeight;Hn(nP,t,i,e);var g=nP.baseX,m=nP.baseY,v=nP.textAlign||"left",y=nP.textVerticalAlign;!function(t,e,i,n,o,a,r){re(oP),e&&i&&se(oP,i);var s=n.textRotation;if(o&&s){var l=n.textOrigin;"center"===l?(a=o.width/2+o.x,r=o.height/2+o.y):l&&(a=l[0]+o.x,r=l[1]+o.y),oP[4]-=a,oP[5]-=r,he(oP,oP,s),oP[4]+=a,oP[5]+=r}Kk(t,oP)}(r,o,n,i,e,g,m);var x=g,_=vn(m,f,y);h&&(x=function(t,e,i){return"right"===e?t-i[1]:"center"===e?t+i[3]/2-i[1]/2:t+i[3]}(g,v,h),_+=h[0]),_+=p/2,Jk(r,i,!0,t);var w=d.canCacheByTextString,b=t.__tspanList||(t.__tspanList=[]),S=b.length;if(w&&t.__canCacheByTextString&&t.__text===a){if(t.__dirtyText&&S)for(var M=0;M<S;++M)sP(b[M],v,x,_+M*p)}else{t.__text=a,t.__canCacheByTextString=w;var I=d.lines,T=I.length;for(M=0;M<T;M++){var A=b[M],D=I[M];A?A.__zrText!==D&&(A.innerHTML="",A.appendChild(document.createTextNode(D))):(A=b[M]=zk("tspan"),r.appendChild(A),A.appendChild(document.createTextNode(D))),sP(A,v,x,_+M*p)}if(T<S){for(;M<S;M++)r.removeChild(b[M]);b.length=T}}}};function sP(t,e,i,n){$k(t,"dominant-baseline","middle"),$k(t,"text-anchor",aP[e]),$k(t,"x",i),$k(t,"y",n)}function lP(t){t&&t.__textSvgEl&&(t.__textSvgEl.parentNode&&t.__textSvgEl.parentNode.removeChild(t.__textSvgEl),t.__textSvgEl=null,t.__tspanList=[],t.__text=null)}function uP(){}function hP(t,e){for(var i=0,n=e.length,o=0,a=0;i<n;i++){var r=e[i];if(r.removed){for(s=[],l=a;l<a+r.count;l++)s.push(l);r.indices=s,a+=r.count}else{for(var s=[],l=o;l<o+r.count;l++)s.push(l);r.indices=s,o+=r.count,r.added||(a+=r.count)}}return e}eP.drawRectText=rP,eP.brush=function(t){null!=t.style.text?rP(t,!1):lP(t)},uP.prototype={diff:function(l,u,t){t=t||function(t,e){return t===e},this.equals=t;var h=this;l=l.slice();var c=(u=u.slice()).length,d=l.length,f=1,e=c+d,p=[{newPos:-1,components:[]}],i=this.extractCommon(p[0],u,l,0);if(p[0].newPos+1>=c&&d<=i+1){for(var n=[],o=0;o<u.length;o++)n.push(o);return[{indices:n,count:u.length}]}function a(){for(var t=-1*f;t<=f;t+=2){var e,i=p[t-1],n=p[t+1],o=(n?n.newPos:0)-t;i&&(p[t-1]=void 0);var a=i&&i.newPos+1<c,r=n&&0<=o&&o<d;if(a||r){if(!a||r&&i.newPos<n.newPos?(e={newPos:(s=n).newPos,components:s.components.slice(0)},h.pushComponent(e.components,void 0,!0)):((e=i).newPos++,h.pushComponent(e.components,!0,void 0)),o=h.extractCommon(e,u,l,t),e.newPos+1>=c&&d<=o+1)return hP(h,e.components,u,l);p[t]=e}else p[t]=void 0}var s;f++}for(;f<=e;){var r=a();if(r)return r}},pushComponent:function(t,e,i){var n=t[t.length-1];n&&n.added===e&&n.removed===i?t[t.length-1]={count:n.count+1,added:e,removed:i}:t.push({count:1,added:e,removed:i})},extractCommon:function(t,e,i,n){for(var o=e.length,a=i.length,r=t.newPos,s=r-n,l=0;r+1<o&&s+1<a&&this.equals(e[r+1],i[s+1]);)r++,s++,l++;return l&&t.components.push({count:l}),t.newPos=r,s},tokenize:function(t){return t.slice()},join:function(t){return t.slice()}};var cP=new uP;function dP(t,e,i,n,o){this._zrId=t,this._svgRoot=e,this._tagNames="string"==typeof i?[i]:i,this._markLabel=n,this._domName=o||"_dom",this.nextId=0}function fP(t,e){dP.call(this,t,e,["linearGradient","radialGradient"],"__gradient_in_use__")}function pP(t,e){dP.call(this,t,e,"clipPath","__clippath_in_use__")}function gP(t,e){dP.call(this,t,e,["filter"],"__filter_in_use__","_shadowDom")}function mP(t){return t&&(t.shadowBlur||t.shadowOffsetX||t.shadowOffsetY||t.textShadowBlur||t.textShadowOffsetX||t.textShadowOffsetY)}function vP(t){return parseInt(t,10)}function yP(t,e){return e&&t&&e.parentNode!==t}function xP(t,e,i){if(yP(t,e)&&i){var n=i.nextSibling;n?t.insertBefore(e,n):t.appendChild(e)}}function _P(t,e){if(yP(t,e)){var i=t.firstChild;i?t.insertBefore(e,i):t.appendChild(e)}}function wP(t,e){e&&t&&e.parentNode===t&&t.removeChild(e)}function bP(t){return t.__textSvgEl}function SP(t){return t.__svgEl}dP.prototype.createElement=zk,dP.prototype.getDefs=function(t){var e=this._svgRoot,n=this._svgRoot.getElementsByTagName("defs");return 0===n.length?t?((n=e.insertBefore(this.createElement("defs"),e.firstChild)).contains||(n.contains=function(t){var e=n.children;if(!e)return!1;for(var i=e.length-1;0<=i;--i)if(e[i]===t)return!0;return!1}),n):null:n[0]},dP.prototype.update=function(t,e){if(t){var i=this.getDefs(!1);if(t[this._domName]&&i.contains(t[this._domName]))"function"==typeof e&&e(t);else{var n=this.add(t);n&&(t[this._domName]=n)}}},dP.prototype.addDom=function(t){this.getDefs(!0).appendChild(t)},dP.prototype.removeDom=function(t){var e=this.getDefs(!1);e&&t[this._domName]&&(e.removeChild(t[this._domName]),t[this._domName]=null)},dP.prototype.getDoms=function(){var i=this.getDefs(!1);if(!i)return[];var n=[];return E(this._tagNames,function(t){var e=i.getElementsByTagName(t);n=n.concat([].slice.call(e))}),n},dP.prototype.markAllUnused=function(){var t=this.getDoms(),e=this;E(t,function(t){t[e._markLabel]="0"})},dP.prototype.markUsed=function(t){t&&(t[this._markLabel]="1")},dP.prototype.removeUnused=function(){var e=this.getDefs(!1);if(e){var t=this.getDoms(),i=this;E(t,function(t){"1"!==t[i._markLabel]&&e.removeChild(t)})}},dP.prototype.getSvgProxy=function(t){return t instanceof Ar?Qk:t instanceof Qn?tP:t instanceof Ur?eP:Qk},dP.prototype.getTextSvgElement=function(t){return t.__textSvgEl},dP.prototype.getSvgElement=function(t){return t.__svgEl},w(fP,dP),fP.prototype.addWithoutUpdate=function(a,r){if(r&&r.style){var s=this;E(["fill","stroke"],function(t){if(r.style[t]&&("linear"===r.style[t].type||"radial"===r.style[t].type)){var e,i=r.style[t],n=s.getDefs(!0);i._dom?(e=i._dom,n.contains(i._dom)||s.addDom(e)):e=s.add(i),s.markUsed(r);var o=e.getAttribute("id");a.setAttribute(t,"url(#"+o+")")}})}},fP.prototype.add=function(t){var e;if("linear"===t.type)e=this.createElement("linearGradient");else{if("radial"!==t.type)return vi("Illegal gradient type."),null;e=this.createElement("radialGradient")}return t.id=t.id||this.nextId++,e.setAttribute("id","zr"+this._zrId+"-gradient-"+t.id),this.updateDom(t,e),this.addDom(e),e},fP.prototype.update=function(i){var n=this;dP.prototype.update.call(this,i,function(){var t=i.type,e=i._dom.tagName;"linear"===t&&"linearGradient"===e||"radial"===t&&"radialGradient"===e?n.updateDom(i,i._dom):(n.removeDom(i),n.add(i))})},fP.prototype.updateDom=function(t,e){if("linear"===t.type)e.setAttribute("x1",t.x),e.setAttribute("y1",t.y),e.setAttribute("x2",t.x2),e.setAttribute("y2",t.y2);else{if("radial"!==t.type)return void vi("Illegal gradient type.");e.setAttribute("cx",t.x),e.setAttribute("cy",t.y),e.setAttribute("r",t.r)}t.global?e.setAttribute("gradientUnits","userSpaceOnUse"):e.setAttribute("gradientUnits","objectBoundingBox"),e.innerHTML="";for(var i=t.colorStops,n=0,o=i.length;n<o;++n){var a=this.createElement("stop");a.setAttribute("offset",100*i[n].offset+"%");var r=i[n].color;if(r.indexOf(!1)){var s=Fe(r)[3],l=Ze(r);a.setAttribute("stop-color","#"+l),a.setAttribute("stop-opacity",s)}else a.setAttribute("stop-color",i[n].color);e.appendChild(a)}t._dom=e},fP.prototype.markUsed=function(t){if(t.style){var e=t.style.fill;e&&e._dom&&dP.prototype.markUsed.call(this,e._dom),(e=t.style.stroke)&&e._dom&&dP.prototype.markUsed.call(this,e._dom)}},w(pP,dP),pP.prototype.update=function(t){var e=this.getSvgElement(t);e&&this.updateDom(e,t.__clipPaths,!1);var i=this.getTextSvgElement(t);i&&this.updateDom(i,t.__clipPaths,!0),this.markUsed(t)},pP.prototype.updateDom=function(t,e,i){if(e&&0<e.length){var n,o,a=this.getDefs(!0),r=e[0],s=i?"_textDom":"_dom";r[s]?(o=r[s].getAttribute("id"),n=r[s],a.contains(n)||a.appendChild(n)):(o="zr"+this._zrId+"-clip-"+this.nextId,++this.nextId,(n=this.createElement("clipPath")).setAttribute("id",o),a.appendChild(n),r[s]=n);var l=this.getSvgProxy(r);if(r.transform&&r.parent.invTransform&&!i){var u=Array.prototype.slice.call(r.transform);le(r.transform,r.parent.invTransform,r.transform),l.brush(r),r.transform=u}else l.brush(r);var h=this.getSvgElement(r);n.innerHTML="",n.appendChild(h.cloneNode()),t.setAttribute("clip-path","url(#"+o+")"),1<e.length&&this.updateDom(n,e.slice(1),i)}else t&&t.setAttribute("clip-path","none")},pP.prototype.markUsed=function(t){var e=this;t.__clipPaths&&E(t.__clipPaths,function(t){t._dom&&dP.prototype.markUsed.call(e,t._dom),t._textDom&&dP.prototype.markUsed.call(e,t._textDom)})},w(gP,dP),gP.prototype.addWithoutUpdate=function(t,e){if(e&&mP(e.style)){var i;if(e._shadowDom)i=e._shadowDom,this.getDefs(!0).contains(e._shadowDom)||this.addDom(i);else i=this.add(e);this.markUsed(e);var n=i.getAttribute("id");t.style.filter="url(#"+n+")"}},gP.prototype.add=function(t){var e=this.createElement("filter");return t._shadowDomId=t._shadowDomId||this.nextId++,e.setAttribute("id","zr"+this._zrId+"-shadow-"+t._shadowDomId),this.updateDom(t,e),this.addDom(e),e},gP.prototype.update=function(t,e){if(mP(e.style)){var i=this;dP.prototype.update.call(this,e,function(){i.updateDom(e,e._shadowDom)})}else this.remove(t,e)},gP.prototype.remove=function(t,e){null!=e._shadowDomId&&(this.removeDom(t),t.style.filter="")},gP.prototype.updateDom=function(t,e){var i=e.getElementsByTagName("feDropShadow");i=0===i.length?this.createElement("feDropShadow"):i[0];var n,o,a,r,s=t.style,l=t.scale&&t.scale[0]||1,u=t.scale&&t.scale[1]||1;if(s.shadowBlur||s.shadowOffsetX||s.shadowOffsetY)n=s.shadowOffsetX||0,o=s.shadowOffsetY||0,a=s.shadowBlur,r=s.shadowColor;else{if(!s.textShadowBlur)return void this.removeDom(e,s);n=s.textShadowOffsetX||0,o=s.textShadowOffsetY||0,a=s.textShadowBlur,r=s.textShadowColor}i.setAttribute("dx",n/l),i.setAttribute("dy",o/u),i.setAttribute("flood-color",r);var h=a/2/l+" "+a/2/u;i.setAttribute("stdDeviation",h),e.setAttribute("x","-100%"),e.setAttribute("y","-100%"),e.setAttribute("width",Math.ceil(a/2*200)+"%"),e.setAttribute("height",Math.ceil(a/2*200)+"%"),e.appendChild(i),t._shadowDom=e},gP.prototype.markUsed=function(t){t._shadowDom&&dP.prototype.markUsed.call(this,t._shadowDom)};function MP(t,e,i,n){this.root=t,this.storage=e,this._opts=i=P({},i||{});var o=zk("svg");o.setAttribute("xmlns","http://www.w3.org/2000/svg"),o.setAttribute("version","1.1"),o.setAttribute("baseProfile","full"),o.style.cssText="user-select:none;position:absolute;left:0;top:0;";var a=zk("g");o.appendChild(a);var r=zk("g");o.appendChild(r),this.gradientManager=new fP(n,r),this.clipPathManager=new pP(n,r),this.shadowManager=new gP(n,r);var s=document.createElement("div");s.style.cssText="overflow:hidden;position:relative",this._svgDom=o,this._svgRoot=r,this._backgroundRoot=a,this._viewport=s,t.appendChild(s),s.appendChild(o),this.resize(i.width,i.height),this._visibleList=[]}MP.prototype={constructor:MP,getType:function(){return"svg"},getViewportRoot:function(){return this._viewport},getSvgDom:function(){return this._svgDom},getSvgRoot:function(){return this._svgRoot},getViewportRootOffset:function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},refresh:function(){var t=this.storage.getDisplayList(!0);this._paintList(t)},setBackgroundColor:function(t){this._backgroundRoot&&this._backgroundNode&&this._backgroundRoot.removeChild(this._backgroundNode);var e=zk("rect");e.setAttribute("width",this.getWidth()),e.setAttribute("height",this.getHeight()),e.setAttribute("x",0),e.setAttribute("y",0),e.setAttribute("id",0),e.style.fill=t,this._backgroundRoot.appendChild(e),this._backgroundNode=e},_paintList:function(t){this.gradientManager.markAllUnused(),this.clipPathManager.markAllUnused(),this.shadowManager.markAllUnused();var e,i,n=this._svgRoot,o=this._visibleList,a=t.length,r=[];for(e=0;e<a;e++){var s=t[e],l=(i=s)instanceof Ar?Qk:i instanceof Qn?tP:i instanceof Ur?eP:Qk,u=SP(s)||bP(s);s.invisible||(s.__dirty&&(l&&l.brush(s),this.clipPathManager.update(s),s.style&&(this.gradientManager.update(s.style.fill),this.gradientManager.update(s.style.stroke),this.shadowManager.update(u,s)),s.__dirty=!1),r.push(s))}var h,c=function(t,e,i){return cP.diff(t,e,i)}(o,r);for(e=0;e<c.length;e++){if((p=c[e]).removed)for(var d=0;d<p.count;d++){u=SP(s=o[p.indices[d]]);var f=bP(s);wP(n,u),wP(n,f)}}for(e=0;e<c.length;e++){var p;if((p=c[e]).added)for(d=0;d<p.count;d++){u=SP(s=r[p.indices[d]]),f=bP(s);h?xP(n,u,h):_P(n,u),u?xP(n,f,u):h?xP(n,f,h):_P(n,f),xP(n,f,u),h=f||u||h,this.gradientManager.addWithoutUpdate(u||f,s),this.shadowManager.addWithoutUpdate(u||f,s),this.clipPathManager.markUsed(s)}else if(!p.removed)for(d=0;d<p.count;d++){u=SP(s=r[p.indices[d]]),f=bP(s),u=SP(s),f=bP(s);this.gradientManager.markUsed(s),this.gradientManager.addWithoutUpdate(u||f,s),this.shadowManager.markUsed(s),this.shadowManager.addWithoutUpdate(u||f,s),this.clipPathManager.markUsed(s),f&&xP(n,f,u),h=u||f||h}}this.gradientManager.removeUnused(),this.clipPathManager.removeUnused(),this.shadowManager.removeUnused(),this._visibleList=r},_getDefs:function(t){var n,e=this._svgDom;return 0!==(n=e.getElementsByTagName("defs")).length?n[0]:t?((n=e.insertBefore(zk("defs"),e.firstChild)).contains||(n.contains=function(t){var e=n.children;if(!e)return!1;for(var i=e.length-1;0<=i;--i)if(e[i]===t)return!0;return!1}),n):null},resize:function(t,e){var i=this._viewport;i.style.display="none";var n=this._opts;if(null!=t&&(n.width=t),null!=e&&(n.height=e),t=this._getSize(0),e=this._getSize(1),i.style.display="",this._width!==t||this._height!==e){this._width=t,this._height=e;var o=i.style;o.width=t+"px",o.height=e+"px";var a=this._svgDom;a.setAttribute("width",t),a.setAttribute("height",e)}this._backgroundNode&&(this._backgroundNode.setAttribute("width",t),this._backgroundNode.setAttribute("height",e))},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(t){var e=this._opts,i=["width","height"][t],n=["clientWidth","clientHeight"][t],o=["paddingLeft","paddingTop"][t],a=["paddingRight","paddingBottom"][t];if(null!=e[i]&&"auto"!==e[i])return parseFloat(e[i]);var r=this.root,s=document.defaultView.getComputedStyle(r);return(r[n]||vP(s[i])||vP(r.style[i]))-(vP(s[o])||0)-(vP(s[a])||0)|0},dispose:function(){this.root.innerHTML="",this._svgRoot=this._backgroundRoot=this._svgDom=this._backgroundNode=this._viewport=this.storage=null},clear:function(){this._viewport&&this.root.removeChild(this._viewport)},toDataURL:function(){return this.refresh(),"data:image/svg+xml;charset=UTF-8,"+encodeURIComponent(this._svgDom.outerHTML.replace(/></g,">\n\r<"))}},E(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","pathToImage"],function(t){MP.prototype[t]=function(t){return function(){vi('In SVG mode painter not support method "'+t+'"')}}(t)}),Po("svg",MP),t.version="4.8.0",t.dependencies={zrender:"4.3.1"},t.PRIORITY=Ld,t.init=function(t,e,i){var n=mf(t);if(n)return n;var o=new Rd(t,e,i);return o.id="ec_"+cf++,uf[o.id]=o,Jo(t,ff,o.id),function(n){var o="__connectUpdateStatus";function a(t,e){for(var i=0;i<t.length;i++){t[i][o]=e}}Td(ef,function(t,e){n._messageCenter.on(e,function(t){if(hf[n.group]&&0!==n[o]){if(t&&t.escapeConnect)return;var e=n.makeActionFromEvent(t),i=[];Td(uf,function(t){t!==n&&t.group===n.group&&i.push(t)}),a(i,0),Td(i,function(t){1!==t[o]&&t.dispatchAction(e)}),a(i,2)}})})}(o),o},t.connect=function(e){if(L(e)){var t=e;e=null,Td(t,function(t){null!=t.group&&(e=t.group)}),e=e||"g_"+df++,Td(t,function(t){t.group=e})}return hf[e]=!0,e},t.disConnect=pf,t.disconnect=gf,t.dispose=function(t){"string"==typeof t?t=uf[t]:t instanceof Rd||(t=mf(t)),t instanceof Rd&&!t.isDisposed()&&t.dispose()},t.getInstanceByDom=mf,t.getInstanceById=function(t){return uf[t]},t.registerTheme=vf,t.registerPreprocessor=yf,t.registerProcessor=xf,t.registerPostUpdate=function(t){af.push(t)},t.registerAction=_f,t.registerCoordinateSystem=wf,t.getCoordinateSystemDimensions=function(t){var e=lh.get(t);if(e)return e.getDimensionsInfo?e.getDimensionsInfo():e.dimensions.slice()},t.registerLayout=bf,t.registerVisual=Sf,t.registerLoading=If,t.extendComponentModel=Tf,t.extendComponentView=Af,t.extendSeriesModel=Df,t.extendChartView=Cf,t.setCanvasCreator=function(t){f("createCanvas",t)},t.registerMap=function(t,e,i){Sd.registerMap(t,e,i)},t.getMap=function(t){var e=Sd.retrieveMap(t);return e&&e[0]&&{geoJson:e[0].geoJSON,specialAreas:e[0].specialAreas}},t.dataTool={},t.zrender=Oo,t.number=Ql,t.format=mu,t.throttle=Lc,t.helper=Sg,t.matrix=pe,t.vector=It,t.color=Je,t.parseGeoJSON=Cg,t.parseGeoJson=Wg,t.util=Hg,t.graphic=Zg,t.List=Yf,t.Model=Cl,t.Axis=Gg,t.env=v});
diff --git a/assets/lib/lazysizes/lazysizes.min.js b/assets/lib/lazysizes/lazysizes.min.js
index 58ca92c5..ca34f126 100755
--- a/assets/lib/lazysizes/lazysizes.min.js
+++ b/assets/lib/lazysizes/lazysizes.min.js
@@ -1,2 +1,3 @@
-/*! lazysizes - v5.2.0 */
-!function(a,b){var c=b(a,a.document,Date);a.lazySizes=c,"object"==typeof module&&module.exports&&(module.exports=c)}("undefined"!=typeof window?window:{},function(a,b,c){"use strict";var d,e;if(function(){var b,c={lazyClass:"lazyload",loadedClass:"lazyloaded",loadingClass:"lazyloading",preloadClass:"lazypreload",errorClass:"lazyerror",autosizesClass:"lazyautosizes",srcAttr:"data-src",srcsetAttr:"data-srcset",sizesAttr:"data-sizes",minSize:40,customMedia:{},init:!0,expFactor:1.5,hFac:.8,loadMode:2,loadHidden:!0,ricTimeout:0,throttleDelay:125};e=a.lazySizesConfig||a.lazysizesConfig||{};for(b in c)b in e||(e[b]=c[b])}(),!b||!b.getElementsByClassName)return{init:function(){},cfg:e,noSupport:!0};var f=b.documentElement,g=a.HTMLPictureElement,h="addEventListener",i="getAttribute",j=a[h].bind(a),k=a.setTimeout,l=a.requestAnimationFrame||k,m=a.requestIdleCallback,n=/^picture$/i,o=["load","error","lazyincluded","_lazyloaded"],p={},q=Array.prototype.forEach,r=function(a,b){return p[b]||(p[b]=new RegExp("(\\s|^)"+b+"(\\s|$)")),p[b].test(a[i]("class")||"")&&p[b]},s=function(a,b){r(a,b)||a.setAttribute("class",(a[i]("class")||"").trim()+" "+b)},t=function(a,b){var c;(c=r(a,b))&&a.setAttribute("class",(a[i]("class")||"").replace(c," "))},u=function(a,b,c){var d=c?h:"removeEventListener";c&&u(a,b),o.forEach(function(c){a[d](c,b)})},v=function(a,c,e,f,g){var h=b.createEvent("Event");return e||(e={}),e.instance=d,h.initEvent(c,!f,!g),h.detail=e,a.dispatchEvent(h),h},w=function(b,c){var d;!g&&(d=a.picturefill||e.pf)?(c&&c.src&&!b[i]("srcset")&&b.setAttribute("srcset",c.src),d({reevaluate:!0,elements:[b]})):c&&c.src&&(b.src=c.src)},x=function(a,b){return(getComputedStyle(a,null)||{})[b]},y=function(a,b,c){for(c=c||a.offsetWidth;c<e.minSize&&b&&!a._lazysizesWidth;)c=b.offsetWidth,b=b.parentNode;return c},z=function(){var a,c,d=[],e=[],f=d,g=function(){var b=f;for(f=d.length?e:d,a=!0,c=!1;b.length;)b.shift()();a=!1},h=function(d,e){a&&!e?d.apply(this,arguments):(f.push(d),c||(c=!0,(b.hidden?k:l)(g)))};return h._lsFlush=g,h}(),A=function(a,b){return b?function(){z(a)}:function(){var b=this,c=arguments;z(function(){a.apply(b,c)})}},B=function(a){var b,d=0,f=e.throttleDelay,g=e.ricTimeout,h=function(){b=!1,d=c.now(),a()},i=m&&g>49?function(){m(h,{timeout:g}),g!==e.ricTimeout&&(g=e.ricTimeout)}:A(function(){k(h)},!0);return function(a){var e;(a=!0===a)&&(g=33),b||(b=!0,e=f-(c.now()-d),e<0&&(e=0),a||e<9?i():k(i,e))}},C=function(a){var b,d,e=99,f=function(){b=null,a()},g=function(){var a=c.now()-d;a<e?k(g,e-a):(m||f)(f)};return function(){d=c.now(),b||(b=k(g,e))}},D=function(){var g,m,o,p,y,D,F,G,H,I,J,K,L=/^img$/i,M=/^iframe$/i,N="onscroll"in a&&!/(gle|ing)bot/.test(navigator.userAgent),O=0,P=0,Q=0,R=-1,S=function(a){Q--,(!a||Q<0||!a.target)&&(Q=0)},T=function(a){return null==K&&(K="hidden"==x(b.body,"visibility")),K||!("hidden"==x(a.parentNode,"visibility")&&"hidden"==x(a,"visibility"))},U=function(a,c){var d,e=a,g=T(a);for(G-=c,J+=c,H-=c,I+=c;g&&(e=e.offsetParent)&&e!=b.body&&e!=f;)(g=(x(e,"opacity")||1)>0)&&"visible"!=x(e,"overflow")&&(d=e.getBoundingClientRect(),g=I>d.left&&H<d.right&&J>d.top-1&&G<d.bottom+1);return g},V=function(){var a,c,h,j,k,l,n,o,q,r,s,t,u=d.elements;if((p=e.loadMode)&&Q<8&&(a=u.length)){for(c=0,R++;c<a;c++)if(u[c]&&!u[c]._lazyRace)if(!N||d.prematureUnveil&&d.prematureUnveil(u[c]))ba(u[c]);else if((o=u[c][i]("data-expand"))&&(l=1*o)||(l=P),r||(r=!e.expand||e.expand<1?f.clientHeight>500&&f.clientWidth>500?500:370:e.expand,d._defEx=r,s=r*e.expFactor,t=e.hFac,K=null,P<s&&Q<1&&R>2&&p>2&&!b.hidden?(P=s,R=0):P=p>1&&R>1&&Q<6?r:O),q!==l&&(D=innerWidth+l*t,F=innerHeight+l,n=-1*l,q=l),h=u[c].getBoundingClientRect(),(J=h.bottom)>=n&&(G=h.top)<=F&&(I=h.right)>=n*t&&(H=h.left)<=D&&(J||I||H||G)&&(e.loadHidden||T(u[c]))&&(m&&Q<3&&!o&&(p<3||R<4)||U(u[c],l))){if(ba(u[c]),k=!0,Q>9)break}else!k&&m&&!j&&Q<4&&R<4&&p>2&&(g[0]||e.preloadAfterLoad)&&(g[0]||!o&&(J||I||H||G||"auto"!=u[c][i](e.sizesAttr)))&&(j=g[0]||u[c]);j&&!k&&ba(j)}},W=B(V),X=function(a){var b=a.target;if(b._lazyCache)return void delete b._lazyCache;S(a),s(b,e.loadedClass),t(b,e.loadingClass),u(b,Z),v(b,"lazyloaded")},Y=A(X),Z=function(a){Y({target:a.target})},$=function(a,b){try{a.contentWindow.location.replace(b)}catch(c){a.src=b}},_=function(a){var b,c=a[i](e.srcsetAttr);(b=e.customMedia[a[i]("data-media")||a[i]("media")])&&a.setAttribute("media",b),c&&a.setAttribute("srcset",c)},aa=A(function(a,b,c,d,f){var g,h,j,l,m,p;(m=v(a,"lazybeforeunveil",b)).defaultPrevented||(d&&(c?s(a,e.autosizesClass):a.setAttribute("sizes",d)),h=a[i](e.srcsetAttr),g=a[i](e.srcAttr),f&&(j=a.parentNode,l=j&&n.test(j.nodeName||"")),p=b.firesLoad||"src"in a&&(h||g||l),m={target:a},s(a,e.loadingClass),p&&(clearTimeout(o),o=k(S,2500),u(a,Z,!0)),l&&q.call(j.getElementsByTagName("source"),_),h?a.setAttribute("srcset",h):g&&!l&&(M.test(a.nodeName)?$(a,g):a.src=g),f&&(h||l)&&w(a,{src:g})),a._lazyRace&&delete a._lazyRace,t(a,e.lazyClass),z(function(){var b=a.complete&&a.naturalWidth>1;p&&!b||(b&&s(a,"ls-is-cached"),X(m),a._lazyCache=!0,k(function(){"_lazyCache"in a&&delete a._lazyCache},9)),"lazy"==a.loading&&Q--},!0)}),ba=function(a){if(!a._lazyRace){var b,c=L.test(a.nodeName),d=c&&(a[i](e.sizesAttr)||a[i]("sizes")),f="auto"==d;(!f&&m||!c||!a[i]("src")&&!a.srcset||a.complete||r(a,e.errorClass)||!r(a,e.lazyClass))&&(b=v(a,"lazyunveilread").detail,f&&E.updateElem(a,!0,a.offsetWidth),a._lazyRace=!0,Q++,aa(a,b,f,d,c))}},ca=C(function(){e.loadMode=3,W()}),da=function(){3==e.loadMode&&(e.loadMode=2),ca()},ea=function(){if(!m){if(c.now()-y<999)return void k(ea,999);m=!0,e.loadMode=3,W(),j("scroll",da,!0)}};return{_:function(){y=c.now(),d.elements=b.getElementsByClassName(e.lazyClass),g=b.getElementsByClassName(e.lazyClass+" "+e.preloadClass),j("scroll",W,!0),j("resize",W,!0),j("pageshow",function(a){if(a.persisted){var c=b.querySelectorAll("."+e.loadingClass);c.length&&c.forEach&&l(function(){c.forEach(function(a){a.complete&&ba(a)})})}}),a.MutationObserver?new MutationObserver(W).observe(f,{childList:!0,subtree:!0,attributes:!0}):(f[h]("DOMNodeInserted",W,!0),f[h]("DOMAttrModified",W,!0),setInterval(W,999)),j("hashchange",W,!0),["focus","mouseover","click","load","transitionend","animationend"].forEach(function(a){b[h](a,W,!0)}),/d$|^c/.test(b.readyState)?ea():(j("load",ea),b[h]("DOMContentLoaded",W),k(ea,2e4)),d.elements.length?(V(),z._lsFlush()):W()},checkElems:W,unveil:ba,_aLSL:da}}(),E=function(){var a,c=A(function(a,b,c,d){var e,f,g;if(a._lazysizesWidth=d,d+="px",a.setAttribute("sizes",d),n.test(b.nodeName||""))for(e=b.getElementsByTagName("source"),f=0,g=e.length;f<g;f++)e[f].setAttribute("sizes",d);c.detail.dataAttr||w(a,c.detail)}),d=function(a,b,d){var e,f=a.parentNode;f&&(d=y(a,f,d),e=v(a,"lazybeforesizes",{width:d,dataAttr:!!b}),e.defaultPrevented||(d=e.detail.width)&&d!==a._lazysizesWidth&&c(a,f,e,d))},f=function(){var b,c=a.length;if(c)for(b=0;b<c;b++)d(a[b])},g=C(f);return{_:function(){a=b.getElementsByClassName(e.autosizesClass),j("resize",g)},checkElems:g,updateElem:d}}(),F=function(){!F.i&&b.getElementsByClassName&&(F.i=!0,E._(),D._())};return k(function(){e.init&&F()}),d={cfg:e,autoSizer:E,loader:D,init:F,uP:w,aC:s,rC:t,hC:r,fire:v,gW:y,rAF:z}}); \ No newline at end of file
+/*! lazysizes - v5.2.2 */
+
+!function(e){var t=function(u,D,f){"use strict";var k,H;if(function(){var e;var t={lazyClass:"lazyload",loadedClass:"lazyloaded",loadingClass:"lazyloading",preloadClass:"lazypreload",errorClass:"lazyerror",autosizesClass:"lazyautosizes",srcAttr:"data-src",srcsetAttr:"data-srcset",sizesAttr:"data-sizes",minSize:40,customMedia:{},init:true,expFactor:1.5,hFac:.8,loadMode:2,loadHidden:true,ricTimeout:0,throttleDelay:125};H=u.lazySizesConfig||u.lazysizesConfig||{};for(e in t){if(!(e in H)){H[e]=t[e]}}}(),!D||!D.getElementsByClassName){return{init:function(){},cfg:H,noSupport:true}}var O=D.documentElement,a=u.HTMLPictureElement,P="addEventListener",$="getAttribute",q=u[P].bind(u),I=u.setTimeout,U=u.requestAnimationFrame||I,l=u.requestIdleCallback,j=/^picture$/i,r=["load","error","lazyincluded","_lazyloaded"],i={},G=Array.prototype.forEach,J=function(e,t){if(!i[t]){i[t]=new RegExp("(\\s|^)"+t+"(\\s|$)")}return i[t].test(e[$]("class")||"")&&i[t]},K=function(e,t){if(!J(e,t)){e.setAttribute("class",(e[$]("class")||"").trim()+" "+t)}},Q=function(e,t){var i;if(i=J(e,t)){e.setAttribute("class",(e[$]("class")||"").replace(i," "))}},V=function(t,i,e){var a=e?P:"removeEventListener";if(e){V(t,i)}r.forEach(function(e){t[a](e,i)})},X=function(e,t,i,a,r){var n=D.createEvent("Event");if(!i){i={}}i.instance=k;n.initEvent(t,!a,!r);n.detail=i;e.dispatchEvent(n);return n},Y=function(e,t){var i;if(!a&&(i=u.picturefill||H.pf)){if(t&&t.src&&!e[$]("srcset")){e.setAttribute("srcset",t.src)}i({reevaluate:true,elements:[e]})}else if(t&&t.src){e.src=t.src}},Z=function(e,t){return(getComputedStyle(e,null)||{})[t]},s=function(e,t,i){i=i||e.offsetWidth;while(i<H.minSize&&t&&!e._lazysizesWidth){i=t.offsetWidth;t=t.parentNode}return i},ee=function(){var i,a;var t=[];var r=[];var n=t;var s=function(){var e=n;n=t.length?r:t;i=true;a=false;while(e.length){e.shift()()}i=false};var e=function(e,t){if(i&&!t){e.apply(this,arguments)}else{n.push(e);if(!a){a=true;(D.hidden?I:U)(s)}}};e._lsFlush=s;return e}(),te=function(i,e){return e?function(){ee(i)}:function(){var e=this;var t=arguments;ee(function(){i.apply(e,t)})}},ie=function(e){var i;var a=0;var r=H.throttleDelay;var n=H.ricTimeout;var t=function(){i=false;a=f.now();e()};var s=l&&n>49?function(){l(t,{timeout:n});if(n!==H.ricTimeout){n=H.ricTimeout}}:te(function(){I(t)},true);return function(e){var t;if(e=e===true){n=33}if(i){return}i=true;t=r-(f.now()-a);if(t<0){t=0}if(e||t<9){s()}else{I(s,t)}}},ae=function(e){var t,i;var a=99;var r=function(){t=null;e()};var n=function(){var e=f.now()-i;if(e<a){I(n,a-e)}else{(l||r)(r)}};return function(){i=f.now();if(!t){t=I(n,a)}}},e=function(){var v,m,c,h,e;var y,z,g,p,C,b,A;var n=/^img$/i;var d=/^iframe$/i;var E="onscroll"in u&&!/(gle|ing)bot/.test(navigator.userAgent);var _=0;var w=0;var N=0;var M=-1;var x=function(e){N--;if(!e||N<0||!e.target){N=0}};var W=function(e){if(A==null){A=Z(D.body,"visibility")=="hidden"}return A||!(Z(e.parentNode,"visibility")=="hidden"&&Z(e,"visibility")=="hidden")};var S=function(e,t){var i;var a=e;var r=W(e);g-=t;b+=t;p-=t;C+=t;while(r&&(a=a.offsetParent)&&a!=D.body&&a!=O){r=(Z(a,"opacity")||1)>0;if(r&&Z(a,"overflow")!="visible"){i=a.getBoundingClientRect();r=C>i.left&&p<i.right&&b>i.top-1&&g<i.bottom+1}}return r};var t=function(){var e,t,i,a,r,n,s,l,o,u,f,c;var d=k.elements;if((h=H.loadMode)&&N<8&&(e=d.length)){t=0;M++;for(;t<e;t++){if(!d[t]||d[t]._lazyRace){continue}if(!E||k.prematureUnveil&&k.prematureUnveil(d[t])){R(d[t]);continue}if(!(l=d[t][$]("data-expand"))||!(n=l*1)){n=w}if(!u){u=!H.expand||H.expand<1?O.clientHeight>500&&O.clientWidth>500?500:370:H.expand;k._defEx=u;f=u*H.expFactor;c=H.hFac;A=null;if(w<f&&N<1&&M>2&&h>2&&!D.hidden){w=f;M=0}else if(h>1&&M>1&&N<6){w=u}else{w=_}}if(o!==n){y=innerWidth+n*c;z=innerHeight+n;s=n*-1;o=n}i=d[t].getBoundingClientRect();if((b=i.bottom)>=s&&(g=i.top)<=z&&(C=i.right)>=s*c&&(p=i.left)<=y&&(b||C||p||g)&&(H.loadHidden||W(d[t]))&&(m&&N<3&&!l&&(h<3||M<4)||S(d[t],n))){R(d[t]);r=true;if(N>9){break}}else if(!r&&m&&!a&&N<4&&M<4&&h>2&&(v[0]||H.preloadAfterLoad)&&(v[0]||!l&&(b||C||p||g||d[t][$](H.sizesAttr)!="auto"))){a=v[0]||d[t]}}if(a&&!r){R(a)}}};var i=ie(t);var B=function(e){var t=e.target;if(t._lazyCache){delete t._lazyCache;return}x(e);K(t,H.loadedClass);Q(t,H.loadingClass);V(t,L);X(t,"lazyloaded")};var a=te(B);var L=function(e){a({target:e.target})};var T=function(t,i){try{t.contentWindow.location.replace(i)}catch(e){t.src=i}};var F=function(e){var t;var i=e[$](H.srcsetAttr);if(t=H.customMedia[e[$]("data-media")||e[$]("media")]){e.setAttribute("media",t)}if(i){e.setAttribute("srcset",i)}};var s=te(function(t,e,i,a,r){var n,s,l,o,u,f;if(!(u=X(t,"lazybeforeunveil",e)).defaultPrevented){if(a){if(i){K(t,H.autosizesClass)}else{t.setAttribute("sizes",a)}}s=t[$](H.srcsetAttr);n=t[$](H.srcAttr);if(r){l=t.parentNode;o=l&&j.test(l.nodeName||"")}f=e.firesLoad||"src"in t&&(s||n||o);u={target:t};K(t,H.loadingClass);if(f){clearTimeout(c);c=I(x,2500);V(t,L,true)}if(o){G.call(l.getElementsByTagName("source"),F)}if(s){t.setAttribute("srcset",s)}else if(n&&!o){if(d.test(t.nodeName)){T(t,n)}else{t.src=n}}if(r&&(s||o)){Y(t,{src:n})}}if(t._lazyRace){delete t._lazyRace}Q(t,H.lazyClass);ee(function(){var e=t.complete&&t.naturalWidth>1;if(!f||e){if(e){K(t,"ls-is-cached")}B(u);t._lazyCache=true;I(function(){if("_lazyCache"in t){delete t._lazyCache}},9)}if(t.loading=="lazy"){N--}},true)});var R=function(e){if(e._lazyRace){return}var t;var i=n.test(e.nodeName);var a=i&&(e[$](H.sizesAttr)||e[$]("sizes"));var r=a=="auto";if((r||!m)&&i&&(e[$]("src")||e.srcset)&&!e.complete&&!J(e,H.errorClass)&&J(e,H.lazyClass)){return}t=X(e,"lazyunveilread").detail;if(r){re.updateElem(e,true,e.offsetWidth)}e._lazyRace=true;N++;s(e,t,r,a,i)};var r=ae(function(){H.loadMode=3;i()});var l=function(){if(H.loadMode==3){H.loadMode=2}r()};var o=function(){if(m){return}if(f.now()-e<999){I(o,999);return}m=true;H.loadMode=3;i();q("scroll",l,true)};return{_:function(){e=f.now();k.elements=D.getElementsByClassName(H.lazyClass);v=D.getElementsByClassName(H.lazyClass+" "+H.preloadClass);q("scroll",i,true);q("resize",i,true);q("pageshow",function(e){if(e.persisted){var t=D.querySelectorAll("."+H.loadingClass);if(t.length&&t.forEach){U(function(){t.forEach(function(e){if(e.complete){R(e)}})})}}});if(u.MutationObserver){new MutationObserver(i).observe(O,{childList:true,subtree:true,attributes:true})}else{O[P]("DOMNodeInserted",i,true);O[P]("DOMAttrModified",i,true);setInterval(i,999)}q("hashchange",i,true);["focus","mouseover","click","load","transitionend","animationend"].forEach(function(e){D[P](e,i,true)});if(/d$|^c/.test(D.readyState)){o()}else{q("load",o);D[P]("DOMContentLoaded",i);I(o,2e4)}if(k.elements.length){t();ee._lsFlush()}else{i()}},checkElems:i,unveil:R,_aLSL:l}}(),re=function(){var i;var n=te(function(e,t,i,a){var r,n,s;e._lazysizesWidth=a;a+="px";e.setAttribute("sizes",a);if(j.test(t.nodeName||"")){r=t.getElementsByTagName("source");for(n=0,s=r.length;n<s;n++){r[n].setAttribute("sizes",a)}}if(!i.detail.dataAttr){Y(e,i.detail)}});var a=function(e,t,i){var a;var r=e.parentNode;if(r){i=s(e,r,i);a=X(e,"lazybeforesizes",{width:i,dataAttr:!!t});if(!a.defaultPrevented){i=a.detail.width;if(i&&i!==e._lazysizesWidth){n(e,r,a,i)}}}};var e=function(){var e;var t=i.length;if(t){e=0;for(;e<t;e++){a(i[e])}}};var t=ae(e);return{_:function(){i=D.getElementsByClassName(H.autosizesClass);q("resize",t)},checkElems:t,updateElem:a}}(),t=function(){if(!t.i&&D.getElementsByClassName){t.i=true;re._();e._()}};return I(function(){H.init&&t()}),k={cfg:H,autoSizer:re,loader:e,init:t,uP:Y,aC:K,rC:Q,hC:J,fire:X,gW:s,rAF:ee}}(e,e.document,Date);e.lazySizes=t,"object"==typeof module&&module.exports&&(module.exports=t)}("undefined"!=typeof window?window:{}); \ No newline at end of file
diff --git a/assets/lib/lightgallery/lg-thumbnail.min.js b/assets/lib/lightgallery/lg-thumbnail.min.js
index b9544463..7cf73948 100644
--- a/assets/lib/lightgallery/lg-thumbnail.min.js
+++ b/assets/lib/lightgallery/lg-thumbnail.min.js
@@ -1,7 +1,7 @@
/**!
- * lg-thumbnail.js | 1.0.0 | August 8th 2018
+ * lg-thumbnail.js | 1.2.0 | May 20th 2020
* http://sachinchoolur.github.io/lg-thumbnail.js
* Copyright (c) 2016 Sachin N;
* @license GPLv3
*/
-!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.LgThumbnail=t()}}(function(){var t,e,i;return function(){function t(e,i,o){function u(s,l){if(!i[s]){if(!e[s]){var h="function"==typeof require&&require;if(!l&&h)return h(s,!0);if(r)return r(s,!0);var n=new Error("Cannot find module '"+s+"'");throw n.code="MODULE_NOT_FOUND",n}var a=i[s]={exports:{}};e[s][0].call(a.exports,function(t){return u(e[s][1][t]||t)},a,a.exports,t,e,i,o)}return i[s].exports}for(var r="function"==typeof require&&require,s=0;s<o.length;s++)u(o[s]);return u}return t}()({1:[function(e,i,o){!function(e,i){if("function"==typeof t&&t.amd)t([],i);else if(void 0!==o)i();else{var u={exports:{}};i(),e.lgThumbnail=u.exports}}(this,function(){"use strict";var t=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(t[o]=i[o])}return t},e={thumbnail:!0,animateThumb:!0,currentPagerPosition:"middle",thumbWidth:100,thumbContHeight:100,thumbMargin:5,exThumbImage:!1,showThumbByDefault:!0,toggleThumb:!0,pullCaptionUp:!0,enableThumbDrag:!0,enableThumbSwipe:!0,swipeThreshold:50,loadYoutubeThumbnail:!0,youtubeThumbSize:1,loadVimeoThumbnail:!0,vimeoThumbSize:"thumbnail_small",loadDailymotionThumbnail:!0},i=function i(o){return this.el=o,this.core=window.lgData[this.el.getAttribute("lg-uid")],this.core.s=t({},e,this.core.s),this.thumbOuter=null,this.thumbOuterWidth=0,this.thumbTotalWidth=this.core.items.length*(this.core.s.thumbWidth+this.core.s.thumbMargin),this.thumbIndex=this.core.index,this.left=0,this.init(),this};i.prototype.init=function(){var t=this;this.core.s.thumbnail&&this.core.items.length>1&&(this.core.s.showThumbByDefault&&setTimeout(function(){utils.addClass(t.core.outer,"lg-thumb-open")},700),this.core.s.pullCaptionUp&&utils.addClass(this.core.outer,"lg-pull-caption-up"),this.build(),this.core.s.animateThumb?(this.core.s.enableThumbDrag&&!this.core.isTouch&&this.core.doCss()&&this.enableThumbDrag(),this.core.s.enableThumbSwipe&&this.core.isTouch&&this.core.doCss()&&this.enableThumbSwipe(),this.thumbClickable=!1):this.thumbClickable=!0,this.toggle(),this.thumbkeyPress())},i.prototype.build=function(){function t(t,u,r){var s=e.core.isVideo(t,r)||{},l,h="";s.youtube||s.vimeo||s.dailymotion?s.youtube?l=e.core.s.loadYoutubeThumbnail?"//img.youtube.com/vi/"+s.youtube[1]+"/"+e.core.s.youtubeThumbSize+".jpg":u:s.vimeo?e.core.s.loadVimeoThumbnail?(l="//i.vimeocdn.com/video/error_"+o+".jpg",h=s.vimeo[1]):l=u:s.dailymotion&&(l=e.core.s.loadDailymotionThumbnail?"//www.dailymotion.com/thumbnail/video/"+s.dailymotion[1]:u):l=u,i+='<div data-vimeo-id="'+h+'" class="lg-thumb-item" style="width:'+e.core.s.thumbWidth+"px; margin-right: "+e.core.s.thumbMargin+'px"><img src="'+l+'" /></div>',h=""}var e=this,i="",o="",u,r='<div class="lg-thumb-outer"><div class="lg-thumb group"></div></div>';switch(this.core.s.vimeoThumbSize){case"thumbnail_large":o="640";break;case"thumbnail_medium":o="200x150";break;case"thumbnail_small":o="100x75"}if(utils.addClass(e.core.outer,"lg-has-thumb"),e.core.outer.querySelector(".lg").insertAdjacentHTML("beforeend",r),e.thumbOuter=e.core.outer.querySelector(".lg-thumb-outer"),e.thumbOuterWidth=e.thumbOuter.offsetWidth,e.core.s.animateThumb&&(e.core.outer.querySelector(".lg-thumb").style.width=e.thumbTotalWidth+"px",e.core.outer.querySelector(".lg-thumb").style.position="relative"),this.core.s.animateThumb&&(e.thumbOuter.style.height=e.core.s.thumbContHeight+"px"),e.core.s.dynamic)for(var s=0;s<e.core.s.dynamicEl.length;s++)t(e.core.s.dynamicEl[s].src,e.core.s.dynamicEl[s].thumb,s);else for(var l=0;l<e.core.items.length;l++)e.core.s.exThumbImage?t(e.core.items[l].getAttribute("href")||e.core.items[l].getAttribute("data-src"),e.core.items[l].getAttribute(e.core.s.exThumbImage),l):t(e.core.items[l].getAttribute("href")||e.core.items[l].getAttribute("data-src"),e.core.items[l].querySelector("img").getAttribute("src"),l);e.core.outer.querySelector(".lg-thumb").innerHTML=i,u=e.core.outer.querySelectorAll(".lg-thumb-item");for(var h=0;h<u.length;h++)!function(t){var i=u[t],o=i.getAttribute("data-vimeo-id");if(o){window["lgJsonP"+e.el.getAttribute("lg-uid")+h]=function(t){i.querySelector("img").setAttribute("src",t[0][e.core.s.vimeoThumbSize])};var r=document.createElement("script");r.className="lg-script",r.src="//www.vimeo.com/api/v2/video/"+o+".json?callback=lgJsonP"+e.el.getAttribute("lg-uid")+h,document.body.appendChild(r)}}(h);utils.addClass(u[e.core.index],"active"),utils.on(e.core.el,"onBeforeSlide.lgtm",function(){for(var t=0;t<u.length;t++)utils.removeClass(u[t],"active");utils.addClass(u[e.core.index],"active")});for(var n=0;n<u.length;n++)!function(t){utils.on(u[t],"click.lg touchend.lg",function(){setTimeout(function(){(e.thumbClickable&&!e.core.lgBusy||!e.core.doCss())&&(e.core.index=t,e.core.slide(e.core.index,!1,!0))},50)})}(n);utils.on(e.core.el,"onBeforeSlide.lgtm",function(){e.animateThumb(e.core.index)}),utils.on(window,"resize.lgthumb orientationchange.lgthumb",function(){setTimeout(function(){e.animateThumb(e.core.index),e.thumbOuterWidth=e.thumbOuter.offsetWidth},200)})},i.prototype.setTranslate=function(t){utils.setVendor(this.core.outer.querySelector(".lg-thumb"),"Transform","translate3d(-"+t+"px, 0px, 0px)")},i.prototype.animateThumb=function(t){var e=this.core.outer.querySelector(".lg-thumb");if(this.core.s.animateThumb){var i;switch(this.core.s.currentPagerPosition){case"left":i=0;break;case"middle":i=this.thumbOuterWidth/2-this.core.s.thumbWidth/2;break;case"right":i=this.thumbOuterWidth-this.core.s.thumbWidth}this.left=(this.core.s.thumbWidth+this.core.s.thumbMargin)*t-1-i,this.left>this.thumbTotalWidth-this.thumbOuterWidth&&(this.left=this.thumbTotalWidth-this.thumbOuterWidth),this.left<0&&(this.left=0),this.core.lGalleryOn?(utils.hasClass(e,"on")||utils.setVendor(this.core.outer.querySelector(".lg-thumb"),"TransitionDuration",this.core.s.speed+"ms"),this.core.doCss()||(e.style.left=-this.left+"px")):this.core.doCss()||(e.style.left=-this.left+"px"),this.setTranslate(this.left)}},i.prototype.enableThumbDrag=function(){var t=this,e=0,i=0,o=!1,u=!1,r=0;utils.addClass(t.thumbOuter,"lg-grab"),utils.on(t.core.outer.querySelector(".lg-thumb"),"mousedown.lgthumb",function(i){t.thumbTotalWidth>t.thumbOuterWidth&&(i.preventDefault(),e=i.pageX,o=!0,t.core.outer.scrollLeft+=1,t.core.outer.scrollLeft-=1,t.thumbClickable=!1,utils.removeClass(t.thumbOuter,"lg-grab"),utils.addClass(t.thumbOuter,"lg-grabbing"))}),utils.on(window,"mousemove.lgthumb",function(s){o&&(r=t.left,u=!0,i=s.pageX,utils.addClass(t.thumbOuter,"lg-dragging"),r-=i-e,r>t.thumbTotalWidth-t.thumbOuterWidth&&(r=t.thumbTotalWidth-t.thumbOuterWidth),r<0&&(r=0),t.setTranslate(r))}),utils.on(window,"mouseup.lgthumb",function(){u?(u=!1,utils.removeClass(t.thumbOuter,"lg-dragging"),t.left=r,Math.abs(i-e)<t.core.s.swipeThreshold&&(t.thumbClickable=!0)):t.thumbClickable=!0,o&&(o=!1,utils.removeClass(t.thumbOuter,"lg-grabbing"),utils.addClass(t.thumbOuter,"lg-grab"))})},i.prototype.enableThumbSwipe=function(){var t=this,e=0,i=0,o=!1,u=0;utils.on(t.core.outer.querySelector(".lg-thumb"),"touchstart.lg",function(i){t.thumbTotalWidth>t.thumbOuterWidth&&(i.preventDefault(),e=i.targetTouches[0].pageX,t.thumbClickable=!1)}),utils.on(t.core.outer.querySelector(".lg-thumb"),"touchmove.lg",function(r){t.thumbTotalWidth>t.thumbOuterWidth&&(r.preventDefault(),i=r.targetTouches[0].pageX,o=!0,utils.addClass(t.thumbOuter,"lg-dragging"),u=t.left,u-=i-e,u>t.thumbTotalWidth-t.thumbOuterWidth&&(u=t.thumbTotalWidth-t.thumbOuterWidth),u<0&&(u=0),t.setTranslate(u))}),utils.on(t.core.outer.querySelector(".lg-thumb"),"touchend.lg",function(){t.thumbTotalWidth>t.thumbOuterWidth&&o?(o=!1,utils.removeClass(t.thumbOuter,"lg-dragging"),Math.abs(i-e)<t.core.s.swipeThreshold&&(t.thumbClickable=!0),t.left=u):t.thumbClickable=!0})},i.prototype.toggle=function(){var t=this;t.core.s.toggleThumb&&(utils.addClass(t.core.outer,"lg-can-toggle"),t.thumbOuter.insertAdjacentHTML("beforeend",'<span class="lg-toggle-thumb lg-icon"></span>'),utils.on(t.core.outer.querySelector(".lg-toggle-thumb"),"click.lg",function(){utils.hasClass(t.core.outer,"lg-thumb-open")?utils.removeClass(t.core.outer,"lg-thumb-open"):utils.addClass(t.core.outer,"lg-thumb-open")}))},i.prototype.thumbkeyPress=function(){var t=this;utils.on(window,"keydown.lgthumb",function(e){38===e.keyCode?(e.preventDefault(),utils.addClass(t.core.outer,"lg-thumb-open")):40===e.keyCode&&(e.preventDefault(),utils.removeClass(t.core.outer,"lg-thumb-open"))})},i.prototype.destroy=function(t){if(this.core.s.thumbnail&&this.core.items.length>1){utils.off(window,".lgthumb"),t||this.thumbOuter.parentNode.removeChild(this.thumbOuter),utils.removeClass(this.core.outer,"lg-has-thumb");for(var e=document.getElementsByClassName("lg-script");e[0];)e[0].parentNode.removeChild(e[0])}},window.lgModules.thumbnail=i})},{}]},{},[1])(1)}); \ No newline at end of file
+!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,e.LgThumbnail=t()}}(function(){var t,e,i;return function(){function t(e,i,o){function u(s,l){if(!i[s]){if(!e[s]){var h="function"==typeof require&&require;if(!l&&h)return h(s,!0);if(r)return r(s,!0);var n=new Error("Cannot find module '"+s+"'");throw n.code="MODULE_NOT_FOUND",n}var a=i[s]={exports:{}};e[s][0].call(a.exports,function(t){return u(e[s][1][t]||t)},a,a.exports,t,e,i,o)}return i[s].exports}for(var r="function"==typeof require&&require,s=0;s<o.length;s++)u(o[s]);return u}return t}()({1:[function(e,i,o){!function(e,i){if("function"==typeof t&&t.amd)t([],i);else if(void 0!==o)i();else{var u={exports:{}};i(),e.lgThumbnail=u.exports}}(this,function(){"use strict";var t=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(t[o]=i[o])}return t},e={thumbnail:!0,animateThumb:!0,currentPagerPosition:"middle",thumbWidth:100,thumbContHeight:100,thumbMargin:5,exThumbImage:!1,showThumbByDefault:!0,toggleThumb:!0,pullCaptionUp:!0,enableThumbDrag:!0,enableThumbSwipe:!0,swipeThreshold:50,loadYoutubeThumbnail:!0,youtubeThumbSize:1,loadVimeoThumbnail:!0,vimeoThumbSize:"thumbnail_small",loadDailymotionThumbnail:!0},i=function i(o){return this.el=o,this.core=window.lgData[this.el.getAttribute("lg-uid")],this.core.s=t({},e,this.core.s),this.thumbOuter=null,this.thumbOuterWidth=0,this.thumbTotalWidth=this.core.items.length*(this.core.s.thumbWidth+this.core.s.thumbMargin),this.thumbIndex=this.core.index,this.left=0,this.init(),this};i.prototype.init=function(){var t=this;this.core.s.thumbnail&&this.core.items.length>1&&(this.core.s.showThumbByDefault&&setTimeout(function(){utils.addClass(t.core.outer,"lg-thumb-open")},700),this.core.s.pullCaptionUp&&utils.addClass(this.core.outer,"lg-pull-caption-up"),this.build(),this.core.s.animateThumb?(this.core.s.enableThumbDrag&&!this.core.isTouch&&this.core.doCss()&&this.enableThumbDrag(),this.core.s.enableThumbSwipe&&this.core.isTouch&&this.core.doCss()&&this.enableThumbSwipe(),this.thumbClickable=!1):this.thumbClickable=!0,this.toggle(),this.thumbkeyPress())},i.prototype.build=function(){function t(t,u,r){var s=e.core.isVideo(t,r)||{},l,h="";s.youtube||s.vimeo||s.dailymotion?s.youtube?l=e.core.s.loadYoutubeThumbnail?"//img.youtube.com/vi/"+s.youtube[1]+"/"+e.core.s.youtubeThumbSize+".jpg":u:s.vimeo?e.core.s.loadVimeoThumbnail?(l="//i.vimeocdn.com/video/error_"+o+".jpg",h=s.vimeo[1]):l=u:s.dailymotion&&(l=e.core.s.loadDailymotionThumbnail?"//www.dailymotion.com/thumbnail/video/"+s.dailymotion[1]:u):l=u,i+='<div data-vimeo-id="'+h+'" class="lg-thumb-item" style="width:'+e.core.s.thumbWidth+"px; margin-right: "+e.core.s.thumbMargin+'px"><img src="'+l+'" /></div>',h=""}var e=this,i="",o="",u,r='<div class="lg-thumb-outer"><div class="lg-thumb group"></div></div>';switch(this.core.s.vimeoThumbSize){case"thumbnail_large":o="640";break;case"thumbnail_medium":o="200x150";break;case"thumbnail_small":o="100x75"}if(utils.addClass(e.core.outer,"lg-has-thumb"),e.core.outer.querySelector(".lg").insertAdjacentHTML("beforeend",r),e.thumbOuter=e.core.outer.querySelector(".lg-thumb-outer"),e.thumbOuterWidth=e.thumbOuter.offsetWidth,e.core.s.animateThumb&&(e.core.outer.querySelector(".lg-thumb").style.width=e.thumbTotalWidth+"px",e.core.outer.querySelector(".lg-thumb").style.position="relative"),this.core.s.animateThumb&&(e.thumbOuter.style.height=e.core.s.thumbContHeight+"px"),e.core.s.dynamic)for(var s=0;s<e.core.s.dynamicEl.length;s++)t(e.core.s.dynamicEl[s].src,e.core.s.dynamicEl[s].thumb,s);else for(var l=0;l<e.core.items.length;l++)e.core.s.exThumbImage?t(e.core.items[l].getAttribute("href")||e.core.items[l].getAttribute("data-src"),e.core.items[l].getAttribute(e.core.s.exThumbImage),l):t(e.core.items[l].getAttribute("href")||e.core.items[l].getAttribute("data-src"),e.core.items[l].querySelector("img").getAttribute("src"),l);e.core.outer.querySelector(".lg-thumb").innerHTML=i,u=e.core.outer.querySelectorAll(".lg-thumb-item");for(var h=0;h<u.length;h++)!function(t){var i=u[t],o=i.getAttribute("data-vimeo-id");if(o){window["lgJsonP"+e.el.getAttribute("lg-uid")+h]=function(t){i.querySelector("img").setAttribute("src",t[0][e.core.s.vimeoThumbSize])};var r=document.createElement("script");r.className="lg-script",r.src="//www.vimeo.com/api/v2/video/"+o+".json?callback=lgJsonP"+e.el.getAttribute("lg-uid")+h,document.body.appendChild(r)}}(h);utils.addClass(u[e.core.index],"active"),utils.on(e.core.el,"onBeforeSlide.lgtm",function(){for(var t=0;t<u.length;t++)utils.removeClass(u[t],"active");utils.addClass(u[e.core.index],"active")});for(var n=0;n<u.length;n++)!function(t){utils.on(u[t],"click.lg touchend.lg",function(){setTimeout(function(){(e.thumbClickable&&!e.core.lgBusy||!e.core.doCss())&&(e.core.index=t,e.core.slide(e.core.index,!1,!0))},50)})}(n);utils.on(e.core.el,"onBeforeSlide.lgtm",function(){e.animateThumb(e.core.index)}),utils.on(window,"resize.lgthumb orientationchange.lgthumb",function(){setTimeout(function(){e.animateThumb(e.core.index),e.thumbOuterWidth=e.thumbOuter.offsetWidth},200)})},i.prototype.setTranslate=function(t){utils.setVendor(this.core.outer.querySelector(".lg-thumb"),"Transform","translate3d(-"+t+"px, 0px, 0px)")},i.prototype.animateThumb=function(t){var e=this.core.outer.querySelector(".lg-thumb");if(this.core.s.animateThumb){var i;switch(this.core.s.currentPagerPosition){case"left":i=0;break;case"middle":i=this.thumbOuterWidth/2-this.core.s.thumbWidth/2;break;case"right":i=this.thumbOuterWidth-this.core.s.thumbWidth}this.left=(this.core.s.thumbWidth+this.core.s.thumbMargin)*t-1-i,this.left>this.thumbTotalWidth-this.thumbOuterWidth&&(this.left=this.thumbTotalWidth-this.thumbOuterWidth),this.left<0&&(this.left=0),this.core.lGalleryOn?(utils.hasClass(e,"on")||utils.setVendor(this.core.outer.querySelector(".lg-thumb"),"TransitionDuration",this.core.s.speed+"ms"),this.core.doCss()||(e.style.left=-this.left+"px")):this.core.doCss()||(e.style.left=-this.left+"px"),this.setTranslate(this.left)}},i.prototype.enableThumbDrag=function(){var t=this,e=0,i=0,o=!1,u=!1,r=0;utils.addClass(t.thumbOuter,"lg-grab"),utils.on(t.core.outer.querySelector(".lg-thumb"),"mousedown.lgthumb",function(i){t.thumbTotalWidth>t.thumbOuterWidth&&(i.preventDefault(),e=i.pageX,o=!0,t.core.outer.scrollLeft+=1,t.core.outer.scrollLeft-=1,t.thumbClickable=!1,utils.removeClass(t.thumbOuter,"lg-grab"),utils.addClass(t.thumbOuter,"lg-grabbing"))}),utils.on(window,"mousemove.lgthumb",function(s){o&&(r=t.left,u=!0,i=s.pageX,utils.addClass(t.thumbOuter,"lg-dragging"),r-=i-e,r>t.thumbTotalWidth-t.thumbOuterWidth&&(r=t.thumbTotalWidth-t.thumbOuterWidth),r<0&&(r=0),t.setTranslate(r))}),utils.on(window,"mouseup.lgthumb",function(){u?(u=!1,utils.removeClass(t.thumbOuter,"lg-dragging"),t.left=r,Math.abs(i-e)<t.core.s.swipeThreshold&&(t.thumbClickable=!0)):t.thumbClickable=!0,o&&(o=!1,utils.removeClass(t.thumbOuter,"lg-grabbing"),utils.addClass(t.thumbOuter,"lg-grab"))})},i.prototype.enableThumbSwipe=function(){var t=this,e=0,i=0,o=!1,u=0;utils.on(t.core.outer.querySelector(".lg-thumb"),"touchstart.lg",function(i){t.thumbTotalWidth>t.thumbOuterWidth&&(i.preventDefault(),e=i.targetTouches[0].pageX,t.thumbClickable=!1)}),utils.on(t.core.outer.querySelector(".lg-thumb"),"touchmove.lg",function(r){t.thumbTotalWidth>t.thumbOuterWidth&&(r.preventDefault(),i=r.targetTouches[0].pageX,o=!0,utils.addClass(t.thumbOuter,"lg-dragging"),u=t.left,u-=i-e,u>t.thumbTotalWidth-t.thumbOuterWidth&&(u=t.thumbTotalWidth-t.thumbOuterWidth),u<0&&(u=0),t.setTranslate(u))}),utils.on(t.core.outer.querySelector(".lg-thumb"),"touchend.lg",function(){t.thumbTotalWidth>t.thumbOuterWidth&&o?(o=!1,utils.removeClass(t.thumbOuter,"lg-dragging"),Math.abs(i-e)<t.core.s.swipeThreshold&&(t.thumbClickable=!0),t.left=u):t.thumbClickable=!0})},i.prototype.toggle=function(){var t=this;t.core.s.toggleThumb&&(utils.addClass(t.core.outer,"lg-can-toggle"),t.thumbOuter.insertAdjacentHTML("beforeend",'<button aria-label="Toggle thumbnails" class="lg-toggle-thumb lg-icon"></button>'),utils.on(t.core.outer.querySelector(".lg-toggle-thumb"),"click.lg",function(){utils.hasClass(t.core.outer,"lg-thumb-open")?utils.removeClass(t.core.outer,"lg-thumb-open"):utils.addClass(t.core.outer,"lg-thumb-open")}))},i.prototype.thumbkeyPress=function(){var t=this;utils.on(window,"keydown.lgthumb",function(e){38===e.keyCode?(e.preventDefault(),utils.addClass(t.core.outer,"lg-thumb-open")):40===e.keyCode&&(e.preventDefault(),utils.removeClass(t.core.outer,"lg-thumb-open"))})},i.prototype.destroy=function(t){if(this.core.s.thumbnail&&this.core.items.length>1){utils.off(window,".lgthumb"),t||this.thumbOuter.parentNode.removeChild(this.thumbOuter),utils.removeClass(this.core.outer,"lg-has-thumb");for(var e=document.getElementsByClassName("lg-script");e[0];)e[0].parentNode.removeChild(e[0])}},window.lgModules.thumbnail=i})},{}]},{},[1])(1)}); \ No newline at end of file
diff --git a/assets/lib/lightgallery/lg-zoom.min.js b/assets/lib/lightgallery/lg-zoom.min.js
index 004a9e73..f1b0def4 100644
--- a/assets/lib/lightgallery/lg-zoom.min.js
+++ b/assets/lib/lightgallery/lg-zoom.min.js
@@ -1,7 +1,7 @@
/**!
- * lg-zoom.js | 1.0.1 | December 22nd 2016
+ * lg-zoom.js | 1.2.0 | May 20th 2020
* http://sachinchoolur.github.io/lg-zoom.js
* Copyright (c) 2016 Sachin N;
* @license GPLv3
*/
-!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.LgZoom=e()}}(function(){var e,t,o;return function e(t,o,r){function l(s,a){if(!o[s]){if(!t[s]){var n="function"==typeof require&&require;if(!a&&n)return n(s,!0);if(i)return i(s,!0);var u=new Error("Cannot find module '"+s+"'");throw u.code="MODULE_NOT_FOUND",u}var c=o[s]={exports:{}};t[s][0].call(c.exports,function(e){var o=t[s][1][e];return l(o?o:e)},c,c.exports,e,t,o,r)}return o[s].exports}for(var i="function"==typeof require&&require,s=0;s<r.length;s++)l(r[s]);return l}({1:[function(t,o,r){!function(t,o){if("function"==typeof e&&e.amd)e([],o);else if("undefined"!=typeof r)o();else{var l={exports:{}};o(),t.lgZoom=l.exports}}(this,function(){"use strict";var e=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(e[r]=o[r])}return e},t=function e(){var t=!1,o=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);return o&&parseInt(o[2],10)<54&&(t=!0),t},o={scale:1,zoom:!0,actualSize:!0,enableZoomAfter:300,useLeftForZoom:t()},r=function t(r){return this.el=r,this.core=window.lgData[this.el.getAttribute("lg-uid")],this.core.s=e({},o,this.core.s),this.core.s.zoom&&this.core.doCss()&&(this.init(),this.zoomabletimeout=!1,this.pageX=window.innerWidth/2,this.pageY=window.innerHeight/2+(document.documentElement.scrollTop||document.body.scrollTop)),this};r.prototype.init=function(){var e=this,t='<span id="lg-zoom-in" class="lg-icon"></span><span id="lg-zoom-out" class="lg-icon"></span>';e.core.s.actualSize&&(t+='<span id="lg-actual-size" class="lg-icon"></span>'),e.core.s.useLeftForZoom?utils.addClass(e.core.outer,"lg-use-left-for-zoom"):utils.addClass(e.core.outer,"lg-use-transition-for-zoom"),this.core.outer.querySelector(".lg-toolbar").insertAdjacentHTML("beforeend",t),utils.on(e.core.el,"onSlideItemLoad.lgtmzoom",function(t){var o=e.core.s.enableZoomAfter+t.detail.delay;utils.hasClass(document.body,"lg-from-hash")&&t.detail.delay?o=0:utils.removeClass(document.body,"lg-from-hash"),e.zoomabletimeout=setTimeout(function(){utils.addClass(e.core.___slide[t.detail.index],"lg-zoomable")},o+30)});var o=1,r=function t(o){var r=e.core.outer.querySelector(".lg-current .lg-image"),l,i,s=(window.innerWidth-r.clientWidth)/2,a=(window.innerHeight-r.clientHeight)/2+(document.documentElement.scrollTop||document.body.scrollTop);l=e.pageX-s,i=e.pageY-a;var n=(o-1)*l,u=(o-1)*i;utils.setVendor(r,"Transform","scale3d("+o+", "+o+", 1)"),r.setAttribute("data-scale",o),e.core.s.useLeftForZoom?(r.parentElement.style.left=-n+"px",r.parentElement.style.top=-u+"px"):utils.setVendor(r.parentElement,"Transform","translate3d(-"+n+"px, -"+u+"px, 0)"),r.parentElement.setAttribute("data-x",n),r.parentElement.setAttribute("data-y",u)},l=function t(){o>1?utils.addClass(e.core.outer,"lg-zoomed"):e.resetZoom(),o<1&&(o=1),r(o)},i=function t(r,i,s,a){var n=i.clientWidth,u;u=e.core.s.dynamic?e.core.s.dynamicEl[s].width||i.naturalWidth||n:e.core.items[s].getAttribute("data-width")||i.naturalWidth||n;var c;utils.hasClass(e.core.outer,"lg-zoomed")?o=1:u>n&&(c=u/n,o=c||2),a?(e.pageX=window.innerWidth/2,e.pageY=window.innerHeight/2+(document.documentElement.scrollTop||document.body.scrollTop)):(e.pageX=r.pageX||r.targetTouches[0].pageX,e.pageY=r.pageY||r.targetTouches[0].pageY),l(),setTimeout(function(){utils.removeClass(e.core.outer,"lg-grabbing"),utils.addClass(e.core.outer,"lg-grab")},10)},s=!1;utils.on(e.core.el,"onAferAppendSlide.lgtmzoom",function(t){var o=t.detail.index,r=e.core.___slide[o].querySelector(".lg-image");e.core.isTouch||utils.on(r,"dblclick",function(e){i(e,r,o)}),e.core.isTouch&&utils.on(r,"touchstart",function(e){s?(clearTimeout(s),s=null,i(e,r,o)):s=setTimeout(function(){s=null},300),e.preventDefault()})}),utils.on(window,"resize.lgzoom scroll.lgzoom orientationchange.lgzoom",function(){e.pageX=window.innerWidth/2,e.pageY=window.innerHeight/2+(document.documentElement.scrollTop||document.body.scrollTop),r(o)}),utils.on(document.getElementById("lg-zoom-out"),"click.lg",function(){e.core.outer.querySelector(".lg-current .lg-image")&&(o-=e.core.s.scale,l())}),utils.on(document.getElementById("lg-zoom-in"),"click.lg",function(){e.core.outer.querySelector(".lg-current .lg-image")&&(o+=e.core.s.scale,l())}),utils.on(document.getElementById("lg-actual-size"),"click.lg",function(t){i(t,e.core.___slide[e.core.index].querySelector(".lg-image"),e.core.index,!0)}),utils.on(e.core.el,"onBeforeSlide.lgtm",function(){o=1,e.resetZoom()}),e.core.isTouch||e.zoomDrag(),e.core.isTouch&&e.zoomSwipe()},r.prototype.resetZoom=function(){utils.removeClass(this.core.outer,"lg-zoomed");for(var e=0;e<this.core.___slide.length;e++)this.core.___slide[e].querySelector(".lg-img-wrap")&&(this.core.___slide[e].querySelector(".lg-img-wrap").removeAttribute("style"),this.core.___slide[e].querySelector(".lg-img-wrap").removeAttribute("data-x"),this.core.___slide[e].querySelector(".lg-img-wrap").removeAttribute("data-y"));for(var t=0;t<this.core.___slide.length;t++)this.core.___slide[t].querySelector(".lg-image")&&(this.core.___slide[t].querySelector(".lg-image").removeAttribute("style"),this.core.___slide[t].querySelector(".lg-image").removeAttribute("data-scale"));this.pageX=window.innerWidth/2,this.pageY=window.innerHeight/2+(document.documentElement.scrollTop||document.body.scrollTop)},r.prototype.zoomSwipe=function(){for(var e=this,t={},o={},r=!1,l=!1,i=!1,s=0;s<e.core.___slide.length;s++)utils.on(e.core.___slide[s],"touchstart.lg",function(o){if(utils.hasClass(e.core.outer,"lg-zoomed")){var r=e.core.___slide[e.core.index].querySelector(".lg-object");i=r.offsetHeight*r.getAttribute("data-scale")>e.core.outer.querySelector(".lg").clientHeight,l=r.offsetWidth*r.getAttribute("data-scale")>e.core.outer.querySelector(".lg").clientWidth,(l||i)&&(o.preventDefault(),t={x:o.targetTouches[0].pageX,y:o.targetTouches[0].pageY})}});for(var a=0;a<e.core.___slide.length;a++)utils.on(e.core.___slide[a],"touchmove.lg",function(s){if(utils.hasClass(e.core.outer,"lg-zoomed")){var a=e.core.___slide[e.core.index].querySelector(".lg-img-wrap"),n,u;s.preventDefault(),r=!0,o={x:s.targetTouches[0].pageX,y:s.targetTouches[0].pageY},utils.addClass(e.core.outer,"lg-zoom-dragging"),u=i?-Math.abs(a.getAttribute("data-y"))+(o.y-t.y):-Math.abs(a.getAttribute("data-y")),n=l?-Math.abs(a.getAttribute("data-x"))+(o.x-t.x):-Math.abs(a.getAttribute("data-x")),(Math.abs(o.x-t.x)>15||Math.abs(o.y-t.y)>15)&&(e.core.s.useLeftForZoom?(a.style.left=n+"px",a.style.top=u+"px"):utils.setVendor(a,"Transform","translate3d("+n+"px, "+u+"px, 0)"))}});for(var n=0;n<e.core.___slide.length;n++)utils.on(e.core.___slide[n],"touchend.lg",function(){utils.hasClass(e.core.outer,"lg-zoomed")&&r&&(r=!1,utils.removeClass(e.core.outer,"lg-zoom-dragging"),e.touchendZoom(t,o,l,i))})},r.prototype.zoomDrag=function(){for(var e=this,t={},o={},r=!1,l=!1,i=!1,s=!1,a=0;a<e.core.___slide.length;a++)utils.on(e.core.___slide[a],"mousedown.lgzoom",function(o){var l=e.core.___slide[e.core.index].querySelector(".lg-object");s=l.offsetHeight*l.getAttribute("data-scale")>e.core.outer.querySelector(".lg").clientHeight,i=l.offsetWidth*l.getAttribute("data-scale")>e.core.outer.querySelector(".lg").clientWidth,utils.hasClass(e.core.outer,"lg-zoomed")&&utils.hasClass(o.target,"lg-object")&&(i||s)&&(o.preventDefault(),t={x:o.pageX,y:o.pageY},r=!0,e.core.outer.scrollLeft+=1,e.core.outer.scrollLeft-=1,utils.removeClass(e.core.outer,"lg-grab"),utils.addClass(e.core.outer,"lg-grabbing"))});utils.on(window,"mousemove.lgzoom",function(a){if(r){var n=e.core.___slide[e.core.index].querySelector(".lg-img-wrap"),u,c;l=!0,o={x:a.pageX,y:a.pageY},utils.addClass(e.core.outer,"lg-zoom-dragging"),c=s?-Math.abs(n.getAttribute("data-y"))+(o.y-t.y):-Math.abs(n.getAttribute("data-y")),u=i?-Math.abs(n.getAttribute("data-x"))+(o.x-t.x):-Math.abs(n.getAttribute("data-x")),e.core.s.useLeftForZoom?(n.style.left=u+"px",n.style.top=c+"px"):utils.setVendor(n,"Transform","translate3d("+u+"px, "+c+"px, 0)")}}),utils.on(window,"mouseup.lgzoom",function(a){r&&(r=!1,utils.removeClass(e.core.outer,"lg-zoom-dragging"),!l||t.x===o.x&&t.y===o.y||(o={x:a.pageX,y:a.pageY},e.touchendZoom(t,o,i,s)),l=!1),utils.removeClass(e.core.outer,"lg-grabbing"),utils.addClass(e.core.outer,"lg-grab")})},r.prototype.touchendZoom=function(e,t,o,r){var l=this,i=l.core.___slide[l.core.index].querySelector(".lg-img-wrap"),s=l.core.___slide[l.core.index].querySelector(".lg-object"),a=-Math.abs(i.getAttribute("data-x"))+(t.x-e.x),n=-Math.abs(i.getAttribute("data-y"))+(t.y-e.y),u=(l.core.outer.querySelector(".lg").clientHeight-s.offsetHeight)/2,c=Math.abs(s.offsetHeight*Math.abs(s.getAttribute("data-scale"))-l.core.outer.querySelector(".lg").clientHeight+u),d=(l.core.outer.querySelector(".lg").clientWidth-s.offsetWidth)/2,g=Math.abs(s.offsetWidth*Math.abs(s.getAttribute("data-scale"))-l.core.outer.querySelector(".lg").clientWidth+d);(Math.abs(t.x-e.x)>15||Math.abs(t.y-e.y)>15)&&(r&&(n<=-c?n=-c:n>=-u&&(n=-u)),o&&(a<=-g?a=-g:a>=-d&&(a=-d)),r?i.setAttribute("data-y",Math.abs(n)):n=-Math.abs(i.getAttribute("data-y")),o?i.setAttribute("data-x",Math.abs(a)):a=-Math.abs(i.getAttribute("data-x")),l.core.s.useLeftForZoom?(i.style.left=a+"px",i.style.top=n+"px"):utils.setVendor(i,"Transform","translate3d("+a+"px, "+n+"px, 0)"))},r.prototype.destroy=function(){var e=this;utils.off(e.core.el,".lgzoom"),utils.off(window,".lgzoom");for(var t=0;t<e.core.___slide.length;t++)utils.off(e.core.___slide[t],".lgzoom");utils.off(e.core.el,".lgtmzoom"),e.resetZoom(),clearTimeout(e.zoomabletimeout),e.zoomabletimeout=!1},window.lgModules.zoom=r})},{}]},{},[1])(1)}); \ No newline at end of file
+!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.LgZoom=e()}}(function(){var e,t,o;return function(){function e(t,o,r){function l(a,s){if(!o[a]){if(!t[a]){var n="function"==typeof require&&require;if(!s&&n)return n(a,!0);if(i)return i(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var c=o[a]={exports:{}};t[a][0].call(c.exports,function(e){return l(t[a][1][e]||e)},c,c.exports,e,t,o,r)}return o[a].exports}for(var i="function"==typeof require&&require,a=0;a<r.length;a++)l(r[a]);return l}return e}()({1:[function(t,o,r){!function(t,o){if("function"==typeof e&&e.amd)e([],o);else if(void 0!==r)o();else{var l={exports:{}};o(),t.lgZoom=l.exports}}(this,function(){"use strict";var e=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(e[r]=o[r])}return e},t=function e(){var t=!1,o=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);return o&&parseInt(o[2],10)<54&&(t=!0),t},o={scale:1,zoom:!0,actualSize:!0,enableZoomAfter:300,useLeftForZoom:t()},r=function t(r){return this.el=r,this.core=window.lgData[this.el.getAttribute("lg-uid")],this.core.s=e({},o,this.core.s),this.core.s.zoom&&this.core.doCss()&&(this.init(),this.zoomabletimeout=!1,this.pageX=window.innerWidth/2,this.pageY=window.innerHeight/2+(document.documentElement.scrollTop||document.body.scrollTop)),this};r.prototype.init=function(){var e=this,t='<button aria-label="Zoom in" id="lg-zoom-in" class="lg-icon"></button><button aria-label="Zoom out" id="lg-zoom-out" class="lg-icon"></button>';e.core.s.actualSize&&(t+='<button aria-label="Actual size" id="lg-actual-size" class="lg-icon"></button>'),e.core.s.useLeftForZoom?utils.addClass(e.core.outer,"lg-use-left-for-zoom"):utils.addClass(e.core.outer,"lg-use-transition-for-zoom"),this.core.outer.querySelector(".lg-toolbar").insertAdjacentHTML("beforeend",t),utils.on(e.core.el,"onSlideItemLoad.lgtmzoom",function(t){var o=e.core.s.enableZoomAfter+t.detail.delay;utils.hasClass(document.body,"lg-from-hash")&&t.detail.delay?o=0:utils.removeClass(document.body,"lg-from-hash"),e.zoomabletimeout=setTimeout(function(){utils.addClass(e.core.___slide[t.detail.index],"lg-zoomable")},o+30)});var o=1,r=function t(o){var r=e.core.outer.querySelector(".lg-current .lg-image"),l,i,a=(window.innerWidth-r.clientWidth)/2,s=(window.innerHeight-r.clientHeight)/2+(document.documentElement.scrollTop||document.body.scrollTop);l=e.pageX-a,i=e.pageY-s;var n=(o-1)*l,u=(o-1)*i;utils.setVendor(r,"Transform","scale3d("+o+", "+o+", 1)"),r.setAttribute("data-scale",o),e.core.s.useLeftForZoom?(r.parentElement.style.left=-n+"px",r.parentElement.style.top=-u+"px"):utils.setVendor(r.parentElement,"Transform","translate3d(-"+n+"px, -"+u+"px, 0)"),r.parentElement.setAttribute("data-x",n),r.parentElement.setAttribute("data-y",u)},l=function t(){o>1?utils.addClass(e.core.outer,"lg-zoomed"):e.resetZoom(),o<1&&(o=1),r(o)},i=function t(r,i,a,s){var n=i.clientWidth,u;u=e.core.s.dynamic?e.core.s.dynamicEl[a].width||i.naturalWidth||n:e.core.items[a].getAttribute("data-width")||i.naturalWidth||n;var c;utils.hasClass(e.core.outer,"lg-zoomed")?o=1:u>n&&(c=u/n,o=c||2),s?(e.pageX=window.innerWidth/2,e.pageY=window.innerHeight/2+(document.documentElement.scrollTop||document.body.scrollTop)):(e.pageX=r.pageX||r.targetTouches[0].pageX,e.pageY=r.pageY||r.targetTouches[0].pageY),l(),setTimeout(function(){utils.removeClass(e.core.outer,"lg-grabbing"),utils.addClass(e.core.outer,"lg-grab")},10)},a=!1;utils.on(e.core.el,"onAferAppendSlide.lgtmzoom",function(t){var o=t.detail.index,r=e.core.___slide[o].querySelector(".lg-image");e.core.isTouch||utils.on(r,"dblclick",function(e){i(e,r,o)}),e.core.isTouch&&utils.on(r,"touchstart",function(e){a?(clearTimeout(a),a=null,i(e,r,o)):a=setTimeout(function(){a=null},300),e.preventDefault()})}),utils.on(window,"resize.lgzoom scroll.lgzoom orientationchange.lgzoom",function(){e.pageX=window.innerWidth/2,e.pageY=window.innerHeight/2+(document.documentElement.scrollTop||document.body.scrollTop),r(o)}),utils.on(document.getElementById("lg-zoom-out"),"click.lg",function(){e.core.outer.querySelector(".lg-current .lg-image")&&(o-=e.core.s.scale,l())}),utils.on(document.getElementById("lg-zoom-in"),"click.lg",function(){e.core.outer.querySelector(".lg-current .lg-image")&&(o+=e.core.s.scale,l())}),utils.on(document.getElementById("lg-actual-size"),"click.lg",function(t){i(t,e.core.___slide[e.core.index].querySelector(".lg-image"),e.core.index,!0)}),utils.on(e.core.el,"onBeforeSlide.lgtm",function(){o=1,e.resetZoom()}),e.core.isTouch||e.zoomDrag(),e.core.isTouch&&e.zoomSwipe()},r.prototype.resetZoom=function(){utils.removeClass(this.core.outer,"lg-zoomed");for(var e=0;e<this.core.___slide.length;e++)this.core.___slide[e].querySelector(".lg-img-wrap")&&(this.core.___slide[e].querySelector(".lg-img-wrap").removeAttribute("style"),this.core.___slide[e].querySelector(".lg-img-wrap").removeAttribute("data-x"),this.core.___slide[e].querySelector(".lg-img-wrap").removeAttribute("data-y"));for(var t=0;t<this.core.___slide.length;t++)this.core.___slide[t].querySelector(".lg-image")&&(this.core.___slide[t].querySelector(".lg-image").removeAttribute("style"),this.core.___slide[t].querySelector(".lg-image").removeAttribute("data-scale"));this.pageX=window.innerWidth/2,this.pageY=window.innerHeight/2+(document.documentElement.scrollTop||document.body.scrollTop)},r.prototype.zoomSwipe=function(){for(var e=this,t={},o={},r=!1,l=!1,i=!1,a=0;a<e.core.___slide.length;a++)utils.on(e.core.___slide[a],"touchstart.lg",function(o){if(utils.hasClass(e.core.outer,"lg-zoomed")){var r=e.core.___slide[e.core.index].querySelector(".lg-object");i=r.offsetHeight*r.getAttribute("data-scale")>e.core.outer.querySelector(".lg").clientHeight,l=r.offsetWidth*r.getAttribute("data-scale")>e.core.outer.querySelector(".lg").clientWidth,(l||i)&&(o.preventDefault(),t={x:o.targetTouches[0].pageX,y:o.targetTouches[0].pageY})}});for(var s=0;s<e.core.___slide.length;s++)utils.on(e.core.___slide[s],"touchmove.lg",function(a){if(utils.hasClass(e.core.outer,"lg-zoomed")){var s=e.core.___slide[e.core.index].querySelector(".lg-img-wrap"),n,u;a.preventDefault(),r=!0,o={x:a.targetTouches[0].pageX,y:a.targetTouches[0].pageY},utils.addClass(e.core.outer,"lg-zoom-dragging"),u=i?-Math.abs(s.getAttribute("data-y"))+(o.y-t.y):-Math.abs(s.getAttribute("data-y")),n=l?-Math.abs(s.getAttribute("data-x"))+(o.x-t.x):-Math.abs(s.getAttribute("data-x")),(Math.abs(o.x-t.x)>15||Math.abs(o.y-t.y)>15)&&(e.core.s.useLeftForZoom?(s.style.left=n+"px",s.style.top=u+"px"):utils.setVendor(s,"Transform","translate3d("+n+"px, "+u+"px, 0)"))}});for(var n=0;n<e.core.___slide.length;n++)utils.on(e.core.___slide[n],"touchend.lg",function(){utils.hasClass(e.core.outer,"lg-zoomed")&&r&&(r=!1,utils.removeClass(e.core.outer,"lg-zoom-dragging"),e.touchendZoom(t,o,l,i))})},r.prototype.zoomDrag=function(){for(var e=this,t={},o={},r=!1,l=!1,i=!1,a=!1,s=0;s<e.core.___slide.length;s++)utils.on(e.core.___slide[s],"mousedown.lgzoom",function(o){var l=e.core.___slide[e.core.index].querySelector(".lg-object");a=l.offsetHeight*l.getAttribute("data-scale")>e.core.outer.querySelector(".lg").clientHeight,i=l.offsetWidth*l.getAttribute("data-scale")>e.core.outer.querySelector(".lg").clientWidth,utils.hasClass(e.core.outer,"lg-zoomed")&&utils.hasClass(o.target,"lg-object")&&(i||a)&&(o.preventDefault(),t={x:o.pageX,y:o.pageY},r=!0,e.core.outer.scrollLeft+=1,e.core.outer.scrollLeft-=1,utils.removeClass(e.core.outer,"lg-grab"),utils.addClass(e.core.outer,"lg-grabbing"))});utils.on(window,"mousemove.lgzoom",function(s){if(r){var n=e.core.___slide[e.core.index].querySelector(".lg-img-wrap"),u,c;l=!0,o={x:s.pageX,y:s.pageY},utils.addClass(e.core.outer,"lg-zoom-dragging"),c=a?-Math.abs(n.getAttribute("data-y"))+(o.y-t.y):-Math.abs(n.getAttribute("data-y")),u=i?-Math.abs(n.getAttribute("data-x"))+(o.x-t.x):-Math.abs(n.getAttribute("data-x")),e.core.s.useLeftForZoom?(n.style.left=u+"px",n.style.top=c+"px"):utils.setVendor(n,"Transform","translate3d("+u+"px, "+c+"px, 0)")}}),utils.on(window,"mouseup.lgzoom",function(s){r&&(r=!1,utils.removeClass(e.core.outer,"lg-zoom-dragging"),!l||t.x===o.x&&t.y===o.y||(o={x:s.pageX,y:s.pageY},e.touchendZoom(t,o,i,a)),l=!1),utils.removeClass(e.core.outer,"lg-grabbing"),utils.addClass(e.core.outer,"lg-grab")})},r.prototype.touchendZoom=function(e,t,o,r){var l=this,i=l.core.___slide[l.core.index].querySelector(".lg-img-wrap"),a=l.core.___slide[l.core.index].querySelector(".lg-object"),s=-Math.abs(i.getAttribute("data-x"))+(t.x-e.x),n=-Math.abs(i.getAttribute("data-y"))+(t.y-e.y),u=(l.core.outer.querySelector(".lg").clientHeight-a.offsetHeight)/2,c=Math.abs(a.offsetHeight*Math.abs(a.getAttribute("data-scale"))-l.core.outer.querySelector(".lg").clientHeight+u),d=(l.core.outer.querySelector(".lg").clientWidth-a.offsetWidth)/2,g=Math.abs(a.offsetWidth*Math.abs(a.getAttribute("data-scale"))-l.core.outer.querySelector(".lg").clientWidth+d);(Math.abs(t.x-e.x)>15||Math.abs(t.y-e.y)>15)&&(r&&(n<=-c?n=-c:n>=-u&&(n=-u)),o&&(s<=-g?s=-g:s>=-d&&(s=-d)),r?i.setAttribute("data-y",Math.abs(n)):n=-Math.abs(i.getAttribute("data-y")),o?i.setAttribute("data-x",Math.abs(s)):s=-Math.abs(i.getAttribute("data-x")),l.core.s.useLeftForZoom?(i.style.left=s+"px",i.style.top=n+"px"):utils.setVendor(i,"Transform","translate3d("+s+"px, "+n+"px, 0)"))},r.prototype.destroy=function(){var e=this;utils.off(e.core.el,".lgzoom"),utils.off(window,".lgzoom");for(var t=0;t<e.core.___slide.length;t++)utils.off(e.core.___slide[t],".lgzoom");utils.off(e.core.el,".lgtmzoom"),e.resetZoom(),clearTimeout(e.zoomabletimeout),e.zoomabletimeout=!1},window.lgModules.zoom=r})},{}]},{},[1])(1)}); \ No newline at end of file
diff --git a/assets/lib/lightgallery/lightgallery.min.css b/assets/lib/lightgallery/lightgallery.min.css
index cc1c3d2f..9b5c2461 100644
--- a/assets/lib/lightgallery/lightgallery.min.css
+++ b/assets/lib/lightgallery/lightgallery.min.css
@@ -1 +1 @@
-.lg-sub-html,.lg-toolbar{background-color:rgba(0,0,0,.45)}#lg-counter,.lg-outer .lg-video-cont{vertical-align:middle;display:inline-block}@font-face{font-family:lg;src:url(../fonts/lg.eot?n1z373);src:url(../fonts/lg.eot?#iefixn1z373) format("embedded-opentype"),url(../fonts/lg.woff?n1z373) format("woff"),url(../fonts/lg.ttf?n1z373) format("truetype"),url(../fonts/lg.svg?n1z373#lg) format("svg");font-weight:400;font-style:normal;font-display:swap}.lg-icon{font-family:lg;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.lg-actions .lg-next,.lg-actions .lg-prev{background-color:rgba(0,0,0,.45);border-radius:2px;color:#999;cursor:pointer;display:block;font-size:22px;margin-top:-10px;padding:8px 10px 9px;position:absolute;top:50%;z-index:1080}.lg-actions .lg-next.disabled,.lg-actions .lg-prev.disabled{pointer-events:none;opacity:.5}.lg-actions .lg-next:hover,.lg-actions .lg-prev:hover{color:#FFF}.lg-actions .lg-next{right:20px}.lg-actions .lg-next:before{content:"\e095"}.lg-actions .lg-prev{left:20px}.lg-actions .lg-prev:after{content:"\e094"}@-webkit-keyframes lg-right-end{0%,100%{left:0}50%{left:-30px}}@-moz-keyframes lg-right-end{0%,100%{left:0}50%{left:-30px}}@-ms-keyframes lg-right-end{0%,100%{left:0}50%{left:-30px}}@keyframes lg-right-end{0%,100%{left:0}50%{left:-30px}}@-webkit-keyframes lg-left-end{0%,100%{left:0}50%{left:30px}}@-moz-keyframes lg-left-end{0%,100%{left:0}50%{left:30px}}@-ms-keyframes lg-left-end{0%,100%{left:0}50%{left:30px}}@keyframes lg-left-end{0%,100%{left:0}50%{left:30px}}.lg-outer.lg-right-end .lg-object{-webkit-animation:lg-right-end .3s;-o-animation:lg-right-end .3s;animation:lg-right-end .3s;position:relative}.lg-outer.lg-left-end .lg-object{-webkit-animation:lg-left-end .3s;-o-animation:lg-left-end .3s;animation:lg-left-end .3s;position:relative}.lg-toolbar{z-index:1082;left:0;position:absolute;top:0;width:100%}.lg-toolbar .lg-icon{color:#999;cursor:pointer;float:right;font-size:24px;height:47px;line-height:27px;padding:10px 0;text-align:center;width:50px;text-decoration:none!important;outline:0;-webkit-transition:color .2s linear;-o-transition:color .2s linear;transition:color .2s linear}.lg-toolbar .lg-icon:hover{color:#FFF}.lg-toolbar .lg-close:after{content:"\e070"}.lg-toolbar .lg-download:after{content:"\e0f2"}.lg-sub-html{bottom:0;color:#EEE;font-size:16px;left:0;padding:10px 40px;position:fixed;right:0;text-align:center;z-index:1080}.lg-sub-html h4{margin:0;font-size:13px;font-weight:700}.lg-sub-html p{font-size:12px;margin:5px 0 0}#lg-counter{color:#999;font-size:16px;padding-left:20px;padding-top:12px}.lg-next,.lg-prev,.lg-toolbar{opacity:1;-webkit-transition:-webkit-transform .35s cubic-bezier(0,0,.25,1) 0s,opacity .35s cubic-bezier(0,0,.25,1) 0s,color .2s linear;-moz-transition:-moz-transform .35s cubic-bezier(0,0,.25,1) 0s,opacity .35s cubic-bezier(0,0,.25,1) 0s,color .2s linear;-o-transition:-o-transform .35s cubic-bezier(0,0,.25,1) 0s,opacity .35s cubic-bezier(0,0,.25,1) 0s,color .2s linear;transition:transform .35s cubic-bezier(0,0,.25,1) 0s,opacity .35s cubic-bezier(0,0,.25,1) 0s,color .2s linear}.lg-hide-items .lg-prev{opacity:0;-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}.lg-hide-items .lg-next{opacity:0;-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}.lg-hide-items .lg-toolbar{opacity:0;-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}body:not(.lg-from-hash) .lg-outer.lg-start-zoom .lg-object{-webkit-transform:scale3d(.5,.5,.5);transform:scale3d(.5,.5,.5);opacity:0;-webkit-transition:-webkit-transform 250ms cubic-bezier(0,0,.25,1) 0s,opacity 250ms cubic-bezier(0,0,.25,1)!important;-moz-transition:-moz-transform 250ms cubic-bezier(0,0,.25,1) 0s,opacity 250ms cubic-bezier(0,0,.25,1)!important;-o-transition:-o-transform 250ms cubic-bezier(0,0,.25,1) 0s,opacity 250ms cubic-bezier(0,0,.25,1)!important;transition:transform 250ms cubic-bezier(0,0,.25,1) 0s,opacity 250ms cubic-bezier(0,0,.25,1)!important;-webkit-transform-origin:50% 50%;-moz-transform-origin:50% 50%;-ms-transform-origin:50% 50%;transform-origin:50% 50%}body:not(.lg-from-hash) .lg-outer.lg-start-zoom .lg-item.lg-complete .lg-object{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1);opacity:1}.lg-outer .lg-thumb-outer{background-color:#0D0A0A;bottom:0;position:absolute;width:100%;z-index:1080;max-height:350px;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0);-webkit-transition:-webkit-transform .25s cubic-bezier(0,0,.25,1) 0s;-moz-transition:-moz-transform .25s cubic-bezier(0,0,.25,1) 0s;-o-transition:-o-transform .25s cubic-bezier(0,0,.25,1) 0s;transition:transform .25s cubic-bezier(0,0,.25,1) 0s}.lg-outer .lg-thumb-outer.lg-grab .lg-thumb-item{cursor:-webkit-grab;cursor:-moz-grab;cursor:-o-grab;cursor:-ms-grab;cursor:grab}.lg-outer .lg-thumb-outer.lg-grabbing .lg-thumb-item{cursor:move;cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:-o-grabbing;cursor:-ms-grabbing;cursor:grabbing}.lg-outer .lg-thumb-outer.lg-dragging .lg-thumb{-webkit-transition-duration:0s!important;transition-duration:0s!important}.lg-outer.lg-thumb-open .lg-thumb-outer{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.lg-outer .lg-thumb{padding:10px 0;height:100%;margin-bottom:-5px}.lg-outer .lg-thumb-item{cursor:pointer;float:left;overflow:hidden;height:100%;border:2px solid #FFF;border-radius:4px;margin-bottom:5px}@media (min-width:1025px){.lg-outer .lg-thumb-item{-webkit-transition:border-color .25s ease;-o-transition:border-color .25s ease;transition:border-color .25s ease}}.lg-outer .lg-thumb-item.active,.lg-outer .lg-thumb-item:hover{border-color:#a90707}.lg-outer .lg-thumb-item img{width:100%;height:100%;object-fit:cover}.lg-outer.lg-has-thumb .lg-item{padding-bottom:120px}.lg-outer.lg-can-toggle .lg-item{padding-bottom:0}.lg-outer.lg-pull-caption-up .lg-sub-html{-webkit-transition:bottom .25s ease;-o-transition:bottom .25s ease;transition:bottom .25s ease}.lg-outer.lg-pull-caption-up.lg-thumb-open .lg-sub-html{bottom:100px}.lg-outer .lg-toggle-thumb{background-color:#0D0A0A;border-radius:2px 2px 0 0;color:#999;cursor:pointer;font-size:24px;height:39px;line-height:27px;padding:5px 0;position:absolute;right:20px;text-align:center;top:-39px;width:50px}.lg-outer .lg-toggle-thumb:hover,.lg-outer.lg-dropdown-active #lg-share{color:#FFF}.lg-outer .lg-toggle-thumb:after{content:"\e1ff"}.lg-outer .lg-video-cont{max-width:1140px;max-height:100%;width:100%;padding:0 5px}.lg-outer .lg-video{width:100%;height:0;padding-bottom:56.25%;overflow:hidden;position:relative}.lg-outer .lg-video .lg-object{display:inline-block;position:absolute;top:0;left:0;width:100%!important;height:100%!important}.lg-outer .lg-video .lg-video-play{width:84px;height:59px;position:absolute;left:50%;top:50%;margin-left:-42px;margin-top:-30px;z-index:1080;cursor:pointer}.lg-outer .lg-has-vimeo .lg-video-play{background:url(../img/vimeo-play.png) no-repeat}.lg-outer .lg-has-vimeo:hover .lg-video-play{background:url(../img/vimeo-play.png) 0 -58px no-repeat}.lg-outer .lg-has-html5 .lg-video-play{background:url(../img/video-play.png) no-repeat;height:64px;margin-left:-32px;margin-top:-32px;width:64px;opacity:.8}.lg-outer .lg-has-html5:hover .lg-video-play{opacity:1}.lg-outer .lg-has-youtube .lg-video-play{background:url(../img/youtube-play.png) no-repeat}.lg-outer .lg-has-youtube:hover .lg-video-play{background:url(../img/youtube-play.png) 0 -60px no-repeat}.lg-outer .lg-video-object{width:100%!important;height:100%!important;position:absolute;top:0;left:0}.lg-outer .lg-has-video .lg-video-object{visibility:hidden}.lg-outer .lg-has-video.lg-video-playing .lg-object,.lg-outer .lg-has-video.lg-video-playing .lg-video-play{display:none}.lg-outer .lg-has-video.lg-video-playing .lg-video-object{visibility:visible}.lg-progress-bar{background-color:#333;height:5px;left:0;position:absolute;top:0;width:100%;z-index:1083;opacity:0;-webkit-transition:opacity 80ms ease 0s;-moz-transition:opacity 80ms ease 0s;-o-transition:opacity 80ms ease 0s;transition:opacity 80ms ease 0s}.lg-progress-bar .lg-progress{background-color:#a90707;height:5px;width:0}.lg-progress-bar.lg-start .lg-progress{width:100%}.lg-show-autoplay .lg-progress-bar{opacity:1}.lg-autoplay-button:after{content:"\e01d"}.lg-show-autoplay .lg-autoplay-button:after{content:"\e01a"}.lg-outer.lg-css3.lg-zoom-dragging .lg-item.lg-complete.lg-zoomable .lg-image,.lg-outer.lg-css3.lg-zoom-dragging .lg-item.lg-complete.lg-zoomable .lg-img-wrap{-webkit-transition-duration:0s;transition-duration:0s}.lg-outer.lg-use-transition-for-zoom .lg-item.lg-complete.lg-zoomable .lg-img-wrap{-webkit-transition:-webkit-transform .3s cubic-bezier(0,0,.25,1) 0s;-moz-transition:-moz-transform .3s cubic-bezier(0,0,.25,1) 0s;-o-transition:-o-transform .3s cubic-bezier(0,0,.25,1) 0s;transition:transform .3s cubic-bezier(0,0,.25,1) 0s}.lg-outer.lg-use-left-for-zoom .lg-item.lg-complete.lg-zoomable .lg-img-wrap{-webkit-transition:left .3s cubic-bezier(0,0,.25,1) 0s,top .3s cubic-bezier(0,0,.25,1) 0s;-moz-transition:left .3s cubic-bezier(0,0,.25,1) 0s,top .3s cubic-bezier(0,0,.25,1) 0s;-o-transition:left .3s cubic-bezier(0,0,.25,1) 0s,top .3s cubic-bezier(0,0,.25,1) 0s;transition:left .3s cubic-bezier(0,0,.25,1) 0s,top .3s cubic-bezier(0,0,.25,1) 0s}.lg-outer .lg-item.lg-complete.lg-zoomable .lg-img-wrap{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;backface-visibility:hidden}.lg-outer .lg-item.lg-complete.lg-zoomable .lg-image{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1);-webkit-transition:-webkit-transform .3s cubic-bezier(0,0,.25,1) 0s,opacity .15s!important;-moz-transition:-moz-transform .3s cubic-bezier(0,0,.25,1) 0s,opacity .15s!important;-o-transition:-o-transform .3s cubic-bezier(0,0,.25,1) 0s,opacity .15s!important;transition:transform .3s cubic-bezier(0,0,.25,1) 0s,opacity .15s!important;-webkit-transform-origin:0 0;-moz-transform-origin:0 0;-ms-transform-origin:0 0;transform-origin:0 0;-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;backface-visibility:hidden}#lg-zoom-in:after{content:"\e311"}#lg-actual-size{font-size:20px}#lg-actual-size:after{content:"\e033"}#lg-zoom-out{opacity:.5;pointer-events:none}#lg-zoom-out:after{content:"\e312"}.lg-zoomed #lg-zoom-out{opacity:1;pointer-events:auto}.lg-outer .lg-pager-outer{bottom:60px;left:0;position:absolute;right:0;text-align:center;z-index:1080;height:10px}.lg-outer .lg-pager-outer.lg-pager-hover .lg-pager-cont{overflow:visible}.lg-outer .lg-pager-cont{cursor:pointer;display:inline-block;overflow:hidden;position:relative;vertical-align:top;margin:0 5px}.lg-outer .lg-pager-cont:hover .lg-pager-thumb-cont{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.lg-outer .lg-pager-cont.lg-pager-active .lg-pager{box-shadow:0 0 0 2px #fff inset}.lg-outer .lg-pager-thumb-cont{background-color:#fff;color:#FFF;bottom:100%;height:83px;left:0;margin-bottom:20px;margin-left:-60px;opacity:0;padding:5px;position:absolute;width:120px;border-radius:3px;-webkit-transition:opacity .15s ease 0s,-webkit-transform .15s ease 0s;-moz-transition:opacity .15s ease 0s,-moz-transform .15s ease 0s;-o-transition:opacity .15s ease 0s,-o-transform .15s ease 0s;transition:opacity .15s ease 0s,transform .15s ease 0s;-webkit-transform:translate3d(0,5px,0);transform:translate3d(0,5px,0)}.lg-outer .lg-pager-thumb-cont img{width:100%;height:100%}.lg-outer .lg-pager{background-color:rgba(255,255,255,.5);border-radius:50%;box-shadow:0 0 0 8px rgba(255,255,255,.7) inset;display:block;height:12px;-webkit-transition:box-shadow .3s ease 0s;-o-transition:box-shadow .3s ease 0s;transition:box-shadow .3s ease 0s;width:12px}.lg-outer .lg-pager:focus,.lg-outer .lg-pager:hover{box-shadow:0 0 0 8px #fff inset}.lg-outer .lg-caret{border-left:10px solid transparent;border-right:10px solid transparent;border-top:10px dashed;bottom:-10px;display:inline-block;height:0;left:50%;margin-left:-5px;position:absolute;vertical-align:middle;width:0}.lg-fullscreen:after{content:"\e20c"}.lg-fullscreen-on .lg-fullscreen:after{content:"\e20d"}.lg-outer #lg-dropdown-overlay{background-color:rgba(0,0,0,.25);bottom:0;cursor:default;left:0;position:fixed;right:0;top:0;z-index:1081;opacity:0;visibility:hidden;-webkit-transition:visibility 0s linear .18s,opacity .18s linear 0s;-o-transition:visibility 0s linear .18s,opacity .18s linear 0s;transition:visibility 0s linear .18s,opacity .18s linear 0s}.lg-outer.lg-dropdown-active #lg-dropdown-overlay,.lg-outer.lg-dropdown-active .lg-dropdown{-webkit-transition-delay:0s;transition-delay:0s;-moz-transform:translate3d(0,0,0);-o-transform:translate3d(0,0,0);-ms-transform:translate3d(0,0,0);-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);opacity:1;visibility:visible}.lg-outer .lg-dropdown{background-color:#fff;border-radius:2px;font-size:14px;list-style-type:none;margin:0;padding:10px 0;position:absolute;right:0;text-align:left;top:50px;opacity:0;visibility:hidden;-moz-transform:translate3d(0,5px,0);-o-transform:translate3d(0,5px,0);-ms-transform:translate3d(0,5px,0);-webkit-transform:translate3d(0,5px,0);transform:translate3d(0,5px,0);-webkit-transition:-webkit-transform .18s linear 0s,visibility 0s linear .5s,opacity .18s linear 0s;-moz-transition:-moz-transform .18s linear 0s,visibility 0s linear .5s,opacity .18s linear 0s;-o-transition:-o-transform .18s linear 0s,visibility 0s linear .5s,opacity .18s linear 0s;transition:transform .18s linear 0s,visibility 0s linear .5s,opacity .18s linear 0s}.lg-outer .lg-dropdown:after{content:"";display:block;height:0;width:0;position:absolute;border:8px solid transparent;border-bottom-color:#FFF;right:16px;top:-16px}.lg-outer .lg-dropdown>li:last-child{margin-bottom:0}.lg-outer .lg-dropdown>li:hover .lg-icon,.lg-outer .lg-dropdown>li:hover a{color:#333}.lg-outer .lg-dropdown a{color:#333;display:block;white-space:pre;padding:4px 12px;font-family:"Open Sans","Helvetica Neue",Helvetica,Arial,sans-serif;font-size:12px}.lg-outer .lg-dropdown a:hover{background-color:rgba(0,0,0,.07)}.lg-outer .lg-dropdown .lg-dropdown-text{display:inline-block;line-height:1;margin-top:-3px;vertical-align:middle}.lg-outer .lg-dropdown .lg-icon{color:#333;display:inline-block;float:none;font-size:20px;height:auto;line-height:1;margin-right:8px;padding:0;vertical-align:middle;width:auto}.lg-outer,.lg-outer .lg,.lg-outer .lg-inner{width:100%;height:100%}.lg-outer #lg-share{position:relative}.lg-outer #lg-share:after{content:"\e80d"}.lg-outer #lg-share-facebook .lg-icon{color:#3b5998}.lg-outer #lg-share-facebook .lg-icon:after{content:"\e901"}.lg-outer #lg-share-twitter .lg-icon{color:#00aced}.lg-outer #lg-share-twitter .lg-icon:after{content:"\e904"}.lg-outer #lg-share-googleplus .lg-icon{color:#dd4b39}.lg-outer #lg-share-googleplus .lg-icon:after{content:"\e902"}.lg-outer #lg-share-pinterest .lg-icon{color:#cb2027}.lg-outer #lg-share-pinterest .lg-icon:after{content:"\e903"}.group:after,.group:before{display:table;content:"";line-height:0}.group:after{clear:both}.lg-outer{position:fixed;top:0;left:0;z-index:1050;opacity:0;-webkit-transition:opacity .15s ease 0s;-o-transition:opacity .15s ease 0s;transition:opacity .15s ease 0s}.lg-outer *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.lg-outer.lg-visible{opacity:1}.lg-outer.lg-css3 .lg-item.lg-current,.lg-outer.lg-css3 .lg-item.lg-next-slide,.lg-outer.lg-css3 .lg-item.lg-prev-slide{-webkit-transition-duration:inherit!important;transition-duration:inherit!important;-webkit-transition-timing-function:inherit!important;transition-timing-function:inherit!important}.lg-outer.lg-css3.lg-dragging .lg-item.lg-current,.lg-outer.lg-css3.lg-dragging .lg-item.lg-next-slide,.lg-outer.lg-css3.lg-dragging .lg-item.lg-prev-slide{-webkit-transition-duration:0s!important;transition-duration:0s!important;opacity:1}.lg-outer.lg-grab img.lg-object{cursor:-webkit-grab;cursor:-moz-grab;cursor:-o-grab;cursor:-ms-grab;cursor:grab}.lg-outer.lg-grabbing img.lg-object{cursor:move;cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:-o-grabbing;cursor:-ms-grabbing;cursor:grabbing}.lg-outer .lg{position:relative;overflow:hidden;margin-left:auto;margin-right:auto;max-width:100%;max-height:100%}.lg-outer .lg-inner{position:absolute;left:0;top:0;white-space:nowrap}.lg-outer .lg-item{background:url(../img/loading.gif) center center no-repeat;display:none!important}.lg-outer.lg-css .lg-current,.lg-outer.lg-css3 .lg-current,.lg-outer.lg-css3 .lg-next-slide,.lg-outer.lg-css3 .lg-prev-slide{display:inline-block!important}.lg-outer .lg-img-wrap,.lg-outer .lg-item{display:inline-block;text-align:center;position:absolute;width:100%;height:100%}.lg-outer .lg-img-wrap:before,.lg-outer .lg-item:before{content:"";display:inline-block;height:50%;width:1px;margin-right:-1px}.lg-outer .lg-img-wrap{position:absolute;padding:0 5px;left:0;right:0;top:0;bottom:0}.lg-outer .lg-item.lg-complete{background-image:none}.lg-outer .lg-item.lg-current{z-index:1060}.lg-outer .lg-image{display:inline-block;vertical-align:middle;max-width:100%;max-height:100%;width:auto!important;height:auto!important}.lg-outer.lg-show-after-load .lg-item .lg-object,.lg-outer.lg-show-after-load .lg-item .lg-video-play{opacity:0;-webkit-transition:opacity .15s ease 0s;-o-transition:opacity .15s ease 0s;transition:opacity .15s ease 0s}.lg-outer.lg-show-after-load .lg-item.lg-complete .lg-object,.lg-outer.lg-show-after-load .lg-item.lg-complete .lg-video-play{opacity:1}.lg-outer .lg-empty-html,.lg-outer.lg-hide-download #lg-download{display:none}.lg-backdrop{position:fixed;top:0;left:0;right:0;bottom:0;z-index:1040;background-color:#000;opacity:0;-webkit-transition:opacity .15s ease 0s;-o-transition:opacity .15s ease 0s;transition:opacity .15s ease 0s}.lg-backdrop.in{opacity:1}.lg-css3.lg-no-trans .lg-current,.lg-css3.lg-no-trans .lg-next-slide,.lg-css3.lg-no-trans .lg-prev-slide{-webkit-transition:none 0s ease 0s!important;-moz-transition:none 0s ease 0s!important;-o-transition:none 0s ease 0s!important;transition:none 0s ease 0s!important}.lg-css3.lg-use-css3 .lg-item,.lg-css3.lg-use-left .lg-item{-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;backface-visibility:hidden}.lg-css3.lg-fade .lg-item{opacity:0}.lg-css3.lg-fade .lg-item.lg-current{opacity:1}.lg-css3.lg-fade .lg-item.lg-current,.lg-css3.lg-fade .lg-item.lg-next-slide,.lg-css3.lg-fade .lg-item.lg-prev-slide{-webkit-transition:opacity .1s ease 0s;-moz-transition:opacity .1s ease 0s;-o-transition:opacity .1s ease 0s;transition:opacity .1s ease 0s}.lg-css3.lg-slide.lg-use-css3 .lg-item{opacity:0}.lg-css3.lg-slide.lg-use-css3 .lg-item.lg-prev-slide{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.lg-css3.lg-slide.lg-use-css3 .lg-item.lg-next-slide{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.lg-css3.lg-slide.lg-use-css3 .lg-item.lg-current{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);opacity:1}.lg-css3.lg-slide.lg-use-css3 .lg-item.lg-current,.lg-css3.lg-slide.lg-use-css3 .lg-item.lg-next-slide,.lg-css3.lg-slide.lg-use-css3 .lg-item.lg-prev-slide{-webkit-transition:-webkit-transform 1s cubic-bezier(0,0,.25,1) 0s,opacity .1s ease 0s;-moz-transition:-moz-transform 1s cubic-bezier(0,0,.25,1) 0s,opacity .1s ease 0s;-o-transition:-o-transform 1s cubic-bezier(0,0,.25,1) 0s,opacity .1s ease 0s;transition:transform 1s cubic-bezier(0,0,.25,1) 0s,opacity .1s ease 0s}.lg-css3.lg-slide.lg-use-left .lg-item{opacity:0;position:absolute;left:0}.lg-css3.lg-slide.lg-use-left .lg-item.lg-prev-slide{left:-100%}.lg-css3.lg-slide.lg-use-left .lg-item.lg-next-slide{left:100%}.lg-css3.lg-slide.lg-use-left .lg-item.lg-current{left:0;opacity:1}.lg-css3.lg-slide.lg-use-left .lg-item.lg-current,.lg-css3.lg-slide.lg-use-left .lg-item.lg-next-slide,.lg-css3.lg-slide.lg-use-left .lg-item.lg-prev-slide{-webkit-transition:left 1s cubic-bezier(0,0,.25,1) 0s,opacity .1s ease 0s;-moz-transition:left 1s cubic-bezier(0,0,.25,1) 0s,opacity .1s ease 0s;-o-transition:left 1s cubic-bezier(0,0,.25,1) 0s,opacity .1s ease 0s;transition:left 1s cubic-bezier(0,0,.25,1) 0s,opacity .1s ease 0s} \ No newline at end of file
+@font-face{font-family:lg;src:url(../fonts/lg.eot?n1z373);src:url(../fonts/lg.eot?#iefixn1z373) format("embedded-opentype"),url(../fonts/lg.woff?n1z373) format("woff"),url(../fonts/lg.ttf?n1z373) format("truetype"),url(../fonts/lg.svg?n1z373#lg) format("svg");font-weight:400;font-style:normal}.lg-icon{font-family:lg;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.lg-actions .lg-next,.lg-actions .lg-prev{border-radius:2px;color:#999;cursor:pointer;display:block;font-size:22px;margin-top:-10px;padding:8px 10px 9px;position:absolute;top:50%;z-index:1080;outline:0;border:none;background-color:transparent}.lg-actions .lg-next.disabled,.lg-actions .lg-prev.disabled{pointer-events:none;opacity:.5}.lg-actions .lg-next:hover,.lg-actions .lg-prev:hover{color:#FFF}.lg-actions .lg-next{right:20px}.lg-actions .lg-next:before{content:"\e095"}.lg-actions .lg-prev{left:20px}.lg-actions .lg-prev:after{content:"\e094"}@-webkit-keyframes lg-right-end{0%,100%{left:0}50%{left:-30px}}@-moz-keyframes lg-right-end{0%,100%{left:0}50%{left:-30px}}@-ms-keyframes lg-right-end{0%,100%{left:0}50%{left:-30px}}@keyframes lg-right-end{0%,100%{left:0}50%{left:-30px}}@-webkit-keyframes lg-left-end{0%,100%{left:0}50%{left:30px}}@-moz-keyframes lg-left-end{0%,100%{left:0}50%{left:30px}}@-ms-keyframes lg-left-end{0%,100%{left:0}50%{left:30px}}@keyframes lg-left-end{0%,100%{left:0}50%{left:30px}}.lg-outer.lg-right-end .lg-object{-webkit-animation:lg-right-end .3s;-o-animation:lg-right-end .3s;animation:lg-right-end .3s;position:relative}.lg-outer.lg-left-end .lg-object{-webkit-animation:lg-left-end .3s;-o-animation:lg-left-end .3s;animation:lg-left-end .3s;position:relative}.lg-toolbar{z-index:1082;left:0;position:absolute;top:0;width:100%;background-color:rgba(0,0,0,.45)}.lg-toolbar .lg-icon{color:#999;cursor:pointer;float:right;font-size:24px;height:47px;line-height:27px;padding:10px 0;text-align:center;width:50px;text-decoration:none!important;outline:0;background:0 0;border:none;box-shadow:none;-webkit-transition:color .2s linear;-o-transition:color .2s linear;transition:color .2s linear}.lg-toolbar .lg-icon:hover{color:#FFF}.lg-toolbar .lg-close:after{content:"\e070"}.lg-toolbar .lg-download:after{content:"\e0f2"}.lg-sub-html{background-color:rgba(0,0,0,.45);bottom:0;color:#EEE;font-size:16px;left:0;padding:10px 40px;position:fixed;right:0;text-align:center;z-index:1080}.lg-sub-html h4{margin:0;font-size:13px;font-weight:700}.lg-sub-html p{font-size:12px;margin:5px 0 0}#lg-counter{color:#999;display:inline-block;font-size:16px;padding-left:20px;padding-top:12px;vertical-align:middle}.lg-next,.lg-prev,.lg-toolbar{opacity:1;-webkit-transition:-webkit-transform .35s cubic-bezier(0,0,.25,1) 0s,opacity .35s cubic-bezier(0,0,.25,1) 0s,color .2s linear;-moz-transition:-moz-transform .35s cubic-bezier(0,0,.25,1) 0s,opacity .35s cubic-bezier(0,0,.25,1) 0s,color .2s linear;-o-transition:-o-transform .35s cubic-bezier(0,0,.25,1) 0s,opacity .35s cubic-bezier(0,0,.25,1) 0s,color .2s linear;transition:transform .35s cubic-bezier(0,0,.25,1) 0s,opacity .35s cubic-bezier(0,0,.25,1) 0s,color .2s linear}.lg-hide-items .lg-prev{opacity:0;-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}.lg-hide-items .lg-next{opacity:0;-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}.lg-hide-items .lg-toolbar{opacity:0;-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}body:not(.lg-from-hash) .lg-outer.lg-start-zoom .lg-object{-webkit-transform:scale3d(.5,.5,.5);transform:scale3d(.5,.5,.5);opacity:0;-webkit-transition:-webkit-transform 250ms cubic-bezier(0,0,.25,1) 0s,opacity 250ms cubic-bezier(0,0,.25,1)!important;-moz-transition:-moz-transform 250ms cubic-bezier(0,0,.25,1) 0s,opacity 250ms cubic-bezier(0,0,.25,1)!important;-o-transition:-o-transform 250ms cubic-bezier(0,0,.25,1) 0s,opacity 250ms cubic-bezier(0,0,.25,1)!important;transition:transform 250ms cubic-bezier(0,0,.25,1) 0s,opacity 250ms cubic-bezier(0,0,.25,1)!important;-webkit-transform-origin:50% 50%;-moz-transform-origin:50% 50%;-ms-transform-origin:50% 50%;transform-origin:50% 50%}body:not(.lg-from-hash) .lg-outer.lg-start-zoom .lg-item.lg-complete .lg-object{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1);opacity:1}.lg-outer .lg-thumb-outer{background-color:#0D0A0A;bottom:0;position:absolute;width:100%;z-index:1080;max-height:350px;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0);-webkit-transition:-webkit-transform .25s cubic-bezier(0,0,.25,1) 0s;-moz-transition:-moz-transform .25s cubic-bezier(0,0,.25,1) 0s;-o-transition:-o-transform .25s cubic-bezier(0,0,.25,1) 0s;transition:transform .25s cubic-bezier(0,0,.25,1) 0s}.lg-outer .lg-thumb-outer.lg-grab .lg-thumb-item{cursor:-webkit-grab;cursor:-moz-grab;cursor:-o-grab;cursor:-ms-grab;cursor:grab}.lg-outer .lg-thumb-outer.lg-grabbing .lg-thumb-item{cursor:move;cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:-o-grabbing;cursor:-ms-grabbing;cursor:grabbing}.lg-outer .lg-thumb-outer.lg-dragging .lg-thumb{-webkit-transition-duration:0s!important;transition-duration:0s!important}.lg-outer.lg-thumb-open .lg-thumb-outer{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.lg-outer .lg-thumb{padding:10px 0;height:100%;margin-bottom:-5px}.lg-outer .lg-thumb-item{cursor:pointer;float:left;overflow:hidden;height:100%;border:2px solid #FFF;border-radius:4px;margin-bottom:5px}@media (min-width:1025px){.lg-outer .lg-thumb-item{-webkit-transition:border-color .25s ease;-o-transition:border-color .25s ease;transition:border-color .25s ease}}.lg-outer .lg-thumb-item.active,.lg-outer .lg-thumb-item:hover{border-color:#a90707}.lg-outer .lg-thumb-item img{width:100%;height:100%;object-fit:cover}.lg-outer.lg-has-thumb .lg-item{padding-bottom:120px}.lg-outer.lg-can-toggle .lg-item{padding-bottom:0}.lg-outer.lg-pull-caption-up .lg-sub-html{-webkit-transition:bottom .25s ease;-o-transition:bottom .25s ease;transition:bottom .25s ease}.lg-outer.lg-pull-caption-up.lg-thumb-open .lg-sub-html{bottom:100px}.lg-outer .lg-toggle-thumb{background-color:#0D0A0A;border-radius:2px 2px 0 0;color:#999;cursor:pointer;font-size:24px;height:39px;line-height:27px;padding:5px 0;position:absolute;right:20px;text-align:center;top:-39px;width:50px;outline:0;border:none}.lg-outer .lg-toggle-thumb:hover,.lg-outer.lg-dropdown-active #lg-share{color:#FFF}.lg-outer .lg-toggle-thumb:after{content:"\e1ff"}.lg-outer .lg-video-cont{display:inline-block;vertical-align:middle;max-width:1140px;max-height:100%;width:100%;padding:0 5px}.lg-outer .lg-video{width:100%;height:0;padding-bottom:56.25%;overflow:hidden;position:relative}.lg-outer .lg-video .lg-object{display:inline-block;position:absolute;top:0;left:0;width:100%!important;height:100%!important}.lg-outer .lg-video .lg-video-play{width:84px;height:59px;position:absolute;left:50%;top:50%;margin-left:-42px;margin-top:-30px;z-index:1080;cursor:pointer}.lg-outer .lg-has-vimeo .lg-video-play{background:url(../img/vimeo-play.png) no-repeat}.lg-outer .lg-has-vimeo:hover .lg-video-play{background:url(../img/vimeo-play.png) 0 -58px no-repeat}.lg-outer .lg-has-html5 .lg-video-play{background:url(../img/video-play.png) no-repeat;height:64px;margin-left:-32px;margin-top:-32px;width:64px;opacity:.8}.lg-outer .lg-has-html5:hover .lg-video-play{opacity:1}.lg-outer .lg-has-youtube .lg-video-play{background:url(../img/youtube-play.png) no-repeat}.lg-outer .lg-has-youtube:hover .lg-video-play{background:url(../img/youtube-play.png) 0 -60px no-repeat}.lg-outer .lg-video-object{width:100%!important;height:100%!important;position:absolute;top:0;left:0}.lg-outer .lg-has-video .lg-video-object{visibility:hidden}.lg-outer .lg-has-video.lg-video-playing .lg-object,.lg-outer .lg-has-video.lg-video-playing .lg-video-play{display:none}.lg-outer .lg-has-video.lg-video-playing .lg-video-object{visibility:visible}.lg-progress-bar{background-color:#333;height:5px;left:0;position:absolute;top:0;width:100%;z-index:1083;opacity:0;-webkit-transition:opacity 80ms ease 0s;-moz-transition:opacity 80ms ease 0s;-o-transition:opacity 80ms ease 0s;transition:opacity 80ms ease 0s}.lg-progress-bar .lg-progress{background-color:#a90707;height:5px;width:0}.lg-progress-bar.lg-start .lg-progress{width:100%}.lg-show-autoplay .lg-progress-bar{opacity:1}.lg-autoplay-button:after{content:"\e01d"}.lg-show-autoplay .lg-autoplay-button:after{content:"\e01a"}.lg-outer.lg-css3.lg-zoom-dragging .lg-item.lg-complete.lg-zoomable .lg-image,.lg-outer.lg-css3.lg-zoom-dragging .lg-item.lg-complete.lg-zoomable .lg-img-wrap{-webkit-transition-duration:0s;transition-duration:0s}.lg-outer.lg-use-transition-for-zoom .lg-item.lg-complete.lg-zoomable .lg-img-wrap{-webkit-transition:-webkit-transform .3s cubic-bezier(0,0,.25,1) 0s;-moz-transition:-moz-transform .3s cubic-bezier(0,0,.25,1) 0s;-o-transition:-o-transform .3s cubic-bezier(0,0,.25,1) 0s;transition:transform .3s cubic-bezier(0,0,.25,1) 0s}.lg-outer.lg-use-left-for-zoom .lg-item.lg-complete.lg-zoomable .lg-img-wrap{-webkit-transition:left .3s cubic-bezier(0,0,.25,1) 0s,top .3s cubic-bezier(0,0,.25,1) 0s;-moz-transition:left .3s cubic-bezier(0,0,.25,1) 0s,top .3s cubic-bezier(0,0,.25,1) 0s;-o-transition:left .3s cubic-bezier(0,0,.25,1) 0s,top .3s cubic-bezier(0,0,.25,1) 0s;transition:left .3s cubic-bezier(0,0,.25,1) 0s,top .3s cubic-bezier(0,0,.25,1) 0s}.lg-outer .lg-item.lg-complete.lg-zoomable .lg-img-wrap{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;backface-visibility:hidden}.lg-outer .lg-item.lg-complete.lg-zoomable .lg-image{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1);-webkit-transition:-webkit-transform .3s cubic-bezier(0,0,.25,1) 0s,opacity .15s!important;-moz-transition:-moz-transform .3s cubic-bezier(0,0,.25,1) 0s,opacity .15s!important;-o-transition:-o-transform .3s cubic-bezier(0,0,.25,1) 0s,opacity .15s!important;transition:transform .3s cubic-bezier(0,0,.25,1) 0s,opacity .15s!important;-webkit-transform-origin:0 0;-moz-transform-origin:0 0;-ms-transform-origin:0 0;transform-origin:0 0;-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;backface-visibility:hidden}#lg-zoom-in:after{content:"\e311"}#lg-actual-size{font-size:20px}#lg-actual-size:after{content:"\e033"}#lg-zoom-out{opacity:.5;pointer-events:none}#lg-zoom-out:after{content:"\e312"}.lg-zoomed #lg-zoom-out{opacity:1;pointer-events:auto}.lg-outer .lg-pager-outer{bottom:60px;left:0;position:absolute;right:0;text-align:center;z-index:1080;height:10px}.lg-outer .lg-pager-outer.lg-pager-hover .lg-pager-cont{overflow:visible}.lg-outer .lg-pager-cont{cursor:pointer;display:inline-block;overflow:hidden;position:relative;vertical-align:top;margin:0 5px}.lg-outer .lg-pager-cont:hover .lg-pager-thumb-cont{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.lg-outer .lg-pager-cont.lg-pager-active .lg-pager{box-shadow:0 0 0 2px #fff inset}.lg-outer .lg-pager-thumb-cont{background-color:#fff;color:#FFF;bottom:100%;height:83px;left:0;margin-bottom:20px;margin-left:-60px;opacity:0;padding:5px;position:absolute;width:120px;border-radius:3px;-webkit-transition:opacity .15s ease 0s,-webkit-transform .15s ease 0s;-moz-transition:opacity .15s ease 0s,-moz-transform .15s ease 0s;-o-transition:opacity .15s ease 0s,-o-transform .15s ease 0s;transition:opacity .15s ease 0s,transform .15s ease 0s;-webkit-transform:translate3d(0,5px,0);transform:translate3d(0,5px,0)}.lg-outer .lg-pager-thumb-cont img{width:100%;height:100%}.lg-outer .lg-pager{background-color:rgba(255,255,255,.5);border-radius:50%;box-shadow:0 0 0 8px rgba(255,255,255,.7) inset;display:block;height:12px;-webkit-transition:box-shadow .3s ease 0s;-o-transition:box-shadow .3s ease 0s;transition:box-shadow .3s ease 0s;width:12px}.lg-outer .lg-pager:focus,.lg-outer .lg-pager:hover{box-shadow:0 0 0 8px #fff inset}.lg-outer .lg-caret{border-left:10px solid transparent;border-right:10px solid transparent;border-top:10px dashed;bottom:-10px;display:inline-block;height:0;left:50%;margin-left:-5px;position:absolute;vertical-align:middle;width:0}.lg-fullscreen:after{content:"\e20c"}.lg-fullscreen-on .lg-fullscreen:after{content:"\e20d"}.lg-outer #lg-dropdown-overlay{background-color:rgba(0,0,0,.25);bottom:0;cursor:default;left:0;position:fixed;right:0;top:0;z-index:1081;opacity:0;visibility:hidden;-webkit-transition:visibility 0s linear .18s,opacity .18s linear 0s;-o-transition:visibility 0s linear .18s,opacity .18s linear 0s;transition:visibility 0s linear .18s,opacity .18s linear 0s}.lg-outer.lg-dropdown-active #lg-dropdown-overlay,.lg-outer.lg-dropdown-active .lg-dropdown{-webkit-transition-delay:0s;transition-delay:0s;-moz-transform:translate3d(0,0,0);-o-transform:translate3d(0,0,0);-ms-transform:translate3d(0,0,0);-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);opacity:1;visibility:visible}.lg-outer .lg-dropdown{background-color:#fff;border-radius:2px;font-size:14px;list-style-type:none;margin:0;padding:10px 0;position:absolute;right:0;text-align:left;top:50px;opacity:0;visibility:hidden;-moz-transform:translate3d(0,5px,0);-o-transform:translate3d(0,5px,0);-ms-transform:translate3d(0,5px,0);-webkit-transform:translate3d(0,5px,0);transform:translate3d(0,5px,0);-webkit-transition:-webkit-transform .18s linear 0s,visibility 0s linear .5s,opacity .18s linear 0s;-moz-transition:-moz-transform .18s linear 0s,visibility 0s linear .5s,opacity .18s linear 0s;-o-transition:-o-transform .18s linear 0s,visibility 0s linear .5s,opacity .18s linear 0s;transition:transform .18s linear 0s,visibility 0s linear .5s,opacity .18s linear 0s}.lg-outer .lg-dropdown:after{content:"";display:block;height:0;width:0;position:absolute;border:8px solid transparent;border-bottom-color:#FFF;right:16px;top:-16px}.lg-outer .lg-dropdown>li:last-child{margin-bottom:0}.lg-outer .lg-dropdown>li:hover .lg-icon,.lg-outer .lg-dropdown>li:hover a{color:#333}.lg-outer .lg-dropdown a{color:#333;display:block;white-space:pre;padding:4px 12px;font-family:"Open Sans","Helvetica Neue",Helvetica,Arial,sans-serif;font-size:12px}.lg-outer .lg-dropdown a:hover{background-color:rgba(0,0,0,.07)}.lg-outer .lg-dropdown .lg-dropdown-text{display:inline-block;line-height:1;margin-top:-3px;vertical-align:middle}.lg-outer .lg-dropdown .lg-icon{color:#333;display:inline-block;float:none;font-size:20px;height:auto;line-height:1;margin-right:8px;padding:0;vertical-align:middle;width:auto}.lg-outer,.lg-outer .lg,.lg-outer .lg-inner{width:100%;height:100%}.lg-outer #lg-share{position:relative}.lg-outer #lg-share:after{content:"\e80d"}.lg-outer #lg-share-facebook .lg-icon{color:#3b5998}.lg-outer #lg-share-facebook .lg-icon:after{content:"\e901"}.lg-outer #lg-share-twitter .lg-icon{color:#00aced}.lg-outer #lg-share-twitter .lg-icon:after{content:"\e904"}.lg-outer #lg-share-googleplus .lg-icon{color:#dd4b39}.lg-outer #lg-share-googleplus .lg-icon:after{content:"\e902"}.lg-outer #lg-share-pinterest .lg-icon{color:#cb2027}.lg-outer #lg-share-pinterest .lg-icon:after{content:"\e903"}.group:after,.group:before{display:table;content:"";line-height:0}.group:after{clear:both}.lg-outer{position:fixed;top:0;left:0;z-index:1050;opacity:0;-webkit-transition:opacity .15s ease 0s;-o-transition:opacity .15s ease 0s;transition:opacity .15s ease 0s}.lg-outer *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.lg-outer.lg-visible{opacity:1}.lg-outer.lg-css3 .lg-item.lg-current,.lg-outer.lg-css3 .lg-item.lg-next-slide,.lg-outer.lg-css3 .lg-item.lg-prev-slide{-webkit-transition-duration:inherit!important;transition-duration:inherit!important;-webkit-transition-timing-function:inherit!important;transition-timing-function:inherit!important}.lg-outer.lg-css3.lg-dragging .lg-item.lg-current,.lg-outer.lg-css3.lg-dragging .lg-item.lg-next-slide,.lg-outer.lg-css3.lg-dragging .lg-item.lg-prev-slide{-webkit-transition-duration:0s!important;transition-duration:0s!important;opacity:1}.lg-outer.lg-grab img.lg-object{cursor:-webkit-grab;cursor:-moz-grab;cursor:-o-grab;cursor:-ms-grab;cursor:grab}.lg-outer.lg-grabbing img.lg-object{cursor:move;cursor:-webkit-grabbing;cursor:-moz-grabbing;cursor:-o-grabbing;cursor:-ms-grabbing;cursor:grabbing}.lg-outer .lg{position:relative;overflow:hidden;margin-left:auto;margin-right:auto;max-width:100%;max-height:100%}.lg-outer .lg-inner{position:absolute;left:0;top:0;white-space:nowrap}.lg-outer .lg-item{background:url(../img/loading.gif) center center no-repeat;display:none!important}.lg-outer.lg-css .lg-current,.lg-outer.lg-css3 .lg-current,.lg-outer.lg-css3 .lg-next-slide,.lg-outer.lg-css3 .lg-prev-slide{display:inline-block!important}.lg-outer .lg-img-wrap,.lg-outer .lg-item{display:inline-block;text-align:center;position:absolute;width:100%;height:100%}.lg-outer .lg-img-wrap:before,.lg-outer .lg-item:before{content:"";display:inline-block;height:50%;width:1px;margin-right:-1px}.lg-outer .lg-img-wrap{position:absolute;padding:0 5px;left:0;right:0;top:0;bottom:0}.lg-outer .lg-item.lg-complete{background-image:none}.lg-outer .lg-item.lg-current{z-index:1060}.lg-outer .lg-image{display:inline-block;vertical-align:middle;max-width:100%;max-height:100%;width:auto!important;height:auto!important}.lg-outer.lg-show-after-load .lg-item .lg-object,.lg-outer.lg-show-after-load .lg-item .lg-video-play{opacity:0;-webkit-transition:opacity .15s ease 0s;-o-transition:opacity .15s ease 0s;transition:opacity .15s ease 0s}.lg-outer.lg-show-after-load .lg-item.lg-complete .lg-object,.lg-outer.lg-show-after-load .lg-item.lg-complete .lg-video-play{opacity:1}.lg-outer .lg-empty-html,.lg-outer.lg-hide-download #lg-download{display:none}.lg-backdrop{position:fixed;top:0;left:0;right:0;bottom:0;z-index:1040;background-color:#000;opacity:0;-webkit-transition:opacity .15s ease 0s;-o-transition:opacity .15s ease 0s;transition:opacity .15s ease 0s}.lg-backdrop.in{opacity:1}.lg-css3.lg-no-trans .lg-current,.lg-css3.lg-no-trans .lg-next-slide,.lg-css3.lg-no-trans .lg-prev-slide{-webkit-transition:none 0s ease 0s!important;-moz-transition:none 0s ease 0s!important;-o-transition:none 0s ease 0s!important;transition:none 0s ease 0s!important}.lg-css3.lg-use-css3 .lg-item,.lg-css3.lg-use-left .lg-item{-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;backface-visibility:hidden}.lg-css3.lg-fade .lg-item{opacity:0}.lg-css3.lg-fade .lg-item.lg-current{opacity:1}.lg-css3.lg-fade .lg-item.lg-current,.lg-css3.lg-fade .lg-item.lg-next-slide,.lg-css3.lg-fade .lg-item.lg-prev-slide{-webkit-transition:opacity .1s ease 0s;-moz-transition:opacity .1s ease 0s;-o-transition:opacity .1s ease 0s;transition:opacity .1s ease 0s}.lg-css3.lg-slide.lg-use-css3 .lg-item{opacity:0}.lg-css3.lg-slide.lg-use-css3 .lg-item.lg-prev-slide{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.lg-css3.lg-slide.lg-use-css3 .lg-item.lg-next-slide{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.lg-css3.lg-slide.lg-use-css3 .lg-item.lg-current{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);opacity:1}.lg-css3.lg-slide.lg-use-css3 .lg-item.lg-current,.lg-css3.lg-slide.lg-use-css3 .lg-item.lg-next-slide,.lg-css3.lg-slide.lg-use-css3 .lg-item.lg-prev-slide{-webkit-transition:-webkit-transform 1s cubic-bezier(0,0,.25,1) 0s,opacity .1s ease 0s;-moz-transition:-moz-transform 1s cubic-bezier(0,0,.25,1) 0s,opacity .1s ease 0s;-o-transition:-o-transform 1s cubic-bezier(0,0,.25,1) 0s,opacity .1s ease 0s;transition:transform 1s cubic-bezier(0,0,.25,1) 0s,opacity .1s ease 0s}.lg-css3.lg-slide.lg-use-left .lg-item{opacity:0;position:absolute;left:0}.lg-css3.lg-slide.lg-use-left .lg-item.lg-prev-slide{left:-100%}.lg-css3.lg-slide.lg-use-left .lg-item.lg-next-slide{left:100%}.lg-css3.lg-slide.lg-use-left .lg-item.lg-current{left:0;opacity:1}.lg-css3.lg-slide.lg-use-left .lg-item.lg-current,.lg-css3.lg-slide.lg-use-left .lg-item.lg-next-slide,.lg-css3.lg-slide.lg-use-left .lg-item.lg-prev-slide{-webkit-transition:left 1s cubic-bezier(0,0,.25,1) 0s,opacity .1s ease 0s;-moz-transition:left 1s cubic-bezier(0,0,.25,1) 0s,opacity .1s ease 0s;-o-transition:left 1s cubic-bezier(0,0,.25,1) 0s,opacity .1s ease 0s;transition:left 1s cubic-bezier(0,0,.25,1) 0s,opacity .1s ease 0s} \ No newline at end of file
diff --git a/assets/lib/lightgallery/lightgallery.min.js b/assets/lib/lightgallery/lightgallery.min.js
index 4b20411d..69f48a30 100644
--- a/assets/lib/lightgallery/lightgallery.min.js
+++ b/assets/lib/lightgallery/lightgallery.min.js
@@ -1,7 +1,7 @@
/**!
- * lightgallery.js | 1.1.3 | February 11th 2019
+ * lightgallery.js | 1.2.0 | May 20th 2020
* http://sachinchoolur.github.io/lightgallery.js/
* Copyright (c) 2016 Sachin N;
* @license GPLv3
*/
-!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.Lightgallery=e()}}(function(){var e,t,s;return function(){function e(t,s,l){function i(r,d){if(!s[r]){if(!t[r]){var a="function"==typeof require&&require;if(!d&&a)return a(r,!0);if(o)return o(r,!0);var n=new Error("Cannot find module '"+r+"'");throw n.code="MODULE_NOT_FOUND",n}var u=s[r]={exports:{}};t[r][0].call(u.exports,function(e){return i(t[r][1][e]||e)},u,u.exports,e,t,s,l)}return s[r].exports}for(var o="function"==typeof require&&require,r=0;r<l.length;r++)i(l[r]);return i}return e}()({1:[function(t,s,l){!function(t,s){if("function"==typeof e&&e.amd)e(["exports"],s);else if(void 0!==l)s(l);else{var i={exports:{}};s(i.exports),t.lgUtils=i.exports}}(this,function(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t={getAttribute:function e(t,s){return t[s]},setAttribute:function e(t,s,l){t[s]=l},wrap:function e(t,s){if(t){var l=document.createElement("div");l.className=s,t.parentNode.insertBefore(l,t),t.parentNode.removeChild(t),l.appendChild(t)}},addClass:function e(t,s){t&&(t.classList?t.classList.add(s):t.className+=" "+s)},removeClass:function e(t,s){t&&(t.classList?t.classList.remove(s):t.className=t.className.replace(new RegExp("(^|\\b)"+s.split(" ").join("|")+"(\\b|$)","gi")," "))},hasClass:function e(t,s){return t.classList?t.classList.contains(s):new RegExp("(^| )"+s+"( |$)","gi").test(t.className)},setVendor:function e(t,s,l){t&&(t.style[s.charAt(0).toLowerCase()+s.slice(1)]=l,t.style["webkit"+s]=l,t.style["moz"+s]=l,t.style["ms"+s]=l,t.style["o"+s]=l)},trigger:function e(t,s){var l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(t){var i=new CustomEvent(s,{detail:l});t.dispatchEvent(i)}},Listener:{uid:0},on:function e(s,l,i){var o=this;s&&l.split(" ").forEach(function(e){var l=o.getAttribute(s,"lg-event-uid")||"";t.Listener.uid++,l+="&"+t.Listener.uid,o.setAttribute(s,"lg-event-uid",l),t.Listener[e+t.Listener.uid]=i,s.addEventListener(e.split(".")[0],i,!1)})},off:function e(s,l){if(s){var i=this.getAttribute(s,"lg-event-uid");if(i){i=i.split("&");for(var o=0;o<i.length;o++)if(i[o]){var r=l+i[o];if("."===r.substring(0,1))for(var d in t.Listener)t.Listener.hasOwnProperty(d)&&d.split(".").indexOf(r.split(".")[1])>-1&&(s.removeEventListener(d.split(".")[0],t.Listener[d]),this.setAttribute(s,"lg-event-uid",this.getAttribute(s,"lg-event-uid").replace("&"+i[o],"")),delete t.Listener[d]);else s.removeEventListener(r.split(".")[0],t.Listener[r]),this.setAttribute(s,"lg-event-uid",this.getAttribute(s,"lg-event-uid").replace("&"+i[o],"")),delete t.Listener[r]}}}},param:function e(t){return Object.keys(t).map(function(e){return encodeURIComponent(e)+"="+encodeURIComponent(t[e])}).join("&")}};e.default=t})},{}],2:[function(t,s,l){!function(s,i){if("function"==typeof e&&e.amd)e(["./lg-utils"],i);else if(void 0!==l)i(t("./lg-utils"));else{var o={exports:{}};i(s.lgUtils),s.lightgallery=o.exports}}(this,function(e){"use strict";function t(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(this.el=e,this.s=i({},o,t),this.s.dynamic&&"undefined"!==this.s.dynamicEl&&this.s.dynamicEl.constructor===Array&&!this.s.dynamicEl.length)throw"When using dynamic mode, you must also define dynamicEl as an Array.";return this.modules={},this.lGalleryOn=!1,this.lgBusy=!1,this.hideBartimeout=!1,this.isTouch="ontouchstart"in document.documentElement,this.s.slideEndAnimatoin&&(this.s.hideControlOnEnd=!1),this.items=[],this.s.dynamic?this.items=this.s.dynamicEl:"this"===this.s.selector?this.items.push(this.el):""!==this.s.selector?this.s.selectWithin?this.items=document.querySelector(this.s.selectWithin).querySelectorAll(this.s.selector):this.items=this.el.querySelectorAll(this.s.selector):this.items=this.el.children,this.___slide="",this.outer="",this.init(),this}var l=t(e),i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var l in s)Object.prototype.hasOwnProperty.call(s,l)&&(e[l]=s[l])}return e};!function(){function e(e,t){t=t||{bubbles:!1,cancelable:!1,detail:void 0};var s=document.createEvent("CustomEvent");return s.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),s}if("function"==typeof window.CustomEvent)return!1;e.prototype=window.Event.prototype,window.CustomEvent=e}(),window.utils=l.default,window.lgData={uid:0},window.lgModules={};var o={mode:"lg-slide",cssEasing:"ease",easing:"linear",speed:600,height:"100%",width:"100%",addClass:"",startClass:"lg-start-zoom",backdropDuration:150,hideBarsDelay:6e3,useLeft:!1,closable:!0,loop:!0,escKey:!0,keyPress:!0,controls:!0,slideEndAnimatoin:!0,hideControlOnEnd:!1,mousewheel:!1,getCaptionFromTitleOrAlt:!0,appendSubHtmlTo:".lg-sub-html",subHtmlSelectorRelative:!1,preload:1,showAfterLoad:!0,selector:"",selectWithin:"",nextHtml:"",prevHtml:"",index:!1,iframeMaxWidth:"100%",download:!0,counter:!0,appendCounterTo:".lg-toolbar",swipeThreshold:50,enableSwipe:!0,enableDrag:!0,dynamic:!1,dynamicEl:[],galleryId:1};s.prototype.init=function(){var e=this;e.s.preload>e.items.length&&(e.s.preload=e.items.length);var t=window.location.hash;if(t.indexOf("lg="+this.s.galleryId)>0&&(e.index=parseInt(t.split("&slide=")[1],10),l.default.addClass(document.body,"lg-from-hash"),l.default.hasClass(document.body,"lg-on")||(l.default.addClass(document.body,"lg-on"),setTimeout(function(){e.build(e.index)}))),e.s.dynamic)l.default.trigger(this.el,"onBeforeOpen"),e.index=e.s.index||0,l.default.hasClass(document.body,"lg-on")||(l.default.addClass(document.body,"lg-on"),setTimeout(function(){e.build(e.index)}));else for(var s=0;s<e.items.length;s++)!function(t){l.default.on(e.items[t],"click.lgcustom",function(s){s.preventDefault(),l.default.trigger(e.el,"onBeforeOpen"),e.index=e.s.index||t,l.default.hasClass(document.body,"lg-on")||(e.build(e.index),l.default.addClass(document.body,"lg-on"))})}(s)},s.prototype.build=function(e){var t=this;t.structure();for(var s in window.lgModules)t.modules[s]=new window.lgModules[s](t.el);t.slide(e,!1,!1),t.s.keyPress&&t.keyPress(),t.items.length>1&&(t.arrow(),setTimeout(function(){t.enableDrag(),t.enableSwipe()},50),t.s.mousewheel&&t.mousewheel()),t.counter(),t.closeGallery(),l.default.trigger(t.el,"onAfterOpen"),l.default.on(t.outer,"mousemove.lg click.lg touchstart.lg",function(){l.default.removeClass(t.outer,"lg-hide-items"),clearTimeout(t.hideBartimeout),t.hideBartimeout=setTimeout(function(){l.default.addClass(t.outer,"lg-hide-items")},t.s.hideBarsDelay)})},s.prototype.structure=function(){var e="",t="",s=0,i="",o,r=this;for(document.body.insertAdjacentHTML("beforeend",'<div class="lg-backdrop"></div>'),l.default.setVendor(document.querySelector(".lg-backdrop"),"TransitionDuration",this.s.backdropDuration+"ms"),s=0;s<this.items.length;s++)e+='<div class="lg-item"></div>';if(this.s.controls&&this.items.length>1&&(t='<div class="lg-actions"><div class="lg-prev lg-icon">'+this.s.prevHtml+'</div><div class="lg-next lg-icon">'+this.s.nextHtml+"</div></div>"),".lg-sub-html"===this.s.appendSubHtmlTo&&(i='<div class="lg-sub-html"></div>'),o='<div class="lg-outer '+this.s.addClass+" "+this.s.startClass+'"><div class="lg" style="width:'+this.s.width+"; height:"+this.s.height+'"><div class="lg-inner">'+e+'</div><div class="lg-toolbar group"><span class="lg-close lg-icon"></span></div>'+t+i+"</div></div>",document.body.insertAdjacentHTML("beforeend",o),this.outer=document.querySelector(".lg-outer"),this.___slide=this.outer.querySelectorAll(".lg-item"),this.s.useLeft?(l.default.addClass(this.outer,"lg-use-left"),this.s.mode="lg-slide"):l.default.addClass(this.outer,"lg-use-css3"),r.setTop(),l.default.on(window,"resize.lg orientationchange.lg",function(){setTimeout(function(){r.setTop()},100)}),l.default.addClass(this.___slide[this.index],"lg-current"),this.doCss()?l.default.addClass(this.outer,"lg-css3"):(l.default.addClass(this.outer,"lg-css"),this.s.speed=0),l.default.addClass(this.outer,this.s.mode),this.s.enableDrag&&this.items.length>1&&l.default.addClass(this.outer,"lg-grab"),this.s.showAfterLoad&&l.default.addClass(this.outer,"lg-show-after-load"),this.doCss()){var d=this.outer.querySelector(".lg-inner");l.default.setVendor(d,"TransitionTimingFunction",this.s.cssEasing),l.default.setVendor(d,"TransitionDuration",this.s.speed+"ms")}setTimeout(function(){l.default.addClass(document.querySelector(".lg-backdrop"),"in")}),setTimeout(function(){l.default.addClass(r.outer,"lg-visible")},this.s.backdropDuration),this.s.download&&this.outer.querySelector(".lg-toolbar").insertAdjacentHTML("beforeend",'<a id="lg-download" target="_blank" download class="lg-download lg-icon"></a>'),this.prevScrollTop=document.documentElement.scrollTop||document.body.scrollTop},s.prototype.setTop=function(){if("100%"!==this.s.height){var e=window.innerHeight,t=(e-parseInt(this.s.height,10))/2,s=this.outer.querySelector(".lg");e>=parseInt(this.s.height,10)?s.style.top=t+"px":s.style.top="0px"}},s.prototype.doCss=function(){return!!function e(){var t=["transition","MozTransition","WebkitTransition","OTransition","msTransition","KhtmlTransition"],s=document.documentElement,l=0;for(l=0;l<t.length;l++)if(t[l]in s.style)return!0}()},s.prototype.isVideo=function(e,t){var s;if(s=this.s.dynamic?this.s.dynamicEl[t].html:this.items[t].getAttribute("data-html"),!e&&s)return{html5:!0};var l=e.match(/\/\/(?:www\.)?youtu(?:\.be|be\.com|be-nocookie\.com)\/(?:watch\?v=|embed\/)?([a-z0-9\-\_\%]+)/i),i=e.match(/\/\/(?:www\.)?vimeo.com\/([0-9a-z\-_]+)/i),o=e.match(/\/\/(?:www\.)?dai.ly\/([0-9a-z\-_]+)/i),r=e.match(/\/\/(?:www\.)?(?:vk\.com|vkontakte\.ru)\/(?:video_ext\.php\?)(.*)/i);return l?{youtube:l}:i?{vimeo:i}:o?{dailymotion:o}:r?{vk:r}:void 0},s.prototype.counter=function(){this.s.counter&&this.outer.querySelector(this.s.appendCounterTo).insertAdjacentHTML("beforeend",'<div id="lg-counter"><span id="lg-counter-current">'+(parseInt(this.index,10)+1)+'</span> / <span id="lg-counter-all">'+this.items.length+"</span></div>")},s.prototype.addHtml=function(e){var t=null,s;if(this.s.dynamic?t=this.s.dynamicEl[e].subHtml:(s=this.items[e],t=s.getAttribute("data-sub-html"),this.s.getCaptionFromTitleOrAlt&&!t&&(t=s.getAttribute("title"))&&s.querySelector("img")&&(t=s.querySelector("img").getAttribute("alt"))),void 0!==t&&null!==t){var i=t.substring(0,1);"."!==i&&"#"!==i||(t=this.s.subHtmlSelectorRelative&&!this.s.dynamic?s.querySelector(t).innerHTML:document.querySelector(t).innerHTML)}else t="";".lg-sub-html"===this.s.appendSubHtmlTo?this.outer.querySelector(this.s.appendSubHtmlTo).innerHTML=t:this.___slide[e].insertAdjacentHTML("beforeend",t),void 0!==t&&null!==t&&(""===t?l.default.addClass(this.outer.querySelector(this.s.appendSubHtmlTo),"lg-empty-html"):l.default.removeClass(this.outer.querySelector(this.s.appendSubHtmlTo),"lg-empty-html")),l.default.trigger(this.el,"onAfterAppendSubHtml",{index:e})},s.prototype.preload=function(e){var t=1,s=1;for(t=1;t<=this.s.preload&&!(t>=this.items.length-e);t++)this.loadContent(e+t,!1,0);for(s=1;s<=this.s.preload&&!(e-s<0);s++)this.loadContent(e-s,!1,0)},s.prototype.loadContent=function(e,t,s){var i=this,o=!1,r,d,a,n,u,c,g=function e(t){for(var s=[],l=[],i=0;i<t.length;i++){var o=t[i].split(" ");""===o[0]&&o.splice(0,1),l.push(o[0]),s.push(o[1])}for(var r=window.innerWidth,a=0;a<s.length;a++)if(parseInt(s[a],10)>r){d=l[a];break}};if(i.s.dynamic){if(i.s.dynamicEl[e].poster&&(o=!0,a=i.s.dynamicEl[e].poster),c=i.s.dynamicEl[e].html,d=i.s.dynamicEl[e].src,i.s.dynamicEl[e].responsive){g(i.s.dynamicEl[e].responsive.split(","))}n=i.s.dynamicEl[e].srcset,u=i.s.dynamicEl[e].sizes}else{if(i.items[e].getAttribute("data-poster")&&(o=!0,a=i.items[e].getAttribute("data-poster")),c=i.items[e].getAttribute("data-html"),d=i.items[e].getAttribute("href")||i.items[e].getAttribute("data-src"),i.items[e].getAttribute("data-responsive")){g(i.items[e].getAttribute("data-responsive").split(","))}n=i.items[e].getAttribute("data-srcset"),u=i.items[e].getAttribute("data-sizes")}var f=!1;i.s.dynamic?i.s.dynamicEl[e].iframe&&(f=!0):"true"===i.items[e].getAttribute("data-iframe")&&(f=!0);var h=i.isVideo(d,e);if(!l.default.hasClass(i.___slide[e],"lg-loaded")){if(f)i.___slide[e].insertAdjacentHTML("afterbegin",'<div class="lg-video-cont" style="max-width:'+i.s.iframeMaxWidth+'"><div class="lg-video"><iframe class="lg-object" frameborder="0" src="'+d+'" allowfullscreen="true"></iframe></div></div>');else if(o){var m="";m=h&&h.youtube?"lg-has-youtube":h&&h.vimeo?"lg-has-vimeo":"lg-has-html5",i.___slide[e].insertAdjacentHTML("beforeend",'<div class="lg-video-cont '+m+' "><div class="lg-video"><span class="lg-video-play"></span><img class="lg-object lg-has-poster" src="'+a+'" /></div></div>')}else h?(i.___slide[e].insertAdjacentHTML("beforeend",'<div class="lg-video-cont "><div class="lg-video"></div></div>'),l.default.trigger(i.el,"hasVideo",{index:e,src:d,html:c})):i.___slide[e].insertAdjacentHTML("beforeend",'<div class="lg-img-wrap"><img class="lg-object lg-image" src="'+d+'" /></div>');if(l.default.trigger(i.el,"onAferAppendSlide",{index:e}),r=i.___slide[e].querySelector(".lg-object"),u&&r.setAttribute("sizes",u),n){r.setAttribute("srcset",n);try{picturefill({elements:[r[0]]})}catch(e){console.error("Make sure you have included Picturefill version 2")}}".lg-sub-html"!==this.s.appendSubHtmlTo&&i.addHtml(e),l.default.addClass(i.___slide[e],"lg-loaded")}l.default.on(i.___slide[e].querySelector(".lg-object"),"load.lg error.lg",function(){var t=0;s&&!l.default.hasClass(document.body,"lg-from-hash")&&(t=s),setTimeout(function(){l.default.addClass(i.___slide[e],"lg-complete"),l.default.trigger(i.el,"onSlideItemLoad",{index:e,delay:s||0})},t)}),h&&h.html5&&!o&&l.default.addClass(i.___slide[e],"lg-complete"),!0===t&&(l.default.hasClass(i.___slide[e],"lg-complete")?i.preload(e):l.default.on(i.___slide[e].querySelector(".lg-object"),"load.lg error.lg",function(){i.preload(e)}))},s.prototype.slide=function(e,t,s){for(var i=0,o=0;o<this.___slide.length;o++)if(l.default.hasClass(this.___slide[o],"lg-current")){i=o;break}var r=this;if(!r.lGalleryOn||i!==e){var d=this.___slide.length,a=r.lGalleryOn?this.s.speed:0,n=!1,u=!1;if(!r.lgBusy){if(this.s.download){var c;c=r.s.dynamic?!1!==r.s.dynamicEl[e].downloadUrl&&(r.s.dynamicEl[e].downloadUrl||r.s.dynamicEl[e].src):"false"!==r.items[e].getAttribute("data-download-url")&&(r.items[e].getAttribute("data-download-url")||r.items[e].getAttribute("href")||r.items[e].getAttribute("data-src")),c?(document.getElementById("lg-download").setAttribute("href",c),l.default.removeClass(r.outer,"lg-hide-download")):l.default.addClass(r.outer,"lg-hide-download")}if(l.default.trigger(r.el,"onBeforeSlide",{prevIndex:i,index:e,fromTouch:t,fromThumb:s}),r.lgBusy=!0,clearTimeout(r.hideBartimeout),".lg-sub-html"===this.s.appendSubHtmlTo&&setTimeout(function(){r.addHtml(e)},a),this.arrowDisable(e),t){var g=e-1,f=e+1;0===e&&i===d-1?(f=0,g=d-1):e===d-1&&0===i&&(f=0,g=d-1),l.default.removeClass(r.outer.querySelector(".lg-prev-slide"),"lg-prev-slide"),l.default.removeClass(r.outer.querySelector(".lg-current"),"lg-current"),l.default.removeClass(r.outer.querySelector(".lg-next-slide"),"lg-next-slide"),l.default.addClass(r.___slide[g],"lg-prev-slide"),l.default.addClass(r.___slide[f],"lg-next-slide"),l.default.addClass(r.___slide[e],"lg-current")}else{l.default.addClass(r.outer,"lg-no-trans");for(var h=0;h<this.___slide.length;h++)l.default.removeClass(this.___slide[h],"lg-prev-slide"),l.default.removeClass(this.___slide[h],"lg-next-slide");e<i?(u=!0,0!==e||i!==d-1||s||(u=!1,n=!0)):e>i&&(n=!0,e!==d-1||0!==i||s||(u=!0,n=!1)),u?(l.default.addClass(this.___slide[e],"lg-prev-slide"),l.default.addClass(this.___slide[i],"lg-next-slide")):n&&(l.default.addClass(this.___slide[e],"lg-next-slide"),l.default.addClass(this.___slide[i],"lg-prev-slide")),setTimeout(function(){l.default.removeClass(r.outer.querySelector(".lg-current"),"lg-current"),l.default.addClass(r.___slide[e],"lg-current"),l.default.removeClass(r.outer,"lg-no-trans")},50)}r.lGalleryOn?(setTimeout(function(){r.loadContent(e,!0,0)},this.s.speed+50),setTimeout(function(){r.lgBusy=!1,l.default.trigger(r.el,"onAfterSlide",{prevIndex:i,index:e,fromTouch:t,fromThumb:s})},this.s.speed)):(r.loadContent(e,!0,r.s.backdropDuration),r.lgBusy=!1,l.default.trigger(r.el,"onAfterSlide",{prevIndex:i,index:e,fromTouch:t,fromThumb:s})),r.lGalleryOn=!0,this.s.counter&&document.getElementById("lg-counter-current")&&(document.getElementById("lg-counter-current").innerHTML=e+1)}}},s.prototype.goToNextSlide=function(e){var t=this;t.lgBusy||(t.index+1<t.___slide.length?(t.index++,l.default.trigger(t.el,"onBeforeNextSlide",{index:t.index}),t.slide(t.index,e,!1)):t.s.loop?(t.index=0,l.default.trigger(t.el,"onBeforeNextSlide",{index:t.index}),t.slide(t.index,e,!1)):t.s.slideEndAnimatoin&&(l.default.addClass(t.outer,"lg-right-end"),setTimeout(function(){l.default.removeClass(t.outer,"lg-right-end")},400)))},s.prototype.goToPrevSlide=function(e){var t=this;t.lgBusy||(t.index>0?(t.index--,l.default.trigger(t.el,"onBeforePrevSlide",{index:t.index,fromTouch:e}),t.slide(t.index,e,!1)):t.s.loop?(t.index=t.items.length-1,l.default.trigger(t.el,"onBeforePrevSlide",{index:t.index,fromTouch:e}),t.slide(t.index,e,!1)):t.s.slideEndAnimatoin&&(l.default.addClass(t.outer,"lg-left-end"),setTimeout(function(){l.default.removeClass(t.outer,"lg-left-end")},400)))},s.prototype.keyPress=function(){var e=this;this.items.length>1&&l.default.on(window,"keyup.lg",function(t){e.items.length>1&&(37===t.keyCode&&(t.preventDefault(),e.goToPrevSlide()),39===t.keyCode&&(t.preventDefault(),e.goToNextSlide()))}),l.default.on(window,"keydown.lg",function(t){!0===e.s.escKey&&27===t.keyCode&&(t.preventDefault(),l.default.hasClass(e.outer,"lg-thumb-open")?l.default.removeClass(e.outer,"lg-thumb-open"):e.destroy())})},s.prototype.arrow=function(){var e=this;l.default.on(this.outer.querySelector(".lg-prev"),"click.lg",function(){e.goToPrevSlide()}),l.default.on(this.outer.querySelector(".lg-next"),"click.lg",function(){e.goToNextSlide()})},s.prototype.arrowDisable=function(e){if(!this.s.loop&&this.s.hideControlOnEnd){var t=this.outer.querySelector(".lg-next"),s=this.outer.querySelector(".lg-prev");e+1<this.___slide.length?(t.removeAttribute("disabled"),l.default.removeClass(t,"disabled")):(t.setAttribute("disabled","disabled"),l.default.addClass(t,"disabled")),e>0?(s.removeAttribute("disabled"),l.default.removeClass(s,"disabled")):(s.setAttribute("disabled","disabled"),l.default.addClass(s,"disabled"))}},s.prototype.setTranslate=function(e,t,s){this.s.useLeft?e.style.left=t:l.default.setVendor(e,"Transform","translate3d("+t+"px, "+s+"px, 0px)")},s.prototype.touchMove=function(e,t){var s=t-e;Math.abs(s)>15&&(l.default.addClass(this.outer,"lg-dragging"),this.setTranslate(this.___slide[this.index],s,0),this.setTranslate(document.querySelector(".lg-prev-slide"),-this.___slide[this.index].clientWidth+s,0),this.setTranslate(document.querySelector(".lg-next-slide"),this.___slide[this.index].clientWidth+s,0))},s.prototype.touchEnd=function(e){var t=this;"lg-slide"!==t.s.mode&&l.default.addClass(t.outer,"lg-slide");for(var s=0;s<this.___slide.length;s++)l.default.hasClass(this.___slide[s],"lg-current")||l.default.hasClass(this.___slide[s],"lg-prev-slide")||l.default.hasClass(this.___slide[s],"lg-next-slide")||(this.___slide[s].style.opacity="0");setTimeout(function(){l.default.removeClass(t.outer,"lg-dragging"),e<0&&Math.abs(e)>t.s.swipeThreshold?t.goToNextSlide(!0):e>0&&Math.abs(e)>t.s.swipeThreshold?t.goToPrevSlide(!0):Math.abs(e)<5&&l.default.trigger(t.el,"onSlideClick");for(var s=0;s<t.___slide.length;s++)t.___slide[s].removeAttribute("style")}),setTimeout(function(){l.default.hasClass(t.outer,"lg-dragging")||"lg-slide"===t.s.mode||l.default.removeClass(t.outer,"lg-slide")},t.s.speed+100)},s.prototype.enableSwipe=function(){var e=this,t=0,s=0,i=!1;if(e.s.enableSwipe&&e.isTouch&&e.doCss()){for(var o=0;o<e.___slide.length;o++)l.default.on(e.___slide[o],"touchstart.lg",function(s){l.default.hasClass(e.outer,"lg-zoomed")||e.lgBusy||(s.preventDefault(),e.manageSwipeClass(),t=s.targetTouches[0].pageX)});for(var r=0;r<e.___slide.length;r++)l.default.on(e.___slide[r],"touchmove.lg",function(o){l.default.hasClass(e.outer,"lg-zoomed")||(o.preventDefault(),s=o.targetTouches[0].pageX,e.touchMove(t,s),i=!0)});for(var d=0;d<e.___slide.length;d++)l.default.on(e.___slide[d],"touchend.lg",function(){l.default.hasClass(e.outer,"lg-zoomed")||(i?(i=!1,e.touchEnd(s-t)):l.default.trigger(e.el,"onSlideClick"))})}},s.prototype.enableDrag=function(){var e=this,t=0,s=0,i=!1,o=!1;if(e.s.enableDrag&&!e.isTouch&&e.doCss()){for(var r=0;r<e.___slide.length;r++)l.default.on(e.___slide[r],"mousedown.lg",function(s){l.default.hasClass(e.outer,"lg-zoomed")||(l.default.hasClass(s.target,"lg-object")||l.default.hasClass(s.target,"lg-video-play"))&&(s.preventDefault(),e.lgBusy||(e.manageSwipeClass(),t=s.pageX,i=!0,e.outer.scrollLeft+=1,e.outer.scrollLeft-=1,l.default.removeClass(e.outer,"lg-grab"),l.default.addClass(e.outer,"lg-grabbing"),l.default.trigger(e.el,"onDragstart")))});l.default.on(window,"mousemove.lg",function(r){i&&(o=!0,s=r.pageX,e.touchMove(t,s),l.default.trigger(e.el,"onDragmove"))}),l.default.on(window,"mouseup.lg",function(r){o?(o=!1,e.touchEnd(s-t),l.default.trigger(e.el,"onDragend")):(l.default.hasClass(r.target,"lg-object")||l.default.hasClass(r.target,"lg-video-play"))&&l.default.trigger(e.el,"onSlideClick"),i&&(i=!1,l.default.removeClass(e.outer,"lg-grabbing"),l.default.addClass(e.outer,"lg-grab"))})}},s.prototype.manageSwipeClass=function(){var e=this.index+1,t=this.index-1,s=this.___slide.length;this.s.loop&&(0===this.index?t=s-1:this.index===s-1&&(e=0));for(var i=0;i<this.___slide.length;i++)l.default.removeClass(this.___slide[i],"lg-next-slide"),l.default.removeClass(this.___slide[i],"lg-prev-slide");t>-1&&l.default.addClass(this.___slide[t],"lg-prev-slide"),l.default.addClass(this.___slide[e],"lg-next-slide")},s.prototype.mousewheel=function(){var e=this;l.default.on(e.outer,"mousewheel.lg",function(t){t.deltaY&&(t.deltaY>0?e.goToPrevSlide():e.goToNextSlide(),t.preventDefault())})},s.prototype.closeGallery=function(){var e=this,t=!1;l.default.on(this.outer.querySelector(".lg-close"),"click.lg",function(){e.destroy()}),e.s.closable&&(l.default.on(e.outer,"mousedown.lg",function(e){t=!!(l.default.hasClass(e.target,"lg-outer")||l.default.hasClass(e.target,"lg-item")||l.default.hasClass(e.target,"lg-img-wrap"))}),l.default.on(e.outer,"mouseup.lg",function(s){(l.default.hasClass(s.target,"lg-outer")||l.default.hasClass(s.target,"lg-item")||l.default.hasClass(s.target,"lg-img-wrap")&&t)&&(l.default.hasClass(e.outer,"lg-dragging")||e.destroy())}))},s.prototype.destroy=function(e){var t=this;if(e||l.default.trigger(t.el,"onBeforeClose"),document.body.scrollTop=t.prevScrollTop,document.documentElement.scrollTop=t.prevScrollTop,e){if(!t.s.dynamic)for(var s=0;s<this.items.length;s++)l.default.off(this.items[s],".lg"),l.default.off(this.items[s],".lgcustom");var i=t.el.getAttribute("lg-uid");delete window.lgData[i],t.el.removeAttribute("lg-uid")}l.default.off(this.el,".lgtm");for(var o in window.lgModules)t.modules[o]&&t.modules[o].destroy(e);this.lGalleryOn=!1,clearTimeout(t.hideBartimeout),this.hideBartimeout=!1,l.default.off(window,".lg"),l.default.removeClass(document.body,"lg-on"),l.default.removeClass(document.body,"lg-from-hash"),t.outer&&l.default.removeClass(t.outer,"lg-visible"),l.default.removeClass(document.querySelector(".lg-backdrop"),"in"),setTimeout(function(){try{t.outer&&t.outer.parentNode.removeChild(t.outer),document.querySelector(".lg-backdrop")&&document.querySelector(".lg-backdrop").parentNode.removeChild(document.querySelector(".lg-backdrop")),e||l.default.trigger(t.el,"onCloseAfter")}catch(e){}},t.s.backdropDuration+50)},window.lightGallery=function(e,t){if(e)try{if(e.getAttribute("lg-uid"))try{window.lgData[e.getAttribute("lg-uid")].init()}catch(e){console.error("lightGallery has not initiated properly")}else{var l="lg"+window.lgData.uid++;window.lgData[l]=new s(e,t),e.setAttribute("lg-uid",l)}}catch(e){console.error("lightGallery has not initiated properly")}}})},{"./lg-utils":1}]},{},[2])(2)}); \ No newline at end of file
+!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.Lightgallery=e()}}(function(){var e,t,s;return function(){function e(t,s,l){function i(r,a){if(!s[r]){if(!t[r]){var d="function"==typeof require&&require;if(!a&&d)return d(r,!0);if(o)return o(r,!0);var n=new Error("Cannot find module '"+r+"'");throw n.code="MODULE_NOT_FOUND",n}var u=s[r]={exports:{}};t[r][0].call(u.exports,function(e){return i(t[r][1][e]||e)},u,u.exports,e,t,s,l)}return s[r].exports}for(var o="function"==typeof require&&require,r=0;r<l.length;r++)i(l[r]);return i}return e}()({1:[function(t,s,l){!function(t,s){if("function"==typeof e&&e.amd)e(["exports"],s);else if(void 0!==l)s(l);else{var i={exports:{}};s(i.exports),t.lgUtils=i.exports}}(this,function(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t={getAttribute:function e(t,s){return t[s]},setAttribute:function e(t,s,l){t[s]=l},wrap:function e(t,s){if(t){var l=document.createElement("div");l.className=s,t.parentNode.insertBefore(l,t),t.parentNode.removeChild(t),l.appendChild(t)}},addClass:function e(t,s){t&&(t.classList?t.classList.add(s):t.className+=" "+s)},removeClass:function e(t,s){t&&(t.classList?t.classList.remove(s):t.className=t.className.replace(new RegExp("(^|\\b)"+s.split(" ").join("|")+"(\\b|$)","gi")," "))},hasClass:function e(t,s){return t.classList?t.classList.contains(s):new RegExp("(^| )"+s+"( |$)","gi").test(t.className)},setVendor:function e(t,s,l){t&&(t.style[s.charAt(0).toLowerCase()+s.slice(1)]=l,t.style["webkit"+s]=l,t.style["moz"+s]=l,t.style["ms"+s]=l,t.style["o"+s]=l)},trigger:function e(t,s){var l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(t){var i=new CustomEvent(s,{detail:l});t.dispatchEvent(i)}},Listener:{uid:0},on:function e(s,l,i){var o=this;s&&l.split(" ").forEach(function(e){var l=o.getAttribute(s,"lg-event-uid")||"";t.Listener.uid++,l+="&"+t.Listener.uid,o.setAttribute(s,"lg-event-uid",l),t.Listener[e+t.Listener.uid]=i,s.addEventListener(e.split(".")[0],i,!1)})},off:function e(s,l){if(s){var i=this.getAttribute(s,"lg-event-uid");if(i){i=i.split("&");for(var o=0;o<i.length;o++)if(i[o]){var r=l+i[o];if("."===r.substring(0,1))for(var a in t.Listener)t.Listener.hasOwnProperty(a)&&a.split(".").indexOf(r.split(".")[1])>-1&&(s.removeEventListener(a.split(".")[0],t.Listener[a]),this.setAttribute(s,"lg-event-uid",this.getAttribute(s,"lg-event-uid").replace("&"+i[o],"")),delete t.Listener[a]);else s.removeEventListener(r.split(".")[0],t.Listener[r]),this.setAttribute(s,"lg-event-uid",this.getAttribute(s,"lg-event-uid").replace("&"+i[o],"")),delete t.Listener[r]}}}},param:function e(t){return Object.keys(t).map(function(e){return encodeURIComponent(e)+"="+encodeURIComponent(t[e])}).join("&")}};e.default=t})},{}],2:[function(t,s,l){!function(s,i){if("function"==typeof e&&e.amd)e(["./lg-utils"],i);else if(void 0!==l)i(t("./lg-utils"));else{var o={exports:{}};i(s.lgUtils),s.lightgallery=o.exports}}(this,function(e){"use strict";function t(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(this.el=e,this.s=i({},o,t),this.s.dynamic&&"undefined"!==this.s.dynamicEl&&this.s.dynamicEl.constructor===Array&&!this.s.dynamicEl.length)throw"When using dynamic mode, you must also define dynamicEl as an Array.";return this.modules={},this.lGalleryOn=!1,this.lgBusy=!1,this.hideBartimeout=!1,this.isTouch="ontouchstart"in document.documentElement,this.s.slideEndAnimatoin&&(this.s.hideControlOnEnd=!1),this.items=[],this.s.dynamic?this.items=this.s.dynamicEl:"this"===this.s.selector?this.items.push(this.el):""!==this.s.selector?this.s.selectWithin?this.items=document.querySelector(this.s.selectWithin).querySelectorAll(this.s.selector):this.items=this.el.querySelectorAll(this.s.selector):this.items=this.el.children,this.___slide="",this.outer="",this.init(),this}var l=t(e),i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var l in s)Object.prototype.hasOwnProperty.call(s,l)&&(e[l]=s[l])}return e};!function(){function e(e,t){t=t||{bubbles:!1,cancelable:!1,detail:void 0};var s=document.createEvent("CustomEvent");return s.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),s}if("function"==typeof window.CustomEvent)return!1;e.prototype=window.Event.prototype,window.CustomEvent=e}(),window.utils=l.default,window.lgData={uid:0},window.lgModules={};var o={mode:"lg-slide",cssEasing:"ease",easing:"linear",speed:600,height:"100%",width:"100%",addClass:"",startClass:"lg-start-zoom",backdropDuration:150,hideBarsDelay:6e3,useLeft:!1,ariaLabelledby:"",ariaDescribedby:"",closable:!0,loop:!0,escKey:!0,keyPress:!0,controls:!0,slideEndAnimatoin:!0,hideControlOnEnd:!1,mousewheel:!1,getCaptionFromTitleOrAlt:!0,appendSubHtmlTo:".lg-sub-html",subHtmlSelectorRelative:!1,preload:1,showAfterLoad:!0,selector:"",selectWithin:"",nextHtml:"",prevHtml:"",index:!1,iframeMaxWidth:"100%",download:!0,counter:!0,appendCounterTo:".lg-toolbar",swipeThreshold:50,enableSwipe:!0,enableDrag:!0,dynamic:!1,dynamicEl:[],galleryId:1};s.prototype.init=function(){var e=this;e.s.preload>e.items.length&&(e.s.preload=e.items.length);var t=window.location.hash;if(t.indexOf("lg="+this.s.galleryId)>0&&(e.index=parseInt(t.split("&slide=")[1],10),l.default.addClass(document.body,"lg-from-hash"),l.default.hasClass(document.body,"lg-on")||(l.default.addClass(document.body,"lg-on"),setTimeout(function(){e.build(e.index)}))),e.s.dynamic)l.default.trigger(this.el,"onBeforeOpen"),e.index=e.s.index||0,l.default.hasClass(document.body,"lg-on")||(l.default.addClass(document.body,"lg-on"),setTimeout(function(){e.build(e.index)}));else for(var s=0;s<e.items.length;s++)!function(t){l.default.on(e.items[t],"click.lgcustom",function(s){s.preventDefault(),l.default.trigger(e.el,"onBeforeOpen"),e.index=e.s.index||t,l.default.hasClass(document.body,"lg-on")||(e.build(e.index),l.default.addClass(document.body,"lg-on"))})}(s)},s.prototype.build=function(e){var t=this;t.structure();for(var s in window.lgModules)t.modules[s]=new window.lgModules[s](t.el);t.slide(e,!1,!1),t.s.keyPress&&t.keyPress(),t.items.length>1&&(t.arrow(),setTimeout(function(){t.enableDrag(),t.enableSwipe()},50),t.s.mousewheel&&t.mousewheel()),t.counter(),t.closeGallery(),l.default.trigger(t.el,"onAfterOpen"),l.default.on(t.outer,"mousemove.lg click.lg touchstart.lg",function(){l.default.removeClass(t.outer,"lg-hide-items"),clearTimeout(t.hideBartimeout),t.hideBartimeout=setTimeout(function(){l.default.addClass(t.outer,"lg-hide-items")},t.s.hideBarsDelay)})},s.prototype.structure=function(){var e="",t="",s=0,i="",o,r=this;for(document.body.insertAdjacentHTML("beforeend",'<div class="lg-backdrop"></div>'),l.default.setVendor(document.querySelector(".lg-backdrop"),"TransitionDuration",this.s.backdropDuration+"ms"),s=0;s<this.items.length;s++)e+='<div class="lg-item"></div>';if(this.s.controls&&this.items.length>1&&(t='<div class="lg-actions"><button aria-label="Previous slide" class="lg-prev lg-icon">'+this.s.prevHtml+'</button><button aria-label="Next slide" class="lg-next lg-icon">'+this.s.nextHtml+"</button></div>"),".lg-sub-html"===this.s.appendSubHtmlTo&&(i='<div role="status" aria-live="polite" class="lg-sub-html"></div>'),o='<div tabindex="-1" aria-modal="true" '+(this.s.ariaLabelledby?'aria-labelledby="'+this.s.ariaLabelledby+'"':"")+" "+(this.s.ariaDescribedby?'aria-describedby="'+this.s.ariaDescribedby+'"':"")+' role="dialog" class="lg-outer '+this.s.addClass+" "+this.s.startClass+'"><div class="lg" style="width:'+this.s.width+"; height:"+this.s.height+'"><div class="lg-inner">'+e+'</div><div class="lg-toolbar group"><button aria-label="Close gallery" class="lg-close lg-icon"></button></div>'+t+i+"</div></div>",document.body.insertAdjacentHTML("beforeend",o),this.outer=document.querySelector(".lg-outer"),this.outer.focus(),this.___slide=this.outer.querySelectorAll(".lg-item"),this.s.useLeft?(l.default.addClass(this.outer,"lg-use-left"),this.s.mode="lg-slide"):l.default.addClass(this.outer,"lg-use-css3"),r.setTop(),l.default.on(window,"resize.lg orientationchange.lg",function(){setTimeout(function(){r.setTop()},100)}),l.default.addClass(this.___slide[this.index],"lg-current"),this.doCss()?l.default.addClass(this.outer,"lg-css3"):(l.default.addClass(this.outer,"lg-css"),this.s.speed=0),l.default.addClass(this.outer,this.s.mode),this.s.enableDrag&&this.items.length>1&&l.default.addClass(this.outer,"lg-grab"),this.s.showAfterLoad&&l.default.addClass(this.outer,"lg-show-after-load"),this.doCss()){var a=this.outer.querySelector(".lg-inner");l.default.setVendor(a,"TransitionTimingFunction",this.s.cssEasing),l.default.setVendor(a,"TransitionDuration",this.s.speed+"ms")}setTimeout(function(){l.default.addClass(document.querySelector(".lg-backdrop"),"in")}),setTimeout(function(){l.default.addClass(r.outer,"lg-visible")},this.s.backdropDuration),this.s.download&&this.outer.querySelector(".lg-toolbar").insertAdjacentHTML("beforeend",'<a id="lg-download" aria-label="Download" target="_blank" download class="lg-download lg-icon"></a>'),this.prevScrollTop=document.documentElement.scrollTop||document.body.scrollTop},s.prototype.setTop=function(){if("100%"!==this.s.height){var e=window.innerHeight,t=(e-parseInt(this.s.height,10))/2,s=this.outer.querySelector(".lg");e>=parseInt(this.s.height,10)?s.style.top=t+"px":s.style.top="0px"}},s.prototype.doCss=function(){return!!function e(){var t=["transition","MozTransition","WebkitTransition","OTransition","msTransition","KhtmlTransition"],s=document.documentElement,l=0;for(l=0;l<t.length;l++)if(t[l]in s.style)return!0}()},s.prototype.isVideo=function(e,t){var s;if(s=this.s.dynamic?this.s.dynamicEl[t].html:this.items[t].getAttribute("data-html"),!e&&s)return{html5:!0};var l=e.match(/\/\/(?:www\.)?youtu(?:\.be|be\.com|be-nocookie\.com)\/(?:watch\?v=|embed\/)?([a-z0-9\-\_\%]+)/i),i=e.match(/\/\/(?:www\.)?vimeo.com\/([0-9a-z\-_]+)/i),o=e.match(/\/\/(?:www\.)?dai.ly\/([0-9a-z\-_]+)/i),r=e.match(/\/\/(?:www\.)?(?:vk\.com|vkontakte\.ru)\/(?:video_ext\.php\?)(.*)/i);return l?{youtube:l}:i?{vimeo:i}:o?{dailymotion:o}:r?{vk:r}:void 0},s.prototype.counter=function(){this.s.counter&&this.outer.querySelector(this.s.appendCounterTo).insertAdjacentHTML("beforeend",'<div id="lg-counter" role="status" aria-live="polite"><span id="lg-counter-current">'+(parseInt(this.index,10)+1)+'</span> / <span id="lg-counter-all">'+this.items.length+"</span></div>")},s.prototype.addHtml=function(e){var t=null,s;if(this.s.dynamic?t=this.s.dynamicEl[e].subHtml:(s=this.items[e],t=s.getAttribute("data-sub-html"),this.s.getCaptionFromTitleOrAlt&&!t&&(t=s.getAttribute("title"))&&s.querySelector("img")&&(t=s.querySelector("img").getAttribute("alt"))),void 0!==t&&null!==t){var i=t.substring(0,1);"."!==i&&"#"!==i||(t=this.s.subHtmlSelectorRelative&&!this.s.dynamic?s.querySelector(t).innerHTML:document.querySelector(t).innerHTML)}else t="";".lg-sub-html"===this.s.appendSubHtmlTo?this.outer.querySelector(this.s.appendSubHtmlTo).innerHTML=t:this.___slide[e].insertAdjacentHTML("beforeend",t),void 0!==t&&null!==t&&(""===t?l.default.addClass(this.outer.querySelector(this.s.appendSubHtmlTo),"lg-empty-html"):l.default.removeClass(this.outer.querySelector(this.s.appendSubHtmlTo),"lg-empty-html")),l.default.trigger(this.el,"onAfterAppendSubHtml",{index:e})},s.prototype.preload=function(e){var t=1,s=1;for(t=1;t<=this.s.preload&&!(t>=this.items.length-e);t++)this.loadContent(e+t,!1,0);for(s=1;s<=this.s.preload&&!(e-s<0);s++)this.loadContent(e-s,!1,0)},s.prototype.loadContent=function(e,t,s){var i=this,o=!1,r,a,d,n,u,c,g,f=function e(t){for(var s=[],l=[],i=0;i<t.length;i++){var o=t[i].split(" ");""===o[0]&&o.splice(0,1),l.push(o[0]),s.push(o[1])}for(var r=window.innerWidth,d=0;d<s.length;d++)if(parseInt(s[d],10)>r){a=l[d];break}};if(i.s.dynamic){if(i.s.dynamicEl[e].poster&&(o=!0,d=i.s.dynamicEl[e].poster),c=i.s.dynamicEl[e].html,a=i.s.dynamicEl[e].src,g=i.s.dynamicEl[e].alt,i.s.dynamicEl[e].responsive){f(i.s.dynamicEl[e].responsive.split(","))}n=i.s.dynamicEl[e].srcset,u=i.s.dynamicEl[e].sizes}else{if(i.items[e].getAttribute("data-poster")&&(o=!0,d=i.items[e].getAttribute("data-poster")),c=i.items[e].getAttribute("data-html"),a=i.items[e].getAttribute("href")||i.items[e].getAttribute("data-src"),g=i.items[e].getAttribute("title"),i.items[e].querySelector("img")&&(g=g||i.items[e].querySelector("img").getAttribute("alt")),i.items[e].getAttribute("data-responsive")){f(i.items[e].getAttribute("data-responsive").split(","))}n=i.items[e].getAttribute("data-srcset"),u=i.items[e].getAttribute("data-sizes")}var h=!1;i.s.dynamic?i.s.dynamicEl[e].iframe&&(h=!0):"true"===i.items[e].getAttribute("data-iframe")&&(h=!0);var m=i.isVideo(a,e);if(!l.default.hasClass(i.___slide[e],"lg-loaded")){if(h)i.___slide[e].insertAdjacentHTML("afterbegin",'<div class="lg-video-cont" style="max-width:'+i.s.iframeMaxWidth+'"><div class="lg-video"><iframe class="lg-object" frameborder="0" src="'+a+'" allowfullscreen="true"></iframe></div></div>');else if(o){var p="";p=m&&m.youtube?"lg-has-youtube":m&&m.vimeo?"lg-has-vimeo":"lg-has-html5",i.___slide[e].insertAdjacentHTML("beforeend",'<div class="lg-video-cont '+p+' "><div class="lg-video"><span class="lg-video-play"></span><img class="lg-object lg-has-poster" src="'+d+'" /></div></div>')}else m?(i.___slide[e].insertAdjacentHTML("beforeend",'<div class="lg-video-cont "><div class="lg-video"></div></div>'),l.default.trigger(i.el,"hasVideo",{index:e,src:a,html:c})):(g=g?'alt="'+g+'"':"",i.___slide[e].insertAdjacentHTML("beforeend",'<div class="lg-img-wrap"><img class="lg-object lg-image" '+g+' src="'+a+'" /></div>'));if(l.default.trigger(i.el,"onAferAppendSlide",{index:e}),r=i.___slide[e].querySelector(".lg-object"),u&&r.setAttribute("sizes",u),n){r.setAttribute("srcset",n);try{picturefill({elements:[r[0]]})}catch(e){console.error("Make sure you have included Picturefill version 2")}}".lg-sub-html"!==this.s.appendSubHtmlTo&&i.addHtml(e),l.default.addClass(i.___slide[e],"lg-loaded")}l.default.on(i.___slide[e].querySelector(".lg-object"),"load.lg error.lg",function(){var t=0;s&&!l.default.hasClass(document.body,"lg-from-hash")&&(t=s),setTimeout(function(){l.default.addClass(i.___slide[e],"lg-complete"),l.default.trigger(i.el,"onSlideItemLoad",{index:e,delay:s||0})},t)}),m&&m.html5&&!o&&l.default.addClass(i.___slide[e],"lg-complete"),!0===t&&(l.default.hasClass(i.___slide[e],"lg-complete")?i.preload(e):l.default.on(i.___slide[e].querySelector(".lg-object"),"load.lg error.lg",function(){i.preload(e)}))},s.prototype.slide=function(e,t,s){for(var i=0,o=0;o<this.___slide.length;o++)if(l.default.hasClass(this.___slide[o],"lg-current")){i=o;break}var r=this;if(!r.lGalleryOn||i!==e){var a=this.___slide.length,d=r.lGalleryOn?this.s.speed:0,n=!1,u=!1;if(!r.lgBusy){if(this.s.download){var c;c=r.s.dynamic?!1!==r.s.dynamicEl[e].downloadUrl&&(r.s.dynamicEl[e].downloadUrl||r.s.dynamicEl[e].src):"false"!==r.items[e].getAttribute("data-download-url")&&(r.items[e].getAttribute("data-download-url")||r.items[e].getAttribute("href")||r.items[e].getAttribute("data-src")),c?(document.getElementById("lg-download").setAttribute("href",c),l.default.removeClass(r.outer,"lg-hide-download")):l.default.addClass(r.outer,"lg-hide-download")}if(l.default.trigger(r.el,"onBeforeSlide",{prevIndex:i,index:e,fromTouch:t,fromThumb:s}),r.lgBusy=!0,clearTimeout(r.hideBartimeout),".lg-sub-html"===this.s.appendSubHtmlTo&&setTimeout(function(){r.addHtml(e)},d),this.arrowDisable(e),t){var g=e-1,f=e+1;0===e&&i===a-1?(f=0,g=a-1):e===a-1&&0===i&&(f=0,g=a-1),l.default.removeClass(r.outer.querySelector(".lg-prev-slide"),"lg-prev-slide"),l.default.removeClass(r.outer.querySelector(".lg-current"),"lg-current"),l.default.removeClass(r.outer.querySelector(".lg-next-slide"),"lg-next-slide"),l.default.addClass(r.___slide[g],"lg-prev-slide"),l.default.addClass(r.___slide[f],"lg-next-slide"),l.default.addClass(r.___slide[e],"lg-current")}else{l.default.addClass(r.outer,"lg-no-trans");for(var h=0;h<this.___slide.length;h++)l.default.removeClass(this.___slide[h],"lg-prev-slide"),l.default.removeClass(this.___slide[h],"lg-next-slide");e<i?(u=!0,0!==e||i!==a-1||s||(u=!1,n=!0)):e>i&&(n=!0,e!==a-1||0!==i||s||(u=!0,n=!1)),u?(l.default.addClass(this.___slide[e],"lg-prev-slide"),l.default.addClass(this.___slide[i],"lg-next-slide")):n&&(l.default.addClass(this.___slide[e],"lg-next-slide"),l.default.addClass(this.___slide[i],"lg-prev-slide")),setTimeout(function(){l.default.removeClass(r.outer.querySelector(".lg-current"),"lg-current"),l.default.addClass(r.___slide[e],"lg-current"),l.default.removeClass(r.outer,"lg-no-trans")},50)}r.lGalleryOn?(setTimeout(function(){r.loadContent(e,!0,0)},this.s.speed+50),setTimeout(function(){r.lgBusy=!1,l.default.trigger(r.el,"onAfterSlide",{prevIndex:i,index:e,fromTouch:t,fromThumb:s})},this.s.speed)):(r.loadContent(e,!0,r.s.backdropDuration),r.lgBusy=!1,l.default.trigger(r.el,"onAfterSlide",{prevIndex:i,index:e,fromTouch:t,fromThumb:s})),r.lGalleryOn=!0,this.s.counter&&document.getElementById("lg-counter-current")&&(document.getElementById("lg-counter-current").innerHTML=e+1)}}},s.prototype.goToNextSlide=function(e){var t=this;t.lgBusy||(t.index+1<t.___slide.length?(t.index++,l.default.trigger(t.el,"onBeforeNextSlide",{index:t.index}),t.slide(t.index,e,!1)):t.s.loop?(t.index=0,l.default.trigger(t.el,"onBeforeNextSlide",{index:t.index}),t.slide(t.index,e,!1)):t.s.slideEndAnimatoin&&(l.default.addClass(t.outer,"lg-right-end"),setTimeout(function(){l.default.removeClass(t.outer,"lg-right-end")},400)))},s.prototype.goToPrevSlide=function(e){var t=this;t.lgBusy||(t.index>0?(t.index--,l.default.trigger(t.el,"onBeforePrevSlide",{index:t.index,fromTouch:e}),t.slide(t.index,e,!1)):t.s.loop?(t.index=t.items.length-1,l.default.trigger(t.el,"onBeforePrevSlide",{index:t.index,fromTouch:e}),t.slide(t.index,e,!1)):t.s.slideEndAnimatoin&&(l.default.addClass(t.outer,"lg-left-end"),setTimeout(function(){l.default.removeClass(t.outer,"lg-left-end")},400)))},s.prototype.keyPress=function(){var e=this;this.items.length>1&&l.default.on(window,"keyup.lg",function(t){e.items.length>1&&(37===t.keyCode&&(t.preventDefault(),e.goToPrevSlide()),39===t.keyCode&&(t.preventDefault(),e.goToNextSlide()))}),l.default.on(window,"keydown.lg",function(t){!0===e.s.escKey&&27===t.keyCode&&(t.preventDefault(),l.default.hasClass(e.outer,"lg-thumb-open")?l.default.removeClass(e.outer,"lg-thumb-open"):e.destroy())})},s.prototype.arrow=function(){var e=this;l.default.on(this.outer.querySelector(".lg-prev"),"click.lg",function(){e.goToPrevSlide()}),l.default.on(this.outer.querySelector(".lg-next"),"click.lg",function(){e.goToNextSlide()})},s.prototype.arrowDisable=function(e){if(!this.s.loop&&this.s.hideControlOnEnd){var t=this.outer.querySelector(".lg-next"),s=this.outer.querySelector(".lg-prev");e+1<this.___slide.length?(t.removeAttribute("disabled"),l.default.removeClass(t,"disabled")):(t.setAttribute("disabled","disabled"),l.default.addClass(t,"disabled")),e>0?(s.removeAttribute("disabled"),l.default.removeClass(s,"disabled")):(s.setAttribute("disabled","disabled"),l.default.addClass(s,"disabled"))}},s.prototype.setTranslate=function(e,t,s){this.s.useLeft?e.style.left=t:l.default.setVendor(e,"Transform","translate3d("+t+"px, "+s+"px, 0px)")},s.prototype.touchMove=function(e,t){var s=t-e;Math.abs(s)>15&&(l.default.addClass(this.outer,"lg-dragging"),this.setTranslate(this.___slide[this.index],s,0),this.setTranslate(document.querySelector(".lg-prev-slide"),-this.___slide[this.index].clientWidth+s,0),this.setTranslate(document.querySelector(".lg-next-slide"),this.___slide[this.index].clientWidth+s,0))},s.prototype.touchEnd=function(e){var t=this;"lg-slide"!==t.s.mode&&l.default.addClass(t.outer,"lg-slide");for(var s=0;s<this.___slide.length;s++)l.default.hasClass(this.___slide[s],"lg-current")||l.default.hasClass(this.___slide[s],"lg-prev-slide")||l.default.hasClass(this.___slide[s],"lg-next-slide")||(this.___slide[s].style.opacity="0");setTimeout(function(){l.default.removeClass(t.outer,"lg-dragging"),e<0&&Math.abs(e)>t.s.swipeThreshold?t.goToNextSlide(!0):e>0&&Math.abs(e)>t.s.swipeThreshold?t.goToPrevSlide(!0):Math.abs(e)<5&&l.default.trigger(t.el,"onSlideClick");for(var s=0;s<t.___slide.length;s++)t.___slide[s].removeAttribute("style")}),setTimeout(function(){l.default.hasClass(t.outer,"lg-dragging")||"lg-slide"===t.s.mode||l.default.removeClass(t.outer,"lg-slide")},t.s.speed+100)},s.prototype.enableSwipe=function(){var e=this,t=0,s=0,i=!1;if(e.s.enableSwipe&&e.isTouch&&e.doCss()){for(var o=0;o<e.___slide.length;o++)l.default.on(e.___slide[o],"touchstart.lg",function(s){l.default.hasClass(e.outer,"lg-zoomed")||e.lgBusy||(s.preventDefault(),e.manageSwipeClass(),t=s.targetTouches[0].pageX)});for(var r=0;r<e.___slide.length;r++)l.default.on(e.___slide[r],"touchmove.lg",function(o){l.default.hasClass(e.outer,"lg-zoomed")||(o.preventDefault(),s=o.targetTouches[0].pageX,e.touchMove(t,s),i=!0)});for(var a=0;a<e.___slide.length;a++)l.default.on(e.___slide[a],"touchend.lg",function(){l.default.hasClass(e.outer,"lg-zoomed")||(i?(i=!1,e.touchEnd(s-t)):l.default.trigger(e.el,"onSlideClick"))})}},s.prototype.enableDrag=function(){var e=this,t=0,s=0,i=!1,o=!1;if(e.s.enableDrag&&!e.isTouch&&e.doCss()){for(var r=0;r<e.___slide.length;r++)l.default.on(e.___slide[r],"mousedown.lg",function(s){l.default.hasClass(e.outer,"lg-zoomed")||(l.default.hasClass(s.target,"lg-object")||l.default.hasClass(s.target,"lg-video-play"))&&(s.preventDefault(),e.lgBusy||(e.manageSwipeClass(),t=s.pageX,i=!0,e.outer.scrollLeft+=1,e.outer.scrollLeft-=1,l.default.removeClass(e.outer,"lg-grab"),l.default.addClass(e.outer,"lg-grabbing"),l.default.trigger(e.el,"onDragstart")))});l.default.on(window,"mousemove.lg",function(r){i&&(o=!0,s=r.pageX,e.touchMove(t,s),l.default.trigger(e.el,"onDragmove"))}),l.default.on(window,"mouseup.lg",function(r){o?(o=!1,e.touchEnd(s-t),l.default.trigger(e.el,"onDragend")):(l.default.hasClass(r.target,"lg-object")||l.default.hasClass(r.target,"lg-video-play"))&&l.default.trigger(e.el,"onSlideClick"),i&&(i=!1,l.default.removeClass(e.outer,"lg-grabbing"),l.default.addClass(e.outer,"lg-grab"))})}},s.prototype.manageSwipeClass=function(){var e=this.index+1,t=this.index-1,s=this.___slide.length;this.s.loop&&(0===this.index?t=s-1:this.index===s-1&&(e=0));for(var i=0;i<this.___slide.length;i++)l.default.removeClass(this.___slide[i],"lg-next-slide"),l.default.removeClass(this.___slide[i],"lg-prev-slide");t>-1&&l.default.addClass(this.___slide[t],"lg-prev-slide"),l.default.addClass(this.___slide[e],"lg-next-slide")},s.prototype.mousewheel=function(){var e=this;l.default.on(e.outer,"mousewheel.lg",function(t){t.deltaY&&(t.deltaY>0?e.goToPrevSlide():e.goToNextSlide(),t.preventDefault())})},s.prototype.closeGallery=function(){var e=this,t=!1;l.default.on(this.outer.querySelector(".lg-close"),"click.lg",function(){e.destroy()}),e.s.closable&&(l.default.on(e.outer,"mousedown.lg",function(e){t=!!(l.default.hasClass(e.target,"lg-outer")||l.default.hasClass(e.target,"lg-item")||l.default.hasClass(e.target,"lg-img-wrap"))}),l.default.on(e.outer,"mouseup.lg",function(s){(l.default.hasClass(s.target,"lg-outer")||l.default.hasClass(s.target,"lg-item")||l.default.hasClass(s.target,"lg-img-wrap")&&t)&&(l.default.hasClass(e.outer,"lg-dragging")||e.destroy())}))},s.prototype.destroy=function(e){var t=this;if(e||l.default.trigger(t.el,"onBeforeClose"),document.body.scrollTop=t.prevScrollTop,document.documentElement.scrollTop=t.prevScrollTop,e){if(!t.s.dynamic)for(var s=0;s<this.items.length;s++)l.default.off(this.items[s],".lg"),l.default.off(this.items[s],".lgcustom");var i=t.el.getAttribute("lg-uid");delete window.lgData[i],t.el.removeAttribute("lg-uid")}l.default.off(this.el,".lgtm");for(var o in window.lgModules)t.modules[o]&&t.modules[o].destroy(e);this.lGalleryOn=!1,clearTimeout(t.hideBartimeout),this.hideBartimeout=!1,l.default.off(window,".lg"),l.default.removeClass(document.body,"lg-on"),l.default.removeClass(document.body,"lg-from-hash"),t.outer&&l.default.removeClass(t.outer,"lg-visible"),l.default.removeClass(document.querySelector(".lg-backdrop"),"in"),setTimeout(function(){try{t.outer&&t.outer.parentNode.removeChild(t.outer),document.querySelector(".lg-backdrop")&&document.querySelector(".lg-backdrop").parentNode.removeChild(document.querySelector(".lg-backdrop")),e||l.default.trigger(t.el,"onCloseAfter"),t.el.focus()}catch(e){}},t.s.backdropDuration+50)},window.lightGallery=function(e,t){if(e)try{if(e.getAttribute("lg-uid"))try{window.lgData[e.getAttribute("lg-uid")].init()}catch(e){console.error("lightGallery has not initiated properly")}else{var l="lg"+window.lgData.uid++;window.lgData[l]=new s(e,t),e.setAttribute("lg-uid",l)}}catch(e){console.error("lightGallery has not initiated properly")}}})},{"./lg-utils":1}]},{},[2])(2)}); \ No newline at end of file
diff --git a/assets/lib/mapbox-gl/mapbox-gl.min.js b/assets/lib/mapbox-gl/mapbox-gl.min.js
index 03b16d76..43133d57 100644
--- a/assets/lib/mapbox-gl/mapbox-gl.min.js
+++ b/assets/lib/mapbox-gl/mapbox-gl.min.js
@@ -1,8 +1,8 @@
/**
* Minified by jsDelivr using Terser v3.14.1.
- * Original file: /npm/mapbox-gl@1.10.0/dist/mapbox-gl.js
+ * Original file: /npm/mapbox-gl@1.10.1/dist/mapbox-gl.js
*
* Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
*/
-!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).mapboxgl=e()}(this,function(){"use strict";var t,e,r;function i(i,n){if(t)if(e){var o="var sharedChunk = {}; ("+t+")(sharedChunk); ("+e+")(sharedChunk);",a={};t(a),(r=n(a)).workerUrl=window.URL.createObjectURL(new Blob([o],{type:"text/javascript"}))}else e=n;else t=n}return i(0,function(t){function e(t,e){return t(e={exports:{}},e.exports),e.exports}var r=i;function i(t,e,r,i){this.cx=3*t,this.bx=3*(r-t)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*e,this.by=3*(i-e)-this.cy,this.ay=1-this.cy-this.by,this.p1x=t,this.p1y=i,this.p2x=r,this.p2y=i}i.prototype.sampleCurveX=function(t){return((this.ax*t+this.bx)*t+this.cx)*t},i.prototype.sampleCurveY=function(t){return((this.ay*t+this.by)*t+this.cy)*t},i.prototype.sampleCurveDerivativeX=function(t){return(3*this.ax*t+2*this.bx)*t+this.cx},i.prototype.solveCurveX=function(t,e){var r,i,n,o,a;for(void 0===e&&(e=1e-6),n=t,a=0;a<8;a++){if(o=this.sampleCurveX(n)-t,Math.abs(o)<e)return n;var s=this.sampleCurveDerivativeX(n);if(Math.abs(s)<1e-6)break;n-=o/s}if((n=t)<(r=0))return r;if(n>(i=1))return i;for(;r<i;){if(o=this.sampleCurveX(n),Math.abs(o-t)<e)return n;t>o?r=n:i=n,n=.5*(i-r)+r}return n},i.prototype.solve=function(t,e){return this.sampleCurveY(this.solveCurveX(t,e))};var n=o;function o(t,e){this.x=t,this.y=e}function a(t,e,i,n){var o=new r(t,e,i,n);return function(t){return o.solve(t)}}o.prototype={clone:function(){return new o(this.x,this.y)},add:function(t){return this.clone()._add(t)},sub:function(t){return this.clone()._sub(t)},multByPoint:function(t){return this.clone()._multByPoint(t)},divByPoint:function(t){return this.clone()._divByPoint(t)},mult:function(t){return this.clone()._mult(t)},div:function(t){return this.clone()._div(t)},rotate:function(t){return this.clone()._rotate(t)},rotateAround:function(t,e){return this.clone()._rotateAround(t,e)},matMult:function(t){return this.clone()._matMult(t)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(t){return this.x===t.x&&this.y===t.y},dist:function(t){return Math.sqrt(this.distSqr(t))},distSqr:function(t){var e=t.x-this.x,r=t.y-this.y;return e*e+r*r},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(t){return Math.atan2(this.y-t.y,this.x-t.x)},angleWith:function(t){return this.angleWithSep(t.x,t.y)},angleWithSep:function(t,e){return Math.atan2(this.x*e-this.y*t,this.x*t+this.y*e)},_matMult:function(t){var e=t[2]*this.x+t[3]*this.y;return this.x=t[0]*this.x+t[1]*this.y,this.y=e,this},_add:function(t){return this.x+=t.x,this.y+=t.y,this},_sub:function(t){return this.x-=t.x,this.y-=t.y,this},_mult:function(t){return this.x*=t,this.y*=t,this},_div:function(t){return this.x/=t,this.y/=t,this},_multByPoint:function(t){return this.x*=t.x,this.y*=t.y,this},_divByPoint:function(t){return this.x/=t.x,this.y/=t.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var t=this.y;return this.y=this.x,this.x=-t,this},_rotate:function(t){var e=Math.cos(t),r=Math.sin(t),i=r*this.x+e*this.y;return this.x=e*this.x-r*this.y,this.y=i,this},_rotateAround:function(t,e){var r=Math.cos(t),i=Math.sin(t),n=e.y+i*(this.x-e.x)+r*(this.y-e.y);return this.x=e.x+r*(this.x-e.x)-i*(this.y-e.y),this.y=n,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},o.convert=function(t){return t instanceof o?t:Array.isArray(t)?new o(t[0],t[1]):t};var s=a(.25,.1,.25,1);function l(t,e,r){return Math.min(r,Math.max(e,t))}function u(t,e,r){var i=r-e,n=((t-e)%i+i)%i+e;return n===e?r:n}function c(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];for(var i=0,n=e;i<n.length;i+=1){var o=n[i];for(var a in o)t[a]=o[a]}return t}var p=1;function h(){return p++}function f(){return function t(e){return e?(e^16*Math.random()>>e/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,t)}()}function d(t){return!!t&&/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(t)}function m(t,e){t.forEach(function(t){e[t]&&(e[t]=e[t].bind(e))})}function y(t,e){return-1!==t.indexOf(e,t.length-e.length)}function g(t,e,r){var i={};for(var n in t)i[n]=e.call(r||this,t[n],n,t);return i}function _(t,e,r){var i={};for(var n in t)e.call(r||this,t[n],n,t)&&(i[n]=t[n]);return i}function v(t){return Array.isArray(t)?t.map(v):"object"==typeof t&&t?g(t,v):t}var x={};function b(t){x[t]||("undefined"!=typeof console&&console.warn(t),x[t]=!0)}function w(t,e,r){return(r.y-t.y)*(e.x-t.x)>(e.y-t.y)*(r.x-t.x)}function S(t){for(var e=0,r=0,i=t.length,n=i-1,o=void 0,a=void 0;r<i;n=r++)e+=((a=t[n]).x-(o=t[r]).x)*(o.y+a.y);return e}function T(){return"undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof self&&self instanceof WorkerGlobalScope}function I(t){var e={};if(t.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,function(t,r,i,n){var o=i||n;return e[r]=!o||o.toLowerCase(),""}),e["max-age"]){var r=parseInt(e["max-age"],10);isNaN(r)?delete e["max-age"]:e["max-age"]=r}return e}var E=null;function A(t){if(null==E){var e=t.navigator?t.navigator.userAgent:null;E=!!t.safari||!(!e||!(/\b(iPad|iPhone|iPod)\b/.test(e)||e.match("Safari")&&!e.match("Chrome")))}return E}function z(t){try{var e=self[t];return e.setItem("_mapbox_test_",1),e.removeItem("_mapbox_test_"),!0}catch(t){return!1}}var P,C,k,M,D=self.performance&&self.performance.now?self.performance.now.bind(self.performance):Date.now.bind(Date),L=self.requestAnimationFrame||self.mozRequestAnimationFrame||self.webkitRequestAnimationFrame||self.msRequestAnimationFrame,R=self.cancelAnimationFrame||self.mozCancelAnimationFrame||self.webkitCancelAnimationFrame||self.msCancelAnimationFrame,B={now:D,frame:function(t){var e=L(t);return{cancel:function(){return R(e)}}},getImageData:function(t,e){void 0===e&&(e=0);var r=self.document.createElement("canvas"),i=r.getContext("2d");if(!i)throw new Error("failed to create canvas 2d context");return r.width=t.width,r.height=t.height,i.drawImage(t,0,0,t.width,t.height),i.getImageData(-e,-e,t.width+2*e,t.height+2*e)},resolveURL:function(t){return P||(P=self.document.createElement("a")),P.href=t,P.href},hardwareConcurrency:self.navigator.hardwareConcurrency||4,get devicePixelRatio(){return self.devicePixelRatio},get prefersReducedMotion(){return!!self.matchMedia&&(null==C&&(C=self.matchMedia("(prefers-reduced-motion: reduce)")),C.matches)}},F={API_URL:"https://api.mapbox.com",get EVENTS_URL(){return this.API_URL?0===this.API_URL.indexOf("https://api.mapbox.cn")?"https://events.mapbox.cn/events/v2":0===this.API_URL.indexOf("https://api.mapbox.com")?"https://events.mapbox.com/events/v2":null:null},FEEDBACK_URL:"https://apps.mapbox.com/feedback",REQUIRE_ACCESS_TOKEN:!0,ACCESS_TOKEN:null,MAX_PARALLEL_IMAGE_REQUESTS:16},O={supported:!1,testSupport:function(t){!U&&M&&(V?N(t):k=t)}},U=!1,V=!1;function N(t){var e=t.createTexture();t.bindTexture(t.TEXTURE_2D,e);try{if(t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,M),t.isContextLost())return;O.supported=!0}catch(t){}t.deleteTexture(e),U=!0}self.document&&((M=self.document.createElement("img")).onload=function(){k&&N(k),k=null,V=!0},M.onerror=function(){U=!0,k=null},M.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");var j="01",q=function(t,e){this._transformRequestFn=t,this._customAccessToken=e,this._createSkuToken()};function Z(t){return 0===t.indexOf("mapbox:")}q.prototype._createSkuToken=function(){var t=function(){for(var t="",e=0;e<10;e++)t+="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[Math.floor(62*Math.random())];return{token:["1",j,t].join(""),tokenExpiresAt:Date.now()+432e5}}();this._skuToken=t.token,this._skuTokenExpiresAt=t.tokenExpiresAt},q.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},q.prototype.transformRequest=function(t,e){return this._transformRequestFn&&this._transformRequestFn(t,e)||{url:t}},q.prototype.normalizeStyleURL=function(t,e){if(!Z(t))return t;var r=K(t);return r.path="/styles/v1"+r.path,this._makeAPIURL(r,this._customAccessToken||e)},q.prototype.normalizeGlyphsURL=function(t,e){if(!Z(t))return t;var r=K(t);return r.path="/fonts/v1"+r.path,this._makeAPIURL(r,this._customAccessToken||e)},q.prototype.normalizeSourceURL=function(t,e){if(!Z(t))return t;var r=K(t);return r.path="/v4/"+r.authority+".json",r.params.push("secure"),this._makeAPIURL(r,this._customAccessToken||e)},q.prototype.normalizeSpriteURL=function(t,e,r,i){var n=K(t);return Z(t)?(n.path="/styles/v1"+n.path+"/sprite"+e+r,this._makeAPIURL(n,this._customAccessToken||i)):(n.path+=""+e+r,H(n))},q.prototype.normalizeTileURL=function(t,e){if(this._isSkuTokenExpired()&&this._createSkuToken(),t&&!Z(t))return t;var r=K(t);r.path=r.path.replace(/(\.(png|jpg)\d*)(?=$)/,(B.devicePixelRatio>=2||512===e?"@2x":"")+(O.supported?".webp":"$1")),r.path=r.path.replace(/^.+\/v4\//,"/"),r.path="/v4"+r.path;var i=this._customAccessToken||function(t){for(var e=0,r=t;e<r.length;e+=1){var i=r[e].match(/^access_token=(.*)$/);if(i)return i[1]}return null}(r.params)||F.ACCESS_TOKEN;return F.REQUIRE_ACCESS_TOKEN&&i&&this._skuToken&&r.params.push("sku="+this._skuToken),this._makeAPIURL(r,i)},q.prototype.canonicalizeTileURL=function(t,e){var r=K(t);if(!r.path.match(/(^\/v4\/)/)||!r.path.match(/\.[\w]+$/))return t;var i="mapbox://tiles/";i+=r.path.replace("/v4/","");var n=r.params;return e&&(n=n.filter(function(t){return!t.match(/^access_token=/)})),n.length&&(i+="?"+n.join("&")),i},q.prototype.canonicalizeTileset=function(t,e){for(var r=!!e&&Z(e),i=[],n=0,o=t.tiles||[];n<o.length;n+=1){var a=o[n];X(a)?i.push(this.canonicalizeTileURL(a,r)):i.push(a)}return i},q.prototype._makeAPIURL=function(t,e){var r="See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes",i=K(F.API_URL);if(t.protocol=i.protocol,t.authority=i.authority,"/"!==i.path&&(t.path=""+i.path+t.path),!F.REQUIRE_ACCESS_TOKEN)return H(t);if(!(e=e||F.ACCESS_TOKEN))throw new Error("An API access token is required to use Mapbox GL. "+r);if("s"===e[0])throw new Error("Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). "+r);return t.params=t.params.filter(function(t){return-1===t.indexOf("access_token")}),t.params.push("access_token="+e),H(t)};var G=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;function X(t){return G.test(t)}var W=/^(\w+):\/\/([^/?]*)(\/[^?]+)?\??(.+)?/;function K(t){var e=t.match(W);if(!e)throw new Error("Unable to parse URL object");return{protocol:e[1],authority:e[2],path:e[3]||"/",params:e[4]?e[4].split("&"):[]}}function H(t){var e=t.params.length?"?"+t.params.join("&"):"";return t.protocol+"://"+t.authority+t.path+e}function J(t){if(!t)return null;var e=t.split(".");if(!e||3!==e.length)return null;try{return JSON.parse(decodeURIComponent(self.atob(e[1]).split("").map(function(t){return"%"+("00"+t.charCodeAt(0).toString(16)).slice(-2)}).join("")))}catch(t){return null}}var Y=function(t){this.type=t,this.anonId=null,this.eventData={},this.queue=[],this.pendingRequest=null};Y.prototype.getStorageKey=function(t){var e,r=J(F.ACCESS_TOKEN);return e=r&&r.u?self.btoa(encodeURIComponent(r.u).replace(/%([0-9A-F]{2})/g,function(t,e){return String.fromCharCode(Number("0x"+e))})):F.ACCESS_TOKEN||"",t?"mapbox.eventData."+t+":"+e:"mapbox.eventData:"+e},Y.prototype.fetchEventData=function(){var t=z("localStorage"),e=this.getStorageKey(),r=this.getStorageKey("uuid");if(t)try{var i=self.localStorage.getItem(e);i&&(this.eventData=JSON.parse(i));var n=self.localStorage.getItem(r);n&&(this.anonId=n)}catch(t){b("Unable to read from LocalStorage")}},Y.prototype.saveEventData=function(){var t=z("localStorage"),e=this.getStorageKey(),r=this.getStorageKey("uuid");if(t)try{self.localStorage.setItem(r,this.anonId),Object.keys(this.eventData).length>=1&&self.localStorage.setItem(e,JSON.stringify(this.eventData))}catch(t){b("Unable to write to LocalStorage")}},Y.prototype.processRequests=function(t){},Y.prototype.postEvent=function(t,e,r,i){var n=this;if(F.EVENTS_URL){var o=K(F.EVENTS_URL);o.params.push("access_token="+(i||F.ACCESS_TOKEN||""));var a={event:this.type,created:new Date(t).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:"1.10.0",skuId:j,userId:this.anonId},s=e?c(a,e):a,l={url:H(o),headers:{"Content-Type":"text/plain"},body:JSON.stringify([s])};this.pendingRequest=vt(l,function(t){n.pendingRequest=null,r(t),n.saveEventData(),n.processRequests(i)})}},Y.prototype.queueRequest=function(t,e){this.queue.push(t),this.processRequests(e)};var Q,$,tt=function(t){function e(){t.call(this,"map.load"),this.success={},this.skuToken=""}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.postMapLoadEvent=function(t,e,r,i){this.skuToken=r,(F.EVENTS_URL&&i||F.ACCESS_TOKEN&&Array.isArray(t)&&t.some(function(t){return Z(t)||X(t)}))&&this.queueRequest({id:e,timestamp:Date.now()},i)},e.prototype.processRequests=function(t){var e=this;if(!this.pendingRequest&&0!==this.queue.length){var r=this.queue.shift(),i=r.id,n=r.timestamp;i&&this.success[i]||(this.anonId||this.fetchEventData(),d(this.anonId)||(this.anonId=f()),this.postEvent(n,{skuToken:this.skuToken},function(t){t||i&&(e.success[i]=!0)},t))}},e}(Y),et=new(function(t){function e(e){t.call(this,"appUserTurnstile"),this._customAccessToken=e}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.postTurnstileEvent=function(t,e){F.EVENTS_URL&&F.ACCESS_TOKEN&&Array.isArray(t)&&t.some(function(t){return Z(t)||X(t)})&&this.queueRequest(Date.now(),e)},e.prototype.processRequests=function(t){var e=this;if(!this.pendingRequest&&0!==this.queue.length){this.anonId&&this.eventData.lastSuccess&&this.eventData.tokenU||this.fetchEventData();var r=J(F.ACCESS_TOKEN),i=r?r.u:F.ACCESS_TOKEN,n=i!==this.eventData.tokenU;d(this.anonId)||(this.anonId=f(),n=!0);var o=this.queue.shift();if(this.eventData.lastSuccess){var a=new Date(this.eventData.lastSuccess),s=new Date(o),l=(o-this.eventData.lastSuccess)/864e5;n=n||l>=1||l<-1||a.getDate()!==s.getDate()}else n=!0;if(!n)return this.processRequests();this.postEvent(o,{"enabled.telemetry":!1},function(t){t||(e.eventData.lastSuccess=o,e.eventData.tokenU=i)},t)}},e}(Y)),rt=et.postTurnstileEvent.bind(et),it=new tt,nt=it.postMapLoadEvent.bind(it),ot=500,at=50;function st(){self.caches&&!Q&&(Q=self.caches.open("mapbox-tiles"))}function lt(t){var e=t.indexOf("?");return e<0?t:t.slice(0,e)}var ut,ct=1/0;function pt(){return null==ut&&(ut=self.OffscreenCanvas&&new self.OffscreenCanvas(1,1).getContext("2d")&&"function"==typeof self.createImageBitmap),ut}var ht={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"};"function"==typeof Object.freeze&&Object.freeze(ht);var ft,dt,mt=function(t){function e(e,r,i){401===r&&X(i)&&(e+=": you may have provided an invalid Mapbox access token. See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes"),t.call(this,e),this.status=r,this.url=i,this.name=this.constructor.name,this.message=e}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.toString=function(){return this.name+": "+this.message+" ("+this.status+"): "+this.url},e}(Error),yt=T()?function(){return self.worker&&self.worker.referrer}:function(){return("blob:"===self.location.protocol?self.parent:self).location.href},gt=function(t,e){if(!(/^file:/.test(r=t.url)||/^file:/.test(yt())&&!/^\w+:/.test(r))){if(self.fetch&&self.Request&&self.AbortController&&self.Request.prototype.hasOwnProperty("signal"))return function(t,e){var r,i=new self.AbortController,n=new self.Request(t.url,{method:t.method||"GET",body:t.body,credentials:t.credentials,headers:t.headers,referrer:yt(),signal:i.signal}),o=!1,a=!1,s=(r=n.url).indexOf("sku=")>0&&X(r);"json"===t.type&&n.headers.set("Accept","application/json");var l=function(r,i,o){if(!a){if(r&&"SecurityError"!==r.message&&b(r),i&&o)return u(i);var l=Date.now();self.fetch(n).then(function(r){if(r.ok){var i=s?r.clone():null;return u(r,i,l)}return e(new mt(r.statusText,r.status,t.url))}).catch(function(t){20!==t.code&&e(new Error(t.message))})}},u=function(r,i,s){("arrayBuffer"===t.type?r.arrayBuffer():"json"===t.type?r.json():r.text()).then(function(t){a||(i&&s&&function(t,e,r){if(st(),Q){var i={status:e.status,statusText:e.statusText,headers:new self.Headers};e.headers.forEach(function(t,e){return i.headers.set(e,t)});var n=I(e.headers.get("Cache-Control")||"");n["no-store"]||(n["max-age"]&&i.headers.set("Expires",new Date(r+1e3*n["max-age"]).toUTCString()),new Date(i.headers.get("Expires")).getTime()-r<42e4||function(t,e){if(void 0===$)try{new Response(new ReadableStream),$=!0}catch(t){$=!1}$?e(t.body):t.blob().then(e)}(e,function(e){var r=new self.Response(e,i);st(),Q&&Q.then(function(e){return e.put(lt(t.url),r)}).catch(function(t){return b(t.message)})}))}}(n,i,s),o=!0,e(null,t,r.headers.get("Cache-Control"),r.headers.get("Expires")))}).catch(function(t){a||e(new Error(t.message))})};return s?function(t,e){if(st(),!Q)return e(null);var r=lt(t.url);Q.then(function(t){t.match(r).then(function(i){var n=function(t){if(!t)return!1;var e=new Date(t.headers.get("Expires")||0),r=I(t.headers.get("Cache-Control")||"");return e>Date.now()&&!r["no-cache"]}(i);t.delete(r),n&&t.put(r,i.clone()),e(null,i,n)}).catch(e)}).catch(e)}(n,l):l(null,null),{cancel:function(){a=!0,o||i.abort()}}}(t,e);if(T()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",t,e,void 0,!0)}var r;return function(t,e){var r=new self.XMLHttpRequest;for(var i in r.open(t.method||"GET",t.url,!0),"arrayBuffer"===t.type&&(r.responseType="arraybuffer"),t.headers)r.setRequestHeader(i,t.headers[i]);return"json"===t.type&&(r.responseType="text",r.setRequestHeader("Accept","application/json")),r.withCredentials="include"===t.credentials,r.onerror=function(){e(new Error(r.statusText))},r.onload=function(){if((r.status>=200&&r.status<300||0===r.status)&&null!==r.response){var i=r.response;if("json"===t.type)try{i=JSON.parse(r.response)}catch(t){return e(t)}e(null,i,r.getResponseHeader("Cache-Control"),r.getResponseHeader("Expires"))}else e(new mt(r.statusText,r.status,t.url))},r.send(t.body),{cancel:function(){return r.abort()}}}(t,e)},_t=function(t,e){return gt(c(t,{type:"arrayBuffer"}),e)},vt=function(t,e){return gt(c(t,{method:"POST"}),e)};ft=[],dt=0;var xt=function(t,e){if(O.supported&&(t.headers||(t.headers={}),t.headers.accept="image/webp,*/*"),dt>=F.MAX_PARALLEL_IMAGE_REQUESTS){var r={requestParameters:t,callback:e,cancelled:!1,cancel:function(){this.cancelled=!0}};return ft.push(r),r}dt++;var i=!1,n=function(){if(!i)for(i=!0,dt--;ft.length&&dt<F.MAX_PARALLEL_IMAGE_REQUESTS;){var t=ft.shift();t.cancelled||(t.cancel=xt(t.requestParameters,t.callback).cancel)}},o=_t(t,function(t,r,i,o){n(),t?e(t):r&&(pt()?function(t,e){var r=new self.Blob([new Uint8Array(t)],{type:"image/png"});self.createImageBitmap(r).then(function(t){e(null,t)}).catch(function(t){e(new Error("Could not load image because of "+t.message+". Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))})}(r,e):function(t,e,r,i){var n=new self.Image,o=self.URL;n.onload=function(){e(null,n),o.revokeObjectURL(n.src)},n.onerror=function(){return e(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))};var a=new self.Blob([new Uint8Array(t)],{type:"image/png"});n.cacheControl=r,n.expires=i,n.src=t.byteLength?o.createObjectURL(a):"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII="}(r,e,i,o))});return{cancel:function(){o.cancel(),n()}}};function bt(t,e,r){r[t]&&-1!==r[t].indexOf(e)||(r[t]=r[t]||[],r[t].push(e))}function wt(t,e,r){if(r&&r[t]){var i=r[t].indexOf(e);-1!==i&&r[t].splice(i,1)}}var St=function(t,e){void 0===e&&(e={}),c(this,e),this.type=t},Tt=function(t){function e(e,r){void 0===r&&(r={}),t.call(this,"error",c({error:e},r))}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e}(St),It=function(){};It.prototype.on=function(t,e){return this._listeners=this._listeners||{},bt(t,e,this._listeners),this},It.prototype.off=function(t,e){return wt(t,e,this._listeners),wt(t,e,this._oneTimeListeners),this},It.prototype.once=function(t,e){return this._oneTimeListeners=this._oneTimeListeners||{},bt(t,e,this._oneTimeListeners),this},It.prototype.fire=function(t,e){"string"==typeof t&&(t=new St(t,e||{}));var r=t.type;if(this.listens(r)){t.target=this;for(var i=0,n=this._listeners&&this._listeners[r]?this._listeners[r].slice():[];i<n.length;i+=1)n[i].call(this,t);for(var o=0,a=this._oneTimeListeners&&this._oneTimeListeners[r]?this._oneTimeListeners[r].slice():[];o<a.length;o+=1){var s=a[o];wt(r,s,this._oneTimeListeners),s.call(this,t)}var l=this._eventedParent;l&&(c(t,"function"==typeof this._eventedParentData?this._eventedParentData():this._eventedParentData),l.fire(t))}else t instanceof Tt&&console.error(t.error);return this},It.prototype.listens=function(t){return this._listeners&&this._listeners[t]&&this._listeners[t].length>0||this._oneTimeListeners&&this._oneTimeListeners[t]&&this._oneTimeListeners[t].length>0||this._eventedParent&&this._eventedParent.listens(t)},It.prototype.setEventedParent=function(t,e){return this._eventedParent=t,this._eventedParentData=e,this};var Et={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},sources:{required:!0,type:"sources"},sprite:{type:"string"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{}},default:"mapbox"},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},filter:{type:"array",value:"*"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},expression_name:{type:"enum",values:{let:{group:"Variable binding"},var:{group:"Variable binding"},literal:{group:"Types"},array:{group:"Types"},at:{group:"Lookup"},in:{group:"Lookup"},"index-of":{group:"Lookup"},case:{group:"Decision"},match:{group:"Decision"},coalesce:{group:"Decision"},step:{group:"Ramps, scales, curves"},interpolate:{group:"Ramps, scales, curves"},"interpolate-hcl":{group:"Ramps, scales, curves"},"interpolate-lab":{group:"Ramps, scales, curves"},ln2:{group:"Math"},pi:{group:"Math"},e:{group:"Math"},typeof:{group:"Types"},string:{group:"Types"},number:{group:"Types"},boolean:{group:"Types"},object:{group:"Types"},collator:{group:"Types"},format:{group:"Types"},image:{group:"Types"},"number-format":{group:"Types"},"to-string":{group:"Types"},"to-number":{group:"Types"},"to-boolean":{group:"Types"},"to-rgba":{group:"Color"},"to-color":{group:"Types"},rgb:{group:"Color"},rgba:{group:"Color"},get:{group:"Lookup"},has:{group:"Lookup"},length:{group:"Lookup"},properties:{group:"Feature data"},"feature-state":{group:"Feature data"},"geometry-type":{group:"Feature data"},id:{group:"Feature data"},zoom:{group:"Zoom"},"heatmap-density":{group:"Heatmap"},"line-progress":{group:"Feature data"},accumulated:{group:"Feature data"},"+":{group:"Math"},"*":{group:"Math"},"-":{group:"Math"},"/":{group:"Math"},"%":{group:"Math"},"^":{group:"Math"},sqrt:{group:"Math"},log10:{group:"Math"},ln:{group:"Math"},log2:{group:"Math"},sin:{group:"Math"},cos:{group:"Math"},tan:{group:"Math"},asin:{group:"Math"},acos:{group:"Math"},atan:{group:"Math"},min:{group:"Math"},max:{group:"Math"},round:{group:"Math"},abs:{group:"Math"},ceil:{group:"Math"},floor:{group:"Math"},"==":{group:"Decision"},"!=":{group:"Decision"},">":{group:"Decision"},"<":{group:"Decision"},">=":{group:"Decision"},"<=":{group:"Decision"},all:{group:"Decision"},any:{group:"Decision"},"!":{group:"Decision"},within:{group:"Decision"},"is-supported-script":{group:"String"},upcase:{group:"String"},downcase:{group:"String"},concat:{group:"String"},"resolved-locale":{group:"String"},slice:{group:"String"}}},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}}},At=function(t,e,r,i){this.message=(t?t+": ":"")+r,i&&(this.identifier=i),null!=e&&e.__line__&&(this.line=e.__line__)};function zt(t){var e=t.value;return e?[new At(t.key,e,"constants have been deprecated as of v8")]:[]}function Pt(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];for(var i=0,n=e;i<n.length;i+=1){var o=n[i];for(var a in o)t[a]=o[a]}return t}function Ct(t){return t instanceof Number||t instanceof String||t instanceof Boolean?t.valueOf():t}function kt(t){if(Array.isArray(t))return t.map(kt);if(t instanceof Object&&!(t instanceof Number||t instanceof String||t instanceof Boolean)){var e={};for(var r in t)e[r]=kt(t[r]);return e}return Ct(t)}var Mt=function(t){function e(e,r){t.call(this,r),this.message=r,this.key=e}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e}(Error),Dt=function(t,e){void 0===e&&(e=[]),this.parent=t,this.bindings={};for(var r=0,i=e;r<i.length;r+=1){var n=i[r];this.bindings[n[0]]=n[1]}};Dt.prototype.concat=function(t){return new Dt(this,t)},Dt.prototype.get=function(t){if(this.bindings[t])return this.bindings[t];if(this.parent)return this.parent.get(t);throw new Error(t+" not found in scope.")},Dt.prototype.has=function(t){return!!this.bindings[t]||!!this.parent&&this.parent.has(t)};var Lt={kind:"null"},Rt={kind:"number"},Bt={kind:"string"},Ft={kind:"boolean"},Ot={kind:"color"},Ut={kind:"object"},Vt={kind:"value"},Nt={kind:"collator"},jt={kind:"formatted"},qt={kind:"resolvedImage"};function Zt(t,e){return{kind:"array",itemType:t,N:e}}function Gt(t){if("array"===t.kind){var e=Gt(t.itemType);return"number"==typeof t.N?"array<"+e+", "+t.N+">":"value"===t.itemType.kind?"array":"array<"+e+">"}return t.kind}var Xt=[Lt,Rt,Bt,Ft,Ot,jt,Ut,Zt(Vt),qt];function Wt(t,e){if("error"===e.kind)return null;if("array"===t.kind){if("array"===e.kind&&(0===e.N&&"value"===e.itemType.kind||!Wt(t.itemType,e.itemType))&&("number"!=typeof t.N||t.N===e.N))return null}else{if(t.kind===e.kind)return null;if("value"===t.kind)for(var r=0,i=Xt;r<i.length;r+=1)if(!Wt(i[r],e))return null}return"Expected "+Gt(t)+" but found "+Gt(e)+" instead."}function Kt(t,e){return e.some(function(e){return e.kind===t.kind})}function Ht(t,e){return e.some(function(e){return"null"===e?null===t:"array"===e?Array.isArray(t):"object"===e?t&&!Array.isArray(t)&&"object"==typeof t:e===typeof t})}var Jt=e(function(t,e){var r={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function i(t){return(t=Math.round(t))<0?0:t>255?255:t}function n(t){return i("%"===t[t.length-1]?parseFloat(t)/100*255:parseInt(t))}function o(t){return(e="%"===t[t.length-1]?parseFloat(t)/100:parseFloat(t))<0?0:e>1?1:e;var e}function a(t,e,r){return r<0?r+=1:r>1&&(r-=1),6*r<1?t+(e-t)*r*6:2*r<1?e:3*r<2?t+(e-t)*(2/3-r)*6:t}try{e.parseCSSColor=function(t){var e,s=t.replace(/ /g,"").toLowerCase();if(s in r)return r[s].slice();if("#"===s[0])return 4===s.length?(e=parseInt(s.substr(1),16))>=0&&e<=4095?[(3840&e)>>4|(3840&e)>>8,240&e|(240&e)>>4,15&e|(15&e)<<4,1]:null:7===s.length&&(e=parseInt(s.substr(1),16))>=0&&e<=16777215?[(16711680&e)>>16,(65280&e)>>8,255&e,1]:null;var l=s.indexOf("("),u=s.indexOf(")");if(-1!==l&&u+1===s.length){var c=s.substr(0,l),p=s.substr(l+1,u-(l+1)).split(","),h=1;switch(c){case"rgba":if(4!==p.length)return null;h=o(p.pop());case"rgb":return 3!==p.length?null:[n(p[0]),n(p[1]),n(p[2]),h];case"hsla":if(4!==p.length)return null;h=o(p.pop());case"hsl":if(3!==p.length)return null;var f=(parseFloat(p[0])%360+360)%360/360,d=o(p[1]),m=o(p[2]),y=m<=.5?m*(d+1):m+d-m*d,g=2*m-y;return[i(255*a(g,y,f+1/3)),i(255*a(g,y,f)),i(255*a(g,y,f-1/3)),h];default:return null}}return null}}catch(t){}}).parseCSSColor,Yt=function(t,e,r,i){void 0===i&&(i=1),this.r=t,this.g=e,this.b=r,this.a=i};Yt.parse=function(t){if(t){if(t instanceof Yt)return t;if("string"==typeof t){var e=Jt(t);if(e)return new Yt(e[0]/255*e[3],e[1]/255*e[3],e[2]/255*e[3],e[3])}}},Yt.prototype.toString=function(){var t=this.toArray(),e=t[1],r=t[2],i=t[3];return"rgba("+Math.round(t[0])+","+Math.round(e)+","+Math.round(r)+","+i+")"},Yt.prototype.toArray=function(){var t=this.a;return 0===t?[0,0,0,0]:[255*this.r/t,255*this.g/t,255*this.b/t,t]},Yt.black=new Yt(0,0,0,1),Yt.white=new Yt(1,1,1,1),Yt.transparent=new Yt(0,0,0,0),Yt.red=new Yt(1,0,0,1);var Qt=function(t,e,r){this.sensitivity=t?e?"variant":"case":e?"accent":"base",this.locale=r,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};Qt.prototype.compare=function(t,e){return this.collator.compare(t,e)},Qt.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var $t=function(t,e,r,i,n){this.text=t,this.image=e,this.scale=r,this.fontStack=i,this.textColor=n},te=function(t){this.sections=t};te.fromString=function(t){return new te([new $t(t,null,null,null,null)])},te.prototype.isEmpty=function(){return 0===this.sections.length||!this.sections.some(function(t){return 0!==t.text.length||t.image&&0!==t.image.name.length})},te.factory=function(t){return t instanceof te?t:te.fromString(t)},te.prototype.toString=function(){return 0===this.sections.length?"":this.sections.map(function(t){return t.text}).join("")},te.prototype.serialize=function(){for(var t=["format"],e=0,r=this.sections;e<r.length;e+=1){var i=r[e];if(i.image)t.push(["image",i.image.name]);else{t.push(i.text);var n={};i.fontStack&&(n["text-font"]=["literal",i.fontStack.split(",")]),i.scale&&(n["font-scale"]=i.scale),i.textColor&&(n["text-color"]=["rgba"].concat(i.textColor.toArray())),t.push(n)}}return t};var ee=function(t){this.name=t.name,this.available=t.available};function re(t,e,r,i){return"number"==typeof t&&t>=0&&t<=255&&"number"==typeof e&&e>=0&&e<=255&&"number"==typeof r&&r>=0&&r<=255?void 0===i||"number"==typeof i&&i>=0&&i<=1?null:"Invalid rgba value ["+[t,e,r,i].join(", ")+"]: 'a' must be between 0 and 1.":"Invalid rgba value ["+("number"==typeof i?[t,e,r,i]:[t,e,r]).join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}function ie(t){if(null===t)return!0;if("string"==typeof t)return!0;if("boolean"==typeof t)return!0;if("number"==typeof t)return!0;if(t instanceof Yt)return!0;if(t instanceof Qt)return!0;if(t instanceof te)return!0;if(t instanceof ee)return!0;if(Array.isArray(t)){for(var e=0,r=t;e<r.length;e+=1)if(!ie(r[e]))return!1;return!0}if("object"==typeof t){for(var i in t)if(!ie(t[i]))return!1;return!0}return!1}function ne(t){if(null===t)return Lt;if("string"==typeof t)return Bt;if("boolean"==typeof t)return Ft;if("number"==typeof t)return Rt;if(t instanceof Yt)return Ot;if(t instanceof Qt)return Nt;if(t instanceof te)return jt;if(t instanceof ee)return qt;if(Array.isArray(t)){for(var e,r=t.length,i=0,n=t;i<n.length;i+=1){var o=ne(n[i]);if(e){if(e===o)continue;e=Vt;break}e=o}return Zt(e||Vt,r)}return Ut}function oe(t){var e=typeof t;return null===t?"":"string"===e||"number"===e||"boolean"===e?String(t):t instanceof Yt||t instanceof te||t instanceof ee?t.toString():JSON.stringify(t)}ee.prototype.toString=function(){return this.name},ee.fromString=function(t){return t?new ee({name:t,available:!1}):null},ee.prototype.serialize=function(){return["image",this.name]};var ae=function(t,e){this.type=t,this.value=e};ae.parse=function(t,e){if(2!==t.length)return e.error("'literal' expression requires exactly one argument, but found "+(t.length-1)+" instead.");if(!ie(t[1]))return e.error("invalid value");var r=t[1],i=ne(r),n=e.expectedType;return"array"!==i.kind||0!==i.N||!n||"array"!==n.kind||"number"==typeof n.N&&0!==n.N||(i=n),new ae(i,r)},ae.prototype.evaluate=function(){return this.value},ae.prototype.eachChild=function(){},ae.prototype.outputDefined=function(){return!0},ae.prototype.serialize=function(){return"array"===this.type.kind||"object"===this.type.kind?["literal",this.value]:this.value instanceof Yt?["rgba"].concat(this.value.toArray()):this.value instanceof te?this.value.serialize():this.value};var se=function(t){this.name="ExpressionEvaluationError",this.message=t};se.prototype.toJSON=function(){return this.message};var le={string:Bt,number:Rt,boolean:Ft,object:Ut},ue=function(t,e){this.type=t,this.args=e};ue.parse=function(t,e){if(t.length<2)return e.error("Expected at least one argument.");var r,i=1,n=t[0];if("array"===n){var o,a;if(t.length>2){var s=t[1];if("string"!=typeof s||!(s in le)||"object"===s)return e.error('The item type argument of "array" must be one of string, number, boolean',1);o=le[s],i++}else o=Vt;if(t.length>3){if(null!==t[2]&&("number"!=typeof t[2]||t[2]<0||t[2]!==Math.floor(t[2])))return e.error('The length argument to "array" must be a positive integer literal',2);a=t[2],i++}r=Zt(o,a)}else r=le[n];for(var l=[];i<t.length;i++){var u=e.parse(t[i],i,Vt);if(!u)return null;l.push(u)}return new ue(r,l)},ue.prototype.evaluate=function(t){for(var e=0;e<this.args.length;e++){var r=this.args[e].evaluate(t);if(!Wt(this.type,ne(r)))return r;if(e===this.args.length-1)throw new se("Expected value to be of type "+Gt(this.type)+", but found "+Gt(ne(r))+" instead.")}return null},ue.prototype.eachChild=function(t){this.args.forEach(t)},ue.prototype.outputDefined=function(){return this.args.every(function(t){return t.outputDefined()})},ue.prototype.serialize=function(){var t=this.type,e=[t.kind];if("array"===t.kind){var r=t.itemType;if("string"===r.kind||"number"===r.kind||"boolean"===r.kind){e.push(r.kind);var i=t.N;("number"==typeof i||this.args.length>1)&&e.push(i)}}return e.concat(this.args.map(function(t){return t.serialize()}))};var ce=function(t){this.type=jt,this.sections=t};ce.parse=function(t,e){if(t.length<2)return e.error("Expected at least one argument.");var r=t[1];if(!Array.isArray(r)&&"object"==typeof r)return e.error("First argument must be an image or text section.");for(var i=[],n=!1,o=1;o<=t.length-1;++o){var a=t[o];if(n&&"object"==typeof a&&!Array.isArray(a)){n=!1;var s=null;if(a["font-scale"]&&!(s=e.parse(a["font-scale"],1,Rt)))return null;var l=null;if(a["text-font"]&&!(l=e.parse(a["text-font"],1,Zt(Bt))))return null;var u=null;if(a["text-color"]&&!(u=e.parse(a["text-color"],1,Ot)))return null;var c=i[i.length-1];c.scale=s,c.font=l,c.textColor=u}else{var p=e.parse(t[o],1,Vt);if(!p)return null;var h=p.type.kind;if("string"!==h&&"value"!==h&&"null"!==h&&"resolvedImage"!==h)return e.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");n=!0,i.push({content:p,scale:null,font:null,textColor:null})}}return new ce(i)},ce.prototype.evaluate=function(t){return new te(this.sections.map(function(e){var r=e.content.evaluate(t);return ne(r)===qt?new $t("",r,null,null,null):new $t(oe(r),null,e.scale?e.scale.evaluate(t):null,e.font?e.font.evaluate(t).join(","):null,e.textColor?e.textColor.evaluate(t):null)}))},ce.prototype.eachChild=function(t){for(var e=0,r=this.sections;e<r.length;e+=1){var i=r[e];t(i.content),i.scale&&t(i.scale),i.font&&t(i.font),i.textColor&&t(i.textColor)}},ce.prototype.outputDefined=function(){return!1},ce.prototype.serialize=function(){for(var t=["format"],e=0,r=this.sections;e<r.length;e+=1){var i=r[e];t.push(i.content.serialize());var n={};i.scale&&(n["font-scale"]=i.scale.serialize()),i.font&&(n["text-font"]=i.font.serialize()),i.textColor&&(n["text-color"]=i.textColor.serialize()),t.push(n)}return t};var pe=function(t){this.type=qt,this.input=t};pe.parse=function(t,e){if(2!==t.length)return e.error("Expected two arguments.");var r=e.parse(t[1],1,Bt);return r?new pe(r):e.error("No image name provided.")},pe.prototype.evaluate=function(t){var e=this.input.evaluate(t),r=ee.fromString(e);return r&&t.availableImages&&(r.available=t.availableImages.indexOf(e)>-1),r},pe.prototype.eachChild=function(t){t(this.input)},pe.prototype.outputDefined=function(){return!1},pe.prototype.serialize=function(){return["image",this.input.serialize()]};var he={"to-boolean":Ft,"to-color":Ot,"to-number":Rt,"to-string":Bt},fe=function(t,e){this.type=t,this.args=e};fe.parse=function(t,e){if(t.length<2)return e.error("Expected at least one argument.");var r=t[0];if(("to-boolean"===r||"to-string"===r)&&2!==t.length)return e.error("Expected one argument.");for(var i=he[r],n=[],o=1;o<t.length;o++){var a=e.parse(t[o],o,Vt);if(!a)return null;n.push(a)}return new fe(i,n)},fe.prototype.evaluate=function(t){if("boolean"===this.type.kind)return Boolean(this.args[0].evaluate(t));if("color"===this.type.kind){for(var e,r,i=0,n=this.args;i<n.length;i+=1){if(r=null,(e=n[i].evaluate(t))instanceof Yt)return e;if("string"==typeof e){var o=t.parseColor(e);if(o)return o}else if(Array.isArray(e)&&!(r=e.length<3||e.length>4?"Invalid rbga value "+JSON.stringify(e)+": expected an array containing either three or four numeric values.":re(e[0],e[1],e[2],e[3])))return new Yt(e[0]/255,e[1]/255,e[2]/255,e[3])}throw new se(r||"Could not parse color from value '"+("string"==typeof e?e:String(JSON.stringify(e)))+"'")}if("number"===this.type.kind){for(var a=null,s=0,l=this.args;s<l.length;s+=1){if(null===(a=l[s].evaluate(t)))return 0;var u=Number(a);if(!isNaN(u))return u}throw new se("Could not convert "+JSON.stringify(a)+" to number.")}return"formatted"===this.type.kind?te.fromString(oe(this.args[0].evaluate(t))):"resolvedImage"===this.type.kind?ee.fromString(oe(this.args[0].evaluate(t))):oe(this.args[0].evaluate(t))},fe.prototype.eachChild=function(t){this.args.forEach(t)},fe.prototype.outputDefined=function(){return this.args.every(function(t){return t.outputDefined()})},fe.prototype.serialize=function(){if("formatted"===this.type.kind)return new ce([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if("resolvedImage"===this.type.kind)return new pe(this.args[0]).serialize();var t=["to-"+this.type.kind];return this.eachChild(function(e){t.push(e.serialize())}),t};var de=["Unknown","Point","LineString","Polygon"],me=function(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null};me.prototype.id=function(){return this.feature&&"id"in this.feature?this.feature.id:null},me.prototype.geometryType=function(){return this.feature?"number"==typeof this.feature.type?de[this.feature.type]:this.feature.type:null},me.prototype.geometry=function(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null},me.prototype.canonicalID=function(){return this.canonical},me.prototype.properties=function(){return this.feature&&this.feature.properties||{}},me.prototype.parseColor=function(t){var e=this._parseColorCache[t];return e||(e=this._parseColorCache[t]=Yt.parse(t)),e};var ye=function(t,e,r,i){this.name=t,this.type=e,this._evaluate=r,this.args=i};ye.prototype.evaluate=function(t){return this._evaluate(t,this.args)},ye.prototype.eachChild=function(t){this.args.forEach(t)},ye.prototype.outputDefined=function(){return!1},ye.prototype.serialize=function(){return[this.name].concat(this.args.map(function(t){return t.serialize()}))},ye.parse=function(t,e){var r,i=t[0],n=ye.definitions[i];if(!n)return e.error('Unknown expression "'+i+'". If you wanted a literal array, use ["literal", [...]].',0);for(var o=Array.isArray(n)?n[0]:n.type,a=Array.isArray(n)?[[n[1],n[2]]]:n.overloads,s=a.filter(function(e){var r=e[0];return!Array.isArray(r)||r.length===t.length-1}),l=null,u=0,c=s;u<c.length;u+=1){var p=c[u],h=p[0],f=p[1];l=new Oe(e.registry,e.path,null,e.scope);for(var d=[],m=!1,y=1;y<t.length;y++){var g=t[y],_=Array.isArray(h)?h[y-1]:h.type,v=l.parse(g,1+d.length,_);if(!v){m=!0;break}d.push(v)}if(!m)if(Array.isArray(h)&&h.length!==d.length)l.error("Expected "+h.length+" arguments, but found "+d.length+" instead.");else{for(var x=0;x<d.length;x++){var b=Array.isArray(h)?h[x]:h.type,w=d[x];l.concat(x+1).checkSubtype(b,w.type)}if(0===l.errors.length)return new ye(i,o,f,d)}}if(1===s.length)(r=e.errors).push.apply(r,l.errors);else{for(var S=(s.length?s:a).map(function(t){var e;return e=t[0],Array.isArray(e)?"("+e.map(Gt).join(", ")+")":"("+Gt(e.type)+"...)"}).join(" | "),T=[],I=1;I<t.length;I++){var E=e.parse(t[I],1+T.length);if(!E)return null;T.push(Gt(E.type))}e.error("Expected arguments of type "+S+", but found ("+T.join(", ")+") instead.")}return null},ye.register=function(t,e){for(var r in ye.definitions=e,e)t[r]=ye};var ge=function(t,e,r){this.type=Nt,this.locale=r,this.caseSensitive=t,this.diacriticSensitive=e};function _e(t,e){t[0]=Math.min(t[0],e[0]),t[1]=Math.min(t[1],e[1]),t[2]=Math.max(t[2],e[0]),t[3]=Math.max(t[3],e[1])}function ve(t,e){return!(t[0]<=e[0]||t[2]>=e[2]||t[1]<=e[1]||t[3]>=e[3])}function xe(t,e){var r=(180+t[0])/360,i=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+t[1]*Math.PI/360)))/360,n=Math.pow(2,e.z);return[Math.round(r*n*8192),Math.round(i*n*8192)]}function be(t,e,r){return e[1]>t[1]!=r[1]>t[1]&&t[0]<(r[0]-e[0])*(t[1]-e[1])/(r[1]-e[1])+e[0]}function we(t,e){for(var r,i,n,o,a,s,l,u=!1,c=0,p=e.length;c<p;c++)for(var h=e[c],f=0,d=h.length;f<d-1;f++){if((o=(r=t)[0]-(i=h[f])[0])*(l=r[1]-(n=h[f+1])[1])-(s=r[0]-n[0])*(a=r[1]-i[1])==0&&o*s<=0&&a*l<=0)return!1;be(t,h[f],h[f+1])&&(u=!u)}return u}function Se(t,e){for(var r=0;r<e.length;r++)if(we(t,e[r]))return!0;return!1}function Te(t,e,r,i){var n=i[0]-r[0],o=i[1]-r[1],a=(t[0]-r[0])*o-n*(t[1]-r[1]),s=(e[0]-r[0])*o-n*(e[1]-r[1]);return a>0&&s<0||a<0&&s>0}function Ie(t,e,r){for(var i=0,n=r;i<n.length;i+=1)for(var o=n[i],a=0;a<o.length-1;++a)if(0!=(p=[(c=o[a+1])[0]-(u=o[a])[0],c[1]-u[1]])[0]*(h=[(l=e)[0]-(s=t)[0],l[1]-s[1]])[1]-p[1]*h[0]&&Te(s,l,u,c)&&Te(u,c,s,l))return!0;var s,l,u,c,p,h;return!1}function Ee(t,e){for(var r=0;r<t.length;++r)if(!we(t[r],e))return!1;for(var i=0;i<t.length-1;++i)if(Ie(t[i],t[i+1],e))return!1;return!0}function Ae(t,e){for(var r=0;r<e.length;r++)if(Ee(t,e[r]))return!0;return!1}function ze(t,e,r){for(var i=[],n=0;n<t.length;n++){for(var o=[],a=0;a<t[n].length;a++){var s=xe(t[n][a],r);_e(e,s),o.push(s)}i.push(o)}return i}function Pe(t,e,r){for(var i=[],n=0;n<t.length;n++){var o=ze(t[n],e,r);i.push(o)}return i}function Ce(t,e,r,i){if(t[0]<r[0]||t[0]>r[2]){var n=.5*i,o=t[0]-r[0]>n?-i:r[0]-t[0]>n?i:0;0===o&&(o=t[0]-r[2]>n?-i:r[2]-t[0]>n?i:0),t[0]+=o}_e(e,t)}function ke(t,e,r,i){for(var n=8192*Math.pow(2,i.z),o=[8192*i.x,8192*i.y],a=[],s=0,l=t;s<l.length;s+=1)for(var u=0,c=l[s];u<c.length;u+=1){var p=c[u],h=[p.x+o[0],p.y+o[1]];Ce(h,e,r,n),a.push(h)}return a}function Me(t,e,r,i){for(var n,o=8192*Math.pow(2,i.z),a=[8192*i.x,8192*i.y],s=[],l=0,u=t;l<u.length;l+=1){for(var c=[],p=0,h=u[l];p<h.length;p+=1){var f=h[p],d=[f.x+a[0],f.y+a[1]];_e(e,d),c.push(d)}s.push(c)}if(e[2]-e[0]<=o/2){(n=e)[0]=n[1]=1/0,n[2]=n[3]=-1/0;for(var m=0,y=s;m<y.length;m+=1)for(var g=0,_=y[m];g<_.length;g+=1)Ce(_[g],e,r,o)}return s}ge.parse=function(t,e){if(2!==t.length)return e.error("Expected one argument.");var r=t[1];if("object"!=typeof r||Array.isArray(r))return e.error("Collator options argument must be an object.");var i=e.parse(void 0!==r["case-sensitive"]&&r["case-sensitive"],1,Ft);if(!i)return null;var n=e.parse(void 0!==r["diacritic-sensitive"]&&r["diacritic-sensitive"],1,Ft);if(!n)return null;var o=null;return r.locale&&!(o=e.parse(r.locale,1,Bt))?null:new ge(i,n,o)},ge.prototype.evaluate=function(t){return new Qt(this.caseSensitive.evaluate(t),this.diacriticSensitive.evaluate(t),this.locale?this.locale.evaluate(t):null)},ge.prototype.eachChild=function(t){t(this.caseSensitive),t(this.diacriticSensitive),this.locale&&t(this.locale)},ge.prototype.outputDefined=function(){return!1},ge.prototype.serialize=function(){var t={};return t["case-sensitive"]=this.caseSensitive.serialize(),t["diacritic-sensitive"]=this.diacriticSensitive.serialize(),this.locale&&(t.locale=this.locale.serialize()),["collator",t]};var De=function(t,e){this.type=Ft,this.geojson=t,this.geometries=e};function Le(t){if(t instanceof ye){if("get"===t.name&&1===t.args.length)return!1;if("feature-state"===t.name)return!1;if("has"===t.name&&1===t.args.length)return!1;if("properties"===t.name||"geometry-type"===t.name||"id"===t.name)return!1;if(/^filter-/.test(t.name))return!1}if(t instanceof De)return!1;var e=!0;return t.eachChild(function(t){e&&!Le(t)&&(e=!1)}),e}function Re(t){if(t instanceof ye&&"feature-state"===t.name)return!1;var e=!0;return t.eachChild(function(t){e&&!Re(t)&&(e=!1)}),e}function Be(t,e){if(t instanceof ye&&e.indexOf(t.name)>=0)return!1;var r=!0;return t.eachChild(function(t){r&&!Be(t,e)&&(r=!1)}),r}De.parse=function(t,e){if(2!==t.length)return e.error("'within' expression requires exactly one argument, but found "+(t.length-1)+" instead.");if(ie(t[1])){var r=t[1];if("FeatureCollection"===r.type)for(var i=0;i<r.features.length;++i){var n=r.features[i].geometry.type;if("Polygon"===n||"MultiPolygon"===n)return new De(r,r.features[i].geometry)}else if("Feature"===r.type){var o=r.geometry.type;if("Polygon"===o||"MultiPolygon"===o)return new De(r,r.geometry)}else if("Polygon"===r.type||"MultiPolygon"===r.type)return new De(r,r)}return e.error("'within' expression requires valid geojson object that contains polygon geometry type.")},De.prototype.evaluate=function(t){if(null!=t.geometry()&&null!=t.canonicalID()){if("Point"===t.geometryType())return function(t,e){var r=[1/0,1/0,-1/0,-1/0],i=[1/0,1/0,-1/0,-1/0],n=t.canonicalID();if("Polygon"===e.type){var o=ze(e.coordinates,i,n),a=ke(t.geometry(),r,i,n);if(!ve(r,i))return!1;for(var s=0,l=a;s<l.length;s+=1)if(!we(l[s],o))return!1}if("MultiPolygon"===e.type){var u=Pe(e.coordinates,i,n),c=ke(t.geometry(),r,i,n);if(!ve(r,i))return!1;for(var p=0,h=c;p<h.length;p+=1)if(!Se(h[p],u))return!1}return!0}(t,this.geometries);if("LineString"===t.geometryType())return function(t,e){var r=[1/0,1/0,-1/0,-1/0],i=[1/0,1/0,-1/0,-1/0],n=t.canonicalID();if("Polygon"===e.type){var o=ze(e.coordinates,i,n),a=Me(t.geometry(),r,i,n);if(!ve(r,i))return!1;for(var s=0,l=a;s<l.length;s+=1)if(!Ee(l[s],o))return!1}if("MultiPolygon"===e.type){var u=Pe(e.coordinates,i,n),c=Me(t.geometry(),r,i,n);if(!ve(r,i))return!1;for(var p=0,h=c;p<h.length;p+=1)if(!Ae(h[p],u))return!1}return!0}(t,this.geometries)}return!1},De.prototype.eachChild=function(){},De.prototype.outputDefined=function(){return!0},De.prototype.serialize=function(){return["within",this.geojson]};var Fe=function(t,e){this.type=e.type,this.name=t,this.boundExpression=e};Fe.parse=function(t,e){if(2!==t.length||"string"!=typeof t[1])return e.error("'var' expression requires exactly one string literal argument.");var r=t[1];return e.scope.has(r)?new Fe(r,e.scope.get(r)):e.error('Unknown variable "'+r+'". Make sure "'+r+'" has been bound in an enclosing "let" expression before using it.',1)},Fe.prototype.evaluate=function(t){return this.boundExpression.evaluate(t)},Fe.prototype.eachChild=function(){},Fe.prototype.outputDefined=function(){return!1},Fe.prototype.serialize=function(){return["var",this.name]};var Oe=function(t,e,r,i,n){void 0===e&&(e=[]),void 0===i&&(i=new Dt),void 0===n&&(n=[]),this.registry=t,this.path=e,this.key=e.map(function(t){return"["+t+"]"}).join(""),this.scope=i,this.errors=n,this.expectedType=r};function Ue(t,e){for(var r,i=t.length-1,n=0,o=i,a=0;n<=o;)if((r=t[a=Math.floor((n+o)/2)])<=e){if(a===i||e<t[a+1])return a;n=a+1}else{if(!(r>e))throw new se("Input is not a number.");o=a-1}return 0}Oe.prototype.parse=function(t,e,r,i,n){return void 0===n&&(n={}),e?this.concat(e,r,i)._parse(t,n):this._parse(t,n)},Oe.prototype._parse=function(t,e){function r(t,e,r){return"assert"===r?new ue(e,[t]):"coerce"===r?new fe(e,[t]):t}if(null!==t&&"string"!=typeof t&&"boolean"!=typeof t&&"number"!=typeof t||(t=["literal",t]),Array.isArray(t)){if(0===t.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var i=t[0];if("string"!=typeof i)return this.error("Expression name must be a string, but found "+typeof i+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var n=this.registry[i];if(n){var o=n.parse(t,this);if(!o)return null;if(this.expectedType){var a=this.expectedType,s=o.type;if("string"!==a.kind&&"number"!==a.kind&&"boolean"!==a.kind&&"object"!==a.kind&&"array"!==a.kind||"value"!==s.kind)if("color"!==a.kind&&"formatted"!==a.kind&&"resolvedImage"!==a.kind||"value"!==s.kind&&"string"!==s.kind){if(this.checkSubtype(a,s))return null}else o=r(o,a,e.typeAnnotation||"coerce");else o=r(o,a,e.typeAnnotation||"assert")}if(!(o instanceof ae)&&"resolvedImage"!==o.type.kind&&function t(e){if(e instanceof Fe)return t(e.boundExpression);if(e instanceof ye&&"error"===e.name)return!1;if(e instanceof ge)return!1;if(e instanceof De)return!1;var r=e instanceof fe||e instanceof ue,i=!0;return e.eachChild(function(e){i=r?i&&t(e):i&&e instanceof ae}),!!i&&Le(e)&&Be(e,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}(o)){var l=new me;try{o=new ae(o.type,o.evaluate(l))}catch(t){return this.error(t.message),null}}return o}return this.error('Unknown expression "'+i+'". If you wanted a literal array, use ["literal", [...]].',0)}return this.error(void 0===t?"'undefined' value invalid. Use null instead.":"object"==typeof t?'Bare objects invalid. Use ["literal", {...}] instead.':"Expected an array, but found "+typeof t+" instead.")},Oe.prototype.concat=function(t,e,r){var i="number"==typeof t?this.path.concat(t):this.path,n=r?this.scope.concat(r):this.scope;return new Oe(this.registry,i,e||null,n,this.errors)},Oe.prototype.error=function(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];var i=""+this.key+e.map(function(t){return"["+t+"]"}).join("");this.errors.push(new Mt(i,t))},Oe.prototype.checkSubtype=function(t,e){var r=Wt(t,e);return r&&this.error(r),r};var Ve=function(t,e,r){this.type=t,this.input=e,this.labels=[],this.outputs=[];for(var i=0,n=r;i<n.length;i+=1){var o=n[i],a=o[1];this.labels.push(o[0]),this.outputs.push(a)}};function Ne(t,e,r){return t*(1-r)+e*r}Ve.parse=function(t,e){if(t.length-1<4)return e.error("Expected at least 4 arguments, but found only "+(t.length-1)+".");if((t.length-1)%2!=0)return e.error("Expected an even number of arguments.");var r=e.parse(t[1],1,Rt);if(!r)return null;var i=[],n=null;e.expectedType&&"value"!==e.expectedType.kind&&(n=e.expectedType);for(var o=1;o<t.length;o+=2){var a=1===o?-1/0:t[o],s=t[o+1],l=o,u=o+1;if("number"!=typeof a)return e.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',l);if(i.length&&i[i.length-1][0]>=a)return e.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',l);var c=e.parse(s,u,n);if(!c)return null;n=n||c.type,i.push([a,c])}return new Ve(n,r,i)},Ve.prototype.evaluate=function(t){var e=this.labels,r=this.outputs;if(1===e.length)return r[0].evaluate(t);var i=this.input.evaluate(t);if(i<=e[0])return r[0].evaluate(t);var n=e.length;return i>=e[n-1]?r[n-1].evaluate(t):r[Ue(e,i)].evaluate(t)},Ve.prototype.eachChild=function(t){t(this.input);for(var e=0,r=this.outputs;e<r.length;e+=1)t(r[e])},Ve.prototype.outputDefined=function(){return this.outputs.every(function(t){return t.outputDefined()})},Ve.prototype.serialize=function(){for(var t=["step",this.input.serialize()],e=0;e<this.labels.length;e++)e>0&&t.push(this.labels[e]),t.push(this.outputs[e].serialize());return t};var je=Object.freeze({__proto__:null,number:Ne,color:function(t,e,r){return new Yt(Ne(t.r,e.r,r),Ne(t.g,e.g,r),Ne(t.b,e.b,r),Ne(t.a,e.a,r))},array:function(t,e,r){return t.map(function(t,i){return Ne(t,e[i],r)})}}),qe=6/29*3*(6/29),Ze=Math.PI/180,Ge=180/Math.PI;function Xe(t){return t>.008856451679035631?Math.pow(t,1/3):t/qe+4/29}function We(t){return t>6/29?t*t*t:qe*(t-4/29)}function Ke(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function He(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Je(t){var e=He(t.r),r=He(t.g),i=He(t.b),n=Xe((.4124564*e+.3575761*r+.1804375*i)/.95047),o=Xe((.2126729*e+.7151522*r+.072175*i)/1);return{l:116*o-16,a:500*(n-o),b:200*(o-Xe((.0193339*e+.119192*r+.9503041*i)/1.08883)),alpha:t.a}}function Ye(t){var e=(t.l+16)/116,r=isNaN(t.a)?e:e+t.a/500,i=isNaN(t.b)?e:e-t.b/200;return e=1*We(e),r=.95047*We(r),i=1.08883*We(i),new Yt(Ke(3.2404542*r-1.5371385*e-.4985314*i),Ke(-.969266*r+1.8760108*e+.041556*i),Ke(.0556434*r-.2040259*e+1.0572252*i),t.alpha)}function Qe(t,e,r){var i=e-t;return t+r*(i>180||i<-180?i-360*Math.round(i/360):i)}var $e={forward:Je,reverse:Ye,interpolate:function(t,e,r){return{l:Ne(t.l,e.l,r),a:Ne(t.a,e.a,r),b:Ne(t.b,e.b,r),alpha:Ne(t.alpha,e.alpha,r)}}},tr={forward:function(t){var e=Je(t),r=e.l,i=e.a,n=e.b,o=Math.atan2(n,i)*Ge;return{h:o<0?o+360:o,c:Math.sqrt(i*i+n*n),l:r,alpha:t.a}},reverse:function(t){var e=t.h*Ze,r=t.c;return Ye({l:t.l,a:Math.cos(e)*r,b:Math.sin(e)*r,alpha:t.alpha})},interpolate:function(t,e,r){return{h:Qe(t.h,e.h,r),c:Ne(t.c,e.c,r),l:Ne(t.l,e.l,r),alpha:Ne(t.alpha,e.alpha,r)}}},er=Object.freeze({__proto__:null,lab:$e,hcl:tr}),rr=function(t,e,r,i,n){this.type=t,this.operator=e,this.interpolation=r,this.input=i,this.labels=[],this.outputs=[];for(var o=0,a=n;o<a.length;o+=1){var s=a[o],l=s[1];this.labels.push(s[0]),this.outputs.push(l)}};function ir(t,e,r,i){var n=i-r,o=t-r;return 0===n?0:1===e?o/n:(Math.pow(e,o)-1)/(Math.pow(e,n)-1)}rr.interpolationFactor=function(t,e,i,n){var o=0;if("exponential"===t.name)o=ir(e,t.base,i,n);else if("linear"===t.name)o=ir(e,1,i,n);else if("cubic-bezier"===t.name){var a=t.controlPoints;o=new r(a[0],a[1],a[2],a[3]).solve(ir(e,1,i,n))}return o},rr.parse=function(t,e){var r=t[0],i=t[1],n=t[2],o=t.slice(3);if(!Array.isArray(i)||0===i.length)return e.error("Expected an interpolation type expression.",1);if("linear"===i[0])i={name:"linear"};else if("exponential"===i[0]){var a=i[1];if("number"!=typeof a)return e.error("Exponential interpolation requires a numeric base.",1,1);i={name:"exponential",base:a}}else{if("cubic-bezier"!==i[0])return e.error("Unknown interpolation type "+String(i[0]),1,0);var s=i.slice(1);if(4!==s.length||s.some(function(t){return"number"!=typeof t||t<0||t>1}))return e.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);i={name:"cubic-bezier",controlPoints:s}}if(t.length-1<4)return e.error("Expected at least 4 arguments, but found only "+(t.length-1)+".");if((t.length-1)%2!=0)return e.error("Expected an even number of arguments.");if(!(n=e.parse(n,2,Rt)))return null;var l=[],u=null;"interpolate-hcl"===r||"interpolate-lab"===r?u=Ot:e.expectedType&&"value"!==e.expectedType.kind&&(u=e.expectedType);for(var c=0;c<o.length;c+=2){var p=o[c],h=o[c+1],f=c+3,d=c+4;if("number"!=typeof p)return e.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',f);if(l.length&&l[l.length-1][0]>=p)return e.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',f);var m=e.parse(h,d,u);if(!m)return null;u=u||m.type,l.push([p,m])}return"number"===u.kind||"color"===u.kind||"array"===u.kind&&"number"===u.itemType.kind&&"number"==typeof u.N?new rr(u,r,i,n,l):e.error("Type "+Gt(u)+" is not interpolatable.")},rr.prototype.evaluate=function(t){var e=this.labels,r=this.outputs;if(1===e.length)return r[0].evaluate(t);var i=this.input.evaluate(t);if(i<=e[0])return r[0].evaluate(t);var n=e.length;if(i>=e[n-1])return r[n-1].evaluate(t);var o=Ue(e,i),a=rr.interpolationFactor(this.interpolation,i,e[o],e[o+1]),s=r[o].evaluate(t),l=r[o+1].evaluate(t);return"interpolate"===this.operator?je[this.type.kind.toLowerCase()](s,l,a):"interpolate-hcl"===this.operator?tr.reverse(tr.interpolate(tr.forward(s),tr.forward(l),a)):$e.reverse($e.interpolate($e.forward(s),$e.forward(l),a))},rr.prototype.eachChild=function(t){t(this.input);for(var e=0,r=this.outputs;e<r.length;e+=1)t(r[e])},rr.prototype.outputDefined=function(){return this.outputs.every(function(t){return t.outputDefined()})},rr.prototype.serialize=function(){var t;t="linear"===this.interpolation.name?["linear"]:"exponential"===this.interpolation.name?1===this.interpolation.base?["linear"]:["exponential",this.interpolation.base]:["cubic-bezier"].concat(this.interpolation.controlPoints);for(var e=[this.operator,t,this.input.serialize()],r=0;r<this.labels.length;r++)e.push(this.labels[r],this.outputs[r].serialize());return e};var nr=function(t,e){this.type=t,this.args=e};nr.parse=function(t,e){if(t.length<2)return e.error("Expectected at least one argument.");var r=null,i=e.expectedType;i&&"value"!==i.kind&&(r=i);for(var n=[],o=0,a=t.slice(1);o<a.length;o+=1){var s=e.parse(a[o],1+n.length,r,void 0,{typeAnnotation:"omit"});if(!s)return null;r=r||s.type,n.push(s)}var l=i&&n.some(function(t){return Wt(i,t.type)});return new nr(l?Vt:r,n)},nr.prototype.evaluate=function(t){for(var e,r=null,i=0,n=0,o=this.args;n<o.length&&(i++,(r=o[n].evaluate(t))&&r instanceof ee&&!r.available&&(e||(e=r.name),r=null,i===this.args.length&&(r=e)),null===r);n+=1);return r},nr.prototype.eachChild=function(t){this.args.forEach(t)},nr.prototype.outputDefined=function(){return this.args.every(function(t){return t.outputDefined()})},nr.prototype.serialize=function(){var t=["coalesce"];return this.eachChild(function(e){t.push(e.serialize())}),t};var or=function(t,e){this.type=e.type,this.bindings=[].concat(t),this.result=e};or.prototype.evaluate=function(t){return this.result.evaluate(t)},or.prototype.eachChild=function(t){for(var e=0,r=this.bindings;e<r.length;e+=1)t(r[e][1]);t(this.result)},or.parse=function(t,e){if(t.length<4)return e.error("Expected at least 3 arguments, but found "+(t.length-1)+" instead.");for(var r=[],i=1;i<t.length-1;i+=2){var n=t[i];if("string"!=typeof n)return e.error("Expected string, but found "+typeof n+" instead.",i);if(/[^a-zA-Z0-9_]/.test(n))return e.error("Variable names must contain only alphanumeric characters or '_'.",i);var o=e.parse(t[i+1],i+1);if(!o)return null;r.push([n,o])}var a=e.parse(t[t.length-1],t.length-1,e.expectedType,r);return a?new or(r,a):null},or.prototype.outputDefined=function(){return this.result.outputDefined()},or.prototype.serialize=function(){for(var t=["let"],e=0,r=this.bindings;e<r.length;e+=1){var i=r[e];t.push(i[0],i[1].serialize())}return t.push(this.result.serialize()),t};var ar=function(t,e,r){this.type=t,this.index=e,this.input=r};ar.parse=function(t,e){if(3!==t.length)return e.error("Expected 2 arguments, but found "+(t.length-1)+" instead.");var r=e.parse(t[1],1,Rt),i=e.parse(t[2],2,Zt(e.expectedType||Vt));return r&&i?new ar(i.type.itemType,r,i):null},ar.prototype.evaluate=function(t){var e=this.index.evaluate(t),r=this.input.evaluate(t);if(e<0)throw new se("Array index out of bounds: "+e+" < 0.");if(e>=r.length)throw new se("Array index out of bounds: "+e+" > "+(r.length-1)+".");if(e!==Math.floor(e))throw new se("Array index must be an integer, but found "+e+" instead.");return r[e]},ar.prototype.eachChild=function(t){t(this.index),t(this.input)},ar.prototype.outputDefined=function(){return!1},ar.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var sr=function(t,e){this.type=Ft,this.needle=t,this.haystack=e};sr.parse=function(t,e){if(3!==t.length)return e.error("Expected 2 arguments, but found "+(t.length-1)+" instead.");var r=e.parse(t[1],1,Vt),i=e.parse(t[2],2,Vt);return r&&i?Kt(r.type,[Ft,Bt,Rt,Lt,Vt])?new sr(r,i):e.error("Expected first argument to be of type boolean, string, number or null, but found "+Gt(r.type)+" instead"):null},sr.prototype.evaluate=function(t){var e=this.needle.evaluate(t),r=this.haystack.evaluate(t);if(!r)return!1;if(!Ht(e,["boolean","string","number","null"]))throw new se("Expected first argument to be of type boolean, string, number or null, but found "+Gt(ne(e))+" instead.");if(!Ht(r,["string","array"]))throw new se("Expected second argument to be of type array or string, but found "+Gt(ne(r))+" instead.");return r.indexOf(e)>=0},sr.prototype.eachChild=function(t){t(this.needle),t(this.haystack)},sr.prototype.outputDefined=function(){return!0},sr.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var lr=function(t,e,r){this.type=Rt,this.needle=t,this.haystack=e,this.fromIndex=r};lr.parse=function(t,e){if(t.length<=2||t.length>=5)return e.error("Expected 3 or 4 arguments, but found "+(t.length-1)+" instead.");var r=e.parse(t[1],1,Vt),i=e.parse(t[2],2,Vt);if(!r||!i)return null;if(!Kt(r.type,[Ft,Bt,Rt,Lt,Vt]))return e.error("Expected first argument to be of type boolean, string, number or null, but found "+Gt(r.type)+" instead");if(4===t.length){var n=e.parse(t[3],3,Rt);return n?new lr(r,i,n):null}return new lr(r,i)},lr.prototype.evaluate=function(t){var e=this.needle.evaluate(t),r=this.haystack.evaluate(t);if(!Ht(e,["boolean","string","number","null"]))throw new se("Expected first argument to be of type boolean, string, number or null, but found "+Gt(ne(e))+" instead.");if(!Ht(r,["string","array"]))throw new se("Expected second argument to be of type array or string, but found "+Gt(ne(r))+" instead.");if(this.fromIndex){var i=this.fromIndex.evaluate(t);return r.indexOf(e,i)}return r.indexOf(e)},lr.prototype.eachChild=function(t){t(this.needle),t(this.haystack),this.fromIndex&&t(this.fromIndex)},lr.prototype.outputDefined=function(){return!1},lr.prototype.serialize=function(){if(null!=this.fromIndex&&void 0!==this.fromIndex){var t=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),t]}return["index-of",this.needle.serialize(),this.haystack.serialize()]};var ur=function(t,e,r,i,n,o){this.inputType=t,this.type=e,this.input=r,this.cases=i,this.outputs=n,this.otherwise=o};ur.parse=function(t,e){if(t.length<5)return e.error("Expected at least 4 arguments, but found only "+(t.length-1)+".");if(t.length%2!=1)return e.error("Expected an even number of arguments.");var r,i;e.expectedType&&"value"!==e.expectedType.kind&&(i=e.expectedType);for(var n={},o=[],a=2;a<t.length-1;a+=2){var s=t[a],l=t[a+1];Array.isArray(s)||(s=[s]);var u=e.concat(a);if(0===s.length)return u.error("Expected at least one branch label.");for(var c=0,p=s;c<p.length;c+=1){var h=p[c];if("number"!=typeof h&&"string"!=typeof h)return u.error("Branch labels must be numbers or strings.");if("number"==typeof h&&Math.abs(h)>Number.MAX_SAFE_INTEGER)return u.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if("number"==typeof h&&Math.floor(h)!==h)return u.error("Numeric branch labels must be integer values.");if(r){if(u.checkSubtype(r,ne(h)))return null}else r=ne(h);if(void 0!==n[String(h)])return u.error("Branch labels must be unique.");n[String(h)]=o.length}var f=e.parse(l,a,i);if(!f)return null;i=i||f.type,o.push(f)}var d=e.parse(t[1],1,Vt);if(!d)return null;var m=e.parse(t[t.length-1],t.length-1,i);return m?"value"!==d.type.kind&&e.concat(1).checkSubtype(r,d.type)?null:new ur(r,i,d,n,o,m):null},ur.prototype.evaluate=function(t){var e=this.input.evaluate(t);return(ne(e)===this.inputType&&this.outputs[this.cases[e]]||this.otherwise).evaluate(t)},ur.prototype.eachChild=function(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)},ur.prototype.outputDefined=function(){return this.outputs.every(function(t){return t.outputDefined()})&&this.otherwise.outputDefined()},ur.prototype.serialize=function(){for(var t=this,e=["match",this.input.serialize()],r=[],i={},n=0,o=Object.keys(this.cases).sort();n<o.length;n+=1){var a=o[n];void 0===(p=i[this.cases[a]])?(i[this.cases[a]]=r.length,r.push([this.cases[a],[a]])):r[p][1].push(a)}for(var s=function(e){return"number"===t.inputType.kind?Number(e):e},l=0,u=r;l<u.length;l+=1){var c=u[l],p=c[0],h=c[1];e.push(1===h.length?s(h[0]):h.map(s)),e.push(this.outputs[outputIndex$1].serialize())}return e.push(this.otherwise.serialize()),e};var cr=function(t,e,r){this.type=t,this.branches=e,this.otherwise=r};cr.parse=function(t,e){if(t.length<4)return e.error("Expected at least 3 arguments, but found only "+(t.length-1)+".");if(t.length%2!=0)return e.error("Expected an odd number of arguments.");var r;e.expectedType&&"value"!==e.expectedType.kind&&(r=e.expectedType);for(var i=[],n=1;n<t.length-1;n+=2){var o=e.parse(t[n],n,Ft);if(!o)return null;var a=e.parse(t[n+1],n+1,r);if(!a)return null;i.push([o,a]),r=r||a.type}var s=e.parse(t[t.length-1],t.length-1,r);return s?new cr(r,i,s):null},cr.prototype.evaluate=function(t){for(var e=0,r=this.branches;e<r.length;e+=1){var i=r[e],n=i[1];if(i[0].evaluate(t))return n.evaluate(t)}return this.otherwise.evaluate(t)},cr.prototype.eachChild=function(t){for(var e=0,r=this.branches;e<r.length;e+=1){var i=r[e],n=i[1];t(i[0]),t(n)}t(this.otherwise)},cr.prototype.outputDefined=function(){return this.branches.every(function(t){return t[1].outputDefined()})&&this.otherwise.outputDefined()},cr.prototype.serialize=function(){var t=["case"];return this.eachChild(function(e){t.push(e.serialize())}),t};var pr=function(t,e,r,i){this.type=t,this.input=e,this.beginIndex=r,this.endIndex=i};function hr(t,e){return"=="===t||"!="===t?"boolean"===e.kind||"string"===e.kind||"number"===e.kind||"null"===e.kind||"value"===e.kind:"string"===e.kind||"number"===e.kind||"value"===e.kind}function fr(t,e,r,i){return 0===i.compare(e,r)}function dr(t,e,r){var i="=="!==t&&"!="!==t;return function(){function n(t,e,r){this.type=Ft,this.lhs=t,this.rhs=e,this.collator=r,this.hasUntypedArgument="value"===t.type.kind||"value"===e.type.kind}return n.parse=function(t,e){if(3!==t.length&&4!==t.length)return e.error("Expected two or three arguments.");var r=t[0],o=e.parse(t[1],1,Vt);if(!o)return null;if(!hr(r,o.type))return e.concat(1).error('"'+r+"\" comparisons are not supported for type '"+Gt(o.type)+"'.");var a=e.parse(t[2],2,Vt);if(!a)return null;if(!hr(r,a.type))return e.concat(2).error('"'+r+"\" comparisons are not supported for type '"+Gt(a.type)+"'.");if(o.type.kind!==a.type.kind&&"value"!==o.type.kind&&"value"!==a.type.kind)return e.error("Cannot compare types '"+Gt(o.type)+"' and '"+Gt(a.type)+"'.");i&&("value"===o.type.kind&&"value"!==a.type.kind?o=new ue(a.type,[o]):"value"!==o.type.kind&&"value"===a.type.kind&&(a=new ue(o.type,[a])));var s=null;if(4===t.length){if("string"!==o.type.kind&&"string"!==a.type.kind&&"value"!==o.type.kind&&"value"!==a.type.kind)return e.error("Cannot use collator to compare non-string types.");if(!(s=e.parse(t[3],3,Nt)))return null}return new n(o,a,s)},n.prototype.evaluate=function(n){var o=this.lhs.evaluate(n),a=this.rhs.evaluate(n);if(i&&this.hasUntypedArgument){var s=ne(o),l=ne(a);if(s.kind!==l.kind||"string"!==s.kind&&"number"!==s.kind)throw new se('Expected arguments for "'+t+'" to be (string, string) or (number, number), but found ('+s.kind+", "+l.kind+") instead.")}if(this.collator&&!i&&this.hasUntypedArgument){var u=ne(o),c=ne(a);if("string"!==u.kind||"string"!==c.kind)return e(n,o,a)}return this.collator?r(n,o,a,this.collator.evaluate(n)):e(n,o,a)},n.prototype.eachChild=function(t){t(this.lhs),t(this.rhs),this.collator&&t(this.collator)},n.prototype.outputDefined=function(){return!0},n.prototype.serialize=function(){var e=[t];return this.eachChild(function(t){e.push(t.serialize())}),e},n}()}pr.parse=function(t,e){if(t.length<=2||t.length>=5)return e.error("Expected 3 or 4 arguments, but found "+(t.length-1)+" instead.");var r=e.parse(t[1],1,Vt),i=e.parse(t[2],2,Rt);if(!r||!i)return null;if(!Kt(r.type,[Zt(Vt),Bt,Vt]))return e.error("Expected first argument to be of type array or string, but found "+Gt(r.type)+" instead");if(4===t.length){var n=e.parse(t[3],3,Rt);return n?new pr(r.type,r,i,n):null}return new pr(r.type,r,i)},pr.prototype.evaluate=function(t){var e=this.input.evaluate(t),r=this.beginIndex.evaluate(t);if(!Ht(e,["string","array"]))throw new se("Expected first argument to be of type array or string, but found "+Gt(ne(e))+" instead.");if(this.endIndex){var i=this.endIndex.evaluate(t);return e.slice(r,i)}return e.slice(r)},pr.prototype.eachChild=function(t){t(this.input),t(this.beginIndex),this.endIndex&&t(this.endIndex)},pr.prototype.outputDefined=function(){return!1},pr.prototype.serialize=function(){if(null!=this.endIndex&&void 0!==this.endIndex){var t=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),t]}return["slice",this.input.serialize(),this.beginIndex.serialize()]};var mr=dr("==",function(t,e,r){return e===r},fr),yr=dr("!=",function(t,e,r){return e!==r},function(t,e,r,i){return!fr(0,e,r,i)}),gr=dr("<",function(t,e,r){return e<r},function(t,e,r,i){return i.compare(e,r)<0}),_r=dr(">",function(t,e,r){return e>r},function(t,e,r,i){return i.compare(e,r)>0}),vr=dr("<=",function(t,e,r){return e<=r},function(t,e,r,i){return i.compare(e,r)<=0}),xr=dr(">=",function(t,e,r){return e>=r},function(t,e,r,i){return i.compare(e,r)>=0}),br=function(t,e,r,i,n){this.type=Bt,this.number=t,this.locale=e,this.currency=r,this.minFractionDigits=i,this.maxFractionDigits=n};br.parse=function(t,e){if(3!==t.length)return e.error("Expected two arguments.");var r=e.parse(t[1],1,Rt);if(!r)return null;var i=t[2];if("object"!=typeof i||Array.isArray(i))return e.error("NumberFormat options argument must be an object.");var n=null;if(i.locale&&!(n=e.parse(i.locale,1,Bt)))return null;var o=null;if(i.currency&&!(o=e.parse(i.currency,1,Bt)))return null;var a=null;if(i["min-fraction-digits"]&&!(a=e.parse(i["min-fraction-digits"],1,Rt)))return null;var s=null;return i["max-fraction-digits"]&&!(s=e.parse(i["max-fraction-digits"],1,Rt))?null:new br(r,n,o,a,s)},br.prototype.evaluate=function(t){return new Intl.NumberFormat(this.locale?this.locale.evaluate(t):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(t):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(t):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(t):void 0}).format(this.number.evaluate(t))},br.prototype.eachChild=function(t){t(this.number),this.locale&&t(this.locale),this.currency&&t(this.currency),this.minFractionDigits&&t(this.minFractionDigits),this.maxFractionDigits&&t(this.maxFractionDigits)},br.prototype.outputDefined=function(){return!1},br.prototype.serialize=function(){var t={};return this.locale&&(t.locale=this.locale.serialize()),this.currency&&(t.currency=this.currency.serialize()),this.minFractionDigits&&(t["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(t["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),t]};var wr=function(t){this.type=Rt,this.input=t};wr.parse=function(t,e){if(2!==t.length)return e.error("Expected 1 argument, but found "+(t.length-1)+" instead.");var r=e.parse(t[1],1);return r?"array"!==r.type.kind&&"string"!==r.type.kind&&"value"!==r.type.kind?e.error("Expected argument of type string or array, but found "+Gt(r.type)+" instead."):new wr(r):null},wr.prototype.evaluate=function(t){var e=this.input.evaluate(t);if("string"==typeof e)return e.length;if(Array.isArray(e))return e.length;throw new se("Expected value to be of type string or array, but found "+Gt(ne(e))+" instead.")},wr.prototype.eachChild=function(t){t(this.input)},wr.prototype.outputDefined=function(){return!1},wr.prototype.serialize=function(){var t=["length"];return this.eachChild(function(e){t.push(e.serialize())}),t};var Sr={"==":mr,"!=":yr,">":_r,"<":gr,">=":xr,"<=":vr,array:ue,at:ar,boolean:ue,case:cr,coalesce:nr,collator:ge,format:ce,image:pe,in:sr,"index-of":lr,interpolate:rr,"interpolate-hcl":rr,"interpolate-lab":rr,length:wr,let:or,literal:ae,match:ur,number:ue,"number-format":br,object:ue,slice:pr,step:Ve,string:ue,"to-boolean":fe,"to-color":fe,"to-number":fe,"to-string":fe,var:Fe,within:De};function Tr(t,e){var r=e[0],i=e[1],n=e[2],o=e[3];r=r.evaluate(t),i=i.evaluate(t),n=n.evaluate(t);var a=o?o.evaluate(t):1,s=re(r,i,n,a);if(s)throw new se(s);return new Yt(r/255*a,i/255*a,n/255*a,a)}function Ir(t,e){return t in e}function Er(t,e){var r=e[t];return void 0===r?null:r}function Ar(t){return{type:t}}function zr(t){return{result:"success",value:t}}function Pr(t){return{result:"error",value:t}}function Cr(t){return"data-driven"===t["property-type"]||"cross-faded-data-driven"===t["property-type"]}function kr(t){return!!t.expression&&t.expression.parameters.indexOf("zoom")>-1}function Mr(t){return!!t.expression&&t.expression.interpolated}function Dr(t){return t instanceof Number?"number":t instanceof String?"string":t instanceof Boolean?"boolean":Array.isArray(t)?"array":null===t?"null":typeof t}function Lr(t){return"object"==typeof t&&null!==t&&!Array.isArray(t)}function Rr(t){return t}function Br(t,e,r){return void 0!==t?t:void 0!==e?e:void 0!==r?r:void 0}function Fr(t,e,r,i,n){return Br(typeof r===n?i[r]:void 0,t.default,e.default)}function Or(t,e,r){if("number"!==Dr(r))return Br(t.default,e.default);var i=t.stops.length;if(1===i)return t.stops[0][1];if(r<=t.stops[0][0])return t.stops[0][1];if(r>=t.stops[i-1][0])return t.stops[i-1][1];var n=Ue(t.stops.map(function(t){return t[0]}),r);return t.stops[n][1]}function Ur(t,e,r){var i=void 0!==t.base?t.base:1;if("number"!==Dr(r))return Br(t.default,e.default);var n=t.stops.length;if(1===n)return t.stops[0][1];if(r<=t.stops[0][0])return t.stops[0][1];if(r>=t.stops[n-1][0])return t.stops[n-1][1];var o=Ue(t.stops.map(function(t){return t[0]}),r),a=function(t,e,r,i){var n=i-r,o=t-r;return 0===n?0:1===e?o/n:(Math.pow(e,o)-1)/(Math.pow(e,n)-1)}(r,i,t.stops[o][0],t.stops[o+1][0]),s=t.stops[o][1],l=t.stops[o+1][1],u=je[e.type]||Rr;if(t.colorSpace&&"rgb"!==t.colorSpace){var c=er[t.colorSpace];u=function(t,e){return c.reverse(c.interpolate(c.forward(t),c.forward(e),a))}}return"function"==typeof s.evaluate?{evaluate:function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var r=s.evaluate.apply(void 0,t),i=l.evaluate.apply(void 0,t);if(void 0!==r&&void 0!==i)return u(r,i,a)}}:u(s,l,a)}function Vr(t,e,r){return"color"===e.type?r=Yt.parse(r):"formatted"===e.type?r=te.fromString(r.toString()):"resolvedImage"===e.type?r=ee.fromString(r.toString()):Dr(r)===e.type||"enum"===e.type&&e.values[r]||(r=void 0),Br(r,t.default,e.default)}ye.register(Sr,{error:[{kind:"error"},[Bt],function(t,e){throw new se(e[0].evaluate(t))}],typeof:[Bt,[Vt],function(t,e){return Gt(ne(e[0].evaluate(t)))}],"to-rgba":[Zt(Rt,4),[Ot],function(t,e){return e[0].evaluate(t).toArray()}],rgb:[Ot,[Rt,Rt,Rt],Tr],rgba:[Ot,[Rt,Rt,Rt,Rt],Tr],has:{type:Ft,overloads:[[[Bt],function(t,e){return Ir(e[0].evaluate(t),t.properties())}],[[Bt,Ut],function(t,e){var r=e[1];return Ir(e[0].evaluate(t),r.evaluate(t))}]]},get:{type:Vt,overloads:[[[Bt],function(t,e){return Er(e[0].evaluate(t),t.properties())}],[[Bt,Ut],function(t,e){var r=e[1];return Er(e[0].evaluate(t),r.evaluate(t))}]]},"feature-state":[Vt,[Bt],function(t,e){return Er(e[0].evaluate(t),t.featureState||{})}],properties:[Ut,[],function(t){return t.properties()}],"geometry-type":[Bt,[],function(t){return t.geometryType()}],id:[Vt,[],function(t){return t.id()}],zoom:[Rt,[],function(t){return t.globals.zoom}],"heatmap-density":[Rt,[],function(t){return t.globals.heatmapDensity||0}],"line-progress":[Rt,[],function(t){return t.globals.lineProgress||0}],accumulated:[Vt,[],function(t){return void 0===t.globals.accumulated?null:t.globals.accumulated}],"+":[Rt,Ar(Rt),function(t,e){for(var r=0,i=0,n=e;i<n.length;i+=1)r+=n[i].evaluate(t);return r}],"*":[Rt,Ar(Rt),function(t,e){for(var r=1,i=0,n=e;i<n.length;i+=1)r*=n[i].evaluate(t);return r}],"-":{type:Rt,overloads:[[[Rt,Rt],function(t,e){var r=e[1];return e[0].evaluate(t)-r.evaluate(t)}],[[Rt],function(t,e){return-e[0].evaluate(t)}]]},"/":[Rt,[Rt,Rt],function(t,e){var r=e[1];return e[0].evaluate(t)/r.evaluate(t)}],"%":[Rt,[Rt,Rt],function(t,e){var r=e[1];return e[0].evaluate(t)%r.evaluate(t)}],ln2:[Rt,[],function(){return Math.LN2}],pi:[Rt,[],function(){return Math.PI}],e:[Rt,[],function(){return Math.E}],"^":[Rt,[Rt,Rt],function(t,e){var r=e[1];return Math.pow(e[0].evaluate(t),r.evaluate(t))}],sqrt:[Rt,[Rt],function(t,e){return Math.sqrt(e[0].evaluate(t))}],log10:[Rt,[Rt],function(t,e){return Math.log(e[0].evaluate(t))/Math.LN10}],ln:[Rt,[Rt],function(t,e){return Math.log(e[0].evaluate(t))}],log2:[Rt,[Rt],function(t,e){return Math.log(e[0].evaluate(t))/Math.LN2}],sin:[Rt,[Rt],function(t,e){return Math.sin(e[0].evaluate(t))}],cos:[Rt,[Rt],function(t,e){return Math.cos(e[0].evaluate(t))}],tan:[Rt,[Rt],function(t,e){return Math.tan(e[0].evaluate(t))}],asin:[Rt,[Rt],function(t,e){return Math.asin(e[0].evaluate(t))}],acos:[Rt,[Rt],function(t,e){return Math.acos(e[0].evaluate(t))}],atan:[Rt,[Rt],function(t,e){return Math.atan(e[0].evaluate(t))}],min:[Rt,Ar(Rt),function(t,e){return Math.min.apply(Math,e.map(function(e){return e.evaluate(t)}))}],max:[Rt,Ar(Rt),function(t,e){return Math.max.apply(Math,e.map(function(e){return e.evaluate(t)}))}],abs:[Rt,[Rt],function(t,e){return Math.abs(e[0].evaluate(t))}],round:[Rt,[Rt],function(t,e){var r=e[0].evaluate(t);return r<0?-Math.round(-r):Math.round(r)}],floor:[Rt,[Rt],function(t,e){return Math.floor(e[0].evaluate(t))}],ceil:[Rt,[Rt],function(t,e){return Math.ceil(e[0].evaluate(t))}],"filter-==":[Ft,[Bt,Vt],function(t,e){var r=e[0],i=e[1];return t.properties()[r.value]===i.value}],"filter-id-==":[Ft,[Vt],function(t,e){var r=e[0];return t.id()===r.value}],"filter-type-==":[Ft,[Bt],function(t,e){var r=e[0];return t.geometryType()===r.value}],"filter-<":[Ft,[Bt,Vt],function(t,e){var r=e[0],i=e[1],n=t.properties()[r.value],o=i.value;return typeof n==typeof o&&n<o}],"filter-id-<":[Ft,[Vt],function(t,e){var r=e[0],i=t.id(),n=r.value;return typeof i==typeof n&&i<n}],"filter->":[Ft,[Bt,Vt],function(t,e){var r=e[0],i=e[1],n=t.properties()[r.value],o=i.value;return typeof n==typeof o&&n>o}],"filter-id->":[Ft,[Vt],function(t,e){var r=e[0],i=t.id(),n=r.value;return typeof i==typeof n&&i>n}],"filter-<=":[Ft,[Bt,Vt],function(t,e){var r=e[0],i=e[1],n=t.properties()[r.value],o=i.value;return typeof n==typeof o&&n<=o}],"filter-id-<=":[Ft,[Vt],function(t,e){var r=e[0],i=t.id(),n=r.value;return typeof i==typeof n&&i<=n}],"filter->=":[Ft,[Bt,Vt],function(t,e){var r=e[0],i=e[1],n=t.properties()[r.value],o=i.value;return typeof n==typeof o&&n>=o}],"filter-id->=":[Ft,[Vt],function(t,e){var r=e[0],i=t.id(),n=r.value;return typeof i==typeof n&&i>=n}],"filter-has":[Ft,[Vt],function(t,e){return e[0].value in t.properties()}],"filter-has-id":[Ft,[],function(t){return null!==t.id()&&void 0!==t.id()}],"filter-type-in":[Ft,[Zt(Bt)],function(t,e){return e[0].value.indexOf(t.geometryType())>=0}],"filter-id-in":[Ft,[Zt(Vt)],function(t,e){return e[0].value.indexOf(t.id())>=0}],"filter-in-small":[Ft,[Bt,Zt(Vt)],function(t,e){var r=e[0];return e[1].value.indexOf(t.properties()[r.value])>=0}],"filter-in-large":[Ft,[Bt,Zt(Vt)],function(t,e){var r=e[0],i=e[1];return function(t,e,r,i){for(;r<=i;){var n=r+i>>1;if(e[n]===t)return!0;e[n]>t?i=n-1:r=n+1}return!1}(t.properties()[r.value],i.value,0,i.value.length-1)}],all:{type:Ft,overloads:[[[Ft,Ft],function(t,e){var r=e[1];return e[0].evaluate(t)&&r.evaluate(t)}],[Ar(Ft),function(t,e){for(var r=0,i=e;r<i.length;r+=1)if(!i[r].evaluate(t))return!1;return!0}]]},any:{type:Ft,overloads:[[[Ft,Ft],function(t,e){var r=e[1];return e[0].evaluate(t)||r.evaluate(t)}],[Ar(Ft),function(t,e){for(var r=0,i=e;r<i.length;r+=1)if(i[r].evaluate(t))return!0;return!1}]]},"!":[Ft,[Ft],function(t,e){return!e[0].evaluate(t)}],"is-supported-script":[Ft,[Bt],function(t,e){var r=t.globals&&t.globals.isSupportedScript;return!r||r(e[0].evaluate(t))}],upcase:[Bt,[Bt],function(t,e){return e[0].evaluate(t).toUpperCase()}],downcase:[Bt,[Bt],function(t,e){return e[0].evaluate(t).toLowerCase()}],concat:[Bt,Ar(Vt),function(t,e){return e.map(function(e){return oe(e.evaluate(t))}).join("")}],"resolved-locale":[Bt,[Nt],function(t,e){return e[0].evaluate(t).resolvedLocale()}]});var Nr=function(t,e){this.expression=t,this._warningHistory={},this._evaluator=new me,this._defaultValue=e?function(t){return"color"===t.type&&Lr(t.default)?new Yt(0,0,0,0):"color"===t.type?Yt.parse(t.default)||null:void 0===t.default?null:t.default}(e):null,this._enumValues=e&&"enum"===e.type?e.values:null};function jr(t){return Array.isArray(t)&&t.length>0&&"string"==typeof t[0]&&t[0]in Sr}function qr(t,e){var r=new Oe(Sr,[],e?function(t){var e={color:Ot,string:Bt,number:Rt,enum:Bt,boolean:Ft,formatted:jt,resolvedImage:qt};return"array"===t.type?Zt(e[t.value]||Vt,t.length):e[t.type]}(e):void 0),i=r.parse(t,void 0,void 0,void 0,e&&"string"===e.type?{typeAnnotation:"coerce"}:void 0);return i?zr(new Nr(i,e)):Pr(r.errors)}Nr.prototype.evaluateWithoutErrorHandling=function(t,e,r,i,n,o){return this._evaluator.globals=t,this._evaluator.feature=e,this._evaluator.featureState=r,this._evaluator.canonical=i,this._evaluator.availableImages=n||null,this._evaluator.formattedSection=o,this.expression.evaluate(this._evaluator)},Nr.prototype.evaluate=function(t,e,r,i,n,o){this._evaluator.globals=t,this._evaluator.feature=e||null,this._evaluator.featureState=r||null,this._evaluator.canonical=i,this._evaluator.availableImages=n||null,this._evaluator.formattedSection=o||null;try{var a=this.expression.evaluate(this._evaluator);if(null==a||"number"==typeof a&&a!=a)return this._defaultValue;if(this._enumValues&&!(a in this._enumValues))throw new se("Expected value to be one of "+Object.keys(this._enumValues).map(function(t){return JSON.stringify(t)}).join(", ")+", but found "+JSON.stringify(a)+" instead.");return a}catch(t){return this._warningHistory[t.message]||(this._warningHistory[t.message]=!0,"undefined"!=typeof console&&console.warn(t.message)),this._defaultValue}};var Zr=function(t,e){this.kind=t,this._styleExpression=e,this.isStateDependent="constant"!==t&&!Re(e.expression)};Zr.prototype.evaluateWithoutErrorHandling=function(t,e,r,i,n,o){return this._styleExpression.evaluateWithoutErrorHandling(t,e,r,i,n,o)},Zr.prototype.evaluate=function(t,e,r,i,n,o){return this._styleExpression.evaluate(t,e,r,i,n,o)};var Gr=function(t,e,r,i){this.kind=t,this.zoomStops=r,this._styleExpression=e,this.isStateDependent="camera"!==t&&!Re(e.expression),this.interpolationType=i};function Xr(t,e){if("error"===(t=qr(t,e)).result)return t;var r=t.value.expression,i=Le(r);if(!i&&!Cr(e))return Pr([new Mt("","data expressions not supported")]);var n=Be(r,["zoom"]);if(!n&&!kr(e))return Pr([new Mt("","zoom expressions not supported")]);var o=function t(e){var r=null;if(e instanceof or)r=t(e.result);else if(e instanceof nr)for(var i=0,n=e.args;i<n.length&&!(r=t(n[i]));i+=1);else(e instanceof Ve||e instanceof rr)&&e.input instanceof ye&&"zoom"===e.input.name&&(r=e);return r instanceof Mt||e.eachChild(function(e){var i=t(e);i instanceof Mt?r=i:!r&&i?r=new Mt("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):r&&i&&r!==i&&(r=new Mt("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),r}(r);return o||n?o instanceof Mt?Pr([o]):o instanceof rr&&!Mr(e)?Pr([new Mt("",'"interpolate" expressions cannot be used with this property')]):zr(o?new Gr(i?"camera":"composite",t.value,o.labels,o instanceof rr?o.interpolation:void 0):new Zr(i?"constant":"source",t.value)):Pr([new Mt("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}Gr.prototype.evaluateWithoutErrorHandling=function(t,e,r,i,n,o){return this._styleExpression.evaluateWithoutErrorHandling(t,e,r,i,n,o)},Gr.prototype.evaluate=function(t,e,r,i,n,o){return this._styleExpression.evaluate(t,e,r,i,n,o)},Gr.prototype.interpolationFactor=function(t,e,r){return this.interpolationType?rr.interpolationFactor(this.interpolationType,t,e,r):0};var Wr=function(t,e){this._parameters=t,this._specification=e,Pt(this,function t(e,r){var i,n,o,a="color"===r.type,s=e.stops&&"object"==typeof e.stops[0][0],l=s||!(s||void 0!==e.property),u=e.type||(Mr(r)?"exponential":"interval");if(a&&((e=Pt({},e)).stops&&(e.stops=e.stops.map(function(t){return[t[0],Yt.parse(t[1])]})),e.default=Yt.parse(e.default?e.default:r.default)),e.colorSpace&&"rgb"!==e.colorSpace&&!er[e.colorSpace])throw new Error("Unknown color space: "+e.colorSpace);if("exponential"===u)i=Ur;else if("interval"===u)i=Or;else if("categorical"===u){i=Fr,n=Object.create(null);for(var c=0,p=e.stops;c<p.length;c+=1){var h=p[c];n[h[0]]=h[1]}o=typeof e.stops[0][0]}else{if("identity"!==u)throw new Error('Unknown function type "'+u+'"');i=Vr}if(s){for(var f={},d=[],m=0;m<e.stops.length;m++){var y=e.stops[m],g=y[0].zoom;void 0===f[g]&&(f[g]={zoom:g,type:e.type,property:e.property,default:e.default,stops:[]},d.push(g)),f[g].stops.push([y[0].value,y[1]])}for(var _=[],v=0,x=d;v<x.length;v+=1){var b=x[v];_.push([f[b].zoom,t(f[b],r)])}var w={name:"linear"};return{kind:"composite",interpolationType:w,interpolationFactor:rr.interpolationFactor.bind(void 0,w),zoomStops:_.map(function(t){return t[0]}),evaluate:function(t,i){var n=t.zoom;return Ur({stops:_,base:e.base},r,n).evaluate(n,i)}}}if(l){var S="exponential"===u?{name:"exponential",base:void 0!==e.base?e.base:1}:null;return{kind:"camera",interpolationType:S,interpolationFactor:rr.interpolationFactor.bind(void 0,S),zoomStops:e.stops.map(function(t){return t[0]}),evaluate:function(t){return i(e,r,t.zoom,n,o)}}}return{kind:"source",evaluate:function(t,a){var s=a&&a.properties?a.properties[e.property]:void 0;return void 0===s?Br(e.default,r.default):i(e,r,s,n,o)}}}(this._parameters,this._specification))};function Kr(t){var e=t.key,r=t.value,i=t.valueSpec||{},n=t.objectElementValidators||{},o=t.style,a=t.styleSpec,s=[],l=Dr(r);if("object"!==l)return[new At(e,r,"object expected, "+l+" found")];for(var u in r){var c=u.split(".")[0],p=i[c]||i["*"],h=void 0;if(n[c])h=n[c];else if(i[c])h=vi;else if(n["*"])h=n["*"];else{if(!i["*"]){s.push(new At(e,r[u],'unknown property "'+u+'"'));continue}h=vi}s=s.concat(h({key:(e?e+".":e)+u,value:r[u],valueSpec:p,style:o,styleSpec:a,object:r,objectKey:u},r))}for(var f in i)n[f]||i[f].required&&void 0===i[f].default&&void 0===r[f]&&s.push(new At(e,r,'missing required property "'+f+'"'));return s}function Hr(t){var e=t.value,r=t.valueSpec,i=t.style,n=t.styleSpec,o=t.key,a=t.arrayElementValidator||vi;if("array"!==Dr(e))return[new At(o,e,"array expected, "+Dr(e)+" found")];if(r.length&&e.length!==r.length)return[new At(o,e,"array length "+r.length+" expected, length "+e.length+" found")];if(r["min-length"]&&e.length<r["min-length"])return[new At(o,e,"array length at least "+r["min-length"]+" expected, length "+e.length+" found")];var s={type:r.value,values:r.values};n.$version<7&&(s.function=r.function),"object"===Dr(r.value)&&(s=r.value);for(var l=[],u=0;u<e.length;u++)l=l.concat(a({array:e,arrayIndex:u,value:e[u],valueSpec:s,style:i,styleSpec:n,key:o+"["+u+"]"}));return l}function Jr(t){var e=t.key,r=t.value,i=t.valueSpec,n=Dr(r);return"number"===n&&r!=r&&(n="NaN"),"number"!==n?[new At(e,r,"number expected, "+n+" found")]:"minimum"in i&&r<i.minimum?[new At(e,r,r+" is less than the minimum value "+i.minimum)]:"maximum"in i&&r>i.maximum?[new At(e,r,r+" is greater than the maximum value "+i.maximum)]:[]}function Yr(t){var e,r,i,n=t.valueSpec,o=Ct(t.value.type),a={},s="categorical"!==o&&void 0===t.value.property,l=!s,u="array"===Dr(t.value.stops)&&"array"===Dr(t.value.stops[0])&&"object"===Dr(t.value.stops[0][0]),c=Kr({key:t.key,value:t.value,valueSpec:t.styleSpec.function,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{stops:function(t){if("identity"===o)return[new At(t.key,t.value,'identity function may not have a "stops" property')];var e=[],r=t.value;return e=e.concat(Hr({key:t.key,value:r,valueSpec:t.valueSpec,style:t.style,styleSpec:t.styleSpec,arrayElementValidator:p})),"array"===Dr(r)&&0===r.length&&e.push(new At(t.key,r,"array must have at least one stop")),e},default:function(t){return vi({key:t.key,value:t.value,valueSpec:n,style:t.style,styleSpec:t.styleSpec})}}});return"identity"===o&&s&&c.push(new At(t.key,t.value,'missing required property "property"')),"identity"===o||t.value.stops||c.push(new At(t.key,t.value,'missing required property "stops"')),"exponential"===o&&t.valueSpec.expression&&!Mr(t.valueSpec)&&c.push(new At(t.key,t.value,"exponential functions not supported")),t.styleSpec.$version>=8&&(l&&!Cr(t.valueSpec)?c.push(new At(t.key,t.value,"property functions not supported")):s&&!kr(t.valueSpec)&&c.push(new At(t.key,t.value,"zoom functions not supported"))),"categorical"!==o&&!u||void 0!==t.value.property||c.push(new At(t.key,t.value,'"property" property is required')),c;function p(t){var e=[],o=t.value,s=t.key;if("array"!==Dr(o))return[new At(s,o,"array expected, "+Dr(o)+" found")];if(2!==o.length)return[new At(s,o,"array length 2 expected, length "+o.length+" found")];if(u){if("object"!==Dr(o[0]))return[new At(s,o,"object expected, "+Dr(o[0])+" found")];if(void 0===o[0].zoom)return[new At(s,o,"object stop key must have zoom")];if(void 0===o[0].value)return[new At(s,o,"object stop key must have value")];if(i&&i>Ct(o[0].zoom))return[new At(s,o[0].zoom,"stop zoom values must appear in ascending order")];Ct(o[0].zoom)!==i&&(i=Ct(o[0].zoom),r=void 0,a={}),e=e.concat(Kr({key:s+"[0]",value:o[0],valueSpec:{zoom:{}},style:t.style,styleSpec:t.styleSpec,objectElementValidators:{zoom:Jr,value:h}}))}else e=e.concat(h({key:s+"[0]",value:o[0],valueSpec:{},style:t.style,styleSpec:t.styleSpec},o));return jr(kt(o[1]))?e.concat([new At(s+"[1]",o[1],"expressions are not allowed in function stops.")]):e.concat(vi({key:s+"[1]",value:o[1],valueSpec:n,style:t.style,styleSpec:t.styleSpec}))}function h(t,i){var s=Dr(t.value),l=Ct(t.value),u=null!==t.value?t.value:i;if(e){if(s!==e)return[new At(t.key,u,s+" stop domain type must match previous stop domain type "+e)]}else e=s;if("number"!==s&&"string"!==s&&"boolean"!==s)return[new At(t.key,u,"stop domain value must be a number, string, or boolean")];if("number"!==s&&"categorical"!==o){var c="number expected, "+s+" found";return Cr(n)&&void 0===o&&(c+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new At(t.key,u,c)]}return"categorical"!==o||"number"!==s||isFinite(l)&&Math.floor(l)===l?"categorical"!==o&&"number"===s&&void 0!==r&&l<r?[new At(t.key,u,"stop domain values must appear in ascending order")]:(r=l,"categorical"===o&&l in a?[new At(t.key,u,"stop domain values must be unique")]:(a[l]=!0,[])):[new At(t.key,u,"integer expected, found "+l)]}}function Qr(t){var e=("property"===t.expressionContext?Xr:qr)(kt(t.value),t.valueSpec);if("error"===e.result)return e.value.map(function(e){return new At(""+t.key+e.key,t.value,e.message)});var r=e.value.expression||e.value._styleExpression.expression;if("property"===t.expressionContext&&"text-font"===t.propertyKey&&!r.outputDefined())return[new At(t.key,t.value,'Invalid data expression for "'+t.propertyKey+'". Output values must be contained as literals within the expression.')];if("property"===t.expressionContext&&"layout"===t.propertyType&&!Re(r))return[new At(t.key,t.value,'"feature-state" data expressions are not supported with layout properties.')];if("filter"===t.expressionContext&&!Re(r))return[new At(t.key,t.value,'"feature-state" data expressions are not supported with filters.')];if(t.expressionContext&&0===t.expressionContext.indexOf("cluster")){if(!Be(r,["zoom","feature-state"]))return[new At(t.key,t.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if("cluster-initial"===t.expressionContext&&!Le(r))return[new At(t.key,t.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function $r(t){var e=t.key,r=t.value,i=t.valueSpec,n=[];return Array.isArray(i.values)?-1===i.values.indexOf(Ct(r))&&n.push(new At(e,r,"expected one of ["+i.values.join(", ")+"], "+JSON.stringify(r)+" found")):-1===Object.keys(i.values).indexOf(Ct(r))&&n.push(new At(e,r,"expected one of ["+Object.keys(i.values).join(", ")+"], "+JSON.stringify(r)+" found")),n}function ti(t){if(!0===t||!1===t)return!0;if(!Array.isArray(t)||0===t.length)return!1;switch(t[0]){case"has":return t.length>=2&&"$id"!==t[1]&&"$type"!==t[1];case"in":return t.length>=3&&("string"!=typeof t[1]||Array.isArray(t[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return 3!==t.length||Array.isArray(t[1])||Array.isArray(t[2]);case"any":case"all":for(var e=0,r=t.slice(1);e<r.length;e+=1){var i=r[e];if(!ti(i)&&"boolean"!=typeof i)return!1}return!0;default:return!0}}Wr.deserialize=function(t){return new Wr(t._parameters,t._specification)},Wr.serialize=function(t){return{_parameters:t._parameters,_specification:t._specification}};var ei={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function ri(t){if(null==t)return{filter:function(){return!0},needGeometry:!1};ti(t)||(t=ni(t));var e=qr(t,ei);if("error"===e.result)throw new Error(e.value.map(function(t){return t.key+": "+t.message}).join(", "));return{filter:function(t,r,i){return e.value.evaluate(t,r,{},i)},needGeometry:Array.isArray(t)&&0!==t.length&&"within"===t[0]}}function ii(t,e){return t<e?-1:t>e?1:0}function ni(t){if(!t)return!0;var e,r=t[0];return t.length<=1?"any"!==r:"=="===r?oi(t[1],t[2],"=="):"!="===r?li(oi(t[1],t[2],"==")):"<"===r||">"===r||"<="===r||">="===r?oi(t[1],t[2],r):"any"===r?(e=t.slice(1),["any"].concat(e.map(ni))):"all"===r?["all"].concat(t.slice(1).map(ni)):"none"===r?["all"].concat(t.slice(1).map(ni).map(li)):"in"===r?ai(t[1],t.slice(2)):"!in"===r?li(ai(t[1],t.slice(2))):"has"===r?si(t[1]):"!has"!==r||li(si(t[1]))}function oi(t,e,r){switch(t){case"$type":return["filter-type-"+r,e];case"$id":return["filter-id-"+r,e];default:return["filter-"+r,t,e]}}function ai(t,e){if(0===e.length)return!1;switch(t){case"$type":return["filter-type-in",["literal",e]];case"$id":return["filter-id-in",["literal",e]];default:return e.length>200&&!e.some(function(t){return typeof t!=typeof e[0]})?["filter-in-large",t,["literal",e.sort(ii)]]:["filter-in-small",t,["literal",e]]}}function si(t){switch(t){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",t]}}function li(t){return["!",t]}function ui(t){return ti(kt(t.value))?Qr(Pt({},t,{expressionContext:"filter",valueSpec:{value:"boolean"}})):function t(e){var r=e.value,i=e.key;if("array"!==Dr(r))return[new At(i,r,"array expected, "+Dr(r)+" found")];var n,o=e.styleSpec,a=[];if(r.length<1)return[new At(i,r,"filter array must have at least 1 element")];switch(a=a.concat($r({key:i+"[0]",value:r[0],valueSpec:o.filter_operator,style:e.style,styleSpec:e.styleSpec})),Ct(r[0])){case"<":case"<=":case">":case">=":r.length>=2&&"$type"===Ct(r[1])&&a.push(new At(i,r,'"$type" cannot be use with operator "'+r[0]+'"'));case"==":case"!=":3!==r.length&&a.push(new At(i,r,'filter array for operator "'+r[0]+'" must have 3 elements'));case"in":case"!in":r.length>=2&&"string"!==(n=Dr(r[1]))&&a.push(new At(i+"[1]",r[1],"string expected, "+n+" found"));for(var s=2;s<r.length;s++)n=Dr(r[s]),"$type"===Ct(r[1])?a=a.concat($r({key:i+"["+s+"]",value:r[s],valueSpec:o.geometry_type,style:e.style,styleSpec:e.styleSpec})):"string"!==n&&"number"!==n&&"boolean"!==n&&a.push(new At(i+"["+s+"]",r[s],"string, number, or boolean expected, "+n+" found"));break;case"any":case"all":case"none":for(var l=1;l<r.length;l++)a=a.concat(t({key:i+"["+l+"]",value:r[l],style:e.style,styleSpec:e.styleSpec}));break;case"has":case"!has":n=Dr(r[1]),2!==r.length?a.push(new At(i,r,'filter array for "'+r[0]+'" operator must have 2 elements')):"string"!==n&&a.push(new At(i+"[1]",r[1],"string expected, "+n+" found"))}return a}(t)}function ci(t,e){var r=t.key,i=t.style,n=t.styleSpec,o=t.value,a=t.objectKey,s=n[e+"_"+t.layerType];if(!s)return[];var l=a.match(/^(.*)-transition$/);if("paint"===e&&l&&s[l[1]]&&s[l[1]].transition)return vi({key:r,value:o,valueSpec:n.transition,style:i,styleSpec:n});var u,c=t.valueSpec||s[a];if(!c)return[new At(r,o,'unknown property "'+a+'"')];if("string"===Dr(o)&&Cr(c)&&!c.tokens&&(u=/^{([^}]+)}$/.exec(o)))return[new At(r,o,'"'+a+'" does not support interpolation syntax\nUse an identity property function instead: `{ "type": "identity", "property": '+JSON.stringify(u[1])+" }`.")];var p=[];return"symbol"===t.layerType&&("text-field"===a&&i&&!i.glyphs&&p.push(new At(r,o,'use of "text-field" requires a style "glyphs" property')),"text-font"===a&&Lr(kt(o))&&"identity"===Ct(o.type)&&p.push(new At(r,o,'"text-font" does not support identity functions'))),p.concat(vi({key:t.key,value:o,valueSpec:c,style:i,styleSpec:n,expressionContext:"property",propertyType:e,propertyKey:a}))}function pi(t){return ci(t,"paint")}function hi(t){return ci(t,"layout")}function fi(t){var e=[],r=t.value,i=t.key,n=t.style,o=t.styleSpec;r.type||r.ref||e.push(new At(i,r,'either "type" or "ref" is required'));var a,s=Ct(r.type),l=Ct(r.ref);if(r.id)for(var u=Ct(r.id),c=0;c<t.arrayIndex;c++){var p=n.layers[c];Ct(p.id)===u&&e.push(new At(i,r.id,'duplicate layer id "'+r.id+'", previously used at line '+p.id.__line__))}if("ref"in r)["type","source","source-layer","filter","layout"].forEach(function(t){t in r&&e.push(new At(i,r[t],'"'+t+'" is prohibited for ref layers'))}),n.layers.forEach(function(t){Ct(t.id)===l&&(a=t)}),a?a.ref?e.push(new At(i,r.ref,"ref cannot reference another ref layer")):s=Ct(a.type):e.push(new At(i,r.ref,'ref layer "'+l+'" not found'));else if("background"!==s)if(r.source){var h=n.sources&&n.sources[r.source],f=h&&Ct(h.type);h?"vector"===f&&"raster"===s?e.push(new At(i,r.source,'layer "'+r.id+'" requires a raster source')):"raster"===f&&"raster"!==s?e.push(new At(i,r.source,'layer "'+r.id+'" requires a vector source')):"vector"!==f||r["source-layer"]?"raster-dem"===f&&"hillshade"!==s?e.push(new At(i,r.source,"raster-dem source can only be used with layer type 'hillshade'.")):"line"!==s||!r.paint||!r.paint["line-gradient"]||"geojson"===f&&h.lineMetrics||e.push(new At(i,r,'layer "'+r.id+'" specifies a line-gradient, which requires a GeoJSON source with `lineMetrics` enabled.')):e.push(new At(i,r,'layer "'+r.id+'" must specify a "source-layer"')):e.push(new At(i,r.source,'source "'+r.source+'" not found'))}else e.push(new At(i,r,'missing required property "source"'));return e=e.concat(Kr({key:i,value:r,valueSpec:o.layer,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{"*":function(){return[]},type:function(){return vi({key:i+".type",value:r.type,valueSpec:o.layer.type,style:t.style,styleSpec:t.styleSpec,object:r,objectKey:"type"})},filter:ui,layout:function(t){return Kr({layer:r,key:t.key,value:t.value,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{"*":function(t){return hi(Pt({layerType:s},t))}}})},paint:function(t){return Kr({layer:r,key:t.key,value:t.value,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{"*":function(t){return pi(Pt({layerType:s},t))}}})}}}))}function di(t){var e=t.value,r=t.key,i=Dr(e);return"string"!==i?[new At(r,e,"string expected, "+i+" found")]:[]}var mi={promoteId:function(t){var e=t.key,r=t.value;if("string"===Dr(r))return di({key:e,value:r});var i=[];for(var n in r)i.push.apply(i,di({key:e+"."+n,value:r[n]}));return i}};function yi(t){var e=t.value,r=t.key,i=t.styleSpec,n=t.style;if(!e.type)return[new At(r,e,'"type" is required')];var o,a=Ct(e.type);switch(a){case"vector":case"raster":case"raster-dem":return Kr({key:r,value:e,valueSpec:i["source_"+a.replace("-","_")],style:t.style,styleSpec:i,objectElementValidators:mi});case"geojson":if(o=Kr({key:r,value:e,valueSpec:i.source_geojson,style:n,styleSpec:i,objectElementValidators:mi}),e.cluster)for(var s in e.clusterProperties){var l=e.clusterProperties[s],u=l[0],c="string"==typeof u?[u,["accumulated"],["get",s]]:u;o.push.apply(o,Qr({key:r+"."+s+".map",value:l[1],expressionContext:"cluster-map"})),o.push.apply(o,Qr({key:r+"."+s+".reduce",value:c,expressionContext:"cluster-reduce"}))}return o;case"video":return Kr({key:r,value:e,valueSpec:i.source_video,style:n,styleSpec:i});case"image":return Kr({key:r,value:e,valueSpec:i.source_image,style:n,styleSpec:i});case"canvas":return[new At(r,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return $r({key:r+".type",value:e.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:n,styleSpec:i})}}function gi(t){var e=t.value,r=t.styleSpec,i=r.light,n=t.style,o=[],a=Dr(e);if(void 0===e)return o;if("object"!==a)return o.concat([new At("light",e,"object expected, "+a+" found")]);for(var s in e){var l=s.match(/^(.*)-transition$/);o=o.concat(l&&i[l[1]]&&i[l[1]].transition?vi({key:s,value:e[s],valueSpec:r.transition,style:n,styleSpec:r}):i[s]?vi({key:s,value:e[s],valueSpec:i[s],style:n,styleSpec:r}):[new At(s,e[s],'unknown property "'+s+'"')])}return o}var _i={"*":function(){return[]},array:Hr,boolean:function(t){var e=t.value,r=t.key,i=Dr(e);return"boolean"!==i?[new At(r,e,"boolean expected, "+i+" found")]:[]},number:Jr,color:function(t){var e=t.key,r=t.value,i=Dr(r);return"string"!==i?[new At(e,r,"color expected, "+i+" found")]:null===Jt(r)?[new At(e,r,'color expected, "'+r+'" found')]:[]},constants:zt,enum:$r,filter:ui,function:Yr,layer:fi,object:Kr,source:yi,light:gi,string:di,formatted:function(t){return 0===di(t).length?[]:Qr(t)},resolvedImage:function(t){return 0===di(t).length?[]:Qr(t)}};function vi(t){var e=t.value,r=t.valueSpec,i=t.styleSpec;return r.expression&&Lr(Ct(e))?Yr(t):r.expression&&jr(kt(e))?Qr(t):r.type&&_i[r.type]?_i[r.type](t):Kr(Pt({},t,{valueSpec:r.type?i[r.type]:r}))}function xi(t){var e=t.value,r=t.key,i=di(t);return i.length||(-1===e.indexOf("{fontstack}")&&i.push(new At(r,e,'"glyphs" url must include a "{fontstack}" token')),-1===e.indexOf("{range}")&&i.push(new At(r,e,'"glyphs" url must include a "{range}" token'))),i}function bi(t,e){void 0===e&&(e=Et);var r=[];return r=r.concat(vi({key:"",value:t,valueSpec:e.$root,styleSpec:e,style:t,objectElementValidators:{glyphs:xi,"*":function(){return[]}}})),t.constants&&(r=r.concat(zt({key:"constants",value:t.constants,style:t,styleSpec:e}))),wi(r)}function wi(t){return[].concat(t).sort(function(t,e){return t.line-e.line})}function Si(t){return function(){for(var e=[],r=arguments.length;r--;)e[r]=arguments[r];return wi(t.apply(this,e))}}bi.source=Si(yi),bi.light=Si(gi),bi.layer=Si(fi),bi.filter=Si(ui),bi.paintProperty=Si(pi),bi.layoutProperty=Si(hi);var Ti=bi,Ii=Ti.light,Ei=Ti.paintProperty,Ai=Ti.layoutProperty;function zi(t,e){var r=!1;if(e&&e.length)for(var i=0,n=e;i<n.length;i+=1)t.fire(new Tt(new Error(n[i].message))),r=!0;return r}var Pi=Ci;function Ci(t,e,r){var i=this.cells=[];if(t instanceof ArrayBuffer){this.arrayBuffer=t;var n=new Int32Array(this.arrayBuffer);t=n[0],this.d=(e=n[1])+2*(r=n[2]);for(var o=0;o<this.d*this.d;o++){var a=n[3+o],s=n[3+o+1];i.push(a===s?null:n.subarray(a,s))}var l=n[3+i.length+1];this.keys=n.subarray(n[3+i.length],l),this.bboxes=n.subarray(l),this.insert=this._insertReadonly}else{this.d=e+2*r;for(var u=0;u<this.d*this.d;u++)i.push([]);this.keys=[],this.bboxes=[]}this.n=e,this.extent=t,this.padding=r,this.scale=e/t,this.uid=0;var c=r/e*t;this.min=-c,this.max=t+c}Ci.prototype.insert=function(t,e,r,i,n){this._forEachCell(e,r,i,n,this._insertCell,this.uid++),this.keys.push(t),this.bboxes.push(e),this.bboxes.push(r),this.bboxes.push(i),this.bboxes.push(n)},Ci.prototype._insertReadonly=function(){throw"Cannot insert into a GridIndex created from an ArrayBuffer."},Ci.prototype._insertCell=function(t,e,r,i,n,o){this.cells[n].push(o)},Ci.prototype.query=function(t,e,r,i,n){var o=this.min,a=this.max;if(t<=o&&e<=o&&a<=r&&a<=i&&!n)return Array.prototype.slice.call(this.keys);var s=[];return this._forEachCell(t,e,r,i,this._queryCell,s,{},n),s},Ci.prototype._queryCell=function(t,e,r,i,n,o,a,s){var l=this.cells[n];if(null!==l)for(var u=this.keys,c=this.bboxes,p=0;p<l.length;p++){var h=l[p];if(void 0===a[h]){var f=4*h;(s?s(c[f+0],c[f+1],c[f+2],c[f+3]):t<=c[f+2]&&e<=c[f+3]&&r>=c[f+0]&&i>=c[f+1])?(a[h]=!0,o.push(u[h])):a[h]=!1}}},Ci.prototype._forEachCell=function(t,e,r,i,n,o,a,s){for(var l=this._convertToCellCoord(t),u=this._convertToCellCoord(e),c=this._convertToCellCoord(r),p=this._convertToCellCoord(i),h=l;h<=c;h++)for(var f=u;f<=p;f++){var d=this.d*f+h;if((!s||s(this._convertFromCellCoord(h),this._convertFromCellCoord(f),this._convertFromCellCoord(h+1),this._convertFromCellCoord(f+1)))&&n.call(this,t,e,r,i,d,o,a,s))return}},Ci.prototype._convertFromCellCoord=function(t){return(t-this.padding)/this.scale},Ci.prototype._convertToCellCoord=function(t){return Math.max(0,Math.min(this.d-1,Math.floor(t*this.scale)+this.padding))},Ci.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var t=this.cells,e=3+this.cells.length+1+1,r=0,i=0;i<this.cells.length;i++)r+=this.cells[i].length;var n=new Int32Array(e+r+this.keys.length+this.bboxes.length);n[0]=this.extent,n[1]=this.n,n[2]=this.padding;for(var o=e,a=0;a<t.length;a++){var s=t[a];n[3+a]=o,n.set(s,o),o+=s.length}return n[3+t.length]=o,n.set(this.keys,o),n[3+t.length+1]=o+=this.keys.length,n.set(this.bboxes,o),o+=this.bboxes.length,n.buffer};var ki=self.ImageData,Mi=self.ImageBitmap,Di={};function Li(t,e,r){void 0===r&&(r={}),Object.defineProperty(e,"_classRegistryKey",{value:t,writeable:!1}),Di[t]={klass:e,omit:r.omit||[],shallow:r.shallow||[]}}for(var Ri in Li("Object",Object),Pi.serialize=function(t,e){var r=t.toArrayBuffer();return e&&e.push(r),{buffer:r}},Pi.deserialize=function(t){return new Pi(t.buffer)},Li("Grid",Pi),Li("Color",Yt),Li("Error",Error),Li("ResolvedImage",ee),Li("StylePropertyFunction",Wr),Li("StyleExpression",Nr,{omit:["_evaluator"]}),Li("ZoomDependentExpression",Gr),Li("ZoomConstantExpression",Zr),Li("CompoundExpression",ye,{omit:["_evaluate"]}),Sr)Sr[Ri]._classRegistryKey||Li("Expression_"+Ri,Sr[Ri]);function Bi(t){return t&&"undefined"!=typeof ArrayBuffer&&(t instanceof ArrayBuffer||t.constructor&&"ArrayBuffer"===t.constructor.name)}function Fi(t){return Mi&&t instanceof Mi}function Oi(t,e){if(null==t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||t instanceof Boolean||t instanceof Number||t instanceof String||t instanceof Date||t instanceof RegExp)return t;if(Bi(t)||Fi(t))return e&&e.push(t),t;if(ArrayBuffer.isView(t)){var r=t;return e&&e.push(r.buffer),r}if(t instanceof ki)return e&&e.push(t.data.buffer),t;if(Array.isArray(t)){for(var i=[],n=0,o=t;n<o.length;n+=1)i.push(Oi(o[n],e));return i}if("object"==typeof t){var a=t.constructor,s=a._classRegistryKey;if(!s)throw new Error("can't serialize object of unregistered class");var l=a.serialize?a.serialize(t,e):{};if(!a.serialize){for(var u in t)if(t.hasOwnProperty(u)&&!(Di[s].omit.indexOf(u)>=0)){var c=t[u];l[u]=Di[s].shallow.indexOf(u)>=0?c:Oi(c,e)}t instanceof Error&&(l.message=t.message)}if(l.$name)throw new Error("$name property is reserved for worker serialization logic.");return"Object"!==s&&(l.$name=s),l}throw new Error("can't serialize object of type "+typeof t)}function Ui(t){if(null==t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||t instanceof Boolean||t instanceof Number||t instanceof String||t instanceof Date||t instanceof RegExp||Bi(t)||Fi(t)||ArrayBuffer.isView(t)||t instanceof ki)return t;if(Array.isArray(t))return t.map(Ui);if("object"==typeof t){var e=t.$name||"Object",r=Di[e].klass;if(!r)throw new Error("can't deserialize unregistered class "+e);if(r.deserialize)return r.deserialize(t);for(var i=Object.create(r.prototype),n=0,o=Object.keys(t);n<o.length;n+=1){var a=o[n];if("$name"!==a){var s=t[a];i[a]=Di[e].shallow.indexOf(a)>=0?s:Ui(s)}}return i}throw new Error("can't deserialize object of type "+typeof t)}var Vi=function(){this.first=!0};Vi.prototype.update=function(t,e){var r=Math.floor(t);return this.first?(this.first=!1,this.lastIntegerZoom=r,this.lastIntegerZoomTime=0,this.lastZoom=t,this.lastFloorZoom=r,!0):(this.lastFloorZoom>r?(this.lastIntegerZoom=r+1,this.lastIntegerZoomTime=e):this.lastFloorZoom<r&&(this.lastIntegerZoom=r,this.lastIntegerZoomTime=e),t!==this.lastZoom&&(this.lastZoom=t,this.lastFloorZoom=r,!0))};var Ni={"Latin-1 Supplement":function(t){return t>=128&&t<=255},Arabic:function(t){return t>=1536&&t<=1791},"Arabic Supplement":function(t){return t>=1872&&t<=1919},"Arabic Extended-A":function(t){return t>=2208&&t<=2303},"Hangul Jamo":function(t){return t>=4352&&t<=4607},"Unified Canadian Aboriginal Syllabics":function(t){return t>=5120&&t<=5759},Khmer:function(t){return t>=6016&&t<=6143},"Unified Canadian Aboriginal Syllabics Extended":function(t){return t>=6320&&t<=6399},"General Punctuation":function(t){return t>=8192&&t<=8303},"Letterlike Symbols":function(t){return t>=8448&&t<=8527},"Number Forms":function(t){return t>=8528&&t<=8591},"Miscellaneous Technical":function(t){return t>=8960&&t<=9215},"Control Pictures":function(t){return t>=9216&&t<=9279},"Optical Character Recognition":function(t){return t>=9280&&t<=9311},"Enclosed Alphanumerics":function(t){return t>=9312&&t<=9471},"Geometric Shapes":function(t){return t>=9632&&t<=9727},"Miscellaneous Symbols":function(t){return t>=9728&&t<=9983},"Miscellaneous Symbols and Arrows":function(t){return t>=11008&&t<=11263},"CJK Radicals Supplement":function(t){return t>=11904&&t<=12031},"Kangxi Radicals":function(t){return t>=12032&&t<=12255},"Ideographic Description Characters":function(t){return t>=12272&&t<=12287},"CJK Symbols and Punctuation":function(t){return t>=12288&&t<=12351},Hiragana:function(t){return t>=12352&&t<=12447},Katakana:function(t){return t>=12448&&t<=12543},Bopomofo:function(t){return t>=12544&&t<=12591},"Hangul Compatibility Jamo":function(t){return t>=12592&&t<=12687},Kanbun:function(t){return t>=12688&&t<=12703},"Bopomofo Extended":function(t){return t>=12704&&t<=12735},"CJK Strokes":function(t){return t>=12736&&t<=12783},"Katakana Phonetic Extensions":function(t){return t>=12784&&t<=12799},"Enclosed CJK Letters and Months":function(t){return t>=12800&&t<=13055},"CJK Compatibility":function(t){return t>=13056&&t<=13311},"CJK Unified Ideographs Extension A":function(t){return t>=13312&&t<=19903},"Yijing Hexagram Symbols":function(t){return t>=19904&&t<=19967},"CJK Unified Ideographs":function(t){return t>=19968&&t<=40959},"Yi Syllables":function(t){return t>=40960&&t<=42127},"Yi Radicals":function(t){return t>=42128&&t<=42191},"Hangul Jamo Extended-A":function(t){return t>=43360&&t<=43391},"Hangul Syllables":function(t){return t>=44032&&t<=55215},"Hangul Jamo Extended-B":function(t){return t>=55216&&t<=55295},"Private Use Area":function(t){return t>=57344&&t<=63743},"CJK Compatibility Ideographs":function(t){return t>=63744&&t<=64255},"Arabic Presentation Forms-A":function(t){return t>=64336&&t<=65023},"Vertical Forms":function(t){return t>=65040&&t<=65055},"CJK Compatibility Forms":function(t){return t>=65072&&t<=65103},"Small Form Variants":function(t){return t>=65104&&t<=65135},"Arabic Presentation Forms-B":function(t){return t>=65136&&t<=65279},"Halfwidth and Fullwidth Forms":function(t){return t>=65280&&t<=65519}};function ji(t){for(var e=0,r=t;e<r.length;e+=1)if(qi(r[e].charCodeAt(0)))return!0;return!1}function qi(t){return!(746!==t&&747!==t&&(t<4352||!(Ni["Bopomofo Extended"](t)||Ni.Bopomofo(t)||Ni["CJK Compatibility Forms"](t)&&!(t>=65097&&t<=65103)||Ni["CJK Compatibility Ideographs"](t)||Ni["CJK Compatibility"](t)||Ni["CJK Radicals Supplement"](t)||Ni["CJK Strokes"](t)||!(!Ni["CJK Symbols and Punctuation"](t)||t>=12296&&t<=12305||t>=12308&&t<=12319||12336===t)||Ni["CJK Unified Ideographs Extension A"](t)||Ni["CJK Unified Ideographs"](t)||Ni["Enclosed CJK Letters and Months"](t)||Ni["Hangul Compatibility Jamo"](t)||Ni["Hangul Jamo Extended-A"](t)||Ni["Hangul Jamo Extended-B"](t)||Ni["Hangul Jamo"](t)||Ni["Hangul Syllables"](t)||Ni.Hiragana(t)||Ni["Ideographic Description Characters"](t)||Ni.Kanbun(t)||Ni["Kangxi Radicals"](t)||Ni["Katakana Phonetic Extensions"](t)||Ni.Katakana(t)&&12540!==t||!(!Ni["Halfwidth and Fullwidth Forms"](t)||65288===t||65289===t||65293===t||t>=65306&&t<=65310||65339===t||65341===t||65343===t||t>=65371&&t<=65503||65507===t||t>=65512&&t<=65519)||!(!Ni["Small Form Variants"](t)||t>=65112&&t<=65118||t>=65123&&t<=65126)||Ni["Unified Canadian Aboriginal Syllabics"](t)||Ni["Unified Canadian Aboriginal Syllabics Extended"](t)||Ni["Vertical Forms"](t)||Ni["Yijing Hexagram Symbols"](t)||Ni["Yi Syllables"](t)||Ni["Yi Radicals"](t))))}function Zi(t){return!(qi(t)||function(t){return!!(Ni["Latin-1 Supplement"](t)&&(167===t||169===t||174===t||177===t||188===t||189===t||190===t||215===t||247===t)||Ni["General Punctuation"](t)&&(8214===t||8224===t||8225===t||8240===t||8241===t||8251===t||8252===t||8258===t||8263===t||8264===t||8265===t||8273===t)||Ni["Letterlike Symbols"](t)||Ni["Number Forms"](t)||Ni["Miscellaneous Technical"](t)&&(t>=8960&&t<=8967||t>=8972&&t<=8991||t>=8996&&t<=9e3||9003===t||t>=9085&&t<=9114||t>=9150&&t<=9165||9167===t||t>=9169&&t<=9179||t>=9186&&t<=9215)||Ni["Control Pictures"](t)&&9251!==t||Ni["Optical Character Recognition"](t)||Ni["Enclosed Alphanumerics"](t)||Ni["Geometric Shapes"](t)||Ni["Miscellaneous Symbols"](t)&&!(t>=9754&&t<=9759)||Ni["Miscellaneous Symbols and Arrows"](t)&&(t>=11026&&t<=11055||t>=11088&&t<=11097||t>=11192&&t<=11243)||Ni["CJK Symbols and Punctuation"](t)||Ni.Katakana(t)||Ni["Private Use Area"](t)||Ni["CJK Compatibility Forms"](t)||Ni["Small Form Variants"](t)||Ni["Halfwidth and Fullwidth Forms"](t)||8734===t||8756===t||8757===t||t>=9984&&t<=10087||t>=10102&&t<=10131||65532===t||65533===t)}(t))}function Gi(t){return t>=1424&&t<=2303||Ni["Arabic Presentation Forms-A"](t)||Ni["Arabic Presentation Forms-B"](t)}function Xi(t,e){return!(!e&&Gi(t)||t>=2304&&t<=3583||t>=3840&&t<=4255||Ni.Khmer(t))}function Wi(t){for(var e=0,r=t;e<r.length;e+=1)if(Gi(r[e].charCodeAt(0)))return!0;return!1}var Ki=null,Hi="unavailable",Ji=null,Yi=function(t){t&&"string"==typeof t&&t.indexOf("NetworkError")>-1&&(Hi="error"),Ki&&Ki(t)};function Qi(){$i.fire(new St("pluginStateChange",{pluginStatus:Hi,pluginURL:Ji}))}var $i=new It,tn=function(){return Hi},en=function(){if("deferred"!==Hi||!Ji)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");Hi="loading",Qi(),Ji&&_t({url:Ji},function(t){t?Yi(t):(Hi="loaded",Qi())})},rn={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return"loaded"===Hi||null!=rn.applyArabicShaping},isLoading:function(){return"loading"===Hi},setState:function(t){Hi=t.pluginStatus,Ji=t.pluginURL},isParsed:function(){return null!=rn.applyArabicShaping&&null!=rn.processBidirectionalText&&null!=rn.processStyledBidirectionalText},getPluginURL:function(){return Ji}},nn=function(t,e){this.zoom=t,e?(this.now=e.now,this.fadeDuration=e.fadeDuration,this.zoomHistory=e.zoomHistory,this.transition=e.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Vi,this.transition={})};nn.prototype.isSupportedScript=function(t){return function(t,e){for(var r=0,i=t;r<i.length;r+=1)if(!Xi(i[r].charCodeAt(0),e))return!1;return!0}(t,rn.isLoaded())},nn.prototype.crossFadingFactor=function(){return 0===this.fadeDuration?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)},nn.prototype.getCrossfadeParameters=function(){var t=this.zoom,e=t-Math.floor(t),r=this.crossFadingFactor();return t>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:e+(1-e)*r}:{fromScale:.5,toScale:1,t:1-(1-r)*e}};var on=function(t,e){this.property=t,this.value=e,this.expression=function(t,e){if(Lr(t))return new Wr(t,e);if(jr(t)){var r=Xr(t,e);if("error"===r.result)throw new Error(r.value.map(function(t){return t.key+": "+t.message}).join(", "));return r.value}var i=t;return"string"==typeof t&&"color"===e.type&&(i=Yt.parse(t)),{kind:"constant",evaluate:function(){return i}}}(void 0===e?t.specification.default:e,t.specification)};on.prototype.isDataDriven=function(){return"source"===this.expression.kind||"composite"===this.expression.kind},on.prototype.possiblyEvaluate=function(t,e,r){return this.property.possiblyEvaluate(this,t,e,r)};var an=function(t){this.property=t,this.value=new on(t,void 0)};an.prototype.transitioned=function(t,e){return new ln(this.property,this.value,e,c({},t.transition,this.transition),t.now)},an.prototype.untransitioned=function(){return new ln(this.property,this.value,null,{},0)};var sn=function(t){this._properties=t,this._values=Object.create(t.defaultTransitionablePropertyValues)};sn.prototype.getValue=function(t){return v(this._values[t].value.value)},sn.prototype.setValue=function(t,e){this._values.hasOwnProperty(t)||(this._values[t]=new an(this._values[t].property)),this._values[t].value=new on(this._values[t].property,null===e?void 0:v(e))},sn.prototype.getTransition=function(t){return v(this._values[t].transition)},sn.prototype.setTransition=function(t,e){this._values.hasOwnProperty(t)||(this._values[t]=new an(this._values[t].property)),this._values[t].transition=v(e)||void 0},sn.prototype.serialize=function(){for(var t={},e=0,r=Object.keys(this._values);e<r.length;e+=1){var i=r[e],n=this.getValue(i);void 0!==n&&(t[i]=n);var o=this.getTransition(i);void 0!==o&&(t[i+"-transition"]=o)}return t},sn.prototype.transitioned=function(t,e){for(var r=new un(this._properties),i=0,n=Object.keys(this._values);i<n.length;i+=1){var o=n[i];r._values[o]=this._values[o].transitioned(t,e._values[o])}return r},sn.prototype.untransitioned=function(){for(var t=new un(this._properties),e=0,r=Object.keys(this._values);e<r.length;e+=1){var i=r[e];t._values[i]=this._values[i].untransitioned()}return t};var ln=function(t,e,r,i,n){this.property=t,this.value=e,this.begin=n+i.delay||0,this.end=this.begin+i.duration||0,t.specification.transition&&(i.delay||i.duration)&&(this.prior=r)};ln.prototype.possiblyEvaluate=function(t,e,r){var i=t.now||0,n=this.value.possiblyEvaluate(t,e,r),o=this.prior;if(o){if(i>this.end)return this.prior=null,n;if(this.value.isDataDriven())return this.prior=null,n;if(i<this.begin)return o.possiblyEvaluate(t,e,r);var a=(i-this.begin)/(this.end-this.begin);return this.property.interpolate(o.possiblyEvaluate(t,e,r),n,function(t){if(a<=0)return 0;if(a>=1)return 1;var e=a*a,r=e*a;return 4*(a<.5?r:3*(a-e)+r-.75)}())}return n};var un=function(t){this._properties=t,this._values=Object.create(t.defaultTransitioningPropertyValues)};un.prototype.possiblyEvaluate=function(t,e){for(var r=new hn(this._properties),i=0,n=Object.keys(this._values);i<n.length;i+=1){var o=n[i];r._values[o]=this._values[o].possiblyEvaluate(t,e)}return r},un.prototype.hasTransition=function(){for(var t=0,e=Object.keys(this._values);t<e.length;t+=1)if(this._values[e[t]].prior)return!0;return!1};var cn=function(t){this._properties=t,this._values=Object.create(t.defaultPropertyValues)};cn.prototype.getValue=function(t){return v(this._values[t].value)},cn.prototype.setValue=function(t,e){this._values[t]=new on(this._values[t].property,null===e?void 0:v(e))},cn.prototype.serialize=function(){for(var t={},e=0,r=Object.keys(this._values);e<r.length;e+=1){var i=r[e],n=this.getValue(i);void 0!==n&&(t[i]=n)}return t},cn.prototype.possiblyEvaluate=function(t,e){for(var r=new hn(this._properties),i=0,n=Object.keys(this._values);i<n.length;i+=1){var o=n[i];r._values[o]=this._values[o].possiblyEvaluate(t,e)}return r};var pn=function(t,e,r){this.property=t,this.value=e,this.parameters=r};pn.prototype.isConstant=function(){return"constant"===this.value.kind},pn.prototype.constantOr=function(t){return"constant"===this.value.kind?this.value.value:t},pn.prototype.evaluate=function(t,e,r,i){return this.property.evaluate(this.value,this.parameters,t,e,r,i)};var hn=function(t){this._properties=t,this._values=Object.create(t.defaultPossiblyEvaluatedValues)};hn.prototype.get=function(t){return this._values[t]};var fn=function(t){this.specification=t};fn.prototype.possiblyEvaluate=function(t,e){return t.expression.evaluate(e)},fn.prototype.interpolate=function(t,e,r){var i=je[this.specification.type];return i?i(t,e,r):t};var dn=function(t,e){this.specification=t,this.overrides=e};dn.prototype.possiblyEvaluate=function(t,e,r,i){return new pn(this,"constant"===t.expression.kind||"camera"===t.expression.kind?{kind:"constant",value:t.expression.evaluate(e,null,{},r,i)}:t.expression,e)},dn.prototype.interpolate=function(t,e,r){if("constant"!==t.value.kind||"constant"!==e.value.kind)return t;if(void 0===t.value.value||void 0===e.value.value)return new pn(this,{kind:"constant",value:void 0},t.parameters);var i=je[this.specification.type];return i?new pn(this,{kind:"constant",value:i(t.value.value,e.value.value,r)},t.parameters):t},dn.prototype.evaluate=function(t,e,r,i,n,o){return"constant"===t.kind?t.value:t.evaluate(e,r,i,n,o)};var mn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.possiblyEvaluate=function(t,e,r,i){if(void 0===t.value)return new pn(this,{kind:"constant",value:void 0},e);if("constant"===t.expression.kind){var n=t.expression.evaluate(e,null,{},r,i),o="resolvedImage"===t.property.specification.type&&"string"!=typeof n?n.name:n,a=this._calculate(o,o,o,e);return new pn(this,{kind:"constant",value:a},e)}if("camera"===t.expression.kind){var s=this._calculate(t.expression.evaluate({zoom:e.zoom-1}),t.expression.evaluate({zoom:e.zoom}),t.expression.evaluate({zoom:e.zoom+1}),e);return new pn(this,{kind:"constant",value:s},e)}return new pn(this,t.expression,e)},e.prototype.evaluate=function(t,e,r,i,n,o){if("source"===t.kind){var a=t.evaluate(e,r,i,n,o);return this._calculate(a,a,a,e)}return"composite"===t.kind?this._calculate(t.evaluate({zoom:Math.floor(e.zoom)-1},r,i),t.evaluate({zoom:Math.floor(e.zoom)},r,i),t.evaluate({zoom:Math.floor(e.zoom)+1},r,i),e):t.value},e.prototype._calculate=function(t,e,r,i){return i.zoom>i.zoomHistory.lastIntegerZoom?{from:t,to:e}:{from:r,to:e}},e.prototype.interpolate=function(t){return t},e}(dn),yn=function(t){this.specification=t};yn.prototype.possiblyEvaluate=function(t,e,r,i){if(void 0!==t.value){if("constant"===t.expression.kind){var n=t.expression.evaluate(e,null,{},r,i);return this._calculate(n,n,n,e)}return this._calculate(t.expression.evaluate(new nn(Math.floor(e.zoom-1),e)),t.expression.evaluate(new nn(Math.floor(e.zoom),e)),t.expression.evaluate(new nn(Math.floor(e.zoom+1),e)),e)}},yn.prototype._calculate=function(t,e,r,i){return i.zoom>i.zoomHistory.lastIntegerZoom?{from:t,to:e}:{from:r,to:e}},yn.prototype.interpolate=function(t){return t};var gn=function(t){this.specification=t};gn.prototype.possiblyEvaluate=function(t,e,r,i){return!!t.expression.evaluate(e,null,{},r,i)},gn.prototype.interpolate=function(){return!1};var _n=function(t){for(var e in this.properties=t,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[],t){var r=t[e];r.specification.overridable&&this.overridableProperties.push(e);var i=this.defaultPropertyValues[e]=new on(r,void 0),n=this.defaultTransitionablePropertyValues[e]=new an(r);this.defaultTransitioningPropertyValues[e]=n.untransitioned(),this.defaultPossiblyEvaluatedValues[e]=i.possiblyEvaluate({})}};Li("DataDrivenProperty",dn),Li("DataConstantProperty",fn),Li("CrossFadedDataDrivenProperty",mn),Li("CrossFadedProperty",yn),Li("ColorRampProperty",gn);var vn=function(t){function e(e,r){if(t.call(this),this.id=e.id,this.type=e.type,this._featureFilter={filter:function(){return!0},needGeometry:!1},"custom"!==e.type&&(this.metadata=(e=e).metadata,this.minzoom=e.minzoom,this.maxzoom=e.maxzoom,"background"!==e.type&&(this.source=e.source,this.sourceLayer=e["source-layer"],this.filter=e.filter),r.layout&&(this._unevaluatedLayout=new cn(r.layout)),r.paint)){for(var i in this._transitionablePaint=new sn(r.paint),e.paint)this.setPaintProperty(i,e.paint[i],{validate:!1});for(var n in e.layout)this.setLayoutProperty(n,e.layout[n],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned()}}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},e.prototype.getLayoutProperty=function(t){return"visibility"===t?this.visibility:this._unevaluatedLayout.getValue(t)},e.prototype.setLayoutProperty=function(t,e,r){void 0===r&&(r={}),null!=e&&this._validate(Ai,"layers."+this.id+".layout."+t,t,e,r)||("visibility"!==t?this._unevaluatedLayout.setValue(t,e):this.visibility=e)},e.prototype.getPaintProperty=function(t){return y(t,"-transition")?this._transitionablePaint.getTransition(t.slice(0,-"-transition".length)):this._transitionablePaint.getValue(t)},e.prototype.setPaintProperty=function(t,e,r){if(void 0===r&&(r={}),null!=e&&this._validate(Ei,"layers."+this.id+".paint."+t,t,e,r))return!1;if(y(t,"-transition"))return this._transitionablePaint.setTransition(t.slice(0,-"-transition".length),e||void 0),!1;var i=this._transitionablePaint._values[t],n="cross-faded-data-driven"===i.property.specification["property-type"],o=i.value.isDataDriven(),a=i.value;this._transitionablePaint.setValue(t,e),this._handleSpecialPaintPropertyUpdate(t);var s=this._transitionablePaint._values[t].value;return s.isDataDriven()||o||n||this._handleOverridablePaintPropertyUpdate(t,a,s)},e.prototype._handleSpecialPaintPropertyUpdate=function(t){},e.prototype._handleOverridablePaintPropertyUpdate=function(t,e,r){return!1},e.prototype.isHidden=function(t){return!!(this.minzoom&&t<this.minzoom)||!!(this.maxzoom&&t>=this.maxzoom)||"none"===this.visibility},e.prototype.updateTransitions=function(t){this._transitioningPaint=this._transitionablePaint.transitioned(t,this._transitioningPaint)},e.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},e.prototype.recalculate=function(t,e){t.getCrossfadeParameters&&(this._crossfadeParameters=t.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(t,e)),this.paint=this._transitioningPaint.possiblyEvaluate(t,e)},e.prototype.serialize=function(){var t={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(t.layout=t.layout||{},t.layout.visibility=this.visibility),_(t,function(t,e){return!(void 0===t||"layout"===e&&!Object.keys(t).length||"paint"===e&&!Object.keys(t).length)})},e.prototype._validate=function(t,e,r,i,n){return void 0===n&&(n={}),(!n||!1!==n.validate)&&zi(this,t.call(Ti,{key:e,layerType:this.type,objectKey:r,value:i,styleSpec:Et,style:{glyphs:!0,sprite:!0}}))},e.prototype.is3D=function(){return!1},e.prototype.isTileClipped=function(){return!1},e.prototype.hasOffscreenPass=function(){return!1},e.prototype.resize=function(){},e.prototype.isStateDependent=function(){for(var t in this.paint._values){var e=this.paint.get(t);if(e instanceof pn&&Cr(e.property.specification)&&("source"===e.value.kind||"composite"===e.value.kind)&&e.value.isStateDependent)return!0}return!1},e}(It),xn={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},bn=function(t,e){this._structArray=t,this._pos1=e*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8},wn=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};function Sn(t,e){void 0===e&&(e=1);var r=0,i=0;return{members:t.map(function(t){var n=xn[t.type].BYTES_PER_ELEMENT,o=r=Tn(r,Math.max(e,n)),a=t.components||1;return i=Math.max(i,n),r+=n*a,{name:t.name,type:t.type,components:a,offset:o}}),size:Tn(r,Math.max(i,e)),alignment:e}}function Tn(t,e){return Math.ceil(t/e)*e}wn.serialize=function(t,e){return t._trim(),e&&(t.isTransferred=!0,e.push(t.arrayBuffer)),{length:t.length,arrayBuffer:t.arrayBuffer}},wn.deserialize=function(t){var e=Object.create(this.prototype);return e.arrayBuffer=t.arrayBuffer,e.length=t.length,e.capacity=t.arrayBuffer.byteLength/e.bytesPerElement,e._refreshViews(),e},wn.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},wn.prototype.clear=function(){this.length=0},wn.prototype.resize=function(t){this.reserve(t),this.length=t},wn.prototype.reserve=function(t){if(t>this.capacity){this.capacity=Math.max(t,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var e=this.uint8;this._refreshViews(),e&&this.uint8.set(e)}},wn.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};var In=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e){var r=this.length;return this.resize(r+1),this.emplace(r,t,e)},e.prototype.emplace=function(t,e,r){var i=2*t;return this.int16[i+0]=e,this.int16[i+1]=r,t},e}(wn);In.prototype.bytesPerElement=4,Li("StructArrayLayout2i4",In);var En=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,i){var n=this.length;return this.resize(n+1),this.emplace(n,t,e,r,i)},e.prototype.emplace=function(t,e,r,i,n){var o=4*t;return this.int16[o+0]=e,this.int16[o+1]=r,this.int16[o+2]=i,this.int16[o+3]=n,t},e}(wn);En.prototype.bytesPerElement=8,Li("StructArrayLayout4i8",En);var An=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,i,n,o){var a=this.length;return this.resize(a+1),this.emplace(a,t,e,r,i,n,o)},e.prototype.emplace=function(t,e,r,i,n,o,a){var s=6*t;return this.int16[s+0]=e,this.int16[s+1]=r,this.int16[s+2]=i,this.int16[s+3]=n,this.int16[s+4]=o,this.int16[s+5]=a,t},e}(wn);An.prototype.bytesPerElement=12,Li("StructArrayLayout2i4i12",An);var zn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,i,n,o){var a=this.length;return this.resize(a+1),this.emplace(a,t,e,r,i,n,o)},e.prototype.emplace=function(t,e,r,i,n,o,a){var s=4*t,l=8*t;return this.int16[s+0]=e,this.int16[s+1]=r,this.uint8[l+4]=i,this.uint8[l+5]=n,this.uint8[l+6]=o,this.uint8[l+7]=a,t},e}(wn);zn.prototype.bytesPerElement=8,Li("StructArrayLayout2i4ub8",zn);var Pn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,i,n,o,a,s,l,u){var c=this.length;return this.resize(c+1),this.emplace(c,t,e,r,i,n,o,a,s,l,u)},e.prototype.emplace=function(t,e,r,i,n,o,a,s,l,u,c){var p=9*t,h=18*t;return this.uint16[p+0]=e,this.uint16[p+1]=r,this.uint16[p+2]=i,this.uint16[p+3]=n,this.uint16[p+4]=o,this.uint16[p+5]=a,this.uint16[p+6]=s,this.uint16[p+7]=l,this.uint8[h+16]=u,this.uint8[h+17]=c,t},e}(wn);Pn.prototype.bytesPerElement=18,Li("StructArrayLayout8ui2ub18",Pn);var Cn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,i,n,o,a,s,l,u,c,p){var h=this.length;return this.resize(h+1),this.emplace(h,t,e,r,i,n,o,a,s,l,u,c,p)},e.prototype.emplace=function(t,e,r,i,n,o,a,s,l,u,c,p,h){var f=12*t;return this.int16[f+0]=e,this.int16[f+1]=r,this.int16[f+2]=i,this.int16[f+3]=n,this.uint16[f+4]=o,this.uint16[f+5]=a,this.uint16[f+6]=s,this.uint16[f+7]=l,this.int16[f+8]=u,this.int16[f+9]=c,this.int16[f+10]=p,this.int16[f+11]=h,t},e}(wn);Cn.prototype.bytesPerElement=24,Li("StructArrayLayout4i4ui4i24",Cn);var kn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r){var i=this.length;return this.resize(i+1),this.emplace(i,t,e,r)},e.prototype.emplace=function(t,e,r,i){var n=3*t;return this.float32[n+0]=e,this.float32[n+1]=r,this.float32[n+2]=i,t},e}(wn);kn.prototype.bytesPerElement=12,Li("StructArrayLayout3f12",kn);var Mn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t){var e=this.length;return this.resize(e+1),this.emplace(e,t)},e.prototype.emplace=function(t,e){return this.uint32[1*t+0]=e,t},e}(wn);Mn.prototype.bytesPerElement=4,Li("StructArrayLayout1ul4",Mn);var Dn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,i,n,o,a,s,l){var u=this.length;return this.resize(u+1),this.emplace(u,t,e,r,i,n,o,a,s,l)},e.prototype.emplace=function(t,e,r,i,n,o,a,s,l,u){var c=10*t,p=5*t;return this.int16[c+0]=e,this.int16[c+1]=r,this.int16[c+2]=i,this.int16[c+3]=n,this.int16[c+4]=o,this.int16[c+5]=a,this.uint32[p+3]=s,this.uint16[c+8]=l,this.uint16[c+9]=u,t},e}(wn);Dn.prototype.bytesPerElement=20,Li("StructArrayLayout6i1ul2ui20",Dn);var Ln=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,i,n,o){var a=this.length;return this.resize(a+1),this.emplace(a,t,e,r,i,n,o)},e.prototype.emplace=function(t,e,r,i,n,o,a){var s=6*t;return this.int16[s+0]=e,this.int16[s+1]=r,this.int16[s+2]=i,this.int16[s+3]=n,this.int16[s+4]=o,this.int16[s+5]=a,t},e}(wn);Ln.prototype.bytesPerElement=12,Li("StructArrayLayout2i2i2i12",Ln);var Rn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,i,n){var o=this.length;return this.resize(o+1),this.emplace(o,t,e,r,i,n)},e.prototype.emplace=function(t,e,r,i,n,o){var a=4*t,s=8*t;return this.float32[a+0]=e,this.float32[a+1]=r,this.float32[a+2]=i,this.int16[s+6]=n,this.int16[s+7]=o,t},e}(wn);Rn.prototype.bytesPerElement=16,Li("StructArrayLayout2f1f2i16",Rn);var Bn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,i){var n=this.length;return this.resize(n+1),this.emplace(n,t,e,r,i)},e.prototype.emplace=function(t,e,r,i,n){var o=12*t,a=3*t;return this.uint8[o+0]=e,this.uint8[o+1]=r,this.float32[a+1]=i,this.float32[a+2]=n,t},e}(wn);Bn.prototype.bytesPerElement=12,Li("StructArrayLayout2ub2f12",Bn);var Fn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r){var i=this.length;return this.resize(i+1),this.emplace(i,t,e,r)},e.prototype.emplace=function(t,e,r,i){var n=3*t;return this.uint16[n+0]=e,this.uint16[n+1]=r,this.uint16[n+2]=i,t},e}(wn);Fn.prototype.bytesPerElement=6,Li("StructArrayLayout3ui6",Fn);var On=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,i,n,o,a,s,l,u,c,p,h,f,d,m,y){var g=this.length;return this.resize(g+1),this.emplace(g,t,e,r,i,n,o,a,s,l,u,c,p,h,f,d,m,y)},e.prototype.emplace=function(t,e,r,i,n,o,a,s,l,u,c,p,h,f,d,m,y,g){var _=24*t,v=12*t,x=48*t;return this.int16[_+0]=e,this.int16[_+1]=r,this.uint16[_+2]=i,this.uint16[_+3]=n,this.uint32[v+2]=o,this.uint32[v+3]=a,this.uint32[v+4]=s,this.uint16[_+10]=l,this.uint16[_+11]=u,this.uint16[_+12]=c,this.float32[v+7]=p,this.float32[v+8]=h,this.uint8[x+36]=f,this.uint8[x+37]=d,this.uint8[x+38]=m,this.uint32[v+10]=y,this.int16[_+22]=g,t},e}(wn);On.prototype.bytesPerElement=48,Li("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",On);var Un=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,i,n,o,a,s,l,u,c,p,h,f,d,m,y,g,_,v,x,b,w,S,T,I,E,A){var z=this.length;return this.resize(z+1),this.emplace(z,t,e,r,i,n,o,a,s,l,u,c,p,h,f,d,m,y,g,_,v,x,b,w,S,T,I,E,A)},e.prototype.emplace=function(t,e,r,i,n,o,a,s,l,u,c,p,h,f,d,m,y,g,_,v,x,b,w,S,T,I,E,A,z){var P=34*t,C=17*t;return this.int16[P+0]=e,this.int16[P+1]=r,this.int16[P+2]=i,this.int16[P+3]=n,this.int16[P+4]=o,this.int16[P+5]=a,this.int16[P+6]=s,this.int16[P+7]=l,this.uint16[P+8]=u,this.uint16[P+9]=c,this.uint16[P+10]=p,this.uint16[P+11]=h,this.uint16[P+12]=f,this.uint16[P+13]=d,this.uint16[P+14]=m,this.uint16[P+15]=y,this.uint16[P+16]=g,this.uint16[P+17]=_,this.uint16[P+18]=v,this.uint16[P+19]=x,this.uint16[P+20]=b,this.uint16[P+21]=w,this.uint16[P+22]=S,this.uint32[C+12]=T,this.float32[C+13]=I,this.float32[C+14]=E,this.float32[C+15]=A,this.float32[C+16]=z,t},e}(wn);Un.prototype.bytesPerElement=68,Li("StructArrayLayout8i15ui1ul4f68",Un);var Vn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t){var e=this.length;return this.resize(e+1),this.emplace(e,t)},e.prototype.emplace=function(t,e){return this.float32[1*t+0]=e,t},e}(wn);Vn.prototype.bytesPerElement=4,Li("StructArrayLayout1f4",Vn);var Nn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r){var i=this.length;return this.resize(i+1),this.emplace(i,t,e,r)},e.prototype.emplace=function(t,e,r,i){var n=3*t;return this.int16[n+0]=e,this.int16[n+1]=r,this.int16[n+2]=i,t},e}(wn);Nn.prototype.bytesPerElement=6,Li("StructArrayLayout3i6",Nn);var jn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r){var i=this.length;return this.resize(i+1),this.emplace(i,t,e,r)},e.prototype.emplace=function(t,e,r,i){var n=4*t;return this.uint32[2*t+0]=e,this.uint16[n+2]=r,this.uint16[n+3]=i,t},e}(wn);jn.prototype.bytesPerElement=8,Li("StructArrayLayout1ul2ui8",jn);var qn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e){var r=this.length;return this.resize(r+1),this.emplace(r,t,e)},e.prototype.emplace=function(t,e,r){var i=2*t;return this.uint16[i+0]=e,this.uint16[i+1]=r,t},e}(wn);qn.prototype.bytesPerElement=4,Li("StructArrayLayout2ui4",qn);var Zn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t){var e=this.length;return this.resize(e+1),this.emplace(e,t)},e.prototype.emplace=function(t,e){return this.uint16[1*t+0]=e,t},e}(wn);Zn.prototype.bytesPerElement=2,Li("StructArrayLayout1ui2",Zn);var Gn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e){var r=this.length;return this.resize(r+1),this.emplace(r,t,e)},e.prototype.emplace=function(t,e,r){var i=2*t;return this.float32[i+0]=e,this.float32[i+1]=r,t},e}(wn);Gn.prototype.bytesPerElement=8,Li("StructArrayLayout2f8",Gn);var Xn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,i){var n=this.length;return this.resize(n+1),this.emplace(n,t,e,r,i)},e.prototype.emplace=function(t,e,r,i,n){var o=4*t;return this.float32[o+0]=e,this.float32[o+1]=r,this.float32[o+2]=i,this.float32[o+3]=n,t},e}(wn);Xn.prototype.bytesPerElement=16,Li("StructArrayLayout4f16",Xn);var Wn=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var r={anchorPointX:{configurable:!0},anchorPointY:{configurable:!0},x1:{configurable:!0},y1:{configurable:!0},x2:{configurable:!0},y2:{configurable:!0},featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0},anchorPoint:{configurable:!0}};return r.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},r.x1.get=function(){return this._structArray.int16[this._pos2+2]},r.y1.get=function(){return this._structArray.int16[this._pos2+3]},r.x2.get=function(){return this._structArray.int16[this._pos2+4]},r.y2.get=function(){return this._structArray.int16[this._pos2+5]},r.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},r.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},r.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},r.anchorPoint.get=function(){return new n(this.anchorPointX,this.anchorPointY)},Object.defineProperties(e.prototype,r),e}(bn);Wn.prototype.size=20;var Kn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.get=function(t){return new Wn(this,t)},e}(Dn);Li("CollisionBoxArray",Kn);var Hn=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var r={anchorX:{configurable:!0},anchorY:{configurable:!0},glyphStartIndex:{configurable:!0},numGlyphs:{configurable:!0},vertexStartIndex:{configurable:!0},lineStartIndex:{configurable:!0},lineLength:{configurable:!0},segment:{configurable:!0},lowerSize:{configurable:!0},upperSize:{configurable:!0},lineOffsetX:{configurable:!0},lineOffsetY:{configurable:!0},writingMode:{configurable:!0},placedOrientation:{configurable:!0},hidden:{configurable:!0},crossTileID:{configurable:!0},associatedIconIndex:{configurable:!0}};return r.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},r.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},r.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},r.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},r.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},r.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},r.segment.get=function(){return this._structArray.uint16[this._pos2+10]},r.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},r.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},r.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},r.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},r.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},r.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},r.placedOrientation.set=function(t){this._structArray.uint8[this._pos1+37]=t},r.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},r.hidden.set=function(t){this._structArray.uint8[this._pos1+38]=t},r.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},r.crossTileID.set=function(t){this._structArray.uint32[this._pos4+10]=t},r.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},Object.defineProperties(e.prototype,r),e}(bn);Hn.prototype.size=48;var Jn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.get=function(t){return new Hn(this,t)},e}(On);Li("PlacedSymbolArray",Jn);var Yn=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var r={anchorX:{configurable:!0},anchorY:{configurable:!0},rightJustifiedTextSymbolIndex:{configurable:!0},centerJustifiedTextSymbolIndex:{configurable:!0},leftJustifiedTextSymbolIndex:{configurable:!0},verticalPlacedTextSymbolIndex:{configurable:!0},placedIconSymbolIndex:{configurable:!0},verticalPlacedIconSymbolIndex:{configurable:!0},key:{configurable:!0},textBoxStartIndex:{configurable:!0},textBoxEndIndex:{configurable:!0},verticalTextBoxStartIndex:{configurable:!0},verticalTextBoxEndIndex:{configurable:!0},iconBoxStartIndex:{configurable:!0},iconBoxEndIndex:{configurable:!0},verticalIconBoxStartIndex:{configurable:!0},verticalIconBoxEndIndex:{configurable:!0},featureIndex:{configurable:!0},numHorizontalGlyphVertices:{configurable:!0},numVerticalGlyphVertices:{configurable:!0},numIconVertices:{configurable:!0},numVerticalIconVertices:{configurable:!0},useRuntimeCollisionCircles:{configurable:!0},crossTileID:{configurable:!0},textBoxScale:{configurable:!0},textOffset0:{configurable:!0},textOffset1:{configurable:!0},collisionCircleDiameter:{configurable:!0}};return r.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},r.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},r.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},r.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},r.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},r.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},r.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},r.key.get=function(){return this._structArray.uint16[this._pos2+8]},r.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},r.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},r.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},r.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},r.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},r.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},r.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},r.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},r.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},r.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},r.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},r.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},r.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},r.useRuntimeCollisionCircles.get=function(){return this._structArray.uint16[this._pos2+22]},r.crossTileID.get=function(){return this._structArray.uint32[this._pos4+12]},r.crossTileID.set=function(t){this._structArray.uint32[this._pos4+12]=t},r.textBoxScale.get=function(){return this._structArray.float32[this._pos4+13]},r.textOffset0.get=function(){return this._structArray.float32[this._pos4+14]},r.textOffset1.get=function(){return this._structArray.float32[this._pos4+15]},r.collisionCircleDiameter.get=function(){return this._structArray.float32[this._pos4+16]},Object.defineProperties(e.prototype,r),e}(bn);Yn.prototype.size=68;var Qn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.get=function(t){return new Yn(this,t)},e}(Un);Li("SymbolInstanceArray",Qn);var $n=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getoffsetX=function(t){return this.float32[1*t+0]},e}(Vn);Li("GlyphOffsetArray",$n);var to=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getx=function(t){return this.int16[3*t+0]},e.prototype.gety=function(t){return this.int16[3*t+1]},e.prototype.gettileUnitDistanceFromAnchor=function(t){return this.int16[3*t+2]},e}(Nn);Li("SymbolLineVertexArray",to);var eo=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var r={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return r.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},r.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},r.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},Object.defineProperties(e.prototype,r),e}(bn);eo.prototype.size=8;var ro=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.get=function(t){return new eo(this,t)},e}(jn);Li("FeatureIndexArray",ro);var io=Sn([{name:"a_pos",components:2,type:"Int16"}],4).members,no=function(t){void 0===t&&(t=[]),this.segments=t};function oo(t,e){return 256*(t=l(Math.floor(t),0,255))+l(Math.floor(e),0,255)}no.prototype.prepareSegment=function(t,e,r,i){var n=this.segments[this.segments.length-1];return t>no.MAX_VERTEX_ARRAY_LENGTH&&b("Max vertices per segment is "+no.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+t),(!n||n.vertexLength+t>no.MAX_VERTEX_ARRAY_LENGTH||n.sortKey!==i)&&(n={vertexOffset:e.length,primitiveOffset:r.length,vertexLength:0,primitiveLength:0},void 0!==i&&(n.sortKey=i),this.segments.push(n)),n},no.prototype.get=function(){return this.segments},no.prototype.destroy=function(){for(var t=0,e=this.segments;t<e.length;t+=1){var r=e[t];for(var i in r.vaos)r.vaos[i].destroy()}},no.simpleSegment=function(t,e,r,i){return new no([{vertexOffset:t,primitiveOffset:e,vertexLength:r,primitiveLength:i,vaos:{},sortKey:0}])},no.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,Li("SegmentVector",no);var ao=Sn([{name:"a_pattern_from",components:4,type:"Uint16"},{name:"a_pattern_to",components:4,type:"Uint16"},{name:"a_pixel_ratio_from",components:1,type:"Uint8"},{name:"a_pixel_ratio_to",components:1,type:"Uint8"}]),so=e(function(t){t.exports=function(t,e){var r,i,n,o,a,s,l,u;for(i=t.length-(r=3&t.length),n=e,a=3432918353,s=461845907,u=0;u<i;)l=255&t.charCodeAt(u)|(255&t.charCodeAt(++u))<<8|(255&t.charCodeAt(++u))<<16|(255&t.charCodeAt(++u))<<24,++u,n=27492+(65535&(o=5*(65535&(n=(n^=l=(65535&(l=(l=(65535&l)*a+(((l>>>16)*a&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295)<<13|n>>>19))+((5*(n>>>16)&65535)<<16)&4294967295))+((58964+(o>>>16)&65535)<<16);switch(l=0,r){case 3:l^=(255&t.charCodeAt(u+2))<<16;case 2:l^=(255&t.charCodeAt(u+1))<<8;case 1:n^=l=(65535&(l=(l=(65535&(l^=255&t.charCodeAt(u)))*a+(((l>>>16)*a&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295}return n^=t.length,n=2246822507*(65535&(n^=n>>>16))+((2246822507*(n>>>16)&65535)<<16)&4294967295,n=3266489909*(65535&(n^=n>>>13))+((3266489909*(n>>>16)&65535)<<16)&4294967295,(n^=n>>>16)>>>0}}),lo=e(function(t){t.exports=function(t,e){for(var r,i=t.length,n=e^i,o=0;i>=4;)r=1540483477*(65535&(r=255&t.charCodeAt(o)|(255&t.charCodeAt(++o))<<8|(255&t.charCodeAt(++o))<<16|(255&t.charCodeAt(++o))<<24))+((1540483477*(r>>>16)&65535)<<16),n=1540483477*(65535&n)+((1540483477*(n>>>16)&65535)<<16)^(r=1540483477*(65535&(r^=r>>>24))+((1540483477*(r>>>16)&65535)<<16)),i-=4,++o;switch(i){case 3:n^=(255&t.charCodeAt(o+2))<<16;case 2:n^=(255&t.charCodeAt(o+1))<<8;case 1:n=1540483477*(65535&(n^=255&t.charCodeAt(o)))+((1540483477*(n>>>16)&65535)<<16)}return n=1540483477*(65535&(n^=n>>>13))+((1540483477*(n>>>16)&65535)<<16),(n^=n>>>15)>>>0}}),uo=so,co=lo;uo.murmur3=so,uo.murmur2=co;var po=function(){this.ids=[],this.positions=[],this.indexed=!1};po.prototype.add=function(t,e,r,i){this.ids.push(fo(t)),this.positions.push(e,r,i)},po.prototype.getPositions=function(t){for(var e=fo(t),r=0,i=this.ids.length-1;r<i;){var n=r+i>>1;this.ids[n]>=e?i=n:r=n+1}for(var o=[];this.ids[r]===e;)o.push({index:this.positions[3*r],start:this.positions[3*r+1],end:this.positions[3*r+2]}),r++;return o},po.serialize=function(t,e){var r=new Float64Array(t.ids),i=new Uint32Array(t.positions);return function t(e,r,i,n){for(;i<n;){for(var o=e[i+n>>1],a=i-1,s=n+1;;){do{a++}while(e[a]<o);do{s--}while(e[s]>o);if(a>=s)break;mo(e,a,s),mo(r,3*a,3*s),mo(r,3*a+1,3*s+1),mo(r,3*a+2,3*s+2)}s-i<n-s?(t(e,r,i,s),i=s+1):(t(e,r,s+1,n),n=s)}}(r,i,0,r.length-1),e&&e.push(r.buffer,i.buffer),{ids:r,positions:i}},po.deserialize=function(t){var e=new po;return e.ids=t.ids,e.positions=t.positions,e.indexed=!0,e};var ho=Math.pow(2,53)-1;function fo(t){var e=+t;return!isNaN(e)&&e<=ho?e:uo(String(t))}function mo(t,e,r){var i=t[e];t[e]=t[r],t[r]=i}Li("FeaturePositionMap",po);var yo=function(t,e){this.gl=t.gl,this.location=e},go=function(t){function e(e,r){t.call(this,e,r),this.current=0}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.set=function(t){this.current!==t&&(this.current=t,this.gl.uniform1i(this.location,t))},e}(yo),_o=function(t){function e(e,r){t.call(this,e,r),this.current=0}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.set=function(t){this.current!==t&&(this.current=t,this.gl.uniform1f(this.location,t))},e}(yo),vo=function(t){function e(e,r){t.call(this,e,r),this.current=[0,0]}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.set=function(t){t[0]===this.current[0]&&t[1]===this.current[1]||(this.current=t,this.gl.uniform2f(this.location,t[0],t[1]))},e}(yo),xo=function(t){function e(e,r){t.call(this,e,r),this.current=[0,0,0]}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.set=function(t){t[0]===this.current[0]&&t[1]===this.current[1]&&t[2]===this.current[2]||(this.current=t,this.gl.uniform3f(this.location,t[0],t[1],t[2]))},e}(yo),bo=function(t){function e(e,r){t.call(this,e,r),this.current=[0,0,0,0]}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.set=function(t){t[0]===this.current[0]&&t[1]===this.current[1]&&t[2]===this.current[2]&&t[3]===this.current[3]||(this.current=t,this.gl.uniform4f(this.location,t[0],t[1],t[2],t[3]))},e}(yo),wo=function(t){function e(e,r){t.call(this,e,r),this.current=Yt.transparent}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.set=function(t){t.r===this.current.r&&t.g===this.current.g&&t.b===this.current.b&&t.a===this.current.a||(this.current=t,this.gl.uniform4f(this.location,t.r,t.g,t.b,t.a))},e}(yo),So=new Float32Array(16),To=function(t){function e(e,r){t.call(this,e,r),this.current=So}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.set=function(t){if(t[12]!==this.current[12]||t[0]!==this.current[0])return this.current=t,void this.gl.uniformMatrix4fv(this.location,!1,t);for(var e=1;e<16;e++)if(t[e]!==this.current[e]){this.current=t,this.gl.uniformMatrix4fv(this.location,!1,t);break}},e}(yo);function Io(t){return[oo(255*t.r,255*t.g),oo(255*t.b,255*t.a)]}var Eo=function(t,e,r){this.value=t,this.uniformNames=e.map(function(t){return"u_"+t}),this.type=r};Eo.prototype.setUniform=function(t,e,r){t.set(r.constantOr(this.value))},Eo.prototype.getBinding=function(t,e,r){return"color"===this.type?new wo(t,e):new _o(t,e)};var Ao=function(t,e){this.uniformNames=e.map(function(t){return"u_"+t}),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1};Ao.prototype.setConstantPatternPositions=function(t,e){this.pixelRatioFrom=e.pixelRatio,this.pixelRatioTo=t.pixelRatio,this.patternFrom=e.tlbr,this.patternTo=t.tlbr},Ao.prototype.setUniform=function(t,e,r,i){var n="u_pattern_to"===i?this.patternTo:"u_pattern_from"===i?this.patternFrom:"u_pixel_ratio_to"===i?this.pixelRatioTo:"u_pixel_ratio_from"===i?this.pixelRatioFrom:null;n&&t.set(n)},Ao.prototype.getBinding=function(t,e,r){return"u_pattern"===r.substr(0,9)?new bo(t,e):new _o(t,e)};var zo=function(t,e,r,i){this.expression=t,this.type=r,this.maxValue=0,this.paintVertexAttributes=e.map(function(t){return{name:"a_"+t,type:"Float32",components:"color"===r?2:1,offset:0}}),this.paintVertexArray=new i};zo.prototype.populatePaintArray=function(t,e,r,i,n){var o=this.paintVertexArray.length,a=this.expression.evaluate(new nn(0),e,{},i,[],n);this.paintVertexArray.resize(t),this._setPaintValue(o,t,a)},zo.prototype.updatePaintArray=function(t,e,r,i){var n=this.expression.evaluate({zoom:0},r,i);this._setPaintValue(t,e,n)},zo.prototype._setPaintValue=function(t,e,r){if("color"===this.type)for(var i=Io(r),n=t;n<e;n++)this.paintVertexArray.emplace(n,i[0],i[1]);else{for(var o=t;o<e;o++)this.paintVertexArray.emplace(o,r);this.maxValue=Math.max(this.maxValue,Math.abs(r))}},zo.prototype.upload=function(t){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=t.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))},zo.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()};var Po=function(t,e,r,i,n,o){this.expression=t,this.uniformNames=e.map(function(t){return"u_"+t+"_t"}),this.type=r,this.useIntegerZoom=i,this.zoom=n,this.maxValue=0,this.paintVertexAttributes=e.map(function(t){return{name:"a_"+t,type:"Float32",components:"color"===r?4:2,offset:0}}),this.paintVertexArray=new o};Po.prototype.populatePaintArray=function(t,e,r,i,n){var o=this.expression.evaluate(new nn(this.zoom),e,{},i,[],n),a=this.expression.evaluate(new nn(this.zoom+1),e,{},i,[],n),s=this.paintVertexArray.length;this.paintVertexArray.resize(t),this._setPaintValue(s,t,o,a)},Po.prototype.updatePaintArray=function(t,e,r,i){var n=this.expression.evaluate({zoom:this.zoom},r,i),o=this.expression.evaluate({zoom:this.zoom+1},r,i);this._setPaintValue(t,e,n,o)},Po.prototype._setPaintValue=function(t,e,r,i){if("color"===this.type)for(var n=Io(r),o=Io(i),a=t;a<e;a++)this.paintVertexArray.emplace(a,n[0],n[1],o[0],o[1]);else{for(var s=t;s<e;s++)this.paintVertexArray.emplace(s,r,i);this.maxValue=Math.max(this.maxValue,Math.abs(r),Math.abs(i))}},Po.prototype.upload=function(t){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=t.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))},Po.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()},Po.prototype.setUniform=function(t,e){var r=this.useIntegerZoom?Math.floor(e.zoom):e.zoom,i=l(this.expression.interpolationFactor(r,this.zoom,this.zoom+1),0,1);t.set(i)},Po.prototype.getBinding=function(t,e,r){return new _o(t,e)};var Co=function(t,e,r,i,n,o){this.expression=t,this.type=e,this.useIntegerZoom=r,this.zoom=i,this.layerId=o,this.zoomInPaintVertexArray=new n,this.zoomOutPaintVertexArray=new n};Co.prototype.populatePaintArray=function(t,e,r){var i=this.zoomInPaintVertexArray.length;this.zoomInPaintVertexArray.resize(t),this.zoomOutPaintVertexArray.resize(t),this._setPaintValues(i,t,e.patterns&&e.patterns[this.layerId],r)},Co.prototype.updatePaintArray=function(t,e,r,i,n){this._setPaintValues(t,e,r.patterns&&r.patterns[this.layerId],n)},Co.prototype._setPaintValues=function(t,e,r,i){if(i&&r){var n=i[r.min],o=i[r.mid],a=i[r.max];if(n&&o&&a)for(var s=t;s<e;s++)this.zoomInPaintVertexArray.emplace(s,o.tl[0],o.tl[1],o.br[0],o.br[1],n.tl[0],n.tl[1],n.br[0],n.br[1],o.pixelRatio,n.pixelRatio),this.zoomOutPaintVertexArray.emplace(s,o.tl[0],o.tl[1],o.br[0],o.br[1],a.tl[0],a.tl[1],a.br[0],a.br[1],o.pixelRatio,a.pixelRatio)}},Co.prototype.upload=function(t){this.zoomInPaintVertexArray&&this.zoomInPaintVertexArray.arrayBuffer&&this.zoomOutPaintVertexArray&&this.zoomOutPaintVertexArray.arrayBuffer&&(this.zoomInPaintVertexBuffer=t.createVertexBuffer(this.zoomInPaintVertexArray,ao.members,this.expression.isStateDependent),this.zoomOutPaintVertexBuffer=t.createVertexBuffer(this.zoomOutPaintVertexArray,ao.members,this.expression.isStateDependent))},Co.prototype.destroy=function(){this.zoomOutPaintVertexBuffer&&this.zoomOutPaintVertexBuffer.destroy(),this.zoomInPaintVertexBuffer&&this.zoomInPaintVertexBuffer.destroy()};var ko=function(t,e,r,i){this.binders={},this.layoutAttributes=i,this._buffers=[];var n=[];for(var o in t.paint._values)if(r(o)){var a=t.paint.get(o);if(a instanceof pn&&Cr(a.property.specification)){var s=Do(o,t.type),l=a.value,u=a.property.specification.type,c=a.property.useIntegerZoom,p=a.property.specification["property-type"],h="cross-faded"===p||"cross-faded-data-driven"===p;if("constant"===l.kind)this.binders[o]=h?new Ao(l.value,s):new Eo(l.value,s,u),n.push("/u_"+o);else if("source"===l.kind||h){var f=Lo(o,u,"source");this.binders[o]=h?new Co(l,u,c,e,f,t.id):new zo(l,s,u,f),n.push("/a_"+o)}else{var d=Lo(o,u,"composite");this.binders[o]=new Po(l,s,u,c,e,d),n.push("/z_"+o)}}}this.cacheKey=n.sort().join("")};ko.prototype.getMaxValue=function(t){var e=this.binders[t];return e instanceof zo||e instanceof Po?e.maxValue:0},ko.prototype.populatePaintArrays=function(t,e,r,i,n){for(var o in this.binders){var a=this.binders[o];(a instanceof zo||a instanceof Po||a instanceof Co)&&a.populatePaintArray(t,e,r,i,n)}},ko.prototype.setConstantPatternPositions=function(t,e){for(var r in this.binders){var i=this.binders[r];i instanceof Ao&&i.setConstantPatternPositions(t,e)}},ko.prototype.updatePaintArrays=function(t,e,r,i,n){var o=!1;for(var a in t)for(var s=0,l=e.getPositions(a);s<l.length;s+=1){var u=l[s],c=r.feature(u.index);for(var p in this.binders){var h=this.binders[p];if((h instanceof zo||h instanceof Po||h instanceof Co)&&!0===h.expression.isStateDependent){var f=i.paint.get(p);h.expression=f.value,h.updatePaintArray(u.start,u.end,c,t[a],n),o=!0}}}return o},ko.prototype.defines=function(){var t=[];for(var e in this.binders){var r=this.binders[e];(r instanceof Eo||r instanceof Ao)&&t.push.apply(t,r.uniformNames.map(function(t){return"#define HAS_UNIFORM_"+t}))}return t},ko.prototype.getPaintVertexBuffers=function(){return this._buffers},ko.prototype.getUniforms=function(t,e){var r=[];for(var i in this.binders){var n=this.binders[i];if(n instanceof Eo||n instanceof Ao||n instanceof Po)for(var o=0,a=n.uniformNames;o<a.length;o+=1){var s=a[o];if(e[s]){var l=n.getBinding(t,e[s],s);r.push({name:s,property:i,binding:l})}}}return r},ko.prototype.setUniforms=function(t,e,r,i){for(var n=0,o=e;n<o.length;n+=1){var a=o[n],s=a.name,l=a.property;this.binders[l].setUniform(a.binding,i,r.get(l),s)}},ko.prototype.updatePaintBuffers=function(t){for(var e in this._buffers=[],this.binders){var r=this.binders[e];if(t&&r instanceof Co){var i=2===t.fromScale?r.zoomInPaintVertexBuffer:r.zoomOutPaintVertexBuffer;i&&this._buffers.push(i)}else(r instanceof zo||r instanceof Po)&&r.paintVertexBuffer&&this._buffers.push(r.paintVertexBuffer)}},ko.prototype.upload=function(t){for(var e in this.binders){var r=this.binders[e];(r instanceof zo||r instanceof Po||r instanceof Co)&&r.upload(t)}this.updatePaintBuffers()},ko.prototype.destroy=function(){for(var t in this.binders){var e=this.binders[t];(e instanceof zo||e instanceof Po||e instanceof Co)&&e.destroy()}};var Mo=function(t,e,r,i){void 0===i&&(i=function(){return!0}),this.programConfigurations={};for(var n=0,o=e;n<o.length;n+=1){var a=o[n];this.programConfigurations[a.id]=new ko(a,r,i,t)}this.needsUpload=!1,this._featureMap=new po,this._bufferOffset=0};function Do(t,e){return{"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"icon-halo-width":["halo_width"],"line-gap-width":["gapwidth"],"line-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-extrusion-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"]}[t]||[t.replace(e+"-","").replace(/-/g,"_")]}function Lo(t,e,r){var i={color:{source:Gn,composite:Xn},number:{source:Vn,composite:Gn}},n=function(t){return{"line-pattern":{source:Pn,composite:Pn},"fill-pattern":{source:Pn,composite:Pn},"fill-extrusion-pattern":{source:Pn,composite:Pn}}[t]}(t);return n&&n[r]||i[e][r]}Mo.prototype.populatePaintArrays=function(t,e,r,i,n,o){for(var a in this.programConfigurations)this.programConfigurations[a].populatePaintArrays(t,e,i,n,o);void 0!==e.id&&this._featureMap.add(e.id,r,this._bufferOffset,t),this._bufferOffset=t,this.needsUpload=!0},Mo.prototype.updatePaintArrays=function(t,e,r,i){for(var n=0,o=r;n<o.length;n+=1){var a=o[n];this.needsUpload=this.programConfigurations[a.id].updatePaintArrays(t,this._featureMap,e,a,i)||this.needsUpload}},Mo.prototype.get=function(t){return this.programConfigurations[t]},Mo.prototype.upload=function(t){if(this.needsUpload){for(var e in this.programConfigurations)this.programConfigurations[e].upload(t);this.needsUpload=!1}},Mo.prototype.destroy=function(){for(var t in this.programConfigurations)this.programConfigurations[t].destroy()},Li("ConstantBinder",Eo),Li("CrossFadedConstantBinder",Ao),Li("SourceExpressionBinder",zo),Li("CrossFadedCompositeBinder",Co),Li("CompositeExpressionBinder",Po),Li("ProgramConfiguration",ko,{omit:["_buffers"]}),Li("ProgramConfigurationSet",Mo);var Ro={min:-1*Math.pow(2,14),max:Math.pow(2,14)-1};function Bo(t){for(var e=8192/t.extent,r=t.loadGeometry(),i=0;i<r.length;i++)for(var n=r[i],o=0;o<n.length;o++){var a=n[o];a.x=Math.round(a.x*e),a.y=Math.round(a.y*e),(a.x<Ro.min||a.x>Ro.max||a.y<Ro.min||a.y>Ro.max)&&(b("Geometry exceeds allowed extent, reduce your vector tile buffer size"),a.x=l(a.x,Ro.min,Ro.max),a.y=l(a.y,Ro.min,Ro.max))}return r}function Fo(t,e,r,i,n){t.emplaceBack(2*e+(i+1)/2,2*r+(n+1)/2)}var Oo=function(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(function(t){return t.id}),this.index=t.index,this.hasPattern=!1,this.layoutVertexArray=new In,this.indexArray=new Fn,this.segments=new no,this.programConfigurations=new Mo(io,t.layers,t.zoom),this.stateDependentLayerIds=this.layers.filter(function(t){return t.isStateDependent()}).map(function(t){return t.id})};function Uo(t,e){for(var r=0;r<t.length;r++)if(Ko(e,t[r]))return!0;for(var i=0;i<e.length;i++)if(Ko(t,e[i]))return!0;return!!qo(t,e)}function Vo(t,e,r){return!!Ko(t,e)||!!Go(e,t,r)}function No(t,e){if(1===t.length)return Wo(e,t[0]);for(var r=0;r<e.length;r++)for(var i=e[r],n=0;n<i.length;n++)if(Ko(t,i[n]))return!0;for(var o=0;o<t.length;o++)if(Wo(e,t[o]))return!0;for(var a=0;a<e.length;a++)if(qo(t,e[a]))return!0;return!1}function jo(t,e,r){if(t.length>1){if(qo(t,e))return!0;for(var i=0;i<e.length;i++)if(Go(e[i],t,r))return!0}for(var n=0;n<t.length;n++)if(Go(t[n],e,r))return!0;return!1}function qo(t,e){if(0===t.length||0===e.length)return!1;for(var r=0;r<t.length-1;r++)for(var i=t[r],n=t[r+1],o=0;o<e.length-1;o++)if(Zo(i,n,e[o],e[o+1]))return!0;return!1}function Zo(t,e,r,i){return w(t,r,i)!==w(e,r,i)&&w(t,e,r)!==w(t,e,i)}function Go(t,e,r){var i=r*r;if(1===e.length)return t.distSqr(e[0])<i;for(var n=1;n<e.length;n++)if(Xo(t,e[n-1],e[n])<i)return!0;return!1}function Xo(t,e,r){var i=e.distSqr(r);if(0===i)return t.distSqr(e);var n=((t.x-e.x)*(r.x-e.x)+(t.y-e.y)*(r.y-e.y))/i;return t.distSqr(n<0?e:n>1?r:r.sub(e)._mult(n)._add(e))}function Wo(t,e){for(var r,i,n,o=!1,a=0;a<t.length;a++)for(var s=0,l=(r=t[a]).length-1;s<r.length;l=s++)(i=r[s]).y>e.y!=(n=r[l]).y>e.y&&e.x<(n.x-i.x)*(e.y-i.y)/(n.y-i.y)+i.x&&(o=!o);return o}function Ko(t,e){for(var r=!1,i=0,n=t.length-1;i<t.length;n=i++){var o=t[i],a=t[n];o.y>e.y!=a.y>e.y&&e.x<(a.x-o.x)*(e.y-o.y)/(a.y-o.y)+o.x&&(r=!r)}return r}function Ho(t,e,r){var i=r[0],n=r[2];if(t.x<i.x&&e.x<i.x||t.x>n.x&&e.x>n.x||t.y<i.y&&e.y<i.y||t.y>n.y&&e.y>n.y)return!1;var o=w(t,e,r[0]);return o!==w(t,e,r[1])||o!==w(t,e,r[2])||o!==w(t,e,r[3])}function Jo(t,e,r){var i=e.paint.get(t).value;return"constant"===i.kind?i.value:r.programConfigurations.get(e.id).getMaxValue(t)}function Yo(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function Qo(t,e,r,i,o){if(!e[0]&&!e[1])return t;var a=n.convert(e)._mult(o);"viewport"===r&&a._rotate(-i);for(var s=[],l=0;l<t.length;l++)s.push(t[l].sub(a));return s}Oo.prototype.populate=function(t,e,r){var i=this.layers[0],n=[],o=null;"circle"===i.type&&(o=i.layout.get("circle-sort-key"));for(var a=0,s=t;a<s.length;a+=1){var l=s[a],u=l.feature,c=l.id,p=l.index,h=l.sourceLayerIndex,f=this.layers[0]._featureFilter.needGeometry,d={type:u.type,id:c,properties:u.properties,geometry:f?Bo(u):[]};if(this.layers[0]._featureFilter.filter(new nn(this.zoom),d,r)){f||(d.geometry=Bo(u));var m=o?o.evaluate(d,{},r):void 0;n.push({id:c,properties:u.properties,type:u.type,sourceLayerIndex:h,index:p,geometry:d.geometry,patterns:{},sortKey:m})}}o&&n.sort(function(t,e){return t.sortKey-e.sortKey});for(var y=0,g=n;y<g.length;y+=1){var _=g[y],v=_.geometry,x=_.index,b=_.sourceLayerIndex,w=t[x].feature;this.addFeature(_,v,x,r),e.featureIndex.insert(w,v,x,b,this.index)}},Oo.prototype.update=function(t,e,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,r)},Oo.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},Oo.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},Oo.prototype.upload=function(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,io),this.indexBuffer=t.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(t),this.uploaded=!0},Oo.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},Oo.prototype.addFeature=function(t,e,r,i){for(var n=0,o=e;n<o.length;n+=1)for(var a=0,s=o[n];a<s.length;a+=1){var l=s[a],u=l.x,c=l.y;if(!(u<0||u>=8192||c<0||c>=8192)){var p=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,t.sortKey),h=p.vertexLength;Fo(this.layoutVertexArray,u,c,-1,-1),Fo(this.layoutVertexArray,u,c,1,-1),Fo(this.layoutVertexArray,u,c,1,1),Fo(this.layoutVertexArray,u,c,-1,1),this.indexArray.emplaceBack(h,h+1,h+2),this.indexArray.emplaceBack(h,h+3,h+2),p.vertexLength+=4,p.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,r,{},i)},Li("CircleBucket",Oo,{omit:["layers"]});var $o=new _n({"circle-sort-key":new dn(Et.layout_circle["circle-sort-key"])}),ta={paint:new _n({"circle-radius":new dn(Et.paint_circle["circle-radius"]),"circle-color":new dn(Et.paint_circle["circle-color"]),"circle-blur":new dn(Et.paint_circle["circle-blur"]),"circle-opacity":new dn(Et.paint_circle["circle-opacity"]),"circle-translate":new fn(Et.paint_circle["circle-translate"]),"circle-translate-anchor":new fn(Et.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new fn(Et.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new fn(Et.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new dn(Et.paint_circle["circle-stroke-width"]),"circle-stroke-color":new dn(Et.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new dn(Et.paint_circle["circle-stroke-opacity"])}),layout:$o},ea="undefined"!=typeof Float32Array?Float32Array:Array;function ra(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function ia(t,e,r){var i=e[0],n=e[1],o=e[2],a=e[3],s=e[4],l=e[5],u=e[6],c=e[7],p=e[8],h=e[9],f=e[10],d=e[11],m=e[12],y=e[13],g=e[14],_=e[15],v=r[0],x=r[1],b=r[2],w=r[3];return t[0]=v*i+x*s+b*p+w*m,t[1]=v*n+x*l+b*h+w*y,t[2]=v*o+x*u+b*f+w*g,t[3]=v*a+x*c+b*d+w*_,t[4]=(v=r[4])*i+(x=r[5])*s+(b=r[6])*p+(w=r[7])*m,t[5]=v*n+x*l+b*h+w*y,t[6]=v*o+x*u+b*f+w*g,t[7]=v*a+x*c+b*d+w*_,t[8]=(v=r[8])*i+(x=r[9])*s+(b=r[10])*p+(w=r[11])*m,t[9]=v*n+x*l+b*h+w*y,t[10]=v*o+x*u+b*f+w*g,t[11]=v*a+x*c+b*d+w*_,t[12]=(v=r[12])*i+(x=r[13])*s+(b=r[14])*p+(w=r[15])*m,t[13]=v*n+x*l+b*h+w*y,t[14]=v*o+x*u+b*f+w*g,t[15]=v*a+x*c+b*d+w*_,t}Math.hypot||(Math.hypot=function(){for(var t=arguments,e=0,r=arguments.length;r--;)e+=t[r]*t[r];return Math.sqrt(e)});var na,oa=ia;function aa(t,e,r){var i=e[0],n=e[1],o=e[2],a=e[3];return t[0]=r[0]*i+r[4]*n+r[8]*o+r[12]*a,t[1]=r[1]*i+r[5]*n+r[9]*o+r[13]*a,t[2]=r[2]*i+r[6]*n+r[10]*o+r[14]*a,t[3]=r[3]*i+r[7]*n+r[11]*o+r[15]*a,t}na=new ea(3),ea!=Float32Array&&(na[0]=0,na[1]=0,na[2]=0),function(){var t=new ea(4);ea!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0)}();var sa=(function(){var t=new ea(2);ea!=Float32Array&&(t[0]=0,t[1]=0)}(),function(t){function e(e){t.call(this,e,ta)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.createBucket=function(t){return new Oo(t)},e.prototype.queryRadius=function(t){var e=t;return Jo("circle-radius",this,e)+Jo("circle-stroke-width",this,e)+Yo(this.paint.get("circle-translate"))},e.prototype.queryIntersectsFeature=function(t,e,r,i,n,o,a,s){for(var l=Qo(t,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),o.angle,a),u=this.paint.get("circle-radius").evaluate(e,r)+this.paint.get("circle-stroke-width").evaluate(e,r),c="map"===this.paint.get("circle-pitch-alignment"),p=c?l:function(t,e){return l.map(function(t){return la(t,e)})}(0,s),h=c?u*a:u,f=0,d=i;f<d.length;f+=1)for(var m=0,y=d[f];m<y.length;m+=1){var g=y[m],_=c?g:la(g,s),v=h,x=aa([],[g.x,g.y,0,1],s);if("viewport"===this.paint.get("circle-pitch-scale")&&"map"===this.paint.get("circle-pitch-alignment")?v*=x[3]/o.cameraToCenterDistance:"map"===this.paint.get("circle-pitch-scale")&&"viewport"===this.paint.get("circle-pitch-alignment")&&(v*=o.cameraToCenterDistance/x[3]),Vo(p,_,v))return!0}return!1},e}(vn));function la(t,e){var r=aa([],[t.x,t.y,0,1],e);return new n(r[0]/r[3],r[1]/r[3])}var ua=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e}(Oo);function ca(t,e,r,i){var n=e.width,o=e.height;if(i){if(i instanceof Uint8ClampedArray)i=new Uint8Array(i.buffer);else if(i.length!==n*o*r)throw new RangeError("mismatched image size")}else i=new Uint8Array(n*o*r);return t.width=n,t.height=o,t.data=i,t}function pa(t,e,r){var i=e.width,n=e.height;if(i!==t.width||n!==t.height){var o=ca({},{width:i,height:n},r);ha(t,o,{x:0,y:0},{x:0,y:0},{width:Math.min(t.width,i),height:Math.min(t.height,n)},r),t.width=i,t.height=n,t.data=o.data}}function ha(t,e,r,i,n,o){if(0===n.width||0===n.height)return e;if(n.width>t.width||n.height>t.height||r.x>t.width-n.width||r.y>t.height-n.height)throw new RangeError("out of range source coordinates for image copy");if(n.width>e.width||n.height>e.height||i.x>e.width-n.width||i.y>e.height-n.height)throw new RangeError("out of range destination coordinates for image copy");for(var a=t.data,s=e.data,l=0;l<n.height;l++)for(var u=((r.y+l)*t.width+r.x)*o,c=((i.y+l)*e.width+i.x)*o,p=0;p<n.width*o;p++)s[c+p]=a[u+p];return e}Li("HeatmapBucket",ua,{omit:["layers"]});var fa=function(t,e){ca(this,t,1,e)};fa.prototype.resize=function(t){pa(this,t,1)},fa.prototype.clone=function(){return new fa({width:this.width,height:this.height},new Uint8Array(this.data))},fa.copy=function(t,e,r,i,n){ha(t,e,r,i,n,1)};var da=function(t,e){ca(this,t,4,e)};da.prototype.resize=function(t){pa(this,t,4)},da.prototype.replace=function(t,e){e?this.data.set(t):this.data=t instanceof Uint8ClampedArray?new Uint8Array(t.buffer):t},da.prototype.clone=function(){return new da({width:this.width,height:this.height},new Uint8Array(this.data))},da.copy=function(t,e,r,i,n){ha(t,e,r,i,n,4)},Li("AlphaImage",fa),Li("RGBAImage",da);var ma={paint:new _n({"heatmap-radius":new dn(Et.paint_heatmap["heatmap-radius"]),"heatmap-weight":new dn(Et.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new fn(Et.paint_heatmap["heatmap-intensity"]),"heatmap-color":new gn(Et.paint_heatmap["heatmap-color"]),"heatmap-opacity":new fn(Et.paint_heatmap["heatmap-opacity"])})};function ya(t,e){for(var r=new Uint8Array(1024),i={},n=0,o=0;n<256;n++,o+=4){i[e]=n/255;var a=t.evaluate(i);r[o+0]=Math.floor(255*a.r/a.a),r[o+1]=Math.floor(255*a.g/a.a),r[o+2]=Math.floor(255*a.b/a.a),r[o+3]=Math.floor(255*a.a)}return new da({width:256,height:1},r)}var ga=function(t){function e(e){t.call(this,e,ma),this._updateColorRamp()}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.createBucket=function(t){return new ua(t)},e.prototype._handleSpecialPaintPropertyUpdate=function(t){"heatmap-color"===t&&this._updateColorRamp()},e.prototype._updateColorRamp=function(){this.colorRamp=ya(this._transitionablePaint._values["heatmap-color"].value.expression,"heatmapDensity"),this.colorRampTexture=null},e.prototype.resize=function(){this.heatmapFbo&&(this.heatmapFbo.destroy(),this.heatmapFbo=null)},e.prototype.queryRadius=function(){return 0},e.prototype.queryIntersectsFeature=function(){return!1},e.prototype.hasOffscreenPass=function(){return 0!==this.paint.get("heatmap-opacity")&&"none"!==this.visibility},e}(vn),_a={paint:new _n({"hillshade-illumination-direction":new fn(Et.paint_hillshade["hillshade-illumination-direction"]),"hillshade-illumination-anchor":new fn(Et.paint_hillshade["hillshade-illumination-anchor"]),"hillshade-exaggeration":new fn(Et.paint_hillshade["hillshade-exaggeration"]),"hillshade-shadow-color":new fn(Et.paint_hillshade["hillshade-shadow-color"]),"hillshade-highlight-color":new fn(Et.paint_hillshade["hillshade-highlight-color"]),"hillshade-accent-color":new fn(Et.paint_hillshade["hillshade-accent-color"])})},va=function(t){function e(e){t.call(this,e,_a)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.hasOffscreenPass=function(){return 0!==this.paint.get("hillshade-exaggeration")&&"none"!==this.visibility},e}(vn),xa=Sn([{name:"a_pos",components:2,type:"Int16"}],4).members,ba=Sa,wa=Sa;function Sa(t,e,r){r=r||2;var i,n,o,a,s,l,u,c=e&&e.length,p=c?e[0]*r:t.length,h=Ta(t,0,p,r,!0),f=[];if(!h||h.next===h.prev)return f;if(c&&(h=function(t,e,r,i){var n,o,a,s=[];for(n=0,o=e.length;n<o;n++)(a=Ta(t,e[n]*i,n<o-1?e[n+1]*i:t.length,i,!1))===a.next&&(a.steiner=!0),s.push(Ra(a));for(s.sort(ka),n=0;n<s.length;n++)Ma(s[n],r),r=Ia(r,r.next);return r}(t,e,h,r)),t.length>80*r){i=o=t[0],n=a=t[1];for(var d=r;d<p;d+=r)(s=t[d])<i&&(i=s),(l=t[d+1])<n&&(n=l),s>o&&(o=s),l>a&&(a=l);u=0!==(u=Math.max(o-i,a-n))?1/u:0}return Ea(h,f,r,i,n,u),f}function Ta(t,e,r,i,n){var o,a;if(n===Ka(t,e,r,i)>0)for(o=e;o<r;o+=i)a=Ga(o,t[o],t[o+1],a);else for(o=r-i;o>=e;o-=i)a=Ga(o,t[o],t[o+1],a);return a&&Ua(a,a.next)&&(Xa(a),a=a.next),a}function Ia(t,e){if(!t)return t;e||(e=t);var r,i=t;do{if(r=!1,i.steiner||!Ua(i,i.next)&&0!==Oa(i.prev,i,i.next))i=i.next;else{if(Xa(i),(i=e=i.prev)===i.next)break;r=!0}}while(r||i!==e);return e}function Ea(t,e,r,i,n,o,a){if(t){!a&&o&&function(t,e,r,i){var n=t;do{null===n.z&&(n.z=La(n.x,n.y,e,r,i)),n.prevZ=n.prev,n.nextZ=n.next,n=n.next}while(n!==t);n.prevZ.nextZ=null,n.prevZ=null,function(t){var e,r,i,n,o,a,s,l,u=1;do{for(r=t,t=null,o=null,a=0;r;){for(a++,i=r,s=0,e=0;e<u&&(s++,i=i.nextZ);e++);for(l=u;s>0||l>0&&i;)0!==s&&(0===l||!i||r.z<=i.z)?(n=r,r=r.nextZ,s--):(n=i,i=i.nextZ,l--),o?o.nextZ=n:t=n,n.prevZ=o,o=n;r=i}o.nextZ=null,u*=2}while(a>1)}(n)}(t,i,n,o);for(var s,l,u=t;t.prev!==t.next;)if(s=t.prev,l=t.next,o?za(t,i,n,o):Aa(t))e.push(s.i/r),e.push(t.i/r),e.push(l.i/r),Xa(t),t=l.next,u=l.next;else if((t=l)===u){a?1===a?Ea(t=Pa(Ia(t),e,r),e,r,i,n,o,2):2===a&&Ca(t,e,r,i,n,o):Ea(Ia(t),e,r,i,n,o,1);break}}}function Aa(t){var e=t.prev,r=t,i=t.next;if(Oa(e,r,i)>=0)return!1;for(var n=t.next.next;n!==t.prev;){if(Ba(e.x,e.y,r.x,r.y,i.x,i.y,n.x,n.y)&&Oa(n.prev,n,n.next)>=0)return!1;n=n.next}return!0}function za(t,e,r,i){var n=t.prev,o=t,a=t.next;if(Oa(n,o,a)>=0)return!1;for(var s=n.x>o.x?n.x>a.x?n.x:a.x:o.x>a.x?o.x:a.x,l=n.y>o.y?n.y>a.y?n.y:a.y:o.y>a.y?o.y:a.y,u=La(n.x<o.x?n.x<a.x?n.x:a.x:o.x<a.x?o.x:a.x,n.y<o.y?n.y<a.y?n.y:a.y:o.y<a.y?o.y:a.y,e,r,i),c=La(s,l,e,r,i),p=t.prevZ,h=t.nextZ;p&&p.z>=u&&h&&h.z<=c;){if(p!==t.prev&&p!==t.next&&Ba(n.x,n.y,o.x,o.y,a.x,a.y,p.x,p.y)&&Oa(p.prev,p,p.next)>=0)return!1;if(p=p.prevZ,h!==t.prev&&h!==t.next&&Ba(n.x,n.y,o.x,o.y,a.x,a.y,h.x,h.y)&&Oa(h.prev,h,h.next)>=0)return!1;h=h.nextZ}for(;p&&p.z>=u;){if(p!==t.prev&&p!==t.next&&Ba(n.x,n.y,o.x,o.y,a.x,a.y,p.x,p.y)&&Oa(p.prev,p,p.next)>=0)return!1;p=p.prevZ}for(;h&&h.z<=c;){if(h!==t.prev&&h!==t.next&&Ba(n.x,n.y,o.x,o.y,a.x,a.y,h.x,h.y)&&Oa(h.prev,h,h.next)>=0)return!1;h=h.nextZ}return!0}function Pa(t,e,r){var i=t;do{var n=i.prev,o=i.next.next;!Ua(n,o)&&Va(n,i,i.next,o)&&qa(n,o)&&qa(o,n)&&(e.push(n.i/r),e.push(i.i/r),e.push(o.i/r),Xa(i),Xa(i.next),i=t=o),i=i.next}while(i!==t);return Ia(i)}function Ca(t,e,r,i,n,o){var a=t;do{for(var s=a.next.next;s!==a.prev;){if(a.i!==s.i&&Fa(a,s)){var l=Za(a,s);return a=Ia(a,a.next),l=Ia(l,l.next),Ea(a,e,r,i,n,o),void Ea(l,e,r,i,n,o)}s=s.next}a=a.next}while(a!==t)}function ka(t,e){return t.x-e.x}function Ma(t,e){if(e=function(t,e){var r,i=e,n=t.x,o=t.y,a=-1/0;do{if(o<=i.y&&o>=i.next.y&&i.next.y!==i.y){var s=i.x+(o-i.y)*(i.next.x-i.x)/(i.next.y-i.y);if(s<=n&&s>a){if(a=s,s===n){if(o===i.y)return i;if(o===i.next.y)return i.next}r=i.x<i.next.x?i:i.next}}i=i.next}while(i!==e);if(!r)return null;if(n===a)return r;var l,u=r,c=r.x,p=r.y,h=1/0;i=r;do{n>=i.x&&i.x>=c&&n!==i.x&&Ba(o<p?n:a,o,c,p,o<p?a:n,o,i.x,i.y)&&(l=Math.abs(o-i.y)/(n-i.x),qa(i,t)&&(l<h||l===h&&(i.x>r.x||i.x===r.x&&Da(r,i)))&&(r=i,h=l)),i=i.next}while(i!==u);return r}(t,e)){var r=Za(e,t);Ia(e,e.next),Ia(r,r.next)}}function Da(t,e){return Oa(t.prev,t,e.prev)<0&&Oa(e.next,t,t.next)<0}function La(t,e,r,i,n){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)*n)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-i)*n)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function Ra(t){var e=t,r=t;do{(e.x<r.x||e.x===r.x&&e.y<r.y)&&(r=e),e=e.next}while(e!==t);return r}function Ba(t,e,r,i,n,o,a,s){return(n-a)*(e-s)-(t-a)*(o-s)>=0&&(t-a)*(i-s)-(r-a)*(e-s)>=0&&(r-a)*(o-s)-(n-a)*(i-s)>=0}function Fa(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var r=t;do{if(r.i!==t.i&&r.next.i!==t.i&&r.i!==e.i&&r.next.i!==e.i&&Va(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}(t,e)&&(qa(t,e)&&qa(e,t)&&function(t,e){var r=t,i=!1,n=(t.x+e.x)/2,o=(t.y+e.y)/2;do{r.y>o!=r.next.y>o&&r.next.y!==r.y&&n<(r.next.x-r.x)*(o-r.y)/(r.next.y-r.y)+r.x&&(i=!i),r=r.next}while(r!==t);return i}(t,e)&&(Oa(t.prev,t,e.prev)||Oa(t,e.prev,e))||Ua(t,e)&&Oa(t.prev,t,t.next)>0&&Oa(e.prev,e,e.next)>0)}function Oa(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function Ua(t,e){return t.x===e.x&&t.y===e.y}function Va(t,e,r,i){var n=ja(Oa(t,e,r)),o=ja(Oa(t,e,i)),a=ja(Oa(r,i,t)),s=ja(Oa(r,i,e));return n!==o&&a!==s||!(0!==n||!Na(t,r,e))||!(0!==o||!Na(t,i,e))||!(0!==a||!Na(r,t,i))||!(0!==s||!Na(r,e,i))}function Na(t,e,r){return e.x<=Math.max(t.x,r.x)&&e.x>=Math.min(t.x,r.x)&&e.y<=Math.max(t.y,r.y)&&e.y>=Math.min(t.y,r.y)}function ja(t){return t>0?1:t<0?-1:0}function qa(t,e){return Oa(t.prev,t,t.next)<0?Oa(t,e,t.next)>=0&&Oa(t,t.prev,e)>=0:Oa(t,e,t.prev)<0||Oa(t,t.next,e)<0}function Za(t,e){var r=new Wa(t.i,t.x,t.y),i=new Wa(e.i,e.x,e.y),n=t.next,o=e.prev;return t.next=e,e.prev=t,r.next=n,n.prev=r,i.next=r,r.prev=i,o.next=i,i.prev=o,i}function Ga(t,e,r,i){var n=new Wa(t,e,r);return i?(n.next=i.next,n.prev=i,i.next.prev=n,i.next=n):(n.prev=n,n.next=n),n}function Xa(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function Wa(t,e,r){this.i=t,this.x=e,this.y=r,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function Ka(t,e,r,i){for(var n=0,o=e,a=r-i;o<r;o+=i)n+=(t[a]-t[o])*(t[o+1]+t[a+1]),a=o;return n}function Ha(t,e,r,i,n){!function t(e,r,i,n,o){for(;n>i;){if(n-i>600){var a=n-i+1,s=r-i+1,l=Math.log(a),u=.5*Math.exp(2*l/3),c=.5*Math.sqrt(l*u*(a-u)/a)*(s-a/2<0?-1:1);t(e,r,Math.max(i,Math.floor(r-s*u/a+c)),Math.min(n,Math.floor(r+(a-s)*u/a+c)),o)}var p=e[r],h=i,f=n;for(Ja(e,i,r),o(e[n],p)>0&&Ja(e,i,n);h<f;){for(Ja(e,h,f),h++,f--;o(e[h],p)<0;)h++;for(;o(e[f],p)>0;)f--}0===o(e[i],p)?Ja(e,i,f):Ja(e,++f,n),f<=r&&(i=f+1),r<=f&&(n=f-1)}}(t,e,r||0,i||t.length-1,n||Ya)}function Ja(t,e,r){var i=t[e];t[e]=t[r],t[r]=i}function Ya(t,e){return t<e?-1:t>e?1:0}function Qa(t,e){var r=t.length;if(r<=1)return[t];for(var i,n,o=[],a=0;a<r;a++){var s=S(t[a]);0!==s&&(t[a].area=Math.abs(s),void 0===n&&(n=s<0),n===s<0?(i&&o.push(i),i=[t[a]]):i.push(t[a]))}if(i&&o.push(i),e>1)for(var l=0;l<o.length;l++)o[l].length<=e||(Ha(o[l],e,1,o[l].length-1,$a),o[l]=o[l].slice(0,e));return o}function $a(t,e){return e.area-t.area}function ts(t,e,r){for(var i=r.patternDependencies,n=!1,o=0,a=e;o<a.length;o+=1){var s=a[o].paint.get(t+"-pattern");s.isConstant()||(n=!0);var l=s.constantOr(null);l&&(n=!0,i[l.to]=!0,i[l.from]=!0)}return n}function es(t,e,r,i,n){for(var o=n.patternDependencies,a=0,s=e;a<s.length;a+=1){var l=s[a],u=l.paint.get(t+"-pattern").value;if("constant"!==u.kind){var c=u.evaluate({zoom:i-1},r,{},n.availableImages),p=u.evaluate({zoom:i},r,{},n.availableImages),h=u.evaluate({zoom:i+1},r,{},n.availableImages);p=p&&p.name?p.name:p,h=h&&h.name?h.name:h,o[c=c&&c.name?c.name:c]=!0,o[p]=!0,o[h]=!0,r.patterns[l.id]={min:c,mid:p,max:h}}}return r}Sa.deviation=function(t,e,r,i){var n=e&&e.length,o=Math.abs(Ka(t,0,n?e[0]*r:t.length,r));if(n)for(var a=0,s=e.length;a<s;a++)o-=Math.abs(Ka(t,e[a]*r,a<s-1?e[a+1]*r:t.length,r));var l=0;for(a=0;a<i.length;a+=3){var u=i[a]*r,c=i[a+1]*r,p=i[a+2]*r;l+=Math.abs((t[u]-t[p])*(t[c+1]-t[u+1])-(t[u]-t[c])*(t[p+1]-t[u+1]))}return 0===o&&0===l?0:Math.abs((l-o)/o)},Sa.flatten=function(t){for(var e=t[0][0].length,r={vertices:[],holes:[],dimensions:e},i=0,n=0;n<t.length;n++){for(var o=0;o<t[n].length;o++)for(var a=0;a<e;a++)r.vertices.push(t[n][o][a]);n>0&&r.holes.push(i+=t[n-1].length)}return r},ba.default=wa;var rs=function(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(function(t){return t.id}),this.index=t.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new In,this.indexArray=new Fn,this.indexArray2=new qn,this.programConfigurations=new Mo(xa,t.layers,t.zoom),this.segments=new no,this.segments2=new no,this.stateDependentLayerIds=this.layers.filter(function(t){return t.isStateDependent()}).map(function(t){return t.id})};rs.prototype.populate=function(t,e,r){this.hasPattern=ts("fill",this.layers,e);for(var i=this.layers[0].layout.get("fill-sort-key"),n=[],o=0,a=t;o<a.length;o+=1){var s=a[o],l=s.feature,u=s.id,c=s.index,p=s.sourceLayerIndex,h=this.layers[0]._featureFilter.needGeometry,f={type:l.type,id:u,properties:l.properties,geometry:h?Bo(l):[]};if(this.layers[0]._featureFilter.filter(new nn(this.zoom),f,r)){h||(f.geometry=Bo(l));var d=i?i.evaluate(f,{},r,e.availableImages):void 0;n.push({id:u,properties:l.properties,type:l.type,sourceLayerIndex:p,index:c,geometry:f.geometry,patterns:{},sortKey:d})}}i&&n.sort(function(t,e){return t.sortKey-e.sortKey});for(var m=0,y=n;m<y.length;m+=1){var g=y[m],_=g.geometry,v=g.index,x=g.sourceLayerIndex;if(this.hasPattern){var b=es("fill",this.layers,g,this.zoom,e);this.patternFeatures.push(b)}else this.addFeature(g,_,v,r,{});e.featureIndex.insert(t[v].feature,_,v,x,this.index)}},rs.prototype.update=function(t,e,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,r)},rs.prototype.addFeatures=function(t,e,r){for(var i=0,n=this.patternFeatures;i<n.length;i+=1){var o=n[i];this.addFeature(o,o.geometry,o.index,e,r)}},rs.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},rs.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},rs.prototype.upload=function(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,xa),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.indexBuffer2=t.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(t),this.uploaded=!0},rs.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())},rs.prototype.addFeature=function(t,e,r,i,n){for(var o=0,a=Qa(e,500);o<a.length;o+=1){for(var s=a[o],l=0,u=0,c=s;u<c.length;u+=1)l+=c[u].length;for(var p=this.segments.prepareSegment(l,this.layoutVertexArray,this.indexArray),h=p.vertexLength,f=[],d=[],m=0,y=s;m<y.length;m+=1){var g=y[m];if(0!==g.length){g!==s[0]&&d.push(f.length/2);var _=this.segments2.prepareSegment(g.length,this.layoutVertexArray,this.indexArray2),v=_.vertexLength;this.layoutVertexArray.emplaceBack(g[0].x,g[0].y),this.indexArray2.emplaceBack(v+g.length-1,v),f.push(g[0].x),f.push(g[0].y);for(var x=1;x<g.length;x++)this.layoutVertexArray.emplaceBack(g[x].x,g[x].y),this.indexArray2.emplaceBack(v+x-1,v+x),f.push(g[x].x),f.push(g[x].y);_.vertexLength+=g.length,_.primitiveLength+=g.length}}for(var b=ba(f,d),w=0;w<b.length;w+=3)this.indexArray.emplaceBack(h+b[w],h+b[w+1],h+b[w+2]);p.vertexLength+=l,p.primitiveLength+=b.length/3}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,r,n,i)},Li("FillBucket",rs,{omit:["layers","patternFeatures"]});var is=new _n({"fill-sort-key":new dn(Et.layout_fill["fill-sort-key"])}),ns={paint:new _n({"fill-antialias":new fn(Et.paint_fill["fill-antialias"]),"fill-opacity":new dn(Et.paint_fill["fill-opacity"]),"fill-color":new dn(Et.paint_fill["fill-color"]),"fill-outline-color":new dn(Et.paint_fill["fill-outline-color"]),"fill-translate":new fn(Et.paint_fill["fill-translate"]),"fill-translate-anchor":new fn(Et.paint_fill["fill-translate-anchor"]),"fill-pattern":new mn(Et.paint_fill["fill-pattern"])}),layout:is},os=function(t){function e(e){t.call(this,e,ns)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.recalculate=function(e,r){t.prototype.recalculate.call(this,e,r);var i=this.paint._values["fill-outline-color"];"constant"===i.value.kind&&void 0===i.value.value&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])},e.prototype.createBucket=function(t){return new rs(t)},e.prototype.queryRadius=function(){return Yo(this.paint.get("fill-translate"))},e.prototype.queryIntersectsFeature=function(t,e,r,i,n,o,a){return No(Qo(t,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),o.angle,a),i)},e.prototype.isTileClipped=function(){return!0},e}(vn),as=Sn([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4).members,ss=ls;function ls(t,e,r,i,n){this.properties={},this.extent=r,this.type=0,this._pbf=t,this._geometry=-1,this._keys=i,this._values=n,t.readFields(us,this,e)}function us(t,e,r){1==t?e.id=r.readVarint():2==t?function(t,e){for(var r=t.readVarint()+t.pos;t.pos<r;){var i=e._keys[t.readVarint()],n=e._values[t.readVarint()];e.properties[i]=n}}(r,e):3==t?e.type=r.readVarint():4==t&&(e._geometry=r.pos)}function cs(t){for(var e,r,i=0,n=0,o=t.length,a=o-1;n<o;a=n++)i+=((r=t[a]).x-(e=t[n]).x)*(e.y+r.y);return i}ls.types=["Unknown","Point","LineString","Polygon"],ls.prototype.loadGeometry=function(){var t=this._pbf;t.pos=this._geometry;for(var e,r=t.readVarint()+t.pos,i=1,o=0,a=0,s=0,l=[];t.pos<r;){if(o<=0){var u=t.readVarint();i=7&u,o=u>>3}if(o--,1===i||2===i)a+=t.readSVarint(),s+=t.readSVarint(),1===i&&(e&&l.push(e),e=[]),e.push(new n(a,s));else{if(7!==i)throw new Error("unknown command "+i);e&&e.push(e[0].clone())}}return e&&l.push(e),l},ls.prototype.bbox=function(){var t=this._pbf;t.pos=this._geometry;for(var e=t.readVarint()+t.pos,r=1,i=0,n=0,o=0,a=1/0,s=-1/0,l=1/0,u=-1/0;t.pos<e;){if(i<=0){var c=t.readVarint();r=7&c,i=c>>3}if(i--,1===r||2===r)(n+=t.readSVarint())<a&&(a=n),n>s&&(s=n),(o+=t.readSVarint())<l&&(l=o),o>u&&(u=o);else if(7!==r)throw new Error("unknown command "+r)}return[a,l,s,u]},ls.prototype.toGeoJSON=function(t,e,r){var i,n,o=this.extent*Math.pow(2,r),a=this.extent*t,s=this.extent*e,l=this.loadGeometry(),u=ls.types[this.type];function c(t){for(var e=0;e<t.length;e++){var r=t[e];t[e]=[360*(r.x+a)/o-180,360/Math.PI*Math.atan(Math.exp((180-360*(r.y+s)/o)*Math.PI/180))-90]}}switch(this.type){case 1:var p=[];for(i=0;i<l.length;i++)p[i]=l[i][0];c(l=p);break;case 2:for(i=0;i<l.length;i++)c(l[i]);break;case 3:for(l=function(t){var e=t.length;if(e<=1)return[t];for(var r,i,n=[],o=0;o<e;o++){var a=cs(t[o]);0!==a&&(void 0===i&&(i=a<0),i===a<0?(r&&n.push(r),r=[t[o]]):r.push(t[o]))}return r&&n.push(r),n}(l),i=0;i<l.length;i++)for(n=0;n<l[i].length;n++)c(l[i][n])}1===l.length?l=l[0]:u="Multi"+u;var h={type:"Feature",geometry:{type:u,coordinates:l},properties:this.properties};return"id"in this&&(h.id=this.id),h};var ps=hs;function hs(t,e){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=t,this._keys=[],this._values=[],this._features=[],t.readFields(fs,this,e),this.length=this._features.length}function fs(t,e,r){15===t?e.version=r.readVarint():1===t?e.name=r.readString():5===t?e.extent=r.readVarint():2===t?e._features.push(r.pos):3===t?e._keys.push(r.readString()):4===t&&e._values.push(function(t){for(var e=null,r=t.readVarint()+t.pos;t.pos<r;){var i=t.readVarint()>>3;e=1===i?t.readString():2===i?t.readFloat():3===i?t.readDouble():4===i?t.readVarint64():5===i?t.readVarint():6===i?t.readSVarint():7===i?t.readBoolean():null}return e}(r))}function ds(t,e,r){if(3===t){var i=new ps(r,r.readVarint()+r.pos);i.length&&(e[i.name]=i)}}hs.prototype.feature=function(t){if(t<0||t>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[t];var e=this._pbf.readVarint()+this._pbf.pos;return new ss(this._pbf,e,this.extent,this._keys,this._values)};var ms={VectorTile:function(t,e){this.layers=t.readFields(ds,{},e)},VectorTileFeature:ss,VectorTileLayer:ps},ys=ms.VectorTileFeature.types,gs=Math.pow(2,13);function _s(t,e,r,i,n,o,a,s){t.emplaceBack(e,r,2*Math.floor(i*gs)+a,n*gs*2,o*gs*2,Math.round(s))}var vs=function(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(function(t){return t.id}),this.index=t.index,this.hasPattern=!1,this.layoutVertexArray=new An,this.indexArray=new Fn,this.programConfigurations=new Mo(as,t.layers,t.zoom),this.segments=new no,this.stateDependentLayerIds=this.layers.filter(function(t){return t.isStateDependent()}).map(function(t){return t.id})};function xs(t,e){return t.x===e.x&&(t.x<0||t.x>8192)||t.y===e.y&&(t.y<0||t.y>8192)}vs.prototype.populate=function(t,e,r){this.features=[],this.hasPattern=ts("fill-extrusion",this.layers,e);for(var i=0,n=t;i<n.length;i+=1){var o=n[i],a=o.feature,s=o.id,l=o.index,u=o.sourceLayerIndex,c=this.layers[0]._featureFilter.needGeometry,p={type:a.type,id:s,properties:a.properties,geometry:c?Bo(a):[]};if(this.layers[0]._featureFilter.filter(new nn(this.zoom),p,r)){var h={id:s,sourceLayerIndex:u,index:l,geometry:c?p.geometry:Bo(a),properties:a.properties,type:a.type,patterns:{}};void 0!==a.id&&(h.id=a.id),this.hasPattern?this.features.push(es("fill-extrusion",this.layers,h,this.zoom,e)):this.addFeature(h,h.geometry,l,r,{}),e.featureIndex.insert(a,h.geometry,l,u,this.index,!0)}}},vs.prototype.addFeatures=function(t,e,r){for(var i=0,n=this.features;i<n.length;i+=1){var o=n[i];this.addFeature(o,o.geometry,o.index,e,r)}},vs.prototype.update=function(t,e,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,r)},vs.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},vs.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},vs.prototype.upload=function(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,as),this.indexBuffer=t.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(t),this.uploaded=!0},vs.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},vs.prototype.addFeature=function(t,e,r,i,n){for(var o=0,a=Qa(e,500);o<a.length;o+=1){for(var s=a[o],l=0,u=0,c=s;u<c.length;u+=1)l+=c[u].length;for(var p=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray),h=0,f=s;h<f.length;h+=1){var d=f[h];if(0!==d.length&&!((M=d).every(function(t){return t.x<0})||M.every(function(t){return t.x>8192})||M.every(function(t){return t.y<0})||M.every(function(t){return t.y>8192})))for(var m=0,y=0;y<d.length;y++){var g=d[y];if(y>=1){var _=d[y-1];if(!xs(g,_)){p.vertexLength+4>no.MAX_VERTEX_ARRAY_LENGTH&&(p=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var v=g.sub(_)._perp()._unit(),x=_.dist(g);m+x>32768&&(m=0),_s(this.layoutVertexArray,g.x,g.y,v.x,v.y,0,0,m),_s(this.layoutVertexArray,g.x,g.y,v.x,v.y,0,1,m),_s(this.layoutVertexArray,_.x,_.y,v.x,v.y,0,0,m+=x),_s(this.layoutVertexArray,_.x,_.y,v.x,v.y,0,1,m);var b=p.vertexLength;this.indexArray.emplaceBack(b,b+2,b+1),this.indexArray.emplaceBack(b+1,b+2,b+3),p.vertexLength+=4,p.primitiveLength+=2}}}}if(p.vertexLength+l>no.MAX_VERTEX_ARRAY_LENGTH&&(p=this.segments.prepareSegment(l,this.layoutVertexArray,this.indexArray)),"Polygon"===ys[t.type]){for(var w=[],S=[],T=p.vertexLength,I=0,E=s;I<E.length;I+=1){var A=E[I];if(0!==A.length){A!==s[0]&&S.push(w.length/2);for(var z=0;z<A.length;z++){var P=A[z];_s(this.layoutVertexArray,P.x,P.y,0,0,1,1,0),w.push(P.x),w.push(P.y)}}}for(var C=ba(w,S),k=0;k<C.length;k+=3)this.indexArray.emplaceBack(T+C[k],T+C[k+2],T+C[k+1]);p.primitiveLength+=C.length/3,p.vertexLength+=l}}var M;this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,r,n,i)},Li("FillExtrusionBucket",vs,{omit:["layers","features"]});var bs={paint:new _n({"fill-extrusion-opacity":new fn(Et["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new dn(Et["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new fn(Et["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new fn(Et["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new mn(Et["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new dn(Et["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new dn(Et["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new fn(Et["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})},ws=function(t){function e(e){t.call(this,e,bs)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.createBucket=function(t){return new vs(t)},e.prototype.queryRadius=function(){return Yo(this.paint.get("fill-extrusion-translate"))},e.prototype.is3D=function(){return!0},e.prototype.queryIntersectsFeature=function(t,e,r,i,o,a,s,l){var u=Qo(t,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),a.angle,s),c=this.paint.get("fill-extrusion-height").evaluate(e,r),p=this.paint.get("fill-extrusion-base").evaluate(e,r),h=function(t,e,r,i){for(var o=[],a=0,s=t;a<s.length;a+=1){var l=s[a],u=[l.x,l.y,0,1];aa(u,u,e),o.push(new n(u[0]/u[3],u[1]/u[3]))}return o}(u,l),f=function(t,e,r,i){for(var o=[],a=[],s=i[8]*e,l=i[9]*e,u=i[10]*e,c=i[11]*e,p=i[8]*r,h=i[9]*r,f=i[10]*r,d=i[11]*r,m=0,y=t;m<y.length;m+=1){for(var g=[],_=[],v=0,x=y[m];v<x.length;v+=1){var b=x[v],w=b.x,S=b.y,T=i[0]*w+i[4]*S+i[12],I=i[1]*w+i[5]*S+i[13],E=i[2]*w+i[6]*S+i[14],A=i[3]*w+i[7]*S+i[15],z=E+u,P=A+c,C=T+p,k=I+h,M=E+f,D=A+d,L=new n((T+s)/P,(I+l)/P);L.z=z/P,g.push(L);var R=new n(C/D,k/D);R.z=M/D,_.push(R)}o.push(g),a.push(_)}return[o,a]}(i,p,c,l);return function(t,e,r){var i=1/0;No(r,e)&&(i=Ts(r,e[0]));for(var n=0;n<e.length;n++)for(var o=e[n],a=t[n],s=0;s<o.length-1;s++){var l=o[s],u=[l,o[s+1],a[s+1],a[s],l];Uo(r,u)&&(i=Math.min(i,Ts(r,u)))}return i!==1/0&&i}(f[0],f[1],h)},e}(vn);function Ss(t,e){return t.x*e.x+t.y*e.y}function Ts(t,e){if(1===t.length){for(var r,i=0,n=e[i++];!r||n.equals(r);)if(!(r=e[i++]))return 1/0;for(;i<e.length;i++){var o=e[i],a=t[0],s=r.sub(n),l=o.sub(n),u=a.sub(n),c=Ss(s,s),p=Ss(s,l),h=Ss(l,l),f=Ss(u,s),d=Ss(u,l),m=c*h-p*p,y=(h*f-p*d)/m,g=(c*d-p*f)/m,_=n.z*(1-y-g)+r.z*y+o.z*g;if(isFinite(_))return _}return 1/0}for(var v=1/0,x=0,b=e;x<b.length;x+=1)v=Math.min(v,b[x].z);return v}var Is=Sn([{name:"a_pos_normal",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4).members,Es=ms.VectorTileFeature.types,As=Math.cos(Math.PI/180*37.5),zs=Math.pow(2,14)/.5,Ps=function(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(function(t){return t.id}),this.index=t.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new zn,this.indexArray=new Fn,this.programConfigurations=new Mo(Is,t.layers,t.zoom),this.segments=new no,this.stateDependentLayerIds=this.layers.filter(function(t){return t.isStateDependent()}).map(function(t){return t.id})};Ps.prototype.populate=function(t,e,r){this.hasPattern=ts("line",this.layers,e);for(var i=this.layers[0].layout.get("line-sort-key"),n=[],o=0,a=t;o<a.length;o+=1){var s=a[o],l=s.feature,u=s.id,c=s.index,p=s.sourceLayerIndex,h=this.layers[0]._featureFilter.needGeometry,f={type:l.type,id:u,properties:l.properties,geometry:h?Bo(l):[]};if(this.layers[0]._featureFilter.filter(new nn(this.zoom),f,r)){h||(f.geometry=Bo(l));var d=i?i.evaluate(f,{},r):void 0;n.push({id:u,properties:l.properties,type:l.type,sourceLayerIndex:p,index:c,geometry:f.geometry,patterns:{},sortKey:d})}}i&&n.sort(function(t,e){return t.sortKey-e.sortKey});for(var m=0,y=n;m<y.length;m+=1){var g=y[m],_=g.geometry,v=g.index,x=g.sourceLayerIndex;if(this.hasPattern){var b=es("line",this.layers,g,this.zoom,e);this.patternFeatures.push(b)}else this.addFeature(g,_,v,r,{});e.featureIndex.insert(t[v].feature,_,v,x,this.index)}},Ps.prototype.update=function(t,e,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,r)},Ps.prototype.addFeatures=function(t,e,r){for(var i=0,n=this.patternFeatures;i<n.length;i+=1){var o=n[i];this.addFeature(o,o.geometry,o.index,e,r)}},Ps.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},Ps.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},Ps.prototype.upload=function(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,Is),this.indexBuffer=t.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(t),this.uploaded=!0},Ps.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},Ps.prototype.addFeature=function(t,e,r,i,n){for(var o=this.layers[0].layout,a=o.get("line-join").evaluate(t,{}),s=o.get("line-cap"),l=o.get("line-miter-limit"),u=o.get("line-round-limit"),c=0,p=e;c<p.length;c+=1)this.addLine(p[c],t,a,s,l,u);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,r,n,i)},Ps.prototype.addLine=function(t,e,r,i,n,o){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,e.properties&&e.properties.hasOwnProperty("mapbox_clip_start")&&e.properties.hasOwnProperty("mapbox_clip_end")){this.clipStart=+e.properties.mapbox_clip_start,this.clipEnd=+e.properties.mapbox_clip_end;for(var a=0;a<t.length-1;a++)this.totalDistance+=t[a].dist(t[a+1]);this.updateScaledDistance()}for(var s="Polygon"===Es[e.type],l=t.length;l>=2&&t[l-1].equals(t[l-2]);)l--;for(var u=0;u<l-1&&t[u].equals(t[u+1]);)u++;if(!(l<(s?3:2))){"bevel"===r&&(n=1.05);var c,p=this.overscaling<=16?122880/(512*this.overscaling):0,h=this.segments.prepareSegment(10*l,this.layoutVertexArray,this.indexArray),f=void 0,d=void 0,m=void 0,y=void 0;this.e1=this.e2=-1,s&&(y=t[u].sub(c=t[l-2])._unit()._perp());for(var g=u;g<l;g++)if(!(d=g===l-1?s?t[u+1]:void 0:t[g+1])||!t[g].equals(d)){y&&(m=y),c&&(f=c),c=t[g],y=d?d.sub(c)._unit()._perp():m;var _=(m=m||y).add(y);0===_.x&&0===_.y||_._unit();var v=m.x*y.x+m.y*y.y,x=_.x*y.x+_.y*y.y,b=0!==x?1/x:1/0,w=2*Math.sqrt(2-2*x),S=x<As&&f&&d,T=m.x*y.y-m.y*y.x>0;if(S&&g>u){var I=c.dist(f);if(I>2*p){var E=c.sub(c.sub(f)._mult(p/I)._round());this.updateDistance(f,E),this.addCurrentVertex(E,m,0,0,h),f=E}}var A=f&&d,z=A?r:s?"butt":i;if(A&&"round"===z&&(b<o?z="miter":b<=2&&(z="fakeround")),"miter"===z&&b>n&&(z="bevel"),"bevel"===z&&(b>2&&(z="flipbevel"),b<n&&(z="miter")),f&&this.updateDistance(f,c),"miter"===z)_._mult(b),this.addCurrentVertex(c,_,0,0,h);else if("flipbevel"===z){if(b>100)_=y.mult(-1);else{var P=b*m.add(y).mag()/m.sub(y).mag();_._perp()._mult(P*(T?-1:1))}this.addCurrentVertex(c,_,0,0,h),this.addCurrentVertex(c,_.mult(-1),0,0,h)}else if("bevel"===z||"fakeround"===z){var C=-Math.sqrt(b*b-1),k=T?C:0,M=T?0:C;if(f&&this.addCurrentVertex(c,m,k,M,h),"fakeround"===z)for(var D=Math.round(180*w/Math.PI/20),L=1;L<D;L++){var R=L/D;if(.5!==R){var B=R-.5;R+=R*B*(R-1)*((1.0904+v*(v*(3.55645-1.43519*v)-3.2452))*B*B+(.848013+v*(.215638*v-1.06021)))}var F=y.sub(m)._mult(R)._add(m)._unit()._mult(T?-1:1);this.addHalfVertex(c,F.x,F.y,!1,T,0,h)}d&&this.addCurrentVertex(c,y,-k,-M,h)}else if("butt"===z)this.addCurrentVertex(c,_,0,0,h);else if("square"===z){var O=f?1:-1;this.addCurrentVertex(c,_,O,O,h)}else"round"===z&&(f&&(this.addCurrentVertex(c,m,0,0,h),this.addCurrentVertex(c,m,1,1,h,!0)),d&&(this.addCurrentVertex(c,y,-1,-1,h,!0),this.addCurrentVertex(c,y,0,0,h)));if(S&&g<l-1){var U=c.dist(d);if(U>2*p){var V=c.add(d.sub(c)._mult(p/U)._round());this.updateDistance(c,V),this.addCurrentVertex(V,y,0,0,h),c=V}}}}},Ps.prototype.addCurrentVertex=function(t,e,r,i,n,o){void 0===o&&(o=!1);var a=e.y*i-e.x,s=-e.y-e.x*i;this.addHalfVertex(t,e.x+e.y*r,e.y-e.x*r,o,!1,r,n),this.addHalfVertex(t,a,s,o,!0,-i,n),this.distance>zs/2&&0===this.totalDistance&&(this.distance=0,this.addCurrentVertex(t,e,r,i,n,o))},Ps.prototype.addHalfVertex=function(t,e,r,i,n,o,a){var s=.5*this.scaledDistance;this.layoutVertexArray.emplaceBack((t.x<<1)+(i?1:0),(t.y<<1)+(n?1:0),Math.round(63*e)+128,Math.round(63*r)+128,1+(0===o?0:o<0?-1:1)|(63&s)<<2,s>>6);var l=a.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,l),a.primitiveLength++),n?this.e2=l:this.e1=l},Ps.prototype.updateScaledDistance=function(){this.scaledDistance=this.totalDistance>0?(this.clipStart+(this.clipEnd-this.clipStart)*this.distance/this.totalDistance)*(zs-1):this.distance},Ps.prototype.updateDistance=function(t,e){this.distance+=t.dist(e),this.updateScaledDistance()},Li("LineBucket",Ps,{omit:["layers","patternFeatures"]});var Cs=new _n({"line-cap":new fn(Et.layout_line["line-cap"]),"line-join":new dn(Et.layout_line["line-join"]),"line-miter-limit":new fn(Et.layout_line["line-miter-limit"]),"line-round-limit":new fn(Et.layout_line["line-round-limit"]),"line-sort-key":new dn(Et.layout_line["line-sort-key"])}),ks={paint:new _n({"line-opacity":new dn(Et.paint_line["line-opacity"]),"line-color":new dn(Et.paint_line["line-color"]),"line-translate":new fn(Et.paint_line["line-translate"]),"line-translate-anchor":new fn(Et.paint_line["line-translate-anchor"]),"line-width":new dn(Et.paint_line["line-width"]),"line-gap-width":new dn(Et.paint_line["line-gap-width"]),"line-offset":new dn(Et.paint_line["line-offset"]),"line-blur":new dn(Et.paint_line["line-blur"]),"line-dasharray":new yn(Et.paint_line["line-dasharray"]),"line-pattern":new mn(Et.paint_line["line-pattern"]),"line-gradient":new gn(Et.paint_line["line-gradient"])}),layout:Cs},Ms=new(function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.possiblyEvaluate=function(e,r){return r=new nn(Math.floor(r.zoom),{now:r.now,fadeDuration:r.fadeDuration,zoomHistory:r.zoomHistory,transition:r.transition}),t.prototype.possiblyEvaluate.call(this,e,r)},e.prototype.evaluate=function(e,r,i,n){return r=c({},r,{zoom:Math.floor(r.zoom)}),t.prototype.evaluate.call(this,e,r,i,n)},e}(dn))(ks.paint.properties["line-width"].specification);Ms.useIntegerZoom=!0;var Ds=function(t){function e(e){t.call(this,e,ks)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._handleSpecialPaintPropertyUpdate=function(t){"line-gradient"===t&&this._updateGradient()},e.prototype._updateGradient=function(){this.gradient=ya(this._transitionablePaint._values["line-gradient"].value.expression,"lineProgress"),this.gradientTexture=null},e.prototype.recalculate=function(e,r){t.prototype.recalculate.call(this,e,r),this.paint._values["line-floorwidth"]=Ms.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,e)},e.prototype.createBucket=function(t){return new Ps(t)},e.prototype.queryRadius=function(t){var e=t,r=Ls(Jo("line-width",this,e),Jo("line-gap-width",this,e)),i=Jo("line-offset",this,e);return r/2+Math.abs(i)+Yo(this.paint.get("line-translate"))},e.prototype.queryIntersectsFeature=function(t,e,r,i,o,a,s){var l=Qo(t,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),a.angle,s),u=s/2*Ls(this.paint.get("line-width").evaluate(e,r),this.paint.get("line-gap-width").evaluate(e,r)),c=this.paint.get("line-offset").evaluate(e,r);return c&&(i=function(t,e){for(var r=[],i=new n(0,0),o=0;o<t.length;o++){for(var a=t[o],s=[],l=0;l<a.length;l++){var u=a[l],c=a[l+1],p=0===l?i:u.sub(a[l-1])._unit()._perp(),h=l===a.length-1?i:c.sub(u)._unit()._perp(),f=p._add(h)._unit();f._mult(1/(f.x*h.x+f.y*h.y)),s.push(f._mult(e)._add(u))}r.push(s)}return r}(i,c*s)),function(t,e,r){for(var i=0;i<e.length;i++){var n=e[i];if(t.length>=3)for(var o=0;o<n.length;o++)if(Ko(t,n[o]))return!0;if(jo(t,n,r))return!0}return!1}(l,i,u)},e.prototype.isTileClipped=function(){return!0},e}(vn);function Ls(t,e){return e>0?e+2*t:t}var Rs=Sn([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),Bs=Sn([{name:"a_projected_pos",components:3,type:"Float32"}],4),Fs=(Sn([{name:"a_fade_opacity",components:1,type:"Uint32"}],4),Sn([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"}])),Os=(Sn([{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"}]),Sn([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4)),Us=Sn([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function Vs(t,e,r){return t.sections.forEach(function(t){t.text=function(t,e,r){var i=e.layout.get("text-transform").evaluate(r,{});return"uppercase"===i?t=t.toLocaleUpperCase():"lowercase"===i&&(t=t.toLocaleLowerCase()),rn.applyArabicShaping&&(t=rn.applyArabicShaping(t)),t}(t.text,e,r)}),t}Sn([{name:"triangle",components:3,type:"Uint16"}]),Sn([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Uint16",name:"glyphStartIndex"},{type:"Uint16",name:"numGlyphs"},{type:"Uint32",name:"vertexStartIndex"},{type:"Uint32",name:"lineStartIndex"},{type:"Uint32",name:"lineLength"},{type:"Uint16",name:"segment"},{type:"Uint16",name:"lowerSize"},{type:"Uint16",name:"upperSize"},{type:"Float32",name:"lineOffsetX"},{type:"Float32",name:"lineOffsetY"},{type:"Uint8",name:"writingMode"},{type:"Uint8",name:"placedOrientation"},{type:"Uint8",name:"hidden"},{type:"Uint32",name:"crossTileID"},{type:"Int16",name:"associatedIconIndex"}]),Sn([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Int16",name:"rightJustifiedTextSymbolIndex"},{type:"Int16",name:"centerJustifiedTextSymbolIndex"},{type:"Int16",name:"leftJustifiedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Int16",name:"placedIconSymbolIndex"},{type:"Int16",name:"verticalPlacedIconSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"verticalTextBoxStartIndex"},{type:"Uint16",name:"verticalTextBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"verticalIconBoxStartIndex"},{type:"Uint16",name:"verticalIconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint16",name:"numVerticalIconVertices"},{type:"Uint16",name:"useRuntimeCollisionCircles"},{type:"Uint32",name:"crossTileID"},{type:"Float32",name:"textBoxScale"},{type:"Float32",components:2,name:"textOffset"},{type:"Float32",name:"collisionCircleDiameter"}]),Sn([{type:"Float32",name:"offsetX"}]),Sn([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]);var Ns={"!":"︕","#":"#",$:"$","%":"%","&":"&","(":"︵",")":"︶","*":"*","+":"+",",":"︐","-":"︲",".":"・","/":"/",":":"︓",";":"︔","<":"︿","=":"=",">":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"},js=function(t,e,r,i,n){var o,a,s=8*n-i-1,l=(1<<s)-1,u=l>>1,c=-7,p=r?n-1:0,h=r?-1:1,f=t[e+p];for(p+=h,o=f&(1<<-c)-1,f>>=-c,c+=s;c>0;o=256*o+t[e+p],p+=h,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=i;c>0;a=256*a+t[e+p],p+=h,c-=8);if(0===o)o=1-u;else{if(o===l)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,i),o-=u}return(f?-1:1)*a*Math.pow(2,o-i)},qs=function(t,e,r,i,n,o){var a,s,l,u=8*o-n-1,c=(1<<u)-1,p=c>>1,h=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,f=i?0:o-1,d=i?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=c):(a=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-a))<1&&(a--,l*=2),(e+=a+p>=1?h/l:h*Math.pow(2,1-p))*l>=2&&(a++,l/=2),a+p>=c?(s=0,a=c):a+p>=1?(s=(e*l-1)*Math.pow(2,n),a+=p):(s=e*Math.pow(2,p-1)*Math.pow(2,n),a=0));n>=8;t[r+f]=255&s,f+=d,s/=256,n-=8);for(a=a<<n|s,u+=n;u>0;t[r+f]=255&a,f+=d,a/=256,u-=8);t[r+f-d]|=128*m},Zs=Gs;function Gs(t){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(t)?t:new Uint8Array(t||0),this.pos=0,this.type=0,this.length=this.buf.length}Gs.Varint=0,Gs.Fixed64=1,Gs.Bytes=2,Gs.Fixed32=5;var Xs="undefined"==typeof TextDecoder?null:new TextDecoder("utf8");function Ws(t){return t.type===Gs.Bytes?t.readVarint()+t.pos:t.pos+1}function Ks(t,e,r){return r?4294967296*e+(t>>>0):4294967296*(e>>>0)+(t>>>0)}function Hs(t,e,r){var i=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.floor(Math.log(e)/(7*Math.LN2));r.realloc(i);for(var n=r.pos-1;n>=t;n--)r.buf[n+i]=r.buf[n]}function Js(t,e){for(var r=0;r<t.length;r++)e.writeVarint(t[r])}function Ys(t,e){for(var r=0;r<t.length;r++)e.writeSVarint(t[r])}function Qs(t,e){for(var r=0;r<t.length;r++)e.writeFloat(t[r])}function $s(t,e){for(var r=0;r<t.length;r++)e.writeDouble(t[r])}function tl(t,e){for(var r=0;r<t.length;r++)e.writeBoolean(t[r])}function el(t,e){for(var r=0;r<t.length;r++)e.writeFixed32(t[r])}function rl(t,e){for(var r=0;r<t.length;r++)e.writeSFixed32(t[r])}function il(t,e){for(var r=0;r<t.length;r++)e.writeFixed64(t[r])}function nl(t,e){for(var r=0;r<t.length;r++)e.writeSFixed64(t[r])}function ol(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+16777216*t[e+3]}function al(t,e,r){t[r]=e,t[r+1]=e>>>8,t[r+2]=e>>>16,t[r+3]=e>>>24}function sl(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+(t[e+3]<<24)}function ll(t,e,r){1===t&&r.readMessage(ul,e)}function ul(t,e,r){if(3===t){var i=r.readMessage(cl,{}),n=i.width,o=i.height,a=i.left,s=i.top,l=i.advance;e.push({id:i.id,bitmap:new fa({width:n+6,height:o+6},i.bitmap),metrics:{width:n,height:o,left:a,top:s,advance:l}})}}function cl(t,e,r){1===t?e.id=r.readVarint():2===t?e.bitmap=r.readBytes():3===t?e.width=r.readVarint():4===t?e.height=r.readVarint():5===t?e.left=r.readSVarint():6===t?e.top=r.readSVarint():7===t&&(e.advance=r.readVarint())}function pl(t){for(var e=0,r=0,i=0,n=t;i<n.length;i+=1){var o=n[i];e+=o.w*o.h,r=Math.max(r,o.w)}t.sort(function(t,e){return e.h-t.h});for(var a=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(e/.95)),r),h:1/0}],s=0,l=0,u=0,c=t;u<c.length;u+=1)for(var p=c[u],h=a.length-1;h>=0;h--){var f=a[h];if(!(p.w>f.w||p.h>f.h)){if(p.x=f.x,p.y=f.y,l=Math.max(l,p.y+p.h),s=Math.max(s,p.x+p.w),p.w===f.w&&p.h===f.h){var d=a.pop();h<a.length&&(a[h]=d)}else p.h===f.h?(f.x+=p.w,f.w-=p.w):p.w===f.w?(f.y+=p.h,f.h-=p.h):(a.push({x:f.x+p.w,y:f.y,w:f.w-p.w,h:p.h}),f.y+=p.h,f.h-=p.h);break}}return{w:s,h:l,fill:e/(s*l)||0}}Gs.prototype={destroy:function(){this.buf=null},readFields:function(t,e,r){for(r=r||this.length;this.pos<r;){var i=this.readVarint(),n=i>>3,o=this.pos;this.type=7&i,t(n,e,this),this.pos===o&&this.skip(i)}return e},readMessage:function(t,e){return this.readFields(t,e,this.readVarint()+this.pos)},readFixed32:function(){var t=ol(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=sl(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=ol(this.buf,this.pos)+4294967296*ol(this.buf,this.pos+4);return this.pos+=8,t},readSFixed64:function(){var t=ol(this.buf,this.pos)+4294967296*sl(this.buf,this.pos+4);return this.pos+=8,t},readFloat:function(){var t=js(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=js(this.buf,this.pos,!0,52,8);return this.pos+=8,t},readVarint:function(t){var e,r,i=this.buf;return e=127&(r=i[this.pos++]),r<128?e:(e|=(127&(r=i[this.pos++]))<<7,r<128?e:(e|=(127&(r=i[this.pos++]))<<14,r<128?e:(e|=(127&(r=i[this.pos++]))<<21,r<128?e:function(t,e,r){var i,n,o=r.buf;if(i=(112&(n=o[r.pos++]))>>4,n<128)return Ks(t,i,e);if(i|=(127&(n=o[r.pos++]))<<3,n<128)return Ks(t,i,e);if(i|=(127&(n=o[r.pos++]))<<10,n<128)return Ks(t,i,e);if(i|=(127&(n=o[r.pos++]))<<17,n<128)return Ks(t,i,e);if(i|=(127&(n=o[r.pos++]))<<24,n<128)return Ks(t,i,e);if(i|=(1&(n=o[r.pos++]))<<31,n<128)return Ks(t,i,e);throw new Error("Expected varint not more than 10 bytes")}(e|=(15&(r=i[this.pos]))<<28,t,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var t=this.readVarint();return t%2==1?(t+1)/-2:t/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var t=this.readVarint()+this.pos,e=this.pos;return this.pos=t,t-e>=12&&Xs?function(t,e,r){return Xs.decode(t.subarray(e,r))}(this.buf,e,t):function(t,e,r){for(var i="",n=e;n<r;){var o,a,s,l=t[n],u=null,c=l>239?4:l>223?3:l>191?2:1;if(n+c>r)break;1===c?l<128&&(u=l):2===c?128==(192&(o=t[n+1]))&&(u=(31&l)<<6|63&o)<=127&&(u=null):3===c?(a=t[n+2],128==(192&(o=t[n+1]))&&128==(192&a)&&((u=(15&l)<<12|(63&o)<<6|63&a)<=2047||u>=55296&&u<=57343)&&(u=null)):4===c&&(a=t[n+2],s=t[n+3],128==(192&(o=t[n+1]))&&128==(192&a)&&128==(192&s)&&((u=(15&l)<<18|(63&o)<<12|(63&a)<<6|63&s)<=65535||u>=1114112)&&(u=null)),null===u?(u=65533,c=1):u>65535&&(u-=65536,i+=String.fromCharCode(u>>>10&1023|55296),u=56320|1023&u),i+=String.fromCharCode(u),n+=c}return i}(this.buf,e,t)},readBytes:function(){var t=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,t);return this.pos=t,e},readPackedVarint:function(t,e){if(this.type!==Gs.Bytes)return t.push(this.readVarint(e));var r=Ws(this);for(t=t||[];this.pos<r;)t.push(this.readVarint(e));return t},readPackedSVarint:function(t){if(this.type!==Gs.Bytes)return t.push(this.readSVarint());var e=Ws(this);for(t=t||[];this.pos<e;)t.push(this.readSVarint());return t},readPackedBoolean:function(t){if(this.type!==Gs.Bytes)return t.push(this.readBoolean());var e=Ws(this);for(t=t||[];this.pos<e;)t.push(this.readBoolean());return t},readPackedFloat:function(t){if(this.type!==Gs.Bytes)return t.push(this.readFloat());var e=Ws(this);for(t=t||[];this.pos<e;)t.push(this.readFloat());return t},readPackedDouble:function(t){if(this.type!==Gs.Bytes)return t.push(this.readDouble());var e=Ws(this);for(t=t||[];this.pos<e;)t.push(this.readDouble());return t},readPackedFixed32:function(t){if(this.type!==Gs.Bytes)return t.push(this.readFixed32());var e=Ws(this);for(t=t||[];this.pos<e;)t.push(this.readFixed32());return t},readPackedSFixed32:function(t){if(this.type!==Gs.Bytes)return t.push(this.readSFixed32());var e=Ws(this);for(t=t||[];this.pos<e;)t.push(this.readSFixed32());return t},readPackedFixed64:function(t){if(this.type!==Gs.Bytes)return t.push(this.readFixed64());var e=Ws(this);for(t=t||[];this.pos<e;)t.push(this.readFixed64());return t},readPackedSFixed64:function(t){if(this.type!==Gs.Bytes)return t.push(this.readSFixed64());var e=Ws(this);for(t=t||[];this.pos<e;)t.push(this.readSFixed64());return t},skip:function(t){var e=7&t;if(e===Gs.Varint)for(;this.buf[this.pos++]>127;);else if(e===Gs.Bytes)this.pos=this.readVarint()+this.pos;else if(e===Gs.Fixed32)this.pos+=4;else{if(e!==Gs.Fixed64)throw new Error("Unimplemented type: "+e);this.pos+=8}},writeTag:function(t,e){this.writeVarint(t<<3|e)},realloc:function(t){for(var e=this.length||16;e<this.pos+t;)e*=2;if(e!==this.length){var r=new Uint8Array(e);r.set(this.buf),this.buf=r,this.length=e}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(t){this.realloc(4),al(this.buf,t,this.pos),this.pos+=4},writeSFixed32:function(t){this.realloc(4),al(this.buf,t,this.pos),this.pos+=4},writeFixed64:function(t){this.realloc(8),al(this.buf,-1&t,this.pos),al(this.buf,Math.floor(t*(1/4294967296)),this.pos+4),this.pos+=8},writeSFixed64:function(t){this.realloc(8),al(this.buf,-1&t,this.pos),al(this.buf,Math.floor(t*(1/4294967296)),this.pos+4),this.pos+=8},writeVarint:function(t){(t=+t||0)>268435455||t<0?function(t,e){var r,i;if(t>=0?(r=t%4294967296|0,i=t/4294967296|0):(i=~(-t/4294967296),4294967295^(r=~(-t%4294967296))?r=r+1|0:(r=0,i=i+1|0)),t>=0x10000000000000000||t<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");e.realloc(10),function(t,e,r){r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,r.buf[r.pos]=127&(t>>>=7)}(r,0,e),function(t,e){var r=(7&t)<<4;e.buf[e.pos++]|=r|((t>>>=3)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t)))))}(i,e)}(t,this):(this.realloc(4),this.buf[this.pos++]=127&t|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=t>>>7&127))))},writeSVarint:function(t){this.writeVarint(t<0?2*-t-1:2*t)},writeBoolean:function(t){this.writeVarint(Boolean(t))},writeString:function(t){t=String(t),this.realloc(4*t.length),this.pos++;var e=this.pos;this.pos=function(t,e,r){for(var i,n,o=0;o<e.length;o++){if((i=e.charCodeAt(o))>55295&&i<57344){if(!n){i>56319||o+1===e.length?(t[r++]=239,t[r++]=191,t[r++]=189):n=i;continue}if(i<56320){t[r++]=239,t[r++]=191,t[r++]=189,n=i;continue}i=n-55296<<10|i-56320|65536,n=null}else n&&(t[r++]=239,t[r++]=191,t[r++]=189,n=null);i<128?t[r++]=i:(i<2048?t[r++]=i>>6|192:(i<65536?t[r++]=i>>12|224:(t[r++]=i>>18|240,t[r++]=i>>12&63|128),t[r++]=i>>6&63|128),t[r++]=63&i|128)}return r}(this.buf,t,this.pos);var r=this.pos-e;r>=128&&Hs(e,r,this),this.pos=e-1,this.writeVarint(r),this.pos+=r},writeFloat:function(t){this.realloc(4),qs(this.buf,t,this.pos,!0,23,4),this.pos+=4},writeDouble:function(t){this.realloc(8),qs(this.buf,t,this.pos,!0,52,8),this.pos+=8},writeBytes:function(t){var e=t.length;this.writeVarint(e),this.realloc(e);for(var r=0;r<e;r++)this.buf[this.pos++]=t[r]},writeRawMessage:function(t,e){this.pos++;var r=this.pos;t(e,this);var i=this.pos-r;i>=128&&Hs(r,i,this),this.pos=r-1,this.writeVarint(i),this.pos+=i},writeMessage:function(t,e,r){this.writeTag(t,Gs.Bytes),this.writeRawMessage(e,r)},writePackedVarint:function(t,e){e.length&&this.writeMessage(t,Js,e)},writePackedSVarint:function(t,e){e.length&&this.writeMessage(t,Ys,e)},writePackedBoolean:function(t,e){e.length&&this.writeMessage(t,tl,e)},writePackedFloat:function(t,e){e.length&&this.writeMessage(t,Qs,e)},writePackedDouble:function(t,e){e.length&&this.writeMessage(t,$s,e)},writePackedFixed32:function(t,e){e.length&&this.writeMessage(t,el,e)},writePackedSFixed32:function(t,e){e.length&&this.writeMessage(t,rl,e)},writePackedFixed64:function(t,e){e.length&&this.writeMessage(t,il,e)},writePackedSFixed64:function(t,e){e.length&&this.writeMessage(t,nl,e)},writeBytesField:function(t,e){this.writeTag(t,Gs.Bytes),this.writeBytes(e)},writeFixed32Field:function(t,e){this.writeTag(t,Gs.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(t,e){this.writeTag(t,Gs.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(t,e){this.writeTag(t,Gs.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(t,e){this.writeTag(t,Gs.Fixed64),this.writeSFixed64(e)},writeVarintField:function(t,e){this.writeTag(t,Gs.Varint),this.writeVarint(e)},writeSVarintField:function(t,e){this.writeTag(t,Gs.Varint),this.writeSVarint(e)},writeStringField:function(t,e){this.writeTag(t,Gs.Bytes),this.writeString(e)},writeFloatField:function(t,e){this.writeTag(t,Gs.Fixed32),this.writeFloat(e)},writeDoubleField:function(t,e){this.writeTag(t,Gs.Fixed64),this.writeDouble(e)},writeBooleanField:function(t,e){this.writeVarintField(t,Boolean(e))}};var hl=function(t,e){var r=e.pixelRatio,i=e.version,n=e.stretchX,o=e.stretchY,a=e.content;this.paddedRect=t,this.pixelRatio=r,this.stretchX=n,this.stretchY=o,this.content=a,this.version=i},fl={tl:{configurable:!0},br:{configurable:!0},tlbr:{configurable:!0},displaySize:{configurable:!0}};fl.tl.get=function(){return[this.paddedRect.x+1,this.paddedRect.y+1]},fl.br.get=function(){return[this.paddedRect.x+this.paddedRect.w-1,this.paddedRect.y+this.paddedRect.h-1]},fl.tlbr.get=function(){return this.tl.concat(this.br)},fl.displaySize.get=function(){return[(this.paddedRect.w-2)/this.pixelRatio,(this.paddedRect.h-2)/this.pixelRatio]},Object.defineProperties(hl.prototype,fl);var dl=function(t,e){var r={},i={};this.haveRenderCallbacks=[];var n=[];this.addImages(t,r,n),this.addImages(e,i,n);var o=pl(n),a=new da({width:o.w||1,height:o.h||1});for(var s in t){var l=t[s],u=r[s].paddedRect;da.copy(l.data,a,{x:0,y:0},{x:u.x+1,y:u.y+1},l.data)}for(var c in e){var p=e[c],h=i[c].paddedRect,f=h.x+1,d=h.y+1,m=p.data.width,y=p.data.height;da.copy(p.data,a,{x:0,y:0},{x:f,y:d},p.data),da.copy(p.data,a,{x:0,y:y-1},{x:f,y:d-1},{width:m,height:1}),da.copy(p.data,a,{x:0,y:0},{x:f,y:d+y},{width:m,height:1}),da.copy(p.data,a,{x:m-1,y:0},{x:f-1,y:d},{width:1,height:y}),da.copy(p.data,a,{x:0,y:0},{x:f+m,y:d},{width:1,height:y})}this.image=a,this.iconPositions=r,this.patternPositions=i};dl.prototype.addImages=function(t,e,r){for(var i in t){var n=t[i],o={x:0,y:0,w:n.data.width+2,h:n.data.height+2};r.push(o),e[i]=new hl(o,n),n.hasRenderCallback&&this.haveRenderCallbacks.push(i)}},dl.prototype.patchUpdatedImages=function(t,e){for(var r in t.dispatchRenderCallbacks(this.haveRenderCallbacks),t.updatedImages)this.patchUpdatedImage(this.iconPositions[r],t.getImage(r),e),this.patchUpdatedImage(this.patternPositions[r],t.getImage(r),e)},dl.prototype.patchUpdatedImage=function(t,e,r){if(t&&e&&t.version!==e.version){t.version=e.version;var i=t.tl;r.update(e.data,void 0,{x:i[0],y:i[1]})}},Li("ImagePosition",hl),Li("ImageAtlas",dl);var ml={horizontal:1,vertical:2,horizontalOnly:3},yl=function(){this.scale=1,this.fontStack="",this.imageName=null};yl.forText=function(t,e){var r=new yl;return r.scale=t||1,r.fontStack=e,r},yl.forImage=function(t){var e=new yl;return e.imageName=t,e};var gl=function(){this.text="",this.sectionIndex=[],this.sections=[],this.imageSectionID=null};function _l(t,e,r,i,n,o,a,s,l,u,c,p,h,f,d,m){var y,g=gl.fromFeature(t,n);p===ml.vertical&&g.verticalizePunctuation();var _=rn.processBidirectionalText,v=rn.processStyledBidirectionalText;if(_&&1===g.sections.length){y=[];for(var x=0,b=_(g.toString(),Il(g,u,o,e,i,f,d));x<b.length;x+=1){var w=b[x],S=new gl;S.text=w,S.sections=g.sections;for(var T=0;T<w.length;T++)S.sectionIndex.push(0);y.push(S)}}else if(v){y=[];for(var I=0,E=v(g.text,g.sectionIndex,Il(g,u,o,e,i,f,d));I<E.length;I+=1){var A=E[I],z=new gl;z.text=A[0],z.sectionIndex=A[1],z.sections=g.sections,y.push(z)}}else y=function(t,e){for(var r=[],i=t.text,n=0,o=0,a=e;o<a.length;o+=1){var s=a[o];r.push(t.substring(n,s)),n=s}return n<i.length&&r.push(t.substring(n,i.length)),r}(g,Il(g,u,o,e,i,f,d));var P=[],C={positionedLines:P,text:g.toString(),top:c[1],bottom:c[1],left:c[0],right:c[0],writingMode:p,iconsInText:!1,verticalizable:!1};return function(t,e,r,i,n,o,a,s,l,u,c,p){for(var h=0,f=-17,d=0,m=0,y="right"===s?1:"left"===s?0:.5,g=0,_=0,v=n;_<v.length;_+=1){var x=v[_];x.trim();var b=x.getMaxScale(),w=24*(b-1),S={positionedGlyphs:[],lineOffset:0};t.positionedLines[g]=S;var T=S.positionedGlyphs,I=0;if(x.length()){for(var E=0;E<x.length();E++){var A=x.getSection(E),z=x.getSectionIndex(E),P=x.getCharCode(E),C=0,k=null,M=null,D=null,L=24,R=!(l===ml.horizontal||!c&&!qi(P)||c&&(vl[P]||(Z=P,Ni.Arabic(Z)||Ni["Arabic Supplement"](Z)||Ni["Arabic Extended-A"](Z)||Ni["Arabic Presentation Forms-A"](Z)||Ni["Arabic Presentation Forms-B"](Z))));if(A.imageName){var B=i[A.imageName];if(!B)continue;D=A.imageName,t.iconsInText=t.iconsInText||!0,M=B.paddedRect;var F=B.displaySize;A.scale=24*A.scale/p,C=w+(24-F[1]*A.scale),L=(k={width:F[0],height:F[1],left:1,top:-3,advance:R?F[1]:F[0]}).advance;var O=R?F[0]*A.scale-24*b:F[1]*A.scale-24*b;O>0&&O>I&&(I=O)}else{var U=r[A.fontStack],V=U&&U[P];if(V&&V.rect)M=V.rect,k=V.metrics;else{var N=e[A.fontStack],j=N&&N[P];if(!j)continue;k=j.metrics}C=24*(b-A.scale)}R?(t.verticalizable=!0,T.push({glyph:P,imageName:D,x:h,y:f+C,vertical:R,scale:A.scale,fontStack:A.fontStack,sectionIndex:z,metrics:k,rect:M}),h+=L*A.scale+u):(T.push({glyph:P,imageName:D,x:h,y:f+C,vertical:R,scale:A.scale,fontStack:A.fontStack,sectionIndex:z,metrics:k,rect:M}),h+=k.advance*A.scale+u)}0!==T.length&&(d=Math.max(h-u,d),Al(T,0,T.length-1,y,I)),h=0;var q=o*b+I;S.lineOffset=Math.max(I,w),f+=q,m=Math.max(q,m),++g}else f+=o,++g}var Z,G=f- -17,X=El(a),W=X.horizontalAlign,K=X.verticalAlign;(function(t,e,r,i,n,o,a,s,l){var u,c=(e-r)*n;u=o!==a?-s*i- -17:(-i*l+.5)*a;for(var p=0,h=t;p<h.length;p+=1)for(var f=0,d=h[p].positionedGlyphs;f<d.length;f+=1){var m=d[f];m.x+=c,m.y+=u}})(t.positionedLines,y,W,K,d,m,o,G,n.length),t.top+=-K*G,t.bottom=t.top+G,t.left+=-W*d,t.right=t.left+d}(C,e,r,i,y,a,s,l,p,u,h,m),!function(t){for(var e=0,r=P;e<r.length;e+=1)if(0!==r[e].positionedGlyphs.length)return!1;return!0}()&&C}gl.fromFeature=function(t,e){for(var r=new gl,i=0;i<t.sections.length;i++){var n=t.sections[i];n.image?r.addImageSection(n):r.addTextSection(n,e)}return r},gl.prototype.length=function(){return this.text.length},gl.prototype.getSection=function(t){return this.sections[this.sectionIndex[t]]},gl.prototype.getSectionIndex=function(t){return this.sectionIndex[t]},gl.prototype.getCharCode=function(t){return this.text.charCodeAt(t)},gl.prototype.verticalizePunctuation=function(){this.text=function(t){for(var e="",r=0;r<t.length;r++){var i=t.charCodeAt(r+1)||null,n=t.charCodeAt(r-1)||null;e+=i&&Zi(i)&&!Ns[t[r+1]]||n&&Zi(n)&&!Ns[t[r-1]]||!Ns[t[r]]?t[r]:Ns[t[r]]}return e}(this.text)},gl.prototype.trim=function(){for(var t=0,e=0;e<this.text.length&&vl[this.text.charCodeAt(e)];e++)t++;for(var r=this.text.length,i=this.text.length-1;i>=0&&i>=t&&vl[this.text.charCodeAt(i)];i--)r--;this.text=this.text.substring(t,r),this.sectionIndex=this.sectionIndex.slice(t,r)},gl.prototype.substring=function(t,e){var r=new gl;return r.text=this.text.substring(t,e),r.sectionIndex=this.sectionIndex.slice(t,e),r.sections=this.sections,r},gl.prototype.toString=function(){return this.text},gl.prototype.getMaxScale=function(){var t=this;return this.sectionIndex.reduce(function(e,r){return Math.max(e,t.sections[r].scale)},0)},gl.prototype.addTextSection=function(t,e){this.text+=t.text,this.sections.push(yl.forText(t.scale,t.fontStack||e));for(var r=this.sections.length-1,i=0;i<t.text.length;++i)this.sectionIndex.push(r)},gl.prototype.addImageSection=function(t){var e=t.image?t.image.name:"";if(0!==e.length){var r=this.getNextImageSectionCharCode();r?(this.text+=String.fromCharCode(r),this.sections.push(yl.forImage(e)),this.sectionIndex.push(this.sections.length-1)):b("Reached maximum number of images 6401")}else b("Can't add FormattedSection with an empty image.")},gl.prototype.getNextImageSectionCharCode=function(){return this.imageSectionID?this.imageSectionID>=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)};var vl={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},xl={};function bl(t,e,r,i,n,o){if(e.imageName){var a=i[e.imageName];return a?a.displaySize[0]*e.scale*24/o+n:0}var s=r[e.fontStack],l=s&&s[t];return l?l.metrics.advance*e.scale+n:0}function wl(t,e,r,i){var n=Math.pow(t-e,2);return i?t<e?n/2:2*n:n+Math.abs(r)*r}function Sl(t,e,r){var i=0;return 10===t&&(i-=1e4),r&&(i+=150),40!==t&&65288!==t||(i+=50),41!==e&&65289!==e||(i+=50),i}function Tl(t,e,r,i,n,o){for(var a=null,s=wl(e,r,n,o),l=0,u=i;l<u.length;l+=1){var c=u[l],p=wl(e-c.x,r,n,o)+c.badness;p<=s&&(a=c,s=p)}return{index:t,x:e,priorBreak:a,badness:s}}function Il(t,e,r,i,n,o,a){if("point"!==o)return[];if(!t)return[];for(var s,l=[],u=function(t,e,r,i,n,o){for(var a=0,s=0;s<t.length();s++){var l=t.getSection(s);a+=bl(t.getCharCode(s),l,i,n,e,o)}return a/Math.max(1,Math.ceil(a/r))}(t,e,r,i,n,a),c=t.text.indexOf("​")>=0,p=0,h=0;h<t.length();h++){var f=t.getSection(h),d=t.getCharCode(h);if(vl[d]||(p+=bl(d,f,i,n,e,a)),h<t.length()-1){var m=!((s=d)<11904||!(Ni["Bopomofo Extended"](s)||Ni.Bopomofo(s)||Ni["CJK Compatibility Forms"](s)||Ni["CJK Compatibility Ideographs"](s)||Ni["CJK Compatibility"](s)||Ni["CJK Radicals Supplement"](s)||Ni["CJK Strokes"](s)||Ni["CJK Symbols and Punctuation"](s)||Ni["CJK Unified Ideographs Extension A"](s)||Ni["CJK Unified Ideographs"](s)||Ni["Enclosed CJK Letters and Months"](s)||Ni["Halfwidth and Fullwidth Forms"](s)||Ni.Hiragana(s)||Ni["Ideographic Description Characters"](s)||Ni["Kangxi Radicals"](s)||Ni["Katakana Phonetic Extensions"](s)||Ni.Katakana(s)||Ni["Vertical Forms"](s)||Ni["Yi Radicals"](s)||Ni["Yi Syllables"](s)));(xl[d]||m||f.imageName)&&l.push(Tl(h+1,p,u,l,Sl(d,t.getCharCode(h+1),m&&c),!1))}}return function t(e){return e?t(e.priorBreak).concat(e.index):[]}(Tl(t.length(),p,u,l,0,!0))}function El(t){var e=.5,r=.5;switch(t){case"right":case"top-right":case"bottom-right":e=1;break;case"left":case"top-left":case"bottom-left":e=0}switch(t){case"bottom":case"bottom-right":case"bottom-left":r=1;break;case"top":case"top-right":case"top-left":r=0}return{horizontalAlign:e,verticalAlign:r}}function Al(t,e,r,i,n){if(i||n)for(var o=t[r],a=(t[r].x+o.metrics.advance*o.scale)*i,s=e;s<=r;s++)t[s].x-=a,t[s].y+=n}function zl(t,e,r,i,n,o){var a,s=t.image;if(s.content){var l=s.content,u=s.pixelRatio||1;a=[l[0]/u,l[1]/u,s.displaySize[0]-l[2]/u,s.displaySize[1]-l[3]/u]}var c,p,h,f,d=e.left*o,m=e.right*o;"width"===r||"both"===r?(f=n[0]+d-i[3],p=n[0]+m+i[1]):p=(f=n[0]+(d+m-s.displaySize[0])/2)+s.displaySize[0];var y=e.top*o,g=e.bottom*o;return"height"===r||"both"===r?(c=n[1]+y-i[0],h=n[1]+g+i[2]):h=(c=n[1]+(y+g-s.displaySize[1])/2)+s.displaySize[1],{image:s,top:c,right:p,bottom:h,left:f,collisionPadding:a}}xl[10]=!0,xl[32]=!0,xl[38]=!0,xl[40]=!0,xl[41]=!0,xl[43]=!0,xl[45]=!0,xl[47]=!0,xl[173]=!0,xl[183]=!0,xl[8203]=!0,xl[8208]=!0,xl[8211]=!0,xl[8231]=!0;var Pl=function(t){function e(e,r,i,n){t.call(this,e,r),this.angle=i,void 0!==n&&(this.segment=n)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.clone=function(){return new e(this.x,this.y,this.angle,this.segment)},e}(n);function Cl(t,e){var r=e.expression;if("constant"===r.kind)return{kind:"constant",layoutSize:r.evaluate(new nn(t+1))};if("source"===r.kind)return{kind:"source"};for(var i=r.zoomStops,n=r.interpolationType,o=0;o<i.length&&i[o]<=t;)o++;for(var a=o=Math.max(0,o-1);a<i.length&&i[a]<t+1;)a++;a=Math.min(i.length-1,a);var s=i[o],l=i[a];return"composite"===r.kind?{kind:"composite",minZoom:s,maxZoom:l,interpolationType:n}:{kind:"camera",minZoom:s,maxZoom:l,minSize:r.evaluate(new nn(s)),maxSize:r.evaluate(new nn(l)),interpolationType:n}}function kl(t,e,r){var i=e.uSize,n=r.lowerSize;return"source"===t.kind?n/128:"composite"===t.kind?Ne(n/128,r.upperSize/128,e.uSizeT):i}function Ml(t,e){var r=0,i=0;if("constant"===t.kind)i=t.layoutSize;else if("source"!==t.kind){var n=t.interpolationType,o=n?l(rr.interpolationFactor(n,e,t.minZoom,t.maxZoom),0,1):0;"camera"===t.kind?i=Ne(t.minSize,t.maxSize,o):r=o}return{uSizeT:r,uSize:i}}Li("Anchor",Pl);var Dl=Object.freeze({__proto__:null,getSizeData:Cl,evaluateSizeForFeature:kl,evaluateSizeForZoom:Ml,SIZE_PACK_FACTOR:128});function Ll(t,e,r,i,n){if(void 0===e.segment)return!0;for(var o=e,a=e.segment+1,s=0;s>-r/2;){if(--a<0)return!1;s-=t[a].dist(o),o=t[a]}s+=t[a].dist(t[a+1]),a++;for(var l=[],u=0;s<r/2;){var c=t[a],p=t[a+1];if(!p)return!1;var h=t[a-1].angleTo(c)-c.angleTo(p);for(h=Math.abs((h+3*Math.PI)%(2*Math.PI)-Math.PI),l.push({distance:s,angleDelta:h}),u+=h;s-l[0].distance>i;)u-=l.shift().angleDelta;if(u>n)return!1;a++,s+=c.dist(p)}return!0}function Rl(t){for(var e=0,r=0;r<t.length-1;r++)e+=t[r].dist(t[r+1]);return e}function Bl(t,e,r){return t?.6*e*r:0}function Fl(t,e){return Math.max(t?t.right-t.left:0,e?e.right-e.left:0)}function Ol(t,e,r,i,n,o){for(var a=Bl(r,n,o),s=Fl(r,i)*o,l=0,u=Rl(t)/2,c=0;c<t.length-1;c++){var p=t[c],h=t[c+1],f=p.dist(h);if(l+f>u){var d=(u-l)/f,m=Ne(p.x,h.x,d),y=Ne(p.y,h.y,d),g=new Pl(m,y,h.angleTo(p),c);return g._round(),!a||Ll(t,g,s,a,e)?g:void 0}l+=f}}function Ul(t,e,r,i,n,o,a,s,l){var u=Bl(i,o,a),c=Fl(i,n),p=c*a,h=0===t[0].x||t[0].x===l||0===t[0].y||t[0].y===l;return e-p<e/4&&(e=p+e/4),function t(e,r,i,n,o,a,s,l,u){for(var c=a/2,p=Rl(e),h=0,f=r-i,d=[],m=0;m<e.length-1;m++){for(var y=e[m],g=e[m+1],_=y.dist(g),v=g.angleTo(y);f+i<h+_;){var x=((f+=i)-h)/_,b=Ne(y.x,g.x,x),w=Ne(y.y,g.y,x);if(b>=0&&b<u&&w>=0&&w<u&&f-c>=0&&f+c<=p){var S=new Pl(b,w,v,m);S._round(),n&&!Ll(e,S,a,n,o)||d.push(S)}}h+=_}return l||d.length||s||(d=t(e,h/2,i,n,o,a,s,!0,u)),d}(t,h?e/2*s%e:(c/2+2*o)*a*s%e,e,u,r,p,h,!1,l)}function Vl(t,e,r,i,o){for(var a=[],s=0;s<t.length;s++)for(var l=t[s],u=void 0,c=0;c<l.length-1;c++){var p=l[c],h=l[c+1];p.x<e&&h.x<e||(p.x<e?p=new n(e,p.y+(e-p.x)/(h.x-p.x)*(h.y-p.y))._round():h.x<e&&(h=new n(e,p.y+(e-p.x)/(h.x-p.x)*(h.y-p.y))._round()),p.y<r&&h.y<r||(p.y<r?p=new n(p.x+(r-p.y)/(h.y-p.y)*(h.x-p.x),r)._round():h.y<r&&(h=new n(p.x+(r-p.y)/(h.y-p.y)*(h.x-p.x),r)._round()),p.x>=i&&h.x>=i||(p.x>=i?p=new n(i,p.y+(i-p.x)/(h.x-p.x)*(h.y-p.y))._round():h.x>=i&&(h=new n(i,p.y+(i-p.x)/(h.x-p.x)*(h.y-p.y))._round()),p.y>=o&&h.y>=o||(p.y>=o?p=new n(p.x+(o-p.y)/(h.y-p.y)*(h.x-p.x),o)._round():h.y>=o&&(h=new n(p.x+(o-p.y)/(h.y-p.y)*(h.x-p.x),o)._round()),u&&p.equals(u[u.length-1])||a.push(u=[p]),u.push(h)))))}return a}function Nl(t,e,r,i){var o=[],a=t.image,s=a.pixelRatio,l=a.paddedRect.w-2,u=a.paddedRect.h-2,c=t.right-t.left,p=t.bottom-t.top,h=a.stretchX||[[0,l]],f=a.stretchY||[[0,u]],d=function(t,e){return t+e[1]-e[0]},m=h.reduce(d,0),y=f.reduce(d,0),g=l-m,_=u-y,v=0,x=m,b=0,w=y,S=0,T=g,I=0,E=_;if(a.content&&i){var A=a.content;v=jl(h,0,A[0]),b=jl(f,0,A[1]),x=jl(h,A[0],A[2]),w=jl(f,A[1],A[3]),S=A[0]-v,I=A[1]-b,T=A[2]-A[0]-x,E=A[3]-A[1]-w}var z=function(i,o,l,u){var h=Zl(i.stretch-v,x,c,t.left),f=Gl(i.fixed-S,T,i.stretch,m),d=Zl(o.stretch-b,w,p,t.top),g=Gl(o.fixed-I,E,o.stretch,y),_=Zl(l.stretch-v,x,c,t.left),A=Gl(l.fixed-S,T,l.stretch,m),z=Zl(u.stretch-b,w,p,t.top),P=Gl(u.fixed-I,E,u.stretch,y),C=new n(h,d),k=new n(_,d),M=new n(_,z),D=new n(h,z),L=new n(f/s,g/s),R=new n(A/s,P/s),B=e*Math.PI/180;if(B){var F=Math.sin(B),O=Math.cos(B),U=[O,-F,F,O];C._matMult(U),k._matMult(U),D._matMult(U),M._matMult(U)}var V=i.stretch+i.fixed,N=o.stretch+o.fixed;return{tl:C,tr:k,bl:D,br:M,tex:{x:a.paddedRect.x+1+V,y:a.paddedRect.y+1+N,w:l.stretch+l.fixed-V,h:u.stretch+u.fixed-N},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:L,pixelOffsetBR:R,minFontScaleX:T/s/c,minFontScaleY:E/s/p,isSDF:r}};if(i&&(a.stretchX||a.stretchY))for(var P=ql(h,g,m),C=ql(f,_,y),k=0;k<P.length-1;k++)for(var M=P[k],D=P[k+1],L=0;L<C.length-1;L++)o.push(z(M,C[L],D,C[L+1]));else o.push(z({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:l+1},{fixed:0,stretch:u+1}));return o}function jl(t,e,r){for(var i=0,n=0,o=t;n<o.length;n+=1){var a=o[n];i+=Math.max(e,Math.min(r,a[1]))-Math.max(e,Math.min(r,a[0]))}return i}function ql(t,e,r){for(var i=[{fixed:-1,stretch:0}],n=0,o=t;n<o.length;n+=1){var a=o[n],s=a[0],l=a[1],u=i[i.length-1];i.push({fixed:s-u.stretch,stretch:u.stretch}),i.push({fixed:s-u.stretch,stretch:u.stretch+(l-s)})}return i.push({fixed:e+1,stretch:r}),i}function Zl(t,e,r,i){return t/e*r+i}function Gl(t,e,r,i){return t-e*r/i}var Xl=function(t,e,r,i,o,a,s,l,u,c){if(this.boxStartIndex=t.length,u){var p=a.top,h=a.bottom,f=a.collisionPadding;f&&(p-=f[1],h+=f[3]);var d=h-p;d>0&&(d=Math.max(10,d),this.circleDiameter=d)}else{var m=a.top*s-l,y=a.bottom*s+l,g=a.left*s-l,_=a.right*s+l,v=a.collisionPadding;if(v&&(g-=v[0]*s,m-=v[1]*s,_+=v[2]*s,y+=v[3]*s),c){var x=new n(g,m),b=new n(_,m),w=new n(g,y),S=new n(_,y),T=c*Math.PI/180;x._rotate(T),b._rotate(T),w._rotate(T),S._rotate(T),g=Math.min(x.x,b.x,w.x,S.x),_=Math.max(x.x,b.x,w.x,S.x),m=Math.min(x.y,b.y,w.y,S.y),y=Math.max(x.y,b.y,w.y,S.y)}t.emplaceBack(e.x,e.y,g,m,_,y,r,i,o)}this.boxEndIndex=t.length},Wl=function(t,e){if(void 0===t&&(t=[]),void 0===e&&(e=Kl),this.data=t,this.length=this.data.length,this.compare=e,this.length>0)for(var r=(this.length>>1)-1;r>=0;r--)this._down(r)};function Kl(t,e){return t<e?-1:t>e?1:0}function Hl(t,e,r){void 0===e&&(e=1),void 0===r&&(r=!1);for(var i=1/0,o=1/0,a=-1/0,s=-1/0,l=t[0],u=0;u<l.length;u++){var c=l[u];(!u||c.x<i)&&(i=c.x),(!u||c.y<o)&&(o=c.y),(!u||c.x>a)&&(a=c.x),(!u||c.y>s)&&(s=c.y)}var p=Math.min(a-i,s-o),h=p/2,f=new Wl([],Jl);if(0===p)return new n(i,o);for(var d=i;d<a;d+=p)for(var m=o;m<s;m+=p)f.push(new Yl(d+h,m+h,h,t));for(var y=function(t){for(var e=0,r=0,i=0,n=t[0],o=0,a=n.length,s=a-1;o<a;s=o++){var l=n[o],u=n[s],c=l.x*u.y-u.x*l.y;r+=(l.x+u.x)*c,i+=(l.y+u.y)*c,e+=3*c}return new Yl(r/e,i/e,0,t)}(t),g=f.length;f.length;){var _=f.pop();(_.d>y.d||!y.d)&&(y=_,r&&console.log("found best %d after %d probes",Math.round(1e4*_.d)/1e4,g)),_.max-y.d<=e||(f.push(new Yl(_.p.x-(h=_.h/2),_.p.y-h,h,t)),f.push(new Yl(_.p.x+h,_.p.y-h,h,t)),f.push(new Yl(_.p.x-h,_.p.y+h,h,t)),f.push(new Yl(_.p.x+h,_.p.y+h,h,t)),g+=4)}return r&&(console.log("num probes: "+g),console.log("best distance: "+y.d)),y.p}function Jl(t,e){return e.max-t.max}function Yl(t,e,r,i){this.p=new n(t,e),this.h=r,this.d=function(t,e){for(var r=!1,i=1/0,n=0;n<e.length;n++)for(var o=e[n],a=0,s=o.length,l=s-1;a<s;l=a++){var u=o[a],c=o[l];u.y>t.y!=c.y>t.y&&t.x<(c.x-u.x)*(t.y-u.y)/(c.y-u.y)+u.x&&(r=!r),i=Math.min(i,Xo(t,u,c))}return(r?1:-1)*Math.sqrt(i)}(this.p,i),this.max=this.d+this.h*Math.SQRT2}Wl.prototype.push=function(t){this.data.push(t),this.length++,this._up(this.length-1)},Wl.prototype.pop=function(){if(0!==this.length){var t=this.data[0],e=this.data.pop();return this.length--,this.length>0&&(this.data[0]=e,this._down(0)),t}},Wl.prototype.peek=function(){return this.data[0]},Wl.prototype._up=function(t){for(var e=this.data,r=this.compare,i=e[t];t>0;){var n=t-1>>1,o=e[n];if(r(i,o)>=0)break;e[t]=o,t=n}e[t]=i},Wl.prototype._down=function(t){for(var e=this.data,r=this.compare,i=this.length>>1,n=e[t];t<i;){var o=1+(t<<1),a=e[o],s=o+1;if(s<this.length&&r(e[s],a)<0&&(o=s,a=e[s]),r(a,n)>=0)break;e[t]=a,t=o}e[t]=n};var Ql=Number.POSITIVE_INFINITY;function $l(t,e){return e[1]!==Ql?function(t,e,r){var i=0,n=0;switch(e=Math.abs(e),r=Math.abs(r),t){case"top-right":case"top-left":case"top":n=r-7;break;case"bottom-right":case"bottom-left":case"bottom":n=7-r}switch(t){case"top-right":case"bottom-right":case"right":i=-e;break;case"top-left":case"bottom-left":case"left":i=e}return[i,n]}(t,e[0],e[1]):function(t,e){var r=0,i=0;e<0&&(e=0);var n=e/Math.sqrt(2);switch(t){case"top-right":case"top-left":i=n-7;break;case"bottom-right":case"bottom-left":i=7-n;break;case"bottom":i=7-e;break;case"top":i=e-7}switch(t){case"top-right":case"bottom-right":r=-n;break;case"top-left":case"bottom-left":r=n;break;case"left":r=e;break;case"right":r=-e}return[r,i]}(t,e[0])}function tu(t){switch(t){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function eu(t,e,r,i,o,a,s,l,u,c,p,h,f,d,m){var y=function(t,e,r,i,o,a,s,l){for(var u=i.layout.get("text-rotate").evaluate(a,{})*Math.PI/180,c=[],p=0,h=e.positionedLines;p<h.length;p+=1)for(var f=h[p],d=0,m=f.positionedGlyphs;d<m.length;d+=1){var y=m[d];if(y.rect){var g=y.rect||{},_=4,v=!0,x=1,b=0,w=(o||l)&&y.vertical,S=y.metrics.advance*y.scale/2;if(l&&e.verticalizable&&(b=f.lineOffset/2-(y.imageName?-(24-y.metrics.width*y.scale)/2:24*(y.scale-1))),y.imageName){var T=s[y.imageName];v=T.sdf,_=1/(x=T.pixelRatio)}var I=o?[y.x+S,y.y]:[0,0],E=o?[0,0]:[y.x+S+r[0],y.y+r[1]-b],A=[0,0];w&&(A=E,E=[0,0]);var z=(y.metrics.left-_)*y.scale-S+E[0],P=(-y.metrics.top-_)*y.scale+E[1],C=z+g.w*y.scale/x,k=P+g.h*y.scale/x,M=new n(z,P),D=new n(C,P),L=new n(z,k),R=new n(C,k);if(w){var B=new n(-S,S- -17),F=-Math.PI/2,O=12-S,U=new n(22-O,-(y.imageName?O:0)),V=new(Function.prototype.bind.apply(n,[null].concat(A)));M._rotateAround(F,B)._add(U)._add(V),D._rotateAround(F,B)._add(U)._add(V),L._rotateAround(F,B)._add(U)._add(V),R._rotateAround(F,B)._add(U)._add(V)}if(u){var N=Math.sin(u),j=Math.cos(u),q=[j,-N,N,j];M._matMult(q),D._matMult(q),L._matMult(q),R._matMult(q)}var Z=new n(0,0),G=new n(0,0);c.push({tl:M,tr:D,bl:L,br:R,tex:g,writingMode:e.writingMode,glyphOffset:I,sectionIndex:y.sectionIndex,isSDF:v,pixelOffsetTL:Z,pixelOffsetBR:G,minFontScaleX:0,minFontScaleY:0})}}return c}(0,r,l,o,a,s,i,t.allowVerticalPlacement),g=t.textSizeData,_=null;"source"===g.kind?(_=[128*o.layout.get("text-size").evaluate(s,{})])[0]>32640&&b(t.layerIds[0]+': Value for "text-size" is >= 255. Reduce your "text-size".'):"composite"===g.kind&&((_=[128*d.compositeTextSizes[0].evaluate(s,{},m),128*d.compositeTextSizes[1].evaluate(s,{},m)])[0]>32640||_[1]>32640)&&b(t.layerIds[0]+': Value for "text-size" is >= 255. Reduce your "text-size".'),t.addSymbols(t.text,y,_,l,a,s,c,e,u.lineStartIndex,u.lineLength,f,m);for(var v=0,x=p;v<x.length;v+=1)h[x[v]]=t.text.placedSymbolArray.length-1;return 4*y.length}function ru(t){for(var e in t)return t[e];return null}function iu(t,e,r,i){var n=t.compareText;if(e in n){for(var o=n[e],a=o.length-1;a>=0;a--)if(i.dist(o[a])<r)return!0}else n[e]=[];return n[e].push(i),!1}var nu=ms.VectorTileFeature.types,ou=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];function au(t,e,r,i,n,o,a,s,l,u,c,p,h){var f=s?Math.min(32640,Math.round(s[0])):0,d=s?Math.min(32640,Math.round(s[1])):0;t.emplaceBack(e,r,Math.round(32*i),Math.round(32*n),o,a,(f<<1)+(l?1:0),d,16*u,16*c,256*p,256*h)}function su(t,e,r){t.emplaceBack(e.x,e.y,r),t.emplaceBack(e.x,e.y,r),t.emplaceBack(e.x,e.y,r),t.emplaceBack(e.x,e.y,r)}function lu(t){for(var e=0,r=t.sections;e<r.length;e+=1)if(Wi(r[e].text))return!0;return!1}var uu=function(t){this.layoutVertexArray=new Cn,this.indexArray=new Fn,this.programConfigurations=t,this.segments=new no,this.dynamicLayoutVertexArray=new kn,this.opacityVertexArray=new Mn,this.placedSymbolArray=new Jn};uu.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length&&0===this.indexArray.length&&0===this.dynamicLayoutVertexArray.length&&0===this.opacityVertexArray.length},uu.prototype.upload=function(t,e,r,i){this.isEmpty()||(r&&(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,Rs.members),this.indexBuffer=t.createIndexBuffer(this.indexArray,e),this.dynamicLayoutVertexBuffer=t.createVertexBuffer(this.dynamicLayoutVertexArray,Bs.members,!0),this.opacityVertexBuffer=t.createVertexBuffer(this.opacityVertexArray,ou,!0),this.opacityVertexBuffer.itemSize=1),(r||i)&&this.programConfigurations.upload(t))},uu.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy())},Li("SymbolBuffers",uu);var cu=function(t,e,r){this.layoutVertexArray=new t,this.layoutAttributes=e,this.indexArray=new r,this.segments=new no,this.collisionVertexArray=new Bn};cu.prototype.upload=function(t){this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=t.createVertexBuffer(this.collisionVertexArray,Fs.members,!0)},cu.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy())},Li("CollisionBuffers",cu);var pu=function(t){this.collisionBoxArray=t.collisionBoxArray,this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(function(t){return t.id}),this.index=t.index,this.pixelRatio=t.pixelRatio,this.sourceLayerIndex=t.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[],this.placementInvProjMatrix=ra([]),this.placementViewportMatrix=ra([]);var e=this.layers[0]._unevaluatedLayout._values;this.textSizeData=Cl(this.zoom,e["text-size"]),this.iconSizeData=Cl(this.zoom,e["icon-size"]);var r=this.layers[0].layout,i=r.get("symbol-sort-key"),n=r.get("symbol-z-order");this.sortFeaturesByKey="viewport-y"!==n&&void 0!==i.constantOr(1),this.sortFeaturesByY=("viewport-y"===n||"auto"===n&&!this.sortFeaturesByKey)&&(r.get("text-allow-overlap")||r.get("icon-allow-overlap")||r.get("text-ignore-placement")||r.get("icon-ignore-placement")),"point"===r.get("symbol-placement")&&(this.writingModes=r.get("text-writing-mode").map(function(t){return ml[t]})),this.stateDependentLayerIds=this.layers.filter(function(t){return t.isStateDependent()}).map(function(t){return t.id}),this.sourceID=t.sourceID};pu.prototype.createArrays=function(){this.text=new uu(new Mo(Rs.members,this.layers,this.zoom,function(t){return/^text/.test(t)})),this.icon=new uu(new Mo(Rs.members,this.layers,this.zoom,function(t){return/^icon/.test(t)})),this.glyphOffsetArray=new $n,this.lineVertexArray=new to,this.symbolInstances=new Qn},pu.prototype.calculateGlyphDependencies=function(t,e,r,i,n){for(var o=0;o<t.length;o++)if(e[t.charCodeAt(o)]=!0,(r||i)&&n){var a=Ns[t.charAt(o)];a&&(e[a.charCodeAt(0)]=!0)}},pu.prototype.populate=function(t,e,r){var i=this.layers[0],n=i.layout,o=n.get("text-font"),a=n.get("text-field"),s=n.get("icon-image"),l=("constant"!==a.value.kind||a.value.value instanceof te&&!a.value.value.isEmpty()||a.value.value.toString().length>0)&&("constant"!==o.value.kind||o.value.value.length>0),u="constant"!==s.value.kind||!!s.value.value||Object.keys(s.parameters).length>0,c=n.get("symbol-sort-key");if(this.features=[],l||u){for(var p=e.iconDependencies,h=e.glyphDependencies,f=e.availableImages,d=new nn(this.zoom),m=0,y=t;m<y.length;m+=1){var g=y[m],_=g.feature,v=g.id,x=g.index,b=g.sourceLayerIndex,w=i._featureFilter.needGeometry,S={type:_.type,id:v,properties:_.properties,geometry:w?Bo(_):[]};if(i._featureFilter.filter(d,S,r)){w||(S.geometry=Bo(_));var T=void 0;if(l){var I=i.getValueAndResolveTokens("text-field",S,r,f),E=te.factory(I);lu(E)&&(this.hasRTLText=!0),(!this.hasRTLText||"unavailable"===tn()||this.hasRTLText&&rn.isParsed())&&(T=Vs(E,i,S))}var A=void 0;if(u){var z=i.getValueAndResolveTokens("icon-image",S,r,f);A=z instanceof ee?z:ee.fromString(z)}if(T||A){var P=this.sortFeaturesByKey?c.evaluate(S,{},r):void 0,C={id:v,text:T,icon:A,index:x,sourceLayerIndex:b,geometry:Bo(_),properties:_.properties,type:nu[_.type],sortKey:P};if(this.features.push(C),A&&(p[A.name]=!0),T){var k=o.evaluate(S,{},r).join(","),M="map"===n.get("text-rotation-alignment")&&"point"!==n.get("symbol-placement");this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(ml.vertical)>=0;for(var D=0,L=T.sections;D<L.length;D+=1){var R=L[D];if(R.image)p[R.image.name]=!0;else{var B=ji(T.toString()),F=R.fontStack||k,O=h[F]=h[F]||{};this.calculateGlyphDependencies(R.text,O,M,this.allowVerticalPlacement,B)}}}}}}"line"===n.get("symbol-placement")&&(this.features=function(t){var e={},r={},i=[],n=0;function o(e){i.push(t[e]),n++}function a(t,e,n){var o=r[t];return delete r[t],r[e]=o,i[o].geometry[0].pop(),i[o].geometry[0]=i[o].geometry[0].concat(n[0]),o}function s(t,r,n){var o=e[r];return delete e[r],e[t]=o,i[o].geometry[0].shift(),i[o].geometry[0]=n[0].concat(i[o].geometry[0]),o}function l(t,e,r){var i=r?e[0][e[0].length-1]:e[0][0];return t+":"+i.x+":"+i.y}for(var u=0;u<t.length;u++){var c=t[u],p=c.geometry,h=c.text?c.text.toString():null;if(h){var f=l(h,p),d=l(h,p,!0);if(f in r&&d in e&&r[f]!==e[d]){var m=s(f,d,p),y=a(f,d,i[m].geometry);delete e[f],delete r[d],r[l(h,i[y].geometry,!0)]=y,i[m].geometry=null}else f in r?a(f,d,p):d in e?s(f,d,p):(o(u),e[f]=n-1,r[d]=n-1)}else o(u)}return i.filter(function(t){return t.geometry})}(this.features)),this.sortFeaturesByKey&&this.features.sort(function(t,e){return t.sortKey-e.sortKey})}},pu.prototype.update=function(t,e,r){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(t,e,this.layers,r),this.icon.programConfigurations.updatePaintArrays(t,e,this.layers,r))},pu.prototype.isEmpty=function(){return 0===this.symbolInstances.length&&!this.hasRTLText},pu.prototype.uploadPending=function(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload},pu.prototype.upload=function(t){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(t),this.iconCollisionBox.upload(t)),this.text.upload(t,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(t,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0},pu.prototype.destroyDebugData=function(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()},pu.prototype.destroy=function(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()},pu.prototype.addToLineVertexArray=function(t,e){var r=this.lineVertexArray.length;if(void 0!==t.segment){for(var i=t.dist(e[t.segment+1]),n=t.dist(e[t.segment]),o={},a=t.segment+1;a<e.length;a++)o[a]={x:e[a].x,y:e[a].y,tileUnitDistanceFromAnchor:i},a<e.length-1&&(i+=e[a+1].dist(e[a]));for(var s=t.segment||0;s>=0;s--)o[s]={x:e[s].x,y:e[s].y,tileUnitDistanceFromAnchor:n},s>0&&(n+=e[s-1].dist(e[s]));for(var l=0;l<e.length;l++){var u=o[l];this.lineVertexArray.emplaceBack(u.x,u.y,u.tileUnitDistanceFromAnchor)}}return{lineStartIndex:r,lineLength:this.lineVertexArray.length-r}},pu.prototype.addSymbols=function(t,e,r,i,n,o,a,s,l,u,c,p){for(var h=t.indexArray,f=t.layoutVertexArray,d=t.segments.prepareSegment(4*e.length,f,h,o.sortKey),m=this.glyphOffsetArray.length,y=d.vertexLength,g=this.allowVerticalPlacement&&a===ml.vertical?Math.PI/2:0,_=o.text&&o.text.sections,v=0;v<e.length;v++){var x=e[v],b=x.tl,w=x.tr,S=x.bl,T=x.br,I=x.tex,E=x.pixelOffsetTL,A=x.pixelOffsetBR,z=x.minFontScaleX,P=x.minFontScaleY,C=x.glyphOffset,k=x.isSDF,M=x.sectionIndex,D=d.vertexLength,L=C[1];au(f,s.x,s.y,b.x,L+b.y,I.x,I.y,r,k,E.x,E.y,z,P),au(f,s.x,s.y,w.x,L+w.y,I.x+I.w,I.y,r,k,A.x,E.y,z,P),au(f,s.x,s.y,S.x,L+S.y,I.x,I.y+I.h,r,k,E.x,A.y,z,P),au(f,s.x,s.y,T.x,L+T.y,I.x+I.w,I.y+I.h,r,k,A.x,A.y,z,P),su(t.dynamicLayoutVertexArray,s,g),h.emplaceBack(D,D+1,D+2),h.emplaceBack(D+1,D+2,D+3),d.vertexLength+=4,d.primitiveLength+=2,this.glyphOffsetArray.emplaceBack(C[0]),v!==e.length-1&&M===e[v+1].sectionIndex||t.programConfigurations.populatePaintArrays(f.length,o,o.index,{},p,_&&_[M])}t.placedSymbolArray.emplaceBack(s.x,s.y,m,this.glyphOffsetArray.length-m,y,l,u,s.segment,r?r[0]:0,r?r[1]:0,i[0],i[1],a,0,!1,0,c)},pu.prototype._addCollisionDebugVertex=function(t,e,r,i,n,o){return e.emplaceBack(0,0),t.emplaceBack(r.x,r.y,i,n,Math.round(o.x),Math.round(o.y))},pu.prototype.addCollisionDebugVertices=function(t,e,r,i,o,a,s){var l=o.segments.prepareSegment(4,o.layoutVertexArray,o.indexArray),u=l.vertexLength,c=o.layoutVertexArray,p=o.collisionVertexArray,h=s.anchorX,f=s.anchorY;this._addCollisionDebugVertex(c,p,a,h,f,new n(t,e)),this._addCollisionDebugVertex(c,p,a,h,f,new n(r,e)),this._addCollisionDebugVertex(c,p,a,h,f,new n(r,i)),this._addCollisionDebugVertex(c,p,a,h,f,new n(t,i)),l.vertexLength+=4;var d=o.indexArray;d.emplaceBack(u,u+1),d.emplaceBack(u+1,u+2),d.emplaceBack(u+2,u+3),d.emplaceBack(u+3,u),l.primitiveLength+=4},pu.prototype.addDebugCollisionBoxes=function(t,e,r,i){for(var n=t;n<e;n++){var o=this.collisionBoxArray.get(n);this.addCollisionDebugVertices(o.x1,o.y1,o.x2,o.y2,i?this.textCollisionBox:this.iconCollisionBox,o.anchorPoint,r)}},pu.prototype.generateCollisionDebugBuffers=function(){this.hasDebugData()&&this.destroyDebugData(),this.textCollisionBox=new cu(Ln,Os.members,qn),this.iconCollisionBox=new cu(Ln,Os.members,qn);for(var t=0;t<this.symbolInstances.length;t++){var e=this.symbolInstances.get(t);this.addDebugCollisionBoxes(e.textBoxStartIndex,e.textBoxEndIndex,e,!0),this.addDebugCollisionBoxes(e.verticalTextBoxStartIndex,e.verticalTextBoxEndIndex,e,!0),this.addDebugCollisionBoxes(e.iconBoxStartIndex,e.iconBoxEndIndex,e,!1),this.addDebugCollisionBoxes(e.verticalIconBoxStartIndex,e.verticalIconBoxEndIndex,e,!1)}},pu.prototype._deserializeCollisionBoxesForSymbol=function(t,e,r,i,n,o,a,s,l){for(var u={},c=e;c<r;c++){var p=t.get(c);u.textBox={x1:p.x1,y1:p.y1,x2:p.x2,y2:p.y2,anchorPointX:p.anchorPointX,anchorPointY:p.anchorPointY},u.textFeatureIndex=p.featureIndex;break}for(var h=i;h<n;h++){var f=t.get(h);u.verticalTextBox={x1:f.x1,y1:f.y1,x2:f.x2,y2:f.y2,anchorPointX:f.anchorPointX,anchorPointY:f.anchorPointY},u.verticalTextFeatureIndex=f.featureIndex;break}for(var d=o;d<a;d++){var m=t.get(d);u.iconBox={x1:m.x1,y1:m.y1,x2:m.x2,y2:m.y2,anchorPointX:m.anchorPointX,anchorPointY:m.anchorPointY},u.iconFeatureIndex=m.featureIndex;break}for(var y=s;y<l;y++){var g=t.get(y);u.verticalIconBox={x1:g.x1,y1:g.y1,x2:g.x2,y2:g.y2,anchorPointX:g.anchorPointX,anchorPointY:g.anchorPointY},u.verticalIconFeatureIndex=g.featureIndex;break}return u},pu.prototype.deserializeCollisionBoxes=function(t){this.collisionArrays=[];for(var e=0;e<this.symbolInstances.length;e++){var r=this.symbolInstances.get(e);this.collisionArrays.push(this._deserializeCollisionBoxesForSymbol(t,r.textBoxStartIndex,r.textBoxEndIndex,r.verticalTextBoxStartIndex,r.verticalTextBoxEndIndex,r.iconBoxStartIndex,r.iconBoxEndIndex,r.verticalIconBoxStartIndex,r.verticalIconBoxEndIndex))}},pu.prototype.hasTextData=function(){return this.text.segments.get().length>0},pu.prototype.hasIconData=function(){return this.icon.segments.get().length>0},pu.prototype.hasDebugData=function(){return this.textCollisionBox&&this.iconCollisionBox},pu.prototype.hasTextCollisionBoxData=function(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0},pu.prototype.hasIconCollisionBoxData=function(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0},pu.prototype.addIndicesForPlacedSymbol=function(t,e){for(var r=t.placedSymbolArray.get(e),i=r.vertexStartIndex+4*r.numGlyphs,n=r.vertexStartIndex;n<i;n+=4)t.indexArray.emplaceBack(n,n+1,n+2),t.indexArray.emplaceBack(n+1,n+2,n+3)},pu.prototype.getSortedSymbolIndexes=function(t){if(this.sortedAngle===t&&void 0!==this.symbolInstanceIndexes)return this.symbolInstanceIndexes;for(var e=Math.sin(t),r=Math.cos(t),i=[],n=[],o=[],a=0;a<this.symbolInstances.length;++a){o.push(a);var s=this.symbolInstances.get(a);i.push(0|Math.round(e*s.anchorX+r*s.anchorY)),n.push(s.featureIndex)}return o.sort(function(t,e){return i[t]-i[e]||n[e]-n[t]}),o},pu.prototype.addToSortKeyRanges=function(t,e){var r=this.sortKeyRanges[this.sortKeyRanges.length-1];r&&r.sortKey===e?r.symbolInstanceEnd=t+1:this.sortKeyRanges.push({sortKey:e,symbolInstanceStart:t,symbolInstanceEnd:t+1})},pu.prototype.sortFeatures=function(t){var e=this;if(this.sortFeaturesByY&&this.sortedAngle!==t&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(t),this.sortedAngle=t,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var r=0,i=this.symbolInstanceIndexes;r<i.length;r+=1){var n=this.symbolInstances.get(i[r]);this.featureSortOrder.push(n.featureIndex),[n.rightJustifiedTextSymbolIndex,n.centerJustifiedTextSymbolIndex,n.leftJustifiedTextSymbolIndex].forEach(function(t,r,i){t>=0&&i.indexOf(t)===r&&e.addIndicesForPlacedSymbol(e.text,t)}),n.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,n.verticalPlacedTextSymbolIndex),n.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,n.placedIconSymbolIndex),n.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,n.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},Li("SymbolBucket",pu,{omit:["layers","collisionBoxArray","features","compareText"]}),pu.MAX_GLYPHS=65535,pu.addDynamicAttributes=su;var hu=new _n({"symbol-placement":new fn(Et.layout_symbol["symbol-placement"]),"symbol-spacing":new fn(Et.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new fn(Et.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new dn(Et.layout_symbol["symbol-sort-key"]),"symbol-z-order":new fn(Et.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new fn(Et.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new fn(Et.layout_symbol["icon-ignore-placement"]),"icon-optional":new fn(Et.layout_symbol["icon-optional"]),"icon-rotation-alignment":new fn(Et.layout_symbol["icon-rotation-alignment"]),"icon-size":new dn(Et.layout_symbol["icon-size"]),"icon-text-fit":new fn(Et.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new fn(Et.layout_symbol["icon-text-fit-padding"]),"icon-image":new dn(Et.layout_symbol["icon-image"]),"icon-rotate":new dn(Et.layout_symbol["icon-rotate"]),"icon-padding":new fn(Et.layout_symbol["icon-padding"]),"icon-keep-upright":new fn(Et.layout_symbol["icon-keep-upright"]),"icon-offset":new dn(Et.layout_symbol["icon-offset"]),"icon-anchor":new dn(Et.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new fn(Et.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new fn(Et.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new fn(Et.layout_symbol["text-rotation-alignment"]),"text-field":new dn(Et.layout_symbol["text-field"]),"text-font":new dn(Et.layout_symbol["text-font"]),"text-size":new dn(Et.layout_symbol["text-size"]),"text-max-width":new dn(Et.layout_symbol["text-max-width"]),"text-line-height":new fn(Et.layout_symbol["text-line-height"]),"text-letter-spacing":new dn(Et.layout_symbol["text-letter-spacing"]),"text-justify":new dn(Et.layout_symbol["text-justify"]),"text-radial-offset":new dn(Et.layout_symbol["text-radial-offset"]),"text-variable-anchor":new fn(Et.layout_symbol["text-variable-anchor"]),"text-anchor":new dn(Et.layout_symbol["text-anchor"]),"text-max-angle":new fn(Et.layout_symbol["text-max-angle"]),"text-writing-mode":new fn(Et.layout_symbol["text-writing-mode"]),"text-rotate":new dn(Et.layout_symbol["text-rotate"]),"text-padding":new fn(Et.layout_symbol["text-padding"]),"text-keep-upright":new fn(Et.layout_symbol["text-keep-upright"]),"text-transform":new dn(Et.layout_symbol["text-transform"]),"text-offset":new dn(Et.layout_symbol["text-offset"]),"text-allow-overlap":new fn(Et.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new fn(Et.layout_symbol["text-ignore-placement"]),"text-optional":new fn(Et.layout_symbol["text-optional"])}),fu={paint:new _n({"icon-opacity":new dn(Et.paint_symbol["icon-opacity"]),"icon-color":new dn(Et.paint_symbol["icon-color"]),"icon-halo-color":new dn(Et.paint_symbol["icon-halo-color"]),"icon-halo-width":new dn(Et.paint_symbol["icon-halo-width"]),"icon-halo-blur":new dn(Et.paint_symbol["icon-halo-blur"]),"icon-translate":new fn(Et.paint_symbol["icon-translate"]),"icon-translate-anchor":new fn(Et.paint_symbol["icon-translate-anchor"]),"text-opacity":new dn(Et.paint_symbol["text-opacity"]),"text-color":new dn(Et.paint_symbol["text-color"],{runtimeType:Ot,getOverride:function(t){return t.textColor},hasOverride:function(t){return!!t.textColor}}),"text-halo-color":new dn(Et.paint_symbol["text-halo-color"]),"text-halo-width":new dn(Et.paint_symbol["text-halo-width"]),"text-halo-blur":new dn(Et.paint_symbol["text-halo-blur"]),"text-translate":new fn(Et.paint_symbol["text-translate"]),"text-translate-anchor":new fn(Et.paint_symbol["text-translate-anchor"])}),layout:hu},du=function(t){this.type=t.property.overrides?t.property.overrides.runtimeType:Lt,this.defaultValue=t};du.prototype.evaluate=function(t){if(t.formattedSection){var e=this.defaultValue.property.overrides;if(e&&e.hasOverride(t.formattedSection))return e.getOverride(t.formattedSection)}return t.feature&&t.featureState?this.defaultValue.evaluate(t.feature,t.featureState):this.defaultValue.property.specification.default},du.prototype.eachChild=function(t){this.defaultValue.isConstant()||t(this.defaultValue.value._styleExpression.expression)},du.prototype.outputDefined=function(){return!1},du.prototype.serialize=function(){return null},Li("FormatSectionOverride",du,{omit:["defaultValue"]});var mu=function(t){function e(e){t.call(this,e,fu)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.recalculate=function(e,r){if(t.prototype.recalculate.call(this,e,r),"auto"===this.layout.get("icon-rotation-alignment")&&(this.layout._values["icon-rotation-alignment"]="point"!==this.layout.get("symbol-placement")?"map":"viewport"),"auto"===this.layout.get("text-rotation-alignment")&&(this.layout._values["text-rotation-alignment"]="point"!==this.layout.get("symbol-placement")?"map":"viewport"),"auto"===this.layout.get("text-pitch-alignment")&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")),"auto"===this.layout.get("icon-pitch-alignment")&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),"point"===this.layout.get("symbol-placement")){var i=this.layout.get("text-writing-mode");if(i){for(var n=[],o=0,a=i;o<a.length;o+=1){var s=a[o];n.indexOf(s)<0&&n.push(s)}this.layout._values["text-writing-mode"]=n}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()},e.prototype.getValueAndResolveTokens=function(t,e,r,i){var n=this.layout.get(t).evaluate(e,{},r,i),o=this._unevaluatedLayout._values[t];return o.isDataDriven()||jr(o.value)||!n?n:function(t,e){return n.replace(/{([^{}]+)}/g,function(e,r){return r in t?String(t[r]):""})}(e.properties)},e.prototype.createBucket=function(t){return new pu(t)},e.prototype.queryRadius=function(){return 0},e.prototype.queryIntersectsFeature=function(){return!1},e.prototype._setPaintOverrides=function(){for(var t=0,r=fu.paint.overridableProperties;t<r.length;t+=1){var i=r[t];if(e.hasPaintOverride(this.layout,i)){var n,o=this.paint.get(i),a=new du(o),s=new Nr(a,o.property.specification);n="constant"===o.value.kind||"source"===o.value.kind?new Zr("source",s):new Gr("composite",s,o.value.zoomStops,o.value._interpolationType),this.paint._values[i]=new pn(o.property,n,o.parameters)}}},e.prototype._handleOverridablePaintPropertyUpdate=function(t,r,i){return!(!this.layout||r.isDataDriven()||i.isDataDriven())&&e.hasPaintOverride(this.layout,t)},e.hasPaintOverride=function(t,e){var r=t.get("text-field"),i=fu.paint.properties[e],n=!1,o=function(t){for(var e=0,r=t;e<r.length;e+=1)if(i.overrides&&i.overrides.hasOverride(r[e]))return void(n=!0)};if("constant"===r.value.kind&&r.value.value instanceof te)o(r.value.value.sections);else if("source"===r.value.kind){var a=function(t){n||(t instanceof ae&&ne(t.value)===jt?o(t.value.sections):t instanceof ce?o(t.sections):t.eachChild(a))},s=r.value;s._styleExpression&&a(s._styleExpression.expression)}return n},e}(vn),yu={paint:new _n({"background-color":new fn(Et.paint_background["background-color"]),"background-pattern":new yn(Et.paint_background["background-pattern"]),"background-opacity":new fn(Et.paint_background["background-opacity"])})},gu=function(t){function e(e){t.call(this,e,yu)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e}(vn),_u={paint:new _n({"raster-opacity":new fn(Et.paint_raster["raster-opacity"]),"raster-hue-rotate":new fn(Et.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new fn(Et.paint_raster["raster-brightness-min"]),"raster-brightness-max":new fn(Et.paint_raster["raster-brightness-max"]),"raster-saturation":new fn(Et.paint_raster["raster-saturation"]),"raster-contrast":new fn(Et.paint_raster["raster-contrast"]),"raster-resampling":new fn(Et.paint_raster["raster-resampling"]),"raster-fade-duration":new fn(Et.paint_raster["raster-fade-duration"])})},vu=function(t){function e(e){t.call(this,e,_u)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e}(vn),xu=function(t){function e(e){t.call(this,e,{}),this.implementation=e}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.is3D=function(){return"3d"===this.implementation.renderingMode},e.prototype.hasOffscreenPass=function(){return void 0!==this.implementation.prerender},e.prototype.recalculate=function(){},e.prototype.updateTransitions=function(){},e.prototype.hasTransition=function(){},e.prototype.serialize=function(){},e.prototype.onAdd=function(t){this.implementation.onAdd&&this.implementation.onAdd(t,t.painter.context.gl)},e.prototype.onRemove=function(t){this.implementation.onRemove&&this.implementation.onRemove(t,t.painter.context.gl)},e}(vn),bu={circle:sa,heatmap:ga,hillshade:va,fill:os,"fill-extrusion":ws,line:Ds,symbol:mu,background:gu,raster:vu},wu=self.HTMLImageElement,Su=self.HTMLCanvasElement,Tu=self.HTMLVideoElement,Iu=self.ImageData,Eu=self.ImageBitmap,Au=function(t,e,r,i){this.context=t,this.format=r,this.texture=t.gl.createTexture(),this.update(e,i)};Au.prototype.update=function(t,e,r){var i=t.width,n=t.height,o=!(this.size&&this.size[0]===i&&this.size[1]===n||r),a=this.context,s=a.gl;if(this.useMipmap=Boolean(e&&e.useMipmap),s.bindTexture(s.TEXTURE_2D,this.texture),a.pixelStoreUnpackFlipY.set(!1),a.pixelStoreUnpack.set(1),a.pixelStoreUnpackPremultiplyAlpha.set(this.format===s.RGBA&&(!e||!1!==e.premultiply)),o)this.size=[i,n],t instanceof wu||t instanceof Su||t instanceof Tu||t instanceof Iu||Eu&&t instanceof Eu?s.texImage2D(s.TEXTURE_2D,0,this.format,this.format,s.UNSIGNED_BYTE,t):s.texImage2D(s.TEXTURE_2D,0,this.format,i,n,0,this.format,s.UNSIGNED_BYTE,t.data);else{var l=r||{x:0,y:0},u=l.x,c=l.y;t instanceof wu||t instanceof Su||t instanceof Tu||t instanceof Iu||Eu&&t instanceof Eu?s.texSubImage2D(s.TEXTURE_2D,0,u,c,s.RGBA,s.UNSIGNED_BYTE,t):s.texSubImage2D(s.TEXTURE_2D,0,u,c,i,n,s.RGBA,s.UNSIGNED_BYTE,t.data)}this.useMipmap&&this.isSizePowerOfTwo()&&s.generateMipmap(s.TEXTURE_2D)},Au.prototype.bind=function(t,e,r){var i=this.context.gl;i.bindTexture(i.TEXTURE_2D,this.texture),r!==i.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(r=i.LINEAR),t!==this.filter&&(i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,t),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,r||t),this.filter=t),e!==this.wrap&&(i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,e),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,e),this.wrap=e)},Au.prototype.isSizePowerOfTwo=function(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0},Au.prototype.destroy=function(){this.context.gl.deleteTexture(this.texture),this.texture=null};var zu=function(t){var e=this;this._callback=t,this._triggered=!1,"undefined"!=typeof MessageChannel&&(this._channel=new MessageChannel,this._channel.port2.onmessage=function(){e._triggered=!1,e._callback()})};zu.prototype.trigger=function(){var t=this;this._triggered||(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout(function(){t._triggered=!1,t._callback()},0))},zu.prototype.remove=function(){delete this._channel,this._callback=function(){}};var Pu=function(t,e,r){this.target=t,this.parent=e,this.mapId=r,this.callbacks={},this.tasks={},this.taskQueue=[],this.cancelCallbacks={},m(["receive","process"],this),this.invoker=new zu(this.process),this.target.addEventListener("message",this.receive,!1),this.globalScope=T()?t:self};function Cu(t,e,r){var i=2*Math.PI*6378137/256/Math.pow(2,r);return[t*i-2*Math.PI*6378137/2,e*i-2*Math.PI*6378137/2]}Pu.prototype.send=function(t,e,r,i,n){var o=this;void 0===n&&(n=!1);var a=Math.round(1e18*Math.random()).toString(36).substring(0,10);r&&(this.callbacks[a]=r);var s=A(this.globalScope)?void 0:[];return this.target.postMessage({id:a,type:t,hasCallback:!!r,targetMapId:i,mustQueue:n,sourceMapId:this.mapId,data:Oi(e,s)},s),{cancel:function(){r&&delete o.callbacks[a],o.target.postMessage({id:a,type:"<cancel>",targetMapId:i,sourceMapId:o.mapId})}}},Pu.prototype.receive=function(t){var e=t.data,r=e.id;if(r&&(!e.targetMapId||this.mapId===e.targetMapId))if("<cancel>"===e.type){delete this.tasks[r];var i=this.cancelCallbacks[r];delete this.cancelCallbacks[r],i&&i()}else T()||e.mustQueue?(this.tasks[r]=e,this.taskQueue.push(r),this.invoker.trigger()):this.processTask(r,e)},Pu.prototype.process=function(){if(this.taskQueue.length){var t=this.taskQueue.shift(),e=this.tasks[t];delete this.tasks[t],this.taskQueue.length&&this.invoker.trigger(),e&&this.processTask(t,e)}},Pu.prototype.processTask=function(t,e){var r=this;if("<response>"===e.type){var i=this.callbacks[t];delete this.callbacks[t],i&&(e.error?i(Ui(e.error)):i(null,Ui(e.data)))}else{var n=!1,o=A(this.globalScope)?void 0:[],a=e.hasCallback?function(e,i){n=!0,delete r.cancelCallbacks[t],r.target.postMessage({id:t,type:"<response>",sourceMapId:r.mapId,error:e?Oi(e):null,data:Oi(i,o)},o)}:function(t){n=!0},s=null,l=Ui(e.data);if(this.parent[e.type])s=this.parent[e.type](e.sourceMapId,l,a);else if(this.parent.getWorkerSource){var u=e.type.split(".");s=this.parent.getWorkerSource(e.sourceMapId,u[0],l.source)[u[1]](l,a)}else a(new Error("Could not find function "+e.type));!n&&s&&s.cancel&&(this.cancelCallbacks[t]=s.cancel)}},Pu.prototype.remove=function(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)};var ku=function(t,e){t&&(e?this.setSouthWest(t).setNorthEast(e):4===t.length?this.setSouthWest([t[0],t[1]]).setNorthEast([t[2],t[3]]):this.setSouthWest(t[0]).setNorthEast(t[1]))};ku.prototype.setNorthEast=function(t){return this._ne=t instanceof Mu?new Mu(t.lng,t.lat):Mu.convert(t),this},ku.prototype.setSouthWest=function(t){return this._sw=t instanceof Mu?new Mu(t.lng,t.lat):Mu.convert(t),this},ku.prototype.extend=function(t){var e,r,i=this._sw,n=this._ne;if(t instanceof Mu)e=t,r=t;else{if(!(t instanceof ku))return Array.isArray(t)?4===t.length||t.every(Array.isArray)?this.extend(ku.convert(t)):this.extend(Mu.convert(t)):this;if(r=t._ne,!(e=t._sw)||!r)return this}return i||n?(i.lng=Math.min(e.lng,i.lng),i.lat=Math.min(e.lat,i.lat),n.lng=Math.max(r.lng,n.lng),n.lat=Math.max(r.lat,n.lat)):(this._sw=new Mu(e.lng,e.lat),this._ne=new Mu(r.lng,r.lat)),this},ku.prototype.getCenter=function(){return new Mu((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},ku.prototype.getSouthWest=function(){return this._sw},ku.prototype.getNorthEast=function(){return this._ne},ku.prototype.getNorthWest=function(){return new Mu(this.getWest(),this.getNorth())},ku.prototype.getSouthEast=function(){return new Mu(this.getEast(),this.getSouth())},ku.prototype.getWest=function(){return this._sw.lng},ku.prototype.getSouth=function(){return this._sw.lat},ku.prototype.getEast=function(){return this._ne.lng},ku.prototype.getNorth=function(){return this._ne.lat},ku.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},ku.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},ku.prototype.isEmpty=function(){return!(this._sw&&this._ne)},ku.prototype.contains=function(t){var e=Mu.convert(t),r=e.lng,i=e.lat,n=this._sw.lng<=r&&r<=this._ne.lng;return this._sw.lng>this._ne.lng&&(n=this._sw.lng>=r&&r>=this._ne.lng),this._sw.lat<=i&&i<=this._ne.lat&&n},ku.convert=function(t){return!t||t instanceof ku?t:new ku(t)};var Mu=function(t,e){if(isNaN(t)||isNaN(e))throw new Error("Invalid LngLat object: ("+t+", "+e+")");if(this.lng=+t,this.lat=+e,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")};Mu.prototype.wrap=function(){return new Mu(u(this.lng,-180,180),this.lat)},Mu.prototype.toArray=function(){return[this.lng,this.lat]},Mu.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},Mu.prototype.distanceTo=function(t){var e=Math.PI/180,r=this.lat*e,i=t.lat*e,n=Math.sin(r)*Math.sin(i)+Math.cos(r)*Math.cos(i)*Math.cos((t.lng-this.lng)*e);return 6371008.8*Math.acos(Math.min(n,1))},Mu.prototype.toBounds=function(t){void 0===t&&(t=0);var e=360*t/40075017,r=e/Math.cos(Math.PI/180*this.lat);return new ku(new Mu(this.lng-r,this.lat-e),new Mu(this.lng+r,this.lat+e))},Mu.convert=function(t){if(t instanceof Mu)return t;if(Array.isArray(t)&&(2===t.length||3===t.length))return new Mu(Number(t[0]),Number(t[1]));if(!Array.isArray(t)&&"object"==typeof t&&null!==t)return new Mu(Number("lng"in t?t.lng:t.lon),Number(t.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: <lng>, lat: <lat>}, an object {lon: <lng>, lat: <lat>}, or an array of [<lng>, <lat>]")};var Du=2*Math.PI*6371008.8;function Lu(t){return Du*Math.cos(t*Math.PI/180)}function Ru(t){return(180+t)/360}function Bu(t){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+t*Math.PI/360)))/360}function Fu(t,e){return t/Lu(e)}function Ou(t){return 360/Math.PI*Math.atan(Math.exp((180-360*t)*Math.PI/180))-90}var Uu=function(t,e,r){void 0===r&&(r=0),this.x=+t,this.y=+e,this.z=+r};Uu.fromLngLat=function(t,e){void 0===e&&(e=0);var r=Mu.convert(t);return new Uu(Ru(r.lng),Bu(r.lat),Fu(e,r.lat))},Uu.prototype.toLngLat=function(){return new Mu(360*this.x-180,Ou(this.y))},Uu.prototype.toAltitude=function(){return this.z*Lu(Ou(this.y))},Uu.prototype.meterInMercatorCoordinateUnits=function(){return 1/Du*(t=Ou(this.y),1/Math.cos(t*Math.PI/180));var t};var Vu=function(t,e,r){this.z=t,this.x=e,this.y=r,this.key=qu(0,t,t,e,r)};Vu.prototype.equals=function(t){return this.z===t.z&&this.x===t.x&&this.y===t.y},Vu.prototype.url=function(t,e){var r,i,n,o,a,s=(i=this.y,n=this.z,o=Cu(256*(r=this.x),256*(i=Math.pow(2,n)-i-1),n),a=Cu(256*(r+1),256*(i+1),n),o[0]+","+o[1]+","+a[0]+","+a[1]),l=function(t,e,r){for(var i,n="",o=t;o>0;o--)n+=(e&(i=1<<o-1)?1:0)+(r&i?2:0);return n}(this.z,this.x,this.y);return t[(this.x+this.y)%t.length].replace("{prefix}",(this.x%16).toString(16)+(this.y%16).toString(16)).replace("{z}",String(this.z)).replace("{x}",String(this.x)).replace("{y}",String("tms"===e?Math.pow(2,this.z)-this.y-1:this.y)).replace("{quadkey}",l).replace("{bbox-epsg-3857}",s)},Vu.prototype.getTilePoint=function(t){var e=Math.pow(2,this.z);return new n(8192*(t.x*e-this.x),8192*(t.y*e-this.y))},Vu.prototype.toString=function(){return this.z+"/"+this.x+"/"+this.y};var Nu=function(t,e){this.wrap=t,this.canonical=e,this.key=qu(t,e.z,e.z,e.x,e.y)},ju=function(t,e,r,i,n){this.overscaledZ=t,this.wrap=e,this.canonical=new Vu(r,+i,+n),this.key=qu(e,t,r,i,n)};function qu(t,e,r,i,n){(t*=2)<0&&(t=-1*t-1);var o=1<<r;return(o*o*t+o*n+i).toString(36)+r.toString(36)+e.toString(36)}ju.prototype.equals=function(t){return this.overscaledZ===t.overscaledZ&&this.wrap===t.wrap&&this.canonical.equals(t.canonical)},ju.prototype.scaledTo=function(t){var e=this.canonical.z-t;return t>this.canonical.z?new ju(t,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new ju(t,this.wrap,t,this.canonical.x>>e,this.canonical.y>>e)},ju.prototype.calculateScaledKey=function(t,e){var r=this.canonical.z-t;return t>this.canonical.z?qu(this.wrap*+e,t,this.canonical.z,this.canonical.x,this.canonical.y):qu(this.wrap*+e,t,t,this.canonical.x>>r,this.canonical.y>>r)},ju.prototype.isChildOf=function(t){if(t.wrap!==this.wrap)return!1;var e=this.canonical.z-t.canonical.z;return 0===t.overscaledZ||t.overscaledZ<this.overscaledZ&&t.canonical.x===this.canonical.x>>e&&t.canonical.y===this.canonical.y>>e},ju.prototype.children=function(t){if(this.overscaledZ>=t)return[new ju(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var e=this.canonical.z+1,r=2*this.canonical.x,i=2*this.canonical.y;return[new ju(e,this.wrap,e,r,i),new ju(e,this.wrap,e,r+1,i),new ju(e,this.wrap,e,r,i+1),new ju(e,this.wrap,e,r+1,i+1)]},ju.prototype.isLessThan=function(t){return this.wrap<t.wrap||!(this.wrap>t.wrap)&&(this.overscaledZ<t.overscaledZ||!(this.overscaledZ>t.overscaledZ)&&(this.canonical.x<t.canonical.x||!(this.canonical.x>t.canonical.x)&&this.canonical.y<t.canonical.y))},ju.prototype.wrapped=function(){return new ju(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)},ju.prototype.unwrapTo=function(t){return new ju(this.overscaledZ,t,this.canonical.z,this.canonical.x,this.canonical.y)},ju.prototype.overscaleFactor=function(){return Math.pow(2,this.overscaledZ-this.canonical.z)},ju.prototype.toUnwrapped=function(){return new Nu(this.wrap,this.canonical)},ju.prototype.toString=function(){return this.overscaledZ+"/"+this.canonical.x+"/"+this.canonical.y},ju.prototype.getTilePoint=function(t){return this.canonical.getTilePoint(new Uu(t.x-this.wrap,t.y))},Li("CanonicalTileID",Vu),Li("OverscaledTileID",ju,{omit:["posMatrix"]});var Zu=function(t,e,r){if(this.uid=t,e.height!==e.width)throw new RangeError("DEM tiles must be square");if(r&&"mapbox"!==r&&"terrarium"!==r)return b('"'+r+'" is not a valid encoding type. Valid types include "mapbox" and "terrarium".');this.stride=e.height;var i=this.dim=e.height-2;this.data=new Uint32Array(e.data.buffer),this.encoding=r||"mapbox";for(var n=0;n<i;n++)this.data[this._idx(-1,n)]=this.data[this._idx(0,n)],this.data[this._idx(i,n)]=this.data[this._idx(i-1,n)],this.data[this._idx(n,-1)]=this.data[this._idx(n,0)],this.data[this._idx(n,i)]=this.data[this._idx(n,i-1)];this.data[this._idx(-1,-1)]=this.data[this._idx(0,0)],this.data[this._idx(i,-1)]=this.data[this._idx(i-1,0)],this.data[this._idx(-1,i)]=this.data[this._idx(0,i-1)],this.data[this._idx(i,i)]=this.data[this._idx(i-1,i-1)]};Zu.prototype.get=function(t,e){var r=new Uint8Array(this.data.buffer),i=4*this._idx(t,e);return("terrarium"===this.encoding?this._unpackTerrarium:this._unpackMapbox)(r[i],r[i+1],r[i+2])},Zu.prototype.getUnpackVector=function(){return"terrarium"===this.encoding?[256,1,1/256,32768]:[6553.6,25.6,.1,1e4]},Zu.prototype._idx=function(t,e){if(t<-1||t>=this.dim+1||e<-1||e>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(e+1)*this.stride+(t+1)},Zu.prototype._unpackMapbox=function(t,e,r){return(256*t*256+256*e+r)/10-1e4},Zu.prototype._unpackTerrarium=function(t,e,r){return 256*t+e+r/256-32768},Zu.prototype.getPixels=function(){return new da({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},Zu.prototype.backfillBorder=function(t,e,r){if(this.dim!==t.dim)throw new Error("dem dimension mismatch");var i=e*this.dim,n=e*this.dim+this.dim,o=r*this.dim,a=r*this.dim+this.dim;switch(e){case-1:i=n-1;break;case 1:n=i+1}switch(r){case-1:o=a-1;break;case 1:a=o+1}for(var s=-e*this.dim,l=-r*this.dim,u=o;u<a;u++)for(var c=i;c<n;c++)this.data[this._idx(c,u)]=t.data[this._idx(c+s,u+l)]},Li("DEMData",Zu);var Gu=function(t){this._stringToNumber={},this._numberToString=[];for(var e=0;e<t.length;e++){var r=t[e];this._stringToNumber[r]=e,this._numberToString[e]=r}};Gu.prototype.encode=function(t){return this._stringToNumber[t]},Gu.prototype.decode=function(t){return this._numberToString[t]};var Xu=function(t,e,r,i,n){this.type="Feature",this._vectorTileFeature=t,t._z=e,t._x=r,t._y=i,this.properties=t.properties,this.id=n},Wu={geometry:{configurable:!0}};Wu.geometry.get=function(){return void 0===this._geometry&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry},Wu.geometry.set=function(t){this._geometry=t},Xu.prototype.toJSON=function(){var t={geometry:this.geometry};for(var e in this)"_geometry"!==e&&"_vectorTileFeature"!==e&&(t[e]=this[e]);return t},Object.defineProperties(Xu.prototype,Wu);var Ku=function(){this.state={},this.stateChanges={},this.deletedStates={}};Ku.prototype.updateState=function(t,e,r){var i=String(e);if(this.stateChanges[t]=this.stateChanges[t]||{},this.stateChanges[t][i]=this.stateChanges[t][i]||{},c(this.stateChanges[t][i],r),null===this.deletedStates[t])for(var n in this.deletedStates[t]={},this.state[t])n!==i&&(this.deletedStates[t][n]=null);else if(this.deletedStates[t]&&null===this.deletedStates[t][i])for(var o in this.deletedStates[t][i]={},this.state[t][i])r[o]||(this.deletedStates[t][i][o]=null);else for(var a in r)this.deletedStates[t]&&this.deletedStates[t][i]&&null===this.deletedStates[t][i][a]&&delete this.deletedStates[t][i][a]},Ku.prototype.removeFeatureState=function(t,e,r){if(null!==this.deletedStates[t]){var i=String(e);if(this.deletedStates[t]=this.deletedStates[t]||{},r&&void 0!==e)null!==this.deletedStates[t][i]&&(this.deletedStates[t][i]=this.deletedStates[t][i]||{},this.deletedStates[t][i][r]=null);else if(void 0!==e)if(this.stateChanges[t]&&this.stateChanges[t][i])for(r in this.deletedStates[t][i]={},this.stateChanges[t][i])this.deletedStates[t][i][r]=null;else this.deletedStates[t][i]=null;else this.deletedStates[t]=null}},Ku.prototype.getState=function(t,e){var r=String(e),i=c({},(this.state[t]||{})[r],(this.stateChanges[t]||{})[r]);if(null===this.deletedStates[t])return{};if(this.deletedStates[t]){var n=this.deletedStates[t][e];if(null===n)return{};for(var o in n)delete i[o]}return i},Ku.prototype.initializeTileState=function(t,e){t.setFeatureState(this.state,e)},Ku.prototype.coalesceChanges=function(t,e){var r={};for(var i in this.stateChanges){this.state[i]=this.state[i]||{};var n={};for(var o in this.stateChanges[i])this.state[i][o]||(this.state[i][o]={}),c(this.state[i][o],this.stateChanges[i][o]),n[o]=this.state[i][o];r[i]=n}for(var a in this.deletedStates){this.state[a]=this.state[a]||{};var s={};if(null===this.deletedStates[a])for(var l in this.state[a])s[l]={},this.state[a][l]={};else for(var u in this.deletedStates[a]){if(null===this.deletedStates[a][u])this.state[a][u]={};else for(var p=0,h=Object.keys(this.deletedStates[a][u]);p<h.length;p+=1)delete this.state[a][u][h[p]];s[u]=this.state[a][u]}r[a]=r[a]||{},c(r[a],s)}if(this.stateChanges={},this.deletedStates={},0!==Object.keys(r).length)for(var f in t)t[f].setFeatureState(r,e)};var Hu=function(t,e){this.tileID=t,this.x=t.canonical.x,this.y=t.canonical.y,this.z=t.canonical.z,this.grid=new Pi(8192,16,0),this.grid3D=new Pi(8192,16,0),this.featureIndexArray=new ro,this.promoteId=e};function Ju(t,e,r,i,n){return g(t,function(t,o){var a=e instanceof hn?e.get(o):null;return a&&a.evaluate?a.evaluate(r,i,n):a})}function Yu(t){for(var e=1/0,r=1/0,i=-1/0,n=-1/0,o=0,a=t;o<a.length;o+=1){var s=a[o];e=Math.min(e,s.x),r=Math.min(r,s.y),i=Math.max(i,s.x),n=Math.max(n,s.y)}return{minX:e,minY:r,maxX:i,maxY:n}}function Qu(t,e){return e-t}Hu.prototype.insert=function(t,e,r,i,n,o){var a=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(r,i,n);for(var s=o?this.grid3D:this.grid,l=0;l<e.length;l++){for(var u=e[l],c=[1/0,1/0,-1/0,-1/0],p=0;p<u.length;p++){var h=u[p];c[0]=Math.min(c[0],h.x),c[1]=Math.min(c[1],h.y),c[2]=Math.max(c[2],h.x),c[3]=Math.max(c[3],h.y)}c[0]<8192&&c[1]<8192&&c[2]>=0&&c[3]>=0&&s.insert(a,c[0],c[1],c[2],c[3])}},Hu.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new ms.VectorTile(new Zs(this.rawTileData)).layers,this.sourceLayerCoder=new Gu(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},Hu.prototype.query=function(t,e,r,i){var o=this;this.loadVTLayers();for(var a=t.params||{},s=8192/t.tileSize/t.scale,l=ri(a.filter),u=t.queryGeometry,c=t.queryPadding*s,p=Yu(u),h=this.grid.query(p.minX-c,p.minY-c,p.maxX+c,p.maxY+c),f=Yu(t.cameraQueryGeometry),d=0,m=this.grid3D.query(f.minX-c,f.minY-c,f.maxX+c,f.maxY+c,function(e,r,i,o){return function(t,e,r,i,o){for(var a=0,s=t;a<s.length;a+=1){var l=s[a];if(e<=l.x&&r<=l.y&&i>=l.x&&o>=l.y)return!0}var u=[new n(e,r),new n(e,o),new n(i,o),new n(i,r)];if(t.length>2)for(var c=0,p=u;c<p.length;c+=1)if(Ko(t,p[c]))return!0;for(var h=0;h<t.length-1;h++)if(Ho(t[h],t[h+1],u))return!0;return!1}(t.cameraQueryGeometry,e-c,r-c,i+c,o+c)});d<m.length;d+=1)h.push(m[d]);h.sort(Qu);for(var y,g={},_=function(n){var c=h[n];if(c!==y){y=c;var p=o.featureIndexArray.get(c),f=null;o.loadMatchingFeature(g,p.bucketIndex,p.sourceLayerIndex,p.featureIndex,l,a.layers,a.availableImages,e,r,i,function(e,r,i){return f||(f=Bo(e)),r.queryIntersectsFeature(u,e,i,f,o.z,t.transform,s,t.pixelPosMatrix)})}},v=0;v<h.length;v++)_(v);return g},Hu.prototype.loadMatchingFeature=function(t,e,r,i,n,o,a,s,l,u,c){var p=this.bucketLayerIDs[e];if(!o||function(t,e){for(var r=0;r<t.length;r++)if(e.indexOf(t[r])>=0)return!0;return!1}(o,p)){var h=this.sourceLayerCoder.decode(r),f=this.vtLayers[h].feature(i);if(n.filter(new nn(this.tileID.overscaledZ),f))for(var d=this.getId(f,h),m=0;m<p.length;m++){var y=p[m];if(!(o&&o.indexOf(y)<0)){var g=s[y];if(g){var _={};void 0!==d&&u&&(_=u.getState(g.sourceLayer||"_geojsonTileLayer",d));var v=l[y];v.paint=Ju(v.paint,g.paint,f,_,a),v.layout=Ju(v.layout,g.layout,f,_,a);var x=!c||c(f,g,_);if(x){var b=new Xu(f,this.z,this.x,this.y,d);b.layer=v;var w=t[y];void 0===w&&(w=t[y]=[]),w.push({featureIndex:i,feature:b,intersectionZ:x})}}}}}},Hu.prototype.lookupSymbolFeatures=function(t,e,r,i,n,o,a,s){var l={};this.loadVTLayers();for(var u=ri(n),c=0,p=t;c<p.length;c+=1)this.loadMatchingFeature(l,r,i,p[c],u,o,a,s,e);return l},Hu.prototype.hasLayer=function(t){for(var e=0,r=this.bucketLayerIDs;e<r.length;e+=1)for(var i=0,n=r[e];i<n.length;i+=1)if(t===n[i])return!0;return!1},Hu.prototype.getId=function(t,e){var r=t.id;return this.promoteId&&"boolean"==typeof(r=t.properties["string"==typeof this.promoteId?this.promoteId:this.promoteId[e]])&&(r=Number(r)),r},Li("FeatureIndex",Hu,{omit:["rawTileData","sourceLayerCoder"]});var $u=function(t,e){this.tileID=t,this.uid=h(),this.uses=0,this.tileSize=e,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.expiredRequestCount=0,this.state="loading"};$u.prototype.registerFadeDuration=function(t){var e=t+this.timeAdded;e<B.now()||this.fadeEndTime&&e<this.fadeEndTime||(this.fadeEndTime=e)},$u.prototype.wasRequested=function(){return"errored"===this.state||"loaded"===this.state||"reloading"===this.state},$u.prototype.loadVectorData=function(t,e,r){if(this.hasData()&&this.unloadVectorData(),this.state="loaded",t){for(var i in t.featureIndex&&(this.latestFeatureIndex=t.featureIndex,t.rawTileData?(this.latestRawTileData=t.rawTileData,this.latestFeatureIndex.rawTileData=t.rawTileData):this.latestRawTileData&&(this.latestFeatureIndex.rawTileData=this.latestRawTileData)),this.collisionBoxArray=t.collisionBoxArray,this.buckets=function(t,e){var r={};if(!e)return r;for(var i=function(){var t=o[n],i=t.layerIds.map(function(t){return e.getLayer(t)}).filter(Boolean);if(0!==i.length){t.layers=i,t.stateDependentLayerIds&&(t.stateDependentLayers=t.stateDependentLayerIds.map(function(t){return i.filter(function(e){return e.id===t})[0]}));for(var a=0,s=i;a<s.length;a+=1)r[s[a].id]=t}},n=0,o=t;n<o.length;n+=1)i();return r}(t.buckets,e.style),this.hasSymbolBuckets=!1,this.buckets){var n=this.buckets[i];if(n instanceof pu){if(this.hasSymbolBuckets=!0,!r)break;n.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(var o in this.buckets){var a=this.buckets[o];if(a instanceof pu&&a.hasRTLText){this.hasRTLText=!0,rn.isLoading()||rn.isLoaded()||"deferred"!==tn()||en();break}}for(var s in this.queryPadding=0,this.buckets){var l=this.buckets[s];this.queryPadding=Math.max(this.queryPadding,e.style.getLayer(s).queryRadius(l))}t.imageAtlas&&(this.imageAtlas=t.imageAtlas),t.glyphAtlasImage&&(this.glyphAtlasImage=t.glyphAtlasImage)}else this.collisionBoxArray=new Kn},$u.prototype.unloadVectorData=function(){for(var t in this.buckets)this.buckets[t].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.imageAtlas&&(this.imageAtlas=null),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.latestFeatureIndex=null,this.state="unloaded"},$u.prototype.getBucket=function(t){return this.buckets[t.id]},$u.prototype.upload=function(t){for(var e in this.buckets){var r=this.buckets[e];r.uploadPending()&&r.upload(t)}var i=t.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new Au(t,this.imageAtlas.image,i.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new Au(t,this.glyphAtlasImage,i.ALPHA),this.glyphAtlasImage=null)},$u.prototype.prepare=function(t){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(t,this.imageAtlasTexture)},$u.prototype.queryRenderedFeatures=function(t,e,r,i,n,o,a,s,l,u){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:i,cameraQueryGeometry:n,scale:o,tileSize:this.tileSize,pixelPosMatrix:u,transform:s,params:a,queryPadding:this.queryPadding*l},t,e,r):{}},$u.prototype.querySourceFeatures=function(t,e){var r=this.latestFeatureIndex;if(r&&r.rawTileData){var i=r.loadVTLayers(),n=e?e.sourceLayer:"",o=i._geojsonTileLayer||i[n];if(o)for(var a=ri(e&&e.filter),s=this.tileID.canonical,l=s.z,u=s.x,c=s.y,p={z:l,x:u,y:c},h=0;h<o.length;h++){var f=o.feature(h);if(a.filter(new nn(this.tileID.overscaledZ),f)){var d=r.getId(f,n),m=new Xu(f,l,u,c,d);m.tile=p,t.push(m)}}}},$u.prototype.hasData=function(){return"loaded"===this.state||"reloading"===this.state||"expired"===this.state},$u.prototype.patternsLoaded=function(){return this.imageAtlas&&!!Object.keys(this.imageAtlas.patternPositions).length},$u.prototype.setExpiryData=function(t){var e=this.expirationTime;if(t.cacheControl){var r=I(t.cacheControl);r["max-age"]&&(this.expirationTime=Date.now()+1e3*r["max-age"])}else t.expires&&(this.expirationTime=new Date(t.expires).getTime());if(this.expirationTime){var i=Date.now(),n=!1;if(this.expirationTime>i)n=!1;else if(e)if(this.expirationTime<e)n=!0;else{var o=this.expirationTime-e;o?this.expirationTime=i+Math.max(o,3e4):n=!0}else n=!0;n?(this.expiredRequestCount++,this.state="expired"):this.expiredRequestCount=0}},$u.prototype.getExpiryTimeout=function(){if(this.expirationTime)return this.expiredRequestCount?1e3*(1<<Math.min(this.expiredRequestCount-1,31)):Math.min(this.expirationTime-(new Date).getTime(),Math.pow(2,31)-1)},$u.prototype.setFeatureState=function(t,e){if(this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData&&0!==Object.keys(t).length){var r=this.latestFeatureIndex.loadVTLayers();for(var i in this.buckets)if(e.style.hasLayer(i)){var n=this.buckets[i],o=n.layers[0].sourceLayer||"_geojsonTileLayer",a=r[o],s=t[o];if(a&&s&&0!==Object.keys(s).length){n.update(s,a,this.imageAtlas&&this.imageAtlas.patternPositions||{});var l=e&&e.style&&e.style.getLayer(i);l&&l.paint&&(this.queryPadding=Math.max(this.queryPadding,l.queryRadius(n)))}}}},$u.prototype.holdingForFade=function(){return void 0!==this.symbolFadeHoldUntil},$u.prototype.symbolFadeFinished=function(){return!this.symbolFadeHoldUntil||this.symbolFadeHoldUntil<B.now()},$u.prototype.clearFadeHold=function(){this.symbolFadeHoldUntil=void 0},$u.prototype.setHoldDuration=function(t){this.symbolFadeHoldUntil=B.now()+t},$u.prototype.setDependencies=function(t,e){for(var r={},i=0,n=e;i<n.length;i+=1)r[n[i]]=!0;this.dependencies[t]=r},$u.prototype.hasDependency=function(t,e){for(var r=0,i=t;r<i.length;r+=1){var n=this.dependencies[i[r]];if(n)for(var o=0,a=e;o<a.length;o+=1)if(n[a[o]])return!0}return!1};var tc=self.performance,ec=function(t){this._marks={start:[t.url,"start"].join("#"),end:[t.url,"end"].join("#"),measure:t.url.toString()},tc.mark(this._marks.start)};ec.prototype.finish=function(){tc.mark(this._marks.end);var t=tc.getEntriesByName(this._marks.measure);return 0===t.length&&(tc.measure(this._marks.measure,this._marks.start,this._marks.end),t=tc.getEntriesByName(this._marks.measure),tc.clearMarks(this._marks.start),tc.clearMarks(this._marks.end),tc.clearMeasures(this._marks.measure)),t},t.Actor=Pu,t.AlphaImage=fa,t.CanonicalTileID=Vu,t.CollisionBoxArray=Kn,t.Color=Yt,t.DEMData=Zu,t.DataConstantProperty=fn,t.DictionaryCoder=Gu,t.EXTENT=8192,t.ErrorEvent=Tt,t.EvaluationParameters=nn,t.Event=St,t.Evented=It,t.FeatureIndex=Hu,t.FillBucket=rs,t.FillExtrusionBucket=vs,t.ImageAtlas=dl,t.ImagePosition=hl,t.LineBucket=Ps,t.LngLat=Mu,t.LngLatBounds=ku,t.MercatorCoordinate=Uu,t.ONE_EM=24,t.OverscaledTileID=ju,t.Point=n,t.Point$1=n,t.Properties=_n,t.Protobuf=Zs,t.RGBAImage=da,t.RequestManager=q,t.RequestPerformance=ec,t.ResourceType=ht,t.SegmentVector=no,t.SourceFeatureState=Ku,t.StructArrayLayout1ui2=Zn,t.StructArrayLayout2f1f2i16=Rn,t.StructArrayLayout2i4=In,t.StructArrayLayout3ui6=Fn,t.StructArrayLayout4i8=En,t.SymbolBucket=pu,t.Texture=Au,t.Tile=$u,t.Transitionable=sn,t.Uniform1f=_o,t.Uniform1i=go,t.Uniform2f=vo,t.Uniform3f=xo,t.Uniform4f=bo,t.UniformColor=wo,t.UniformMatrix4f=To,t.UnwrappedTileID=Nu,t.ValidationError=At,t.WritingMode=ml,t.ZoomHistory=Vi,t.add=function(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t[2]=e[2]+r[2],t},t.addDynamicAttributes=su,t.asyncAll=function(t,e,r){if(!t.length)return r(null,[]);var i=t.length,n=new Array(t.length),o=null;t.forEach(function(t,a){e(t,function(t,e){t&&(o=t),n[a]=e,0==--i&&r(o,n)})})},t.bezier=a,t.bindAll=m,t.browser=B,t.cacheEntryPossiblyAdded=function(t){++ct>at&&(t.getActor().send("enforceCacheSizeLimit",ot),ct=0)},t.clamp=l,t.clearTileCache=function(t){var e=self.caches.delete("mapbox-tiles");t&&e.catch(t).then(function(){return t()})},t.clipLine=Vl,t.clone=function(t){var e=new ea(16);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e},t.clone$1=v,t.clone$2=function(t){var e=new ea(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e},t.collisionCircleLayout=Us,t.config=F,t.create=function(){var t=new ea(16);return ea!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t},t.create$1=function(){var t=new ea(9);return ea!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t},t.create$2=function(){var t=new ea(4);return ea!=Float32Array&&(t[1]=0,t[2]=0),t[0]=1,t[3]=1,t},t.createCommonjsModule=e,t.createExpression=qr,t.createLayout=Sn,t.createStyleLayer=function(t){return"custom"===t.type?new xu(t):new bu[t.type](t)},t.cross=function(t,e,r){var i=e[0],n=e[1],o=e[2],a=r[0],s=r[1],l=r[2];return t[0]=n*l-o*s,t[1]=o*a-i*l,t[2]=i*s-n*a,t},t.deepEqual=function t(e,r){if(Array.isArray(e)){if(!Array.isArray(r)||e.length!==r.length)return!1;for(var i=0;i<e.length;i++)if(!t(e[i],r[i]))return!1;return!0}if("object"==typeof e&&null!==e&&null!==r){if("object"!=typeof r)return!1;if(Object.keys(e).length!==Object.keys(r).length)return!1;for(var n in e)if(!t(e[n],r[n]))return!1;return!0}return e===r},t.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]},t.dot$1=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]},t.ease=s,t.emitValidationErrors=zi,t.endsWith=y,t.enforceCacheSizeLimit=function(t){st(),Q&&Q.then(function(e){e.keys().then(function(r){for(var i=0;i<r.length-t;i++)e.delete(r[i])})})},t.evaluateSizeForFeature=kl,t.evaluateSizeForZoom=Ml,t.evaluateVariableOffset=$l,t.evented=$i,t.extend=c,t.featureFilter=ri,t.filterObject=_,t.fromRotation=function(t,e){var r=Math.sin(e),i=Math.cos(e);return t[0]=i,t[1]=r,t[2]=0,t[3]=-r,t[4]=i,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},t.getAnchorAlignment=El,t.getAnchorJustification=tu,t.getArrayBuffer=_t,t.getImage=xt,t.getJSON=function(t,e){return gt(c(t,{type:"json"}),e)},t.getRTLTextPluginStatus=tn,t.getReferrer=yt,t.getVideo=function(t,e){var r,i,n=self.document.createElement("video");n.muted=!0,n.onloadstart=function(){e(null,n)};for(var o=0;o<t.length;o++){var a=self.document.createElement("source");r=t[o],i=void 0,(i=self.document.createElement("a")).href=r,(i.protocol!==self.document.location.protocol||i.host!==self.document.location.host)&&(n.crossOrigin="Anonymous"),a.src=t[o],n.appendChild(a)}return{cancel:function(){}}},t.identity=ra,t.invert=function(t,e){var r=e[0],i=e[1],n=e[2],o=e[3],a=e[4],s=e[5],l=e[6],u=e[7],c=e[8],p=e[9],h=e[10],f=e[11],d=e[12],m=e[13],y=e[14],g=e[15],_=r*s-i*a,v=r*l-n*a,x=r*u-o*a,b=i*l-n*s,w=i*u-o*s,S=n*u-o*l,T=c*m-p*d,I=c*y-h*d,E=c*g-f*d,A=p*y-h*m,z=p*g-f*m,P=h*g-f*y,C=_*P-v*z+x*A+b*E-w*I+S*T;return C?(t[0]=(s*P-l*z+u*A)*(C=1/C),t[1]=(n*z-i*P-o*A)*C,t[2]=(m*S-y*w+g*b)*C,t[3]=(h*w-p*S-f*b)*C,t[4]=(l*E-a*P-u*I)*C,t[5]=(r*P-n*E+o*I)*C,t[6]=(y*x-d*S-g*v)*C,t[7]=(c*S-h*x+f*v)*C,t[8]=(a*z-s*E+u*T)*C,t[9]=(i*E-r*z-o*T)*C,t[10]=(d*w-m*x+g*_)*C,t[11]=(p*x-c*w-f*_)*C,t[12]=(s*I-a*A-l*T)*C,t[13]=(r*A-i*I+n*T)*C,t[14]=(m*v-d*b-y*_)*C,t[15]=(c*b-p*v+h*_)*C,t):null},t.isChar=Ni,t.isMapboxURL=Z,t.keysDifference=function(t,e){var r=[];for(var i in t)i in e||r.push(i);return r},t.makeRequest=gt,t.mapObject=g,t.mercatorXfromLng=Ru,t.mercatorYfromLat=Bu,t.mercatorZfromAltitude=Fu,t.mul=oa,t.multiply=ia,t.mvt=ms,t.normalize=function(t,e){var r=e[0],i=e[1],n=e[2],o=r*r+i*i+n*n;return o>0&&(o=1/Math.sqrt(o)),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o,t},t.number=Ne,t.offscreenCanvasSupported=pt,t.ortho=function(t,e,r,i,n,o,a){var s=1/(e-r),l=1/(i-n),u=1/(o-a);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*u,t[11]=0,t[12]=(e+r)*s,t[13]=(n+i)*l,t[14]=(a+o)*u,t[15]=1,t},t.parseGlyphPBF=function(t){return new Zs(t).readFields(ll,[])},t.pbf=Zs,t.performSymbolLayout=function(t,e,r,i,n,o,a){t.createArrays(),t.tilePixelRatio=8192/(512*t.overscaling),t.compareText={},t.iconsNeedLinear=!1;var s=t.layers[0].layout,l=t.layers[0]._unevaluatedLayout._values,u={};if("composite"===t.textSizeData.kind){var c=t.textSizeData,p=c.maxZoom;u.compositeTextSizes=[l["text-size"].possiblyEvaluate(new nn(c.minZoom),a),l["text-size"].possiblyEvaluate(new nn(p),a)]}if("composite"===t.iconSizeData.kind){var h=t.iconSizeData,f=h.maxZoom;u.compositeIconSizes=[l["icon-size"].possiblyEvaluate(new nn(h.minZoom),a),l["icon-size"].possiblyEvaluate(new nn(f),a)]}u.layoutTextSize=l["text-size"].possiblyEvaluate(new nn(t.zoom+1),a),u.layoutIconSize=l["icon-size"].possiblyEvaluate(new nn(t.zoom+1),a),u.textMaxSize=l["text-size"].possiblyEvaluate(new nn(18));for(var d=24*s.get("text-line-height"),m="map"===s.get("text-rotation-alignment")&&"point"!==s.get("symbol-placement"),y=s.get("text-keep-upright"),g=s.get("text-size"),_=function(){var o=x[v],l=s.get("text-font").evaluate(o,{},a).join(","),c=g.evaluate(o,{},a),p=u.layoutTextSize.evaluate(o,{},a),h=u.layoutIconSize.evaluate(o,{},a),f={horizontal:{},vertical:void 0},_=o.text,w=[0,0];if(_){var S=_.toString(),T=24*s.get("text-letter-spacing").evaluate(o,{},a),I=function(t){for(var e=0,r=S;e<r.length;e+=1)if(i=r[e].charCodeAt(0),Ni.Arabic(i)||Ni["Arabic Supplement"](i)||Ni["Arabic Extended-A"](i)||Ni["Arabic Presentation Forms-A"](i)||Ni["Arabic Presentation Forms-B"](i))return!1;var i;return!0}()?T:0,E=s.get("text-anchor").evaluate(o,{},a),A=s.get("text-variable-anchor");if(!A){var z=s.get("text-radial-offset").evaluate(o,{},a);w=z?$l(E,[24*z,Ql]):s.get("text-offset").evaluate(o,{},a).map(function(t){return 24*t})}var P=m?"center":s.get("text-justify").evaluate(o,{},a),C=s.get("symbol-placement"),k="point"===C?24*s.get("text-max-width").evaluate(o,{},a):0,M=function(){t.allowVerticalPlacement&&ji(S)&&(f.vertical=_l(_,e,r,n,l,k,d,E,"left",I,w,ml.vertical,!0,C,p,c))};if(!m&&A){for(var D="auto"===P?A.map(function(t){return tu(t)}):[P],L=!1,R=0;R<D.length;R++){var B=D[R];if(!f.horizontal[B])if(L)f.horizontal[B]=f.horizontal[0];else{var F=_l(_,e,r,n,l,k,d,"center",B,I,w,ml.horizontal,!1,C,p,c);F&&(f.horizontal[B]=F,L=1===F.positionedLines.length)}}M()}else{"auto"===P&&(P=tu(E));var O=_l(_,e,r,n,l,k,d,E,P,I,w,ml.horizontal,!1,C,p,c);O&&(f.horizontal[P]=O),M(),ji(S)&&m&&y&&(f.vertical=_l(_,e,r,n,l,k,d,E,P,I,w,ml.vertical,!1,C,p,c))}}var U=void 0,V=!1;if(o.icon&&o.icon.name){var N=i[o.icon.name];N&&(U=function(t,e,r){var i=El(r),n=e[0]-t.displaySize[0]*i.horizontalAlign,o=e[1]-t.displaySize[1]*i.verticalAlign;return{image:t,top:o,bottom:o+t.displaySize[1],left:n,right:n+t.displaySize[0]}}(n[o.icon.name],s.get("icon-offset").evaluate(o,{},a),s.get("icon-anchor").evaluate(o,{},a)),V=N.sdf,void 0===t.sdfIcons?t.sdfIcons=N.sdf:t.sdfIcons!==N.sdf&&b("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),(N.pixelRatio!==t.pixelRatio||0!==s.get("icon-rotate").constantOr(1))&&(t.iconsNeedLinear=!0))}var j=ru(f.horizontal)||f.vertical;t.iconsInText=!!j&&j.iconsInText,(j||U)&&function(t,e,r,i,n,o,a,s,l,u,c){var p=o.textMaxSize.evaluate(e,{});void 0===p&&(p=a);var h,f=t.layers[0].layout,d=f.get("icon-offset").evaluate(e,{},c),m=ru(r.horizontal),y=a/24,g=t.tilePixelRatio*y,_=t.tilePixelRatio*p/24,v=t.tilePixelRatio*s,x=t.tilePixelRatio*f.get("symbol-spacing"),w=f.get("text-padding")*t.tilePixelRatio,S=f.get("icon-padding")*t.tilePixelRatio,T=f.get("text-max-angle")/180*Math.PI,I="map"===f.get("text-rotation-alignment")&&"point"!==f.get("symbol-placement"),E="map"===f.get("icon-rotation-alignment")&&"point"!==f.get("symbol-placement"),A=f.get("symbol-placement"),z=x/2,P=f.get("icon-text-fit");i&&"none"!==P&&(t.allowVerticalPlacement&&r.vertical&&(h=zl(i,r.vertical,P,f.get("icon-text-fit-padding"),d,y)),m&&(i=zl(i,m,P,f.get("icon-text-fit-padding"),d,y)));var C=function(s,p){p.x<0||p.x>=8192||p.y<0||p.y>=8192||function(t,e,r,i,n,o,a,s,l,u,c,p,h,f,d,m,y,g,_,v,x,w,S,T,I){var E,A,z,P,C,k=t.addToLineVertexArray(e,r),M=0,D=0,L=0,R=0,B=-1,F=-1,O={},U=uo(""),V=0,N=0;if(void 0===s._unevaluatedLayout.getValue("text-radial-offset")?(V=(E=s.layout.get("text-offset").evaluate(x,{},T).map(function(t){return 24*t}))[0],N=E[1]):(V=24*s.layout.get("text-radial-offset").evaluate(x,{},T),N=Ql),t.allowVerticalPlacement&&i.vertical){var j=s.layout.get("text-rotate").evaluate(x,{},T)+90;P=new Xl(l,e,u,c,p,i.vertical,h,f,d,j),a&&(C=new Xl(l,e,u,c,p,a,y,g,d,j))}if(n){var q=s.layout.get("icon-rotate").evaluate(x,{}),Z="none"!==s.layout.get("icon-text-fit"),G=Nl(n,q,S,Z),X=a?Nl(a,q,S,Z):void 0;z=new Xl(l,e,u,c,p,n,y,g,!1,q),M=4*G.length;var W=t.iconSizeData,K=null;"source"===W.kind?(K=[128*s.layout.get("icon-size").evaluate(x,{})])[0]>32640&&b(t.layerIds[0]+': Value for "icon-size" is >= 255. Reduce your "icon-size".'):"composite"===W.kind&&((K=[128*w.compositeIconSizes[0].evaluate(x,{},T),128*w.compositeIconSizes[1].evaluate(x,{},T)])[0]>32640||K[1]>32640)&&b(t.layerIds[0]+': Value for "icon-size" is >= 255. Reduce your "icon-size".'),t.addSymbols(t.icon,G,K,v,_,x,!1,e,k.lineStartIndex,k.lineLength,-1,T),B=t.icon.placedSymbolArray.length-1,X&&(D=4*X.length,t.addSymbols(t.icon,X,K,v,_,x,ml.vertical,e,k.lineStartIndex,k.lineLength,-1,T),F=t.icon.placedSymbolArray.length-1)}for(var H in i.horizontal){var J=i.horizontal[H];if(!A){U=uo(J.text);var Y=s.layout.get("text-rotate").evaluate(x,{},T);A=new Xl(l,e,u,c,p,J,h,f,d,Y)}var Q=1===J.positionedLines.length;if(L+=eu(t,e,J,o,s,d,x,m,k,i.vertical?ml.horizontal:ml.horizontalOnly,Q?Object.keys(i.horizontal):[H],O,B,w,T),Q)break}i.vertical&&(R+=eu(t,e,i.vertical,o,s,d,x,m,k,ml.vertical,["vertical"],O,F,w,T));var $=A?A.boxStartIndex:t.collisionBoxArray.length,tt=A?A.boxEndIndex:t.collisionBoxArray.length,et=P?P.boxStartIndex:t.collisionBoxArray.length,rt=P?P.boxEndIndex:t.collisionBoxArray.length,it=z?z.boxStartIndex:t.collisionBoxArray.length,nt=z?z.boxEndIndex:t.collisionBoxArray.length,ot=C?C.boxStartIndex:t.collisionBoxArray.length,at=C?C.boxEndIndex:t.collisionBoxArray.length,st=-1,lt=function(t,e){return t&&t.circleDiameter?Math.max(t.circleDiameter,e):e};st=lt(A,st),st=lt(P,st),st=lt(z,st);var ut=(st=lt(C,st))>-1?1:0;ut&&(st*=I/24),t.glyphOffsetArray.length>=pu.MAX_GLYPHS&&b("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),void 0!==x.sortKey&&t.addToSortKeyRanges(t.symbolInstances.length,x.sortKey),t.symbolInstances.emplaceBack(e.x,e.y,O.right>=0?O.right:-1,O.center>=0?O.center:-1,O.left>=0?O.left:-1,O.vertical||-1,B,F,U,$,tt,et,rt,it,nt,ot,at,u,L,R,M,D,ut,0,h,V,N,st)}(t,p,s,r,i,n,h,t.layers[0],t.collisionBoxArray,e.index,e.sourceLayerIndex,t.index,g,w,I,l,v,S,E,d,e,o,u,c,a)};if("line"===A)for(var k=0,M=Vl(e.geometry,0,0,8192,8192);k<M.length;k+=1)for(var D=M[k],L=0,R=Ul(D,x,T,r.vertical||m,i,24,_,t.overscaling,8192);L<R.length;L+=1){var B=R[L];m&&iu(t,m.text,z,B)||C(D,B)}else if("line-center"===A)for(var F=0,O=e.geometry;F<O.length;F+=1){var U=O[F];if(U.length>1){var V=Ol(U,T,r.vertical||m,i,24,_);V&&C(U,V)}}else if("Polygon"===e.type)for(var N=0,j=Qa(e.geometry,0);N<j.length;N+=1){var q=j[N],Z=Hl(q,16);C(q[0],new Pl(Z.x,Z.y,0))}else if("LineString"===e.type)for(var G=0,X=e.geometry;G<X.length;G+=1){var W=X[G];C(W,new Pl(W[0].x,W[0].y,0))}else if("Point"===e.type)for(var K=0,H=e.geometry;K<H.length;K+=1)for(var J=0,Y=H[K];J<Y.length;J+=1){var Q=Y[J];C([Q],new Pl(Q.x,Q.y,0))}}(t,o,f,U,i,u,p,h,w,V,a)},v=0,x=t.features;v<x.length;v+=1)_();o&&t.generateCollisionDebugBuffers()},t.perspective=function(t,e,r,i,n){var o,a=1/Math.tan(e/2);return t[0]=a/r,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=n&&n!==1/0?(t[10]=(n+i)*(o=1/(i-n)),t[14]=2*n*i*o):(t[10]=-1,t[14]=-2*i),t},t.pick=function(t,e){for(var r={},i=0;i<e.length;i++){var n=e[i];n in t&&(r[n]=t[n])}return r},t.plugin=rn,t.polygonIntersectsPolygon=Uo,t.postMapLoadEvent=nt,t.postTurnstileEvent=rt,t.potpack=pl,t.refProperties=["type","source","source-layer","minzoom","maxzoom","filter","layout"],t.register=Li,t.registerForPluginStateChange=function(t){return t({pluginStatus:Hi,pluginURL:Ji}),$i.on("pluginStateChange",t),t},t.rotate=function(t,e,r){var i=e[0],n=e[1],o=e[2],a=e[3],s=Math.sin(r),l=Math.cos(r);return t[0]=i*l+o*s,t[1]=n*l+a*s,t[2]=i*-s+o*l,t[3]=n*-s+a*l,t},t.rotateX=function(t,e,r){var i=Math.sin(r),n=Math.cos(r),o=e[4],a=e[5],s=e[6],l=e[7],u=e[8],c=e[9],p=e[10],h=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=o*n+u*i,t[5]=a*n+c*i,t[6]=s*n+p*i,t[7]=l*n+h*i,t[8]=u*n-o*i,t[9]=c*n-a*i,t[10]=p*n-s*i,t[11]=h*n-l*i,t},t.rotateZ=function(t,e,r){var i=Math.sin(r),n=Math.cos(r),o=e[0],a=e[1],s=e[2],l=e[3],u=e[4],c=e[5],p=e[6],h=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*n+u*i,t[1]=a*n+c*i,t[2]=s*n+p*i,t[3]=l*n+h*i,t[4]=u*n-o*i,t[5]=c*n-a*i,t[6]=p*n-s*i,t[7]=h*n-l*i,t},t.scale=function(t,e,r){var i=r[0],n=r[1],o=r[2];return t[0]=e[0]*i,t[1]=e[1]*i,t[2]=e[2]*i,t[3]=e[3]*i,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*o,t[9]=e[9]*o,t[10]=e[10]*o,t[11]=e[11]*o,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},t.scale$1=function(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t},t.scale$2=function(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t},t.setCacheLimits=function(t,e){ot=t,at=e},t.setRTLTextPlugin=function(t,e,r){if(void 0===r&&(r=!1),"deferred"===Hi||"loading"===Hi||"loaded"===Hi)throw new Error("setRTLTextPlugin cannot be called multiple times.");Ji=B.resolveURL(t),Hi="deferred",Ki=e,Qi(),r||en()},t.sphericalToCartesian=function(t){var e=t[0],r=t[1],i=t[2];return r+=90,r*=Math.PI/180,i*=Math.PI/180,{x:e*Math.cos(r)*Math.sin(i),y:e*Math.sin(r)*Math.sin(i),z:e*Math.cos(i)}},t.sqrLen=function(t){var e=t[0],r=t[1];return e*e+r*r},t.styleSpec=Et,t.sub=function(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t[2]=e[2]-r[2],t},t.symbolSize=Dl,t.transformMat3=function(t,e,r){var i=e[0],n=e[1],o=e[2];return t[0]=i*r[0]+n*r[3]+o*r[6],t[1]=i*r[1]+n*r[4]+o*r[7],t[2]=i*r[2]+n*r[5]+o*r[8],t},t.transformMat4=aa,t.translate=function(t,e,r){var i,n,o,a,s,l,u,c,p,h,f,d,m=r[0],y=r[1],g=r[2];return e===t?(t[12]=e[0]*m+e[4]*y+e[8]*g+e[12],t[13]=e[1]*m+e[5]*y+e[9]*g+e[13],t[14]=e[2]*m+e[6]*y+e[10]*g+e[14],t[15]=e[3]*m+e[7]*y+e[11]*g+e[15]):(n=e[1],o=e[2],a=e[3],s=e[4],l=e[5],u=e[6],c=e[7],p=e[8],h=e[9],f=e[10],d=e[11],t[0]=i=e[0],t[1]=n,t[2]=o,t[3]=a,t[4]=s,t[5]=l,t[6]=u,t[7]=c,t[8]=p,t[9]=h,t[10]=f,t[11]=d,t[12]=i*m+s*y+p*g+e[12],t[13]=n*m+l*y+h*g+e[13],t[14]=o*m+u*y+f*g+e[14],t[15]=a*m+c*y+d*g+e[15]),t},t.triggerPluginCompletionEvent=Yi,t.uniqueId=h,t.validateCustomStyleLayer=function(t){var e=[],r=t.id;return void 0===r&&e.push({message:"layers."+r+': missing required property "id"'}),void 0===t.render&&e.push({message:"layers."+r+': missing required method "render"'}),t.renderingMode&&"2d"!==t.renderingMode&&"3d"!==t.renderingMode&&e.push({message:"layers."+r+': property "renderingMode" must be either "2d" or "3d"'}),e},t.validateLight=Ii,t.validateStyle=Ti,t.values=function(t){var e=[];for(var r in t)e.push(t[r]);return e},t.vectorTile=ms,t.version="1.10.0",t.warnOnce=b,t.webpSupported=O,t.window=self,t.wrap=u}),i(0,function(t){function e(t){var r=typeof t;if("number"===r||"boolean"===r||"string"===r||null==t)return JSON.stringify(t);if(Array.isArray(t)){for(var i="[",n=0,o=t;n<o.length;n+=1)i+=e(o[n])+",";return i+"]"}for(var a=Object.keys(t).sort(),s="{",l=0;l<a.length;l++)s+=JSON.stringify(a[l])+":"+e(t[a[l]])+",";return s+"}"}function r(r){for(var i="",n=0,o=t.refProperties;n<o.length;n+=1)i+="/"+e(r[o[n]]);return i}var i=function(t){this.keyCache={},t&&this.replace(t)};i.prototype.replace=function(t){this._layerConfigs={},this._layers={},this.update(t,[])},i.prototype.update=function(e,i){for(var n=this,o=0,a=e;o<a.length;o+=1){var s=a[o];this._layerConfigs[s.id]=s;var l=this._layers[s.id]=t.createStyleLayer(s);l._featureFilter=t.featureFilter(l.filter),this.keyCache[s.id]&&delete this.keyCache[s.id]}for(var u=0,c=i;u<c.length;u+=1){var p=c[u];delete this.keyCache[p],delete this._layerConfigs[p],delete this._layers[p]}this.familiesBySource={};for(var h=0,f=function(t,e){for(var i={},n=0;n<t.length;n++){var o=e&&e[t[n].id]||r(t[n]);e&&(e[t[n].id]=o);var a=i[o];a||(a=i[o]=[]),a.push(t[n])}var s=[];for(var l in i)s.push(i[l]);return s}(t.values(this._layerConfigs),this.keyCache);h<f.length;h+=1){var d=f[h].map(function(t){return n._layers[t.id]}),m=d[0];if("none"!==m.visibility){var y=m.source||"",g=this.familiesBySource[y];g||(g=this.familiesBySource[y]={});var _=m.sourceLayer||"_geojsonTileLayer",v=g[_];v||(v=g[_]=[]),v.push(d)}}};var n=function(e){var r={},i=[];for(var n in e){var o=e[n],a=r[n]={};for(var s in o){var l=o[+s];if(l&&0!==l.bitmap.width&&0!==l.bitmap.height){var u={x:0,y:0,w:l.bitmap.width+2,h:l.bitmap.height+2};i.push(u),a[s]={rect:u,metrics:l.metrics}}}}var c=t.potpack(i),p=new t.AlphaImage({width:c.w||1,height:c.h||1});for(var h in e){var f=e[h];for(var d in f){var m=f[+d];if(m&&0!==m.bitmap.width&&0!==m.bitmap.height){var y=r[h][d].rect;t.AlphaImage.copy(m.bitmap,p,{x:0,y:0},{x:y.x+1,y:y.y+1},m.bitmap)}}}this.image=p,this.positions=r};t.register("GlyphAtlas",n);var o=function(e){this.tileID=new t.OverscaledTileID(e.tileID.overscaledZ,e.tileID.wrap,e.tileID.canonical.z,e.tileID.canonical.x,e.tileID.canonical.y),this.uid=e.uid,this.zoom=e.zoom,this.pixelRatio=e.pixelRatio,this.tileSize=e.tileSize,this.source=e.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=e.showCollisionBoxes,this.collectResourceTiming=!!e.collectResourceTiming,this.returnDependencies=!!e.returnDependencies,this.promoteId=e.promoteId};function a(e,r,i){for(var n=new t.EvaluationParameters(r),o=0,a=e;o<a.length;o+=1)a[o].recalculate(n,i)}function s(e,r){var i=t.getArrayBuffer(e.request,function(e,i,n,o){e?r(e):i&&r(null,{vectorTile:new t.vectorTile.VectorTile(new t.pbf(i)),rawData:i,cacheControl:n,expires:o})});return function(){i.cancel(),r()}}o.prototype.parse=function(e,r,i,o,s){var l=this;this.status="parsing",this.data=e,this.collisionBoxArray=new t.CollisionBoxArray;var u=new t.DictionaryCoder(Object.keys(e.layers).sort()),c=new t.FeatureIndex(this.tileID,this.promoteId);c.bucketLayerIDs=[];var p,h,f,d,m={},y={featureIndex:c,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:i},g=r.familiesBySource[this.source];for(var _ in g){var v=e.layers[_];if(v){1===v.version&&t.warnOnce('Vector tile source "'+this.source+'" layer "'+_+'" does not use vector tile spec v2 and therefore may have some rendering errors.');for(var x=u.encode(_),b=[],w=0;w<v.length;w++){var S=v.feature(w),T=c.getId(S,_);b.push({feature:S,id:T,index:w,sourceLayerIndex:x})}for(var I=0,E=g[_];I<E.length;I+=1){var A=E[I],z=A[0];z.minzoom&&this.zoom<Math.floor(z.minzoom)||z.maxzoom&&this.zoom>=z.maxzoom||"none"!==z.visibility&&(a(A,this.zoom,i),(m[z.id]=z.createBucket({index:c.bucketLayerIDs.length,layers:A,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:x,sourceID:this.source})).populate(b,y,this.tileID.canonical),c.bucketLayerIDs.push(A.map(function(t){return t.id})))}}}var P=t.mapObject(y.glyphDependencies,function(t){return Object.keys(t).map(Number)});Object.keys(P).length?o.send("getGlyphs",{uid:this.uid,stacks:P},function(t,e){p||(p=t,h=e,M.call(l))}):h={};var C=Object.keys(y.iconDependencies);C.length?o.send("getImages",{icons:C,source:this.source,tileID:this.tileID,type:"icons"},function(t,e){p||(p=t,f=e,M.call(l))}):f={};var k=Object.keys(y.patternDependencies);function M(){if(p)return s(p);if(h&&f&&d){var e=new n(h),r=new t.ImageAtlas(f,d);for(var o in m){var l=m[o];l instanceof t.SymbolBucket?(a(l.layers,this.zoom,i),t.performSymbolLayout(l,h,e.positions,f,r.iconPositions,this.showCollisionBoxes,this.tileID.canonical)):l.hasPattern&&(l instanceof t.LineBucket||l instanceof t.FillBucket||l instanceof t.FillExtrusionBucket)&&(a(l.layers,this.zoom,i),l.addFeatures(y,this.tileID.canonical,r.patternPositions))}this.status="done",s(null,{buckets:t.values(m).filter(function(t){return!t.isEmpty()}),featureIndex:c,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:e.image,imageAtlas:r,glyphMap:this.returnDependencies?h:null,iconMap:this.returnDependencies?f:null,glyphPositions:this.returnDependencies?e.positions:null})}}k.length?o.send("getImages",{icons:k,source:this.source,tileID:this.tileID,type:"patterns"},function(t,e){p||(p=t,d=e,M.call(l))}):d={},M.call(this)};var l=function(t,e,r,i){this.actor=t,this.layerIndex=e,this.availableImages=r,this.loadVectorData=i||s,this.loading={},this.loaded={}};l.prototype.loadTile=function(e,r){var i=this,n=e.uid;this.loading||(this.loading={});var a=!!(e&&e.request&&e.request.collectResourceTiming)&&new t.RequestPerformance(e.request),s=this.loading[n]=new o(e);s.abort=this.loadVectorData(e,function(e,o){if(delete i.loading[n],e||!o)return s.status="done",i.loaded[n]=s,r(e);var l=o.rawData,u={};o.expires&&(u.expires=o.expires),o.cacheControl&&(u.cacheControl=o.cacheControl);var c={};if(a){var p=a.finish();p&&(c.resourceTiming=JSON.parse(JSON.stringify(p)))}s.vectorTile=o.vectorTile,s.parse(o.vectorTile,i.layerIndex,i.availableImages,i.actor,function(e,i){if(e||!i)return r(e);r(null,t.extend({rawTileData:l.slice(0)},i,u,c))}),i.loaded=i.loaded||{},i.loaded[n]=s})},l.prototype.reloadTile=function(t,e){var r=this,i=this.loaded,n=t.uid,o=this;if(i&&i[n]){var a=i[n];a.showCollisionBoxes=t.showCollisionBoxes;var s=function(t,i){var n=a.reloadCallback;n&&(delete a.reloadCallback,a.parse(a.vectorTile,o.layerIndex,r.availableImages,o.actor,n)),e(t,i)};"parsing"===a.status?a.reloadCallback=s:"done"===a.status&&(a.vectorTile?a.parse(a.vectorTile,this.layerIndex,this.availableImages,this.actor,s):s())}},l.prototype.abortTile=function(t,e){var r=this.loading,i=t.uid;r&&r[i]&&r[i].abort&&(r[i].abort(),delete r[i]),e()},l.prototype.removeTile=function(t,e){var r=this.loaded,i=t.uid;r&&r[i]&&delete r[i],e()};var u=t.window.ImageBitmap,c=function(){this.loaded={}};function p(t,e){if(0!==t.length){h(t[0],e);for(var r=1;r<t.length;r++)h(t[r],!e)}}function h(t,e){for(var r=0,i=0,n=t.length,o=n-1;i<n;o=i++)r+=(t[i][0]-t[o][0])*(t[o][1]+t[i][1]);r>=0!=!!e&&t.reverse()}c.prototype.loadTile=function(e,r){var i=e.uid,n=e.encoding,o=e.rawImageData,a=u&&o instanceof u?this.getImageData(o):o,s=new t.DEMData(i,a,n);this.loaded=this.loaded||{},this.loaded[i]=s,r(null,s)},c.prototype.getImageData=function(e){this.offscreenCanvas&&this.offscreenCanvasContext||(this.offscreenCanvas=new OffscreenCanvas(e.width,e.height),this.offscreenCanvasContext=this.offscreenCanvas.getContext("2d")),this.offscreenCanvas.width=e.width,this.offscreenCanvas.height=e.height,this.offscreenCanvasContext.drawImage(e,0,0,e.width,e.height);var r=this.offscreenCanvasContext.getImageData(-1,-1,e.width+2,e.height+2);return this.offscreenCanvasContext.clearRect(0,0,this.offscreenCanvas.width,this.offscreenCanvas.height),new t.RGBAImage({width:r.width,height:r.height},r.data)},c.prototype.removeTile=function(t){var e=this.loaded,r=t.uid;e&&e[r]&&delete e[r]};var f=t.vectorTile.VectorTileFeature.prototype.toGeoJSON,d=function(e){this._feature=e,this.extent=t.EXTENT,this.type=e.type,this.properties=e.tags,"id"in e&&!isNaN(e.id)&&(this.id=parseInt(e.id,10))};d.prototype.loadGeometry=function(){if(1===this._feature.type){for(var e=[],r=0,i=this._feature.geometry;r<i.length;r+=1){var n=i[r];e.push([new t.Point$1(n[0],n[1])])}return e}for(var o=[],a=0,s=this._feature.geometry;a<s.length;a+=1){for(var l=[],u=0,c=s[a];u<c.length;u+=1){var p=c[u];l.push(new t.Point$1(p[0],p[1]))}o.push(l)}return o},d.prototype.toGeoJSON=function(t,e,r){return f.call(this,t,e,r)};var m=function(e){this.layers={_geojsonTileLayer:this},this.name="_geojsonTileLayer",this.extent=t.EXTENT,this.length=e.length,this._features=e};m.prototype.feature=function(t){return new d(this._features[t])};var y=t.vectorTile.VectorTileFeature,g=_;function _(t,e){this.options=e||{},this.features=t,this.length=t.length}function v(t,e){this.id="number"==typeof t.id?t.id:void 0,this.type=t.type,this.rawGeometry=1===t.type?[t.geometry]:t.geometry,this.properties=t.tags,this.extent=e||4096}_.prototype.feature=function(t){return new v(this.features[t],this.options.extent)},v.prototype.loadGeometry=function(){var e=this.rawGeometry;this.geometry=[];for(var r=0;r<e.length;r++){for(var i=e[r],n=[],o=0;o<i.length;o++)n.push(new t.Point$1(i[o][0],i[o][1]));this.geometry.push(n)}return this.geometry},v.prototype.bbox=function(){this.geometry||this.loadGeometry();for(var t=this.geometry,e=1/0,r=-1/0,i=1/0,n=-1/0,o=0;o<t.length;o++)for(var a=t[o],s=0;s<a.length;s++){var l=a[s];e=Math.min(e,l.x),r=Math.max(r,l.x),i=Math.min(i,l.y),n=Math.max(n,l.y)}return[e,i,r,n]},v.prototype.toGeoJSON=y.prototype.toGeoJSON;var x=w,b=g;function w(e){var r=new t.pbf;return function(t,e){for(var r in t.layers)e.writeMessage(3,S,t.layers[r])}(e,r),r.finish()}function S(t,e){var r;e.writeVarintField(15,t.version||1),e.writeStringField(1,t.name||""),e.writeVarintField(5,t.extent||4096);var i={keys:[],values:[],keycache:{},valuecache:{}};for(r=0;r<t.length;r++)i.feature=t.feature(r),e.writeMessage(2,T,i);var n=i.keys;for(r=0;r<n.length;r++)e.writeStringField(3,n[r]);var o=i.values;for(r=0;r<o.length;r++)e.writeMessage(4,P,o[r])}function T(t,e){var r=t.feature;void 0!==r.id&&e.writeVarintField(1,r.id),e.writeMessage(2,I,t),e.writeVarintField(3,r.type),e.writeMessage(4,z,r)}function I(t,e){var r=t.feature,i=t.keys,n=t.values,o=t.keycache,a=t.valuecache;for(var s in r.properties){var l=o[s];void 0===l&&(i.push(s),o[s]=l=i.length-1),e.writeVarint(l);var u=r.properties[s],c=typeof u;"string"!==c&&"boolean"!==c&&"number"!==c&&(u=JSON.stringify(u));var p=c+":"+u,h=a[p];void 0===h&&(n.push(u),a[p]=h=n.length-1),e.writeVarint(h)}}function E(t,e){return(e<<3)+(7&t)}function A(t){return t<<1^t>>31}function z(t,e){for(var r=t.loadGeometry(),i=t.type,n=0,o=0,a=r.length,s=0;s<a;s++){var l=r[s],u=1;1===i&&(u=l.length),e.writeVarint(E(1,u));for(var c=3===i?l.length-1:l.length,p=0;p<c;p++){1===p&&1!==i&&e.writeVarint(E(2,c-1));var h=l[p].x-n,f=l[p].y-o;e.writeVarint(A(h)),e.writeVarint(A(f)),n+=h,o+=f}3===i&&e.writeVarint(E(7,1))}}function P(t,e){var r=typeof t;"string"===r?e.writeStringField(1,t):"boolean"===r?e.writeBooleanField(7,t):"number"===r&&(t%1!=0?e.writeDoubleField(3,t):t<0?e.writeSVarintField(6,t):e.writeVarintField(5,t))}function C(t,e,r,i){k(t,r,i),k(e,2*r,2*i),k(e,2*r+1,2*i+1)}function k(t,e,r){var i=t[e];t[e]=t[r],t[r]=i}function M(t,e,r,i){var n=t-r,o=e-i;return n*n+o*o}x.fromVectorTileJs=w,x.fromGeojsonVt=function(t,e){e=e||{};var r={};for(var i in t)r[i]=new g(t[i].features,e),r[i].name=i,r[i].version=e.version,r[i].extent=e.extent;return w({layers:r})},x.GeoJSONWrapper=b;var D=function(t){return t[0]},L=function(t){return t[1]},R=function(t,e,r,i,n){void 0===e&&(e=D),void 0===r&&(r=L),void 0===i&&(i=64),void 0===n&&(n=Float64Array),this.nodeSize=i,this.points=t;for(var o=t.length<65536?Uint16Array:Uint32Array,a=this.ids=new o(t.length),s=this.coords=new n(2*t.length),l=0;l<t.length;l++)a[l]=l,s[2*l]=e(t[l]),s[2*l+1]=r(t[l]);!function t(e,r,i,n,o,a){if(!(o-n<=i)){var s=n+o>>1;!function t(e,r,i,n,o,a){for(;o>n;){if(o-n>600){var s=o-n+1,l=i-n+1,u=Math.log(s),c=.5*Math.exp(2*u/3),p=.5*Math.sqrt(u*c*(s-c)/s)*(l-s/2<0?-1:1);t(e,r,i,Math.max(n,Math.floor(i-l*c/s+p)),Math.min(o,Math.floor(i+(s-l)*c/s+p)),a)}var h=r[2*i+a],f=n,d=o;for(C(e,r,n,i),r[2*o+a]>h&&C(e,r,n,o);f<d;){for(C(e,r,f,d),f++,d--;r[2*f+a]<h;)f++;for(;r[2*d+a]>h;)d--}r[2*n+a]===h?C(e,r,n,d):C(e,r,++d,o),d<=i&&(n=d+1),i<=d&&(o=d-1)}}(e,r,s,n,o,a%2),t(e,r,i,n,s-1,a+1),t(e,r,i,s+1,o,a+1)}}(a,s,i,0,a.length-1,0)};R.prototype.range=function(t,e,r,i){return function(t,e,r,i,n,o,a){for(var s,l,u=[0,t.length-1,0],c=[];u.length;){var p=u.pop(),h=u.pop(),f=u.pop();if(h-f<=a)for(var d=f;d<=h;d++)l=e[2*d+1],(s=e[2*d])>=r&&s<=n&&l>=i&&l<=o&&c.push(t[d]);else{var m=Math.floor((f+h)/2);l=e[2*m+1],(s=e[2*m])>=r&&s<=n&&l>=i&&l<=o&&c.push(t[m]);var y=(p+1)%2;(0===p?r<=s:i<=l)&&(u.push(f),u.push(m-1),u.push(y)),(0===p?n>=s:o>=l)&&(u.push(m+1),u.push(h),u.push(y))}}return c}(this.ids,this.coords,t,e,r,i,this.nodeSize)},R.prototype.within=function(t,e,r){return function(t,e,r,i,n,o){for(var a=[0,t.length-1,0],s=[],l=n*n;a.length;){var u=a.pop(),c=a.pop(),p=a.pop();if(c-p<=o)for(var h=p;h<=c;h++)M(e[2*h],e[2*h+1],r,i)<=l&&s.push(t[h]);else{var f=Math.floor((p+c)/2),d=e[2*f],m=e[2*f+1];M(d,m,r,i)<=l&&s.push(t[f]);var y=(u+1)%2;(0===u?r-n<=d:i-n<=m)&&(a.push(p),a.push(f-1),a.push(y)),(0===u?r+n>=d:i+n>=m)&&(a.push(f+1),a.push(c),a.push(y))}}return s}(this.ids,this.coords,t,e,r,this.nodeSize)};var B={minZoom:0,maxZoom:16,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:function(t){return t}},F=function(t){this.options=Z(Object.create(B),t),this.trees=new Array(this.options.maxZoom+1)};function O(t,e,r,i,n){return{x:t,y:e,zoom:1/0,id:r,parentId:-1,numPoints:i,properties:n}}function U(t,e){var r=t.geometry.coordinates,i=r[1];return{x:j(r[0]),y:q(i),zoom:1/0,index:e,parentId:-1}}function V(t){return{type:"Feature",id:t.id,properties:N(t),geometry:{type:"Point",coordinates:[(i=t.x,360*(i-.5)),(e=t.y,r=(180-360*e)*Math.PI/180,360*Math.atan(Math.exp(r))/Math.PI-90)]}};var e,r,i}function N(t){var e=t.numPoints,r=e>=1e4?Math.round(e/1e3)+"k":e>=1e3?Math.round(e/100)/10+"k":e;return Z(Z({},t.properties),{cluster:!0,cluster_id:t.id,point_count:e,point_count_abbreviated:r})}function j(t){return t/360+.5}function q(t){var e=Math.sin(t*Math.PI/180),r=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return r<0?0:r>1?1:r}function Z(t,e){for(var r in e)t[r]=e[r];return t}function G(t){return t.x}function X(t){return t.y}function W(t,e,r,i,n,o){var a=n-r,s=o-i;if(0!==a||0!==s){var l=((t-r)*a+(e-i)*s)/(a*a+s*s);l>1?(r=n,i=o):l>0&&(r+=a*l,i+=s*l)}return(a=t-r)*a+(s=e-i)*s}function K(t,e,r,i){var n={id:void 0===t?null:t,type:e,geometry:r,tags:i,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return function(t){var e=t.geometry,r=t.type;if("Point"===r||"MultiPoint"===r||"LineString"===r)H(t,e);else if("Polygon"===r||"MultiLineString"===r)for(var i=0;i<e.length;i++)H(t,e[i]);else if("MultiPolygon"===r)for(i=0;i<e.length;i++)for(var n=0;n<e[i].length;n++)H(t,e[i][n])}(n),n}function H(t,e){for(var r=0;r<e.length;r+=3)t.minX=Math.min(t.minX,e[r]),t.minY=Math.min(t.minY,e[r+1]),t.maxX=Math.max(t.maxX,e[r]),t.maxY=Math.max(t.maxY,e[r+1])}function J(t,e,r,i){if(e.geometry){var n=e.geometry.coordinates,o=e.geometry.type,a=Math.pow(r.tolerance/((1<<r.maxZoom)*r.extent),2),s=[],l=e.id;if(r.promoteId?l=e.properties[r.promoteId]:r.generateId&&(l=i||0),"Point"===o)Y(n,s);else if("MultiPoint"===o)for(var u=0;u<n.length;u++)Y(n[u],s);else if("LineString"===o)Q(n,s,a,!1);else if("MultiLineString"===o){if(r.lineMetrics){for(u=0;u<n.length;u++)Q(n[u],s=[],a,!1),t.push(K(l,"LineString",s,e.properties));return}$(n,s,a,!1)}else if("Polygon"===o)$(n,s,a,!0);else{if("MultiPolygon"!==o){if("GeometryCollection"===o){for(u=0;u<e.geometry.geometries.length;u++)J(t,{id:l,geometry:e.geometry.geometries[u],properties:e.properties},r,i);return}throw new Error("Input data is not a valid GeoJSON object.")}for(u=0;u<n.length;u++){var c=[];$(n[u],c,a,!0),s.push(c)}}t.push(K(l,o,s,e.properties))}}function Y(t,e){e.push(tt(t[0])),e.push(et(t[1])),e.push(0)}function Q(t,e,r,i){for(var n,o,a=0,s=0;s<t.length;s++){var l=tt(t[s][0]),u=et(t[s][1]);e.push(l),e.push(u),e.push(0),s>0&&(a+=i?(n*u-l*o)/2:Math.sqrt(Math.pow(l-n,2)+Math.pow(u-o,2))),n=l,o=u}var c=e.length-3;e[2]=1,function t(e,r,i,n){for(var o,a=n,s=i-r>>1,l=i-r,u=e[r],c=e[r+1],p=e[i],h=e[i+1],f=r+3;f<i;f+=3){var d=W(e[f],e[f+1],u,c,p,h);if(d>a)o=f,a=d;else if(d===a){var m=Math.abs(f-s);m<l&&(o=f,l=m)}}a>n&&(o-r>3&&t(e,r,o,n),e[o+2]=a,i-o>3&&t(e,o,i,n))}(e,0,c,r),e[c+2]=1,e.size=Math.abs(a),e.start=0,e.end=e.size}function $(t,e,r,i){for(var n=0;n<t.length;n++){var o=[];Q(t[n],o,r,i),e.push(o)}}function tt(t){return t/360+.5}function et(t){var e=Math.sin(t*Math.PI/180),r=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return r<0?0:r>1?1:r}function rt(t,e,r,i,n,o,a,s){if(i/=e,o>=(r/=e)&&a<i)return t;if(a<r||o>=i)return null;for(var l=[],u=0;u<t.length;u++){var c=t[u],p=c.geometry,h=c.type,f=0===n?c.minX:c.minY,d=0===n?c.maxX:c.maxY;if(f>=r&&d<i)l.push(c);else if(!(d<r||f>=i)){var m=[];if("Point"===h||"MultiPoint"===h)it(p,m,r,i,n);else if("LineString"===h)nt(p,m,r,i,n,!1,s.lineMetrics);else if("MultiLineString"===h)at(p,m,r,i,n,!1);else if("Polygon"===h)at(p,m,r,i,n,!0);else if("MultiPolygon"===h)for(var y=0;y<p.length;y++){var g=[];at(p[y],g,r,i,n,!0),g.length&&m.push(g)}if(m.length){if(s.lineMetrics&&"LineString"===h){for(y=0;y<m.length;y++)l.push(K(c.id,h,m[y],c.tags));continue}"LineString"!==h&&"MultiLineString"!==h||(1===m.length?(h="LineString",m=m[0]):h="MultiLineString"),"Point"!==h&&"MultiPoint"!==h||(h=3===m.length?"Point":"MultiPoint"),l.push(K(c.id,h,m,c.tags))}}}return l.length?l:null}function it(t,e,r,i,n){for(var o=0;o<t.length;o+=3){var a=t[o+n];a>=r&&a<=i&&(e.push(t[o]),e.push(t[o+1]),e.push(t[o+2]))}}function nt(t,e,r,i,n,o,a){for(var s,l,u=ot(t),c=0===n?lt:ut,p=t.start,h=0;h<t.length-3;h+=3){var f=t[h],d=t[h+1],m=t[h+2],y=t[h+3],g=t[h+4],_=0===n?f:d,v=0===n?y:g,x=!1;a&&(s=Math.sqrt(Math.pow(f-y,2)+Math.pow(d-g,2))),_<r?v>r&&(l=c(u,f,d,y,g,r),a&&(u.start=p+s*l)):_>i?v<i&&(l=c(u,f,d,y,g,i),a&&(u.start=p+s*l)):st(u,f,d,m),v<r&&_>=r&&(l=c(u,f,d,y,g,r),x=!0),v>i&&_<=i&&(l=c(u,f,d,y,g,i),x=!0),!o&&x&&(a&&(u.end=p+s*l),e.push(u),u=ot(t)),a&&(p+=s)}var b=t.length-3;f=t[b],d=t[b+1],m=t[b+2],(_=0===n?f:d)>=r&&_<=i&&st(u,f,d,m),b=u.length-3,o&&b>=3&&(u[b]!==u[0]||u[b+1]!==u[1])&&st(u,u[0],u[1],u[2]),u.length&&e.push(u)}function ot(t){var e=[];return e.size=t.size,e.start=t.start,e.end=t.end,e}function at(t,e,r,i,n,o){for(var a=0;a<t.length;a++)nt(t[a],e,r,i,n,o,!1)}function st(t,e,r,i){t.push(e),t.push(r),t.push(i)}function lt(t,e,r,i,n,o){var a=(o-e)/(i-e);return t.push(o),t.push(r+(n-r)*a),t.push(1),a}function ut(t,e,r,i,n,o){var a=(o-r)/(n-r);return t.push(e+(i-e)*a),t.push(o),t.push(1),a}function ct(t,e){for(var r=[],i=0;i<t.length;i++){var n,o=t[i],a=o.type;if("Point"===a||"MultiPoint"===a||"LineString"===a)n=pt(o.geometry,e);else if("MultiLineString"===a||"Polygon"===a){n=[];for(var s=0;s<o.geometry.length;s++)n.push(pt(o.geometry[s],e))}else if("MultiPolygon"===a)for(n=[],s=0;s<o.geometry.length;s++){for(var l=[],u=0;u<o.geometry[s].length;u++)l.push(pt(o.geometry[s][u],e));n.push(l)}r.push(K(o.id,a,n,o.tags))}return r}function pt(t,e){var r=[];r.size=t.size,void 0!==t.start&&(r.start=t.start,r.end=t.end);for(var i=0;i<t.length;i+=3)r.push(t[i]+e,t[i+1],t[i+2]);return r}function ht(t,e){if(t.transformed)return t;var r,i,n,o=1<<t.z,a=t.x,s=t.y;for(r=0;r<t.features.length;r++){var l=t.features[r],u=l.geometry,c=l.type;if(l.geometry=[],1===c)for(i=0;i<u.length;i+=2)l.geometry.push(ft(u[i],u[i+1],e,o,a,s));else for(i=0;i<u.length;i++){var p=[];for(n=0;n<u[i].length;n+=2)p.push(ft(u[i][n],u[i][n+1],e,o,a,s));l.geometry.push(p)}}return t.transformed=!0,t}function ft(t,e,r,i,n,o){return[Math.round(r*(t*i-n)),Math.round(r*(e*i-o))]}function dt(t,e,r,i,n){for(var o=e===n.maxZoom?0:n.tolerance/((1<<e)*n.extent),a={features:[],numPoints:0,numSimplified:0,numFeatures:0,source:null,x:r,y:i,z:e,transformed:!1,minX:2,minY:1,maxX:-1,maxY:0},s=0;s<t.length;s++){a.numFeatures++,mt(a,t[s],o,n);var l=t[s].minX,u=t[s].minY,c=t[s].maxX,p=t[s].maxY;l<a.minX&&(a.minX=l),u<a.minY&&(a.minY=u),c>a.maxX&&(a.maxX=c),p>a.maxY&&(a.maxY=p)}return a}function mt(t,e,r,i){var n=e.geometry,o=e.type,a=[];if("Point"===o||"MultiPoint"===o)for(var s=0;s<n.length;s+=3)a.push(n[s]),a.push(n[s+1]),t.numPoints++,t.numSimplified++;else if("LineString"===o)yt(a,n,t,r,!1,!1);else if("MultiLineString"===o||"Polygon"===o)for(s=0;s<n.length;s++)yt(a,n[s],t,r,"Polygon"===o,0===s);else if("MultiPolygon"===o)for(var l=0;l<n.length;l++){var u=n[l];for(s=0;s<u.length;s++)yt(a,u[s],t,r,!0,0===s)}if(a.length){var c=e.tags||null;if("LineString"===o&&i.lineMetrics){for(var p in c={},e.tags)c[p]=e.tags[p];c.mapbox_clip_start=n.start/n.size,c.mapbox_clip_end=n.end/n.size}var h={geometry:a,type:"Polygon"===o||"MultiPolygon"===o?3:"LineString"===o||"MultiLineString"===o?2:1,tags:c};null!==e.id&&(h.id=e.id),t.features.push(h)}}function yt(t,e,r,i,n,o){var a=i*i;if(i>0&&e.size<(n?a:i))r.numPoints+=e.length/3;else{for(var s=[],l=0;l<e.length;l+=3)(0===i||e[l+2]>a)&&(r.numSimplified++,s.push(e[l]),s.push(e[l+1])),r.numPoints++;n&&function(t,e){for(var r=0,i=0,n=t.length,o=n-2;i<n;o=i,i+=2)r+=(t[i]-t[o])*(t[i+1]+t[o+1]);if(r>0===e)for(i=0,n=t.length;i<n/2;i+=2){var a=t[i],s=t[i+1];t[i]=t[n-2-i],t[i+1]=t[n-1-i],t[n-2-i]=a,t[n-1-i]=s}}(s,o),t.push(s)}}function gt(t,e){var r=(e=this.options=function(t,e){for(var r in e)t[r]=e[r];return t}(Object.create(this.options),e)).debug;if(r&&console.time("preprocess data"),e.maxZoom<0||e.maxZoom>24)throw new Error("maxZoom should be in the 0-24 range");if(e.promoteId&&e.generateId)throw new Error("promoteId and generateId cannot be used together.");var i=function(t,e){var r=[];if("FeatureCollection"===t.type)for(var i=0;i<t.features.length;i++)J(r,t.features[i],e,i);else J(r,"Feature"===t.type?t:{geometry:t},e);return r}(t,e);this.tiles={},this.tileCoords=[],r&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",e.indexMaxZoom,e.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),(i=function(t,e){var r=e.buffer/e.extent,i=t,n=rt(t,1,-1-r,r,0,-1,2,e),o=rt(t,1,1-r,2+r,0,-1,2,e);return(n||o)&&(i=rt(t,1,-r,1+r,0,-1,2,e)||[],n&&(i=ct(n,1).concat(i)),o&&(i=i.concat(ct(o,-1)))),i}(i,e)).length&&this.splitTile(i,0,0,0),r&&(i.length&&console.log("features: %d, points: %d",this.tiles[0].numFeatures,this.tiles[0].numPoints),console.timeEnd("generate tiles"),console.log("tiles generated:",this.total,JSON.stringify(this.stats)))}function _t(t,e,r){return 32*((1<<t)*r+e)+t}function vt(t,e){var r=t.tileID.canonical;if(!this._geoJSONIndex)return e(null,null);var i=this._geoJSONIndex.getTile(r.z,r.x,r.y);if(!i)return e(null,null);var n=new m(i.features),o=x(n);0===o.byteOffset&&o.byteLength===o.buffer.byteLength||(o=new Uint8Array(o)),e(null,{vectorTile:n,rawData:o.buffer})}F.prototype.load=function(t){var e=this.options,r=e.log,i=e.minZoom,n=e.maxZoom,o=e.nodeSize;r&&console.time("total time");var a="prepare "+t.length+" points";r&&console.time(a),this.points=t;for(var s=[],l=0;l<t.length;l++)t[l].geometry&&s.push(U(t[l],l));this.trees[n+1]=new R(s,G,X,o,Float32Array),r&&console.timeEnd(a);for(var u=n;u>=i;u--){var c=+Date.now();s=this._cluster(s,u),this.trees[u]=new R(s,G,X,o,Float32Array),r&&console.log("z%d: %d clusters in %dms",u,s.length,+Date.now()-c)}return r&&console.timeEnd("total time"),this},F.prototype.getClusters=function(t,e){var r=((t[0]+180)%360+360)%360-180,i=Math.max(-90,Math.min(90,t[1])),n=180===t[2]?180:((t[2]+180)%360+360)%360-180,o=Math.max(-90,Math.min(90,t[3]));if(t[2]-t[0]>=360)r=-180,n=180;else if(r>n){var a=this.getClusters([r,i,180,o],e),s=this.getClusters([-180,i,n,o],e);return a.concat(s)}for(var l=this.trees[this._limitZoom(e)],u=[],c=0,p=l.range(j(r),q(o),j(n),q(i));c<p.length;c+=1){var h=l.points[p[c]];u.push(h.numPoints?V(h):this.points[h.index])}return u},F.prototype.getChildren=function(t){var e=this._getOriginId(t),r=this._getOriginZoom(t),i="No cluster with the specified id.",n=this.trees[r];if(!n)throw new Error(i);var o=n.points[e];if(!o)throw new Error(i);for(var a=this.options.radius/(this.options.extent*Math.pow(2,r-1)),s=[],l=0,u=n.within(o.x,o.y,a);l<u.length;l+=1){var c=n.points[u[l]];c.parentId===t&&s.push(c.numPoints?V(c):this.points[c.index])}if(0===s.length)throw new Error(i);return s},F.prototype.getLeaves=function(t,e,r){var i=[];return this._appendLeaves(i,t,e=e||10,r=r||0,0),i},F.prototype.getTile=function(t,e,r){var i=this.trees[this._limitZoom(t)],n=Math.pow(2,t),o=this.options,a=o.radius/o.extent,s=(r-a)/n,l=(r+1+a)/n,u={features:[]};return this._addTileFeatures(i.range((e-a)/n,s,(e+1+a)/n,l),i.points,e,r,n,u),0===e&&this._addTileFeatures(i.range(1-a/n,s,1,l),i.points,n,r,n,u),e===n-1&&this._addTileFeatures(i.range(0,s,a/n,l),i.points,-1,r,n,u),u.features.length?u:null},F.prototype.getClusterExpansionZoom=function(t){for(var e=this._getOriginZoom(t)-1;e<=this.options.maxZoom;){var r=this.getChildren(t);if(e++,1!==r.length)break;t=r[0].properties.cluster_id}return e},F.prototype._appendLeaves=function(t,e,r,i,n){for(var o=0,a=this.getChildren(e);o<a.length;o+=1){var s=a[o],l=s.properties;if(l&&l.cluster?n+l.point_count<=i?n+=l.point_count:n=this._appendLeaves(t,l.cluster_id,r,i,n):n<i?n++:t.push(s),t.length===r)break}return n},F.prototype._addTileFeatures=function(t,e,r,i,n,o){for(var a=0,s=t;a<s.length;a+=1){var l=e[s[a]],u=l.numPoints,c={type:1,geometry:[[Math.round(this.options.extent*(l.x*n-r)),Math.round(this.options.extent*(l.y*n-i))]],tags:u?N(l):this.points[l.index].properties},p=void 0;u?p=l.id:this.options.generateId?p=l.index:this.points[l.index].id&&(p=this.points[l.index].id),void 0!==p&&(c.id=p),o.features.push(c)}},F.prototype._limitZoom=function(t){return Math.max(this.options.minZoom,Math.min(t,this.options.maxZoom+1))},F.prototype._cluster=function(t,e){for(var r=[],i=this.options,n=i.reduce,o=i.radius/(i.extent*Math.pow(2,e)),a=0;a<t.length;a++){var s=t[a];if(!(s.zoom<=e)){s.zoom=e;for(var l=this.trees[e+1],u=l.within(s.x,s.y,o),c=s.numPoints||1,p=s.x*c,h=s.y*c,f=n&&c>1?this._map(s,!0):null,d=(a<<5)+(e+1)+this.points.length,m=0,y=u;m<y.length;m+=1){var g=l.points[y[m]];if(!(g.zoom<=e)){g.zoom=e;var _=g.numPoints||1;p+=g.x*_,h+=g.y*_,c+=_,g.parentId=d,n&&(f||(f=this._map(s,!0)),n(f,this._map(g)))}}1===c?r.push(s):(s.parentId=d,r.push(O(p/c,h/c,d,c,f)))}}return r},F.prototype._getOriginId=function(t){return t-this.points.length>>5},F.prototype._getOriginZoom=function(t){return(t-this.points.length)%32},F.prototype._map=function(t,e){if(t.numPoints)return e?Z({},t.properties):t.properties;var r=this.points[t.index].properties,i=this.options.map(r);return e&&i===r?Z({},i):i},gt.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},gt.prototype.splitTile=function(t,e,r,i,n,o,a){for(var s=[t,e,r,i],l=this.options,u=l.debug;s.length;){i=s.pop(),r=s.pop(),e=s.pop(),t=s.pop();var c=1<<e,p=_t(e,r,i),h=this.tiles[p];if(!h&&(u>1&&console.time("creation"),h=this.tiles[p]=dt(t,e,r,i,l),this.tileCoords.push({z:e,x:r,y:i}),u)){u>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",e,r,i,h.numFeatures,h.numPoints,h.numSimplified),console.timeEnd("creation"));var f="z"+e;this.stats[f]=(this.stats[f]||0)+1,this.total++}if(h.source=t,n){if(e===l.maxZoom||e===n)continue;var d=1<<n-e;if(r!==Math.floor(o/d)||i!==Math.floor(a/d))continue}else if(e===l.indexMaxZoom||h.numPoints<=l.indexMaxPoints)continue;if(h.source=null,0!==t.length){u>1&&console.time("clipping");var m,y,g,_,v,x,b=.5*l.buffer/l.extent,w=.5-b,S=.5+b,T=1+b;m=y=g=_=null,v=rt(t,c,r-b,r+S,0,h.minX,h.maxX,l),x=rt(t,c,r+w,r+T,0,h.minX,h.maxX,l),t=null,v&&(m=rt(v,c,i-b,i+S,1,h.minY,h.maxY,l),y=rt(v,c,i+w,i+T,1,h.minY,h.maxY,l),v=null),x&&(g=rt(x,c,i-b,i+S,1,h.minY,h.maxY,l),_=rt(x,c,i+w,i+T,1,h.minY,h.maxY,l),x=null),u>1&&console.timeEnd("clipping"),s.push(m||[],e+1,2*r,2*i),s.push(y||[],e+1,2*r,2*i+1),s.push(g||[],e+1,2*r+1,2*i),s.push(_||[],e+1,2*r+1,2*i+1)}}},gt.prototype.getTile=function(t,e,r){var i=this.options,n=i.extent,o=i.debug;if(t<0||t>24)return null;var a=1<<t,s=_t(t,e=(e%a+a)%a,r);if(this.tiles[s])return ht(this.tiles[s],n);o>1&&console.log("drilling down to z%d-%d-%d",t,e,r);for(var l,u=t,c=e,p=r;!l&&u>0;)u--,c=Math.floor(c/2),p=Math.floor(p/2),l=this.tiles[_t(u,c,p)];return l&&l.source?(o>1&&console.log("found parent tile z%d-%d-%d",u,c,p),o>1&&console.time("drilling down"),this.splitTile(l.source,u,c,p,t,e,r),o>1&&console.timeEnd("drilling down"),this.tiles[s]?ht(this.tiles[s],n):null):null};var xt=function(e){function r(t,r,i,n){e.call(this,t,r,i,vt),n&&(this.loadGeoJSON=n)}return e&&(r.__proto__=e),(r.prototype=Object.create(e&&e.prototype)).constructor=r,r.prototype.loadData=function(t,e){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),this._pendingCallback=e,this._pendingLoadDataParams=t,this._state&&"Idle"!==this._state?this._state="NeedsLoadData":(this._state="Coalescing",this._loadData())},r.prototype._loadData=function(){var e=this;if(this._pendingCallback&&this._pendingLoadDataParams){var r=this._pendingCallback,i=this._pendingLoadDataParams;delete this._pendingCallback,delete this._pendingLoadDataParams;var n=!!(i&&i.request&&i.request.collectResourceTiming)&&new t.RequestPerformance(i.request);this.loadGeoJSON(i,function(o,a){if(o||!a)return r(o);if("object"!=typeof a)return r(new Error("Input data given to '"+i.source+"' is not a valid GeoJSON object."));!function t(e,r){var i,n=e&&e.type;if("FeatureCollection"===n)for(i=0;i<e.features.length;i++)t(e.features[i],r);else if("GeometryCollection"===n)for(i=0;i<e.geometries.length;i++)t(e.geometries[i],r);else if("Feature"===n)t(e.geometry,r);else if("Polygon"===n)p(e.coordinates,r);else if("MultiPolygon"===n)for(i=0;i<e.coordinates.length;i++)p(e.coordinates[i],r);return e}(a,!0);try{e._geoJSONIndex=i.cluster?new F(function(e){var r=e.superclusterOptions,i=e.clusterProperties;if(!i||!r)return r;for(var n={},o={},a={accumulated:null,zoom:0},s={properties:null},l=Object.keys(i),u=0,c=l;u<c.length;u+=1){var p=c[u],h=i[p],f=h[0],d=t.createExpression(h[1]),m=t.createExpression("string"==typeof f?[f,["accumulated"],["get",p]]:f);n[p]=d.value,o[p]=m.value}return r.map=function(t){s.properties=t;for(var e={},r=0,i=l;r<i.length;r+=1){var o=i[r];e[o]=n[o].evaluate(a,s)}return e},r.reduce=function(t,e){s.properties=e;for(var r=0,i=l;r<i.length;r+=1){var n=i[r];a.accumulated=t[n],t[n]=o[n].evaluate(a,s)}},r}(i)).load(a.features):new gt(a,i.geojsonVtOptions)}catch(o){return r(o)}e.loaded={};var s={};if(n){var l=n.finish();l&&(s.resourceTiming={},s.resourceTiming[i.source]=JSON.parse(JSON.stringify(l)))}r(null,s)})}},r.prototype.coalesce=function(){"Coalescing"===this._state?this._state="Idle":"NeedsLoadData"===this._state&&(this._state="Coalescing",this._loadData())},r.prototype.reloadTile=function(t,r){var i=this.loaded;return i&&i[t.uid]?e.prototype.reloadTile.call(this,t,r):this.loadTile(t,r)},r.prototype.loadGeoJSON=function(e,r){if(e.request)t.getJSON(e.request,r);else{if("string"!=typeof e.data)return r(new Error("Input data given to '"+e.source+"' is not a valid GeoJSON object."));try{return r(null,JSON.parse(e.data))}catch(t){return r(new Error("Input data given to '"+e.source+"' is not a valid GeoJSON object."))}}},r.prototype.removeSource=function(t,e){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),e()},r.prototype.getClusterExpansionZoom=function(t,e){try{e(null,this._geoJSONIndex.getClusterExpansionZoom(t.clusterId))}catch(t){e(t)}},r.prototype.getClusterChildren=function(t,e){try{e(null,this._geoJSONIndex.getChildren(t.clusterId))}catch(t){e(t)}},r.prototype.getClusterLeaves=function(t,e){try{e(null,this._geoJSONIndex.getLeaves(t.clusterId,t.limit,t.offset))}catch(t){e(t)}},r}(l),bt=function(e){var r=this;this.self=e,this.actor=new t.Actor(e,this),this.layerIndexes={},this.availableImages={},this.workerSourceTypes={vector:l,geojson:xt},this.workerSources={},this.demWorkerSources={},this.self.registerWorkerSource=function(t,e){if(r.workerSourceTypes[t])throw new Error('Worker source with name "'+t+'" already registered.');r.workerSourceTypes[t]=e},this.self.registerRTLTextPlugin=function(e){if(t.plugin.isParsed())throw new Error("RTL text plugin already registered.");t.plugin.applyArabicShaping=e.applyArabicShaping,t.plugin.processBidirectionalText=e.processBidirectionalText,t.plugin.processStyledBidirectionalText=e.processStyledBidirectionalText}};return bt.prototype.setReferrer=function(t,e){this.referrer=e},bt.prototype.setImages=function(t,e,r){this.availableImages[t]=e,r()},bt.prototype.setLayers=function(t,e,r){this.getLayerIndex(t).replace(e),r()},bt.prototype.updateLayers=function(t,e,r){this.getLayerIndex(t).update(e.layers,e.removedIds),r()},bt.prototype.loadTile=function(t,e,r){this.getWorkerSource(t,e.type,e.source).loadTile(e,r)},bt.prototype.loadDEMTile=function(t,e,r){this.getDEMWorkerSource(t,e.source).loadTile(e,r)},bt.prototype.reloadTile=function(t,e,r){this.getWorkerSource(t,e.type,e.source).reloadTile(e,r)},bt.prototype.abortTile=function(t,e,r){this.getWorkerSource(t,e.type,e.source).abortTile(e,r)},bt.prototype.removeTile=function(t,e,r){this.getWorkerSource(t,e.type,e.source).removeTile(e,r)},bt.prototype.removeDEMTile=function(t,e){this.getDEMWorkerSource(t,e.source).removeTile(e)},bt.prototype.removeSource=function(t,e,r){if(this.workerSources[t]&&this.workerSources[t][e.type]&&this.workerSources[t][e.type][e.source]){var i=this.workerSources[t][e.type][e.source];delete this.workerSources[t][e.type][e.source],void 0!==i.removeSource?i.removeSource(e,r):r()}},bt.prototype.loadWorkerSource=function(t,e,r){try{this.self.importScripts(e.url),r()}catch(t){r(t.toString())}},bt.prototype.syncRTLPluginState=function(e,r,i){try{t.plugin.setState(r);var n=t.plugin.getPluginURL();if(t.plugin.isLoaded()&&!t.plugin.isParsed()&&null!=n){this.self.importScripts(n);var o=t.plugin.isParsed();i(o?void 0:new Error("RTL Text Plugin failed to import scripts from "+n),o)}}catch(t){i(t.toString())}},bt.prototype.getAvailableImages=function(t){var e=this.availableImages[t];return e||(e=[]),e},bt.prototype.getLayerIndex=function(t){var e=this.layerIndexes[t];return e||(e=this.layerIndexes[t]=new i),e},bt.prototype.getWorkerSource=function(t,e,r){var i=this;return this.workerSources[t]||(this.workerSources[t]={}),this.workerSources[t][e]||(this.workerSources[t][e]={}),this.workerSources[t][e][r]||(this.workerSources[t][e][r]=new this.workerSourceTypes[e]({send:function(e,r,n){i.actor.send(e,r,n,t)}},this.getLayerIndex(t),this.getAvailableImages(t))),this.workerSources[t][e][r]},bt.prototype.getDEMWorkerSource=function(t,e){return this.demWorkerSources[t]||(this.demWorkerSources[t]={}),this.demWorkerSources[t][e]||(this.demWorkerSources[t][e]=new c),this.demWorkerSources[t][e]},bt.prototype.enforceCacheSizeLimit=function(e,r){t.enforceCacheSizeLimit(r)},"undefined"!=typeof WorkerGlobalScope&&void 0!==t.window&&t.window instanceof WorkerGlobalScope&&(t.window.worker=new bt(t.window)),bt}),i(0,function(t){var e=t.createCommonjsModule(function(t){function e(t){return!r(t)}function r(t){return"undefined"==typeof window||"undefined"==typeof document?"not a browser":Array.prototype&&Array.prototype.every&&Array.prototype.filter&&Array.prototype.forEach&&Array.prototype.indexOf&&Array.prototype.lastIndexOf&&Array.prototype.map&&Array.prototype.some&&Array.prototype.reduce&&Array.prototype.reduceRight&&Array.isArray?Function.prototype&&Function.prototype.bind?Object.keys&&Object.create&&Object.getPrototypeOf&&Object.getOwnPropertyNames&&Object.isSealed&&Object.isFrozen&&Object.isExtensible&&Object.getOwnPropertyDescriptor&&Object.defineProperty&&Object.defineProperties&&Object.seal&&Object.freeze&&Object.preventExtensions?"JSON"in window&&"parse"in JSON&&"stringify"in JSON?function(){if(!("Worker"in window&&"Blob"in window&&"URL"in window))return!1;var t,e,r=new Blob([""],{type:"text/javascript"}),i=URL.createObjectURL(r);try{e=new Worker(i),t=!0}catch(e){t=!1}return e&&e.terminate(),URL.revokeObjectURL(i),t}()?"Uint8ClampedArray"in window?ArrayBuffer.isView?function(){var t=document.createElement("canvas");t.width=t.height=1;var e=t.getContext("2d");if(!e)return!1;var r=e.getImageData(0,0,1,1);return r&&r.width===t.width}()?(void 0===i[r=t&&t.failIfMajorPerformanceCaveat]&&(i[r]=function(t){var r=function(t){var r=document.createElement("canvas"),i=Object.create(e.webGLContextAttributes);return i.failIfMajorPerformanceCaveat=t,r.probablySupportsContext?r.probablySupportsContext("webgl",i)||r.probablySupportsContext("experimental-webgl",i):r.supportsContext?r.supportsContext("webgl",i)||r.supportsContext("experimental-webgl",i):r.getContext("webgl",i)||r.getContext("experimental-webgl",i)}(t);if(!r)return!1;var i=r.createShader(r.VERTEX_SHADER);return!(!i||r.isContextLost())&&(r.shaderSource(i,"void main() {}"),r.compileShader(i),!0===r.getShaderParameter(i,r.COMPILE_STATUS))}(r)),i[r]?void 0:"insufficient WebGL support"):"insufficient Canvas/getImageData support":"insufficient ArrayBuffer support":"insufficient Uint8ClampedArray support":"insufficient worker support":"insufficient JSON support":"insufficient Object support":"insufficient Function support":"insufficent Array support";var r}t.exports?t.exports=e:window&&(window.mapboxgl=window.mapboxgl||{},window.mapboxgl.supported=e,window.mapboxgl.notSupportedReason=r);var i={};e.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0}}),r={create:function(e,r,i){var n=t.window.document.createElement(e);return void 0!==r&&(n.className=r),i&&i.appendChild(n),n},createNS:function(e,r){return t.window.document.createElementNS(e,r)}},i=t.window.document.documentElement.style;function n(t){if(!i)return t[0];for(var e=0;e<t.length;e++)if(t[e]in i)return t[e];return t[0]}var o,a=n(["userSelect","MozUserSelect","WebkitUserSelect","msUserSelect"]);r.disableDrag=function(){i&&a&&(o=i[a],i[a]="none")},r.enableDrag=function(){i&&a&&(i[a]=o)};var s=n(["transform","WebkitTransform"]);r.setTransform=function(t,e){t.style[s]=e};var l=!1;try{var u=Object.defineProperty({},"passive",{get:function(){l=!0}});t.window.addEventListener("test",u,u),t.window.removeEventListener("test",u,u)}catch(t){l=!1}r.addEventListener=function(t,e,r,i){void 0===i&&(i={}),t.addEventListener(e,r,"passive"in i&&l?i:i.capture)},r.removeEventListener=function(t,e,r,i){void 0===i&&(i={}),t.removeEventListener(e,r,"passive"in i&&l?i:i.capture)};var c=function(e){e.preventDefault(),e.stopPropagation(),t.window.removeEventListener("click",c,!0)};function p(t){var e=t.userImage;return!!(e&&e.render&&e.render())&&(t.data.replace(new Uint8Array(e.data.buffer)),!0)}r.suppressClick=function(){t.window.addEventListener("click",c,!0),t.window.setTimeout(function(){t.window.removeEventListener("click",c,!0)},0)},r.mousePos=function(e,r){var i=e.getBoundingClientRect();return new t.Point(r.clientX-i.left-e.clientLeft,r.clientY-i.top-e.clientTop)},r.touchPos=function(e,r){for(var i=e.getBoundingClientRect(),n=[],o=0;o<r.length;o++)n.push(new t.Point(r[o].clientX-i.left-e.clientLeft,r[o].clientY-i.top-e.clientTop));return n},r.mouseButton=function(e){return void 0!==t.window.InstallTrigger&&2===e.button&&e.ctrlKey&&t.window.navigator.platform.toUpperCase().indexOf("MAC")>=0?0:e.button},r.remove=function(t){t.parentNode&&t.parentNode.removeChild(t)};var h=function(e){function r(){e.call(this),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new t.RGBAImage({width:1,height:1}),this.dirty=!0}return e&&(r.__proto__=e),(r.prototype=Object.create(e&&e.prototype)).constructor=r,r.prototype.isLoaded=function(){return this.loaded},r.prototype.setLoaded=function(t){if(this.loaded!==t&&(this.loaded=t,t)){for(var e=0,r=this.requestors;e<r.length;e+=1){var i=r[e];this._notify(i.ids,i.callback)}this.requestors=[]}},r.prototype.getImage=function(t){return this.images[t]},r.prototype.addImage=function(t,e){this._validate(t,e)&&(this.images[t]=e)},r.prototype._validate=function(e,r){var i=!0;return this._validateStretch(r.stretchX,r.data&&r.data.width)||(this.fire(new t.ErrorEvent(new Error('Image "'+e+'" has invalid "stretchX" value'))),i=!1),this._validateStretch(r.stretchY,r.data&&r.data.height)||(this.fire(new t.ErrorEvent(new Error('Image "'+e+'" has invalid "stretchY" value'))),i=!1),this._validateContent(r.content,r)||(this.fire(new t.ErrorEvent(new Error('Image "'+e+'" has invalid "content" value'))),i=!1),i},r.prototype._validateStretch=function(t,e){if(!t)return!0;for(var r=0,i=0,n=t;i<n.length;i+=1){var o=n[i];if(o[0]<r||o[1]<o[0]||e<o[1])return!1;r=o[1]}return!0},r.prototype._validateContent=function(t,e){return!(t&&(4!==t.length||t[0]<0||e.data.width<t[0]||t[1]<0||e.data.height<t[1]||t[2]<0||e.data.width<t[2]||t[3]<0||e.data.height<t[3]||t[2]<t[0]||t[3]<t[1]))},r.prototype.updateImage=function(t,e){e.version=this.images[t].version+1,this.images[t]=e,this.updatedImages[t]=!0},r.prototype.removeImage=function(t){var e=this.images[t];delete this.images[t],delete this.patterns[t],e.userImage&&e.userImage.onRemove&&e.userImage.onRemove()},r.prototype.listImages=function(){return Object.keys(this.images)},r.prototype.getImages=function(t,e){var r=!0;if(!this.isLoaded())for(var i=0,n=t;i<n.length;i+=1)this.images[n[i]]||(r=!1);this.isLoaded()||r?this._notify(t,e):this.requestors.push({ids:t,callback:e})},r.prototype._notify=function(e,r){for(var i={},n=0,o=e;n<o.length;n+=1){var a=o[n];this.images[a]||this.fire(new t.Event("styleimagemissing",{id:a}));var s=this.images[a];s?i[a]={data:s.data.clone(),pixelRatio:s.pixelRatio,sdf:s.sdf,version:s.version,stretchX:s.stretchX,stretchY:s.stretchY,content:s.content,hasRenderCallback:Boolean(s.userImage&&s.userImage.render)}:t.warnOnce('Image "'+a+'" could not be loaded. Please make sure you have added the image with map.addImage() or a "sprite" property in your style. You can provide missing images by listening for the "styleimagemissing" map event.')}r(null,i)},r.prototype.getPixelSize=function(){var t=this.atlasImage;return{width:t.width,height:t.height}},r.prototype.getPattern=function(e){var r=this.patterns[e],i=this.getImage(e);if(!i)return null;if(r&&r.position.version===i.version)return r.position;if(r)r.position.version=i.version;else{var n={w:i.data.width+2,h:i.data.height+2,x:0,y:0},o=new t.ImagePosition(n,i);this.patterns[e]={bin:n,position:o}}return this._updatePatternAtlas(),this.patterns[e].position},r.prototype.bind=function(e){var r=e.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new t.Texture(e,this.atlasImage,r.RGBA),this.atlasTexture.bind(r.LINEAR,r.CLAMP_TO_EDGE)},r.prototype._updatePatternAtlas=function(){var e=[];for(var r in this.patterns)e.push(this.patterns[r].bin);var i=t.potpack(e),n=i.w,o=i.h,a=this.atlasImage;for(var s in a.resize({width:n||1,height:o||1}),this.patterns){var l=this.patterns[s].bin,u=l.x+1,c=l.y+1,p=this.images[s].data,h=p.width,f=p.height;t.RGBAImage.copy(p,a,{x:0,y:0},{x:u,y:c},{width:h,height:f}),t.RGBAImage.copy(p,a,{x:0,y:f-1},{x:u,y:c-1},{width:h,height:1}),t.RGBAImage.copy(p,a,{x:0,y:0},{x:u,y:c+f},{width:h,height:1}),t.RGBAImage.copy(p,a,{x:h-1,y:0},{x:u-1,y:c},{width:1,height:f}),t.RGBAImage.copy(p,a,{x:0,y:0},{x:u+h,y:c},{width:1,height:f})}this.dirty=!0},r.prototype.beginFrame=function(){this.callbackDispatchedThisFrame={}},r.prototype.dispatchRenderCallbacks=function(t){for(var e=0,r=t;e<r.length;e+=1){var i=r[e];if(!this.callbackDispatchedThisFrame[i]){this.callbackDispatchedThisFrame[i]=!0;var n=this.images[i];p(n)&&this.updateImage(i,n)}}},r}(t.Evented),f=y,d=y,m=1e20;function y(t,e,r,i,n,o){this.fontSize=t||24,this.buffer=void 0===e?3:e,this.cutoff=i||.25,this.fontFamily=n||"sans-serif",this.fontWeight=o||"normal",this.radius=r||8;var a=this.size=this.fontSize+2*this.buffer;this.canvas=document.createElement("canvas"),this.canvas.width=this.canvas.height=a,this.ctx=this.canvas.getContext("2d"),this.ctx.font=this.fontWeight+" "+this.fontSize+"px "+this.fontFamily,this.ctx.textBaseline="middle",this.ctx.fillStyle="black",this.gridOuter=new Float64Array(a*a),this.gridInner=new Float64Array(a*a),this.f=new Float64Array(a),this.d=new Float64Array(a),this.z=new Float64Array(a+1),this.v=new Int16Array(a),this.middle=Math.round(a/2*(navigator.userAgent.indexOf("Gecko/")>=0?1.2:1))}function g(t,e,r,i,n,o,a){for(var s=0;s<e;s++){for(var l=0;l<r;l++)i[l]=t[l*e+s];for(_(i,n,o,a,r),l=0;l<r;l++)t[l*e+s]=n[l]}for(l=0;l<r;l++){for(s=0;s<e;s++)i[s]=t[l*e+s];for(_(i,n,o,a,e),s=0;s<e;s++)t[l*e+s]=Math.sqrt(n[s])}}function _(t,e,r,i,n){r[0]=0,i[0]=-m,i[1]=+m;for(var o=1,a=0;o<n;o++){for(var s=(t[o]+o*o-(t[r[a]]+r[a]*r[a]))/(2*o-2*r[a]);s<=i[a];)a--,s=(t[o]+o*o-(t[r[a]]+r[a]*r[a]))/(2*o-2*r[a]);r[++a]=o,i[a]=s,i[a+1]=+m}for(o=0,a=0;o<n;o++){for(;i[a+1]<o;)a++;e[o]=(o-r[a])*(o-r[a])+t[r[a]]}}y.prototype.draw=function(t){this.ctx.clearRect(0,0,this.size,this.size),this.ctx.fillText(t,this.buffer,this.middle);for(var e=this.ctx.getImageData(0,0,this.size,this.size),r=new Uint8ClampedArray(this.size*this.size),i=0;i<this.size*this.size;i++){var n=e.data[4*i+3]/255;this.gridOuter[i]=1===n?0:0===n?m:Math.pow(Math.max(0,.5-n),2),this.gridInner[i]=1===n?m:0===n?0:Math.pow(Math.max(0,n-.5),2)}for(g(this.gridOuter,this.size,this.size,this.f,this.d,this.v,this.z),g(this.gridInner,this.size,this.size,this.f,this.d,this.v,this.z),i=0;i<this.size*this.size;i++)r[i]=Math.max(0,Math.min(255,Math.round(255-255*((this.gridOuter[i]-this.gridInner[i])/this.radius+this.cutoff))));return r},f.default=d;var v=function(t,e){this.requestManager=t,this.localIdeographFontFamily=e,this.entries={}};v.prototype.setURL=function(t){this.url=t},v.prototype.getGlyphs=function(e,r){var i=this,n=[];for(var o in e)for(var a=0,s=e[o];a<s.length;a+=1)n.push({stack:o,id:s[a]});t.asyncAll(n,function(t,e){var r=t.stack,n=t.id,o=i.entries[r];o||(o=i.entries[r]={glyphs:{},requests:{},ranges:{}});var a=o.glyphs[n];if(void 0===a){if(a=i._tinySDF(o,r,n))return o.glyphs[n]=a,void e(null,{stack:r,id:n,glyph:a});var s=Math.floor(n/256);if(256*s>65535)e(new Error("glyphs > 65535 not supported"));else if(o.ranges[s])e(null,{stack:r,id:n,glyph:a});else{var l=o.requests[s];l||(l=o.requests[s]=[],v.loadGlyphRange(r,s,i.url,i.requestManager,function(t,e){if(e){for(var r in e)i._doesCharSupportLocalGlyph(+r)||(o.glyphs[+r]=e[+r]);o.ranges[s]=!0}for(var n=0,a=l;n<a.length;n+=1)(0,a[n])(t,e);delete o.requests[s]})),l.push(function(t,i){t?e(t):i&&e(null,{stack:r,id:n,glyph:i[n]||null})})}}else e(null,{stack:r,id:n,glyph:a})},function(t,e){if(t)r(t);else if(e){for(var i={},n=0,o=e;n<o.length;n+=1){var a=o[n],s=a.stack,l=a.id,u=a.glyph;(i[s]||(i[s]={}))[l]=u&&{id:u.id,bitmap:u.bitmap.clone(),metrics:u.metrics}}r(null,i)}})},v.prototype._doesCharSupportLocalGlyph=function(e){return!!this.localIdeographFontFamily&&(t.isChar["CJK Unified Ideographs"](e)||t.isChar["Hangul Syllables"](e)||t.isChar.Hiragana(e)||t.isChar.Katakana(e))},v.prototype._tinySDF=function(e,r,i){var n=this.localIdeographFontFamily;if(n&&this._doesCharSupportLocalGlyph(i)){var o=e.tinySDF;if(!o){var a="400";/bold/i.test(r)?a="900":/medium/i.test(r)?a="500":/light/i.test(r)&&(a="200"),o=e.tinySDF=new v.TinySDF(24,3,8,.25,n,a)}return{id:i,bitmap:new t.AlphaImage({width:30,height:30},o.draw(String.fromCharCode(i))),metrics:{width:24,height:24,left:0,top:-8,advance:24}}}},v.loadGlyphRange=function(e,r,i,n,o){var a=256*r,s=a+255,l=n.transformRequest(n.normalizeGlyphsURL(i).replace("{fontstack}",e).replace("{range}",a+"-"+s),t.ResourceType.Glyphs);t.getArrayBuffer(l,function(e,r){if(e)o(e);else if(r){for(var i={},n=0,a=t.parseGlyphPBF(r);n<a.length;n+=1){var s=a[n];i[s.id]=s}o(null,i)}})},v.TinySDF=f;var x=function(){this.specification=t.styleSpec.light.position};x.prototype.possiblyEvaluate=function(e,r){return t.sphericalToCartesian(e.expression.evaluate(r))},x.prototype.interpolate=function(e,r,i){return{x:t.number(e.x,r.x,i),y:t.number(e.y,r.y,i),z:t.number(e.z,r.z,i)}};var b=new t.Properties({anchor:new t.DataConstantProperty(t.styleSpec.light.anchor),position:new x,color:new t.DataConstantProperty(t.styleSpec.light.color),intensity:new t.DataConstantProperty(t.styleSpec.light.intensity)}),w=function(e){function r(r){e.call(this),this._transitionable=new t.Transitionable(b),this.setLight(r),this._transitioning=this._transitionable.untransitioned()}return e&&(r.__proto__=e),(r.prototype=Object.create(e&&e.prototype)).constructor=r,r.prototype.getLight=function(){return this._transitionable.serialize()},r.prototype.setLight=function(e,r){if(void 0===r&&(r={}),!this._validate(t.validateLight,e,r))for(var i in e){var n=e[i];t.endsWith(i,"-transition")?this._transitionable.setTransition(i.slice(0,-"-transition".length),n):this._transitionable.setValue(i,n)}},r.prototype.updateTransitions=function(t){this._transitioning=this._transitionable.transitioned(t,this._transitioning)},r.prototype.hasTransition=function(){return this._transitioning.hasTransition()},r.prototype.recalculate=function(t){this.properties=this._transitioning.possiblyEvaluate(t)},r.prototype._validate=function(e,r,i){return(!i||!1!==i.validate)&&t.emitValidationErrors(this,e.call(t.validateStyle,t.extend({value:r,style:{glyphs:!0,sprite:!0},styleSpec:t.styleSpec})))},r}(t.Evented),S=function(t,e){this.width=t,this.height=e,this.nextRow=0,this.data=new Uint8Array(this.width*this.height),this.dashEntry={}};S.prototype.getDash=function(t,e){var r=t.join(",")+String(e);return this.dashEntry[r]||(this.dashEntry[r]=this.addDash(t,e)),this.dashEntry[r]},S.prototype.getDashRanges=function(t,e,r){var i=[],n=t.length%2==1?-t[t.length-1]*r:0,o=t[0]*r,a=!0;i.push({left:n,right:o,isDash:a,zeroLength:0===t[0]});for(var s=t[0],l=1;l<t.length;l++){var u=t[l];i.push({left:n=s*r,right:o=(s+=u)*r,isDash:a=!a,zeroLength:0===u})}return i},S.prototype.addRoundDash=function(t,e,r){for(var i=e/2,n=-r;n<=r;n++)for(var o=this.width*(this.nextRow+r+n),a=0,s=t[a],l=0;l<this.width;l++){l/s.right>1&&(s=t[++a]);var u=Math.abs(l-s.left),c=Math.abs(l-s.right),p=Math.min(u,c),h=void 0,f=n/r*(i+1);if(s.isDash){var d=i-Math.abs(f);h=Math.sqrt(p*p+d*d)}else h=i-Math.sqrt(p*p+f*f);this.data[o+l]=Math.max(0,Math.min(255,h+128))}},S.prototype.addRegularDash=function(t){for(var e=t.length-1;e>=0;--e){var r=t[e],i=t[e+1];r.zeroLength?t.splice(e,1):i&&i.isDash===r.isDash&&(i.left=r.left,t.splice(e,1))}var n=t[0],o=t[t.length-1];n.isDash===o.isDash&&(n.left=o.left-this.width,o.right=n.right+this.width);for(var a=this.width*this.nextRow,s=0,l=t[s],u=0;u<this.width;u++){u/l.right>1&&(l=t[++s]);var c=Math.abs(u-l.left),p=Math.abs(u-l.right),h=Math.min(c,p);this.data[a+u]=Math.max(0,Math.min(255,(l.isDash?h:-h)+128))}},S.prototype.addDash=function(e,r){var i=r?7:0,n=2*i+1;if(this.nextRow+n>this.height)return t.warnOnce("LineAtlas out of space"),null;for(var o=0,a=0;a<e.length;a++)o+=e[a];if(0!==o){var s=this.width/o,l=this.getDashRanges(e,this.width,s);r?this.addRoundDash(l,s,i):this.addRegularDash(l)}var u={y:(this.nextRow+i+.5)/this.height,height:2*i/this.height,width:o};return this.nextRow+=n,this.dirty=!0,u},S.prototype.bind=function(t){var e=t.gl;this.texture?(e.bindTexture(e.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,e.texSubImage2D(e.TEXTURE_2D,0,0,0,this.width,this.height,e.ALPHA,e.UNSIGNED_BYTE,this.data))):(this.texture=e.createTexture(),e.bindTexture(e.TEXTURE_2D,this.texture),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.REPEAT),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.REPEAT),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texImage2D(e.TEXTURE_2D,0,e.ALPHA,this.width,this.height,0,e.ALPHA,e.UNSIGNED_BYTE,this.data))};var T=function e(r,i){this.workerPool=r,this.actors=[],this.currentActor=0,this.id=t.uniqueId();for(var n=this.workerPool.acquire(this.id),o=0;o<n.length;o++){var a=new e.Actor(n[o],i,this.id);a.name="Worker "+o,this.actors.push(a)}};function I(e,r,i){var n=function(n,o){if(n)return i(n);if(o){var a=t.pick(t.extend(o,e),["tiles","minzoom","maxzoom","attribution","mapbox_logo","bounds","scheme","tileSize","encoding"]);o.vector_layers&&(a.vectorLayers=o.vector_layers,a.vectorLayerIds=a.vectorLayers.map(function(t){return t.id})),a.tiles=r.canonicalizeTileset(a,e.url),i(null,a)}};return e.url?t.getJSON(r.transformRequest(r.normalizeSourceURL(e.url),t.ResourceType.Source),n):t.browser.frame(function(){return n(null,e)})}T.prototype.broadcast=function(e,r,i){t.asyncAll(this.actors,function(t,i){t.send(e,r,i)},i=i||function(){})},T.prototype.getActor=function(){return this.currentActor=(this.currentActor+1)%this.actors.length,this.actors[this.currentActor]},T.prototype.remove=function(){this.actors.forEach(function(t){t.remove()}),this.actors=[],this.workerPool.release(this.id)},T.Actor=t.Actor;var E=function(e,r,i){this.bounds=t.LngLatBounds.convert(this.validateBounds(e)),this.minzoom=r||0,this.maxzoom=i||24};E.prototype.validateBounds=function(t){return Array.isArray(t)&&4===t.length?[Math.max(-180,t[0]),Math.max(-90,t[1]),Math.min(180,t[2]),Math.min(90,t[3])]:[-180,-90,180,90]},E.prototype.contains=function(e){var r=Math.pow(2,e.z),i=Math.floor(t.mercatorXfromLng(this.bounds.getWest())*r),n=Math.floor(t.mercatorYfromLat(this.bounds.getNorth())*r),o=Math.ceil(t.mercatorXfromLng(this.bounds.getEast())*r),a=Math.ceil(t.mercatorYfromLat(this.bounds.getSouth())*r);return e.x>=i&&e.x<o&&e.y>=n&&e.y<a};var A=function(e){function r(r,i,n,o){if(e.call(this),this.id=r,this.dispatcher=n,this.type="vector",this.minzoom=0,this.maxzoom=22,this.scheme="xyz",this.tileSize=512,this.reparseOverscaled=!0,this.isTileClipped=!0,this._loaded=!1,t.extend(this,t.pick(i,["url","scheme","tileSize","promoteId"])),this._options=t.extend({type:"vector"},i),this._collectResourceTiming=i.collectResourceTiming,512!==this.tileSize)throw new Error("vector tile sources must have a tileSize of 512");this.setEventedParent(o)}return e&&(r.__proto__=e),(r.prototype=Object.create(e&&e.prototype)).constructor=r,r.prototype.load=function(){var e=this;this._loaded=!1,this.fire(new t.Event("dataloading",{dataType:"source"})),this._tileJSONRequest=I(this._options,this.map._requestManager,function(r,i){e._tileJSONRequest=null,e._loaded=!0,r?e.fire(new t.ErrorEvent(r)):i&&(t.extend(e,i),i.bounds&&(e.tileBounds=new E(i.bounds,e.minzoom,e.maxzoom)),t.postTurnstileEvent(i.tiles,e.map._requestManager._customAccessToken),t.postMapLoadEvent(i.tiles,e.map._getMapId(),e.map._requestManager._skuToken,e.map._requestManager._customAccessToken),e.fire(new t.Event("data",{dataType:"source",sourceDataType:"metadata"})),e.fire(new t.Event("data",{dataType:"source",sourceDataType:"content"})))})},r.prototype.loaded=function(){return this._loaded},r.prototype.hasTile=function(t){return!this.tileBounds||this.tileBounds.contains(t.canonical)},r.prototype.onAdd=function(t){this.map=t,this.load()},r.prototype.onRemove=function(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)},r.prototype.serialize=function(){return t.extend({},this._options)},r.prototype.loadTile=function(e,r){var i=this.map._requestManager.normalizeTileURL(e.tileID.canonical.url(this.tiles,this.scheme)),n={request:this.map._requestManager.transformRequest(i,t.ResourceType.Tile),uid:e.uid,tileID:e.tileID,zoom:e.tileID.overscaledZ,tileSize:this.tileSize*e.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:t.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};function o(i,n){return delete e.request,e.aborted?r(null):i&&404!==i.status?r(i):(n&&n.resourceTiming&&(e.resourceTiming=n.resourceTiming),this.map._refreshExpiredTiles&&n&&e.setExpiryData(n),e.loadVectorData(n,this.map.painter),t.cacheEntryPossiblyAdded(this.dispatcher),r(null),void(e.reloadCallback&&(this.loadTile(e,e.reloadCallback),e.reloadCallback=null)))}n.request.collectResourceTiming=this._collectResourceTiming,e.actor&&"expired"!==e.state?"loading"===e.state?e.reloadCallback=r:e.request=e.actor.send("reloadTile",n,o.bind(this)):(e.actor=this.dispatcher.getActor(),e.request=e.actor.send("loadTile",n,o.bind(this)))},r.prototype.abortTile=function(t){t.request&&(t.request.cancel(),delete t.request),t.actor&&t.actor.send("abortTile",{uid:t.uid,type:this.type,source:this.id},void 0)},r.prototype.unloadTile=function(t){t.unloadVectorData(),t.actor&&t.actor.send("removeTile",{uid:t.uid,type:this.type,source:this.id},void 0)},r.prototype.hasTransition=function(){return!1},r}(t.Evented),z=function(e){function r(r,i,n,o){e.call(this),this.id=r,this.dispatcher=n,this.setEventedParent(o),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=t.extend({type:"raster"},i),t.extend(this,t.pick(i,["url","scheme","tileSize"]))}return e&&(r.__proto__=e),(r.prototype=Object.create(e&&e.prototype)).constructor=r,r.prototype.load=function(){var e=this;this._loaded=!1,this.fire(new t.Event("dataloading",{dataType:"source"})),this._tileJSONRequest=I(this._options,this.map._requestManager,function(r,i){e._tileJSONRequest=null,e._loaded=!0,r?e.fire(new t.ErrorEvent(r)):i&&(t.extend(e,i),i.bounds&&(e.tileBounds=new E(i.bounds,e.minzoom,e.maxzoom)),t.postTurnstileEvent(i.tiles),t.postMapLoadEvent(i.tiles,e.map._getMapId(),e.map._requestManager._skuToken),e.fire(new t.Event("data",{dataType:"source",sourceDataType:"metadata"})),e.fire(new t.Event("data",{dataType:"source",sourceDataType:"content"})))})},r.prototype.loaded=function(){return this._loaded},r.prototype.onAdd=function(t){this.map=t,this.load()},r.prototype.onRemove=function(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)},r.prototype.serialize=function(){return t.extend({},this._options)},r.prototype.hasTile=function(t){return!this.tileBounds||this.tileBounds.contains(t.canonical)},r.prototype.loadTile=function(e,r){var i=this,n=this.map._requestManager.normalizeTileURL(e.tileID.canonical.url(this.tiles,this.scheme),this.tileSize);e.request=t.getImage(this.map._requestManager.transformRequest(n,t.ResourceType.Tile),function(n,o){if(delete e.request,e.aborted)e.state="unloaded",r(null);else if(n)e.state="errored",r(n);else if(o){i.map._refreshExpiredTiles&&e.setExpiryData(o),delete o.cacheControl,delete o.expires;var a=i.map.painter.context,s=a.gl;e.texture=i.map.painter.getTileTexture(o.width),e.texture?e.texture.update(o,{useMipmap:!0}):(e.texture=new t.Texture(a,o,s.RGBA,{useMipmap:!0}),e.texture.bind(s.LINEAR,s.CLAMP_TO_EDGE,s.LINEAR_MIPMAP_NEAREST),a.extTextureFilterAnisotropic&&s.texParameterf(s.TEXTURE_2D,a.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,a.extTextureFilterAnisotropicMax)),e.state="loaded",t.cacheEntryPossiblyAdded(i.dispatcher),r(null)}})},r.prototype.abortTile=function(t,e){t.request&&(t.request.cancel(),delete t.request),e()},r.prototype.unloadTile=function(t,e){t.texture&&this.map.painter.saveTileTexture(t.texture),e()},r.prototype.hasTransition=function(){return!1},r}(t.Evented),P=function(e){function r(r,i,n,o){e.call(this,r,i,n,o),this.type="raster-dem",this.maxzoom=22,this._options=t.extend({type:"raster-dem"},i),this.encoding=i.encoding||"mapbox"}return e&&(r.__proto__=e),(r.prototype=Object.create(e&&e.prototype)).constructor=r,r.prototype.serialize=function(){return{type:"raster-dem",url:this.url,tileSize:this.tileSize,tiles:this.tiles,bounds:this.bounds,encoding:this.encoding}},r.prototype.loadTile=function(e,r){var i=this.map._requestManager.normalizeTileURL(e.tileID.canonical.url(this.tiles,this.scheme),this.tileSize);e.request=t.getImage(this.map._requestManager.transformRequest(i,t.ResourceType.Tile),function(i,n){if(delete e.request,e.aborted)e.state="unloaded",r(null);else if(i)e.state="errored",r(i);else if(n){this.map._refreshExpiredTiles&&e.setExpiryData(n),delete n.cacheControl,delete n.expires;var o=t.window.ImageBitmap&&n instanceof t.window.ImageBitmap&&t.offscreenCanvasSupported()?n:t.browser.getImageData(n,1),a={uid:e.uid,coord:e.tileID,source:this.id,rawImageData:o,encoding:this.encoding};e.actor&&"expired"!==e.state||(e.actor=this.dispatcher.getActor(),e.actor.send("loadDEMTile",a,function(t,i){t&&(e.state="errored",r(t)),i&&(e.dem=i,e.needsHillshadePrepare=!0,e.state="loaded",r(null))}.bind(this)))}}.bind(this)),e.neighboringTiles=this._getNeighboringTiles(e.tileID)},r.prototype._getNeighboringTiles=function(e){var r=e.canonical,i=Math.pow(2,r.z),n=(r.x-1+i)%i,o=0===r.x?e.wrap-1:e.wrap,a=(r.x+1+i)%i,s=r.x+1===i?e.wrap+1:e.wrap,l={};return l[new t.OverscaledTileID(e.overscaledZ,o,r.z,n,r.y).key]={backfilled:!1},l[new t.OverscaledTileID(e.overscaledZ,s,r.z,a,r.y).key]={backfilled:!1},r.y>0&&(l[new t.OverscaledTileID(e.overscaledZ,o,r.z,n,r.y-1).key]={backfilled:!1},l[new t.OverscaledTileID(e.overscaledZ,e.wrap,r.z,r.x,r.y-1).key]={backfilled:!1},l[new t.OverscaledTileID(e.overscaledZ,s,r.z,a,r.y-1).key]={backfilled:!1}),r.y+1<i&&(l[new t.OverscaledTileID(e.overscaledZ,o,r.z,n,r.y+1).key]={backfilled:!1},l[new t.OverscaledTileID(e.overscaledZ,e.wrap,r.z,r.x,r.y+1).key]={backfilled:!1},l[new t.OverscaledTileID(e.overscaledZ,s,r.z,a,r.y+1).key]={backfilled:!1}),l},r.prototype.unloadTile=function(t){t.demTexture&&this.map.painter.saveTileTexture(t.demTexture),t.fbo&&(t.fbo.destroy(),delete t.fbo),t.dem&&delete t.dem,delete t.neighboringTiles,t.state="unloaded",t.actor&&t.actor.send("removeDEMTile",{uid:t.uid,source:this.id})},r}(z),C=function(e){function r(r,i,n,o){e.call(this),this.id=r,this.type="geojson",this.minzoom=0,this.maxzoom=18,this.tileSize=512,this.isTileClipped=!0,this.reparseOverscaled=!0,this._removed=!1,this._loaded=!1,this.actor=n.getActor(),this.setEventedParent(o),this._data=i.data,this._options=t.extend({},i),this._collectResourceTiming=i.collectResourceTiming,this._resourceTiming=[],void 0!==i.maxzoom&&(this.maxzoom=i.maxzoom),i.type&&(this.type=i.type),i.attribution&&(this.attribution=i.attribution),this.promoteId=i.promoteId;var a=t.EXTENT/this.tileSize;this.workerOptions=t.extend({source:this.id,cluster:i.cluster||!1,geojsonVtOptions:{buffer:(void 0!==i.buffer?i.buffer:128)*a,tolerance:(void 0!==i.tolerance?i.tolerance:.375)*a,extent:t.EXTENT,maxZoom:this.maxzoom,lineMetrics:i.lineMetrics||!1,generateId:i.generateId||!1},superclusterOptions:{maxZoom:void 0!==i.clusterMaxZoom?Math.min(i.clusterMaxZoom,this.maxzoom-1):this.maxzoom-1,extent:t.EXTENT,radius:(i.clusterRadius||50)*a,log:!1,generateId:i.generateId||!1},clusterProperties:i.clusterProperties},i.workerOptions)}return e&&(r.__proto__=e),(r.prototype=Object.create(e&&e.prototype)).constructor=r,r.prototype.load=function(){var e=this;this.fire(new t.Event("dataloading",{dataType:"source"})),this._updateWorkerData(function(r){if(r)e.fire(new t.ErrorEvent(r));else{var i={dataType:"source",sourceDataType:"metadata"};e._collectResourceTiming&&e._resourceTiming&&e._resourceTiming.length>0&&(i.resourceTiming=e._resourceTiming,e._resourceTiming=[]),e.fire(new t.Event("data",i))}})},r.prototype.onAdd=function(t){this.map=t,this.load()},r.prototype.setData=function(e){var r=this;return this._data=e,this.fire(new t.Event("dataloading",{dataType:"source"})),this._updateWorkerData(function(e){if(e)r.fire(new t.ErrorEvent(e));else{var i={dataType:"source",sourceDataType:"content"};r._collectResourceTiming&&r._resourceTiming&&r._resourceTiming.length>0&&(i.resourceTiming=r._resourceTiming,r._resourceTiming=[]),r.fire(new t.Event("data",i))}}),this},r.prototype.getClusterExpansionZoom=function(t,e){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:t,source:this.id},e),this},r.prototype.getClusterChildren=function(t,e){return this.actor.send("geojson.getClusterChildren",{clusterId:t,source:this.id},e),this},r.prototype.getClusterLeaves=function(t,e,r,i){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:t,limit:e,offset:r},i),this},r.prototype._updateWorkerData=function(e){var r=this;this._loaded=!1;var i=t.extend({},this.workerOptions),n=this._data;"string"==typeof n?(i.request=this.map._requestManager.transformRequest(t.browser.resolveURL(n),t.ResourceType.Source),i.request.collectResourceTiming=this._collectResourceTiming):i.data=JSON.stringify(n),this.actor.send(this.type+".loadData",i,function(t,n){r._removed||n&&n.abandoned||(r._loaded=!0,n&&n.resourceTiming&&n.resourceTiming[r.id]&&(r._resourceTiming=n.resourceTiming[r.id].slice(0)),r.actor.send(r.type+".coalesce",{source:i.source},null),e(t))})},r.prototype.loaded=function(){return this._loaded},r.prototype.loadTile=function(e,r){var i=this,n=e.actor?"reloadTile":"loadTile";e.actor=this.actor,e.request=this.actor.send(n,{type:this.type,uid:e.uid,tileID:e.tileID,zoom:e.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:t.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId},function(t,o){return delete e.request,e.unloadVectorData(),e.aborted?r(null):t?r(t):(e.loadVectorData(o,i.map.painter,"reloadTile"===n),r(null))})},r.prototype.abortTile=function(t){t.request&&(t.request.cancel(),delete t.request),t.aborted=!0},r.prototype.unloadTile=function(t){t.unloadVectorData(),this.actor.send("removeTile",{uid:t.uid,type:this.type,source:this.id})},r.prototype.onRemove=function(){this._removed=!0,this.actor.send("removeSource",{type:this.type,source:this.id})},r.prototype.serialize=function(){return t.extend({},this._options,{type:this.type,data:this._data})},r.prototype.hasTransition=function(){return!1},r}(t.Evented),k=t.createLayout([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]),M=function(e){function r(t,r,i,n){e.call(this),this.id=t,this.dispatcher=i,this.coordinates=r.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(n),this.options=r}return e&&(r.__proto__=e),(r.prototype=Object.create(e&&e.prototype)).constructor=r,r.prototype.load=function(e,r){var i=this;this._loaded=!1,this.fire(new t.Event("dataloading",{dataType:"source"})),this.url=this.options.url,t.getImage(this.map._requestManager.transformRequest(this.url,t.ResourceType.Image),function(n,o){i._loaded=!0,n?i.fire(new t.ErrorEvent(n)):o&&(i.image=o,e&&(i.coordinates=e),r&&r(),i._finishLoading())})},r.prototype.loaded=function(){return this._loaded},r.prototype.updateImage=function(t){var e=this;return this.image&&t.url?(this.options.url=t.url,this.load(t.coordinates,function(){e.texture=null}),this):this},r.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new t.Event("data",{dataType:"source",sourceDataType:"metadata"})))},r.prototype.onAdd=function(t){this.map=t,this.load()},r.prototype.setCoordinates=function(e){var r=this;this.coordinates=e;var i=e.map(t.MercatorCoordinate.fromLngLat);this.tileID=function(e){for(var r=1/0,i=1/0,n=-1/0,o=-1/0,a=0,s=e;a<s.length;a+=1){var l=s[a];r=Math.min(r,l.x),i=Math.min(i,l.y),n=Math.max(n,l.x),o=Math.max(o,l.y)}var u=Math.max(n-r,o-i),c=Math.max(0,Math.floor(-Math.log(u)/Math.LN2)),p=Math.pow(2,c);return new t.CanonicalTileID(c,Math.floor((r+n)/2*p),Math.floor((i+o)/2*p))}(i),this.minzoom=this.maxzoom=this.tileID.z;var n=i.map(function(t){return r.tileID.getTilePoint(t)._round()});return this._boundsArray=new t.StructArrayLayout4i8,this._boundsArray.emplaceBack(n[0].x,n[0].y,0,0),this._boundsArray.emplaceBack(n[1].x,n[1].y,t.EXTENT,0),this._boundsArray.emplaceBack(n[3].x,n[3].y,0,t.EXTENT),this._boundsArray.emplaceBack(n[2].x,n[2].y,t.EXTENT,t.EXTENT),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new t.Event("data",{dataType:"source",sourceDataType:"content"})),this},r.prototype.prepare=function(){if(0!==Object.keys(this.tiles).length&&this.image){var e=this.map.painter.context,r=e.gl;for(var i in this.boundsBuffer||(this.boundsBuffer=e.createVertexBuffer(this._boundsArray,k.members)),this.boundsSegments||(this.boundsSegments=t.SegmentVector.simpleSegment(0,0,4,2)),this.texture||(this.texture=new t.Texture(e,this.image,r.RGBA),this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE)),this.tiles){var n=this.tiles[i];"loaded"!==n.state&&(n.state="loaded",n.texture=this.texture)}}},r.prototype.loadTile=function(t,e){this.tileID&&this.tileID.equals(t.tileID.canonical)?(this.tiles[String(t.tileID.wrap)]=t,t.buckets={},e(null)):(t.state="errored",e(null))},r.prototype.serialize=function(){return{type:"image",url:this.options.url,coordinates:this.coordinates}},r.prototype.hasTransition=function(){return!1},r}(t.Evented),D=function(e){function r(t,r,i,n){e.call(this,t,r,i,n),this.roundZoom=!0,this.type="video",this.options=r}return e&&(r.__proto__=e),(r.prototype=Object.create(e&&e.prototype)).constructor=r,r.prototype.load=function(){var e=this;this._loaded=!1;var r=this.options;this.urls=[];for(var i=0,n=r.urls;i<n.length;i+=1)this.urls.push(this.map._requestManager.transformRequest(n[i],t.ResourceType.Source).url);t.getVideo(this.urls,function(r,i){e._loaded=!0,r?e.fire(new t.ErrorEvent(r)):i&&(e.video=i,e.video.loop=!0,e.video.addEventListener("playing",function(){e.map.triggerRepaint()}),e.map&&e.video.play(),e._finishLoading())})},r.prototype.pause=function(){this.video&&this.video.pause()},r.prototype.play=function(){this.video&&this.video.play()},r.prototype.seek=function(e){if(this.video){var r=this.video.seekable;e<r.start(0)||e>r.end(0)?this.fire(new t.ErrorEvent(new t.ValidationError("sources."+this.id,null,"Playback for this video can be set only between the "+r.start(0)+" and "+r.end(0)+"-second mark."))):this.video.currentTime=e}},r.prototype.getVideo=function(){return this.video},r.prototype.onAdd=function(t){this.map||(this.map=t,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},r.prototype.prepare=function(){if(!(0===Object.keys(this.tiles).length||this.video.readyState<2)){var e=this.map.painter.context,r=e.gl;for(var i in this.boundsBuffer||(this.boundsBuffer=e.createVertexBuffer(this._boundsArray,k.members)),this.boundsSegments||(this.boundsSegments=t.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE),r.texSubImage2D(r.TEXTURE_2D,0,0,0,r.RGBA,r.UNSIGNED_BYTE,this.video)):(this.texture=new t.Texture(e,this.video,r.RGBA),this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE)),this.tiles){var n=this.tiles[i];"loaded"!==n.state&&(n.state="loaded",n.texture=this.texture)}}},r.prototype.serialize=function(){return{type:"video",urls:this.urls,coordinates:this.coordinates}},r.prototype.hasTransition=function(){return this.video&&!this.video.paused},r}(M),L=function(e){function r(r,i,n,o){e.call(this,r,i,n,o),i.coordinates?Array.isArray(i.coordinates)&&4===i.coordinates.length&&!i.coordinates.some(function(t){return!Array.isArray(t)||2!==t.length||t.some(function(t){return"number"!=typeof t})})||this.fire(new t.ErrorEvent(new t.ValidationError("sources."+r,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new t.ErrorEvent(new t.ValidationError("sources."+r,null,'missing required property "coordinates"'))),i.animate&&"boolean"!=typeof i.animate&&this.fire(new t.ErrorEvent(new t.ValidationError("sources."+r,null,'optional "animate" property must be a boolean value'))),i.canvas?"string"==typeof i.canvas||i.canvas instanceof t.window.HTMLCanvasElement||this.fire(new t.ErrorEvent(new t.ValidationError("sources."+r,null,'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new t.ErrorEvent(new t.ValidationError("sources."+r,null,'missing required property "canvas"'))),this.options=i,this.animate=void 0===i.animate||i.animate}return e&&(r.__proto__=e),(r.prototype=Object.create(e&&e.prototype)).constructor=r,r.prototype.load=function(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof t.window.HTMLCanvasElement?this.options.canvas:t.window.document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new t.ErrorEvent(new Error("Canvas dimensions cannot be less than or equal to zero."))):(this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading())},r.prototype.getCanvas=function(){return this.canvas},r.prototype.onAdd=function(t){this.map=t,this.load(),this.canvas&&this.animate&&this.play()},r.prototype.onRemove=function(){this.pause()},r.prototype.prepare=function(){var e=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,e=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,e=!0),!this._hasInvalidDimensions()&&0!==Object.keys(this.tiles).length){var r=this.map.painter.context,i=r.gl;for(var n in this.boundsBuffer||(this.boundsBuffer=r.createVertexBuffer(this._boundsArray,k.members)),this.boundsSegments||(this.boundsSegments=t.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(e||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new t.Texture(r,this.canvas,i.RGBA,{premultiply:!0}),this.tiles){var o=this.tiles[n];"loaded"!==o.state&&(o.state="loaded",o.texture=this.texture)}}},r.prototype.serialize=function(){return{type:"canvas",coordinates:this.coordinates}},r.prototype.hasTransition=function(){return this._playing},r.prototype._hasInvalidDimensions=function(){for(var t=0,e=[this.canvas.width,this.canvas.height];t<e.length;t+=1){var r=e[t];if(isNaN(r)||r<=0)return!0}return!1},r}(M),R={vector:A,raster:z,"raster-dem":P,geojson:C,video:D,image:M,canvas:L};function B(e,r){var i=t.identity([]);return t.translate(i,i,[1,1,0]),t.scale(i,i,[.5*e.width,.5*e.height,1]),t.multiply(i,i,e.calculatePosMatrix(r.toUnwrapped()))}function F(t,e,r,i,n,o){var a=function(t,e,r){if(t)for(var i=0,n=t;i<n.length;i+=1){var o=e[n[i]];if(o&&o.source===r&&"fill-extrusion"===o.type)return!0}else for(var a in e){var s=e[a];if(s.source===r&&"fill-extrusion"===s.type)return!0}return!1}(n&&n.layers,e,t.id),s=o.maxPitchScaleFactor(),l=t.tilesIn(i,s,a);l.sort(O);for(var u=[],c=0,p=l;c<p.length;c+=1){var h=p[c];u.push({wrappedTileID:h.tileID.wrapped().key,queryResults:h.tile.queryRenderedFeatures(e,r,t._state,h.queryGeometry,h.cameraQueryGeometry,h.scale,n,o,s,B(t.transform,h.tileID))})}var f=function(t){for(var e={},r={},i=0,n=t;i<n.length;i+=1){var o=n[i],a=o.queryResults,s=o.wrappedTileID,l=r[s]=r[s]||{};for(var u in a)for(var c=a[u],p=l[u]=l[u]||{},h=e[u]=e[u]||[],f=0,d=c;f<d.length;f+=1){var m=d[f];p[m.featureIndex]||(p[m.featureIndex]=!0,h.push(m))}}return e}(u);for(var d in f)f[d].forEach(function(e){var r=e.feature,i=t.getFeatureState(r.layer["source-layer"],r.id);r.source=r.layer.source,r.layer["source-layer"]&&(r.sourceLayer=r.layer["source-layer"]),r.state=i});return f}function O(t,e){var r=t.tileID,i=e.tileID;return r.overscaledZ-i.overscaledZ||r.canonical.y-i.canonical.y||r.wrap-i.wrap||r.canonical.x-i.canonical.x}var U=function(t,e){this.max=t,this.onRemove=e,this.reset()};U.prototype.reset=function(){for(var t in this.data)for(var e=0,r=this.data[t];e<r.length;e+=1){var i=r[e];i.timeout&&clearTimeout(i.timeout),this.onRemove(i.value)}return this.data={},this.order=[],this},U.prototype.add=function(t,e,r){var i=this,n=t.wrapped().key;void 0===this.data[n]&&(this.data[n]=[]);var o={value:e,timeout:void 0};if(void 0!==r&&(o.timeout=setTimeout(function(){i.remove(t,o)},r)),this.data[n].push(o),this.order.push(n),this.order.length>this.max){var a=this._getAndRemoveByKey(this.order[0]);a&&this.onRemove(a)}return this},U.prototype.has=function(t){return t.wrapped().key in this.data},U.prototype.getAndRemove=function(t){return this.has(t)?this._getAndRemoveByKey(t.wrapped().key):null},U.prototype._getAndRemoveByKey=function(t){var e=this.data[t].shift();return e.timeout&&clearTimeout(e.timeout),0===this.data[t].length&&delete this.data[t],this.order.splice(this.order.indexOf(t),1),e.value},U.prototype.getByKey=function(t){var e=this.data[t];return e?e[0].value:null},U.prototype.get=function(t){return this.has(t)?this.data[t.wrapped().key][0].value:null},U.prototype.remove=function(t,e){if(!this.has(t))return this;var r=t.wrapped().key,i=void 0===e?0:this.data[r].indexOf(e),n=this.data[r][i];return this.data[r].splice(i,1),n.timeout&&clearTimeout(n.timeout),0===this.data[r].length&&delete this.data[r],this.onRemove(n.value),this.order.splice(this.order.indexOf(r),1),this},U.prototype.setMaxSize=function(t){for(this.max=t;this.order.length>this.max;){var e=this._getAndRemoveByKey(this.order[0]);e&&this.onRemove(e)}return this},U.prototype.filter=function(t){var e=[];for(var r in this.data)for(var i=0,n=this.data[r];i<n.length;i+=1){var o=n[i];t(o.value)||e.push(o)}for(var a=0,s=e;a<s.length;a+=1){var l=s[a];this.remove(l.value.tileID,l)}};var V=function(t,e,r){this.context=t;var i=t.gl;this.buffer=i.createBuffer(),this.dynamicDraw=Boolean(r),this.context.unbindVAO(),t.bindElementBuffer.set(this.buffer),i.bufferData(i.ELEMENT_ARRAY_BUFFER,e.arrayBuffer,this.dynamicDraw?i.DYNAMIC_DRAW:i.STATIC_DRAW),this.dynamicDraw||delete e.arrayBuffer};V.prototype.bind=function(){this.context.bindElementBuffer.set(this.buffer)},V.prototype.updateData=function(t){var e=this.context.gl;this.context.unbindVAO(),this.bind(),e.bufferSubData(e.ELEMENT_ARRAY_BUFFER,0,t.arrayBuffer)},V.prototype.destroy=function(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)};var N={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"},j=function(t,e,r,i){this.length=e.length,this.attributes=r,this.itemSize=e.bytesPerElement,this.dynamicDraw=i,this.context=t;var n=t.gl;this.buffer=n.createBuffer(),t.bindVertexBuffer.set(this.buffer),n.bufferData(n.ARRAY_BUFFER,e.arrayBuffer,this.dynamicDraw?n.DYNAMIC_DRAW:n.STATIC_DRAW),this.dynamicDraw||delete e.arrayBuffer};j.prototype.bind=function(){this.context.bindVertexBuffer.set(this.buffer)},j.prototype.updateData=function(t){var e=this.context.gl;this.bind(),e.bufferSubData(e.ARRAY_BUFFER,0,t.arrayBuffer)},j.prototype.enableAttributes=function(t,e){for(var r=0;r<this.attributes.length;r++){var i=e.attributes[this.attributes[r].name];void 0!==i&&t.enableVertexAttribArray(i)}},j.prototype.setVertexAttribPointers=function(t,e,r){for(var i=0;i<this.attributes.length;i++){var n=this.attributes[i],o=e.attributes[n.name];void 0!==o&&t.vertexAttribPointer(o,n.components,t[N[n.type]],!1,this.itemSize,n.offset+this.itemSize*(r||0))}},j.prototype.destroy=function(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)};var q=function(t){this.gl=t.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1};q.prototype.get=function(){return this.current},q.prototype.set=function(t){},q.prototype.getDefault=function(){return this.default},q.prototype.setDefault=function(){this.set(this.default)};var Z=function(e){function r(){e.apply(this,arguments)}return e&&(r.__proto__=e),(r.prototype=Object.create(e&&e.prototype)).constructor=r,r.prototype.getDefault=function(){return t.Color.transparent},r.prototype.set=function(t){var e=this.current;(t.r!==e.r||t.g!==e.g||t.b!==e.b||t.a!==e.a||this.dirty)&&(this.gl.clearColor(t.r,t.g,t.b,t.a),this.current=t,this.dirty=!1)},r}(q),G=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getDefault=function(){return 1},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.clearDepth(t),this.current=t,this.dirty=!1)},e}(q),X=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getDefault=function(){return 0},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.clearStencil(t),this.current=t,this.dirty=!1)},e}(q),W=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getDefault=function(){return[!0,!0,!0,!0]},e.prototype.set=function(t){var e=this.current;(t[0]!==e[0]||t[1]!==e[1]||t[2]!==e[2]||t[3]!==e[3]||this.dirty)&&(this.gl.colorMask(t[0],t[1],t[2],t[3]),this.current=t,this.dirty=!1)},e}(q),K=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getDefault=function(){return!0},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.depthMask(t),this.current=t,this.dirty=!1)},e}(q),H=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getDefault=function(){return 255},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.stencilMask(t),this.current=t,this.dirty=!1)},e}(q),J=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getDefault=function(){return{func:this.gl.ALWAYS,ref:0,mask:255}},e.prototype.set=function(t){var e=this.current;(t.func!==e.func||t.ref!==e.ref||t.mask!==e.mask||this.dirty)&&(this.gl.stencilFunc(t.func,t.ref,t.mask),this.current=t,this.dirty=!1)},e}(q),Y=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getDefault=function(){var t=this.gl;return[t.KEEP,t.KEEP,t.KEEP]},e.prototype.set=function(t){var e=this.current;(t[0]!==e[0]||t[1]!==e[1]||t[2]!==e[2]||this.dirty)&&(this.gl.stencilOp(t[0],t[1],t[2]),this.current=t,this.dirty=!1)},e}(q),Q=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getDefault=function(){return!1},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;t?e.enable(e.STENCIL_TEST):e.disable(e.STENCIL_TEST),this.current=t,this.dirty=!1}},e}(q),$=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getDefault=function(){return[0,1]},e.prototype.set=function(t){var e=this.current;(t[0]!==e[0]||t[1]!==e[1]||this.dirty)&&(this.gl.depthRange(t[0],t[1]),this.current=t,this.dirty=!1)},e}(q),tt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getDefault=function(){return!1},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;t?e.enable(e.DEPTH_TEST):e.disable(e.DEPTH_TEST),this.current=t,this.dirty=!1}},e}(q),et=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getDefault=function(){return this.gl.LESS},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.depthFunc(t),this.current=t,this.dirty=!1)},e}(q),rt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getDefault=function(){return!1},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;t?e.enable(e.BLEND):e.disable(e.BLEND),this.current=t,this.dirty=!1}},e}(q),it=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getDefault=function(){var t=this.gl;return[t.ONE,t.ZERO]},e.prototype.set=function(t){var e=this.current;(t[0]!==e[0]||t[1]!==e[1]||this.dirty)&&(this.gl.blendFunc(t[0],t[1]),this.current=t,this.dirty=!1)},e}(q),nt=function(e){function r(){e.apply(this,arguments)}return e&&(r.__proto__=e),(r.prototype=Object.create(e&&e.prototype)).constructor=r,r.prototype.getDefault=function(){return t.Color.transparent},r.prototype.set=function(t){var e=this.current;(t.r!==e.r||t.g!==e.g||t.b!==e.b||t.a!==e.a||this.dirty)&&(this.gl.blendColor(t.r,t.g,t.b,t.a),this.current=t,this.dirty=!1)},r}(q),ot=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getDefault=function(){return this.gl.FUNC_ADD},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.blendEquation(t),this.current=t,this.dirty=!1)},e}(q),at=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getDefault=function(){return!1},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;t?e.enable(e.CULL_FACE):e.disable(e.CULL_FACE),this.current=t,this.dirty=!1}},e}(q),st=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getDefault=function(){return this.gl.BACK},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.cullFace(t),this.current=t,this.dirty=!1)},e}(q),lt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getDefault=function(){return this.gl.CCW},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.frontFace(t),this.current=t,this.dirty=!1)},e}(q),ut=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getDefault=function(){return null},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.useProgram(t),this.current=t,this.dirty=!1)},e}(q),ct=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getDefault=function(){return this.gl.TEXTURE0},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.activeTexture(t),this.current=t,this.dirty=!1)},e}(q),pt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getDefault=function(){var t=this.gl;return[0,0,t.drawingBufferWidth,t.drawingBufferHeight]},e.prototype.set=function(t){var e=this.current;(t[0]!==e[0]||t[1]!==e[1]||t[2]!==e[2]||t[3]!==e[3]||this.dirty)&&(this.gl.viewport(t[0],t[1],t[2],t[3]),this.current=t,this.dirty=!1)},e}(q),ht=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getDefault=function(){return null},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;e.bindFramebuffer(e.FRAMEBUFFER,t),this.current=t,this.dirty=!1}},e}(q),ft=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getDefault=function(){return null},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;e.bindRenderbuffer(e.RENDERBUFFER,t),this.current=t,this.dirty=!1}},e}(q),dt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getDefault=function(){return null},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;e.bindTexture(e.TEXTURE_2D,t),this.current=t,this.dirty=!1}},e}(q),mt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getDefault=function(){return null},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;e.bindBuffer(e.ARRAY_BUFFER,t),this.current=t,this.dirty=!1}},e}(q),yt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getDefault=function(){return null},e.prototype.set=function(t){var e=this.gl;e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,t),this.current=t,this.dirty=!1},e}(q),gt=function(t){function e(e){t.call(this,e),this.vao=e.extVertexArrayObject}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getDefault=function(){return null},e.prototype.set=function(t){this.vao&&(t!==this.current||this.dirty)&&(this.vao.bindVertexArrayOES(t),this.current=t,this.dirty=!1)},e}(q),_t=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getDefault=function(){return 4},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;e.pixelStorei(e.UNPACK_ALIGNMENT,t),this.current=t,this.dirty=!1}},e}(q),vt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getDefault=function(){return!1},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,t),this.current=t,this.dirty=!1}},e}(q),xt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getDefault=function(){return!1},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,t),this.current=t,this.dirty=!1}},e}(q),bt=function(t){function e(e,r){t.call(this,e),this.context=e,this.parent=r}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getDefault=function(){return null},e}(q),wt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.setDirty=function(){this.dirty=!0},e.prototype.set=function(t){if(t!==this.current||this.dirty){this.context.bindFramebuffer.set(this.parent);var e=this.gl;e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,t,0),this.current=t,this.dirty=!1}},e}(bt),St=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.set=function(t){if(t!==this.current||this.dirty){this.context.bindFramebuffer.set(this.parent);var e=this.gl;e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.RENDERBUFFER,t),this.current=t,this.dirty=!1}},e}(bt),Tt=function(t,e,r,i){this.context=t,this.width=e,this.height=r;var n=this.framebuffer=t.gl.createFramebuffer();this.colorAttachment=new wt(t,n),i&&(this.depthAttachment=new St(t,n))};Tt.prototype.destroy=function(){var t=this.context.gl,e=this.colorAttachment.get();if(e&&t.deleteTexture(e),this.depthAttachment){var r=this.depthAttachment.get();r&&t.deleteRenderbuffer(r)}t.deleteFramebuffer(this.framebuffer)};var It=function(t,e,r){this.func=t,this.mask=e,this.range=r};It.ReadOnly=!1,It.ReadWrite=!0,It.disabled=new It(519,It.ReadOnly,[0,1]);var Et=function(t,e,r,i,n,o){this.test=t,this.ref=e,this.mask=r,this.fail=i,this.depthFail=n,this.pass=o};Et.disabled=new Et({func:519,mask:0},0,0,7680,7680,7680);var At=function(t,e,r){this.blendFunction=t,this.blendColor=e,this.mask=r};At.disabled=new At(At.Replace=[1,0],t.Color.transparent,[!1,!1,!1,!1]),At.unblended=new At(At.Replace,t.Color.transparent,[!0,!0,!0,!0]),At.alphaBlended=new At([1,771],t.Color.transparent,[!0,!0,!0,!0]);var zt=function(t,e,r){this.enable=t,this.mode=e,this.frontFace=r};zt.disabled=new zt(!1,1029,2305),zt.backCCW=new zt(!0,1029,2305);var Pt=function(t){this.gl=t,this.extVertexArrayObject=this.gl.getExtension("OES_vertex_array_object"),this.clearColor=new Z(this),this.clearDepth=new G(this),this.clearStencil=new X(this),this.colorMask=new W(this),this.depthMask=new K(this),this.stencilMask=new H(this),this.stencilFunc=new J(this),this.stencilOp=new Y(this),this.stencilTest=new Q(this),this.depthRange=new $(this),this.depthTest=new tt(this),this.depthFunc=new et(this),this.blend=new rt(this),this.blendFunc=new it(this),this.blendColor=new nt(this),this.blendEquation=new ot(this),this.cullFace=new at(this),this.cullFaceSide=new st(this),this.frontFace=new lt(this),this.program=new ut(this),this.activeTexture=new ct(this),this.viewport=new pt(this),this.bindFramebuffer=new ht(this),this.bindRenderbuffer=new ft(this),this.bindTexture=new dt(this),this.bindVertexBuffer=new mt(this),this.bindElementBuffer=new yt(this),this.bindVertexArrayOES=this.extVertexArrayObject&&new gt(this),this.pixelStoreUnpack=new _t(this),this.pixelStoreUnpackPremultiplyAlpha=new vt(this),this.pixelStoreUnpackFlipY=new xt(this),this.extTextureFilterAnisotropic=t.getExtension("EXT_texture_filter_anisotropic")||t.getExtension("MOZ_EXT_texture_filter_anisotropic")||t.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=t.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.extTextureHalfFloat=t.getExtension("OES_texture_half_float"),this.extTextureHalfFloat&&(t.getExtension("OES_texture_half_float_linear"),this.extRenderToTextureHalfFloat=t.getExtension("EXT_color_buffer_half_float")),this.extTimerQuery=t.getExtension("EXT_disjoint_timer_query")};Pt.prototype.setDefault=function(){this.unbindVAO(),this.clearColor.setDefault(),this.clearDepth.setDefault(),this.clearStencil.setDefault(),this.colorMask.setDefault(),this.depthMask.setDefault(),this.stencilMask.setDefault(),this.stencilFunc.setDefault(),this.stencilOp.setDefault(),this.stencilTest.setDefault(),this.depthRange.setDefault(),this.depthTest.setDefault(),this.depthFunc.setDefault(),this.blend.setDefault(),this.blendFunc.setDefault(),this.blendColor.setDefault(),this.blendEquation.setDefault(),this.cullFace.setDefault(),this.cullFaceSide.setDefault(),this.frontFace.setDefault(),this.program.setDefault(),this.activeTexture.setDefault(),this.bindFramebuffer.setDefault(),this.pixelStoreUnpack.setDefault(),this.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.pixelStoreUnpackFlipY.setDefault()},Pt.prototype.setDirty=function(){this.clearColor.dirty=!0,this.clearDepth.dirty=!0,this.clearStencil.dirty=!0,this.colorMask.dirty=!0,this.depthMask.dirty=!0,this.stencilMask.dirty=!0,this.stencilFunc.dirty=!0,this.stencilOp.dirty=!0,this.stencilTest.dirty=!0,this.depthRange.dirty=!0,this.depthTest.dirty=!0,this.depthFunc.dirty=!0,this.blend.dirty=!0,this.blendFunc.dirty=!0,this.blendColor.dirty=!0,this.blendEquation.dirty=!0,this.cullFace.dirty=!0,this.cullFaceSide.dirty=!0,this.frontFace.dirty=!0,this.program.dirty=!0,this.activeTexture.dirty=!0,this.viewport.dirty=!0,this.bindFramebuffer.dirty=!0,this.bindRenderbuffer.dirty=!0,this.bindTexture.dirty=!0,this.bindVertexBuffer.dirty=!0,this.bindElementBuffer.dirty=!0,this.extVertexArrayObject&&(this.bindVertexArrayOES.dirty=!0),this.pixelStoreUnpack.dirty=!0,this.pixelStoreUnpackPremultiplyAlpha.dirty=!0,this.pixelStoreUnpackFlipY.dirty=!0},Pt.prototype.createIndexBuffer=function(t,e){return new V(this,t,e)},Pt.prototype.createVertexBuffer=function(t,e,r){return new j(this,t,e,r)},Pt.prototype.createRenderbuffer=function(t,e,r){var i=this.gl,n=i.createRenderbuffer();return this.bindRenderbuffer.set(n),i.renderbufferStorage(i.RENDERBUFFER,t,e,r),this.bindRenderbuffer.set(null),n},Pt.prototype.createFramebuffer=function(t,e,r){return new Tt(this,t,e,r)},Pt.prototype.clear=function(t){var e=t.color,r=t.depth,i=this.gl,n=0;e&&(n|=i.COLOR_BUFFER_BIT,this.clearColor.set(e),this.colorMask.set([!0,!0,!0,!0])),void 0!==r&&(n|=i.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(r),this.depthMask.set(!0)),i.clear(n)},Pt.prototype.setCullFace=function(t){!1===t.enable?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(t.mode),this.frontFace.set(t.frontFace))},Pt.prototype.setDepthMode=function(t){t.func!==this.gl.ALWAYS||t.mask?(this.depthTest.set(!0),this.depthFunc.set(t.func),this.depthMask.set(t.mask),this.depthRange.set(t.range)):this.depthTest.set(!1)},Pt.prototype.setStencilMode=function(t){t.test.func!==this.gl.ALWAYS||t.mask?(this.stencilTest.set(!0),this.stencilMask.set(t.mask),this.stencilOp.set([t.fail,t.depthFail,t.pass]),this.stencilFunc.set({func:t.test.func,ref:t.ref,mask:t.test.mask})):this.stencilTest.set(!1)},Pt.prototype.setColorMode=function(e){t.deepEqual(e.blendFunction,At.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(e.blendFunction),this.blendColor.set(e.blendColor)),this.colorMask.set(e.mask)},Pt.prototype.unbindVAO=function(){this.extVertexArrayObject&&this.bindVertexArrayOES.set(null)};var Ct=function(e){function r(r,i,n){var o=this;e.call(this),this.id=r,this.dispatcher=n,this.on("data",function(t){"source"===t.dataType&&"metadata"===t.sourceDataType&&(o._sourceLoaded=!0),o._sourceLoaded&&!o._paused&&"source"===t.dataType&&"content"===t.sourceDataType&&(o.reload(),o.transform&&o.update(o.transform))}),this.on("error",function(){o._sourceErrored=!0}),this._source=function(e,r,i,n){var o=new R[r.type](e,r,i,n);if(o.id!==e)throw new Error("Expected Source id to be "+e+" instead of "+o.id);return t.bindAll(["load","abort","unload","serialize","prepare"],o),o}(r,i,n,this),this._tiles={},this._cache=new U(0,this._unloadTile.bind(this)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new t.SourceFeatureState}return e&&(r.__proto__=e),(r.prototype=Object.create(e&&e.prototype)).constructor=r,r.prototype.onAdd=function(t){this.map=t,this._maxTileCacheSize=t?t._maxTileCacheSize:null,this._source&&this._source.onAdd&&this._source.onAdd(t)},r.prototype.onRemove=function(t){this._source&&this._source.onRemove&&this._source.onRemove(t)},r.prototype.loaded=function(){if(this._sourceErrored)return!0;if(!this._sourceLoaded)return!1;if(!this._source.loaded())return!1;for(var t in this._tiles){var e=this._tiles[t];if("loaded"!==e.state&&"errored"!==e.state)return!1}return!0},r.prototype.getSource=function(){return this._source},r.prototype.pause=function(){this._paused=!0},r.prototype.resume=function(){if(this._paused){var t=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,t&&this.reload(),this.transform&&this.update(this.transform)}},r.prototype._loadTile=function(t,e){return this._source.loadTile(t,e)},r.prototype._unloadTile=function(t){if(this._source.unloadTile)return this._source.unloadTile(t,function(){})},r.prototype._abortTile=function(t){if(this._source.abortTile)return this._source.abortTile(t,function(){})},r.prototype.serialize=function(){return this._source.serialize()},r.prototype.prepare=function(t){for(var e in this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null),this._tiles){var r=this._tiles[e];r.upload(t),r.prepare(this.map.style.imageManager)}},r.prototype.getIds=function(){return t.values(this._tiles).map(function(t){return t.tileID}).sort(kt).map(function(t){return t.key})},r.prototype.getRenderableIds=function(e){var r=this,i=[];for(var n in this._tiles)this._isIdRenderable(n,e)&&i.push(this._tiles[n]);return e?i.sort(function(e,i){var n=e.tileID,o=i.tileID,a=new t.Point(n.canonical.x,n.canonical.y)._rotate(r.transform.angle),s=new t.Point(o.canonical.x,o.canonical.y)._rotate(r.transform.angle);return n.overscaledZ-o.overscaledZ||s.y-a.y||s.x-a.x}).map(function(t){return t.tileID.key}):i.map(function(t){return t.tileID}).sort(kt).map(function(t){return t.key})},r.prototype.hasRenderableParent=function(t){var e=this.findLoadedParent(t,0);return!!e&&this._isIdRenderable(e.tileID.key)},r.prototype._isIdRenderable=function(t,e){return this._tiles[t]&&this._tiles[t].hasData()&&!this._coveredTiles[t]&&(e||!this._tiles[t].holdingForFade())},r.prototype.reload=function(){if(this._paused)this._shouldReloadOnResume=!0;else for(var t in this._cache.reset(),this._tiles)"errored"!==this._tiles[t].state&&this._reloadTile(t,"reloading")},r.prototype._reloadTile=function(t,e){var r=this._tiles[t];r&&("loading"!==r.state&&(r.state=e),this._loadTile(r,this._tileLoaded.bind(this,r,t,e)))},r.prototype._tileLoaded=function(e,r,i,n){if(n)return e.state="errored",void(404!==n.status?this._source.fire(new t.ErrorEvent(n,{tile:e})):this.update(this.transform));e.timeAdded=t.browser.now(),"expired"===i&&(e.refreshedUponExpiration=!0),this._setTileReloadTimer(r,e),"raster-dem"===this.getSource().type&&e.dem&&this._backfillDEM(e),this._state.initializeTileState(e,this.map?this.map.painter:null),this._source.fire(new t.Event("data",{dataType:"source",tile:e,coord:e.tileID}))},r.prototype._backfillDEM=function(t){for(var e=this.getRenderableIds(),r=0;r<e.length;r++){var i=e[r];if(t.neighboringTiles&&t.neighboringTiles[i]){var n=this.getTileByID(i);o(t,n),o(n,t)}}function o(t,e){t.needsHillshadePrepare=!0;var r=e.tileID.canonical.x-t.tileID.canonical.x,i=e.tileID.canonical.y-t.tileID.canonical.y,n=Math.pow(2,t.tileID.canonical.z),o=e.tileID.key;0===r&&0===i||Math.abs(i)>1||(Math.abs(r)>1&&(1===Math.abs(r+n)?r+=n:1===Math.abs(r-n)&&(r-=n)),e.dem&&t.dem&&(t.dem.backfillBorder(e.dem,r,i),t.neighboringTiles&&t.neighboringTiles[o]&&(t.neighboringTiles[o].backfilled=!0)))}},r.prototype.getTile=function(t){return this.getTileByID(t.key)},r.prototype.getTileByID=function(t){return this._tiles[t]},r.prototype._retainLoadedChildren=function(t,e,r,i){for(var n in this._tiles){var o=this._tiles[n];if(!(i[n]||!o.hasData()||o.tileID.overscaledZ<=e||o.tileID.overscaledZ>r)){for(var a=o.tileID;o&&o.tileID.overscaledZ>e+1;){var s=o.tileID.scaledTo(o.tileID.overscaledZ-1);(o=this._tiles[s.key])&&o.hasData()&&(a=s)}for(var l=a;l.overscaledZ>e;)if(t[(l=l.scaledTo(l.overscaledZ-1)).key]){i[a.key]=a;break}}}},r.prototype.findLoadedParent=function(t,e){if(t.key in this._loadedParentTiles){var r=this._loadedParentTiles[t.key];return r&&r.tileID.overscaledZ>=e?r:null}for(var i=t.overscaledZ-1;i>=e;i--){var n=t.scaledTo(i),o=this._getLoadedTile(n);if(o)return o}},r.prototype._getLoadedTile=function(t){var e=this._tiles[t.key];return e&&e.hasData()?e:this._cache.getByKey(t.wrapped().key)},r.prototype.updateCacheSize=function(t){var e=Math.ceil(t.width/this._source.tileSize)+1,r=Math.ceil(t.height/this._source.tileSize)+1,i=Math.floor(e*r*5),n="number"==typeof this._maxTileCacheSize?Math.min(this._maxTileCacheSize,i):i;this._cache.setMaxSize(n)},r.prototype.handleWrapJump=function(t){var e=Math.round((t-(void 0===this._prevLng?t:this._prevLng))/360);if(this._prevLng=t,e){var r={};for(var i in this._tiles){var n=this._tiles[i];n.tileID=n.tileID.unwrapTo(n.tileID.wrap+e),r[n.tileID.key]=n}for(var o in this._tiles=r,this._timers)clearTimeout(this._timers[o]),delete this._timers[o];for(var a in this._tiles)this._setTileReloadTimer(a,this._tiles[a])}},r.prototype.update=function(e){var i=this;if(this.transform=e,this._sourceLoaded&&!this._paused){var n;this.updateCacheSize(e),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used?this._source.tileID?n=e.getVisibleUnwrappedCoordinates(this._source.tileID).map(function(e){return new t.OverscaledTileID(e.canonical.z,e.wrap,e.canonical.z,e.canonical.x,e.canonical.y)}):(n=e.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&&(n=n.filter(function(t){return i._source.hasTile(t)}))):n=[];var o=e.coveringZoomLevel(this._source),a=Math.max(o-r.maxOverzooming,this._source.minzoom),s=Math.max(o+r.maxUnderzooming,this._source.minzoom),l=this._updateRetainedTiles(n,o);if(Mt(this._source.type)){for(var u={},c={},p=0,h=Object.keys(l);p<h.length;p+=1){var f=h[p],d=l[f],m=this._tiles[f];if(m&&!(m.fadeEndTime&&m.fadeEndTime<=t.browser.now())){var y=this.findLoadedParent(d,a);y&&(this._addTile(y.tileID),u[y.tileID.key]=y.tileID),c[f]=d}}for(var g in this._retainLoadedChildren(c,o,s,l),u)l[g]||(this._coveredTiles[g]=!0,l[g]=u[g])}for(var _ in l)this._tiles[_].clearFadeHold();for(var v=0,x=t.keysDifference(this._tiles,l);v<x.length;v+=1){var b=x[v],w=this._tiles[b];w.hasSymbolBuckets&&!w.holdingForFade()?w.setHoldDuration(this.map._fadeDuration):w.hasSymbolBuckets&&!w.symbolFadeFinished()||this._removeTile(b)}this._updateLoadedParentTileCache()}},r.prototype.releaseSymbolFadeTiles=function(){for(var t in this._tiles)this._tiles[t].holdingForFade()&&this._removeTile(t)},r.prototype._updateRetainedTiles=function(t,e){for(var i={},n={},o=Math.max(e-r.maxOverzooming,this._source.minzoom),a=Math.max(e+r.maxUnderzooming,this._source.minzoom),s={},l=0,u=t;l<u.length;l+=1){var c=u[l],p=this._addTile(c);i[c.key]=c,p.hasData()||e<this._source.maxzoom&&(s[c.key]=c)}this._retainLoadedChildren(s,e,a,i);for(var h=0,f=t;h<f.length;h+=1){var d=f[h],m=this._tiles[d.key];if(!m.hasData()){if(e+1>this._source.maxzoom){var y=d.children(this._source.maxzoom)[0],g=this.getTile(y);if(g&&g.hasData()){i[y.key]=y;continue}}else{var _=d.children(this._source.maxzoom);if(i[_[0].key]&&i[_[1].key]&&i[_[2].key]&&i[_[3].key])continue}for(var v=m.wasRequested(),x=d.overscaledZ-1;x>=o;--x){var b=d.scaledTo(x);if(n[b.key])break;if(n[b.key]=!0,!(m=this.getTile(b))&&v&&(m=this._addTile(b)),m&&(i[b.key]=b,v=m.wasRequested(),m.hasData()))break}}}return i},r.prototype._updateLoadedParentTileCache=function(){for(var t in this._loadedParentTiles={},this._tiles){for(var e=[],r=void 0,i=this._tiles[t].tileID;i.overscaledZ>0;){if(i.key in this._loadedParentTiles){r=this._loadedParentTiles[i.key];break}e.push(i.key);var n=i.scaledTo(i.overscaledZ-1);if(r=this._getLoadedTile(n))break;i=n}for(var o=0,a=e;o<a.length;o+=1)this._loadedParentTiles[a[o]]=r}},r.prototype._addTile=function(e){var r=this._tiles[e.key];if(r)return r;(r=this._cache.getAndRemove(e))&&(this._setTileReloadTimer(e.key,r),r.tileID=e,this._state.initializeTileState(r,this.map?this.map.painter:null),this._cacheTimers[e.key]&&(clearTimeout(this._cacheTimers[e.key]),delete this._cacheTimers[e.key],this._setTileReloadTimer(e.key,r)));var i=Boolean(r);return i||(r=new t.Tile(e,this._source.tileSize*e.overscaleFactor()),this._loadTile(r,this._tileLoaded.bind(this,r,e.key,r.state))),r?(r.uses++,this._tiles[e.key]=r,i||this._source.fire(new t.Event("dataloading",{tile:r,coord:r.tileID,dataType:"source"})),r):null},r.prototype._setTileReloadTimer=function(t,e){var r=this;t in this._timers&&(clearTimeout(this._timers[t]),delete this._timers[t]);var i=e.getExpiryTimeout();i&&(this._timers[t]=setTimeout(function(){r._reloadTile(t,"expired"),delete r._timers[t]},i))},r.prototype._removeTile=function(t){var e=this._tiles[t];e&&(e.uses--,delete this._tiles[t],this._timers[t]&&(clearTimeout(this._timers[t]),delete this._timers[t]),e.uses>0||(e.hasData()&&"reloading"!==e.state?this._cache.add(e.tileID,e,e.getExpiryTimeout()):(e.aborted=!0,this._abortTile(e),this._unloadTile(e))))},r.prototype.clearTiles=function(){for(var t in this._shouldReloadOnResume=!1,this._paused=!1,this._tiles)this._removeTile(t);this._cache.reset()},r.prototype.tilesIn=function(e,r,i){var n=this,o=[],a=this.transform;if(!a)return o;for(var s=i?a.getCameraQueryGeometry(e):e,l=e.map(function(t){return a.pointCoordinate(t)}),u=s.map(function(t){return a.pointCoordinate(t)}),c=this.getIds(),p=1/0,h=1/0,f=-1/0,d=-1/0,m=0,y=u;m<y.length;m+=1){var g=y[m];p=Math.min(p,g.x),h=Math.min(h,g.y),f=Math.max(f,g.x),d=Math.max(d,g.y)}for(var _=function(e){var i=n._tiles[c[e]];if(!i.holdingForFade()){var s=i.tileID,m=Math.pow(2,a.zoom-i.tileID.overscaledZ),y=r*i.queryPadding*t.EXTENT/i.tileSize/m,g=[s.getTilePoint(new t.MercatorCoordinate(p,h)),s.getTilePoint(new t.MercatorCoordinate(f,d))];if(g[0].x-y<t.EXTENT&&g[0].y-y<t.EXTENT&&g[1].x+y>=0&&g[1].y+y>=0){var _=l.map(function(t){return s.getTilePoint(t)}),v=u.map(function(t){return s.getTilePoint(t)});o.push({tile:i,tileID:s,queryGeometry:_,cameraQueryGeometry:v,scale:m})}}},v=0;v<c.length;v++)_(v);return o},r.prototype.getVisibleCoordinates=function(t){for(var e=this,r=this.getRenderableIds(t).map(function(t){return e._tiles[t].tileID}),i=0,n=r;i<n.length;i+=1){var o=n[i];o.posMatrix=this.transform.calculatePosMatrix(o.toUnwrapped())}return r},r.prototype.hasTransition=function(){if(this._source.hasTransition())return!0;if(Mt(this._source.type))for(var e in this._tiles){var r=this._tiles[e];if(void 0!==r.fadeEndTime&&r.fadeEndTime>=t.browser.now())return!0}return!1},r.prototype.setFeatureState=function(t,e,r){this._state.updateState(t=t||"_geojsonTileLayer",e,r)},r.prototype.removeFeatureState=function(t,e,r){this._state.removeFeatureState(t=t||"_geojsonTileLayer",e,r)},r.prototype.getFeatureState=function(t,e){return this._state.getState(t=t||"_geojsonTileLayer",e)},r.prototype.setDependencies=function(t,e,r){var i=this._tiles[t];i&&i.setDependencies(e,r)},r.prototype.reloadTilesForDependencies=function(t,e){for(var r in this._tiles)this._tiles[r].hasDependency(t,e)&&this._reloadTile(r,"reloading");this._cache.filter(function(r){return!r.hasDependency(t,e)})},r}(t.Evented);function kt(t,e){var r=Math.abs(2*t.wrap)-+(t.wrap<0),i=Math.abs(2*e.wrap)-+(e.wrap<0);return t.overscaledZ-e.overscaledZ||i-r||e.canonical.y-t.canonical.y||e.canonical.x-t.canonical.x}function Mt(t){return"raster"===t||"image"===t||"video"===t}function Dt(){return new t.window.Worker(Xn.workerUrl)}Ct.maxOverzooming=10,Ct.maxUnderzooming=3;var Lt="mapboxgl_preloaded_worker_pool",Rt=function(){this.active={}};Rt.prototype.acquire=function(t){if(!this.workers)for(this.workers=[];this.workers.length<Rt.workerCount;)this.workers.push(new Dt);return this.active[t]=!0,this.workers.slice()},Rt.prototype.release=function(t){delete this.active[t],0===this.numActive()&&(this.workers.forEach(function(t){t.terminate()}),this.workers=null)},Rt.prototype.isPreloaded=function(){return!!this.active[Lt]},Rt.prototype.numActive=function(){return Object.keys(this.active).length};var Bt,Ft=Math.floor(t.browser.hardwareConcurrency/2);function Ot(){return Bt||(Bt=new Rt),Bt}function Ut(e,r){var i={};for(var n in e)"ref"!==n&&(i[n]=e[n]);return t.refProperties.forEach(function(t){t in r&&(i[t]=r[t])}),i}function Vt(t){t=t.slice();for(var e=Object.create(null),r=0;r<t.length;r++)e[t[r].id]=t[r];for(var i=0;i<t.length;i++)"ref"in t[i]&&(t[i]=Ut(t[i],e[t[i].ref]));return t}Rt.workerCount=Math.max(Math.min(Ft,6),1);var Nt={setStyle:"setStyle",addLayer:"addLayer",removeLayer:"removeLayer",setPaintProperty:"setPaintProperty",setLayoutProperty:"setLayoutProperty",setFilter:"setFilter",addSource:"addSource",removeSource:"removeSource",setGeoJSONSourceData:"setGeoJSONSourceData",setLayerZoomRange:"setLayerZoomRange",setLayerProperty:"setLayerProperty",setCenter:"setCenter",setZoom:"setZoom",setBearing:"setBearing",setPitch:"setPitch",setSprite:"setSprite",setGlyphs:"setGlyphs",setTransition:"setTransition",setLight:"setLight"};function jt(t,e,r){r.push({command:Nt.addSource,args:[t,e[t]]})}function qt(t,e,r){e.push({command:Nt.removeSource,args:[t]}),r[t]=!0}function Zt(t,e,r,i){qt(t,r,i),jt(t,e,r)}function Gt(e,r,i){var n;for(n in e[i])if(e[i].hasOwnProperty(n)&&"data"!==n&&!t.deepEqual(e[i][n],r[i][n]))return!1;for(n in r[i])if(r[i].hasOwnProperty(n)&&"data"!==n&&!t.deepEqual(e[i][n],r[i][n]))return!1;return!0}function Xt(e,r,i,n,o,a){var s;for(s in r=r||{},e=e||{})e.hasOwnProperty(s)&&(t.deepEqual(e[s],r[s])||i.push({command:a,args:[n,s,r[s],o]}));for(s in r)r.hasOwnProperty(s)&&!e.hasOwnProperty(s)&&(t.deepEqual(e[s],r[s])||i.push({command:a,args:[n,s,r[s],o]}))}function Wt(t){return t.id}function Kt(t,e){return t[e.id]=e,t}var Ht=function(t,e){this.reset(t,e)};Ht.prototype.reset=function(t,e){this.points=t||[],this._distances=[0];for(var r=1;r<this.points.length;r++)this._distances[r]=this._distances[r-1]+this.points[r].dist(this.points[r-1]);this.length=this._distances[this._distances.length-1],this.padding=Math.min(e||0,.5*this.length),this.paddedLength=this.length-2*this.padding},Ht.prototype.lerp=function(e){if(1===this.points.length)return this.points[0];e=t.clamp(e,0,1);for(var r=1,i=this._distances[r],n=e*this.paddedLength+this.padding;i<n&&r<this._distances.length;)i=this._distances[++r];var o=r-1,a=this._distances[o],s=i-a,l=s>0?(n-a)/s:0;return this.points[o].mult(1-l).add(this.points[r].mult(l))};var Jt=function(t,e,r){var i=this.boxCells=[],n=this.circleCells=[];this.xCellCount=Math.ceil(t/r),this.yCellCount=Math.ceil(e/r);for(var o=0;o<this.xCellCount*this.yCellCount;o++)i.push([]),n.push([]);this.circleKeys=[],this.boxKeys=[],this.bboxes=[],this.circles=[],this.width=t,this.height=e,this.xScale=this.xCellCount/t,this.yScale=this.yCellCount/e,this.boxUid=0,this.circleUid=0};function Yt(e,r,i,n,o){var a=t.create();return r?(t.scale(a,a,[1/o,1/o,1]),i||t.rotateZ(a,a,n.angle)):t.multiply(a,n.labelPlaneMatrix,e),a}function Qt(e,r,i,n,o){if(r){var a=t.clone(e);return t.scale(a,a,[o,o,1]),i||t.rotateZ(a,a,-n.angle),a}return n.glCoordMatrix}function $t(e,r){var i=[e.x,e.y,0,1];ce(i,i,r);var n=i[3];return{point:new t.Point(i[0]/n,i[1]/n),signedDistanceFromCamera:n}}function te(t,e){return.5+t/e*.5}function ee(t,e){var r=t[0]/t[3],i=t[1]/t[3];return r>=-e[0]&&r<=e[0]&&i>=-e[1]&&i<=e[1]}function re(e,r,i,n,o,a,s,l){var u=n?e.textSizeData:e.iconSizeData,c=t.evaluateSizeForZoom(u,i.transform.zoom),p=[256/i.width*2+1,256/i.height*2+1],h=n?e.text.dynamicLayoutVertexArray:e.icon.dynamicLayoutVertexArray;h.clear();for(var f=e.lineVertexArray,d=n?e.text.placedSymbolArray:e.icon.placedSymbolArray,m=i.transform.width/i.transform.height,y=!1,g=0;g<d.length;g++){var _=d.get(g);if(_.hidden||_.writingMode===t.WritingMode.vertical&&!y)ue(_.numGlyphs,h);else{y=!1;var v=[_.anchorX,_.anchorY,0,1];if(t.transformMat4(v,v,r),ee(v,p)){var x=te(i.transform.cameraToCenterDistance,v[3]),b=t.evaluateSizeForFeature(u,c,_),w=s?b/x:b*x,S=new t.Point(_.anchorX,_.anchorY),T=$t(S,o).point,I={},E=oe(_,w,!1,l,r,o,a,e.glyphOffsetArray,f,h,T,S,I,m);y=E.useVertical,(E.notEnoughRoom||y||E.needsFlipping&&oe(_,w,!0,l,r,o,a,e.glyphOffsetArray,f,h,T,S,I,m).notEnoughRoom)&&ue(_.numGlyphs,h)}else ue(_.numGlyphs,h)}}n?e.text.dynamicLayoutVertexBuffer.updateData(h):e.icon.dynamicLayoutVertexBuffer.updateData(h)}function ie(t,e,r,i,n,o,a,s,l,u,c){var p=s.glyphStartIndex+s.numGlyphs,h=s.lineStartIndex,f=s.lineStartIndex+s.lineLength,d=e.getoffsetX(s.glyphStartIndex),m=e.getoffsetX(p-1),y=se(t*d,r,i,n,o,a,s.segment,h,f,l,u,c);if(!y)return null;var g=se(t*m,r,i,n,o,a,s.segment,h,f,l,u,c);return g?{first:y,last:g}:null}function ne(e,r,i,n){return e===t.WritingMode.horizontal&&Math.abs(i.y-r.y)>Math.abs(i.x-r.x)*n?{useVertical:!0}:(e===t.WritingMode.vertical?r.y<i.y:r.x>i.x)?{needsFlipping:!0}:null}function oe(e,r,i,n,o,a,s,l,u,c,p,h,f,d){var m,y=r/24,g=e.lineOffsetX*y,_=e.lineOffsetY*y;if(e.numGlyphs>1){var v=e.glyphStartIndex+e.numGlyphs,x=e.lineStartIndex,b=e.lineStartIndex+e.lineLength,w=ie(y,l,g,_,i,p,h,e,u,a,f);if(!w)return{notEnoughRoom:!0};var S=$t(w.first.point,s).point,T=$t(w.last.point,s).point;if(n&&!i){var I=ne(e.writingMode,S,T,d);if(I)return I}m=[w.first];for(var E=e.glyphStartIndex+1;E<v-1;E++)m.push(se(y*l.getoffsetX(E),g,_,i,p,h,e.segment,x,b,u,a,f));m.push(w.last)}else{if(n&&!i){var A=$t(h,o).point,z=e.lineStartIndex+e.segment+1,P=new t.Point(u.getx(z),u.gety(z)),C=$t(P,o),k=C.signedDistanceFromCamera>0?C.point:ae(h,P,A,1,o),M=ne(e.writingMode,A,k,d);if(M)return M}var D=se(y*l.getoffsetX(e.glyphStartIndex),g,_,i,p,h,e.segment,e.lineStartIndex,e.lineStartIndex+e.lineLength,u,a,f);if(!D)return{notEnoughRoom:!0};m=[D]}for(var L=0,R=m;L<R.length;L+=1){var B=R[L];t.addDynamicAttributes(c,B.point,B.angle)}return{}}function ae(t,e,r,i,n){var o=$t(t.add(t.sub(e)._unit()),n).point,a=r.sub(o);return r.add(a._mult(i/a.mag()))}function se(e,r,i,n,o,a,s,l,u,c,p,h){var f=n?e-r:e+r,d=f>0?1:-1,m=0;n&&(d*=-1,m=Math.PI),d<0&&(m+=Math.PI);for(var y=d>0?l+s:l+s+1,g=o,_=o,v=0,x=0,b=Math.abs(f),w=[];v+x<=b;){if((y+=d)<l||y>=u)return null;if(_=g,w.push(g),void 0===(g=h[y])){var S=new t.Point(c.getx(y),c.gety(y)),T=$t(S,p);if(T.signedDistanceFromCamera>0)g=h[y]=T.point;else{var I=y-d;g=ae(0===v?a:new t.Point(c.getx(I),c.gety(I)),S,_,b-v+1,p)}}v+=x,x=_.dist(g)}var E=(b-v)/x,A=g.sub(_),z=A.mult(E)._add(_);z._add(A._unit()._perp()._mult(i*d));var P=m+Math.atan2(g.y-_.y,g.x-_.x);return w.push(z),{point:z,angle:P,path:w}}Jt.prototype.keysLength=function(){return this.boxKeys.length+this.circleKeys.length},Jt.prototype.insert=function(t,e,r,i,n){this._forEachCell(e,r,i,n,this._insertBoxCell,this.boxUid++),this.boxKeys.push(t),this.bboxes.push(e),this.bboxes.push(r),this.bboxes.push(i),this.bboxes.push(n)},Jt.prototype.insertCircle=function(t,e,r,i){this._forEachCell(e-i,r-i,e+i,r+i,this._insertCircleCell,this.circleUid++),this.circleKeys.push(t),this.circles.push(e),this.circles.push(r),this.circles.push(i)},Jt.prototype._insertBoxCell=function(t,e,r,i,n,o){this.boxCells[n].push(o)},Jt.prototype._insertCircleCell=function(t,e,r,i,n,o){this.circleCells[n].push(o)},Jt.prototype._query=function(t,e,r,i,n,o){if(r<0||t>this.width||i<0||e>this.height)return!n&&[];var a=[];if(t<=0&&e<=0&&this.width<=r&&this.height<=i){if(n)return!0;for(var s=0;s<this.boxKeys.length;s++)a.push({key:this.boxKeys[s],x1:this.bboxes[4*s],y1:this.bboxes[4*s+1],x2:this.bboxes[4*s+2],y2:this.bboxes[4*s+3]});for(var l=0;l<this.circleKeys.length;l++){var u=this.circles[3*l],c=this.circles[3*l+1],p=this.circles[3*l+2];a.push({key:this.circleKeys[l],x1:u-p,y1:c-p,x2:u+p,y2:c+p})}return o?a.filter(o):a}return this._forEachCell(t,e,r,i,this._queryCell,a,{hitTest:n,seenUids:{box:{},circle:{}}},o),n?a.length>0:a},Jt.prototype._queryCircle=function(t,e,r,i,n){var o=t-r,a=t+r,s=e-r,l=e+r;if(a<0||o>this.width||l<0||s>this.height)return!i&&[];var u=[];return this._forEachCell(o,s,a,l,this._queryCellCircle,u,{hitTest:i,circle:{x:t,y:e,radius:r},seenUids:{box:{},circle:{}}},n),i?u.length>0:u},Jt.prototype.query=function(t,e,r,i,n){return this._query(t,e,r,i,!1,n)},Jt.prototype.hitTest=function(t,e,r,i,n){return this._query(t,e,r,i,!0,n)},Jt.prototype.hitTestCircle=function(t,e,r,i){return this._queryCircle(t,e,r,!0,i)},Jt.prototype._queryCell=function(t,e,r,i,n,o,a,s){var l=a.seenUids,u=this.boxCells[n];if(null!==u)for(var c=this.bboxes,p=0,h=u;p<h.length;p+=1){var f=h[p];if(!l.box[f]){l.box[f]=!0;var d=4*f;if(t<=c[d+2]&&e<=c[d+3]&&r>=c[d+0]&&i>=c[d+1]&&(!s||s(this.boxKeys[f]))){if(a.hitTest)return o.push(!0),!0;o.push({key:this.boxKeys[f],x1:c[d],y1:c[d+1],x2:c[d+2],y2:c[d+3]})}}}var m=this.circleCells[n];if(null!==m)for(var y=this.circles,g=0,_=m;g<_.length;g+=1){var v=_[g];if(!l.circle[v]){l.circle[v]=!0;var x=3*v;if(this._circleAndRectCollide(y[x],y[x+1],y[x+2],t,e,r,i)&&(!s||s(this.circleKeys[v]))){if(a.hitTest)return o.push(!0),!0;var b=y[x],w=y[x+1],S=y[x+2];o.push({key:this.circleKeys[v],x1:b-S,y1:w-S,x2:b+S,y2:w+S})}}}},Jt.prototype._queryCellCircle=function(t,e,r,i,n,o,a,s){var l=a.circle,u=a.seenUids,c=this.boxCells[n];if(null!==c)for(var p=this.bboxes,h=0,f=c;h<f.length;h+=1){var d=f[h];if(!u.box[d]){u.box[d]=!0;var m=4*d;if(this._circleAndRectCollide(l.x,l.y,l.radius,p[m+0],p[m+1],p[m+2],p[m+3])&&(!s||s(this.boxKeys[d])))return o.push(!0),!0}}var y=this.circleCells[n];if(null!==y)for(var g=this.circles,_=0,v=y;_<v.length;_+=1){var x=v[_];if(!u.circle[x]){u.circle[x]=!0;var b=3*x;if(this._circlesCollide(g[b],g[b+1],g[b+2],l.x,l.y,l.radius)&&(!s||s(this.circleKeys[x])))return o.push(!0),!0}}},Jt.prototype._forEachCell=function(t,e,r,i,n,o,a,s){for(var l=this._convertToXCellCoord(t),u=this._convertToYCellCoord(e),c=this._convertToXCellCoord(r),p=this._convertToYCellCoord(i),h=l;h<=c;h++)for(var f=u;f<=p;f++)if(n.call(this,t,e,r,i,this.xCellCount*f+h,o,a,s))return},Jt.prototype._convertToXCellCoord=function(t){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(t*this.xScale)))},Jt.prototype._convertToYCellCoord=function(t){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(t*this.yScale)))},Jt.prototype._circlesCollide=function(t,e,r,i,n,o){var a=i-t,s=n-e,l=r+o;return l*l>a*a+s*s},Jt.prototype._circleAndRectCollide=function(t,e,r,i,n,o,a){var s=(o-i)/2,l=Math.abs(t-(i+s));if(l>s+r)return!1;var u=(a-n)/2,c=Math.abs(e-(n+u));if(c>u+r)return!1;if(l<=s||c<=u)return!0;var p=l-s,h=c-u;return p*p+h*h<=r*r};var le=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function ue(t,e){for(var r=0;r<t;r++){var i=e.length;e.resize(i+4),e.float32.set(le,3*i)}}function ce(t,e,r){var i=e[0],n=e[1];return t[0]=r[0]*i+r[4]*n+r[12],t[1]=r[1]*i+r[5]*n+r[13],t[3]=r[3]*i+r[7]*n+r[15],t}var pe=function(t,e,r){void 0===e&&(e=new Jt(t.width+200,t.height+200,25)),void 0===r&&(r=new Jt(t.width+200,t.height+200,25)),this.transform=t,this.grid=e,this.ignoredGrid=r,this.pitchfactor=Math.cos(t._pitch)*t.cameraToCenterDistance,this.screenRightBoundary=t.width+100,this.screenBottomBoundary=t.height+100,this.gridRightBoundary=t.width+200,this.gridBottomBoundary=t.height+200};function he(e,r,i){return r*(t.EXTENT/(e.tileSize*Math.pow(2,i-e.tileID.overscaledZ)))}pe.prototype.placeCollisionBox=function(t,e,r,i,n){var o=this.projectAndGetPerspectiveRatio(i,t.anchorPointX,t.anchorPointY),a=r*o.perspectiveRatio,s=t.x1*a+o.point.x,l=t.y1*a+o.point.y,u=t.x2*a+o.point.x,c=t.y2*a+o.point.y;return!this.isInsideGrid(s,l,u,c)||!e&&this.grid.hitTest(s,l,u,c,n)?{box:[],offscreen:!1}:{box:[s,l,u,c],offscreen:this.isOffscreen(s,l,u,c)}},pe.prototype.placeCollisionCircles=function(e,r,i,n,o,a,s,l,u,c,p,h,f){var d=[],m=new t.Point(r.anchorX,r.anchorY),y=$t(m,a),g=te(this.transform.cameraToCenterDistance,y.signedDistanceFromCamera),_=(c?o/g:o*g)/t.ONE_EM,v=$t(m,s).point,x=ie(_,n,r.lineOffsetX*_,r.lineOffsetY*_,!1,v,m,r,i,s,{}),b=!1,w=!1,S=!0;if(x){for(var T=.5*h*g+f,I=new t.Point(-100,-100),E=new t.Point(this.screenRightBoundary,this.screenBottomBoundary),A=new Ht,z=x.first,P=x.last,C=[],k=z.path.length-1;k>=1;k--)C.push(z.path[k]);for(var M=1;M<P.path.length;M++)C.push(P.path[M]);var D=2.5*T;if(l){var L=C.map(function(t){return $t(t,l)});C=L.some(function(t){return t.signedDistanceFromCamera<=0})?[]:L.map(function(t){return t.point})}var R=[];if(C.length>0){for(var B=C[0].clone(),F=C[0].clone(),O=1;O<C.length;O++)B.x=Math.min(B.x,C[O].x),B.y=Math.min(B.y,C[O].y),F.x=Math.max(F.x,C[O].x),F.y=Math.max(F.y,C[O].y);R=B.x>=I.x&&F.x<=E.x&&B.y>=I.y&&F.y<=E.y?[C]:F.x<I.x||B.x>E.x||F.y<I.y||B.y>E.y?[]:t.clipLine([C],I.x,I.y,E.x,E.y)}for(var U=0,V=R;U<V.length;U+=1){var N;A.reset(V[U],.25*T),N=A.length<=.5*T?1:Math.ceil(A.paddedLength/D)+1;for(var j=0;j<N;j++){var q=j/Math.max(N-1,1),Z=A.lerp(q),G=Z.x+100,X=Z.y+100;d.push(G,X,T,0);var W=G-T,K=X-T,H=G+T,J=X+T;if(S=S&&this.isOffscreen(W,K,H,J),w=w||this.isInsideGrid(W,K,H,J),!e&&this.grid.hitTestCircle(G,X,T,p)&&(b=!0,!u))return{circles:[],offscreen:!1,collisionDetected:b}}}}return{circles:!u&&b||!w?[]:d,offscreen:S,collisionDetected:b}},pe.prototype.queryRenderedSymbols=function(e){if(0===e.length||0===this.grid.keysLength()&&0===this.ignoredGrid.keysLength())return{};for(var r=[],i=1/0,n=1/0,o=-1/0,a=-1/0,s=0,l=e;s<l.length;s+=1){var u=l[s],c=new t.Point(u.x+100,u.y+100);i=Math.min(i,c.x),n=Math.min(n,c.y),o=Math.max(o,c.x),a=Math.max(a,c.y),r.push(c)}for(var p={},h={},f=0,d=this.grid.query(i,n,o,a).concat(this.ignoredGrid.query(i,n,o,a));f<d.length;f+=1){var m=d[f],y=m.key;if(void 0===p[y.bucketInstanceId]&&(p[y.bucketInstanceId]={}),!p[y.bucketInstanceId][y.featureIndex]){var g=[new t.Point(m.x1,m.y1),new t.Point(m.x2,m.y1),new t.Point(m.x2,m.y2),new t.Point(m.x1,m.y2)];t.polygonIntersectsPolygon(r,g)&&(p[y.bucketInstanceId][y.featureIndex]=!0,void 0===h[y.bucketInstanceId]&&(h[y.bucketInstanceId]=[]),h[y.bucketInstanceId].push(y.featureIndex))}}return h},pe.prototype.insertCollisionBox=function(t,e,r,i,n){(e?this.ignoredGrid:this.grid).insert({bucketInstanceId:r,featureIndex:i,collisionGroupID:n},t[0],t[1],t[2],t[3])},pe.prototype.insertCollisionCircles=function(t,e,r,i,n){for(var o=e?this.ignoredGrid:this.grid,a={bucketInstanceId:r,featureIndex:i,collisionGroupID:n},s=0;s<t.length;s+=4)o.insertCircle(a,t[s],t[s+1],t[s+2])},pe.prototype.projectAndGetPerspectiveRatio=function(e,r,i){var n=[r,i,0,1];return ce(n,n,e),{point:new t.Point((n[0]/n[3]+1)/2*this.transform.width+100,(-n[1]/n[3]+1)/2*this.transform.height+100),perspectiveRatio:.5+this.transform.cameraToCenterDistance/n[3]*.5}},pe.prototype.isOffscreen=function(t,e,r,i){return r<100||t>=this.screenRightBoundary||i<100||e>this.screenBottomBoundary},pe.prototype.isInsideGrid=function(t,e,r,i){return r>=0&&t<this.gridRightBoundary&&i>=0&&e<this.gridBottomBoundary},pe.prototype.getViewportMatrix=function(){var e=t.identity([]);return t.translate(e,e,[-100,-100,0]),e};var fe=function(t,e,r,i){this.opacity=t?Math.max(0,Math.min(1,t.opacity+(t.placed?e:-e))):i&&r?1:0,this.placed=r};fe.prototype.isHidden=function(){return 0===this.opacity&&!this.placed};var de=function(t,e,r,i,n){this.text=new fe(t?t.text:null,e,r,n),this.icon=new fe(t?t.icon:null,e,i,n)};de.prototype.isHidden=function(){return this.text.isHidden()&&this.icon.isHidden()};var me=function(t,e,r){this.text=t,this.icon=e,this.skipFade=r},ye=function(){this.invProjMatrix=t.create(),this.viewportMatrix=t.create(),this.circles=[]},ge=function(t,e,r,i,n){this.bucketInstanceId=t,this.featureIndex=e,this.sourceLayerIndex=r,this.bucketIndex=i,this.tileID=n},_e=function(t){this.crossSourceCollisions=t,this.maxGroupID=0,this.collisionGroups={}};function ve(e,r,i,n,o){var a=t.getAnchorAlignment(e),s=-(a.horizontalAlign-.5)*r,l=-(a.verticalAlign-.5)*i,u=t.evaluateVariableOffset(e,n);return new t.Point(s+u[0]*o,l+u[1]*o)}function xe(e,r,i,n,o,a){var s=e.x1,l=e.x2,u=e.y1,c=e.y2,p=e.anchorPointX,h=e.anchorPointY,f=new t.Point(r,i);return n&&f._rotate(o?a:-a),{x1:s+f.x,y1:u+f.y,x2:l+f.x,y2:c+f.y,anchorPointX:p,anchorPointY:h}}_e.prototype.get=function(t){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[t]){var e=++this.maxGroupID;this.collisionGroups[t]={ID:e,predicate:function(t){return t.collisionGroupID===e}}}return this.collisionGroups[t]};var be=function(t,e,r,i){this.transform=t.clone(),this.collisionIndex=new pe(this.transform),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=e,this.retainedQueryData={},this.collisionGroups=new _e(r),this.collisionCircleArrays={},this.prevPlacement=i,i&&(i.prevPlacement=void 0),this.placedOrientations={}};function we(t,e,r,i,n){t.emplaceBack(e?1:0,r?1:0,i||0,n||0),t.emplaceBack(e?1:0,r?1:0,i||0,n||0),t.emplaceBack(e?1:0,r?1:0,i||0,n||0),t.emplaceBack(e?1:0,r?1:0,i||0,n||0)}be.prototype.getBucketParts=function(e,r,i,n){var o=i.getBucket(r),a=i.latestFeatureIndex;if(o&&a&&r.id===o.layerIds[0]){var s=i.collisionBoxArray,l=o.layers[0].layout,u=Math.pow(2,this.transform.zoom-i.tileID.overscaledZ),c=i.tileSize/t.EXTENT,p=this.transform.calculatePosMatrix(i.tileID.toUnwrapped()),h="map"===l.get("text-pitch-alignment"),f="map"===l.get("text-rotation-alignment"),d=he(i,1,this.transform.zoom),m=Yt(p,h,f,this.transform,d),y=null;if(h){var g=Qt(p,h,f,this.transform,d);y=t.multiply([],this.transform.labelPlaneMatrix,g)}this.retainedQueryData[o.bucketInstanceId]=new ge(o.bucketInstanceId,a,o.sourceLayerIndex,o.index,i.tileID);var _={bucket:o,layout:l,posMatrix:p,textLabelPlaneMatrix:m,labelToScreenMatrix:y,scale:u,textPixelRatio:c,holdingForFade:i.holdingForFade(),collisionBoxArray:s,partiallyEvaluatedTextSize:t.evaluateSizeForZoom(o.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(o.sourceID)};if(n)for(var v=0,x=o.sortKeyRanges;v<x.length;v+=1){var b=x[v];e.push({sortKey:b.sortKey,symbolInstanceStart:b.symbolInstanceStart,symbolInstanceEnd:b.symbolInstanceEnd,parameters:_})}else e.push({symbolInstanceStart:0,symbolInstanceEnd:o.symbolInstances.length,parameters:_})}},be.prototype.attemptAnchorPlacement=function(t,e,r,i,n,o,a,s,l,u,c,p,h,f,d){var m,y=[p.textOffset0,p.textOffset1],g=ve(t,r,i,y,n),_=this.collisionIndex.placeCollisionBox(xe(e,g.x,g.y,o,a,this.transform.angle),c,s,l,u.predicate);if(!d||0!==this.collisionIndex.placeCollisionBox(xe(d,g.x,g.y,o,a,this.transform.angle),c,s,l,u.predicate).box.length)return _.box.length>0?(this.prevPlacement&&this.prevPlacement.variableOffsets[p.crossTileID]&&this.prevPlacement.placements[p.crossTileID]&&this.prevPlacement.placements[p.crossTileID].text&&(m=this.prevPlacement.variableOffsets[p.crossTileID].anchor),this.variableOffsets[p.crossTileID]={textOffset:y,width:r,height:i,anchor:t,textBoxScale:n,prevAnchor:m},this.markUsedJustification(h,t,p,f),h.allowVerticalPlacement&&(this.markUsedOrientation(h,f,p),this.placedOrientations[p.crossTileID]=f),{shift:g,placedGlyphBoxes:_}):void 0},be.prototype.placeLayerBucketPart=function(e,r,i){var n=this,o=e.parameters,a=o.bucket,s=o.layout,l=o.posMatrix,u=o.textLabelPlaneMatrix,c=o.labelToScreenMatrix,p=o.textPixelRatio,h=o.holdingForFade,f=o.collisionBoxArray,d=o.partiallyEvaluatedTextSize,m=o.collisionGroup,y=s.get("text-optional"),g=s.get("icon-optional"),_=s.get("text-allow-overlap"),v=s.get("icon-allow-overlap"),x="map"===s.get("text-rotation-alignment"),b="map"===s.get("text-pitch-alignment"),w="none"!==s.get("icon-text-fit"),S="viewport-y"===s.get("symbol-z-order"),T=_&&(v||!a.hasIconData()||g),I=v&&(_||!a.hasTextData()||y);!a.collisionArrays&&f&&a.deserializeCollisionBoxes(f);var E=function(e,o){if(!r[e.crossTileID])if(h)n.placements[e.crossTileID]=new me(!1,!1,!1);else{var f,S=!1,E=!1,A=!0,z=null,P={box:null,offscreen:null},C={box:null,offscreen:null},k=null,M=null,D=0,L=0,R=0;o.textFeatureIndex?D=o.textFeatureIndex:e.useRuntimeCollisionCircles&&(D=e.featureIndex),o.verticalTextFeatureIndex&&(L=o.verticalTextFeatureIndex);var B=o.textBox;if(B){var F=function(r){var i=t.WritingMode.horizontal;if(a.allowVerticalPlacement&&!r&&n.prevPlacement){var o=n.prevPlacement.placedOrientations[e.crossTileID];o&&(n.placedOrientations[e.crossTileID]=o,n.markUsedOrientation(a,i=o,e))}return i},O=function(r,i){if(a.allowVerticalPlacement&&e.numVerticalGlyphVertices>0&&o.verticalTextBox)for(var n=0,s=a.writingModes;n<s.length&&(s[n]===t.WritingMode.vertical?(P=i(),C=P):P=r(),!(P&&P.box&&P.box.length));n+=1);else P=r()};if(s.get("text-variable-anchor")){var U=s.get("text-variable-anchor");if(n.prevPlacement&&n.prevPlacement.variableOffsets[e.crossTileID]){var V=n.prevPlacement.variableOffsets[e.crossTileID];U.indexOf(V.anchor)>0&&(U=U.filter(function(t){return t!==V.anchor})).unshift(V.anchor)}var N=function(t,r,i){for(var o=t.x2-t.x1,s=t.y2-t.y1,u=e.textBoxScale,c=w&&!v?r:null,h={box:[],offscreen:!1},f=_?2*U.length:U.length,d=0;d<f;++d){var y=n.attemptAnchorPlacement(U[d%U.length],t,o,s,u,x,b,p,l,m,d>=U.length,e,a,i,c);if(y&&(h=y.placedGlyphBoxes)&&h.box&&h.box.length){S=!0,z=y.shift;break}}return h};O(function(){return N(B,o.iconBox,t.WritingMode.horizontal)},function(){var r=o.verticalTextBox;return a.allowVerticalPlacement&&!(P&&P.box&&P.box.length)&&e.numVerticalGlyphVertices>0&&r?N(r,o.verticalIconBox,t.WritingMode.vertical):{box:null,offscreen:null}}),P&&(S=P.box,A=P.offscreen);var j=F(P&&P.box);if(!S&&n.prevPlacement){var q=n.prevPlacement.variableOffsets[e.crossTileID];q&&(n.variableOffsets[e.crossTileID]=q,n.markUsedJustification(a,q.anchor,e,j))}}else{var Z=function(t,r){var i=n.collisionIndex.placeCollisionBox(t,_,p,l,m.predicate);return i&&i.box&&i.box.length&&(n.markUsedOrientation(a,r,e),n.placedOrientations[e.crossTileID]=r),i};O(function(){return Z(B,t.WritingMode.horizontal)},function(){var r=o.verticalTextBox;return a.allowVerticalPlacement&&e.numVerticalGlyphVertices>0&&r?Z(r,t.WritingMode.vertical):{box:null,offscreen:null}}),F(P&&P.box&&P.box.length)}}if(S=(f=P)&&f.box&&f.box.length>0,A=f&&f.offscreen,e.useRuntimeCollisionCircles){var G=a.text.placedSymbolArray.get(e.centerJustifiedTextSymbolIndex),X=t.evaluateSizeForFeature(a.textSizeData,d,G),W=s.get("text-padding");k=n.collisionIndex.placeCollisionCircles(_,G,a.lineVertexArray,a.glyphOffsetArray,X,l,u,c,i,b,m.predicate,e.collisionCircleDiameter,W),S=_||k.circles.length>0&&!k.collisionDetected,A=A&&k.offscreen}if(o.iconFeatureIndex&&(R=o.iconFeatureIndex),o.iconBox){var K=function(t){var e=w&&z?xe(t,z.x,z.y,x,b,n.transform.angle):t;return n.collisionIndex.placeCollisionBox(e,v,p,l,m.predicate)};E=C&&C.box&&C.box.length&&o.verticalIconBox?(M=K(o.verticalIconBox)).box.length>0:(M=K(o.iconBox)).box.length>0,A=A&&M.offscreen}var H=y||0===e.numHorizontalGlyphVertices&&0===e.numVerticalGlyphVertices,J=g||0===e.numIconVertices;if(H||J?J?H||(E=E&&S):S=E&&S:E=S=E&&S,S&&f&&f.box&&n.collisionIndex.insertCollisionBox(f.box,s.get("text-ignore-placement"),a.bucketInstanceId,C&&C.box&&L?L:D,m.ID),E&&M&&n.collisionIndex.insertCollisionBox(M.box,s.get("icon-ignore-placement"),a.bucketInstanceId,R,m.ID),k&&(S&&n.collisionIndex.insertCollisionCircles(k.circles,s.get("text-ignore-placement"),a.bucketInstanceId,D,m.ID),i)){var Y=a.bucketInstanceId,Q=n.collisionCircleArrays[Y];void 0===Q&&(Q=n.collisionCircleArrays[Y]=new ye);for(var $=0;$<k.circles.length;$+=4)Q.circles.push(k.circles[$+0]),Q.circles.push(k.circles[$+1]),Q.circles.push(k.circles[$+2]),Q.circles.push(k.collisionDetected?1:0)}n.placements[e.crossTileID]=new me(S||T,E||I,A||a.justReloaded),r[e.crossTileID]=!0}};if(S)for(var A=a.getSortedSymbolIndexes(this.transform.angle),z=A.length-1;z>=0;--z){var P=A[z];E(a.symbolInstances.get(P),a.collisionArrays[P])}else for(var C=e.symbolInstanceStart;C<e.symbolInstanceEnd;C++)E(a.symbolInstances.get(C),a.collisionArrays[C]);if(i&&a.bucketInstanceId in this.collisionCircleArrays){var k=this.collisionCircleArrays[a.bucketInstanceId];t.invert(k.invProjMatrix,l),k.viewportMatrix=this.collisionIndex.getViewportMatrix()}a.justReloaded=!1},be.prototype.markUsedJustification=function(e,r,i,n){var o;o=n===t.WritingMode.vertical?i.verticalPlacedTextSymbolIndex:{left:i.leftJustifiedTextSymbolIndex,center:i.centerJustifiedTextSymbolIndex,right:i.rightJustifiedTextSymbolIndex}[t.getAnchorJustification(r)];for(var a=0,s=[i.leftJustifiedTextSymbolIndex,i.centerJustifiedTextSymbolIndex,i.rightJustifiedTextSymbolIndex,i.verticalPlacedTextSymbolIndex];a<s.length;a+=1){var l=s[a];l>=0&&(e.text.placedSymbolArray.get(l).crossTileID=o>=0&&l!==o?0:i.crossTileID)}},be.prototype.markUsedOrientation=function(e,r,i){for(var n=r===t.WritingMode.horizontal||r===t.WritingMode.horizontalOnly?r:0,o=r===t.WritingMode.vertical?r:0,a=0,s=[i.leftJustifiedTextSymbolIndex,i.centerJustifiedTextSymbolIndex,i.rightJustifiedTextSymbolIndex];a<s.length;a+=1)e.text.placedSymbolArray.get(s[a]).placedOrientation=n;i.verticalPlacedTextSymbolIndex&&(e.text.placedSymbolArray.get(i.verticalPlacedTextSymbolIndex).placedOrientation=o)},be.prototype.commit=function(t){this.commitTime=t,this.zoomAtLastRecencyCheck=this.transform.zoom;var e=this.prevPlacement,r=!1;this.prevZoomAdjustment=e?e.zoomAdjustment(this.transform.zoom):0;var i=e?e.symbolFadeChange(t):1,n=e?e.opacities:{},o=e?e.variableOffsets:{},a=e?e.placedOrientations:{};for(var s in this.placements){var l=this.placements[s],u=n[s];u?(this.opacities[s]=new de(u,i,l.text,l.icon),r=r||l.text!==u.text.placed||l.icon!==u.icon.placed):(this.opacities[s]=new de(null,i,l.text,l.icon,l.skipFade),r=r||l.text||l.icon)}for(var c in n){var p=n[c];if(!this.opacities[c]){var h=new de(p,i,!1,!1);h.isHidden()||(this.opacities[c]=h,r=r||p.text.placed||p.icon.placed)}}for(var f in o)this.variableOffsets[f]||!this.opacities[f]||this.opacities[f].isHidden()||(this.variableOffsets[f]=o[f]);for(var d in a)this.placedOrientations[d]||!this.opacities[d]||this.opacities[d].isHidden()||(this.placedOrientations[d]=a[d]);r?this.lastPlacementChangeTime=t:"number"!=typeof this.lastPlacementChangeTime&&(this.lastPlacementChangeTime=e?e.lastPlacementChangeTime:t)},be.prototype.updateLayerOpacities=function(t,e){for(var r={},i=0,n=e;i<n.length;i+=1){var o=n[i],a=o.getBucket(t);a&&o.latestFeatureIndex&&t.id===a.layerIds[0]&&this.updateBucketOpacities(a,r,o.collisionBoxArray)}},be.prototype.updateBucketOpacities=function(e,r,i){var n=this;e.hasTextData()&&e.text.opacityVertexArray.clear(),e.hasIconData()&&e.icon.opacityVertexArray.clear(),e.hasIconCollisionBoxData()&&e.iconCollisionBox.collisionVertexArray.clear(),e.hasTextCollisionBoxData()&&e.textCollisionBox.collisionVertexArray.clear();var o=e.layers[0].layout,a=new de(null,0,!1,!1,!0),s=o.get("text-allow-overlap"),l=o.get("icon-allow-overlap"),u=o.get("text-variable-anchor"),c="map"===o.get("text-rotation-alignment"),p="map"===o.get("text-pitch-alignment"),h="none"!==o.get("icon-text-fit"),f=new de(null,0,s&&(l||!e.hasIconData()||o.get("icon-optional")),l&&(s||!e.hasTextData()||o.get("text-optional")),!0);!e.collisionArrays&&i&&(e.hasIconCollisionBoxData()||e.hasTextCollisionBoxData())&&e.deserializeCollisionBoxes(i);for(var d=function(t,e,r){for(var i=0;i<e/4;i++)t.opacityVertexArray.emplaceBack(r)},m=function(i){var o=e.symbolInstances.get(i),s=o.numHorizontalGlyphVertices,l=o.numVerticalGlyphVertices,m=o.crossTileID,y=n.opacities[m];r[m]?y=a:y||(n.opacities[m]=y=f),r[m]=!0;var g=o.numIconVertices>0,_=n.placedOrientations[o.crossTileID],v=_===t.WritingMode.vertical,x=_===t.WritingMode.horizontal||_===t.WritingMode.horizontalOnly;if(s>0||l>0){var b=Ce(y.text);d(e.text,s,v?ke:b),d(e.text,l,x?ke:b);var w=y.text.isHidden();[o.rightJustifiedTextSymbolIndex,o.centerJustifiedTextSymbolIndex,o.leftJustifiedTextSymbolIndex].forEach(function(t){t>=0&&(e.text.placedSymbolArray.get(t).hidden=w||v?1:0)}),o.verticalPlacedTextSymbolIndex>=0&&(e.text.placedSymbolArray.get(o.verticalPlacedTextSymbolIndex).hidden=w||x?1:0);var S=n.variableOffsets[o.crossTileID];S&&n.markUsedJustification(e,S.anchor,o,_);var T=n.placedOrientations[o.crossTileID];T&&(n.markUsedJustification(e,"left",o,T),n.markUsedOrientation(e,T,o))}if(g){var I=Ce(y.icon),E=!(h&&o.verticalPlacedIconSymbolIndex&&v);o.placedIconSymbolIndex>=0&&(d(e.icon,o.numIconVertices,E?I:ke),e.icon.placedSymbolArray.get(o.placedIconSymbolIndex).hidden=y.icon.isHidden()),o.verticalPlacedIconSymbolIndex>=0&&(d(e.icon,o.numVerticalIconVertices,E?ke:I),e.icon.placedSymbolArray.get(o.verticalPlacedIconSymbolIndex).hidden=y.icon.isHidden())}if(e.hasIconCollisionBoxData()||e.hasTextCollisionBoxData()){var A=e.collisionArrays[i];if(A){var z=new t.Point(0,0);if(A.textBox||A.verticalTextBox){var P=!0;if(u){var C=n.variableOffsets[m];C?(z=ve(C.anchor,C.width,C.height,C.textOffset,C.textBoxScale),c&&z._rotate(p?n.transform.angle:-n.transform.angle)):P=!1}A.textBox&&we(e.textCollisionBox.collisionVertexArray,y.text.placed,!P||v,z.x,z.y),A.verticalTextBox&&we(e.textCollisionBox.collisionVertexArray,y.text.placed,!P||x,z.x,z.y)}var k=Boolean(!x&&A.verticalIconBox);A.iconBox&&we(e.iconCollisionBox.collisionVertexArray,y.icon.placed,k,h?z.x:0,h?z.y:0),A.verticalIconBox&&we(e.iconCollisionBox.collisionVertexArray,y.icon.placed,!k,h?z.x:0,h?z.y:0)}}},y=0;y<e.symbolInstances.length;y++)m(y);if(e.sortFeatures(this.transform.angle),this.retainedQueryData[e.bucketInstanceId]&&(this.retainedQueryData[e.bucketInstanceId].featureSortOrder=e.featureSortOrder),e.hasTextData()&&e.text.opacityVertexBuffer&&e.text.opacityVertexBuffer.updateData(e.text.opacityVertexArray),e.hasIconData()&&e.icon.opacityVertexBuffer&&e.icon.opacityVertexBuffer.updateData(e.icon.opacityVertexArray),e.hasIconCollisionBoxData()&&e.iconCollisionBox.collisionVertexBuffer&&e.iconCollisionBox.collisionVertexBuffer.updateData(e.iconCollisionBox.collisionVertexArray),e.hasTextCollisionBoxData()&&e.textCollisionBox.collisionVertexBuffer&&e.textCollisionBox.collisionVertexBuffer.updateData(e.textCollisionBox.collisionVertexArray),e.bucketInstanceId in this.collisionCircleArrays){var g=this.collisionCircleArrays[e.bucketInstanceId];e.placementInvProjMatrix=g.invProjMatrix,e.placementViewportMatrix=g.viewportMatrix,e.collisionCircleArray=g.circles,delete this.collisionCircleArrays[e.bucketInstanceId]}},be.prototype.symbolFadeChange=function(t){return 0===this.fadeDuration?1:(t-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment},be.prototype.zoomAdjustment=function(t){return Math.max(0,(this.transform.zoom-t)/1.5)},be.prototype.hasTransitions=function(t){return this.stale||t-this.lastPlacementChangeTime<this.fadeDuration},be.prototype.stillRecent=function(t,e){var r=this.zoomAtLastRecencyCheck===e?1-this.zoomAdjustment(e):1;return this.zoomAtLastRecencyCheck=e,this.commitTime+this.fadeDuration*r>t},be.prototype.setStale=function(){this.stale=!0};var Se=Math.pow(2,25),Te=Math.pow(2,24),Ie=Math.pow(2,17),Ee=Math.pow(2,16),Ae=Math.pow(2,9),ze=Math.pow(2,8),Pe=Math.pow(2,1);function Ce(t){if(0===t.opacity&&!t.placed)return 0;if(1===t.opacity&&t.placed)return 4294967295;var e=t.placed?1:0,r=Math.floor(127*t.opacity);return r*Se+e*Te+r*Ie+e*Ee+r*Ae+e*ze+r*Pe+e}var ke=0,Me=function(t){this._sortAcrossTiles="viewport-y"!==t.layout.get("symbol-z-order")&&void 0!==t.layout.get("symbol-sort-key").constantOr(1),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]};Me.prototype.continuePlacement=function(t,e,r,i,n){for(var o=this._bucketParts;this._currentTileIndex<t.length;)if(e.getBucketParts(o,i,t[this._currentTileIndex],this._sortAcrossTiles),this._currentTileIndex++,n())return!0;for(this._sortAcrossTiles&&(this._sortAcrossTiles=!1,o.sort(function(t,e){return t.sortKey-e.sortKey}));this._currentPartIndex<o.length;)if(e.placeLayerBucketPart(o[this._currentPartIndex],this._seenCrossTileIDs,r),this._currentPartIndex++,n())return!0;return!1};var De=function(t,e,r,i,n,o,a){this.placement=new be(t,n,o,a),this._currentPlacementIndex=e.length-1,this._forceFullPlacement=r,this._showCollisionBoxes=i,this._done=!1};De.prototype.isDone=function(){return this._done},De.prototype.continuePlacement=function(e,r,i){for(var n=this,o=t.browser.now(),a=function(){var e=t.browser.now()-o;return!n._forceFullPlacement&&e>2};this._currentPlacementIndex>=0;){var s=r[e[this._currentPlacementIndex]],l=this.placement.collisionIndex.transform.zoom;if("symbol"===s.type&&(!s.minzoom||s.minzoom<=l)&&(!s.maxzoom||s.maxzoom>l)){if(this._inProgressLayer||(this._inProgressLayer=new Me(s)),this._inProgressLayer.continuePlacement(i[s.source],this.placement,this._showCollisionBoxes,s,a))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},De.prototype.commit=function(t){return this.placement.commit(t),this.placement};var Le=512/t.EXTENT/2,Re=function(t,e,r){this.tileID=t,this.indexedSymbolInstances={},this.bucketInstanceId=r;for(var i=0;i<e.length;i++){var n=e.get(i),o=n.key;this.indexedSymbolInstances[o]||(this.indexedSymbolInstances[o]=[]),this.indexedSymbolInstances[o].push({crossTileID:n.crossTileID,coord:this.getScaledCoordinates(n,t)})}};Re.prototype.getScaledCoordinates=function(e,r){var i=Le/Math.pow(2,r.canonical.z-this.tileID.canonical.z);return{x:Math.floor((r.canonical.x*t.EXTENT+e.anchorX)*i),y:Math.floor((r.canonical.y*t.EXTENT+e.anchorY)*i)}},Re.prototype.findMatches=function(t,e,r){for(var i=this.tileID.canonical.z<e.canonical.z?1:Math.pow(2,this.tileID.canonical.z-e.canonical.z),n=0;n<t.length;n++){var o=t.get(n);if(!o.crossTileID){var a=this.indexedSymbolInstances[o.key];if(a)for(var s=this.getScaledCoordinates(o,e),l=0,u=a;l<u.length;l+=1){var c=u[l];if(Math.abs(c.coord.x-s.x)<=i&&Math.abs(c.coord.y-s.y)<=i&&!r[c.crossTileID]){r[c.crossTileID]=!0,o.crossTileID=c.crossTileID;break}}}}};var Be=function(){this.maxCrossTileID=0};Be.prototype.generate=function(){return++this.maxCrossTileID};var Fe=function(){this.indexes={},this.usedCrossTileIDs={},this.lng=0};Fe.prototype.handleWrapJump=function(t){var e=Math.round((t-this.lng)/360);if(0!==e)for(var r in this.indexes){var i=this.indexes[r],n={};for(var o in i){var a=i[o];a.tileID=a.tileID.unwrapTo(a.tileID.wrap+e),n[a.tileID.key]=a}this.indexes[r]=n}this.lng=t},Fe.prototype.addBucket=function(t,e,r){if(this.indexes[t.overscaledZ]&&this.indexes[t.overscaledZ][t.key]){if(this.indexes[t.overscaledZ][t.key].bucketInstanceId===e.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(t.overscaledZ,this.indexes[t.overscaledZ][t.key])}for(var i=0;i<e.symbolInstances.length;i++)e.symbolInstances.get(i).crossTileID=0;this.usedCrossTileIDs[t.overscaledZ]||(this.usedCrossTileIDs[t.overscaledZ]={});var n=this.usedCrossTileIDs[t.overscaledZ];for(var o in this.indexes){var a=this.indexes[o];if(Number(o)>t.overscaledZ)for(var s in a){var l=a[s];l.tileID.isChildOf(t)&&l.findMatches(e.symbolInstances,t,n)}else{var u=a[t.scaledTo(Number(o)).key];u&&u.findMatches(e.symbolInstances,t,n)}}for(var c=0;c<e.symbolInstances.length;c++){var p=e.symbolInstances.get(c);p.crossTileID||(p.crossTileID=r.generate(),n[p.crossTileID]=!0)}return void 0===this.indexes[t.overscaledZ]&&(this.indexes[t.overscaledZ]={}),this.indexes[t.overscaledZ][t.key]=new Re(t,e.symbolInstances,e.bucketInstanceId),!0},Fe.prototype.removeBucketCrossTileIDs=function(t,e){for(var r in e.indexedSymbolInstances)for(var i=0,n=e.indexedSymbolInstances[r];i<n.length;i+=1)delete this.usedCrossTileIDs[t][n[i].crossTileID]},Fe.prototype.removeStaleBuckets=function(t){var e=!1;for(var r in this.indexes){var i=this.indexes[r];for(var n in i)t[i[n].bucketInstanceId]||(this.removeBucketCrossTileIDs(r,i[n]),delete i[n],e=!0)}return e};var Oe=function(){this.layerIndexes={},this.crossTileIDs=new Be,this.maxBucketInstanceId=0,this.bucketsInCurrentPlacement={}};Oe.prototype.addLayer=function(t,e,r){var i=this.layerIndexes[t.id];void 0===i&&(i=this.layerIndexes[t.id]=new Fe);var n=!1,o={};i.handleWrapJump(r);for(var a=0,s=e;a<s.length;a+=1){var l=s[a],u=l.getBucket(t);u&&t.id===u.layerIds[0]&&(u.bucketInstanceId||(u.bucketInstanceId=++this.maxBucketInstanceId),i.addBucket(l.tileID,u,this.crossTileIDs)&&(n=!0),o[u.bucketInstanceId]=!0)}return i.removeStaleBuckets(o)&&(n=!0),n},Oe.prototype.pruneUnusedLayers=function(t){var e={};for(var r in t.forEach(function(t){e[t]=!0}),this.layerIndexes)e[r]||delete this.layerIndexes[r]};var Ue=function(e,r){return t.emitValidationErrors(e,r&&r.filter(function(t){return"source.canvas"!==t.identifier}))},Ve=t.pick(Nt,["addLayer","removeLayer","setPaintProperty","setLayoutProperty","setFilter","addSource","removeSource","setLayerZoomRange","setLight","setTransition","setGeoJSONSourceData"]),Ne=t.pick(Nt,["setCenter","setZoom","setBearing","setPitch"]),je=function(){var e={},r=t.styleSpec.$version;for(var i in t.styleSpec.$root){var n,o=t.styleSpec.$root[i];o.required&&null!=(n="version"===i?r:"array"===o.type?[]:{})&&(e[i]=n)}return e}(),qe=function(e){function r(i,n){var o=this;void 0===n&&(n={}),e.call(this),this.map=i,this.dispatcher=new T(Ot(),this),this.imageManager=new h,this.imageManager.setEventedParent(this),this.glyphManager=new v(i._requestManager,n.localIdeographFontFamily),this.lineAtlas=new S(256,512),this.crossTileSymbolIndex=new Oe,this._layers={},this._serializedLayers={},this._order=[],this.sourceCaches={},this.zoomHistory=new t.ZoomHistory,this._loaded=!1,this._availableImages=[],this._resetUpdates(),this.dispatcher.broadcast("setReferrer",t.getReferrer());var a=this;this._rtlTextPluginCallback=r.registerForPluginStateChange(function(e){a.dispatcher.broadcast("syncRTLPluginState",{pluginStatus:e.pluginStatus,pluginURL:e.pluginURL},function(e,r){if(t.triggerPluginCompletionEvent(e),r&&r.every(function(t){return t}))for(var i in a.sourceCaches)a.sourceCaches[i].reload()})}),this.on("data",function(t){if("source"===t.dataType&&"metadata"===t.sourceDataType){var e=o.sourceCaches[t.sourceId];if(e){var r=e.getSource();if(r&&r.vectorLayerIds)for(var i in o._layers){var n=o._layers[i];n.source===r.id&&o._validateLayer(n)}}}})}return e&&(r.__proto__=e),(r.prototype=Object.create(e&&e.prototype)).constructor=r,r.prototype.loadURL=function(e,r){var i=this;void 0===r&&(r={}),this.fire(new t.Event("dataloading",{dataType:"style"}));var n="boolean"==typeof r.validate?r.validate:!t.isMapboxURL(e);e=this.map._requestManager.normalizeStyleURL(e,r.accessToken);var o=this.map._requestManager.transformRequest(e,t.ResourceType.Style);this._request=t.getJSON(o,function(e,r){i._request=null,e?i.fire(new t.ErrorEvent(e)):r&&i._load(r,n)})},r.prototype.loadJSON=function(e,r){var i=this;void 0===r&&(r={}),this.fire(new t.Event("dataloading",{dataType:"style"})),this._request=t.browser.frame(function(){i._request=null,i._load(e,!1!==r.validate)})},r.prototype.loadEmpty=function(){this.fire(new t.Event("dataloading",{dataType:"style"})),this._load(je,!1)},r.prototype._load=function(e,r){if(!r||!Ue(this,t.validateStyle(e))){for(var i in this._loaded=!0,this.stylesheet=e,e.sources)this.addSource(i,e.sources[i],{validate:!1});e.sprite?this._loadSprite(e.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(e.glyphs);var n=Vt(this.stylesheet.layers);this._order=n.map(function(t){return t.id}),this._layers={},this._serializedLayers={};for(var o=0,a=n;o<a.length;o+=1){var s=a[o];(s=t.createStyleLayer(s)).setEventedParent(this,{layer:{id:s.id}}),this._layers[s.id]=s,this._serializedLayers[s.id]=s.serialize()}this.dispatcher.broadcast("setLayers",this._serializeLayers(this._order)),this.light=new w(this.stylesheet.light),this.fire(new t.Event("data",{dataType:"style"})),this.fire(new t.Event("style.load"))}},r.prototype._loadSprite=function(e){var r=this;this._spriteRequest=function(e,r,i){var n,o,a,s=t.browser.devicePixelRatio>1?"@2x":"",l=t.getJSON(r.transformRequest(r.normalizeSpriteURL(e,s,".json"),t.ResourceType.SpriteJSON),function(t,e){l=null,a||(a=t,n=e,c())}),u=t.getImage(r.transformRequest(r.normalizeSpriteURL(e,s,".png"),t.ResourceType.SpriteImage),function(t,e){u=null,a||(a=t,o=e,c())});function c(){if(a)i(a);else if(n&&o){var e=t.browser.getImageData(o),r={};for(var s in n){var l=n[s],u=l.width,c=l.height,p=l.x,h=l.y,f=l.sdf,d=l.pixelRatio,m=l.stretchX,y=l.stretchY,g=l.content,_=new t.RGBAImage({width:u,height:c});t.RGBAImage.copy(e,_,{x:p,y:h},{x:0,y:0},{width:u,height:c}),r[s]={data:_,pixelRatio:d,sdf:f,stretchX:m,stretchY:y,content:g}}i(null,r)}}return{cancel:function(){l&&(l.cancel(),l=null),u&&(u.cancel(),u=null)}}}(e,this.map._requestManager,function(e,i){if(r._spriteRequest=null,e)r.fire(new t.ErrorEvent(e));else if(i)for(var n in i)r.imageManager.addImage(n,i[n]);r.imageManager.setLoaded(!0),r._availableImages=r.imageManager.listImages(),r.dispatcher.broadcast("setImages",r._availableImages),r.fire(new t.Event("data",{dataType:"style"}))})},r.prototype._validateLayer=function(e){var r=this.sourceCaches[e.source];if(r){var i=e.sourceLayer;if(i){var n=r.getSource();("geojson"===n.type||n.vectorLayerIds&&-1===n.vectorLayerIds.indexOf(i))&&this.fire(new t.ErrorEvent(new Error('Source layer "'+i+'" does not exist on source "'+n.id+'" as specified by style layer "'+e.id+'"')))}}},r.prototype.loaded=function(){if(!this._loaded)return!1;if(Object.keys(this._updatedSources).length)return!1;for(var t in this.sourceCaches)if(!this.sourceCaches[t].loaded())return!1;return!!this.imageManager.isLoaded()},r.prototype._serializeLayers=function(t){for(var e=[],r=0,i=t;r<i.length;r+=1){var n=this._layers[i[r]];"custom"!==n.type&&e.push(n.serialize())}return e},r.prototype.hasTransitions=function(){if(this.light&&this.light.hasTransition())return!0;for(var t in this.sourceCaches)if(this.sourceCaches[t].hasTransition())return!0;for(var e in this._layers)if(this._layers[e].hasTransition())return!0;return!1},r.prototype._checkLoaded=function(){if(!this._loaded)throw new Error("Style is not done loading")},r.prototype.update=function(e){if(this._loaded){var r=this._changed;if(this._changed){var i=Object.keys(this._updatedLayers),n=Object.keys(this._removedLayers);for(var o in(i.length||n.length)&&this._updateWorkerLayers(i,n),this._updatedSources){var a=this._updatedSources[o];"reload"===a?this._reloadSource(o):"clear"===a&&this._clearSource(o)}for(var s in this._updateTilesForChangedImages(),this._updatedPaintProps)this._layers[s].updateTransitions(e);this.light.updateTransitions(e),this._resetUpdates()}for(var l in this.sourceCaches)this.sourceCaches[l].used=!1;for(var u=0,c=this._order;u<c.length;u+=1){var p=this._layers[c[u]];p.recalculate(e,this._availableImages),!p.isHidden(e.zoom)&&p.source&&(this.sourceCaches[p.source].used=!0)}this.light.recalculate(e),this.z=e.zoom,r&&this.fire(new t.Event("data",{dataType:"style"}))}},r.prototype._updateTilesForChangedImages=function(){var t=Object.keys(this._changedImages);if(t.length){for(var e in this.sourceCaches)this.sourceCaches[e].reloadTilesForDependencies(["icons","patterns"],t);this._changedImages={}}},r.prototype._updateWorkerLayers=function(t,e){this.dispatcher.broadcast("updateLayers",{layers:this._serializeLayers(t),removedIds:e})},r.prototype._resetUpdates=function(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={}},r.prototype.setState=function(e){var r=this;if(this._checkLoaded(),Ue(this,t.validateStyle(e)))return!1;(e=t.clone$1(e)).layers=Vt(e.layers);var i=function(e,r){if(!e)return[{command:Nt.setStyle,args:[r]}];var i=[];try{if(!t.deepEqual(e.version,r.version))return[{command:Nt.setStyle,args:[r]}];t.deepEqual(e.center,r.center)||i.push({command:Nt.setCenter,args:[r.center]}),t.deepEqual(e.zoom,r.zoom)||i.push({command:Nt.setZoom,args:[r.zoom]}),t.deepEqual(e.bearing,r.bearing)||i.push({command:Nt.setBearing,args:[r.bearing]}),t.deepEqual(e.pitch,r.pitch)||i.push({command:Nt.setPitch,args:[r.pitch]}),t.deepEqual(e.sprite,r.sprite)||i.push({command:Nt.setSprite,args:[r.sprite]}),t.deepEqual(e.glyphs,r.glyphs)||i.push({command:Nt.setGlyphs,args:[r.glyphs]}),t.deepEqual(e.transition,r.transition)||i.push({command:Nt.setTransition,args:[r.transition]}),t.deepEqual(e.light,r.light)||i.push({command:Nt.setLight,args:[r.light]});var n={},o=[];!function(e,r,i,n){var o;for(o in r=r||{},e=e||{})e.hasOwnProperty(o)&&(r.hasOwnProperty(o)||qt(o,i,n));for(o in r)r.hasOwnProperty(o)&&(e.hasOwnProperty(o)?t.deepEqual(e[o],r[o])||("geojson"===e[o].type&&"geojson"===r[o].type&&Gt(e,r,o)?i.push({command:Nt.setGeoJSONSourceData,args:[o,r[o].data]}):Zt(o,r,i,n)):jt(o,r,i))}(e.sources,r.sources,o,n);var a=[];e.layers&&e.layers.forEach(function(t){n[t.source]?i.push({command:Nt.removeLayer,args:[t.id]}):a.push(t)}),i=i.concat(o),function(e,r,i){r=r||[];var n,o,a,s,l,u,c,p=(e=e||[]).map(Wt),h=r.map(Wt),f=e.reduce(Kt,{}),d=r.reduce(Kt,{}),m=p.slice(),y=Object.create(null);for(n=0,o=0;n<p.length;n++)d.hasOwnProperty(a=p[n])?o++:(i.push({command:Nt.removeLayer,args:[a]}),m.splice(m.indexOf(a,o),1));for(n=0,o=0;n<h.length;n++)m[m.length-1-n]!==(a=h[h.length-1-n])&&(f.hasOwnProperty(a)?(i.push({command:Nt.removeLayer,args:[a]}),m.splice(m.lastIndexOf(a,m.length-o),1)):o++,i.push({command:Nt.addLayer,args:[d[a],u=m[m.length-n]]}),m.splice(m.length-n,0,a),y[a]=!0);for(n=0;n<h.length;n++)if(s=f[a=h[n]],l=d[a],!y[a]&&!t.deepEqual(s,l))if(t.deepEqual(s.source,l.source)&&t.deepEqual(s["source-layer"],l["source-layer"])&&t.deepEqual(s.type,l.type)){for(c in Xt(s.layout,l.layout,i,a,null,Nt.setLayoutProperty),Xt(s.paint,l.paint,i,a,null,Nt.setPaintProperty),t.deepEqual(s.filter,l.filter)||i.push({command:Nt.setFilter,args:[a,l.filter]}),t.deepEqual(s.minzoom,l.minzoom)&&t.deepEqual(s.maxzoom,l.maxzoom)||i.push({command:Nt.setLayerZoomRange,args:[a,l.minzoom,l.maxzoom]}),s)s.hasOwnProperty(c)&&"layout"!==c&&"paint"!==c&&"filter"!==c&&"metadata"!==c&&"minzoom"!==c&&"maxzoom"!==c&&(0===c.indexOf("paint.")?Xt(s[c],l[c],i,a,c.slice(6),Nt.setPaintProperty):t.deepEqual(s[c],l[c])||i.push({command:Nt.setLayerProperty,args:[a,c,l[c]]}));for(c in l)l.hasOwnProperty(c)&&!s.hasOwnProperty(c)&&"layout"!==c&&"paint"!==c&&"filter"!==c&&"metadata"!==c&&"minzoom"!==c&&"maxzoom"!==c&&(0===c.indexOf("paint.")?Xt(s[c],l[c],i,a,c.slice(6),Nt.setPaintProperty):t.deepEqual(s[c],l[c])||i.push({command:Nt.setLayerProperty,args:[a,c,l[c]]}))}else i.push({command:Nt.removeLayer,args:[a]}),u=m[m.lastIndexOf(a)+1],i.push({command:Nt.addLayer,args:[l,u]})}(a,r.layers,i)}catch(t){console.warn("Unable to compute style diff:",t),i=[{command:Nt.setStyle,args:[r]}]}return i}(this.serialize(),e).filter(function(t){return!(t.command in Ne)});if(0===i.length)return!1;var n=i.filter(function(t){return!(t.command in Ve)});if(n.length>0)throw new Error("Unimplemented: "+n.map(function(t){return t.command}).join(", ")+".");return i.forEach(function(t){"setTransition"!==t.command&&r[t.command].apply(r,t.args)}),this.stylesheet=e,!0},r.prototype.addImage=function(e,r){if(this.getImage(e))return this.fire(new t.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(e,r),this._availableImages=this.imageManager.listImages(),this._changedImages[e]=!0,this._changed=!0,this.fire(new t.Event("data",{dataType:"style"}))},r.prototype.updateImage=function(t,e){this.imageManager.updateImage(t,e)},r.prototype.getImage=function(t){return this.imageManager.getImage(t)},r.prototype.removeImage=function(e){if(!this.getImage(e))return this.fire(new t.ErrorEvent(new Error("No image with this name exists.")));this.imageManager.removeImage(e),this._availableImages=this.imageManager.listImages(),this._changedImages[e]=!0,this._changed=!0,this.fire(new t.Event("data",{dataType:"style"}))},r.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},r.prototype.addSource=function(e,r,i){var n=this;if(void 0===i&&(i={}),this._checkLoaded(),void 0!==this.sourceCaches[e])throw new Error("There is already a source with this ID");if(!r.type)throw new Error("The type property must be defined, but the only the following properties were given: "+Object.keys(r).join(", ")+".");if(!(["vector","raster","geojson","video","image"].indexOf(r.type)>=0&&this._validate(t.validateStyle.source,"sources."+e,r,null,i))){this.map&&this.map._collectResourceTiming&&(r.collectResourceTiming=!0);var o=this.sourceCaches[e]=new Ct(e,r,this.dispatcher);o.style=this,o.setEventedParent(this,function(){return{isSourceLoaded:n.loaded(),source:o.serialize(),sourceId:e}}),o.onAdd(this.map),this._changed=!0}},r.prototype.removeSource=function(e){if(this._checkLoaded(),void 0===this.sourceCaches[e])throw new Error("There is no source with this ID");for(var r in this._layers)if(this._layers[r].source===e)return this.fire(new t.ErrorEvent(new Error('Source "'+e+'" cannot be removed while layer "'+r+'" is using it.')));var i=this.sourceCaches[e];delete this.sourceCaches[e],delete this._updatedSources[e],i.fire(new t.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:e})),i.setEventedParent(null),i.clearTiles(),i.onRemove&&i.onRemove(this.map),this._changed=!0},r.prototype.setGeoJSONSourceData=function(t,e){this._checkLoaded(),this.sourceCaches[t].getSource().setData(e),this._changed=!0},r.prototype.getSource=function(t){return this.sourceCaches[t]&&this.sourceCaches[t].getSource()},r.prototype.addLayer=function(e,r,i){void 0===i&&(i={}),this._checkLoaded();var n=e.id;if(this.getLayer(n))this.fire(new t.ErrorEvent(new Error('Layer with id "'+n+'" already exists on this map')));else{var o;if("custom"===e.type){if(Ue(this,t.validateCustomStyleLayer(e)))return;o=t.createStyleLayer(e)}else{if("object"==typeof e.source&&(this.addSource(n,e.source),e=t.clone$1(e),e=t.extend(e,{source:n})),this._validate(t.validateStyle.layer,"layers."+n,e,{arrayIndex:-1},i))return;o=t.createStyleLayer(e),this._validateLayer(o),o.setEventedParent(this,{layer:{id:n}}),this._serializedLayers[o.id]=o.serialize()}var a=r?this._order.indexOf(r):this._order.length;if(r&&-1===a)this.fire(new t.ErrorEvent(new Error('Layer with id "'+r+'" does not exist on this map.')));else{if(this._order.splice(a,0,n),this._layerOrderChanged=!0,this._layers[n]=o,this._removedLayers[n]&&o.source&&"custom"!==o.type){var s=this._removedLayers[n];delete this._removedLayers[n],s.type!==o.type?this._updatedSources[o.source]="clear":(this._updatedSources[o.source]="reload",this.sourceCaches[o.source].pause())}this._updateLayer(o),o.onAdd&&o.onAdd(this.map)}}},r.prototype.moveLayer=function(e,r){if(this._checkLoaded(),this._changed=!0,this._layers[e]){if(e!==r){var i=this._order.indexOf(e);this._order.splice(i,1);var n=r?this._order.indexOf(r):this._order.length;r&&-1===n?this.fire(new t.ErrorEvent(new Error('Layer with id "'+r+'" does not exist on this map.'))):(this._order.splice(n,0,e),this._layerOrderChanged=!0)}}else this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be moved.")))},r.prototype.removeLayer=function(e){this._checkLoaded();var r=this._layers[e];if(r){r.setEventedParent(null);var i=this._order.indexOf(e);this._order.splice(i,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[e]=r,delete this._layers[e],delete this._serializedLayers[e],delete this._updatedLayers[e],delete this._updatedPaintProps[e],r.onRemove&&r.onRemove(this.map)}else this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be removed.")))},r.prototype.getLayer=function(t){return this._layers[t]},r.prototype.hasLayer=function(t){return t in this._layers},r.prototype.setLayerZoomRange=function(e,r,i){this._checkLoaded();var n=this.getLayer(e);n?n.minzoom===r&&n.maxzoom===i||(null!=r&&(n.minzoom=r),null!=i&&(n.maxzoom=i),this._updateLayer(n)):this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot have zoom extent.")))},r.prototype.setFilter=function(e,r,i){void 0===i&&(i={}),this._checkLoaded();var n=this.getLayer(e);if(n){if(!t.deepEqual(n.filter,r))return null==r?(n.filter=void 0,void this._updateLayer(n)):void(this._validate(t.validateStyle.filter,"layers."+n.id+".filter",r,null,i)||(n.filter=t.clone$1(r),this._updateLayer(n)))}else this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be filtered.")))},r.prototype.getFilter=function(e){return t.clone$1(this.getLayer(e).filter)},r.prototype.setLayoutProperty=function(e,r,i,n){void 0===n&&(n={}),this._checkLoaded();var o=this.getLayer(e);o?t.deepEqual(o.getLayoutProperty(r),i)||(o.setLayoutProperty(r,i,n),this._updateLayer(o)):this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be styled.")))},r.prototype.getLayoutProperty=function(e,r){var i=this.getLayer(e);if(i)return i.getLayoutProperty(r);this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style.")))},r.prototype.setPaintProperty=function(e,r,i,n){void 0===n&&(n={}),this._checkLoaded();var o=this.getLayer(e);o?t.deepEqual(o.getPaintProperty(r),i)||(o.setPaintProperty(r,i,n)&&this._updateLayer(o),this._changed=!0,this._updatedPaintProps[e]=!0):this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be styled.")))},r.prototype.getPaintProperty=function(t,e){return this.getLayer(t).getPaintProperty(e)},r.prototype.setFeatureState=function(e,r){this._checkLoaded();var i=e.source,n=e.sourceLayer,o=this.sourceCaches[i];if(void 0!==o){var a=o.getSource().type;"geojson"===a&&n?this.fire(new t.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):"vector"!==a||n?(void 0===e.id&&this.fire(new t.ErrorEvent(new Error("The feature id parameter must be provided."))),o.setFeatureState(n,e.id,r)):this.fire(new t.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new t.ErrorEvent(new Error("The source '"+i+"' does not exist in the map's style.")))},r.prototype.removeFeatureState=function(e,r){this._checkLoaded();var i=e.source,n=this.sourceCaches[i];if(void 0!==n){var o=n.getSource().type,a="vector"===o?e.sourceLayer:void 0;"vector"!==o||a?r&&"string"!=typeof e.id&&"number"!=typeof e.id?this.fire(new t.ErrorEvent(new Error("A feature id is requred to remove its specific state property."))):n.removeFeatureState(a,e.id,r):this.fire(new t.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new t.ErrorEvent(new Error("The source '"+i+"' does not exist in the map's style.")))},r.prototype.getFeatureState=function(e){this._checkLoaded();var r=e.source,i=e.sourceLayer,n=this.sourceCaches[r];if(void 0!==n){if("vector"!==n.getSource().type||i)return void 0===e.id&&this.fire(new t.ErrorEvent(new Error("The feature id parameter must be provided."))),n.getFeatureState(i,e.id);this.fire(new t.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new t.ErrorEvent(new Error("The source '"+r+"' does not exist in the map's style.")))},r.prototype.getTransition=function(){return t.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},r.prototype.serialize=function(){return t.filterObject({version:this.stylesheet.version,name:this.stylesheet.name,metadata:this.stylesheet.metadata,light:this.stylesheet.light,center:this.stylesheet.center,zoom:this.stylesheet.zoom,bearing:this.stylesheet.bearing,pitch:this.stylesheet.pitch,sprite:this.stylesheet.sprite,glyphs:this.stylesheet.glyphs,transition:this.stylesheet.transition,sources:t.mapObject(this.sourceCaches,function(t){return t.serialize()}),layers:this._serializeLayers(this._order)},function(t){return void 0!==t})},r.prototype._updateLayer=function(t){this._updatedLayers[t.id]=!0,t.source&&!this._updatedSources[t.source]&&"raster"!==this.sourceCaches[t.source].getSource().type&&(this._updatedSources[t.source]="reload",this.sourceCaches[t.source].pause()),this._changed=!0},r.prototype._flattenAndSortRenderedFeatures=function(t){for(var e=this,r=function(t){return"fill-extrusion"===e._layers[t].type},i={},n=[],o=this._order.length-1;o>=0;o--){var a=this._order[o];if(r(a)){i[a]=o;for(var s=0,l=t;s<l.length;s+=1){var u=l[s][a];if(u)for(var c=0,p=u;c<p.length;c+=1)n.push(p[c])}}}n.sort(function(t,e){return e.intersectionZ-t.intersectionZ});for(var h=[],f=this._order.length-1;f>=0;f--){var d=this._order[f];if(r(d))for(var m=n.length-1;m>=0;m--){var y=n[m].feature;if(i[y.layer.id]<f)break;h.push(y),n.pop()}else for(var g=0,_=t;g<_.length;g+=1){var v=_[g][d];if(v)for(var x=0,b=v;x<b.length;x+=1)h.push(b[x].feature)}}return h},r.prototype.queryRenderedFeatures=function(e,r,i){r&&r.filter&&this._validate(t.validateStyle.filter,"queryRenderedFeatures.filter",r.filter,null,r);var n={};if(r&&r.layers){if(!Array.isArray(r.layers))return this.fire(new t.ErrorEvent(new Error("parameters.layers must be an Array."))),[];for(var o=0,a=r.layers;o<a.length;o+=1){var s=a[o],l=this._layers[s];if(!l)return this.fire(new t.ErrorEvent(new Error("The layer '"+s+"' does not exist in the map's style and cannot be queried for features."))),[];n[l.source]=!0}}var u=[];for(var c in r.availableImages=this._availableImages,this.sourceCaches)r.layers&&!n[c]||u.push(F(this.sourceCaches[c],this._layers,this._serializedLayers,e,r,i));return this.placement&&u.push(function(t,e,r,i,n,o,a){for(var s={},l=o.queryRenderedSymbols(i),u=[],c=0,p=Object.keys(l).map(Number);c<p.length;c+=1)u.push(a[p[c]]);u.sort(O);for(var h=function(){var r=d[f],i=r.featureIndex.lookupSymbolFeatures(l[r.bucketInstanceId],e,r.bucketIndex,r.sourceLayerIndex,n.filter,n.layers,n.availableImages,t);for(var o in i){var a=s[o]=s[o]||[],u=i[o];u.sort(function(t,e){var i=r.featureSortOrder;if(i){var n=i.indexOf(t.featureIndex);return i.indexOf(e.featureIndex)-n}return e.featureIndex-t.featureIndex});for(var c=0,p=u;c<p.length;c+=1)a.push(p[c])}},f=0,d=u;f<d.length;f+=1)h();var m=function(e){s[e].forEach(function(i){var n=i.feature,o=r[t[e].source].getFeatureState(n.layer["source-layer"],n.id);n.source=n.layer.source,n.layer["source-layer"]&&(n.sourceLayer=n.layer["source-layer"]),n.state=o})};for(var y in s)m(y);return s}(this._layers,this._serializedLayers,this.sourceCaches,e,r,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(u)},r.prototype.querySourceFeatures=function(e,r){r&&r.filter&&this._validate(t.validateStyle.filter,"querySourceFeatures.filter",r.filter,null,r);var i=this.sourceCaches[e];return i?function(t,e){for(var r=t.getRenderableIds().map(function(e){return t.getTileByID(e)}),i=[],n={},o=0;o<r.length;o++){var a=r[o],s=a.tileID.canonical.key;n[s]||(n[s]=!0,a.querySourceFeatures(i,e))}return i}(i,r):[]},r.prototype.addSourceType=function(t,e,i){return r.getSourceType(t)?i(new Error('A source type called "'+t+'" already exists.')):(r.setSourceType(t,e),e.workerSourceURL?void this.dispatcher.broadcast("loadWorkerSource",{name:t,url:e.workerSourceURL},i):i(null,null))},r.prototype.getLight=function(){return this.light.getLight()},r.prototype.setLight=function(e,r){void 0===r&&(r={}),this._checkLoaded();var i=this.light.getLight(),n=!1;for(var o in e)if(!t.deepEqual(e[o],i[o])){n=!0;break}if(n){var a={now:t.browser.now(),transition:t.extend({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(e,r),this.light.updateTransitions(a)}},r.prototype._validate=function(e,r,i,n,o){return void 0===o&&(o={}),(!o||!1!==o.validate)&&Ue(this,e.call(t.validateStyle,t.extend({key:r,style:this.serialize(),value:i,styleSpec:t.styleSpec},n)))},r.prototype._remove=function(){for(var e in this._request&&(this._request.cancel(),this._request=null),this._spriteRequest&&(this._spriteRequest.cancel(),this._spriteRequest=null),t.evented.off("pluginStateChange",this._rtlTextPluginCallback),this._layers)this._layers[e].setEventedParent(null);for(var r in this.sourceCaches)this.sourceCaches[r].clearTiles(),this.sourceCaches[r].setEventedParent(null);this.imageManager.setEventedParent(null),this.setEventedParent(null),this.dispatcher.remove()},r.prototype._clearSource=function(t){this.sourceCaches[t].clearTiles()},r.prototype._reloadSource=function(t){this.sourceCaches[t].resume(),this.sourceCaches[t].reload()},r.prototype._updateSources=function(t){for(var e in this.sourceCaches)this.sourceCaches[e].update(t)},r.prototype._generateCollisionBoxes=function(){for(var t in this.sourceCaches)this._reloadSource(t)},r.prototype._updatePlacement=function(e,r,i,n,o){void 0===o&&(o=!1);for(var a=!1,s=!1,l={},u=0,c=this._order;u<c.length;u+=1){var p=this._layers[c[u]];if("symbol"===p.type){if(!l[p.source]){var h=this.sourceCaches[p.source];l[p.source]=h.getRenderableIds(!0).map(function(t){return h.getTileByID(t)}).sort(function(t,e){return e.tileID.overscaledZ-t.tileID.overscaledZ||(t.tileID.isLessThan(e.tileID)?-1:1)})}var f=this.crossTileSymbolIndex.addLayer(p,l[p.source],e.center.lng);a=a||f}}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),((o=o||this._layerOrderChanged||0===i)||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(t.browser.now(),e.zoom))&&(this.pauseablePlacement=new De(e,this._order,o,r,i,n,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,l),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(t.browser.now()),s=!0),a&&this.pauseablePlacement.placement.setStale()),s||a)for(var d=0,m=this._order;d<m.length;d+=1){var y=this._layers[m[d]];"symbol"===y.type&&this.placement.updateLayerOpacities(y,l[y.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(t.browser.now())},r.prototype._releaseSymbolFadeTiles=function(){for(var t in this.sourceCaches)this.sourceCaches[t].releaseSymbolFadeTiles()},r.prototype.getImages=function(t,e,r){this.imageManager.getImages(e.icons,r),this._updateTilesForChangedImages();var i=this.sourceCaches[e.source];i&&i.setDependencies(e.tileID.key,e.type,e.icons)},r.prototype.getGlyphs=function(t,e,r){this.glyphManager.getGlyphs(e.stacks,r)},r.prototype.getResource=function(e,r,i){return t.makeRequest(r,i)},r}(t.Evented);qe.getSourceType=function(t){return R[t]},qe.setSourceType=function(t,e){R[t]=e},qe.registerForPluginStateChange=t.registerForPluginStateChange;var Ze=t.createLayout([{name:"a_pos",type:"Int16",components:2}]),Ge=gr("#ifdef GL_ES\nprecision mediump float;\n#else\n#if !defined(lowp)\n#define lowp\n#endif\n#if !defined(mediump)\n#define mediump\n#endif\n#if !defined(highp)\n#define highp\n#endif\n#endif","#ifdef GL_ES\nprecision highp float;\n#else\n#if !defined(lowp)\n#define lowp\n#endif\n#if !defined(mediump)\n#define mediump\n#endif\n#if !defined(highp)\n#define highp\n#endif\n#endif\nvec2 unpack_float(const float packedValue) {int packedIntValue=int(packedValue);int v0=packedIntValue/256;return vec2(v0,packedIntValue-v0*256);}vec2 unpack_opacity(const float packedOpacity) {int intOpacity=int(packedOpacity)/2;return vec2(float(intOpacity)/127.0,mod(packedOpacity,2.0));}vec4 decode_color(const vec2 encodedColor) {return vec4(unpack_float(encodedColor[0])/255.0,unpack_float(encodedColor[1])/255.0\n);}float unpack_mix_vec2(const vec2 packedValue,const float t) {return mix(packedValue[0],packedValue[1],t);}vec4 unpack_mix_color(const vec4 packedColors,const float t) {vec4 minColor=decode_color(vec2(packedColors[0],packedColors[1]));vec4 maxColor=decode_color(vec2(packedColors[2],packedColors[3]));return mix(minColor,maxColor,t);}vec2 get_pattern_pos(const vec2 pixel_coord_upper,const vec2 pixel_coord_lower,const vec2 pattern_size,const float tile_units_to_pixels,const vec2 pos) {vec2 offset=mod(mod(mod(pixel_coord_upper,pattern_size)*256.0,pattern_size)*256.0+pixel_coord_lower,pattern_size);return (tile_units_to_pixels*pos+offset)/pattern_size;}"),Xe=gr("uniform vec4 u_color;uniform float u_opacity;void main() {gl_FragColor=u_color*u_opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),We=gr("uniform vec2 u_pattern_tl_a;uniform vec2 u_pattern_br_a;uniform vec2 u_pattern_tl_b;uniform vec2 u_pattern_br_b;uniform vec2 u_texsize;uniform float u_mix;uniform float u_opacity;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(u_pattern_tl_a/u_texsize,u_pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(u_pattern_tl_b/u_texsize,u_pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_mix)*u_opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_pattern_size_a;uniform vec2 u_pattern_size_b;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_scale_a;uniform float u_scale_b;uniform float u_tile_units_to_pixels;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_a*u_pattern_size_a,u_tile_units_to_pixels,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_b*u_pattern_size_b,u_tile_units_to_pixels,a_pos);}"),Ke=gr("varying vec3 v_data;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define mediump float radius\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define highp vec4 stroke_color\n#pragma mapbox: define mediump float stroke_width\n#pragma mapbox: define lowp float stroke_opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize mediump float radius\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize highp vec4 stroke_color\n#pragma mapbox: initialize mediump float stroke_width\n#pragma mapbox: initialize lowp float stroke_opacity\nvec2 extrude=v_data.xy;float extrude_length=length(extrude);lowp float antialiasblur=v_data.z;float antialiased_blur=-max(blur,antialiasblur);float opacity_t=smoothstep(0.0,antialiased_blur,extrude_length-1.0);float color_t=stroke_width < 0.01 ? 0.0 : smoothstep(antialiased_blur,0.0,extrude_length-radius/(radius+stroke_width));gl_FragColor=opacity_t*mix(color*opacity,stroke_color*stroke_opacity,color_t);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform bool u_scale_with_map;uniform bool u_pitch_with_map;uniform vec2 u_extrude_scale;uniform lowp float u_device_pixel_ratio;uniform highp float u_camera_to_center_distance;attribute vec2 a_pos;varying vec3 v_data;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define mediump float radius\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define highp vec4 stroke_color\n#pragma mapbox: define mediump float stroke_width\n#pragma mapbox: define lowp float stroke_opacity\nvoid main(void) {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize mediump float radius\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize highp vec4 stroke_color\n#pragma mapbox: initialize mediump float stroke_width\n#pragma mapbox: initialize lowp float stroke_opacity\nvec2 extrude=vec2(mod(a_pos,2.0)*2.0-1.0);vec2 circle_center=floor(a_pos*0.5);if (u_pitch_with_map) {vec2 corner_position=circle_center;if (u_scale_with_map) {corner_position+=extrude*(radius+stroke_width)*u_extrude_scale;} else {vec4 projected_center=u_matrix*vec4(circle_center,0,1);corner_position+=extrude*(radius+stroke_width)*u_extrude_scale*(projected_center.w/u_camera_to_center_distance);}gl_Position=u_matrix*vec4(corner_position,0,1);} else {gl_Position=u_matrix*vec4(circle_center,0,1);if (u_scale_with_map) {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*u_camera_to_center_distance;} else {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*gl_Position.w;}}lowp float antialiasblur=1.0/u_device_pixel_ratio/(radius+stroke_width);v_data=vec3(extrude.x,extrude.y,antialiasblur);}"),He=gr("void main() {gl_FragColor=vec4(1.0);}","attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),Je=gr("uniform highp float u_intensity;varying vec2 v_extrude;\n#pragma mapbox: define highp float weight\n#define GAUSS_COEF 0.3989422804014327\nvoid main() {\n#pragma mapbox: initialize highp float weight\nfloat d=-0.5*3.0*3.0*dot(v_extrude,v_extrude);float val=weight*u_intensity*GAUSS_COEF*exp(d);gl_FragColor=vec4(val,1.0,1.0,1.0);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform float u_extrude_scale;uniform float u_opacity;uniform float u_intensity;attribute vec2 a_pos;varying vec2 v_extrude;\n#pragma mapbox: define highp float weight\n#pragma mapbox: define mediump float radius\nconst highp float ZERO=1.0/255.0/16.0;\n#define GAUSS_COEF 0.3989422804014327\nvoid main(void) {\n#pragma mapbox: initialize highp float weight\n#pragma mapbox: initialize mediump float radius\nvec2 unscaled_extrude=vec2(mod(a_pos,2.0)*2.0-1.0);float S=sqrt(-2.0*log(ZERO/weight/u_intensity/GAUSS_COEF))/3.0;v_extrude=S*unscaled_extrude;vec2 extrude=v_extrude*radius*u_extrude_scale;vec4 pos=vec4(floor(a_pos*0.5)+extrude,0,1);gl_Position=u_matrix*pos;}"),Ye=gr("uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;varying vec2 v_pos;void main() {float t=texture2D(u_image,v_pos).r;vec4 color=texture2D(u_color_ramp,vec2(t,0.5));gl_FragColor=color*u_opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(0.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_world;attribute vec2 a_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos*u_world,0,1);v_pos.x=a_pos.x;v_pos.y=1.0-a_pos.y;}"),Qe=gr("varying float v_placed;varying float v_notUsed;void main() {float alpha=0.5;gl_FragColor=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {gl_FragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {gl_FragColor*=.1;}}","attribute vec2 a_pos;attribute vec2 a_anchor_pos;attribute vec2 a_extrude;attribute vec2 a_placed;attribute vec2 a_shift;uniform mat4 u_matrix;uniform vec2 u_extrude_scale;uniform float u_camera_to_center_distance;varying float v_placed;varying float v_notUsed;void main() {vec4 projectedPoint=u_matrix*vec4(a_anchor_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);gl_Position=u_matrix*vec4(a_pos,0.0,1.0);gl_Position.xy+=(a_extrude+a_shift)*u_extrude_scale*gl_Position.w*collision_perspective_ratio;v_placed=a_placed.x;v_notUsed=a_placed.y;}"),$e=gr("varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;void main() {float alpha=0.5*min(v_perspective_ratio,1.0);float stroke_radius=0.9*max(v_perspective_ratio,1.0);float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);gl_FragColor=color*alpha*opacity_t;}","attribute vec2 a_pos;attribute float a_radius;attribute vec2 a_flags;uniform mat4 u_matrix;uniform mat4 u_inv_matrix;uniform vec2 u_viewport_size;uniform float u_camera_to_center_distance;varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;vec3 toTilePosition(vec2 screenPos) {vec4 rayStart=u_inv_matrix*vec4(screenPos,-1.0,1.0);vec4 rayEnd =u_inv_matrix*vec4(screenPos, 1.0,1.0);rayStart.xyz/=rayStart.w;rayEnd.xyz /=rayEnd.w;highp float t=(0.0-rayStart.z)/(rayEnd.z-rayStart.z);return mix(rayStart.xyz,rayEnd.xyz,t);}void main() {vec2 quadCenterPos=a_pos;float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;vec3 tilePos=toTilePosition(quadCenterPos);vec4 clipPos=u_matrix*vec4(tilePos,1.0);highp float camera_to_anchor_distance=clipPos.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_perspective_ratio=collision_perspective_ratio;v_collision=collision;gl_Position=vec4(clipPos.xyz/clipPos.w,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}"),tr=gr("uniform highp vec4 u_color;uniform sampler2D u_overlay;varying vec2 v_uv;void main() {vec4 overlay_color=texture2D(u_overlay,v_uv);gl_FragColor=mix(u_color,overlay_color,overlay_color.a);}","attribute vec2 a_pos;varying vec2 v_uv;uniform mat4 u_matrix;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=u_matrix*vec4(a_pos*u_overlay_scale,0,1);}"),er=gr("#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float opacity\ngl_FragColor=color*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float opacity\ngl_Position=u_matrix*vec4(a_pos,0,1);}"),rr=gr("varying vec2 v_pos;\n#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 outline_color\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=outline_color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;uniform vec2 u_world;varying vec2 v_pos;\n#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 outline_color\n#pragma mapbox: initialize lowp float opacity\ngl_Position=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}"),ir=gr("uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=mix(color1,color2,u_fade)*alpha*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;gl_Position=u_matrix*vec4(a_pos,0,1);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}"),nr=gr("uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_fade)*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}"),or=gr("varying vec4 v_color;void main() {gl_FragColor=v_color;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec4 v_color;\n#pragma mapbox: define highp float base\n#pragma mapbox: define highp float height\n#pragma mapbox: define highp vec4 color\nvoid main() {\n#pragma mapbox: initialize highp float base\n#pragma mapbox: initialize highp float height\n#pragma mapbox: initialize highp vec4 color\nvec3 normal=a_normal_ed.xyz;base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);gl_Position=u_matrix*vec4(a_pos,t > 0.0 ? height : base,1);float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;float directional=clamp(dot(normal/16384.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}"),ar=gr("uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float base\n#pragma mapbox: initialize lowp float height\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);gl_FragColor=mixedColor*v_lighting;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float base\n#pragma mapbox: initialize lowp float height\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);float z=t > 0.0 ? height : base;gl_Position=u_matrix*vec4(a_pos,z,1);vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0\n? a_pos\n: vec2(edgedistance,z*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}"),sr=gr("#ifdef GL_ES\nprecision highp float;\n#endif\nuniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform float u_maxzoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture2D(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack)/4.0;}void main() {vec2 epsilon=1.0/u_dimension;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggeration=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/ pow(2.0,(u_zoom-u_maxzoom)*exaggeration+19.2562-u_zoom);gl_FragColor=clamp(vec4(deriv.x/2.0+0.5,deriv.y/2.0+0.5,1.0,1.0),0.0,1.0);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_dimension;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}"),lr=gr("uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent;\n#define PI 3.141592653589793\nvoid main() {vec4 pixel=texture2D(u_image,v_pos);vec2 deriv=((pixel.rg*2.0)-1.0);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));float slope=atan(1.25*length(deriv)/scaleFactor);float aspect=deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);float intensity=u_light.x;float azimuth=u_light.y+PI;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadow,u_highlight,shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);gl_FragColor=accent_color*(1.0-shade_color.a)+shade_color;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=a_texture_pos/8192.0;}"),ur=gr("uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);gl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_linesofar;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}"),cr=gr("uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp float v_lineprogress;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture2D(u_image,vec2(v_lineprogress,0.5));gl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define MAX_LINE_DISTANCE 32767.0\n#define scale 0.015873016\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_lineprogress;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_lineprogress=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0/MAX_LINE_DISTANCE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}"),pr=gr("uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture2D(u_image,pos_a),texture2D(u_image,pos_b),u_fade);gl_FragColor=color*alpha*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\n#define LINE_DISTANCE_SCALE 2.0\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}"),hr=gr("uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;uniform float u_mix;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float sdfdist_a=texture2D(u_image,v_tex_a).a;float sdfdist_b=texture2D(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);alpha*=smoothstep(0.5-u_sdfgamma/floorwidth,0.5+u_sdfgamma/floorwidth,sdfdist);gl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\n#define LINE_DISTANCE_SCALE 2.0\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_patternscale_a;uniform float u_tex_y_a;uniform vec2 u_patternscale_b;uniform float u_tex_y_b;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_tex_a=vec2(a_linesofar*u_patternscale_a.x/floorwidth,normal.y*u_patternscale_a.y+u_tex_y_a);v_tex_b=vec2(a_linesofar*u_patternscale_b.x/floorwidth,normal.y*u_patternscale_b.y+u_tex_y_b);v_width2=vec2(outset,inset);}"),fr=gr("uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;varying vec2 v_pos0;varying vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture2D(u_image0,v_pos0);vec4 color1=texture2D(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);gl_FragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos0;varying vec2 v_pos1;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos0=(((a_texture_pos/8192.0)-0.5)/u_buffer_scale )+0.5;v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}"),dr=gr("uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity;\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\nlowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;varying vec2 v_tex;varying float v_fade_opacity;\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0),0.0,1.0);v_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;v_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));}"),mr=gr("#define SDF_PX 8.0\nuniform bool u_is_halo;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;varying vec2 v_data0;varying vec3 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nfloat EDGE_GAMMA=0.105/u_device_pixel_ratio;vec2 tex=v_data0.xy;float gamma_scale=v_data1.x;float size=v_data1.y;float fade_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;varying vec2 v_data0;varying vec3 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}"),yr=gr("#define SDF_PX 8.0\n#define SDF 1.0\n#define ICON 0.0\nuniform bool u_is_halo;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;varying vec4 v_data0;varying vec4 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nfloat fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;gl_FragColor=texture2D(u_texture_icon,tex_icon)*alpha;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\nreturn;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;varying vec4 v_data0;varying vec4 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}");function gr(t,e){var r=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,i={};return{fragmentSource:t=t.replace(r,function(t,e,r,n,o){return i[o]=!0,"define"===e?"\n#ifndef HAS_UNIFORM_u_"+o+"\nvarying "+r+" "+n+" "+o+";\n#else\nuniform "+r+" "+n+" u_"+o+";\n#endif\n":"\n#ifdef HAS_UNIFORM_u_"+o+"\n "+r+" "+n+" "+o+" = u_"+o+";\n#endif\n"}),vertexSource:e=e.replace(r,function(t,e,r,n,o){var a="float"===n?"vec2":"vec4",s=o.match(/color/)?"color":a;return i[o]?"define"===e?"\n#ifndef HAS_UNIFORM_u_"+o+"\nuniform lowp float u_"+o+"_t;\nattribute "+r+" "+a+" a_"+o+";\nvarying "+r+" "+n+" "+o+";\n#else\nuniform "+r+" "+n+" u_"+o+";\n#endif\n":"vec4"===s?"\n#ifndef HAS_UNIFORM_u_"+o+"\n "+o+" = a_"+o+";\n#else\n "+r+" "+n+" "+o+" = u_"+o+";\n#endif\n":"\n#ifndef HAS_UNIFORM_u_"+o+"\n "+o+" = unpack_mix_"+s+"(a_"+o+", u_"+o+"_t);\n#else\n "+r+" "+n+" "+o+" = u_"+o+";\n#endif\n":"define"===e?"\n#ifndef HAS_UNIFORM_u_"+o+"\nuniform lowp float u_"+o+"_t;\nattribute "+r+" "+a+" a_"+o+";\n#else\nuniform "+r+" "+n+" u_"+o+";\n#endif\n":"vec4"===s?"\n#ifndef HAS_UNIFORM_u_"+o+"\n "+r+" "+n+" "+o+" = a_"+o+";\n#else\n "+r+" "+n+" "+o+" = u_"+o+";\n#endif\n":"\n#ifndef HAS_UNIFORM_u_"+o+"\n "+r+" "+n+" "+o+" = unpack_mix_"+s+"(a_"+o+", u_"+o+"_t);\n#else\n "+r+" "+n+" "+o+" = u_"+o+";\n#endif\n"})}}var _r=Object.freeze({__proto__:null,prelude:Ge,background:Xe,backgroundPattern:We,circle:Ke,clippingMask:He,heatmap:Je,heatmapTexture:Ye,collisionBox:Qe,collisionCircle:$e,debug:tr,fill:er,fillOutline:rr,fillOutlinePattern:ir,fillPattern:nr,fillExtrusion:or,fillExtrusionPattern:ar,hillshadePrepare:sr,hillshade:lr,line:ur,lineGradient:cr,linePattern:pr,lineSDF:hr,raster:fr,symbolIcon:dr,symbolSDF:mr,symbolTextAndIcon:yr}),vr=function(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null};vr.prototype.bind=function(t,e,r,i,n,o,a,s){this.context=t;for(var l=this.boundPaintVertexBuffers.length!==i.length,u=0;!l&&u<i.length;u++)this.boundPaintVertexBuffers[u]!==i[u]&&(l=!0);t.extVertexArrayObject&&this.vao&&this.boundProgram===e&&this.boundLayoutVertexBuffer===r&&!l&&this.boundIndexBuffer===n&&this.boundVertexOffset===o&&this.boundDynamicVertexBuffer===a&&this.boundDynamicVertexBuffer2===s?(t.bindVertexArrayOES.set(this.vao),a&&a.bind(),n&&n.dynamicDraw&&n.bind(),s&&s.bind()):this.freshBind(e,r,i,n,o,a,s)},vr.prototype.freshBind=function(t,e,r,i,n,o,a){var s,l=t.numAttributes,u=this.context,c=u.gl;if(u.extVertexArrayObject)this.vao&&this.destroy(),this.vao=u.extVertexArrayObject.createVertexArrayOES(),u.bindVertexArrayOES.set(this.vao),s=0,this.boundProgram=t,this.boundLayoutVertexBuffer=e,this.boundPaintVertexBuffers=r,this.boundIndexBuffer=i,this.boundVertexOffset=n,this.boundDynamicVertexBuffer=o,this.boundDynamicVertexBuffer2=a;else{s=u.currentNumAttributes||0;for(var p=l;p<s;p++)c.disableVertexAttribArray(p)}e.enableAttributes(c,t);for(var h=0,f=r;h<f.length;h+=1)f[h].enableAttributes(c,t);o&&o.enableAttributes(c,t),a&&a.enableAttributes(c,t),e.bind(),e.setVertexAttribPointers(c,t,n);for(var d=0,m=r;d<m.length;d+=1){var y=m[d];y.bind(),y.setVertexAttribPointers(c,t,n)}o&&(o.bind(),o.setVertexAttribPointers(c,t,n)),i&&i.bind(),a&&(a.bind(),a.setVertexAttribPointers(c,t,n)),u.currentNumAttributes=l},vr.prototype.destroy=function(){this.vao&&(this.context.extVertexArrayObject.deleteVertexArrayOES(this.vao),this.vao=null)};var xr=function(t,e,r,i,n){var o=t.gl;this.program=o.createProgram();var a=r?r.defines():[];n&&a.push("#define OVERDRAW_INSPECTOR;");var s=a.concat(Ge.fragmentSource,e.fragmentSource).join("\n"),l=a.concat(Ge.vertexSource,e.vertexSource).join("\n"),u=o.createShader(o.FRAGMENT_SHADER);if(o.isContextLost())this.failedToCreate=!0;else{o.shaderSource(u,s),o.compileShader(u),o.attachShader(this.program,u);var c=o.createShader(o.VERTEX_SHADER);if(o.isContextLost())this.failedToCreate=!0;else{o.shaderSource(c,l),o.compileShader(c),o.attachShader(this.program,c);for(var p=r?r.layoutAttributes:[],h=0;h<p.length;h++)o.bindAttribLocation(this.program,h,p[h].name);o.linkProgram(this.program),o.deleteShader(c),o.deleteShader(u),this.numAttributes=o.getProgramParameter(this.program,o.ACTIVE_ATTRIBUTES),this.attributes={};for(var f={},d=0;d<this.numAttributes;d++){var m=o.getActiveAttrib(this.program,d);m&&(this.attributes[m.name]=o.getAttribLocation(this.program,m.name))}for(var y=o.getProgramParameter(this.program,o.ACTIVE_UNIFORMS),g=0;g<y;g++){var _=o.getActiveUniform(this.program,g);_&&(f[_.name]=o.getUniformLocation(this.program,_.name))}this.fixedUniforms=i(t,f),this.binderUniforms=r?r.getUniforms(t,f):[]}}};function br(t,e,r){var i=1/he(r,1,e.transform.tileZoom),n=Math.pow(2,r.tileID.overscaledZ),o=r.tileSize*Math.pow(2,e.transform.tileZoom)/n,a=o*(r.tileID.canonical.x+r.tileID.wrap*n),s=o*r.tileID.canonical.y;return{u_image:0,u_texsize:r.imageAtlasTexture.size,u_scale:[i,t.fromScale,t.toScale],u_fade:t.t,u_pixel_coord_upper:[a>>16,s>>16],u_pixel_coord_lower:[65535&a,65535&s]}}xr.prototype.draw=function(t,e,r,i,n,o,a,s,l,u,c,p,h,f,d,m){var y,g=t.gl;if(!this.failedToCreate){for(var _ in t.program.set(this.program),t.setDepthMode(r),t.setStencilMode(i),t.setColorMode(n),t.setCullFace(o),this.fixedUniforms)this.fixedUniforms[_].set(a[_]);f&&f.setUniforms(t,this.binderUniforms,p,{zoom:h});for(var v=(y={},y[g.LINES]=2,y[g.TRIANGLES]=3,y[g.LINE_STRIP]=1,y)[e],x=0,b=c.get();x<b.length;x+=1){var w=b[x],S=w.vaos||(w.vaos={});(S[s]||(S[s]=new vr)).bind(t,this,l,f?f.getPaintVertexBuffers():[],u,w.vertexOffset,d,m),g.drawElements(e,w.primitiveLength*v,g.UNSIGNED_SHORT,w.primitiveOffset*v*2)}}};var wr=function(e,r,i,n){var o=r.style.light,a=o.properties.get("position"),s=[a.x,a.y,a.z],l=t.create$1();"viewport"===o.properties.get("anchor")&&t.fromRotation(l,-r.transform.angle),t.transformMat3(s,s,l);var u=o.properties.get("color");return{u_matrix:e,u_lightpos:s,u_lightintensity:o.properties.get("intensity"),u_lightcolor:[u.r,u.g,u.b],u_vertical_gradient:+i,u_opacity:n}},Sr=function(e,r,i,n,o,a,s){return t.extend(wr(e,r,i,n),br(a,r,s),{u_height_factor:-Math.pow(2,o.overscaledZ)/s.tileSize/8})},Tr=function(t){return{u_matrix:t}},Ir=function(e,r,i,n){return t.extend(Tr(e),br(i,r,n))},Er=function(t,e){return{u_matrix:t,u_world:e}},Ar=function(e,r,i,n,o){return t.extend(Ir(e,r,i,n),{u_world:o})},zr=function(e,r,i,n){var o,a,s=e.transform;if("map"===n.paint.get("circle-pitch-alignment")){var l=he(i,1,s.zoom);o=!0,a=[l,l]}else o=!1,a=s.pixelsToGLUnits;return{u_camera_to_center_distance:s.cameraToCenterDistance,u_scale_with_map:+("map"===n.paint.get("circle-pitch-scale")),u_matrix:e.translatePosMatrix(r.posMatrix,i,n.paint.get("circle-translate"),n.paint.get("circle-translate-anchor")),u_pitch_with_map:+o,u_device_pixel_ratio:t.browser.devicePixelRatio,u_extrude_scale:a}},Pr=function(t,e,r){var i=he(r,1,e.zoom),n=Math.pow(2,e.zoom-r.tileID.overscaledZ),o=r.tileID.overscaleFactor();return{u_matrix:t,u_camera_to_center_distance:e.cameraToCenterDistance,u_pixels_to_tile_units:i,u_extrude_scale:[e.pixelsToGLUnits[0]/(i*n),e.pixelsToGLUnits[1]/(i*n)],u_overscale_factor:o}},Cr=function(t,e,r){return{u_matrix:t,u_inv_matrix:e,u_camera_to_center_distance:r.cameraToCenterDistance,u_viewport_size:[r.width,r.height]}},kr=function(t,e,r){return void 0===r&&(r=1),{u_matrix:t,u_color:e,u_overlay:0,u_overlay_scale:r}},Mr=function(t){return{u_matrix:t}},Dr=function(t,e,r,i){return{u_matrix:t,u_extrude_scale:he(e,1,r),u_intensity:i}},Lr=function(e,r,i){var n=e.transform;return{u_matrix:Ur(e,r,i),u_ratio:1/he(r,1,n.zoom),u_device_pixel_ratio:t.browser.devicePixelRatio,u_units_to_pixels:[1/n.pixelsToGLUnits[0],1/n.pixelsToGLUnits[1]]}},Rr=function(e,r,i){return t.extend(Lr(e,r,i),{u_image:0})},Br=function(e,r,i,n){var o=e.transform,a=Or(r,o);return{u_matrix:Ur(e,r,i),u_texsize:r.imageAtlasTexture.size,u_ratio:1/he(r,1,o.zoom),u_device_pixel_ratio:t.browser.devicePixelRatio,u_image:0,u_scale:[a,n.fromScale,n.toScale],u_fade:n.t,u_units_to_pixels:[1/o.pixelsToGLUnits[0],1/o.pixelsToGLUnits[1]]}},Fr=function(e,r,i,n,o){var a=e.lineAtlas,s=Or(r,e.transform),l="round"===i.layout.get("line-cap"),u=a.getDash(n.from,l),c=a.getDash(n.to,l),p=u.width*o.fromScale,h=c.width*o.toScale;return t.extend(Lr(e,r,i),{u_patternscale_a:[s/p,-u.height/2],u_patternscale_b:[s/h,-c.height/2],u_sdfgamma:a.width/(256*Math.min(p,h)*t.browser.devicePixelRatio)/2,u_image:0,u_tex_y_a:u.y,u_tex_y_b:c.y,u_mix:o.t})};function Or(t,e){return 1/he(t,1,e.tileZoom)}function Ur(t,e,r){return t.translatePosMatrix(e.tileID.posMatrix,e,r.paint.get("line-translate"),r.paint.get("line-translate-anchor"))}var Vr=function(t,e,r,i,n){return{u_matrix:t,u_tl_parent:e,u_scale_parent:r,u_buffer_scale:1,u_fade_t:i.mix,u_opacity:i.opacity*n.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:n.paint.get("raster-brightness-min"),u_brightness_high:n.paint.get("raster-brightness-max"),u_saturation_factor:(a=n.paint.get("raster-saturation"),a>0?1-1/(1.001-a):-a),u_contrast_factor:(o=n.paint.get("raster-contrast"),o>0?1/(1-o):1+o),u_spin_weights:Nr(n.paint.get("raster-hue-rotate"))};var o,a};function Nr(t){t*=Math.PI/180;var e=Math.sin(t),r=Math.cos(t);return[(2*r+1)/3,(-Math.sqrt(3)*e-r+1)/3,(Math.sqrt(3)*e-r+1)/3]}var jr,qr=function(t,e,r,i,n,o,a,s,l,u){var c=n.transform;return{u_is_size_zoom_constant:+("constant"===t||"source"===t),u_is_size_feature_constant:+("constant"===t||"camera"===t),u_size_t:e?e.uSizeT:0,u_size:e?e.uSize:0,u_camera_to_center_distance:c.cameraToCenterDistance,u_pitch:c.pitch/360*2*Math.PI,u_rotate_symbol:+r,u_aspect_ratio:c.width/c.height,u_fade_change:n.options.fadeDuration?n.symbolFadeChange:1,u_matrix:o,u_label_plane_matrix:a,u_coord_matrix:s,u_is_text:+l,u_pitch_with_map:+i,u_texsize:u,u_texture:0}},Zr=function(e,r,i,n,o,a,s,l,u,c,p){var h=o.transform;return t.extend(qr(e,r,i,n,o,a,s,l,u,c),{u_gamma_scale:n?Math.cos(h._pitch)*h.cameraToCenterDistance:1,u_device_pixel_ratio:t.browser.devicePixelRatio,u_is_halo:+p})},Gr=function(e,r,i,n,o,a,s,l,u,c){return t.extend(Zr(e,r,i,n,o,a,s,l,!0,u,!0),{u_texsize_icon:c,u_texture_icon:1})},Xr=function(t,e,r){return{u_matrix:t,u_opacity:e,u_color:r}},Wr=function(e,r,i,n,o,a){return t.extend(function(t,e,r,i){var n=r.imageManager.getPattern(t.from.toString()),o=r.imageManager.getPattern(t.to.toString()),a=r.imageManager.getPixelSize(),s=a.width,l=a.height,u=Math.pow(2,i.tileID.overscaledZ),c=i.tileSize*Math.pow(2,r.transform.tileZoom)/u,p=c*(i.tileID.canonical.x+i.tileID.wrap*u),h=c*i.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:n.tl,u_pattern_br_a:n.br,u_pattern_tl_b:o.tl,u_pattern_br_b:o.br,u_texsize:[s,l],u_mix:e.t,u_pattern_size_a:n.displaySize,u_pattern_size_b:o.displaySize,u_scale_a:e.fromScale,u_scale_b:e.toScale,u_tile_units_to_pixels:1/he(i,1,r.transform.tileZoom),u_pixel_coord_upper:[p>>16,h>>16],u_pixel_coord_lower:[65535&p,65535&h]}}(n,a,i,o),{u_matrix:e,u_opacity:r})},Kr={fillExtrusion:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_lightpos:new t.Uniform3f(e,r.u_lightpos),u_lightintensity:new t.Uniform1f(e,r.u_lightintensity),u_lightcolor:new t.Uniform3f(e,r.u_lightcolor),u_vertical_gradient:new t.Uniform1f(e,r.u_vertical_gradient),u_opacity:new t.Uniform1f(e,r.u_opacity)}},fillExtrusionPattern:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_lightpos:new t.Uniform3f(e,r.u_lightpos),u_lightintensity:new t.Uniform1f(e,r.u_lightintensity),u_lightcolor:new t.Uniform3f(e,r.u_lightcolor),u_vertical_gradient:new t.Uniform1f(e,r.u_vertical_gradient),u_height_factor:new t.Uniform1f(e,r.u_height_factor),u_image:new t.Uniform1i(e,r.u_image),u_texsize:new t.Uniform2f(e,r.u_texsize),u_pixel_coord_upper:new t.Uniform2f(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(e,r.u_pixel_coord_lower),u_scale:new t.Uniform3f(e,r.u_scale),u_fade:new t.Uniform1f(e,r.u_fade),u_opacity:new t.Uniform1f(e,r.u_opacity)}},fill:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix)}},fillPattern:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_image:new t.Uniform1i(e,r.u_image),u_texsize:new t.Uniform2f(e,r.u_texsize),u_pixel_coord_upper:new t.Uniform2f(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(e,r.u_pixel_coord_lower),u_scale:new t.Uniform3f(e,r.u_scale),u_fade:new t.Uniform1f(e,r.u_fade)}},fillOutline:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_world:new t.Uniform2f(e,r.u_world)}},fillOutlinePattern:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_world:new t.Uniform2f(e,r.u_world),u_image:new t.Uniform1i(e,r.u_image),u_texsize:new t.Uniform2f(e,r.u_texsize),u_pixel_coord_upper:new t.Uniform2f(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(e,r.u_pixel_coord_lower),u_scale:new t.Uniform3f(e,r.u_scale),u_fade:new t.Uniform1f(e,r.u_fade)}},circle:function(e,r){return{u_camera_to_center_distance:new t.Uniform1f(e,r.u_camera_to_center_distance),u_scale_with_map:new t.Uniform1i(e,r.u_scale_with_map),u_pitch_with_map:new t.Uniform1i(e,r.u_pitch_with_map),u_extrude_scale:new t.Uniform2f(e,r.u_extrude_scale),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_matrix:new t.UniformMatrix4f(e,r.u_matrix)}},collisionBox:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_camera_to_center_distance:new t.Uniform1f(e,r.u_camera_to_center_distance),u_pixels_to_tile_units:new t.Uniform1f(e,r.u_pixels_to_tile_units),u_extrude_scale:new t.Uniform2f(e,r.u_extrude_scale),u_overscale_factor:new t.Uniform1f(e,r.u_overscale_factor)}},collisionCircle:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_inv_matrix:new t.UniformMatrix4f(e,r.u_inv_matrix),u_camera_to_center_distance:new t.Uniform1f(e,r.u_camera_to_center_distance),u_viewport_size:new t.Uniform2f(e,r.u_viewport_size)}},debug:function(e,r){return{u_color:new t.UniformColor(e,r.u_color),u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_overlay:new t.Uniform1i(e,r.u_overlay),u_overlay_scale:new t.Uniform1f(e,r.u_overlay_scale)}},clippingMask:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix)}},heatmap:function(e,r){return{u_extrude_scale:new t.Uniform1f(e,r.u_extrude_scale),u_intensity:new t.Uniform1f(e,r.u_intensity),u_matrix:new t.UniformMatrix4f(e,r.u_matrix)}},heatmapTexture:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_world:new t.Uniform2f(e,r.u_world),u_image:new t.Uniform1i(e,r.u_image),u_color_ramp:new t.Uniform1i(e,r.u_color_ramp),u_opacity:new t.Uniform1f(e,r.u_opacity)}},hillshade:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_image:new t.Uniform1i(e,r.u_image),u_latrange:new t.Uniform2f(e,r.u_latrange),u_light:new t.Uniform2f(e,r.u_light),u_shadow:new t.UniformColor(e,r.u_shadow),u_highlight:new t.UniformColor(e,r.u_highlight),u_accent:new t.UniformColor(e,r.u_accent)}},hillshadePrepare:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_image:new t.Uniform1i(e,r.u_image),u_dimension:new t.Uniform2f(e,r.u_dimension),u_zoom:new t.Uniform1f(e,r.u_zoom),u_maxzoom:new t.Uniform1f(e,r.u_maxzoom),u_unpack:new t.Uniform4f(e,r.u_unpack)}},line:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_ratio:new t.Uniform1f(e,r.u_ratio),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_units_to_pixels:new t.Uniform2f(e,r.u_units_to_pixels)}},lineGradient:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_ratio:new t.Uniform1f(e,r.u_ratio),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_units_to_pixels:new t.Uniform2f(e,r.u_units_to_pixels),u_image:new t.Uniform1i(e,r.u_image)}},linePattern:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_texsize:new t.Uniform2f(e,r.u_texsize),u_ratio:new t.Uniform1f(e,r.u_ratio),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_image:new t.Uniform1i(e,r.u_image),u_units_to_pixels:new t.Uniform2f(e,r.u_units_to_pixels),u_scale:new t.Uniform3f(e,r.u_scale),u_fade:new t.Uniform1f(e,r.u_fade)}},lineSDF:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_ratio:new t.Uniform1f(e,r.u_ratio),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_units_to_pixels:new t.Uniform2f(e,r.u_units_to_pixels),u_patternscale_a:new t.Uniform2f(e,r.u_patternscale_a),u_patternscale_b:new t.Uniform2f(e,r.u_patternscale_b),u_sdfgamma:new t.Uniform1f(e,r.u_sdfgamma),u_image:new t.Uniform1i(e,r.u_image),u_tex_y_a:new t.Uniform1f(e,r.u_tex_y_a),u_tex_y_b:new t.Uniform1f(e,r.u_tex_y_b),u_mix:new t.Uniform1f(e,r.u_mix)}},raster:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_tl_parent:new t.Uniform2f(e,r.u_tl_parent),u_scale_parent:new t.Uniform1f(e,r.u_scale_parent),u_buffer_scale:new t.Uniform1f(e,r.u_buffer_scale),u_fade_t:new t.Uniform1f(e,r.u_fade_t),u_opacity:new t.Uniform1f(e,r.u_opacity),u_image0:new t.Uniform1i(e,r.u_image0),u_image1:new t.Uniform1i(e,r.u_image1),u_brightness_low:new t.Uniform1f(e,r.u_brightness_low),u_brightness_high:new t.Uniform1f(e,r.u_brightness_high),u_saturation_factor:new t.Uniform1f(e,r.u_saturation_factor),u_contrast_factor:new t.Uniform1f(e,r.u_contrast_factor),u_spin_weights:new t.Uniform3f(e,r.u_spin_weights)}},symbolIcon:function(e,r){return{u_is_size_zoom_constant:new t.Uniform1i(e,r.u_is_size_zoom_constant),u_is_size_feature_constant:new t.Uniform1i(e,r.u_is_size_feature_constant),u_size_t:new t.Uniform1f(e,r.u_size_t),u_size:new t.Uniform1f(e,r.u_size),u_camera_to_center_distance:new t.Uniform1f(e,r.u_camera_to_center_distance),u_pitch:new t.Uniform1f(e,r.u_pitch),u_rotate_symbol:new t.Uniform1i(e,r.u_rotate_symbol),u_aspect_ratio:new t.Uniform1f(e,r.u_aspect_ratio),u_fade_change:new t.Uniform1f(e,r.u_fade_change),u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_label_plane_matrix:new t.UniformMatrix4f(e,r.u_label_plane_matrix),u_coord_matrix:new t.UniformMatrix4f(e,r.u_coord_matrix),u_is_text:new t.Uniform1i(e,r.u_is_text),u_pitch_with_map:new t.Uniform1i(e,r.u_pitch_with_map),u_texsize:new t.Uniform2f(e,r.u_texsize),u_texture:new t.Uniform1i(e,r.u_texture)}},symbolSDF:function(e,r){return{u_is_size_zoom_constant:new t.Uniform1i(e,r.u_is_size_zoom_constant),u_is_size_feature_constant:new t.Uniform1i(e,r.u_is_size_feature_constant),u_size_t:new t.Uniform1f(e,r.u_size_t),u_size:new t.Uniform1f(e,r.u_size),u_camera_to_center_distance:new t.Uniform1f(e,r.u_camera_to_center_distance),u_pitch:new t.Uniform1f(e,r.u_pitch),u_rotate_symbol:new t.Uniform1i(e,r.u_rotate_symbol),u_aspect_ratio:new t.Uniform1f(e,r.u_aspect_ratio),u_fade_change:new t.Uniform1f(e,r.u_fade_change),u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_label_plane_matrix:new t.UniformMatrix4f(e,r.u_label_plane_matrix),u_coord_matrix:new t.UniformMatrix4f(e,r.u_coord_matrix),u_is_text:new t.Uniform1i(e,r.u_is_text),u_pitch_with_map:new t.Uniform1i(e,r.u_pitch_with_map),u_texsize:new t.Uniform2f(e,r.u_texsize),u_texture:new t.Uniform1i(e,r.u_texture),u_gamma_scale:new t.Uniform1f(e,r.u_gamma_scale),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_is_halo:new t.Uniform1i(e,r.u_is_halo)}},symbolTextAndIcon:function(e,r){return{u_is_size_zoom_constant:new t.Uniform1i(e,r.u_is_size_zoom_constant),u_is_size_feature_constant:new t.Uniform1i(e,r.u_is_size_feature_constant),u_size_t:new t.Uniform1f(e,r.u_size_t),u_size:new t.Uniform1f(e,r.u_size),u_camera_to_center_distance:new t.Uniform1f(e,r.u_camera_to_center_distance),u_pitch:new t.Uniform1f(e,r.u_pitch),u_rotate_symbol:new t.Uniform1i(e,r.u_rotate_symbol),u_aspect_ratio:new t.Uniform1f(e,r.u_aspect_ratio),u_fade_change:new t.Uniform1f(e,r.u_fade_change),u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_label_plane_matrix:new t.UniformMatrix4f(e,r.u_label_plane_matrix),u_coord_matrix:new t.UniformMatrix4f(e,r.u_coord_matrix),u_is_text:new t.Uniform1i(e,r.u_is_text),u_pitch_with_map:new t.Uniform1i(e,r.u_pitch_with_map),u_texsize:new t.Uniform2f(e,r.u_texsize),u_texsize_icon:new t.Uniform2f(e,r.u_texsize_icon),u_texture:new t.Uniform1i(e,r.u_texture),u_texture_icon:new t.Uniform1i(e,r.u_texture_icon),u_gamma_scale:new t.Uniform1f(e,r.u_gamma_scale),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_is_halo:new t.Uniform1i(e,r.u_is_halo)}},background:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_opacity:new t.Uniform1f(e,r.u_opacity),u_color:new t.UniformColor(e,r.u_color)}},backgroundPattern:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_opacity:new t.Uniform1f(e,r.u_opacity),u_image:new t.Uniform1i(e,r.u_image),u_pattern_tl_a:new t.Uniform2f(e,r.u_pattern_tl_a),u_pattern_br_a:new t.Uniform2f(e,r.u_pattern_br_a),u_pattern_tl_b:new t.Uniform2f(e,r.u_pattern_tl_b),u_pattern_br_b:new t.Uniform2f(e,r.u_pattern_br_b),u_texsize:new t.Uniform2f(e,r.u_texsize),u_mix:new t.Uniform1f(e,r.u_mix),u_pattern_size_a:new t.Uniform2f(e,r.u_pattern_size_a),u_pattern_size_b:new t.Uniform2f(e,r.u_pattern_size_b),u_scale_a:new t.Uniform1f(e,r.u_scale_a),u_scale_b:new t.Uniform1f(e,r.u_scale_b),u_pixel_coord_upper:new t.Uniform2f(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(e,r.u_pixel_coord_lower),u_tile_units_to_pixels:new t.Uniform1f(e,r.u_tile_units_to_pixels)}}};function Hr(e,r,i,n,o,a,s){for(var l=e.context,u=l.gl,c=e.useProgram("collisionBox"),p=[],h=0,f=0,d=0;d<n.length;d++){var m=n[d],y=r.getTile(m),g=y.getBucket(i);if(g){var _=m.posMatrix;0===o[0]&&0===o[1]||(_=e.translatePosMatrix(m.posMatrix,y,o,a));var v=s?g.textCollisionBox:g.iconCollisionBox,x=g.collisionCircleArray;if(x.length>0){var b=t.create(),w=_;t.mul(b,g.placementInvProjMatrix,e.transform.glCoordMatrix),t.mul(b,b,g.placementViewportMatrix),p.push({circleArray:x,circleOffset:f,transform:w,invTransform:b}),f=h+=x.length/4}v&&c.draw(l,u.LINES,It.disabled,Et.disabled,e.colorModeForRenderPass(),zt.disabled,Pr(_,e.transform,y),i.id,v.layoutVertexBuffer,v.indexBuffer,v.segments,null,e.transform.zoom,null,null,v.collisionVertexBuffer)}}if(s&&p.length){var S=e.useProgram("collisionCircle"),T=new t.StructArrayLayout2f1f2i16;T.resize(4*h),T._trim();for(var I=0,E=0,A=p;E<A.length;E+=1)for(var z=A[E],P=0;P<z.circleArray.length/4;P++){var C=4*P,k=z.circleArray[C+0],M=z.circleArray[C+1],D=z.circleArray[C+2],L=z.circleArray[C+3];T.emplace(I++,k,M,D,L,0),T.emplace(I++,k,M,D,L,1),T.emplace(I++,k,M,D,L,2),T.emplace(I++,k,M,D,L,3)}(!jr||jr.length<2*h)&&(jr=function(e){var r=2*h,i=new t.StructArrayLayout3ui6;i.resize(r),i._trim();for(var n=0;n<r;n++){var o=6*n;i.uint16[o+0]=4*n+0,i.uint16[o+1]=4*n+1,i.uint16[o+2]=4*n+2,i.uint16[o+3]=4*n+2,i.uint16[o+4]=4*n+3,i.uint16[o+5]=4*n+0}return i}());for(var R=l.createIndexBuffer(jr,!0),B=l.createVertexBuffer(T,t.collisionCircleLayout.members,!0),F=0,O=p;F<O.length;F+=1){var U=O[F],V=Cr(U.transform,U.invTransform,e.transform);S.draw(l,u.TRIANGLES,It.disabled,Et.disabled,e.colorModeForRenderPass(),zt.disabled,V,i.id,B,R,t.SegmentVector.simpleSegment(0,2*U.circleOffset,U.circleArray.length,U.circleArray.length/2),null,e.transform.zoom,null,null,null)}B.destroy(),R.destroy()}}var Jr=t.identity(new Float32Array(16));function Yr(e,r,i,n,o,a){var s=t.getAnchorAlignment(e),l=-(s.horizontalAlign-.5)*r,u=-(s.verticalAlign-.5)*i,c=t.evaluateVariableOffset(e,n);return new t.Point((l/o+c[0])*a,(u/o+c[1])*a)}function Qr(e,r,i,n,o,a,s,l,u,c,p){var h=e.text.placedSymbolArray,f=e.text.dynamicLayoutVertexArray,d=e.icon.dynamicLayoutVertexArray,m={};f.clear();for(var y=0;y<h.length;y++){var g=h.get(y),_=g.hidden||!g.crossTileID||e.allowVerticalPlacement&&!g.placedOrientation?null:n[g.crossTileID];if(_){var v=new t.Point(g.anchorX,g.anchorY),x=$t(v,i?l:s),b=te(a.cameraToCenterDistance,x.signedDistanceFromCamera),w=o.evaluateSizeForFeature(e.textSizeData,c,g)*b/t.ONE_EM;i&&(w*=e.tilePixelRatio/u);for(var S=Yr(_.anchor,_.width,_.height,_.textOffset,_.textBoxScale,w),T=i?$t(v.add(S),s).point:x.point.add(r?S.rotate(-a.angle):S),I=e.allowVerticalPlacement&&g.placedOrientation===t.WritingMode.vertical?Math.PI/2:0,E=0;E<g.numGlyphs;E++)t.addDynamicAttributes(f,T,I);p&&g.associatedIconIndex>=0&&(m[g.associatedIconIndex]={shiftedAnchor:T,angle:I})}else ue(g.numGlyphs,f)}if(p){d.clear();for(var A=e.icon.placedSymbolArray,z=0;z<A.length;z++){var P=A.get(z);if(P.hidden)ue(P.numGlyphs,d);else{var C=m[z];if(C)for(var k=0;k<P.numGlyphs;k++)t.addDynamicAttributes(d,C.shiftedAnchor,C.angle);else ue(P.numGlyphs,d)}}e.icon.dynamicLayoutVertexBuffer.updateData(d)}e.text.dynamicLayoutVertexBuffer.updateData(f)}function $r(t,e,r){return r.iconsInText&&e?"symbolTextAndIcon":t?"symbolSDF":"symbolIcon"}function ti(e,r,i,n,o,a,s,l,u,c,p,h){for(var f=e.context,d=f.gl,m=e.transform,y="map"===l,g="map"===u,_=y&&"point"!==i.layout.get("symbol-placement"),v=y&&!g&&!_,x=void 0!==i.layout.get("symbol-sort-key").constantOr(1),b=e.depthModeForSublayer(0,It.ReadOnly),w=i.layout.get("text-variable-anchor"),S=[],T=0,I=n;T<I.length;T+=1){var E=I[T],A=r.getTile(E),z=A.getBucket(i);if(z){var P=o?z.text:z.icon;if(P&&P.segments.get().length){var C=P.programConfigurations.get(i.id),k=o||z.sdfIcons,M=o?z.textSizeData:z.iconSizeData,D=g||0!==m.pitch,L=e.useProgram($r(k,o,z),C),R=t.evaluateSizeForZoom(M,m.zoom),B=void 0,F=[0,0],O=void 0,U=void 0,V=null,N=void 0;if(o)O=A.glyphAtlasTexture,U=d.LINEAR,B=A.glyphAtlasTexture.size,z.iconsInText&&(F=A.imageAtlasTexture.size,V=A.imageAtlasTexture,N=D||e.options.rotating||e.options.zooming||"composite"===M.kind||"camera"===M.kind?d.LINEAR:d.NEAREST);else{var j=1!==i.layout.get("icon-size").constantOr(0)||z.iconsNeedLinear;O=A.imageAtlasTexture,U=k||e.options.rotating||e.options.zooming||j||D?d.LINEAR:d.NEAREST,B=A.imageAtlasTexture.size}var q=he(A,1,e.transform.zoom),Z=Yt(E.posMatrix,g,y,e.transform,q),G=Qt(E.posMatrix,g,y,e.transform,q),X=w&&z.hasTextData(),W="none"!==i.layout.get("icon-text-fit")&&X&&z.hasIconData();_&&re(z,E.posMatrix,e,o,Z,G,g,c);var K=e.translatePosMatrix(E.posMatrix,A,a,s),H=_||o&&w||W?Jr:Z,J=e.translatePosMatrix(G,A,a,s,!0),Y=k&&0!==i.paint.get(o?"text-halo-width":"icon-halo-width").constantOr(1),Q={program:L,buffers:P,uniformValues:k?z.iconsInText?Gr(M.kind,R,v,g,e,K,H,J,B,F):Zr(M.kind,R,v,g,e,K,H,J,o,B,!0):qr(M.kind,R,v,g,e,K,H,J,o,B),atlasTexture:O,atlasTextureIcon:V,atlasInterpolation:U,atlasInterpolationIcon:N,isSDF:k,hasHalo:Y};if(x)for(var $=0,tt=P.segments.get();$<tt.length;$+=1){var et=tt[$];S.push({segments:new t.SegmentVector([et]),sortKey:et.sortKey,state:Q})}else S.push({segments:P.segments,sortKey:0,state:Q})}}}x&&S.sort(function(t,e){return t.sortKey-e.sortKey});for(var rt=0,it=S;rt<it.length;rt+=1){var nt=it[rt],ot=nt.state;if(f.activeTexture.set(d.TEXTURE0),ot.atlasTexture.bind(ot.atlasInterpolation,d.CLAMP_TO_EDGE),ot.atlasTextureIcon&&(f.activeTexture.set(d.TEXTURE1),ot.atlasTextureIcon&&ot.atlasTextureIcon.bind(ot.atlasInterpolationIcon,d.CLAMP_TO_EDGE)),ot.isSDF){var at=ot.uniformValues;ot.hasHalo&&(at.u_is_halo=1,ei(ot.buffers,nt.segments,i,e,ot.program,b,p,h,at)),at.u_is_halo=0}ei(ot.buffers,nt.segments,i,e,ot.program,b,p,h,ot.uniformValues)}}function ei(t,e,r,i,n,o,a,s,l){var u=i.context;n.draw(u,u.gl.TRIANGLES,o,a,s,zt.disabled,l,r.id,t.layoutVertexBuffer,t.indexBuffer,e,r.paint,i.transform.zoom,t.programConfigurations.get(r.id),t.dynamicLayoutVertexBuffer,t.opacityVertexBuffer)}function ri(t,e,r,i,n,o,a){var s,l,u,c,p,h=t.context.gl,f=r.paint.get("fill-pattern"),d=f&&f.constantOr(1),m=r.getCrossfadeParameters();a?(l=d&&!r.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",s=h.LINES):(l=d?"fillPattern":"fill",s=h.TRIANGLES);for(var y=0,g=i;y<g.length;y+=1){var _=g[y],v=e.getTile(_);if(!d||v.patternsLoaded()){var x=v.getBucket(r);if(x){var b=x.programConfigurations.get(r.id),w=t.useProgram(l,b);d&&(t.context.activeTexture.set(h.TEXTURE0),v.imageAtlasTexture.bind(h.LINEAR,h.CLAMP_TO_EDGE),b.updatePaintBuffers(m));var S=f.constantOr(null);if(S&&v.imageAtlas){var T=v.imageAtlas,I=T.patternPositions[S.to.toString()],E=T.patternPositions[S.from.toString()];I&&E&&b.setConstantPatternPositions(I,E)}var A=t.translatePosMatrix(_.posMatrix,v,r.paint.get("fill-translate"),r.paint.get("fill-translate-anchor"));if(a){c=x.indexBuffer2,p=x.segments2;var z=[h.drawingBufferWidth,h.drawingBufferHeight];u="fillOutlinePattern"===l&&d?Ar(A,t,m,v,z):Er(A,z)}else c=x.indexBuffer,p=x.segments,u=d?Ir(A,t,m,v):Tr(A);w.draw(t.context,s,n,t.stencilModeForClipping(_),o,zt.disabled,u,r.id,x.layoutVertexBuffer,c,p,r.paint,t.transform.zoom,b)}}}}function ii(t,e,r,i,n,o,a){for(var s=t.context,l=s.gl,u=r.paint.get("fill-extrusion-pattern"),c=u.constantOr(1),p=r.getCrossfadeParameters(),h=r.paint.get("fill-extrusion-opacity"),f=0,d=i;f<d.length;f+=1){var m=d[f],y=e.getTile(m),g=y.getBucket(r);if(g){var _=g.programConfigurations.get(r.id),v=t.useProgram(c?"fillExtrusionPattern":"fillExtrusion",_);c&&(t.context.activeTexture.set(l.TEXTURE0),y.imageAtlasTexture.bind(l.LINEAR,l.CLAMP_TO_EDGE),_.updatePaintBuffers(p));var x=u.constantOr(null);if(x&&y.imageAtlas){var b=y.imageAtlas,w=b.patternPositions[x.to.toString()],S=b.patternPositions[x.from.toString()];w&&S&&_.setConstantPatternPositions(w,S)}var T=t.translatePosMatrix(m.posMatrix,y,r.paint.get("fill-extrusion-translate"),r.paint.get("fill-extrusion-translate-anchor")),I=r.paint.get("fill-extrusion-vertical-gradient"),E=c?Sr(T,t,I,h,m,p,y):wr(T,t,I,h);v.draw(s,s.gl.TRIANGLES,n,o,a,zt.backCCW,E,r.id,g.layoutVertexBuffer,g.indexBuffer,g.segments,r.paint,t.transform.zoom,_)}}}function ni(e,r,i,n,o,a){var s=e.context,l=s.gl,u=r.fbo;if(u){var c=e.useProgram("hillshade");s.activeTexture.set(l.TEXTURE0),l.bindTexture(l.TEXTURE_2D,u.colorAttachment.get());var p=function(e,r,i){var n=i.paint.get("hillshade-shadow-color"),o=i.paint.get("hillshade-highlight-color"),a=i.paint.get("hillshade-accent-color"),s=i.paint.get("hillshade-illumination-direction")*(Math.PI/180);"viewport"===i.paint.get("hillshade-illumination-anchor")&&(s-=e.transform.angle);var l,u,c,p=!e.options.moving;return{u_matrix:e.transform.calculatePosMatrix(r.tileID.toUnwrapped(),p),u_image:0,u_latrange:(l=r.tileID,u=Math.pow(2,l.canonical.z),c=l.canonical.y,[new t.MercatorCoordinate(0,c/u).toLngLat().lat,new t.MercatorCoordinate(0,(c+1)/u).toLngLat().lat]),u_light:[i.paint.get("hillshade-exaggeration"),s],u_shadow:n,u_highlight:o,u_accent:a}}(e,r,i);c.draw(s,l.TRIANGLES,n,o,a,zt.disabled,p,i.id,e.rasterBoundsBuffer,e.quadTriangleIndexBuffer,e.rasterBoundsSegments)}}function oi(e,r,i,n,o,a,s){var l=e.context,u=l.gl,c=r.dem;if(c&&c.data){var p=c.dim,h=c.stride,f=c.getPixels();if(l.activeTexture.set(u.TEXTURE1),l.pixelStoreUnpackPremultiplyAlpha.set(!1),r.demTexture=r.demTexture||e.getTileTexture(h),r.demTexture){var d=r.demTexture;d.update(f,{premultiply:!1}),d.bind(u.NEAREST,u.CLAMP_TO_EDGE)}else r.demTexture=new t.Texture(l,f,u.RGBA,{premultiply:!1}),r.demTexture.bind(u.NEAREST,u.CLAMP_TO_EDGE);l.activeTexture.set(u.TEXTURE0);var m=r.fbo;if(!m){var y=new t.Texture(l,{width:p,height:p,data:null},u.RGBA);y.bind(u.LINEAR,u.CLAMP_TO_EDGE),(m=r.fbo=l.createFramebuffer(p,p,!0)).colorAttachment.set(y.texture)}l.bindFramebuffer.set(m.framebuffer),l.viewport.set([0,0,p,p]),e.useProgram("hillshadePrepare").draw(l,u.TRIANGLES,o,a,s,zt.disabled,function(e,r,i){var n=r.stride,o=t.create();return t.ortho(o,0,t.EXTENT,-t.EXTENT,0,0,1),t.translate(o,o,[0,-t.EXTENT,0]),{u_matrix:o,u_image:1,u_dimension:[n,n],u_zoom:e.overscaledZ,u_maxzoom:i,u_unpack:r.getUnpackVector()}}(r.tileID,c,n),i.id,e.rasterBoundsBuffer,e.quadTriangleIndexBuffer,e.rasterBoundsSegments),r.needsHillshadePrepare=!1}}function ai(e,r,i,n,o){var a=n.paint.get("raster-fade-duration");if(a>0){var s=t.browser.now(),l=(s-e.timeAdded)/a,u=r?(s-r.timeAdded)/a:-1,c=i.getSource(),p=o.coveringZoomLevel({tileSize:c.tileSize,roundZoom:c.roundZoom}),h=!r||Math.abs(r.tileID.overscaledZ-p)>Math.abs(e.tileID.overscaledZ-p),f=h&&e.refreshedUponExpiration?1:t.clamp(h?l:1-u,0,1);return e.refreshedUponExpiration&&l>=1&&(e.refreshedUponExpiration=!1),r?{opacity:1,mix:1-f}:{opacity:f,mix:0}}return{opacity:1,mix:0}}var si=new t.Color(1,0,0,1),li=new t.Color(0,1,0,1),ui=new t.Color(0,0,1,1),ci=new t.Color(1,0,1,1),pi=new t.Color(0,1,1,1);function hi(t,e,r,i){di(t,0,e+r/2,t.transform.width,r,i)}function fi(t,e,r,i){di(t,e-r/2,0,r,t.transform.height,i)}function di(e,r,i,n,o,a){var s=e.context,l=s.gl;l.enable(l.SCISSOR_TEST),l.scissor(r*t.browser.devicePixelRatio,i*t.browser.devicePixelRatio,n*t.browser.devicePixelRatio,o*t.browser.devicePixelRatio),s.clear({color:a}),l.disable(l.SCISSOR_TEST)}function mi(e,r,i){var n=e.context,o=n.gl,a=i.posMatrix,s=e.useProgram("debug"),l=It.disabled,u=Et.disabled,c=e.colorModeForRenderPass();n.activeTexture.set(o.TEXTURE0),e.emptyTexture.bind(o.LINEAR,o.CLAMP_TO_EDGE),s.draw(n,o.LINE_STRIP,l,u,c,zt.disabled,kr(a,t.Color.red),"$debug",e.debugBuffer,e.tileBorderIndexBuffer,e.debugSegments);var p=r.getTileByID(i.key).latestRawTileData,h=Math.floor((p&&p.byteLength||0)/1024),f=r.getTile(i).tileSize,d=512/Math.min(f,512)*(i.overscaledZ/e.transform.zoom)*.5,m=i.canonical.toString();i.overscaledZ!==i.canonical.z&&(m+=" => "+i.overscaledZ),function(t,e){t.initDebugOverlayCanvas();var r=t.debugOverlayCanvas,i=t.context.gl,n=t.debugOverlayCanvas.getContext("2d");n.clearRect(0,0,r.width,r.height),n.shadowColor="white",n.shadowBlur=2,n.lineWidth=1.5,n.strokeStyle="white",n.textBaseline="top",n.font="bold 36px Open Sans, sans-serif",n.fillText(e,5,5),n.strokeText(e,5,5),t.debugOverlayTexture.update(r),t.debugOverlayTexture.bind(i.LINEAR,i.CLAMP_TO_EDGE)}(e,m+" "+h+"kb"),s.draw(n,o.TRIANGLES,l,u,At.alphaBlended,zt.disabled,kr(a,t.Color.transparent,d),"$debug",e.debugBuffer,e.quadTriangleIndexBuffer,e.debugSegments)}var yi={symbol:function(e,r,i,n,o){if("translucent"===e.renderPass){var a=Et.disabled,s=e.colorModeForRenderPass();i.layout.get("text-variable-anchor")&&function(e,r,i,n,o,a,s){for(var l=r.transform,u="map"===o,c="map"===a,p=0,h=e;p<h.length;p+=1){var f=h[p],d=n.getTile(f),m=d.getBucket(i);if(m&&m.text&&m.text.segments.get().length){var y=t.evaluateSizeForZoom(m.textSizeData,l.zoom),g=he(d,1,r.transform.zoom),_=Yt(f.posMatrix,c,u,r.transform,g),v="none"!==i.layout.get("icon-text-fit")&&m.hasIconData();if(y){var x=Math.pow(2,l.zoom-d.tileID.overscaledZ);Qr(m,u,c,s,t.symbolSize,l,_,f.posMatrix,x,y,v)}}}}(n,e,i,r,i.layout.get("text-rotation-alignment"),i.layout.get("text-pitch-alignment"),o),0!==i.paint.get("icon-opacity").constantOr(1)&&ti(e,r,i,n,!1,i.paint.get("icon-translate"),i.paint.get("icon-translate-anchor"),i.layout.get("icon-rotation-alignment"),i.layout.get("icon-pitch-alignment"),i.layout.get("icon-keep-upright"),a,s),0!==i.paint.get("text-opacity").constantOr(1)&&ti(e,r,i,n,!0,i.paint.get("text-translate"),i.paint.get("text-translate-anchor"),i.layout.get("text-rotation-alignment"),i.layout.get("text-pitch-alignment"),i.layout.get("text-keep-upright"),a,s),r.map.showCollisionBoxes&&(Hr(e,r,i,n,i.paint.get("text-translate"),i.paint.get("text-translate-anchor"),!0),Hr(e,r,i,n,i.paint.get("icon-translate"),i.paint.get("icon-translate-anchor"),!1))}},circle:function(e,r,i,n){if("translucent"===e.renderPass){var o=i.paint.get("circle-opacity"),a=i.paint.get("circle-stroke-width"),s=i.paint.get("circle-stroke-opacity"),l=void 0!==i.layout.get("circle-sort-key").constantOr(1);if(0!==o.constantOr(1)||0!==a.constantOr(1)&&0!==s.constantOr(1)){for(var u=e.context,c=u.gl,p=e.depthModeForSublayer(0,It.ReadOnly),h=Et.disabled,f=e.colorModeForRenderPass(),d=[],m=0;m<n.length;m++){var y=n[m],g=r.getTile(y),_=g.getBucket(i);if(_){var v=_.programConfigurations.get(i.id),x={programConfiguration:v,program:e.useProgram("circle",v),layoutVertexBuffer:_.layoutVertexBuffer,indexBuffer:_.indexBuffer,uniformValues:zr(e,y,g,i)};if(l)for(var b=0,w=_.segments.get();b<w.length;b+=1){var S=w[b];d.push({segments:new t.SegmentVector([S]),sortKey:S.sortKey,state:x})}else d.push({segments:_.segments,sortKey:0,state:x})}}l&&d.sort(function(t,e){return t.sortKey-e.sortKey});for(var T=0,I=d;T<I.length;T+=1){var E=I[T],A=E.state;A.program.draw(u,c.TRIANGLES,p,h,f,zt.disabled,A.uniformValues,i.id,A.layoutVertexBuffer,A.indexBuffer,E.segments,i.paint,e.transform.zoom,A.programConfiguration)}}}},heatmap:function(e,r,i,n){if(0!==i.paint.get("heatmap-opacity"))if("offscreen"===e.renderPass){var o=e.context,a=o.gl,s=Et.disabled,l=new At([a.ONE,a.ONE],t.Color.transparent,[!0,!0,!0,!0]);!function(t,e,r){var i=t.gl;t.activeTexture.set(i.TEXTURE1),t.viewport.set([0,0,e.width/4,e.height/4]);var n=r.heatmapFbo;if(n)i.bindTexture(i.TEXTURE_2D,n.colorAttachment.get()),t.bindFramebuffer.set(n.framebuffer);else{var o=i.createTexture();i.bindTexture(i.TEXTURE_2D,o),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,i.LINEAR),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,i.LINEAR),n=r.heatmapFbo=t.createFramebuffer(e.width/4,e.height/4,!1),function(t,e,r,i){var n=t.gl;n.texImage2D(n.TEXTURE_2D,0,n.RGBA,e.width/4,e.height/4,0,n.RGBA,t.extRenderToTextureHalfFloat?t.extTextureHalfFloat.HALF_FLOAT_OES:n.UNSIGNED_BYTE,null),i.colorAttachment.set(r)}(t,e,o,n)}}(o,e,i),o.clear({color:t.Color.transparent});for(var u=0;u<n.length;u++){var c=n[u];if(!r.hasRenderableParent(c)){var p=r.getTile(c),h=p.getBucket(i);if(h){var f=h.programConfigurations.get(i.id);e.useProgram("heatmap",f).draw(o,a.TRIANGLES,It.disabled,s,l,zt.disabled,Dr(c.posMatrix,p,e.transform.zoom,i.paint.get("heatmap-intensity")),i.id,h.layoutVertexBuffer,h.indexBuffer,h.segments,i.paint,e.transform.zoom,f)}}}o.viewport.set([0,0,e.width,e.height])}else"translucent"===e.renderPass&&(e.context.setColorMode(e.colorModeForRenderPass()),function(e,r){var i=e.context,n=i.gl,o=r.heatmapFbo;if(o){i.activeTexture.set(n.TEXTURE0),n.bindTexture(n.TEXTURE_2D,o.colorAttachment.get()),i.activeTexture.set(n.TEXTURE1);var a=r.colorRampTexture;a||(a=r.colorRampTexture=new t.Texture(i,r.colorRamp,n.RGBA)),a.bind(n.LINEAR,n.CLAMP_TO_EDGE),e.useProgram("heatmapTexture").draw(i,n.TRIANGLES,It.disabled,Et.disabled,e.colorModeForRenderPass(),zt.disabled,function(e,r,i,n){var o=t.create();t.ortho(o,0,e.width,e.height,0,0,1);var a=e.context.gl;return{u_matrix:o,u_world:[a.drawingBufferWidth,a.drawingBufferHeight],u_image:0,u_color_ramp:1,u_opacity:r.paint.get("heatmap-opacity")}}(e,r),r.id,e.viewportBuffer,e.quadTriangleIndexBuffer,e.viewportSegments,r.paint,e.transform.zoom)}}(e,i))},line:function(e,r,i,n){if("translucent"===e.renderPass){var o=i.paint.get("line-opacity"),a=i.paint.get("line-width");if(0!==o.constantOr(1)&&0!==a.constantOr(1)){var s=e.depthModeForSublayer(0,It.ReadOnly),l=e.colorModeForRenderPass(),u=i.paint.get("line-dasharray"),c=i.paint.get("line-pattern"),p=c.constantOr(1),h=i.paint.get("line-gradient"),f=i.getCrossfadeParameters(),d=p?"linePattern":u?"lineSDF":h?"lineGradient":"line",m=e.context,y=m.gl,g=!0;if(h){m.activeTexture.set(y.TEXTURE0);var _=i.gradientTexture;if(!i.gradient)return;_||(_=i.gradientTexture=new t.Texture(m,i.gradient,y.RGBA)),_.bind(y.LINEAR,y.CLAMP_TO_EDGE)}for(var v=0,x=n;v<x.length;v+=1){var b=x[v],w=r.getTile(b);if(!p||w.patternsLoaded()){var S=w.getBucket(i);if(S){var T=S.programConfigurations.get(i.id),I=e.context.program.get(),E=e.useProgram(d,T),A=g||E.program!==I,z=c.constantOr(null);if(z&&w.imageAtlas){var P=w.imageAtlas,C=P.patternPositions[z.to.toString()],k=P.patternPositions[z.from.toString()];C&&k&&T.setConstantPatternPositions(C,k)}var M=p?Br(e,w,i,f):u?Fr(e,w,i,u,f):h?Rr(e,w,i):Lr(e,w,i);p?(m.activeTexture.set(y.TEXTURE0),w.imageAtlasTexture.bind(y.LINEAR,y.CLAMP_TO_EDGE),T.updatePaintBuffers(f)):u&&(A||e.lineAtlas.dirty)&&(m.activeTexture.set(y.TEXTURE0),e.lineAtlas.bind(m)),E.draw(m,y.TRIANGLES,s,e.stencilModeForClipping(b),l,zt.disabled,M,i.id,S.layoutVertexBuffer,S.indexBuffer,S.segments,i.paint,e.transform.zoom,T),g=!1}}}}}},fill:function(e,r,i,n){var o=i.paint.get("fill-color"),a=i.paint.get("fill-opacity");if(0!==a.constantOr(1)){var s=e.colorModeForRenderPass(),l=i.paint.get("fill-pattern"),u=e.opaquePassEnabledForLayer()&&!l.constantOr(1)&&1===o.constantOr(t.Color.transparent).a&&1===a.constantOr(0)?"opaque":"translucent";if(e.renderPass===u){var c=e.depthModeForSublayer(1,"opaque"===e.renderPass?It.ReadWrite:It.ReadOnly);ri(e,r,i,n,c,s,!1)}if("translucent"===e.renderPass&&i.paint.get("fill-antialias")){var p=e.depthModeForSublayer(i.getPaintProperty("fill-outline-color")?2:0,It.ReadOnly);ri(e,r,i,n,p,s,!0)}}},"fill-extrusion":function(t,e,r,i){var n=r.paint.get("fill-extrusion-opacity");if(0!==n&&"translucent"===t.renderPass){var o=new It(t.context.gl.LEQUAL,It.ReadWrite,t.depthRangeFor3D);if(1!==n||r.paint.get("fill-extrusion-pattern").constantOr(1))ii(t,e,r,i,o,Et.disabled,At.disabled),ii(t,e,r,i,o,t.stencilModeFor3D(),t.colorModeForRenderPass());else{var a=t.colorModeForRenderPass();ii(t,e,r,i,o,Et.disabled,a)}}},hillshade:function(t,e,r,i){if("offscreen"===t.renderPass||"translucent"===t.renderPass){for(var n=t.context,o=e.getSource().maxzoom,a=t.depthModeForSublayer(0,It.ReadOnly),s=t.colorModeForRenderPass(),l="translucent"===t.renderPass?t.stencilConfigForOverlap(i):[{},i],u=l[0],c=0,p=l[1];c<p.length;c+=1){var h=p[c],f=e.getTile(h);f.needsHillshadePrepare&&"offscreen"===t.renderPass?oi(t,f,r,o,a,Et.disabled,s):"translucent"===t.renderPass&&ni(t,f,r,a,u[h.overscaledZ],s)}n.viewport.set([0,0,t.width,t.height])}},raster:function(t,e,r,i){if("translucent"===t.renderPass&&0!==r.paint.get("raster-opacity")&&i.length)for(var n=t.context,o=n.gl,a=e.getSource(),s=t.useProgram("raster"),l=t.colorModeForRenderPass(),u=a instanceof M?[{},i]:t.stencilConfigForOverlap(i),c=u[0],p=u[1],h=p[p.length-1].overscaledZ,f=!t.options.moving,d=0,m=p;d<m.length;d+=1){var y=m[d],g=t.depthModeForSublayer(y.overscaledZ-h,1===r.paint.get("raster-opacity")?It.ReadWrite:It.ReadOnly,o.LESS),_=e.getTile(y),v=t.transform.calculatePosMatrix(y.toUnwrapped(),f);_.registerFadeDuration(r.paint.get("raster-fade-duration"));var x=e.findLoadedParent(y,0),b=ai(_,x,e,r,t.transform),w=void 0,S=void 0,T="nearest"===r.paint.get("raster-resampling")?o.NEAREST:o.LINEAR;n.activeTexture.set(o.TEXTURE0),_.texture.bind(T,o.CLAMP_TO_EDGE,o.LINEAR_MIPMAP_NEAREST),n.activeTexture.set(o.TEXTURE1),x?(x.texture.bind(T,o.CLAMP_TO_EDGE,o.LINEAR_MIPMAP_NEAREST),w=Math.pow(2,x.tileID.overscaledZ-_.tileID.overscaledZ),S=[_.tileID.canonical.x*w%1,_.tileID.canonical.y*w%1]):_.texture.bind(T,o.CLAMP_TO_EDGE,o.LINEAR_MIPMAP_NEAREST);var I=Vr(v,S||[0,0],w||1,b,r);a instanceof M?s.draw(n,o.TRIANGLES,g,Et.disabled,l,zt.disabled,I,r.id,a.boundsBuffer,t.quadTriangleIndexBuffer,a.boundsSegments):s.draw(n,o.TRIANGLES,g,c[y.overscaledZ],l,zt.disabled,I,r.id,t.rasterBoundsBuffer,t.quadTriangleIndexBuffer,t.rasterBoundsSegments)}},background:function(t,e,r){var i=r.paint.get("background-color"),n=r.paint.get("background-opacity");if(0!==n){var o=t.context,a=o.gl,s=t.transform,l=s.tileSize,u=r.paint.get("background-pattern");if(!t.isPatternMissing(u)){var c=!u&&1===i.a&&1===n&&t.opaquePassEnabledForLayer()?"opaque":"translucent";if(t.renderPass===c){var p=Et.disabled,h=t.depthModeForSublayer(0,"opaque"===c?It.ReadWrite:It.ReadOnly),f=t.colorModeForRenderPass(),d=t.useProgram(u?"backgroundPattern":"background"),m=s.coveringTiles({tileSize:l});u&&(o.activeTexture.set(a.TEXTURE0),t.imageManager.bind(t.context));for(var y=r.getCrossfadeParameters(),g=0,_=m;g<_.length;g+=1){var v=_[g],x=t.transform.calculatePosMatrix(v.toUnwrapped()),b=u?Wr(x,n,t,u,{tileID:v,tileSize:l},y):Xr(x,n,i);d.draw(o,a.TRIANGLES,h,p,f,zt.disabled,b,r.id,t.tileExtentBuffer,t.quadTriangleIndexBuffer,t.tileExtentSegments)}}}}},debug:function(t,e,r){for(var i=0;i<r.length;i++)mi(t,e,r[i])},custom:function(t,e,r){var i=t.context,n=r.implementation;if("offscreen"===t.renderPass){var o=n.prerender;o&&(t.setCustomLayerDefaults(),i.setColorMode(t.colorModeForRenderPass()),o.call(n,i.gl,t.transform.customLayerMatrix()),i.setDirty(),t.setBaseState())}else if("translucent"===t.renderPass){t.setCustomLayerDefaults(),i.setColorMode(t.colorModeForRenderPass()),i.setStencilMode(Et.disabled);var a="3d"===n.renderingMode?new It(t.context.gl.LEQUAL,It.ReadWrite,t.depthRangeFor3D):t.depthModeForSublayer(0,It.ReadOnly);i.setDepthMode(a),n.render(i.gl,t.transform.customLayerMatrix()),i.setDirty(),t.setBaseState(),i.bindFramebuffer.set(null)}}},gi=function(t,e){this.context=new Pt(t),this.transform=e,this._tileTextures={},this.setup(),this.numSublayers=Ct.maxUnderzooming+Ct.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new Oe,this.gpuTimers={}};gi.prototype.resize=function(e,r){if(this.width=e*t.browser.devicePixelRatio,this.height=r*t.browser.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(var i=0,n=this.style._order;i<n.length;i+=1)this.style._layers[n[i]].resize()},gi.prototype.setup=function(){var e=this.context,r=new t.StructArrayLayout2i4;r.emplaceBack(0,0),r.emplaceBack(t.EXTENT,0),r.emplaceBack(0,t.EXTENT),r.emplaceBack(t.EXTENT,t.EXTENT),this.tileExtentBuffer=e.createVertexBuffer(r,Ze.members),this.tileExtentSegments=t.SegmentVector.simpleSegment(0,0,4,2);var i=new t.StructArrayLayout2i4;i.emplaceBack(0,0),i.emplaceBack(t.EXTENT,0),i.emplaceBack(0,t.EXTENT),i.emplaceBack(t.EXTENT,t.EXTENT),this.debugBuffer=e.createVertexBuffer(i,Ze.members),this.debugSegments=t.SegmentVector.simpleSegment(0,0,4,5);var n=new t.StructArrayLayout4i8;n.emplaceBack(0,0,0,0),n.emplaceBack(t.EXTENT,0,t.EXTENT,0),n.emplaceBack(0,t.EXTENT,0,t.EXTENT),n.emplaceBack(t.EXTENT,t.EXTENT,t.EXTENT,t.EXTENT),this.rasterBoundsBuffer=e.createVertexBuffer(n,k.members),this.rasterBoundsSegments=t.SegmentVector.simpleSegment(0,0,4,2);var o=new t.StructArrayLayout2i4;o.emplaceBack(0,0),o.emplaceBack(1,0),o.emplaceBack(0,1),o.emplaceBack(1,1),this.viewportBuffer=e.createVertexBuffer(o,Ze.members),this.viewportSegments=t.SegmentVector.simpleSegment(0,0,4,2);var a=new t.StructArrayLayout1ui2;a.emplaceBack(0),a.emplaceBack(1),a.emplaceBack(3),a.emplaceBack(2),a.emplaceBack(0),this.tileBorderIndexBuffer=e.createIndexBuffer(a);var s=new t.StructArrayLayout3ui6;s.emplaceBack(0,1,2),s.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=e.createIndexBuffer(s),this.emptyTexture=new t.Texture(e,{width:1,height:1,data:new Uint8Array([0,0,0,0])},e.gl.RGBA);var l=this.context.gl;this.stencilClearMode=new Et({func:l.ALWAYS,mask:0},0,255,l.ZERO,l.ZERO,l.ZERO)},gi.prototype.clearStencil=function(){var e=this.context,r=e.gl;this.nextStencilID=1,this.currentStencilSource=void 0;var i=t.create();t.ortho(i,0,this.width,this.height,0,0,1),t.scale(i,i,[r.drawingBufferWidth,r.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(e,r.TRIANGLES,It.disabled,this.stencilClearMode,At.disabled,zt.disabled,Mr(i),"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)},gi.prototype._renderTileClippingMasks=function(t,e){if(this.currentStencilSource!==t.source&&t.isTileClipped()&&e&&e.length){this.currentStencilSource=t.source;var r=this.context,i=r.gl;this.nextStencilID+e.length>256&&this.clearStencil(),r.setColorMode(At.disabled),r.setDepthMode(It.disabled);var n=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(var o=0,a=e;o<a.length;o+=1){var s=a[o],l=this._tileClippingMaskIDs[s.key]=this.nextStencilID++;n.draw(r,i.TRIANGLES,It.disabled,new Et({func:i.ALWAYS,mask:0},l,255,i.KEEP,i.KEEP,i.REPLACE),At.disabled,zt.disabled,Mr(s.posMatrix),"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}},gi.prototype.stencilModeFor3D=function(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();var t=this.nextStencilID++,e=this.context.gl;return new Et({func:e.NOTEQUAL,mask:255},t,255,e.KEEP,e.KEEP,e.REPLACE)},gi.prototype.stencilModeForClipping=function(t){var e=this.context.gl;return new Et({func:e.EQUAL,mask:255},this._tileClippingMaskIDs[t.key],0,e.KEEP,e.KEEP,e.REPLACE)},gi.prototype.stencilConfigForOverlap=function(t){var e,r=this.context.gl,i=t.sort(function(t,e){return e.overscaledZ-t.overscaledZ}),n=i[i.length-1].overscaledZ,o=i[0].overscaledZ-n+1;if(o>1){this.currentStencilSource=void 0,this.nextStencilID+o>256&&this.clearStencil();for(var a={},s=0;s<o;s++)a[s+n]=new Et({func:r.GEQUAL,mask:255},s+this.nextStencilID,255,r.KEEP,r.KEEP,r.REPLACE);return this.nextStencilID+=o,[a,i]}return[(e={},e[n]=Et.disabled,e),i]},gi.prototype.colorModeForRenderPass=function(){var e=this.context.gl;return this._showOverdrawInspector?new At([e.CONSTANT_COLOR,e.ONE],new t.Color(1/8,1/8,1/8,0),[!0,!0,!0,!0]):"opaque"===this.renderPass?At.unblended:At.alphaBlended},gi.prototype.depthModeForSublayer=function(t,e,r){if(!this.opaquePassEnabledForLayer())return It.disabled;var i=1-((1+this.currentLayer)*this.numSublayers+t)*this.depthEpsilon;return new It(r||this.context.gl.LEQUAL,e,[i,i])},gi.prototype.opaquePassEnabledForLayer=function(){return this.currentLayer<this.opaquePassCutoff},gi.prototype.render=function(e,r){var i=this;this.style=e,this.options=r,this.lineAtlas=e.lineAtlas,this.imageManager=e.imageManager,this.glyphManager=e.glyphManager,this.symbolFadeChange=e.placement.symbolFadeChange(t.browser.now()),this.imageManager.beginFrame();var n=this.style._order,o=this.style.sourceCaches;for(var a in o){var s=o[a];s.used&&s.prepare(this.context)}var l,u,c={},p={},h={};for(var f in o){var d=o[f];c[f]=d.getVisibleCoordinates(),p[f]=c[f].slice().reverse(),h[f]=d.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(var m=0;m<n.length;m++)if(this.style._layers[n[m]].is3D()){this.opaquePassCutoff=m;break}this.renderPass="offscreen";for(var y=0,g=n;y<g.length;y+=1){var _=this.style._layers[g[y]];if(_.hasOffscreenPass()&&!_.isHidden(this.transform.zoom)){var v=p[_.source];("custom"===_.type||v.length)&&this.renderLayer(this,o[_.source],_,v)}}for(this.context.bindFramebuffer.set(null),this.context.clear({color:r.showOverdrawInspector?t.Color.black:t.Color.transparent,depth:1}),this.clearStencil(),this._showOverdrawInspector=r.showOverdrawInspector,this.depthRangeFor3D=[0,1-(e._order.length+2)*this.numSublayers*this.depthEpsilon],this.renderPass="opaque",this.currentLayer=n.length-1;this.currentLayer>=0;this.currentLayer--){var x=this.style._layers[n[this.currentLayer]],b=o[x.source],w=c[x.source];this._renderTileClippingMasks(x,w),this.renderLayer(this,b,x,w)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer<n.length;this.currentLayer++){var S=this.style._layers[n[this.currentLayer]],T=o[S.source],I=("symbol"===S.type?h:p)[S.source];this._renderTileClippingMasks(S,c[S.source]),this.renderLayer(this,T,S,I)}this.options.showTileBoundaries&&(t.values(this.style._layers).forEach(function(t){t.source&&!t.isHidden(i.transform.zoom)&&(t.source!==(u&&u.id)&&(u=i.style.sourceCaches[t.source]),(!l||l.getSource().maxzoom<u.getSource().maxzoom)&&(l=u))}),l&&yi.debug(this,l,l.getVisibleCoordinates())),this.options.showPadding&&function(t){var e=t.transform.padding;hi(t,t.transform.height-(e.top||0),3,si),hi(t,e.bottom||0,3,li),fi(t,e.left||0,3,ui),fi(t,t.transform.width-(e.right||0),3,ci);var r=t.transform.centerPoint;!function(t,e,r,i){di(t,e-1,r-10,2,20,i),di(t,e-10,r-1,20,2,i)}(t,r.x,t.transform.height-r.y,pi)}(this),this.context.setDefault()},gi.prototype.renderLayer=function(t,e,r,i){r.isHidden(this.transform.zoom)||("background"===r.type||"custom"===r.type||i.length)&&(this.id=r.id,this.gpuTimingStart(r),yi[r.type](t,e,r,i,this.style.placement.variableOffsets),this.gpuTimingEnd())},gi.prototype.gpuTimingStart=function(t){if(this.options.gpuTiming){var e=this.context.extTimerQuery,r=this.gpuTimers[t.id];r||(r=this.gpuTimers[t.id]={calls:0,cpuTime:0,query:e.createQueryEXT()}),r.calls++,e.beginQueryEXT(e.TIME_ELAPSED_EXT,r.query)}},gi.prototype.gpuTimingEnd=function(){if(this.options.gpuTiming){var t=this.context.extTimerQuery;t.endQueryEXT(t.TIME_ELAPSED_EXT)}},gi.prototype.collectGpuTimers=function(){var t=this.gpuTimers;return this.gpuTimers={},t},gi.prototype.queryGpuTimers=function(t){var e={};for(var r in t){var i=t[r],n=this.context.extTimerQuery,o=n.getQueryObjectEXT(i.query,n.QUERY_RESULT_EXT)/1e6;n.deleteQueryEXT(i.query),e[r]=o}return e},gi.prototype.translatePosMatrix=function(e,r,i,n,o){if(!i[0]&&!i[1])return e;var a=o?"map"===n?this.transform.angle:0:"viewport"===n?-this.transform.angle:0;if(a){var s=Math.sin(a),l=Math.cos(a);i=[i[0]*l-i[1]*s,i[0]*s+i[1]*l]}var u=[o?i[0]:he(r,i[0],this.transform.zoom),o?i[1]:he(r,i[1],this.transform.zoom),0],c=new Float32Array(16);return t.translate(c,e,u),c},gi.prototype.saveTileTexture=function(t){var e=this._tileTextures[t.size[0]];e?e.push(t):this._tileTextures[t.size[0]]=[t]},gi.prototype.getTileTexture=function(t){var e=this._tileTextures[t];return e&&e.length>0?e.pop():null},gi.prototype.isPatternMissing=function(t){if(!t)return!1;if(!t.from||!t.to)return!0;var e=this.imageManager.getPattern(t.from.toString()),r=this.imageManager.getPattern(t.to.toString());return!e||!r},gi.prototype.useProgram=function(t,e){this.cache=this.cache||{};var r=""+t+(e?e.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[r]||(this.cache[r]=new xr(this.context,_r[t],e,Kr[t],this._showOverdrawInspector)),this.cache[r]},gi.prototype.setCustomLayerDefaults=function(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()},gi.prototype.setBaseState=function(){var t=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(t.FUNC_ADD)},gi.prototype.initDebugOverlayCanvas=function(){null==this.debugOverlayCanvas&&(this.debugOverlayCanvas=t.window.document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new t.Texture(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))},gi.prototype.destroy=function(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()};var _i=function(t,e){this.points=t,this.planes=e};_i.fromInvProjectionMatrix=function(e,r,i){var n=Math.pow(2,i),o=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map(function(r){return t.transformMat4([],r,e)}).map(function(e){return t.scale$1([],e,1/e[3]/r*n)}),a=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(function(e){var r=t.sub([],o[e[0]],o[e[1]]),i=t.sub([],o[e[2]],o[e[1]]),n=t.normalize([],t.cross([],r,i)),a=-t.dot(n,o[e[1]]);return n.concat(a)});return new _i(o,a)};var vi=function(e,r){this.min=e,this.max=r,this.center=t.scale$2([],t.add([],this.min,this.max),.5)};vi.prototype.quadrant=function(e){for(var r=[e%2==0,e<2],i=t.clone$2(this.min),n=t.clone$2(this.max),o=0;o<r.length;o++)i[o]=r[o]?this.min[o]:this.center[o],n[o]=r[o]?this.center[o]:this.max[o];return n[2]=this.max[2],new vi(i,n)},vi.prototype.distanceX=function(t){return Math.max(Math.min(this.max[0],t[0]),this.min[0])-t[0]},vi.prototype.distanceY=function(t){return Math.max(Math.min(this.max[1],t[1]),this.min[1])-t[1]},vi.prototype.intersects=function(e){for(var r=[[this.min[0],this.min[1],0,1],[this.max[0],this.min[1],0,1],[this.max[0],this.max[1],0,1],[this.min[0],this.max[1],0,1]],i=!0,n=0;n<e.planes.length;n++){for(var o=e.planes[n],a=0,s=0;s<r.length;s++)a+=t.dot$1(o,r[s])>=0;if(0===a)return 0;a!==r.length&&(i=!1)}if(i)return 2;for(var l=0;l<3;l++){for(var u=Number.MAX_VALUE,c=-Number.MAX_VALUE,p=0;p<e.points.length;p++){var h=e.points[p][l]-this.min[l];u=Math.min(u,h),c=Math.max(c,h)}if(c<0||u>this.max[l]-this.min[l])return 0}return 1};var xi=function(t,e,r,i){if(void 0===t&&(t=0),void 0===e&&(e=0),void 0===r&&(r=0),void 0===i&&(i=0),isNaN(t)||t<0||isNaN(e)||e<0||isNaN(r)||r<0||isNaN(i)||i<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=t,this.bottom=e,this.left=r,this.right=i};xi.prototype.interpolate=function(e,r,i){return null!=r.top&&null!=e.top&&(this.top=t.number(e.top,r.top,i)),null!=r.bottom&&null!=e.bottom&&(this.bottom=t.number(e.bottom,r.bottom,i)),null!=r.left&&null!=e.left&&(this.left=t.number(e.left,r.left,i)),null!=r.right&&null!=e.right&&(this.right=t.number(e.right,r.right,i)),this},xi.prototype.getCenter=function(e,r){var i=t.clamp((this.left+e-this.right)/2,0,e),n=t.clamp((this.top+r-this.bottom)/2,0,r);return new t.Point(i,n)},xi.prototype.equals=function(t){return this.top===t.top&&this.bottom===t.bottom&&this.left===t.left&&this.right===t.right},xi.prototype.clone=function(){return new xi(this.top,this.bottom,this.left,this.right)},xi.prototype.toJSON=function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}};var bi=function(e,r,i,n,o){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=void 0===o||o,this._minZoom=e||0,this._maxZoom=r||22,this._minPitch=null==i?0:i,this._maxPitch=null==n?60:n,this.setMaxBounds(),this.width=0,this.height=0,this._center=new t.LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new xi,this._posMatrixCache={},this._alignedPosMatrixCache={}},wi={minZoom:{configurable:!0},maxZoom:{configurable:!0},minPitch:{configurable:!0},maxPitch:{configurable:!0},renderWorldCopies:{configurable:!0},worldSize:{configurable:!0},centerOffset:{configurable:!0},size:{configurable:!0},bearing:{configurable:!0},pitch:{configurable:!0},fov:{configurable:!0},zoom:{configurable:!0},center:{configurable:!0},padding:{configurable:!0},centerPoint:{configurable:!0},unmodified:{configurable:!0},point:{configurable:!0}};bi.prototype.clone=function(){var t=new bi(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return t.tileSize=this.tileSize,t.latRange=this.latRange,t.width=this.width,t.height=this.height,t._center=this._center,t.zoom=this.zoom,t.angle=this.angle,t._fov=this._fov,t._pitch=this._pitch,t._unmodified=this._unmodified,t._edgeInsets=this._edgeInsets.clone(),t._calcMatrices(),t},wi.minZoom.get=function(){return this._minZoom},wi.minZoom.set=function(t){this._minZoom!==t&&(this._minZoom=t,this.zoom=Math.max(this.zoom,t))},wi.maxZoom.get=function(){return this._maxZoom},wi.maxZoom.set=function(t){this._maxZoom!==t&&(this._maxZoom=t,this.zoom=Math.min(this.zoom,t))},wi.minPitch.get=function(){return this._minPitch},wi.minPitch.set=function(t){this._minPitch!==t&&(this._minPitch=t,this.pitch=Math.max(this.pitch,t))},wi.maxPitch.get=function(){return this._maxPitch},wi.maxPitch.set=function(t){this._maxPitch!==t&&(this._maxPitch=t,this.pitch=Math.min(this.pitch,t))},wi.renderWorldCopies.get=function(){return this._renderWorldCopies},wi.renderWorldCopies.set=function(t){void 0===t?t=!0:null===t&&(t=!1),this._renderWorldCopies=t},wi.worldSize.get=function(){return this.tileSize*this.scale},wi.centerOffset.get=function(){return this.centerPoint._sub(this.size._div(2))},wi.size.get=function(){return new t.Point(this.width,this.height)},wi.bearing.get=function(){return-this.angle/Math.PI*180},wi.bearing.set=function(e){var r=-t.wrap(e,-180,180)*Math.PI/180;this.angle!==r&&(this._unmodified=!1,this.angle=r,this._calcMatrices(),this.rotationMatrix=t.create$2(),t.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},wi.pitch.get=function(){return this._pitch/Math.PI*180},wi.pitch.set=function(e){var r=t.clamp(e,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==r&&(this._unmodified=!1,this._pitch=r,this._calcMatrices())},wi.fov.get=function(){return this._fov/Math.PI*180},wi.fov.set=function(t){t=Math.max(.01,Math.min(60,t)),this._fov!==t&&(this._unmodified=!1,this._fov=t/180*Math.PI,this._calcMatrices())},wi.zoom.get=function(){return this._zoom},wi.zoom.set=function(t){var e=Math.min(Math.max(t,this.minZoom),this.maxZoom);this._zoom!==e&&(this._unmodified=!1,this._zoom=e,this.scale=this.zoomScale(e),this.tileZoom=Math.floor(e),this.zoomFraction=e-this.tileZoom,this._constrain(),this._calcMatrices())},wi.center.get=function(){return this._center},wi.center.set=function(t){t.lat===this._center.lat&&t.lng===this._center.lng||(this._unmodified=!1,this._center=t,this._constrain(),this._calcMatrices())},wi.padding.get=function(){return this._edgeInsets.toJSON()},wi.padding.set=function(t){this._edgeInsets.equals(t)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,t,1),this._calcMatrices())},wi.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)},bi.prototype.isPaddingEqual=function(t){return this._edgeInsets.equals(t)},bi.prototype.interpolatePadding=function(t,e,r){this._unmodified=!1,this._edgeInsets.interpolate(t,e,r),this._constrain(),this._calcMatrices()},bi.prototype.coveringZoomLevel=function(t){var e=(t.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/t.tileSize));return Math.max(0,e)},bi.prototype.getVisibleUnwrappedCoordinates=function(e){var r=[new t.UnwrappedTileID(0,e)];if(this._renderWorldCopies)for(var i=this.pointCoordinate(new t.Point(0,0)),n=this.pointCoordinate(new t.Point(this.width,0)),o=this.pointCoordinate(new t.Point(this.width,this.height)),a=this.pointCoordinate(new t.Point(0,this.height)),s=Math.floor(Math.min(i.x,n.x,o.x,a.x)),l=Math.floor(Math.max(i.x,n.x,o.x,a.x)),u=s-1;u<=l+1;u++)0!==u&&r.push(new t.UnwrappedTileID(u,e));return r},bi.prototype.coveringTiles=function(e){var r=this.coveringZoomLevel(e),i=r;if(void 0!==e.minzoom&&r<e.minzoom)return[];void 0!==e.maxzoom&&r>e.maxzoom&&(r=e.maxzoom);var n=t.MercatorCoordinate.fromLngLat(this.center),o=Math.pow(2,r),a=[o*n.x,o*n.y,0],s=_i.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,r),l=e.minzoom||0;this.pitch<=60&&this._edgeInsets.top<.1&&(l=r);var u=function(t){return{aabb:new vi([t*o,0,0],[(t+1)*o,o,0]),zoom:0,x:0,y:0,wrap:t,fullyVisible:!1}},c=[],p=[],h=r,f=e.reparseOverscaled?i:r;if(this._renderWorldCopies)for(var d=1;d<=3;d++)c.push(u(-d)),c.push(u(d));for(c.push(u(0));c.length>0;){var m=c.pop(),y=m.x,g=m.y,_=m.fullyVisible;if(!_){var v=m.aabb.intersects(s);if(0===v)continue;_=2===v}var x=m.aabb.distanceX(a),b=m.aabb.distanceY(a),w=Math.max(Math.abs(x),Math.abs(b));if(m.zoom===h||w>3+(1<<h-m.zoom)-2&&m.zoom>=l)p.push({tileID:new t.OverscaledTileID(m.zoom===h?f:m.zoom,m.wrap,m.zoom,y,g),distanceSq:t.sqrLen([a[0]-.5-y,a[1]-.5-g])});else for(var S=0;S<4;S++){var T=(y<<1)+S%2,I=(g<<1)+(S>>1);c.push({aabb:m.aabb.quadrant(S),zoom:m.zoom+1,x:T,y:I,wrap:m.wrap,fullyVisible:_})}}return p.sort(function(t,e){return t.distanceSq-e.distanceSq}).map(function(t){return t.tileID})},bi.prototype.resize=function(t,e){this.width=t,this.height=e,this.pixelsToGLUnits=[2/t,-2/e],this._constrain(),this._calcMatrices()},wi.unmodified.get=function(){return this._unmodified},bi.prototype.zoomScale=function(t){return Math.pow(2,t)},bi.prototype.scaleZoom=function(t){return Math.log(t)/Math.LN2},bi.prototype.project=function(e){var r=t.clamp(e.lat,-this.maxValidLatitude,this.maxValidLatitude);return new t.Point(t.mercatorXfromLng(e.lng)*this.worldSize,t.mercatorYfromLat(r)*this.worldSize)},bi.prototype.unproject=function(e){return new t.MercatorCoordinate(e.x/this.worldSize,e.y/this.worldSize).toLngLat()},wi.point.get=function(){return this.project(this.center)},bi.prototype.setLocationAtPoint=function(e,r){var i=this.pointCoordinate(r),n=this.pointCoordinate(this.centerPoint),o=this.locationCoordinate(e),a=new t.MercatorCoordinate(o.x-(i.x-n.x),o.y-(i.y-n.y));this.center=this.coordinateLocation(a),this._renderWorldCopies&&(this.center=this.center.wrap())},bi.prototype.locationPoint=function(t){return this.coordinatePoint(this.locationCoordinate(t))},bi.prototype.pointLocation=function(t){return this.coordinateLocation(this.pointCoordinate(t))},bi.prototype.locationCoordinate=function(e){return t.MercatorCoordinate.fromLngLat(e)},bi.prototype.coordinateLocation=function(t){return t.toLngLat()},bi.prototype.pointCoordinate=function(e){var r=[e.x,e.y,0,1],i=[e.x,e.y,1,1];t.transformMat4(r,r,this.pixelMatrixInverse),t.transformMat4(i,i,this.pixelMatrixInverse);var n=r[3],o=i[3],a=r[1]/n,s=i[1]/o,l=r[2]/n,u=i[2]/o,c=l===u?0:(0-l)/(u-l);return new t.MercatorCoordinate(t.number(r[0]/n,i[0]/o,c)/this.worldSize,t.number(a,s,c)/this.worldSize)},bi.prototype.coordinatePoint=function(e){var r=[e.x*this.worldSize,e.y*this.worldSize,0,1];return t.transformMat4(r,r,this.pixelMatrix),new t.Point(r[0]/r[3],r[1]/r[3])},bi.prototype.getBounds=function(){return(new t.LngLatBounds).extend(this.pointLocation(new t.Point(0,0))).extend(this.pointLocation(new t.Point(this.width,0))).extend(this.pointLocation(new t.Point(this.width,this.height))).extend(this.pointLocation(new t.Point(0,this.height)))},bi.prototype.getMaxBounds=function(){return this.latRange&&2===this.latRange.length&&this.lngRange&&2===this.lngRange.length?new t.LngLatBounds([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null},bi.prototype.setMaxBounds=function(t){t?(this.lngRange=[t.getWest(),t.getEast()],this.latRange=[t.getSouth(),t.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])},bi.prototype.calculatePosMatrix=function(e,r){void 0===r&&(r=!1);var i=e.key,n=r?this._alignedPosMatrixCache:this._posMatrixCache;if(n[i])return n[i];var o=e.canonical,a=this.worldSize/this.zoomScale(o.z),s=o.x+Math.pow(2,o.z)*e.wrap,l=t.identity(new Float64Array(16));return t.translate(l,l,[s*a,o.y*a,0]),t.scale(l,l,[a/t.EXTENT,a/t.EXTENT,1]),t.multiply(l,r?this.alignedProjMatrix:this.projMatrix,l),n[i]=new Float32Array(l),n[i]},bi.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},bi.prototype._constrain=function(){if(this.center&&this.width&&this.height&&!this._constraining){this._constraining=!0;var e,r,i,n,o=-90,a=90,s=-180,l=180,u=this.size,c=this._unmodified;if(this.latRange){var p=this.latRange;o=t.mercatorYfromLat(p[1])*this.worldSize,e=(a=t.mercatorYfromLat(p[0])*this.worldSize)-o<u.y?u.y/(a-o):0}if(this.lngRange){var h=this.lngRange;s=t.mercatorXfromLng(h[0])*this.worldSize,r=(l=t.mercatorXfromLng(h[1])*this.worldSize)-s<u.x?u.x/(l-s):0}var f=this.point,d=Math.max(r||0,e||0);if(d)return this.center=this.unproject(new t.Point(r?(l+s)/2:f.x,e?(a+o)/2:f.y)),this.zoom+=this.scaleZoom(d),this._unmodified=c,void(this._constraining=!1);if(this.latRange){var m=f.y,y=u.y/2;m-y<o&&(n=o+y),m+y>a&&(n=a-y)}if(this.lngRange){var g=f.x,_=u.x/2;g-_<s&&(i=s+_),g+_>l&&(i=l-_)}void 0===i&&void 0===n||(this.center=this.unproject(new t.Point(void 0!==i?i:f.x,void 0!==n?n:f.y))),this._unmodified=c,this._constraining=!1}},bi.prototype._calcMatrices=function(){if(this.height){var e=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height;var r=Math.PI/2+this._pitch,i=this._fov*(.5+e.y/this.height),n=Math.sin(i)*this.cameraToCenterDistance/Math.sin(t.clamp(Math.PI-r-i,.01,Math.PI-.01)),o=this.point,a=o.x,s=o.y,l=1.01*(Math.cos(Math.PI/2-this._pitch)*n+this.cameraToCenterDistance),u=this.height/50,c=new Float64Array(16);t.perspective(c,this._fov,this.width/this.height,u,l),c[8]=2*-e.x/this.width,c[9]=2*e.y/this.height,t.scale(c,c,[1,-1,1]),t.translate(c,c,[0,0,-this.cameraToCenterDistance]),t.rotateX(c,c,this._pitch),t.rotateZ(c,c,this.angle),t.translate(c,c,[-a,-s,0]),this.mercatorMatrix=t.scale([],c,[this.worldSize,this.worldSize,this.worldSize]),t.scale(c,c,[1,1,t.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=c,this.invProjMatrix=t.invert([],this.projMatrix);var p=this.width%2/2,h=this.height%2/2,f=Math.cos(this.angle),d=Math.sin(this.angle),m=a-Math.round(a)+f*p+d*h,y=s-Math.round(s)+f*h+d*p,g=new Float64Array(c);if(t.translate(g,g,[m>.5?m-1:m,y>.5?y-1:y,0]),this.alignedProjMatrix=g,c=t.create(),t.scale(c,c,[this.width/2,-this.height/2,1]),t.translate(c,c,[1,-1,0]),this.labelPlaneMatrix=c,c=t.create(),t.scale(c,c,[1,-1,1]),t.translate(c,c,[-1,-1,0]),t.scale(c,c,[2/this.width,2/this.height,1]),this.glCoordMatrix=c,this.pixelMatrix=t.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),!(c=t.invert(new Float64Array(16),this.pixelMatrix)))throw new Error("failed to invert matrix");this.pixelMatrixInverse=c,this._posMatrixCache={},this._alignedPosMatrixCache={}}},bi.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var e=this.pointCoordinate(new t.Point(0,0)),r=[e.x*this.worldSize,e.y*this.worldSize,0,1];return t.transformMat4(r,r,this.pixelMatrix)[3]/this.cameraToCenterDistance},bi.prototype.getCameraPoint=function(){var e=Math.tan(this._pitch)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new t.Point(0,e))},bi.prototype.getCameraQueryGeometry=function(e){var r=this.getCameraPoint();if(1===e.length)return[e[0],r];for(var i=r.x,n=r.y,o=r.x,a=r.y,s=0,l=e;s<l.length;s+=1){var u=l[s];i=Math.min(i,u.x),n=Math.min(n,u.y),o=Math.max(o,u.x),a=Math.max(a,u.y)}return[new t.Point(i,n),new t.Point(o,n),new t.Point(o,a),new t.Point(i,a),new t.Point(i,n)]},Object.defineProperties(bi.prototype,wi);var Si=function(e){var r,i,n,o;this._hashName=e&&encodeURIComponent(e),t.bindAll(["_getCurrentHash","_onHashChange","_updateHash"],this),this._updateHash=(r=this._updateHashUnthrottled.bind(this),i=!1,n=null,o=function(){n=null,i&&(r(),n=setTimeout(o,300),i=!1)},function(){return i=!0,n||o(),n})};Si.prototype.addTo=function(e){return this._map=e,t.window.addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this},Si.prototype.remove=function(){return t.window.removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),delete this._map,this},Si.prototype.getHashString=function(e){var r=this._map.getCenter(),i=Math.round(100*this._map.getZoom())/100,n=Math.ceil((i*Math.LN2+Math.log(512/360/.5))/Math.LN10),o=Math.pow(10,n),a=Math.round(r.lng*o)/o,s=Math.round(r.lat*o)/o,l=this._map.getBearing(),u=this._map.getPitch(),c="";if(c+=e?"/"+a+"/"+s+"/"+i:i+"/"+s+"/"+a,(l||u)&&(c+="/"+Math.round(10*l)/10),u&&(c+="/"+Math.round(u)),this._hashName){var p=this._hashName,h=!1,f=t.window.location.hash.slice(1).split("&").map(function(t){var e=t.split("=")[0];return e===p?(h=!0,e+"="+c):t}).filter(function(t){return t});return h||f.push(p+"="+c),"#"+f.join("&")}return"#"+c},Si.prototype._getCurrentHash=function(){var e,r=this,i=t.window.location.hash.replace("#","");return this._hashName?(i.split("&").map(function(t){return t.split("=")}).forEach(function(t){t[0]===r._hashName&&(e=t)}),(e&&e[1]||"").split("/")):i.split("/")},Si.prototype._onHashChange=function(){var t=this._getCurrentHash();if(t.length>=3&&!t.some(function(t){return isNaN(t)})){var e=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(t[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+t[2],+t[1]],zoom:+t[0],bearing:e,pitch:+(t[4]||0)}),!0}return!1},Si.prototype._updateHashUnthrottled=function(){var e=this.getHashString();try{t.window.history.replaceState(t.window.history.state,"",e)}catch(t){}};var Ti={linearity:.3,easing:t.bezier(0,0,.3,1)},Ii=t.extend({deceleration:2500,maxSpeed:1400},Ti),Ei=t.extend({deceleration:20,maxSpeed:1400},Ti),Ai=t.extend({deceleration:1e3,maxSpeed:360},Ti),zi=t.extend({deceleration:1e3,maxSpeed:90},Ti),Pi=function(t){this._map=t,this.clear()};function Ci(t,e){(!t.duration||t.duration<e.duration)&&(t.duration=e.duration,t.easing=e.easing)}function ki(e,r,i){var n=i.maxSpeed,o=i.linearity,a=i.deceleration,s=t.clamp(e*o/(r/1e3),-n,n),l=Math.abs(s)/(a*o);return{easing:i.easing,duration:1e3*l,amount:s*(l/2)}}Pi.prototype.clear=function(){this._inertiaBuffer=[]},Pi.prototype.record=function(e){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:t.browser.now(),settings:e})},Pi.prototype._drainInertiaBuffer=function(){for(var e=this._inertiaBuffer,r=t.browser.now();e.length>0&&r-e[0].time>160;)e.shift()},Pi.prototype._onMoveEnd=function(e){if(this._drainInertiaBuffer(),!(this._inertiaBuffer.length<2)){for(var r={zoom:0,bearing:0,pitch:0,pan:new t.Point(0,0),pinchAround:void 0,around:void 0},i=0,n=this._inertiaBuffer;i<n.length;i+=1){var o=n[i].settings;r.zoom+=o.zoomDelta||0,r.bearing+=o.bearingDelta||0,r.pitch+=o.pitchDelta||0,o.panDelta&&r.pan._add(o.panDelta),o.around&&(r.around=o.around),o.pinchAround&&(r.pinchAround=o.pinchAround)}var a=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,s={};if(r.pan.mag()){var l=ki(r.pan.mag(),a,t.extend({},Ii,e||{}));s.offset=r.pan.mult(l.amount/r.pan.mag()),s.center=this._map.transform.center,Ci(s,l)}if(r.zoom){var u=ki(r.zoom,a,Ei);s.zoom=this._map.transform.zoom+u.amount,Ci(s,u)}if(r.bearing){var c=ki(r.bearing,a,Ai);s.bearing=this._map.transform.bearing+t.clamp(c.amount,-179,179),Ci(s,c)}if(r.pitch){var p=ki(r.pitch,a,zi);s.pitch=this._map.transform.pitch+p.amount,Ci(s,p)}if(s.zoom||s.bearing){var h=void 0===r.pinchAround?r.around:r.pinchAround;s.around=h?this._map.unproject(h):this._map.getCenter()}return this.clear(),t.extend(s,{noMoveStart:!0})}};var Mi=function(e){function i(i,n,o,a){void 0===a&&(a={});var s=r.mousePos(n.getCanvasContainer(),o),l=n.unproject(s);e.call(this,i,t.extend({point:s,lngLat:l,originalEvent:o},a)),this._defaultPrevented=!1,this.target=n}e&&(i.__proto__=e),(i.prototype=Object.create(e&&e.prototype)).constructor=i;var n={defaultPrevented:{configurable:!0}};return i.prototype.preventDefault=function(){this._defaultPrevented=!0},n.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(i.prototype,n),i}(t.Event),Di=function(e){function i(i,n,o){var a="touchend"===i?o.changedTouches:o.touches,s=r.touchPos(n.getCanvasContainer(),a),l=s.map(function(t){return n.unproject(t)}),u=s.reduce(function(t,e,r,i){return t.add(e.div(i.length))},new t.Point(0,0)),c=n.unproject(u);e.call(this,i,{points:s,point:u,lngLats:l,lngLat:c,originalEvent:o}),this._defaultPrevented=!1}e&&(i.__proto__=e),(i.prototype=Object.create(e&&e.prototype)).constructor=i;var n={defaultPrevented:{configurable:!0}};return i.prototype.preventDefault=function(){this._defaultPrevented=!0},n.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(i.prototype,n),i}(t.Event),Li=function(t){function e(e,r,i){t.call(this,e,{originalEvent:i}),this._defaultPrevented=!1}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var r={defaultPrevented:{configurable:!0}};return e.prototype.preventDefault=function(){this._defaultPrevented=!0},r.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(e.prototype,r),e}(t.Event),Ri=function(t,e){this._map=t,this._clickTolerance=e.clickTolerance};Ri.prototype.reset=function(){delete this._mousedownPos},Ri.prototype.wheel=function(t){return this._firePreventable(new Li(t.type,this._map,t))},Ri.prototype.mousedown=function(t,e){return this._mousedownPos=e,this._firePreventable(new Mi(t.type,this._map,t))},Ri.prototype.mouseup=function(t){this._map.fire(new Mi(t.type,this._map,t))},Ri.prototype.click=function(t,e){this._mousedownPos&&this._mousedownPos.dist(e)>=this._clickTolerance||this._map.fire(new Mi(t.type,this._map,t))},Ri.prototype.dblclick=function(t){return this._firePreventable(new Mi(t.type,this._map,t))},Ri.prototype.mouseover=function(t){this._map.fire(new Mi(t.type,this._map,t))},Ri.prototype.mouseout=function(t){this._map.fire(new Mi(t.type,this._map,t))},Ri.prototype.touchstart=function(t){return this._firePreventable(new Di(t.type,this._map,t))},Ri.prototype.touchend=function(t){this._map.fire(new Di(t.type,this._map,t))},Ri.prototype.touchcancel=function(t){this._map.fire(new Di(t.type,this._map,t))},Ri.prototype._firePreventable=function(t){if(this._map.fire(t),t.defaultPrevented)return{}},Ri.prototype.isEnabled=function(){return!0},Ri.prototype.isActive=function(){return!1},Ri.prototype.enable=function(){},Ri.prototype.disable=function(){};var Bi=function(t){this._map=t};Bi.prototype.reset=function(){this._delayContextMenu=!1,delete this._contextMenuEvent},Bi.prototype.mousemove=function(t){this._map.fire(new Mi(t.type,this._map,t))},Bi.prototype.touchmove=function(t){this._map.fire(new Di(t.type,this._map,t))},Bi.prototype.mousedown=function(){this._delayContextMenu=!0},Bi.prototype.mouseup=function(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Mi("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)},Bi.prototype.contextmenu=function(t){this._delayContextMenu?this._contextMenuEvent=t:this._map.fire(new Mi(t.type,this._map,t)),this._map.listens("contextmenu")&&t.preventDefault()},Bi.prototype.isEnabled=function(){return!0},Bi.prototype.isActive=function(){return!1},Bi.prototype.enable=function(){},Bi.prototype.disable=function(){};var Fi=function(t,e){this._map=t,this._el=t.getCanvasContainer(),this._container=t.getContainer(),this._clickTolerance=e.clickTolerance||1};function Oi(t,e){for(var r={},i=0;i<t.length;i++)r[t[i].identifier]=e[i];return r}Fi.prototype.isEnabled=function(){return!!this._enabled},Fi.prototype.isActive=function(){return!!this._active},Fi.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},Fi.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},Fi.prototype.mousedown=function(t,e){this.isEnabled()&&t.shiftKey&&0===t.button&&(r.disableDrag(),this._startPos=this._lastPos=e,this._active=!0)},Fi.prototype.mousemoveWindow=function(t,e){if(this._active){var i=e;if(!(this._lastPos.equals(i)||!this._box&&i.dist(this._startPos)<this._clickTolerance)){var n=this._startPos;this._lastPos=i,this._box||(this._box=r.create("div","mapboxgl-boxzoom",this._container),this._container.classList.add("mapboxgl-crosshair"),this._fireEvent("boxzoomstart",t));var o=Math.min(n.x,i.x),a=Math.max(n.x,i.x),s=Math.min(n.y,i.y),l=Math.max(n.y,i.y);r.setTransform(this._box,"translate("+o+"px,"+s+"px)"),this._box.style.width=a-o+"px",this._box.style.height=l-s+"px"}}},Fi.prototype.mouseupWindow=function(e,i){var n=this;if(this._active&&0===e.button){var o=this._startPos,a=i;if(this.reset(),r.suppressClick(),o.x!==a.x||o.y!==a.y)return this._map.fire(new t.Event("boxzoomend",{originalEvent:e})),{cameraAnimation:function(t){return t.fitScreenCoordinates(o,a,n._map.getBearing(),{linear:!0})}};this._fireEvent("boxzoomcancel",e)}},Fi.prototype.keydown=function(t){this._active&&27===t.keyCode&&(this.reset(),this._fireEvent("boxzoomcancel",t))},Fi.prototype.reset=function(){this._active=!1,this._container.classList.remove("mapboxgl-crosshair"),this._box&&(r.remove(this._box),this._box=null),r.enableDrag(),delete this._startPos,delete this._lastPos},Fi.prototype._fireEvent=function(e,r){return this._map.fire(new t.Event(e,{originalEvent:r}))};var Ui=function(t){this.reset(),this.numTouches=t.numTouches};Ui.prototype.reset=function(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1},Ui.prototype.touchstart=function(e,r){(this.centroid||e.targetTouches.length>this.numTouches)&&(this.aborted=!0),this.aborted||(void 0===this.startTime&&(this.startTime=e.timeStamp),e.targetTouches.length===this.numTouches&&(this.centroid=function(e){for(var r=new t.Point(0,0),i=0,n=e;i<n.length;i+=1)r._add(n[i]);return r.div(e.length)}(r),this.touches=Oi(e.targetTouches,r)))},Ui.prototype.touchmove=function(t,e){if(!this.aborted&&this.centroid){var r=Oi(t.targetTouches,e);for(var i in this.touches){var n=r[i];(!n||n.dist(this.touches[i])>30)&&(this.aborted=!0)}}},Ui.prototype.touchend=function(t){if((!this.centroid||t.timeStamp-this.startTime>500)&&(this.aborted=!0),0===t.targetTouches.length){var e=!this.aborted&&this.centroid;if(this.reset(),e)return e}};var Vi=function(t){this.singleTap=new Ui(t),this.numTaps=t.numTaps,this.reset()};Vi.prototype.reset=function(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()},Vi.prototype.touchstart=function(t,e){this.singleTap.touchstart(t,e)},Vi.prototype.touchmove=function(t,e){this.singleTap.touchmove(t,e)},Vi.prototype.touchend=function(t){var e=this.singleTap.touchend(t);if(e){var r=t.timeStamp-this.lastTime<500,i=!this.lastTap||this.lastTap.dist(e)<30;if(r&&i||this.reset(),this.count++,this.lastTime=t.timeStamp,this.lastTap=e,this.count===this.numTaps)return this.reset(),e}};var Ni=function(){this._zoomIn=new Vi({numTouches:1,numTaps:2}),this._zoomOut=new Vi({numTouches:2,numTaps:1}),this.reset()};Ni.prototype.reset=function(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()},Ni.prototype.touchstart=function(t,e){this._zoomIn.touchstart(t,e),this._zoomOut.touchstart(t,e)},Ni.prototype.touchmove=function(t,e){this._zoomIn.touchmove(t,e),this._zoomOut.touchmove(t,e)},Ni.prototype.touchend=function(t){var e=this,r=this._zoomIn.touchend(t),i=this._zoomOut.touchend(t);return r?(this._active=!0,t.preventDefault(),setTimeout(function(){return e.reset()},0),{cameraAnimation:function(e){return e.easeTo({duration:300,zoom:e.getZoom()+1,around:e.unproject(r)},{originalEvent:t})}}):i?(this._active=!0,t.preventDefault(),setTimeout(function(){return e.reset()},0),{cameraAnimation:function(e){return e.easeTo({duration:300,zoom:e.getZoom()-1,around:e.unproject(i)},{originalEvent:t})}}):void 0},Ni.prototype.touchcancel=function(){this.reset()},Ni.prototype.enable=function(){this._enabled=!0},Ni.prototype.disable=function(){this._enabled=!1,this.reset()},Ni.prototype.isEnabled=function(){return this._enabled},Ni.prototype.isActive=function(){return this._active};var ji=function(t){this.reset(),this._clickTolerance=t.clickTolerance||1};ji.prototype.reset=function(){this._active=!1,this._moved=!1,delete this._lastPoint,delete this._eventButton},ji.prototype._correctButton=function(t,e){return!1},ji.prototype._move=function(t,e){return{}},ji.prototype.mousedown=function(t,e){if(!this._lastPoint){var i=r.mouseButton(t);this._correctButton(t,i)&&(this._lastPoint=e,this._eventButton=i)}},ji.prototype.mousemoveWindow=function(t,e){var r=this._lastPoint;if(r&&(t.preventDefault(),this._moved||!(e.dist(r)<this._clickTolerance)))return this._moved=!0,this._lastPoint=e,this._move(r,e)},ji.prototype.mouseupWindow=function(t){r.mouseButton(t)===this._eventButton&&(this._moved&&r.suppressClick(),this.reset())},ji.prototype.enable=function(){this._enabled=!0},ji.prototype.disable=function(){this._enabled=!1,this.reset()},ji.prototype.isEnabled=function(){return this._enabled},ji.prototype.isActive=function(){return this._active};var qi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.mousedown=function(e,r){t.prototype.mousedown.call(this,e,r),this._lastPoint&&(this._active=!0)},e.prototype._correctButton=function(t,e){return 0===e&&!t.ctrlKey},e.prototype._move=function(t,e){return{around:e,panDelta:e.sub(t)}},e}(ji),Zi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._correctButton=function(t,e){return 0===e&&t.ctrlKey||2===e},e.prototype._move=function(t,e){var r=.8*(e.x-t.x);if(r)return this._active=!0,{bearingDelta:r}},e.prototype.contextmenu=function(t){t.preventDefault()},e}(ji),Gi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._correctButton=function(t,e){return 0===e&&t.ctrlKey||2===e},e.prototype._move=function(t,e){var r=-.5*(e.y-t.y);if(r)return this._active=!0,{pitchDelta:r}},e.prototype.contextmenu=function(t){t.preventDefault()},e}(ji),Xi=function(t){this._minTouches=1,this._clickTolerance=t.clickTolerance||1,this.reset()};Xi.prototype.reset=function(){this._active=!1,this._touches={},this._sum=new t.Point(0,0)},Xi.prototype.touchstart=function(t,e){return this._calculateTransform(t,e)},Xi.prototype.touchmove=function(t,e){if(this._active)return t.preventDefault(),this._calculateTransform(t,e)},Xi.prototype.touchend=function(t,e){this._calculateTransform(t,e),this._active&&t.targetTouches.length<this._minTouches&&this.reset()},Xi.prototype.touchcancel=function(){this.reset()},Xi.prototype._calculateTransform=function(e,r){e.targetTouches.length>0&&(this._active=!0);var i=Oi(e.targetTouches,r),n=new t.Point(0,0),o=new t.Point(0,0),a=0;for(var s in i){var l=i[s],u=this._touches[s];u&&(n._add(l),o._add(l.sub(u)),a++,i[s]=l)}if(this._touches=i,!(a<this._minTouches)&&o.mag()){var c=o.div(a);if(this._sum._add(c),!(this._sum.mag()<this._clickTolerance))return{around:n.div(a),panDelta:c}}},Xi.prototype.enable=function(){this._enabled=!0},Xi.prototype.disable=function(){this._enabled=!1,this.reset()},Xi.prototype.isEnabled=function(){return this._enabled},Xi.prototype.isActive=function(){return this._active};var Wi=function(){this.reset()};function Ki(t,e,r){for(var i=0;i<t.targetTouches.length;i++)if(t.targetTouches[i].identifier===r)return e[i]}function Hi(t,e){return Math.log(t/e)/Math.LN2}Wi.prototype.reset=function(){this._active=!1,delete this._firstTwoTouches},Wi.prototype._start=function(t){},Wi.prototype._move=function(t,e,r){return{}},Wi.prototype.touchstart=function(t,e){this._firstTwoTouches||t.targetTouches.length<2||(this._firstTwoTouches=[t.targetTouches[0].identifier,t.targetTouches[1].identifier],this._start([e[0],e[1]]))},Wi.prototype.touchmove=function(t,e){if(this._firstTwoTouches){t.preventDefault();var r=this._firstTwoTouches,i=r[1],n=Ki(t,e,r[0]),o=Ki(t,e,i);if(n&&o){var a=this._aroundCenter?null:n.add(o).div(2);return this._move([n,o],a,t)}}},Wi.prototype.touchend=function(t,e){if(this._firstTwoTouches){var i=this._firstTwoTouches,n=i[1],o=Ki(t,e,i[0]),a=Ki(t,e,n);o&&a||(this._active&&r.suppressClick(),this.reset())}},Wi.prototype.touchcancel=function(){this.reset()},Wi.prototype.enable=function(t){this._enabled=!0,this._aroundCenter=!!t&&"center"===t.around},Wi.prototype.disable=function(){this._enabled=!1,this.reset()},Wi.prototype.isEnabled=function(){return this._enabled},Wi.prototype.isActive=function(){return this._active};var Ji=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.reset=function(){t.prototype.reset.call(this),delete this._distance,delete this._startDistance},e.prototype._start=function(t){this._startDistance=this._distance=t[0].dist(t[1])},e.prototype._move=function(t,e){var r=this._distance;if(this._distance=t[0].dist(t[1]),this._active||!(Math.abs(Hi(this._distance,this._startDistance))<.1))return this._active=!0,{zoomDelta:Hi(this._distance,r),pinchAround:e}},e}(Wi);function Yi(t,e){return 180*t.angleWith(e)/Math.PI}var Qi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.reset=function(){t.prototype.reset.call(this),delete this._minDiameter,delete this._startVector,delete this._vector},e.prototype._start=function(t){this._startVector=this._vector=t[0].sub(t[1]),this._minDiameter=t[0].dist(t[1])},e.prototype._move=function(t,e){var r=this._vector;if(this._vector=t[0].sub(t[1]),this._active||!this._isBelowThreshold(this._vector))return this._active=!0,{bearingDelta:Yi(this._vector,r),pinchAround:e}},e.prototype._isBelowThreshold=function(t){this._minDiameter=Math.min(this._minDiameter,t.mag());var e=25/(Math.PI*this._minDiameter)*360,r=Yi(t,this._startVector);return Math.abs(r)<e},e}(Wi);function $i(t){return Math.abs(t.y)>Math.abs(t.x)}var tn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.reset=function(){t.prototype.reset.call(this),this._valid=void 0,delete this._firstMove,delete this._lastPoints},e.prototype._start=function(t){this._lastPoints=t,$i(t[0].sub(t[1]))&&(this._valid=!1)},e.prototype._move=function(t,e,r){var i=t[0].sub(this._lastPoints[0]),n=t[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically(i,n,r.timeStamp),this._valid)return this._lastPoints=t,this._active=!0,{pitchDelta:(i.y+n.y)/2*-.5}},e.prototype.gestureBeginsVertically=function(t,e,r){if(void 0!==this._valid)return this._valid;var i=t.mag()>=2,n=e.mag()>=2;if(i||n){if(!i||!n)return void 0===this._firstMove&&(this._firstMove=r),r-this._firstMove<100&&void 0;var o=t.y>0==e.y>0;return $i(t)&&$i(e)&&o}},e}(Wi),en={panStep:100,bearingStep:15,pitchStep:10},rn=function(){var t=en;this._panStep=t.panStep,this._bearingStep=t.bearingStep,this._pitchStep=t.pitchStep};function nn(t){return t*(2-t)}rn.prototype.reset=function(){this._active=!1},rn.prototype.keydown=function(t){var e=this;if(!(t.altKey||t.ctrlKey||t.metaKey)){var r=0,i=0,n=0,o=0,a=0;switch(t.keyCode){case 61:case 107:case 171:case 187:r=1;break;case 189:case 109:case 173:r=-1;break;case 37:t.shiftKey?i=-1:(t.preventDefault(),o=-1);break;case 39:t.shiftKey?i=1:(t.preventDefault(),o=1);break;case 38:t.shiftKey?n=1:(t.preventDefault(),a=-1);break;case 40:t.shiftKey?n=-1:(t.preventDefault(),a=1);break;default:return}return{cameraAnimation:function(s){var l=s.getZoom();s.easeTo({duration:300,easeId:"keyboardHandler",easing:nn,zoom:r?Math.round(l)+r*(t.shiftKey?2:1):l,bearing:s.getBearing()+i*e._bearingStep,pitch:s.getPitch()+n*e._pitchStep,offset:[-o*e._panStep,-a*e._panStep],center:s.getCenter()},{originalEvent:t})}}}},rn.prototype.enable=function(){this._enabled=!0},rn.prototype.disable=function(){this._enabled=!1,this.reset()},rn.prototype.isEnabled=function(){return this._enabled},rn.prototype.isActive=function(){return this._active};var on=function(e,r){this._map=e,this._el=e.getCanvasContainer(),this._handler=r,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=1/450,t.bindAll(["_onWheel","_onTimeout","_onScrollFrame","_onScrollFinished"],this)};on.prototype.setZoomRate=function(t){this._defaultZoomRate=t},on.prototype.setWheelZoomRate=function(t){this._wheelZoomRate=t},on.prototype.isEnabled=function(){return!!this._enabled},on.prototype.isActive=function(){return!!this._active||void 0!==this._finishTimeout},on.prototype.isZooming=function(){return!!this._zooming},on.prototype.enable=function(t){this.isEnabled()||(this._enabled=!0,this._aroundCenter=t&&"center"===t.around)},on.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},on.prototype.wheel=function(e){if(this.isEnabled()){var r=e.deltaMode===t.window.WheelEvent.DOM_DELTA_LINE?40*e.deltaY:e.deltaY,i=t.browser.now(),n=i-(this._lastWheelEventTime||0);this._lastWheelEventTime=i,0!==r&&r%4.000244140625==0?this._type="wheel":0!==r&&Math.abs(r)<4?this._type="trackpad":n>400?(this._type=null,this._lastValue=r,this._timeout=setTimeout(this._onTimeout,40,e)):this._type||(this._type=Math.abs(n*r)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,r+=this._lastValue)),e.shiftKey&&r&&(r/=4),this._type&&(this._lastWheelEvent=e,this._delta-=r,this._active||this._start(e)),e.preventDefault()}},on.prototype._onTimeout=function(t){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(t)},on.prototype._start=function(e){if(this._delta){this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);var i=r.mousePos(this._el,e);this._around=t.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(i)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}},on.prototype.renderFrame=function(){return this._onScrollFrame()},on.prototype._onScrollFrame=function(){var e=this;if(this._frameId&&(this._frameId=null,this.isActive())){var r=this._map.transform;if(0!==this._delta){var i="wheel"===this._type&&Math.abs(this._delta)>4.000244140625?this._wheelZoomRate:this._defaultZoomRate,n=2/(1+Math.exp(-Math.abs(this._delta*i)));this._delta<0&&0!==n&&(n=1/n);var o="number"==typeof this._targetZoom?r.zoomScale(this._targetZoom):r.scale;this._targetZoom=Math.min(r.maxZoom,Math.max(r.minZoom,r.scaleZoom(o*n))),"wheel"===this._type&&(this._startZoom=r.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var a,s="number"==typeof this._targetZoom?this._targetZoom:r.zoom,l=this._startZoom,u=this._easing,c=!1;if("wheel"===this._type&&l&&u){var p=Math.min((t.browser.now()-this._lastWheelEventTime)/200,1),h=u(p);a=t.number(l,s,h),p<1?this._frameId||(this._frameId=!0):c=!0}else a=s,c=!0;return this._active=!0,c&&(this._active=!1,this._finishTimeout=setTimeout(function(){e._zooming=!1,e._handler._triggerRenderFrame(),delete e._targetZoom,delete e._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!c,zoomDelta:a-r.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}},on.prototype._smoothOutEasing=function(e){var r=t.ease;if(this._prevEase){var i=this._prevEase,n=(t.browser.now()-i.start)/i.duration,o=i.easing(n+.01)-i.easing(n),a=.27/Math.sqrt(o*o+1e-4)*.01,s=Math.sqrt(.0729-a*a);r=t.bezier(a,s,.25,1)}return this._prevEase={start:t.browser.now(),duration:e,easing:r},r},on.prototype.reset=function(){this._active=!1};var an=function(t,e){this._clickZoom=t,this._tapZoom=e};an.prototype.enable=function(){this._clickZoom.enable(),this._tapZoom.enable()},an.prototype.disable=function(){this._clickZoom.disable(),this._tapZoom.disable()},an.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()},an.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()};var sn=function(){this.reset()};sn.prototype.reset=function(){this._active=!1},sn.prototype.dblclick=function(t,e){return t.preventDefault(),{cameraAnimation:function(r){r.easeTo({duration:300,zoom:r.getZoom()+(t.shiftKey?-1:1),around:r.unproject(e)},{originalEvent:t})}}},sn.prototype.enable=function(){this._enabled=!0},sn.prototype.disable=function(){this._enabled=!1,this.reset()},sn.prototype.isEnabled=function(){return this._enabled},sn.prototype.isActive=function(){return this._active};var ln=function(){this._tap=new Vi({numTouches:1,numTaps:1}),this.reset()};ln.prototype.reset=function(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()},ln.prototype.touchstart=function(t,e){this._swipePoint||(this._tapTime&&t.timeStamp-this._tapTime>500&&this.reset(),this._tapTime?t.targetTouches.length>0&&(this._swipePoint=e[0],this._swipeTouch=t.targetTouches[0].identifier):this._tap.touchstart(t,e))},ln.prototype.touchmove=function(t,e){if(this._tapTime){if(this._swipePoint){if(t.targetTouches[0].identifier!==this._swipeTouch)return;var r=e[0],i=r.y-this._swipePoint.y;return this._swipePoint=r,t.preventDefault(),this._active=!0,{zoomDelta:i/128}}}else this._tap.touchmove(t,e)},ln.prototype.touchend=function(t){this._tapTime?this._swipePoint&&0===t.targetTouches.length&&this.reset():this._tap.touchend(t)&&(this._tapTime=t.timeStamp)},ln.prototype.touchcancel=function(){this.reset()},ln.prototype.enable=function(){this._enabled=!0},ln.prototype.disable=function(){this._enabled=!1,this.reset()},ln.prototype.isEnabled=function(){return this._enabled},ln.prototype.isActive=function(){return this._active};var un=function(t,e,r){this._el=t,this._mousePan=e,this._touchPan=r};un.prototype.enable=function(t){this._inertiaOptions=t||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("mapboxgl-touch-drag-pan")},un.prototype.disable=function(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("mapboxgl-touch-drag-pan")},un.prototype.isEnabled=function(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()},un.prototype.isActive=function(){return this._mousePan.isActive()||this._touchPan.isActive()};var cn=function(t,e,r){this._pitchWithRotate=t.pitchWithRotate,this._mouseRotate=e,this._mousePitch=r};cn.prototype.enable=function(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()},cn.prototype.disable=function(){this._mouseRotate.disable(),this._mousePitch.disable()},cn.prototype.isEnabled=function(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())},cn.prototype.isActive=function(){return this._mouseRotate.isActive()||this._mousePitch.isActive()};var pn=function(t,e,r,i){this._el=t,this._touchZoom=e,this._touchRotate=r,this._tapDragZoom=i,this._rotationDisabled=!1,this._enabled=!0};pn.prototype.enable=function(t){this._touchZoom.enable(t),this._rotationDisabled||this._touchRotate.enable(t),this._tapDragZoom.enable(),this._el.classList.add("mapboxgl-touch-zoom-rotate")},pn.prototype.disable=function(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("mapboxgl-touch-zoom-rotate")},pn.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()},pn.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()},pn.prototype.disableRotation=function(){this._rotationDisabled=!0,this._touchRotate.disable()},pn.prototype.enableRotation=function(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()};var hn=function(t){return t.zoom||t.drag||t.pitch||t.rotate},fn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e}(t.Event);function dn(t){return t.panDelta&&t.panDelta.mag()||t.zoomDelta||t.bearingDelta||t.pitchDelta}var mn=function(e,i){this._map=e,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Pi(e),this._bearingSnap=i.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(i),t.bindAll(["handleEvent","handleWindowEvent"],this);var n=this._el;this._listeners=[[n,"touchstart",{passive:!1}],[n,"touchmove",{passive:!1}],[n,"touchend",void 0],[n,"touchcancel",void 0],[n,"mousedown",void 0],[n,"mousemove",void 0],[n,"mouseup",void 0],[t.window.document,"mousemove",{capture:!0}],[t.window.document,"mouseup",void 0],[n,"mouseover",void 0],[n,"mouseout",void 0],[n,"dblclick",void 0],[n,"click",void 0],[n,"keydown",{capture:!1}],[n,"keyup",void 0],[n,"wheel",{passive:!1}],[n,"contextmenu",void 0],[t.window,"blur",void 0]];for(var o=0,a=this._listeners;o<a.length;o+=1){var s=a[o],l=s[0];r.addEventListener(l,s[1],l===t.window.document?this.handleWindowEvent:this.handleEvent,s[2])}};mn.prototype.destroy=function(){for(var e=0,i=this._listeners;e<i.length;e+=1){var n=i[e],o=n[0];r.removeEventListener(o,n[1],o===t.window.document?this.handleWindowEvent:this.handleEvent,n[2])}},mn.prototype._addDefaultHandlers=function(t){var e=this._map,r=e.getCanvasContainer();this._add("mapEvent",new Ri(e,t));var i=e.boxZoom=new Fi(e,t);this._add("boxZoom",i);var n=new Ni,o=new sn;e.doubleClickZoom=new an(o,n),this._add("tapZoom",n),this._add("clickZoom",o);var a=new ln;this._add("tapDragZoom",a);var s=e.touchPitch=new tn;this._add("touchPitch",s);var l=new Zi(t),u=new Gi(t);e.dragRotate=new cn(t,l,u),this._add("mouseRotate",l,["mousePitch"]),this._add("mousePitch",u,["mouseRotate"]);var c=new qi(t),p=new Xi(t);e.dragPan=new un(r,c,p),this._add("mousePan",c),this._add("touchPan",p,["touchZoom","touchRotate"]);var h=new Qi,f=new Ji;e.touchZoomRotate=new pn(r,f,h,a),this._add("touchRotate",h,["touchPan","touchZoom"]),this._add("touchZoom",f,["touchPan","touchRotate"]);var d=e.scrollZoom=new on(e,this);this._add("scrollZoom",d,["mousePan"]);var m=e.keyboard=new rn;this._add("keyboard",m),this._add("blockableMapEvent",new Bi(e));for(var y=0,g=["boxZoom","doubleClickZoom","tapDragZoom","touchPitch","dragRotate","dragPan","touchZoomRotate","scrollZoom","keyboard"];y<g.length;y+=1){var _=g[y];t.interactive&&t[_]&&e[_].enable(t[_])}},mn.prototype._add=function(t,e,r){this._handlers.push({handlerName:t,handler:e,allowed:r}),this._handlersById[t]=e},mn.prototype.stop=function(){if(!this._updatingCamera){for(var t=0,e=this._handlers;t<e.length;t+=1)e[t].handler.reset();this._inertia.clear(),this._fireEvents({},{}),this._changes=[]}},mn.prototype.isActive=function(){for(var t=0,e=this._handlers;t<e.length;t+=1)if(e[t].handler.isActive())return!0;return!1},mn.prototype.isZooming=function(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()},mn.prototype.isRotating=function(){return!!this._eventsInProgress.rotate},mn.prototype._blockedByActive=function(t,e,r){for(var i in t)if(i!==r&&(!e||e.indexOf(i)<0))return!0;return!1},mn.prototype.handleWindowEvent=function(t){this.handleEvent(t,t.type+"Window")},mn.prototype.handleEvent=function(t,e){if("blur"!==t.type){this._updatingCamera=!0;for(var i="renderFrame"===t.type?void 0:t,n={needsRenderFrame:!1},o={},a={},s=t?t.targetTouches?r.touchPos(this._el,t.targetTouches):r.mousePos(this._el,t):null,l=0,u=this._handlers;l<u.length;l+=1){var c=u[l],p=c.handlerName,h=c.handler,f=c.allowed;if(h.isEnabled()){var d=void 0;this._blockedByActive(a,f,p)?h.reset():h[e||t.type]&&(d=h[e||t.type](t,s),this.mergeHandlerResult(n,o,d,p,i),d&&d.needsRenderFrame&&this._triggerRenderFrame()),(d||h.isActive())&&(a[p]=h)}}var m={};for(var y in this._previousActiveHandlers)a[y]||(m[y]=i);this._previousActiveHandlers=a,(Object.keys(m).length||dn(n))&&(this._changes.push([n,o,m]),this._triggerRenderFrame()),(Object.keys(a).length||dn(n))&&this._map._stop(!0),this._updatingCamera=!1;var g=n.cameraAnimation;g&&(this._inertia.clear(),this._fireEvents({},{}),this._changes=[],g(this._map))}else this.stop()},mn.prototype.mergeHandlerResult=function(e,r,i,n,o){if(i){t.extend(e,i);var a={handlerName:n,originalEvent:i.originalEvent||o};void 0!==i.zoomDelta&&(r.zoom=a),void 0!==i.panDelta&&(r.drag=a),void 0!==i.pitchDelta&&(r.pitch=a),void 0!==i.bearingDelta&&(r.rotate=a)}},mn.prototype._applyChanges=function(){for(var e={},r={},i={},n=0,o=this._changes;n<o.length;n+=1){var a=o[n],s=a[0],l=a[1],u=a[2];s.panDelta&&(e.panDelta=(e.panDelta||new t.Point(0,0))._add(s.panDelta)),s.zoomDelta&&(e.zoomDelta=(e.zoomDelta||0)+s.zoomDelta),s.bearingDelta&&(e.bearingDelta=(e.bearingDelta||0)+s.bearingDelta),s.pitchDelta&&(e.pitchDelta=(e.pitchDelta||0)+s.pitchDelta),void 0!==s.around&&(e.around=s.around),void 0!==s.pinchAround&&(e.pinchAround=s.pinchAround),s.noInertia&&(e.noInertia=s.noInertia),t.extend(r,l),t.extend(i,u)}this._updateMapTransform(e,r,i),this._changes=[]},mn.prototype._updateMapTransform=function(t,e,r){var i=this._map,n=i.transform;if(!dn(t))return this._fireEvents(e,r);var o=t.panDelta,a=t.zoomDelta,s=t.bearingDelta,l=t.pitchDelta,u=t.around,c=t.pinchAround;void 0!==c&&(u=c),i._stop(!0),u=u||i.transform.centerPoint;var p=n.pointLocation(o?u.sub(o):u);s&&(n.bearing+=s),l&&(n.pitch+=l),a&&(n.zoom+=a),n.setLocationAtPoint(p,u),this._map._update(),t.noInertia||this._inertia.record(t),this._fireEvents(e,r)},mn.prototype._fireEvents=function(e,r){var i,n=this,o=hn(this._eventsInProgress),a=hn(e);for(var s in!o&&a&&this._fireEvent("movestart",a.originalEvent),e){var l=e[s].originalEvent,u=!this._eventsInProgress[s];this._eventsInProgress[s]=e[s],u&&this._fireEvent(s+"start",l)}for(var c in e.rotate&&(this._bearingChanged=!0),a&&this._fireEvent("move",a.originalEvent),e)this._fireEvent(c,e[c].originalEvent);for(var p in this._eventsInProgress){var h=this._eventsInProgress[p],f=h.handlerName,d=h.originalEvent;this._handlersById[f].isActive()||(delete this._eventsInProgress[p],this._fireEvent(p+"end",i=r[f]||d))}var m=hn(this._eventsInProgress);if((o||a)&&!m){this._updatingCamera=!0;var y=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),g=function(t){return 0!==t&&-n._bearingSnap<t&&t<n._bearingSnap};y?(g(y.bearing||this._map.getBearing())&&(y.bearing=0),this._map.easeTo(y,{originalEvent:i})):(this._map.fire(new t.Event("moveend",{originalEvent:i})),g(this._map.getBearing())&&this._map.resetNorth()),this._bearingChanged=!1,this._updatingCamera=!1}},mn.prototype._fireEvent=function(e,r){this._map.fire(new t.Event(e,r?{originalEvent:r}:{}))},mn.prototype._triggerRenderFrame=function(){var t=this;void 0===this._frameId&&(this._frameId=this._map._requestRenderFrame(function(e){delete t._frameId,t.handleEvent(new fn("renderFrame",{timeStamp:e})),t._applyChanges()}))};var yn=function(e){function r(r,i){e.call(this),this._moving=!1,this._zooming=!1,this.transform=r,this._bearingSnap=i.bearingSnap,t.bindAll(["_renderFrameCallback"],this)}return e&&(r.__proto__=e),(r.prototype=Object.create(e&&e.prototype)).constructor=r,r.prototype.getCenter=function(){return new t.LngLat(this.transform.center.lng,this.transform.center.lat)},r.prototype.setCenter=function(t,e){return this.jumpTo({center:t},e)},r.prototype.panBy=function(e,r,i){return e=t.Point.convert(e).mult(-1),this.panTo(this.transform.center,t.extend({offset:e},r),i)},r.prototype.panTo=function(e,r,i){return this.easeTo(t.extend({center:e},r),i)},r.prototype.getZoom=function(){return this.transform.zoom},r.prototype.setZoom=function(t,e){return this.jumpTo({zoom:t},e),this},r.prototype.zoomTo=function(e,r,i){return this.easeTo(t.extend({zoom:e},r),i)},r.prototype.zoomIn=function(t,e){return this.zoomTo(this.getZoom()+1,t,e),this},r.prototype.zoomOut=function(t,e){return this.zoomTo(this.getZoom()-1,t,e),this},r.prototype.getBearing=function(){return this.transform.bearing},r.prototype.setBearing=function(t,e){return this.jumpTo({bearing:t},e),this},r.prototype.getPadding=function(){return this.transform.padding},r.prototype.setPadding=function(t,e){return this.jumpTo({padding:t},e),this},r.prototype.rotateTo=function(e,r,i){return this.easeTo(t.extend({bearing:e},r),i)},r.prototype.resetNorth=function(e,r){return this.rotateTo(0,t.extend({duration:1e3},e),r),this},r.prototype.resetNorthPitch=function(e,r){return this.easeTo(t.extend({bearing:0,pitch:0,duration:1e3},e),r),this},r.prototype.snapToNorth=function(t,e){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(t,e):this},r.prototype.getPitch=function(){return this.transform.pitch},r.prototype.setPitch=function(t,e){return this.jumpTo({pitch:t},e),this},r.prototype.cameraForBounds=function(e,r){return e=t.LngLatBounds.convert(e),this._cameraForBoxAndBearing(e.getNorthWest(),e.getSouthEast(),0,r)},r.prototype._cameraForBoxAndBearing=function(e,r,i,n){var o={top:0,bottom:0,right:0,left:0};if("number"==typeof(n=t.extend({padding:o,offset:[0,0],maxZoom:this.transform.maxZoom},n)).padding){var a=n.padding;n.padding={top:a,bottom:a,right:a,left:a}}n.padding=t.extend(o,n.padding);var s=this.transform,l=s.padding,u=s.project(t.LngLat.convert(e)),c=s.project(t.LngLat.convert(r)),p=u.rotate(-i*Math.PI/180),h=c.rotate(-i*Math.PI/180),f=new t.Point(Math.max(p.x,h.x),Math.max(p.y,h.y)),d=new t.Point(Math.min(p.x,h.x),Math.min(p.y,h.y)),m=f.sub(d),y=(s.width-(l.left+l.right+n.padding.left+n.padding.right))/m.x,g=(s.height-(l.top+l.bottom+n.padding.top+n.padding.bottom))/m.y;if(!(g<0||y<0)){var _=Math.min(s.scaleZoom(s.scale*Math.min(y,g)),n.maxZoom),v=t.Point.convert(n.offset),x=new t.Point(v.x+(n.padding.left-n.padding.right)/2,v.y+(n.padding.top-n.padding.bottom)/2).mult(s.scale/s.zoomScale(_));return{center:s.unproject(u.add(c).div(2).sub(x)),zoom:_,bearing:i}}t.warnOnce("Map cannot fit within canvas with the given bounds, padding, and/or offset.")},r.prototype.fitBounds=function(t,e,r){return this._fitInternal(this.cameraForBounds(t,e),e,r)},r.prototype.fitScreenCoordinates=function(e,r,i,n,o){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.pointLocation(t.Point.convert(e)),this.transform.pointLocation(t.Point.convert(r)),i,n),n,o)},r.prototype._fitInternal=function(e,r,i){return e?(delete(r=t.extend(e,r)).padding,r.linear?this.easeTo(r,i):this.flyTo(r,i)):this},r.prototype.jumpTo=function(e,r){this.stop();var i=this.transform,n=!1,o=!1,a=!1;return"zoom"in e&&i.zoom!==+e.zoom&&(n=!0,i.zoom=+e.zoom),void 0!==e.center&&(i.center=t.LngLat.convert(e.center)),"bearing"in e&&i.bearing!==+e.bearing&&(o=!0,i.bearing=+e.bearing),"pitch"in e&&i.pitch!==+e.pitch&&(a=!0,i.pitch=+e.pitch),null==e.padding||i.isPaddingEqual(e.padding)||(i.padding=e.padding),this.fire(new t.Event("movestart",r)).fire(new t.Event("move",r)),n&&this.fire(new t.Event("zoomstart",r)).fire(new t.Event("zoom",r)).fire(new t.Event("zoomend",r)),o&&this.fire(new t.Event("rotatestart",r)).fire(new t.Event("rotate",r)).fire(new t.Event("rotateend",r)),a&&this.fire(new t.Event("pitchstart",r)).fire(new t.Event("pitch",r)).fire(new t.Event("pitchend",r)),this.fire(new t.Event("moveend",r))},r.prototype.easeTo=function(e,r){var i=this;this._stop(!1,e.easeId),(!1===(e=t.extend({offset:[0,0],duration:500,easing:t.ease},e)).animate||!e.essential&&t.browser.prefersReducedMotion)&&(e.duration=0);var n=this.transform,o=this.getZoom(),a=this.getBearing(),s=this.getPitch(),l=this.getPadding(),u="zoom"in e?+e.zoom:o,c="bearing"in e?this._normalizeBearing(e.bearing,a):a,p="pitch"in e?+e.pitch:s,h="padding"in e?e.padding:n.padding,f=t.Point.convert(e.offset),d=n.centerPoint.add(f),m=n.pointLocation(d),y=t.LngLat.convert(e.center||m);this._normalizeCenter(y);var g,_,v=n.project(m),x=n.project(y).sub(v),b=n.zoomScale(u-o);e.around&&(g=t.LngLat.convert(e.around),_=n.locationPoint(g));var w={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching};return this._zooming=this._zooming||u!==o,this._rotating=this._rotating||a!==c,this._pitching=this._pitching||p!==s,this._padding=!n.isPaddingEqual(h),this._easeId=e.easeId,this._prepareEase(r,e.noMoveStart,w),clearTimeout(this._easeEndTimeoutID),this._ease(function(e){if(i._zooming&&(n.zoom=t.number(o,u,e)),i._rotating&&(n.bearing=t.number(a,c,e)),i._pitching&&(n.pitch=t.number(s,p,e)),i._padding&&(n.interpolatePadding(l,h,e),d=n.centerPoint.add(f)),g)n.setLocationAtPoint(g,_);else{var m=n.zoomScale(n.zoom-o),y=u>o?Math.min(2,b):Math.max(.5,b),w=Math.pow(y,1-e),S=n.unproject(v.add(x.mult(e*w)).mult(m));n.setLocationAtPoint(n.renderWorldCopies?S.wrap():S,d)}i._fireMoveEvents(r)},function(t){i._afterEase(r,t)},e),this},r.prototype._prepareEase=function(e,r,i){void 0===i&&(i={}),this._moving=!0,r||i.moving||this.fire(new t.Event("movestart",e)),this._zooming&&!i.zooming&&this.fire(new t.Event("zoomstart",e)),this._rotating&&!i.rotating&&this.fire(new t.Event("rotatestart",e)),this._pitching&&!i.pitching&&this.fire(new t.Event("pitchstart",e))},r.prototype._fireMoveEvents=function(e){this.fire(new t.Event("move",e)),this._zooming&&this.fire(new t.Event("zoom",e)),this._rotating&&this.fire(new t.Event("rotate",e)),this._pitching&&this.fire(new t.Event("pitch",e))},r.prototype._afterEase=function(e,r){if(!this._easeId||!r||this._easeId!==r){delete this._easeId;var i=this._zooming,n=this._rotating,o=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,i&&this.fire(new t.Event("zoomend",e)),n&&this.fire(new t.Event("rotateend",e)),o&&this.fire(new t.Event("pitchend",e)),this.fire(new t.Event("moveend",e))}},r.prototype.flyTo=function(e,r){var i=this;if(!e.essential&&t.browser.prefersReducedMotion){var n=t.pick(e,["center","zoom","bearing","pitch","around"]);return this.jumpTo(n,r)}this.stop(),e=t.extend({offset:[0,0],speed:1.2,curve:1.42,easing:t.ease},e);var o=this.transform,a=this.getZoom(),s=this.getBearing(),l=this.getPitch(),u=this.getPadding(),c="zoom"in e?t.clamp(+e.zoom,o.minZoom,o.maxZoom):a,p="bearing"in e?this._normalizeBearing(e.bearing,s):s,h="pitch"in e?+e.pitch:l,f="padding"in e?e.padding:o.padding,d=o.zoomScale(c-a),m=t.Point.convert(e.offset),y=o.centerPoint.add(m),g=o.pointLocation(y),_=t.LngLat.convert(e.center||g);this._normalizeCenter(_);var v=o.project(g),x=o.project(_).sub(v),b=e.curve,w=Math.max(o.width,o.height),S=w/d,T=x.mag();if("minZoom"in e){var I=t.clamp(Math.min(e.minZoom,a,c),o.minZoom,o.maxZoom),E=w/o.zoomScale(I-a);b=Math.sqrt(E/T*2)}var A=b*b;function z(t){var e=(S*S-w*w+(t?-1:1)*A*A*T*T)/(2*(t?S:w)*A*T);return Math.log(Math.sqrt(e*e+1)-e)}function P(t){return(Math.exp(t)-Math.exp(-t))/2}function C(t){return(Math.exp(t)+Math.exp(-t))/2}var k=z(0),M=function(t){return C(k)/C(k+b*t)},D=function(t){return w*((C(k)*(P(e=k+b*t)/C(e))-P(k))/A)/T;var e},L=(z(1)-k)/b;if(Math.abs(T)<1e-6||!isFinite(L)){if(Math.abs(w-S)<1e-6)return this.easeTo(e,r);var R=S<w?-1:1;L=Math.abs(Math.log(S/w))/b,D=function(){return 0},M=function(t){return Math.exp(R*b*t)}}return e.duration="duration"in e?+e.duration:1e3*L/("screenSpeed"in e?+e.screenSpeed/b:+e.speed),e.maxDuration&&e.duration>e.maxDuration&&(e.duration=0),this._zooming=!0,this._rotating=s!==p,this._pitching=h!==l,this._padding=!o.isPaddingEqual(f),this._prepareEase(r,!1),this._ease(function(e){var n=e*L,d=1/M(n);o.zoom=1===e?c:a+o.scaleZoom(d),i._rotating&&(o.bearing=t.number(s,p,e)),i._pitching&&(o.pitch=t.number(l,h,e)),i._padding&&(o.interpolatePadding(u,f,e),y=o.centerPoint.add(m));var g=1===e?_:o.unproject(v.add(x.mult(D(n))).mult(d));o.setLocationAtPoint(o.renderWorldCopies?g.wrap():g,y),i._fireMoveEvents(r)},function(){return i._afterEase(r)},e),this},r.prototype.isEasing=function(){return!!this._easeFrameId},r.prototype.stop=function(){return this._stop()},r.prototype._stop=function(t,e){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var r=this._onEaseEnd;delete this._onEaseEnd,r.call(this,e)}if(!t){var i=this.handlers;i&&i.stop()}return this},r.prototype._ease=function(e,r,i){!1===i.animate||0===i.duration?(e(1),r()):(this._easeStart=t.browser.now(),this._easeOptions=i,this._onEaseFrame=e,this._onEaseEnd=r,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},r.prototype._renderFrameCallback=function(){var e=Math.min((t.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(e)),e<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},r.prototype._normalizeBearing=function(e,r){e=t.wrap(e,-180,180);var i=Math.abs(e-r);return Math.abs(e-360-r)<i&&(e-=360),Math.abs(e+360-r)<i&&(e+=360),e},r.prototype._normalizeCenter=function(t){var e=this.transform;if(e.renderWorldCopies&&!e.lngRange){var r=t.lng-e.center.lng;t.lng+=r>180?-360:r<-180?360:0}},r}(t.Evented),gn=function(e){void 0===e&&(e={}),this.options=e,t.bindAll(["_updateEditLink","_updateData","_updateCompact"],this)};gn.prototype.getDefaultPosition=function(){return"bottom-right"},gn.prototype.onAdd=function(t){var e=this.options&&this.options.compact;return this._map=t,this._container=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-attrib"),this._innerContainer=r.create("div","mapboxgl-ctrl-attrib-inner",this._container),e&&this._container.classList.add("mapboxgl-compact"),this._updateAttributions(),this._updateEditLink(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("moveend",this._updateEditLink),void 0===e&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container},gn.prototype.onRemove=function(){r.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("moveend",this._updateEditLink),this._map.off("resize",this._updateCompact),this._map=void 0,this._attribHTML=void 0},gn.prototype._updateEditLink=function(){var e=this._editLink;e||(e=this._editLink=this._container.querySelector(".mapbox-improve-map"));var r=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:this._map._requestManager._customAccessToken||t.config.ACCESS_TOKEN}];if(e){var i=r.reduce(function(t,e,i){return e.value&&(t+=e.key+"="+e.value+(i<r.length-1?"&":"")),t},"?");e.href=t.config.FEEDBACK_URL+"/"+i+(this._map._hash?this._map._hash.getHashString(!0):""),e.rel="noopener nofollow"}},gn.prototype._updateData=function(t){!t||"metadata"!==t.sourceDataType&&"style"!==t.dataType||(this._updateAttributions(),this._updateEditLink())},gn.prototype._updateAttributions=function(){if(this._map.style){var t=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?t=t.concat(this.options.customAttribution.map(function(t){return"string"!=typeof t?"":t})):"string"==typeof this.options.customAttribution&&t.push(this.options.customAttribution)),this._map.style.stylesheet){var e=this._map.style.stylesheet;this.styleOwner=e.owner,this.styleId=e.id}var r=this._map.style.sourceCaches;for(var i in r){var n=r[i];if(n.used){var o=n.getSource();o.attribution&&t.indexOf(o.attribution)<0&&t.push(o.attribution)}}t.sort(function(t,e){return t.length-e.length});var a=(t=t.filter(function(e,r){for(var i=r+1;i<t.length;i++)if(t[i].indexOf(e)>=0)return!1;return!0})).join(" | ");a!==this._attribHTML&&(this._attribHTML=a,t.length?(this._innerContainer.innerHTML=a,this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null)}},gn.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact")};var _n=function(){t.bindAll(["_updateLogo"],this),t.bindAll(["_updateCompact"],this)};_n.prototype.onAdd=function(t){this._map=t,this._container=r.create("div","mapboxgl-ctrl");var e=r.create("a","mapboxgl-ctrl-logo");return e.target="_blank",e.rel="noopener nofollow",e.href="https://www.mapbox.com/",e.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),e.setAttribute("rel","noopener nofollow"),this._container.appendChild(e),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container},_n.prototype.onRemove=function(){r.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)},_n.prototype.getDefaultPosition=function(){return"bottom-left"},_n.prototype._updateLogo=function(t){t&&"metadata"!==t.sourceDataType||(this._container.style.display=this._logoRequired()?"block":"none")},_n.prototype._logoRequired=function(){if(this._map.style){var t=this._map.style.sourceCaches;for(var e in t)if(t[e].getSource().mapbox_logo)return!0;return!1}},_n.prototype._updateCompact=function(){var t=this._container.children;if(t.length){var e=t[0];this._map.getCanvasContainer().offsetWidth<250?e.classList.add("mapboxgl-compact"):e.classList.remove("mapboxgl-compact")}};var vn=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};vn.prototype.add=function(t){var e=++this._id;return this._queue.push({callback:t,id:e,cancelled:!1}),e},vn.prototype.remove=function(t){for(var e=this._currentlyRunning,r=0,i=e?this._queue.concat(e):this._queue;r<i.length;r+=1){var n=i[r];if(n.id===t)return void(n.cancelled=!0)}},vn.prototype.run=function(t){void 0===t&&(t=0);var e=this._currentlyRunning=this._queue;this._queue=[];for(var r=0,i=e;r<i.length;r+=1){var n=i[r];if(!n.cancelled&&(n.callback(t),this._cleared))break}this._cleared=!1,this._currentlyRunning=!1},vn.prototype.clear=function(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]};var xn={"FullscreenControl.Enter":"Enter fullscreen","FullscreenControl.Exit":"Exit fullscreen","GeolocateControl.FindMyLocation":"Find my location","GeolocateControl.LocationNotAvailable":"Location not available","LogoControl.Title":"Mapbox logo","NavigationControl.ResetBearing":"Reset bearing to north","NavigationControl.ZoomIn":"Zoom in","NavigationControl.ZoomOut":"Zoom out","ScaleControl.Feet":"ft","ScaleControl.Meters":"m","ScaleControl.Kilometers":"km","ScaleControl.Miles":"mi","ScaleControl.NauticalMiles":"nm"},bn=t.window.HTMLImageElement,wn=t.window.HTMLElement,Sn=t.window.ImageBitmap,Tn={center:[0,0],zoom:0,bearing:0,pitch:0,minZoom:-2,maxZoom:22,minPitch:0,maxPitch:60,interactive:!0,scrollZoom:!0,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,touchPitch:!0,bearingSnap:7,clickTolerance:3,pitchWithRotate:!0,hash:!1,attributionControl:!0,failIfMajorPerformanceCaveat:!1,preserveDrawingBuffer:!1,trackResize:!0,renderWorldCopies:!0,refreshExpiredTiles:!0,maxTileCacheSize:null,localIdeographFontFamily:"sans-serif",transformRequest:null,accessToken:null,fadeDuration:300,crossSourceCollisions:!0},In=function(i){function n(e){var r=this;if(null!=(e=t.extend({},Tn,e)).minZoom&&null!=e.maxZoom&&e.minZoom>e.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(null!=e.minPitch&&null!=e.maxPitch&&e.minPitch>e.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(null!=e.minPitch&&e.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(null!=e.maxPitch&&e.maxPitch>60)throw new Error("maxPitch must be less than or equal to 60");var n=new bi(e.minZoom,e.maxZoom,e.minPitch,e.maxPitch,e.renderWorldCopies);if(i.call(this,n,e),this._interactive=e.interactive,this._maxTileCacheSize=e.maxTileCacheSize,this._failIfMajorPerformanceCaveat=e.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=e.preserveDrawingBuffer,this._antialias=e.antialias,this._trackResize=e.trackResize,this._bearingSnap=e.bearingSnap,this._refreshExpiredTiles=e.refreshExpiredTiles,this._fadeDuration=e.fadeDuration,this._crossSourceCollisions=e.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=e.collectResourceTiming,this._renderTaskQueue=new vn,this._controls=[],this._mapId=t.uniqueId(),this._locale=t.extend({},xn,e.locale),this._requestManager=new t.RequestManager(e.transformRequest,e.accessToken),"string"==typeof e.container){if(this._container=t.window.document.getElementById(e.container),!this._container)throw new Error("Container '"+e.container+"' not found.")}else{if(!(e.container instanceof wn))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=e.container}if(e.maxBounds&&this.setMaxBounds(e.maxBounds),t.bindAll(["_onWindowOnline","_onWindowResize","_contextLost","_contextRestored"],this),this._setupContainer(),this._setupPainter(),void 0===this.painter)throw new Error("Failed to initialize WebGL.");this.on("move",function(){return r._update(!1)}),this.on("moveend",function(){return r._update(!1)}),this.on("zoom",function(){return r._update(!0)}),void 0!==t.window&&(t.window.addEventListener("online",this._onWindowOnline,!1),t.window.addEventListener("resize",this._onWindowResize,!1)),this.handlers=new mn(this,e),this._hash=e.hash&&new Si("string"==typeof e.hash&&e.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:e.center,zoom:e.zoom,bearing:e.bearing,pitch:e.pitch}),e.bounds&&(this.resize(),this.fitBounds(e.bounds,t.extend({},e.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=e.localIdeographFontFamily,e.style&&this.setStyle(e.style,{localIdeographFontFamily:e.localIdeographFontFamily}),e.attributionControl&&this.addControl(new gn({customAttribution:e.customAttribution})),this.addControl(new _n,e.logoPosition),this.on("style.load",function(){r.transform.unmodified&&r.jumpTo(r.style.stylesheet)}),this.on("data",function(e){r._update("style"===e.dataType),r.fire(new t.Event(e.dataType+"data",e))}),this.on("dataloading",function(e){r.fire(new t.Event(e.dataType+"dataloading",e))})}i&&(n.__proto__=i),(n.prototype=Object.create(i&&i.prototype)).constructor=n;var o={showTileBoundaries:{configurable:!0},showPadding:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0},version:{configurable:!0}};return n.prototype._getMapId=function(){return this._mapId},n.prototype.addControl=function(e,r){if(void 0===r&&e.getDefaultPosition&&(r=e.getDefaultPosition()),void 0===r&&(r="top-right"),!e||!e.onAdd)return this.fire(new t.ErrorEvent(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));var i=e.onAdd(this);this._controls.push(e);var n=this._controlPositions[r];return-1!==r.indexOf("bottom")?n.insertBefore(i,n.firstChild):n.appendChild(i),this},n.prototype.removeControl=function(e){if(!e||!e.onRemove)return this.fire(new t.ErrorEvent(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));var r=this._controls.indexOf(e);return r>-1&&this._controls.splice(r,1),e.onRemove(this),this},n.prototype.resize=function(e){var r=this._containerDimensions(),i=r[0],n=r[1];this._resizeCanvas(i,n),this.transform.resize(i,n),this.painter.resize(i,n);var o=!this._moving;return o&&(this.stop(),this.fire(new t.Event("movestart",e)).fire(new t.Event("move",e))),this.fire(new t.Event("resize",e)),o&&this.fire(new t.Event("moveend",e)),this},n.prototype.getBounds=function(){return this.transform.getBounds()},n.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},n.prototype.setMaxBounds=function(e){return this.transform.setMaxBounds(t.LngLatBounds.convert(e)),this._update()},n.prototype.setMinZoom=function(t){if((t=null==t?-2:t)>=-2&&t<=this.transform.maxZoom)return this.transform.minZoom=t,this._update(),this.getZoom()<t&&this.setZoom(t),this;throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")},n.prototype.getMinZoom=function(){return this.transform.minZoom},n.prototype.setMaxZoom=function(t){if((t=null==t?22:t)>=this.transform.minZoom)return this.transform.maxZoom=t,this._update(),this.getZoom()>t&&this.setZoom(t),this;throw new Error("maxZoom must be greater than the current minZoom")},n.prototype.getMaxZoom=function(){return this.transform.maxZoom},n.prototype.setMinPitch=function(t){if((t=null==t?0:t)<0)throw new Error("minPitch must be greater than or equal to 0");if(t>=0&&t<=this.transform.maxPitch)return this.transform.minPitch=t,this._update(),this.getPitch()<t&&this.setPitch(t),this;throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")},n.prototype.getMinPitch=function(){return this.transform.minPitch},n.prototype.setMaxPitch=function(t){if((t=null==t?60:t)>60)throw new Error("maxPitch must be less than or equal to 60");if(t>=this.transform.minPitch)return this.transform.maxPitch=t,this._update(),this.getPitch()>t&&this.setPitch(t),this;throw new Error("maxPitch must be greater than the current minPitch")},n.prototype.getMaxPitch=function(){return this.transform.maxPitch},n.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},n.prototype.setRenderWorldCopies=function(t){return this.transform.renderWorldCopies=t,this._update()},n.prototype.project=function(e){return this.transform.locationPoint(t.LngLat.convert(e))},n.prototype.unproject=function(e){return this.transform.pointLocation(t.Point.convert(e))},n.prototype.isMoving=function(){return this._moving||this.handlers.isActive()},n.prototype.isZooming=function(){return this._zooming||this.handlers.isZooming()},n.prototype.isRotating=function(){return this._rotating||this.handlers.isRotating()},n.prototype._createDelegatedListener=function(t,e,r){var i,n=this;if("mouseenter"===t||"mouseover"===t){var o=!1;return{layer:e,listener:r,delegates:{mousemove:function(i){var a=n.getLayer(e)?n.queryRenderedFeatures(i.point,{layers:[e]}):[];a.length?o||(o=!0,r.call(n,new Mi(t,n,i.originalEvent,{features:a}))):o=!1},mouseout:function(){o=!1}}}}if("mouseleave"===t||"mouseout"===t){var a=!1;return{layer:e,listener:r,delegates:{mousemove:function(i){(n.getLayer(e)?n.queryRenderedFeatures(i.point,{layers:[e]}):[]).length?a=!0:a&&(a=!1,r.call(n,new Mi(t,n,i.originalEvent)))},mouseout:function(e){a&&(a=!1,r.call(n,new Mi(t,n,e.originalEvent)))}}}}return{layer:e,listener:r,delegates:(i={},i[t]=function(t){var i=n.getLayer(e)?n.queryRenderedFeatures(t.point,{layers:[e]}):[];i.length&&(t.features=i,r.call(n,t),delete t.features)},i)}},n.prototype.on=function(t,e,r){if(void 0===r)return i.prototype.on.call(this,t,e);var n=this._createDelegatedListener(t,e,r);for(var o in this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[t]=this._delegatedListeners[t]||[],this._delegatedListeners[t].push(n),n.delegates)this.on(o,n.delegates[o]);return this},n.prototype.once=function(t,e,r){if(void 0===r)return i.prototype.once.call(this,t,e);var n=this._createDelegatedListener(t,e,r);for(var o in n.delegates)this.once(o,n.delegates[o]);return this},n.prototype.off=function(t,e,r){var n=this;return void 0===r?i.prototype.off.call(this,t,e):(this._delegatedListeners&&this._delegatedListeners[t]&&function(i){for(var o=i[t],a=0;a<o.length;a++){var s=o[a];if(s.layer===e&&s.listener===r){for(var l in s.delegates)n.off(l,s.delegates[l]);return o.splice(a,1),n}}}(this._delegatedListeners),this)},n.prototype.queryRenderedFeatures=function(e,r){if(!this.style)return[];var i;if(void 0!==r||void 0===e||e instanceof t.Point||Array.isArray(e)||(r=e,e=void 0),r=r||{},(e=e||[[0,0],[this.transform.width,this.transform.height]])instanceof t.Point||"number"==typeof e[0])i=[t.Point.convert(e)];else{var n=t.Point.convert(e[0]),o=t.Point.convert(e[1]);i=[n,new t.Point(o.x,n.y),o,new t.Point(n.x,o.y),n]}return this.style.queryRenderedFeatures(i,r,this.transform)},n.prototype.querySourceFeatures=function(t,e){return this.style.querySourceFeatures(t,e)},n.prototype.setStyle=function(e,r){return!1!==(r=t.extend({},{localIdeographFontFamily:this._localIdeographFontFamily},r)).diff&&r.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&e?(this._diffStyle(e,r),this):(this._localIdeographFontFamily=r.localIdeographFontFamily,this._updateStyle(e,r))},n.prototype._getUIString=function(t){var e=this._locale[t];if(null==e)throw new Error("Missing UI string '"+t+"'");return e},n.prototype._updateStyle=function(t,e){return this.style&&(this.style.setEventedParent(null),this.style._remove()),t?(this.style=new qe(this,e||{}),this.style.setEventedParent(this,{style:this.style}),"string"==typeof t?this.style.loadURL(t):this.style.loadJSON(t),this):(delete this.style,this)},n.prototype._lazyInitEmptyStyle=function(){this.style||(this.style=new qe(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())},n.prototype._diffStyle=function(e,r){var i=this;if("string"==typeof e){var n=this._requestManager.normalizeStyleURL(e),o=this._requestManager.transformRequest(n,t.ResourceType.Style);t.getJSON(o,function(e,n){e?i.fire(new t.ErrorEvent(e)):n&&i._updateDiff(n,r)})}else"object"==typeof e&&this._updateDiff(e,r)},n.prototype._updateDiff=function(e,r){try{this.style.setState(e)&&this._update(!0)}catch(i){t.warnOnce("Unable to perform style diff: "+(i.message||i.error||i)+". Rebuilding the style from scratch."),this._updateStyle(e,r)}},n.prototype.getStyle=function(){if(this.style)return this.style.serialize()},n.prototype.isStyleLoaded=function(){return this.style?this.style.loaded():t.warnOnce("There is no style added to the map.")},n.prototype.addSource=function(t,e){return this._lazyInitEmptyStyle(),this.style.addSource(t,e),this._update(!0)},n.prototype.isSourceLoaded=function(e){var r=this.style&&this.style.sourceCaches[e];if(void 0!==r)return r.loaded();this.fire(new t.ErrorEvent(new Error("There is no source with ID '"+e+"'")))},n.prototype.areTilesLoaded=function(){var t=this.style&&this.style.sourceCaches;for(var e in t){var r=t[e]._tiles;for(var i in r){var n=r[i];if("loaded"!==n.state&&"errored"!==n.state)return!1}}return!0},n.prototype.addSourceType=function(t,e,r){return this._lazyInitEmptyStyle(),this.style.addSourceType(t,e,r)},n.prototype.removeSource=function(t){return this.style.removeSource(t),this._update(!0)},n.prototype.getSource=function(t){return this.style.getSource(t)},n.prototype.addImage=function(e,r,i){void 0===i&&(i={});var n=i.pixelRatio;void 0===n&&(n=1);var o=i.sdf;void 0===o&&(o=!1);var a=i.stretchX,s=i.stretchY,l=i.content;if(this._lazyInitEmptyStyle(),r instanceof bn||Sn&&r instanceof Sn){var u=t.browser.getImageData(r);this.style.addImage(e,{data:new t.RGBAImage({width:u.width,height:u.height},u.data),pixelRatio:n,stretchX:a,stretchY:s,content:l,sdf:o,version:0})}else{if(void 0===r.width||void 0===r.height)return this.fire(new t.ErrorEvent(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));var c=r;this.style.addImage(e,{data:new t.RGBAImage({width:r.width,height:r.height},new Uint8Array(r.data)),pixelRatio:n,stretchX:a,stretchY:s,content:l,sdf:o,version:0,userImage:c}),c.onAdd&&c.onAdd(this,e)}},n.prototype.updateImage=function(e,r){var i=this.style.getImage(e);if(!i)return this.fire(new t.ErrorEvent(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));var n=r instanceof bn||Sn&&r instanceof Sn?t.browser.getImageData(r):r,o=n.width,a=n.height,s=n.data;return void 0===o||void 0===a?this.fire(new t.ErrorEvent(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`"))):o!==i.data.width||a!==i.data.height?this.fire(new t.ErrorEvent(new Error("The width and height of the updated image must be that same as the previous version of the image"))):(i.data.replace(s,!(r instanceof bn||Sn&&r instanceof Sn)),void this.style.updateImage(e,i))},n.prototype.hasImage=function(e){return e?!!this.style.getImage(e):(this.fire(new t.ErrorEvent(new Error("Missing required image id"))),!1)},n.prototype.removeImage=function(t){this.style.removeImage(t)},n.prototype.loadImage=function(e,r){t.getImage(this._requestManager.transformRequest(e,t.ResourceType.Image),r)},n.prototype.listImages=function(){return this.style.listImages()},n.prototype.addLayer=function(t,e){return this._lazyInitEmptyStyle(),this.style.addLayer(t,e),this._update(!0)},n.prototype.moveLayer=function(t,e){return this.style.moveLayer(t,e),this._update(!0)},n.prototype.removeLayer=function(t){return this.style.removeLayer(t),this._update(!0)},n.prototype.getLayer=function(t){return this.style.getLayer(t)},n.prototype.setLayerZoomRange=function(t,e,r){return this.style.setLayerZoomRange(t,e,r),this._update(!0)},n.prototype.setFilter=function(t,e,r){return void 0===r&&(r={}),this.style.setFilter(t,e,r),this._update(!0)},n.prototype.getFilter=function(t){return this.style.getFilter(t)},n.prototype.setPaintProperty=function(t,e,r,i){return void 0===i&&(i={}),this.style.setPaintProperty(t,e,r,i),this._update(!0)},n.prototype.getPaintProperty=function(t,e){return this.style.getPaintProperty(t,e)},n.prototype.setLayoutProperty=function(t,e,r,i){return void 0===i&&(i={}),this.style.setLayoutProperty(t,e,r,i),this._update(!0)},n.prototype.getLayoutProperty=function(t,e){return this.style.getLayoutProperty(t,e)},n.prototype.setLight=function(t,e){return void 0===e&&(e={}),this._lazyInitEmptyStyle(),this.style.setLight(t,e),this._update(!0)},n.prototype.getLight=function(){return this.style.getLight()},n.prototype.setFeatureState=function(t,e){return this.style.setFeatureState(t,e),this._update()},n.prototype.removeFeatureState=function(t,e){return this.style.removeFeatureState(t,e),this._update()},n.prototype.getFeatureState=function(t){return this.style.getFeatureState(t)},n.prototype.getContainer=function(){return this._container},n.prototype.getCanvasContainer=function(){return this._canvasContainer},n.prototype.getCanvas=function(){return this._canvas},n.prototype._containerDimensions=function(){var t=0,e=0;return this._container&&(t=this._container.clientWidth||400,e=this._container.clientHeight||300),[t,e]},n.prototype._detectMissingCSS=function(){"rgb(250, 128, 114)"!==t.window.getComputedStyle(this._missingCSSCanary).getPropertyValue("background-color")&&t.warnOnce("This page appears to be missing CSS declarations for Mapbox GL JS, which may cause the map to display incorrectly. Please ensure your page includes mapbox-gl.css, as described in https://www.mapbox.com/mapbox-gl-js/api/.")},n.prototype._setupContainer=function(){var t=this._container;t.classList.add("mapboxgl-map"),(this._missingCSSCanary=r.create("div","mapboxgl-canary",t)).style.visibility="hidden",this._detectMissingCSS();var e=this._canvasContainer=r.create("div","mapboxgl-canvas-container",t);this._interactive&&e.classList.add("mapboxgl-interactive"),this._canvas=r.create("canvas","mapboxgl-canvas",e),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex","0"),this._canvas.setAttribute("aria-label","Map");var i=this._containerDimensions();this._resizeCanvas(i[0],i[1]);var n=this._controlContainer=r.create("div","mapboxgl-control-container",t),o=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(function(t){o[t]=r.create("div","mapboxgl-ctrl-"+t,n)})},n.prototype._resizeCanvas=function(e,r){var i=t.browser.devicePixelRatio||1;this._canvas.width=i*e,this._canvas.height=i*r,this._canvas.style.width=e+"px",this._canvas.style.height=r+"px"},n.prototype._setupPainter=function(){var r=t.extend({},e.webGLContextAttributes,{failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1}),i=this._canvas.getContext("webgl",r)||this._canvas.getContext("experimental-webgl",r);i?(this.painter=new gi(i,this.transform),t.webpSupported.testSupport(i)):this.fire(new t.ErrorEvent(new Error("Failed to initialize WebGL")))},n.prototype._contextLost=function(e){e.preventDefault(),this._frame&&(this._frame.cancel(),this._frame=null),this.fire(new t.Event("webglcontextlost",{originalEvent:e}))},n.prototype._contextRestored=function(e){this._setupPainter(),this.resize(),this._update(),this.fire(new t.Event("webglcontextrestored",{originalEvent:e}))},n.prototype.loaded=function(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()},n.prototype._update=function(t){return this.style?(this._styleDirty=this._styleDirty||t,this._sourcesDirty=!0,this.triggerRepaint(),this):this},n.prototype._requestRenderFrame=function(t){return this._update(),this._renderTaskQueue.add(t)},n.prototype._cancelRenderFrame=function(t){this._renderTaskQueue.remove(t)},n.prototype._render=function(e){var r,i=this,n=0,o=this.painter.context.extTimerQuery;if(this.listens("gpu-timing-frame")&&(r=o.createQueryEXT(),o.beginQueryEXT(o.TIME_ELAPSED_EXT,r),n=t.browser.now()),this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(e),!this._removed){var a=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;var s=this.transform.zoom,l=t.browser.now();this.style.zoomHistory.update(s,l);var u=new t.EvaluationParameters(s,{now:l,fadeDuration:this._fadeDuration,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),c=u.crossFadingFactor();1===c&&c===this._crossFadingFactor||(a=!0,this._crossFadingFactor=c),this.style.update(u)}if(this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,this._fadeDuration,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:this._fadeDuration,showPadding:this.showPadding,gpuTiming:!!this.listens("gpu-timing-layer")}),this.fire(new t.Event("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire(new t.Event("load"))),this.style&&(this.style.hasTransitions()||a)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles(),this.listens("gpu-timing-frame")){var p=t.browser.now()-n;o.endQueryEXT(o.TIME_ELAPSED_EXT,r),setTimeout(function(){var e=o.getQueryObjectEXT(r,o.QUERY_RESULT_EXT)/1e6;o.deleteQueryEXT(r),i.fire(new t.Event("gpu-timing-frame",{cpuTime:p,gpuTime:e}))},50)}if(this.listens("gpu-timing-layer")){var h=this.painter.collectGpuTimers();setTimeout(function(){var e=i.painter.queryGpuTimers(h);i.fire(new t.Event("gpu-timing-layer",{layerTimes:e}))},50)}return this._sourcesDirty||this._styleDirty||this._placementDirty||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&(this._fullyLoaded||(this._fullyLoaded=!0),this.fire(new t.Event("idle"))),this}},n.prototype.remove=function(){this._hash&&this._hash.remove();for(var e=0,r=this._controls;e<r.length;e+=1)r[e].onRemove(this);this._controls=[],this._frame&&(this._frame.cancel(),this._frame=null),this._renderTaskQueue.clear(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),void 0!==t.window&&(t.window.removeEventListener("resize",this._onWindowResize,!1),t.window.removeEventListener("online",this._onWindowOnline,!1));var i=this.painter.context.gl.getExtension("WEBGL_lose_context");i&&i.loseContext(),En(this._canvasContainer),En(this._controlContainer),En(this._missingCSSCanary),this._container.classList.remove("mapboxgl-map"),this._removed=!0,this.fire(new t.Event("remove"))},n.prototype.triggerRepaint=function(){var e=this;this.style&&!this._frame&&(this._frame=t.browser.frame(function(t){e._frame=null,e._render(t)}))},n.prototype._onWindowOnline=function(){this._update()},n.prototype._onWindowResize=function(t){this._trackResize&&this.resize({originalEvent:t})._update()},o.showTileBoundaries.get=function(){return!!this._showTileBoundaries},o.showTileBoundaries.set=function(t){this._showTileBoundaries!==t&&(this._showTileBoundaries=t,this._update())},o.showPadding.get=function(){return!!this._showPadding},o.showPadding.set=function(t){this._showPadding!==t&&(this._showPadding=t,this._update())},o.showCollisionBoxes.get=function(){return!!this._showCollisionBoxes},o.showCollisionBoxes.set=function(t){this._showCollisionBoxes!==t&&(this._showCollisionBoxes=t,t?this.style._generateCollisionBoxes():this._update())},o.showOverdrawInspector.get=function(){return!!this._showOverdrawInspector},o.showOverdrawInspector.set=function(t){this._showOverdrawInspector!==t&&(this._showOverdrawInspector=t,this._update())},o.repaint.get=function(){return!!this._repaint},o.repaint.set=function(t){this._repaint!==t&&(this._repaint=t,this.triggerRepaint())},o.vertices.get=function(){return!!this._vertices},o.vertices.set=function(t){this._vertices=t,this._update()},n.prototype._setCacheLimits=function(e,r){t.setCacheLimits(e,r)},o.version.get=function(){return t.version},Object.defineProperties(n.prototype,o),n}(yn);function En(t){t.parentNode&&t.parentNode.removeChild(t)}var An={showCompass:!0,showZoom:!0,visualizePitch:!1},zn=function(e){var i=this;this.options=t.extend({},An,e),this._container=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._container.addEventListener("contextmenu",function(t){return t.preventDefault()}),this.options.showZoom&&(t.bindAll(["_setButtonTitle","_updateZoomButtons"],this),this._zoomInButton=this._createButton("mapboxgl-ctrl-zoom-in",function(t){return i._map.zoomIn({},{originalEvent:t})}),r.create("span","mapboxgl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden",!0),this._zoomOutButton=this._createButton("mapboxgl-ctrl-zoom-out",function(t){return i._map.zoomOut({},{originalEvent:t})}),r.create("span","mapboxgl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden",!0)),this.options.showCompass&&(t.bindAll(["_rotateCompassArrow"],this),this._compass=this._createButton("mapboxgl-ctrl-compass",function(t){i.options.visualizePitch?i._map.resetNorthPitch({},{originalEvent:t}):i._map.resetNorth({},{originalEvent:t})}),this._compassIcon=r.create("span","mapboxgl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden",!0))};zn.prototype._updateZoomButtons=function(){var t=this._map.getZoom();this._zoomInButton.disabled=t===this._map.getMaxZoom(),this._zoomOutButton.disabled=t===this._map.getMinZoom()},zn.prototype._rotateCompassArrow=function(){var t=this.options.visualizePitch?"scale("+1/Math.pow(Math.cos(this._map.transform.pitch*(Math.PI/180)),.5)+") rotateX("+this._map.transform.pitch+"deg) rotateZ("+this._map.transform.angle*(180/Math.PI)+"deg)":"rotate("+this._map.transform.angle*(180/Math.PI)+"deg)";this._compassIcon.style.transform=t},zn.prototype.onAdd=function(t){return this._map=t,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new Pn(this._map,this._compass,this.options.visualizePitch)),this._container},zn.prototype.onRemove=function(){r.remove(this._container),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map},zn.prototype._createButton=function(t,e){var i=r.create("button",t,this._container);return i.type="button",i.addEventListener("click",e),i},zn.prototype._setButtonTitle=function(t,e){var r=this._map._getUIString("NavigationControl."+e);t.title=r,t.setAttribute("aria-label",r)};var Pn=function(e,i,n){void 0===n&&(n=!1),this._clickTolerance=10,this.element=i,this.mouseRotate=new Zi({clickTolerance:e.dragRotate._mouseRotate._clickTolerance}),this.map=e,n&&(this.mousePitch=new Gi({clickTolerance:e.dragRotate._mousePitch._clickTolerance})),t.bindAll(["mousedown","mousemove","mouseup","touchstart","touchmove","touchend","reset"],this),r.addEventListener(i,"mousedown",this.mousedown),r.addEventListener(i,"touchstart",this.touchstart,{passive:!1}),r.addEventListener(i,"touchmove",this.touchmove),r.addEventListener(i,"touchend",this.touchend),r.addEventListener(i,"touchcancel",this.reset)};function Cn(e,r,i){if(e=new t.LngLat(e.lng,e.lat),r){var n=new t.LngLat(e.lng-360,e.lat),o=new t.LngLat(e.lng+360,e.lat),a=i.locationPoint(e).distSqr(r);i.locationPoint(n).distSqr(r)<a?e=n:i.locationPoint(o).distSqr(r)<a&&(e=o)}for(;Math.abs(e.lng-i.center.lng)>180;){var s=i.locationPoint(e);if(s.x>=0&&s.y>=0&&s.x<=i.width&&s.y<=i.height)break;e.lng>i.center.lng?e.lng-=360:e.lng+=360}return e}Pn.prototype.down=function(t,e){this.mouseRotate.mousedown(t,e),this.mousePitch&&this.mousePitch.mousedown(t,e),r.disableDrag()},Pn.prototype.move=function(t,e){var r=this.map,i=this.mouseRotate.mousemoveWindow(t,e);if(i&&i.bearingDelta&&r.setBearing(r.getBearing()+i.bearingDelta),this.mousePitch){var n=this.mousePitch.mousemoveWindow(t,e);n&&n.pitchDelta&&r.setPitch(r.getPitch()+n.pitchDelta)}},Pn.prototype.off=function(){var t=this.element;r.removeEventListener(t,"mousedown",this.mousedown),r.removeEventListener(t,"touchstart",this.touchstart,{passive:!1}),r.removeEventListener(t,"touchmove",this.touchmove),r.removeEventListener(t,"touchend",this.touchend),r.removeEventListener(t,"touchcancel",this.reset),this.offTemp()},Pn.prototype.offTemp=function(){r.enableDrag(),r.removeEventListener(t.window,"mousemove",this.mousemove),r.removeEventListener(t.window,"mouseup",this.mouseup)},Pn.prototype.mousedown=function(e){this.down(t.extend({},e,{ctrlKey:!0,preventDefault:function(){return e.preventDefault()}}),r.mousePos(this.element,e)),r.addEventListener(t.window,"mousemove",this.mousemove),r.addEventListener(t.window,"mouseup",this.mouseup)},Pn.prototype.mousemove=function(t){this.move(t,r.mousePos(this.element,t))},Pn.prototype.mouseup=function(t){this.mouseRotate.mouseupWindow(t),this.mousePitch&&this.mousePitch.mouseupWindow(t),this.offTemp()},Pn.prototype.touchstart=function(t){1!==t.targetTouches.length?this.reset():(this._startPos=this._lastPos=r.touchPos(this.element,t.targetTouches)[0],this.down({type:"mousedown",button:0,ctrlKey:!0,preventDefault:function(){return t.preventDefault()}},this._startPos))},Pn.prototype.touchmove=function(t){1!==t.targetTouches.length?this.reset():(this._lastPos=r.touchPos(this.element,t.targetTouches)[0],this.move({preventDefault:function(){return t.preventDefault()}},this._lastPos))},Pn.prototype.touchend=function(t){0===t.targetTouches.length&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)<this._clickTolerance&&this.element.click(),this.reset()},Pn.prototype.reset=function(){this.mouseRotate.reset(),this.mousePitch&&this.mousePitch.reset(),delete this._startPos,delete this._lastPos,this.offTemp()};var kn={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function Mn(t,e,r){var i=t.classList;for(var n in kn)i.remove("mapboxgl-"+r+"-anchor-"+n);i.add("mapboxgl-"+r+"-anchor-"+e)}var Dn,Ln=function(e){function i(i,n){var o=this;if(e.call(this),(i instanceof t.window.HTMLElement||n)&&(i=t.extend({element:i},n)),t.bindAll(["_update","_onMove","_onUp","_addDragHandler","_onMapClick","_onKeyPress"],this),this._anchor=i&&i.anchor||"center",this._color=i&&i.color||"#3FB1CE",this._draggable=i&&i.draggable||!1,this._state="inactive",this._rotation=i&&i.rotation||0,this._rotationAlignment=i&&i.rotationAlignment||"auto",this._pitchAlignment=i&&i.pitchAlignment&&"auto"!==i.pitchAlignment?i.pitchAlignment:this._rotationAlignment,i&&i.element)this._element=i.element,this._offset=t.Point.convert(i&&i.offset||[0,0]);else{this._defaultMarker=!0,this._element=r.create("div"),this._element.setAttribute("aria-label","Map marker");var a=r.createNS("http://www.w3.org/2000/svg","svg");a.setAttributeNS(null,"display","block"),a.setAttributeNS(null,"height","41px"),a.setAttributeNS(null,"width","27px"),a.setAttributeNS(null,"viewBox","0 0 27 41");var s=r.createNS("http://www.w3.org/2000/svg","g");s.setAttributeNS(null,"stroke","none"),s.setAttributeNS(null,"stroke-width","1"),s.setAttributeNS(null,"fill","none"),s.setAttributeNS(null,"fill-rule","evenodd");var l=r.createNS("http://www.w3.org/2000/svg","g");l.setAttributeNS(null,"fill-rule","nonzero");var u=r.createNS("http://www.w3.org/2000/svg","g");u.setAttributeNS(null,"transform","translate(3.0, 29.0)"),u.setAttributeNS(null,"fill","#000000");for(var c=0,p=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}];c<p.length;c+=1){var h=p[c],f=r.createNS("http://www.w3.org/2000/svg","ellipse");f.setAttributeNS(null,"opacity","0.04"),f.setAttributeNS(null,"cx","10.5"),f.setAttributeNS(null,"cy","5.80029008"),f.setAttributeNS(null,"rx",h.rx),f.setAttributeNS(null,"ry",h.ry),u.appendChild(f)}var d=r.createNS("http://www.w3.org/2000/svg","g");d.setAttributeNS(null,"fill",this._color);var m=r.createNS("http://www.w3.org/2000/svg","path");m.setAttributeNS(null,"d","M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"),d.appendChild(m);var y=r.createNS("http://www.w3.org/2000/svg","g");y.setAttributeNS(null,"opacity","0.25"),y.setAttributeNS(null,"fill","#000000");var g=r.createNS("http://www.w3.org/2000/svg","path");g.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),y.appendChild(g);var _=r.createNS("http://www.w3.org/2000/svg","g");_.setAttributeNS(null,"transform","translate(6.0, 7.0)"),_.setAttributeNS(null,"fill","#FFFFFF");var v=r.createNS("http://www.w3.org/2000/svg","g");v.setAttributeNS(null,"transform","translate(8.0, 8.0)");var x=r.createNS("http://www.w3.org/2000/svg","circle");x.setAttributeNS(null,"fill","#000000"),x.setAttributeNS(null,"opacity","0.25"),x.setAttributeNS(null,"cx","5.5"),x.setAttributeNS(null,"cy","5.5"),x.setAttributeNS(null,"r","5.4999962");var b=r.createNS("http://www.w3.org/2000/svg","circle");b.setAttributeNS(null,"fill","#FFFFFF"),b.setAttributeNS(null,"cx","5.5"),b.setAttributeNS(null,"cy","5.5"),b.setAttributeNS(null,"r","5.4999962"),v.appendChild(x),v.appendChild(b),l.appendChild(u),l.appendChild(d),l.appendChild(y),l.appendChild(_),l.appendChild(v),a.appendChild(l),this._element.appendChild(a),this._offset=t.Point.convert(i&&i.offset||[0,-14])}this._element.classList.add("mapboxgl-marker"),this._element.addEventListener("dragstart",function(t){t.preventDefault()}),this._element.addEventListener("mousedown",function(t){t.preventDefault()}),this._element.addEventListener("focus",function(){var t=o._map.getContainer();t.scrollTop=0,t.scrollLeft=0}),Mn(this._element,this._anchor,"marker"),this._popup=null}return e&&(i.__proto__=e),(i.prototype=Object.create(e&&e.prototype)).constructor=i,i.prototype.addTo=function(t){return this.remove(),this._map=t,t.getCanvasContainer().appendChild(this._element),t.on("move",this._update),t.on("moveend",this._update),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this},i.prototype.remove=function(){return this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),delete this._map),r.remove(this._element),this._popup&&this._popup.remove(),this},i.prototype.getLngLat=function(){return this._lngLat},i.prototype.setLngLat=function(e){return this._lngLat=t.LngLat.convert(e),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this},i.prototype.getElement=function(){return this._element},i.prototype.setPopup=function(t){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),t){if(!("offset"in t.options)){var e=Math.sqrt(Math.pow(13.5,2)/2);t.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[e,-1*(24.6+e)],"bottom-right":[-e,-1*(24.6+e)],left:[13.5,-24.6],right:[-13.5,-24.6]}:this._offset}this._popup=t,this._lngLat&&this._popup.setLngLat(this._lngLat),this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this},i.prototype._onKeyPress=function(t){var e=t.code,r=t.charCode||t.keyCode;"Space"!==e&&"Enter"!==e&&32!==r&&13!==r||this.togglePopup()},i.prototype._onMapClick=function(t){var e=t.originalEvent.target,r=this._element;this._popup&&(e===r||r.contains(e))&&this.togglePopup()},i.prototype.getPopup=function(){return this._popup},i.prototype.togglePopup=function(){var t=this._popup;return t?(t.isOpen()?t.remove():t.addTo(this._map),this):this},i.prototype._update=function(t){if(this._map){this._map.transform.renderWorldCopies&&(this._lngLat=Cn(this._lngLat,this._pos,this._map.transform)),this._pos=this._map.project(this._lngLat)._add(this._offset);var e="";"viewport"===this._rotationAlignment||"auto"===this._rotationAlignment?e="rotateZ("+this._rotation+"deg)":"map"===this._rotationAlignment&&(e="rotateZ("+(this._rotation-this._map.getBearing())+"deg)");var i="";"viewport"===this._pitchAlignment||"auto"===this._pitchAlignment?i="rotateX(0deg)":"map"===this._pitchAlignment&&(i="rotateX("+this._map.getPitch()+"deg)"),t&&"moveend"!==t.type||(this._pos=this._pos.round()),r.setTransform(this._element,kn[this._anchor]+" translate("+this._pos.x+"px, "+this._pos.y+"px) "+i+" "+e)}},i.prototype.getOffset=function(){return this._offset},i.prototype.setOffset=function(e){return this._offset=t.Point.convert(e),this._update(),this},i.prototype._onMove=function(e){this._pos=e.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none","pending"===this._state&&(this._state="active",this.fire(new t.Event("dragstart"))),this.fire(new t.Event("drag"))},i.prototype._onUp=function(){this._element.style.pointerEvents="auto",this._positionDelta=null,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),"active"===this._state&&this.fire(new t.Event("dragend")),this._state="inactive"},i.prototype._addDragHandler=function(t){this._element.contains(t.originalEvent.target)&&(t.preventDefault(),this._positionDelta=t.point.sub(this._pos).add(this._offset),this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},i.prototype.setDraggable=function(t){return this._draggable=!!t,this._map&&(t?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this},i.prototype.isDraggable=function(){return this._draggable},i.prototype.setRotation=function(t){return this._rotation=t||0,this._update(),this},i.prototype.getRotation=function(){return this._rotation},i.prototype.setRotationAlignment=function(t){return this._rotationAlignment=t||"auto",this._update(),this},i.prototype.getRotationAlignment=function(){return this._rotationAlignment},i.prototype.setPitchAlignment=function(t){return this._pitchAlignment=t&&"auto"!==t?t:this._rotationAlignment,this._update(),this},i.prototype.getPitchAlignment=function(){return this._pitchAlignment},i}(t.Evented),Rn={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},Bn=0,Fn=!1,On=function(e){function i(r){e.call(this),this.options=t.extend({},Rn,r),t.bindAll(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker"],this)}return e&&(i.__proto__=e),(i.prototype=Object.create(e&&e.prototype)).constructor=i,i.prototype.onAdd=function(e){var i;return this._map=e,this._container=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),i=this._setupUI,void 0!==Dn?i(Dn):void 0!==t.window.navigator.permissions?t.window.navigator.permissions.query({name:"geolocation"}).then(function(t){i(Dn="denied"!==t.state)}):i(Dn=!!t.window.navigator.geolocation),this._container},i.prototype.onRemove=function(){void 0!==this._geolocationWatchID&&(t.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),r.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,Bn=0,Fn=!1},i.prototype._isOutOfMapMaxBounds=function(t){var e=this._map.getMaxBounds(),r=t.coords;return e&&(r.longitude<e.getWest()||r.longitude>e.getEast()||r.latitude<e.getSouth()||r.latitude>e.getNorth())},i.prototype._setErrorState=function(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting")}},i.prototype._onSuccess=function(e){if(this._map){if(this._isOutOfMapMaxBounds(e))return this._setErrorState(),this.fire(new t.Event("outofmaxbounds",e)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=e,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background")}this.options.showUserLocation&&"OFF"!==this._watchState&&this._updateMarker(e),this.options.trackUserLocation&&"ACTIVE_LOCK"!==this._watchState||this._updateCamera(e),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new t.Event("geolocate",e)),this._finish()}},i.prototype._updateCamera=function(e){var r=new t.LngLat(e.coords.longitude,e.coords.latitude),i=e.coords.accuracy,n=this._map.getBearing(),o=t.extend({bearing:n},this.options.fitBoundsOptions);this._map.fitBounds(r.toBounds(i),o,{geolocateSource:!0})},i.prototype._updateMarker=function(e){if(e){var r=new t.LngLat(e.coords.longitude,e.coords.latitude);this._accuracyCircleMarker.setLngLat(r).addTo(this._map),this._userLocationDotMarker.setLngLat(r).addTo(this._map),this._accuracy=e.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},i.prototype._updateCircleRadius=function(){var t=this._map._container.clientHeight/2,e=this._map.unproject([0,t]),r=this._map.unproject([1,t]),i=e.distanceTo(r),n=Math.ceil(2*this._accuracy/i);this._circleElement.style.width=n+"px",this._circleElement.style.height=n+"px"},i.prototype._onZoom=function(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},i.prototype._onError=function(e){if(this._map){if(this.options.trackUserLocation)if(1===e.code){this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;var r=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=r,this._geolocateButton.setAttribute("aria-label",r),void 0!==this._geolocationWatchID&&this._clearWatch()}else{if(3===e.code&&Fn)return;this._setErrorState()}"OFF"!==this._watchState&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new t.Event("error",e)),this._finish()}},i.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},i.prototype._setupUI=function(e){var i=this;if(this._container.addEventListener("contextmenu",function(t){return t.preventDefault()}),this._geolocateButton=r.create("button","mapboxgl-ctrl-geolocate",this._container),r.create("span","mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden",!0),this._geolocateButton.type="button",!1===e){t.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");var n=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=n,this._geolocateButton.setAttribute("aria-label",n)}else{var o=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=o,this._geolocateButton.setAttribute("aria-label",o)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=r.create("div","mapboxgl-user-location-dot"),this._userLocationDotMarker=new Ln(this._dotElement),this._circleElement=r.create("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Ln({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",function(e){e.geolocateSource||"ACTIVE_LOCK"!==i._watchState||e.originalEvent&&"resize"===e.originalEvent.type||(i._watchState="BACKGROUND",i._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),i._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),i.fire(new t.Event("trackuserlocationend")))})},i.prototype.trigger=function(){if(!this._setup)return t.warnOnce("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new t.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Bn--,Fn=!1,this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this.fire(new t.Event("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new t.Event("trackuserlocationstart"))}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"BACKGROUND":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");break;case"BACKGROUND_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error")}if("OFF"===this._watchState&&void 0!==this._geolocationWatchID)this._clearWatch();else if(void 0===this._geolocationWatchID){var e;this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),++Bn>1?(e={maximumAge:6e5,timeout:0},Fn=!0):(e=this.options.positionOptions,Fn=!1),this._geolocationWatchID=t.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,e)}}else t.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},i.prototype._clearWatch=function(){t.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)},i}(t.Evented),Un={maxWidth:100,unit:"metric"},Vn=function(e){this.options=t.extend({},Un,e),t.bindAll(["_onMove","setUnit"],this)};function Nn(t,e,r){var i=r&&r.maxWidth||100,n=t._container.clientHeight/2,o=t.unproject([0,n]),a=t.unproject([i,n]),s=o.distanceTo(a);if(r&&"imperial"===r.unit){var l=3.2808*s;l>5280?jn(e,i,l/5280,t._getUIString("ScaleControl.Miles")):jn(e,i,l,t._getUIString("ScaleControl.Feet"))}else r&&"nautical"===r.unit?jn(e,i,s/1852,t._getUIString("ScaleControl.NauticalMiles")):s>=1e3?jn(e,i,s/1e3,t._getUIString("ScaleControl.Kilometers")):jn(e,i,s,t._getUIString("ScaleControl.Meters"))}function jn(t,e,r,i){var n,o,a,s=(n=r,(o=Math.pow(10,(""+Math.floor(n)).length-1))*(a=(a=n/o)>=10?10:a>=5?5:a>=3?3:a>=2?2:a>=1?1:function(t){var e=Math.pow(10,Math.ceil(-Math.log(t)/Math.LN10));return Math.round(t*e)/e}(a)));t.style.width=e*(s/r)+"px",t.innerHTML=s+"&nbsp;"+i}Vn.prototype.getDefaultPosition=function(){return"bottom-left"},Vn.prototype._onMove=function(){Nn(this._map,this._container,this.options)},Vn.prototype.onAdd=function(t){return this._map=t,this._container=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",t.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container},Vn.prototype.onRemove=function(){r.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},Vn.prototype.setUnit=function(t){this.options.unit=t,Nn(this._map,this._container,this.options)};var qn=function(e){this._fullscreen=!1,e&&e.container&&(e.container instanceof t.window.HTMLElement?this._container=e.container:t.warnOnce("Full screen control 'container' must be a DOM element.")),t.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in t.window.document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in t.window.document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in t.window.document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in t.window.document&&(this._fullscreenchange="MSFullscreenChange")};qn.prototype.onAdd=function(e){return this._map=e,this._container||(this._container=this._map.getContainer()),this._controlContainer=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",t.warnOnce("This device does not support fullscreen mode.")),this._controlContainer},qn.prototype.onRemove=function(){r.remove(this._controlContainer),this._map=null,t.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},qn.prototype._checkFullscreenSupport=function(){return!!(t.window.document.fullscreenEnabled||t.window.document.mozFullScreenEnabled||t.window.document.msFullscreenEnabled||t.window.document.webkitFullscreenEnabled)},qn.prototype._setupUI=function(){var e=this._fullscreenButton=r.create("button","mapboxgl-ctrl-fullscreen",this._controlContainer);r.create("span","mapboxgl-ctrl-icon",e).setAttribute("aria-hidden",!0),e.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),t.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},qn.prototype._updateTitle=function(){var t=this._getTitle();this._fullscreenButton.setAttribute("aria-label",t),this._fullscreenButton.title=t},qn.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")},qn.prototype._isFullscreen=function(){return this._fullscreen},qn.prototype._changeIcon=function(){(t.window.document.fullscreenElement||t.window.document.mozFullScreenElement||t.window.document.webkitFullscreenElement||t.window.document.msFullscreenElement)===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"),this._updateTitle())},qn.prototype._onClickFullscreen=function(){this._isFullscreen()?t.window.document.exitFullscreen?t.window.document.exitFullscreen():t.window.document.mozCancelFullScreen?t.window.document.mozCancelFullScreen():t.window.document.msExitFullscreen?t.window.document.msExitFullscreen():t.window.document.webkitCancelFullScreen&&t.window.document.webkitCancelFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen&&this._container.webkitRequestFullscreen()};var Zn={closeButton:!0,closeOnClick:!0,className:"",maxWidth:"240px"},Gn=function(e){function i(r){e.call(this),this.options=t.extend(Object.create(Zn),r),t.bindAll(["_update","_onClose","remove","_onMouseMove","_onMouseUp","_onDrag"],this)}return e&&(i.__proto__=e),(i.prototype=Object.create(e&&e.prototype)).constructor=i,i.prototype.addTo=function(e){return this._map&&this.remove(),this._map=e,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")):this._map.on("move",this._update),this.fire(new t.Event("open")),this},i.prototype.isOpen=function(){return!!this._map},i.prototype.remove=function(){return this._content&&r.remove(this._content),this._container&&(r.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),delete this._map),this.fire(new t.Event("close")),this},i.prototype.getLngLat=function(){return this._lngLat},i.prototype.setLngLat=function(e){return this._lngLat=t.LngLat.convert(e),this._pos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.remove("mapboxgl-track-pointer")),this},i.prototype.trackPointer=function(){return this._trackPointer=!0,this._pos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")),this},i.prototype.getElement=function(){return this._container},i.prototype.setText=function(e){return this.setDOMContent(t.window.document.createTextNode(e))},i.prototype.setHTML=function(e){var r,i=t.window.document.createDocumentFragment(),n=t.window.document.createElement("body");for(n.innerHTML=e;r=n.firstChild;)i.appendChild(r);return this.setDOMContent(i)},i.prototype.getMaxWidth=function(){return this._container&&this._container.style.maxWidth},i.prototype.setMaxWidth=function(t){return this.options.maxWidth=t,this._update(),this},i.prototype.setDOMContent=function(t){return this._createContent(),this._content.appendChild(t),this._update(),this},i.prototype.addClassName=function(t){this._container&&this._container.classList.add(t)},i.prototype.removeClassName=function(t){this._container&&this._container.classList.remove(t)},i.prototype.toggleClassName=function(t){if(this._container)return this._container.classList.toggle(t)},i.prototype._createContent=function(){this._content&&r.remove(this._content),this._content=r.create("div","mapboxgl-popup-content",this._container),this.options.closeButton&&(this._closeButton=r.create("button","mapboxgl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.setAttribute("aria-label","Close popup"),this._closeButton.innerHTML="&#215;",this._closeButton.addEventListener("click",this._onClose))},i.prototype._onMouseUp=function(t){this._update(t.point)},i.prototype._onMouseMove=function(t){this._update(t.point)},i.prototype._onDrag=function(t){this._update(t.point)},i.prototype._update=function(e){var i=this;if(this._map&&(this._lngLat||this._trackPointer)&&this._content&&(this._container||(this._container=r.create("div","mapboxgl-popup",this._map.getContainer()),this._tip=r.create("div","mapboxgl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(" ").forEach(function(t){return i._container.classList.add(t)}),this._trackPointer&&this._container.classList.add("mapboxgl-popup-track-pointer")),this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._map.transform.renderWorldCopies&&!this._trackPointer&&(this._lngLat=Cn(this._lngLat,this._pos,this._map.transform)),!this._trackPointer||e)){var n=this._pos=this._trackPointer&&e?e:this._map.project(this._lngLat),o=this.options.anchor,a=function e(r){if(r){if("number"==typeof r){var i=Math.round(Math.sqrt(.5*Math.pow(r,2)));return{center:new t.Point(0,0),top:new t.Point(0,r),"top-left":new t.Point(i,i),"top-right":new t.Point(-i,i),bottom:new t.Point(0,-r),"bottom-left":new t.Point(i,-i),"bottom-right":new t.Point(-i,-i),left:new t.Point(r,0),right:new t.Point(-r,0)}}if(r instanceof t.Point||Array.isArray(r)){var n=t.Point.convert(r);return{center:n,top:n,"top-left":n,"top-right":n,bottom:n,"bottom-left":n,"bottom-right":n,left:n,right:n}}return{center:t.Point.convert(r.center||[0,0]),top:t.Point.convert(r.top||[0,0]),"top-left":t.Point.convert(r["top-left"]||[0,0]),"top-right":t.Point.convert(r["top-right"]||[0,0]),bottom:t.Point.convert(r.bottom||[0,0]),"bottom-left":t.Point.convert(r["bottom-left"]||[0,0]),"bottom-right":t.Point.convert(r["bottom-right"]||[0,0]),left:t.Point.convert(r.left||[0,0]),right:t.Point.convert(r.right||[0,0])}}return e(new t.Point(0,0))}(this.options.offset);if(!o){var s,l=this._container.offsetWidth,u=this._container.offsetHeight;s=n.y+a.bottom.y<u?["top"]:n.y>this._map.transform.height-u?["bottom"]:[],n.x<l/2?s.push("left"):n.x>this._map.transform.width-l/2&&s.push("right"),o=0===s.length?"bottom":s.join("-")}var c=n.add(a[o]).round();r.setTransform(this._container,kn[o]+" translate("+c.x+"px,"+c.y+"px)"),Mn(this._container,o,"popup")}},i.prototype._onClose=function(){this.remove()},i}(t.Evented),Xn={version:t.version,supported:e,setRTLTextPlugin:t.setRTLTextPlugin,getRTLTextPluginStatus:t.getRTLTextPluginStatus,Map:In,NavigationControl:zn,GeolocateControl:On,AttributionControl:gn,ScaleControl:Vn,FullscreenControl:qn,Popup:Gn,Marker:Ln,Style:qe,LngLat:t.LngLat,LngLatBounds:t.LngLatBounds,Point:t.Point,MercatorCoordinate:t.MercatorCoordinate,Evented:t.Evented,config:t.config,prewarm:function(){Ot().acquire(Lt)},clearPrewarmedResources:function(){var t=Bt;t&&(t.isPreloaded()&&1===t.numActive()?(t.release(Lt),Bt=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},get accessToken(){return t.config.ACCESS_TOKEN},set accessToken(e){t.config.ACCESS_TOKEN=e},get baseApiUrl(){return t.config.API_URL},set baseApiUrl(e){t.config.API_URL=e},get workerCount(){return Rt.workerCount},set workerCount(t){Rt.workerCount=t},get maxParallelImageRequests(){return t.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(e){t.config.MAX_PARALLEL_IMAGE_REQUESTS=e},clearStorage:function(e){t.clearTileCache(e)},workerUrl:""};return Xn}),r});
-//# sourceMappingURL=/sm/f742f45d2bf14ca98850aac1fef4bb0a53d07b718082545a5525c99d800fa3b5.map \ No newline at end of file
+!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).mapboxgl=e()}(this,function(){"use strict";var t,e,r;function i(i,n){if(t)if(e){var o="var sharedChunk = {}; ("+t+")(sharedChunk); ("+e+")(sharedChunk);",a={};t(a),(r=n(a)).workerUrl=window.URL.createObjectURL(new Blob([o],{type:"text/javascript"}))}else e=n;else t=n}return i(0,function(t){function e(t,e){return t(e={exports:{}},e.exports),e.exports}var r=i;function i(t,e,r,i){this.cx=3*t,this.bx=3*(r-t)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*e,this.by=3*(i-e)-this.cy,this.ay=1-this.cy-this.by,this.p1x=t,this.p1y=i,this.p2x=r,this.p2y=i}i.prototype.sampleCurveX=function(t){return((this.ax*t+this.bx)*t+this.cx)*t},i.prototype.sampleCurveY=function(t){return((this.ay*t+this.by)*t+this.cy)*t},i.prototype.sampleCurveDerivativeX=function(t){return(3*this.ax*t+2*this.bx)*t+this.cx},i.prototype.solveCurveX=function(t,e){var r,i,n,o,a;for(void 0===e&&(e=1e-6),n=t,a=0;a<8;a++){if(o=this.sampleCurveX(n)-t,Math.abs(o)<e)return n;var s=this.sampleCurveDerivativeX(n);if(Math.abs(s)<1e-6)break;n-=o/s}if((n=t)<(r=0))return r;if(n>(i=1))return i;for(;r<i;){if(o=this.sampleCurveX(n),Math.abs(o-t)<e)return n;t>o?r=n:i=n,n=.5*(i-r)+r}return n},i.prototype.solve=function(t,e){return this.sampleCurveY(this.solveCurveX(t,e))};var n=o;function o(t,e){this.x=t,this.y=e}function a(t,e,i,n){var o=new r(t,e,i,n);return function(t){return o.solve(t)}}o.prototype={clone:function(){return new o(this.x,this.y)},add:function(t){return this.clone()._add(t)},sub:function(t){return this.clone()._sub(t)},multByPoint:function(t){return this.clone()._multByPoint(t)},divByPoint:function(t){return this.clone()._divByPoint(t)},mult:function(t){return this.clone()._mult(t)},div:function(t){return this.clone()._div(t)},rotate:function(t){return this.clone()._rotate(t)},rotateAround:function(t,e){return this.clone()._rotateAround(t,e)},matMult:function(t){return this.clone()._matMult(t)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(t){return this.x===t.x&&this.y===t.y},dist:function(t){return Math.sqrt(this.distSqr(t))},distSqr:function(t){var e=t.x-this.x,r=t.y-this.y;return e*e+r*r},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(t){return Math.atan2(this.y-t.y,this.x-t.x)},angleWith:function(t){return this.angleWithSep(t.x,t.y)},angleWithSep:function(t,e){return Math.atan2(this.x*e-this.y*t,this.x*t+this.y*e)},_matMult:function(t){var e=t[2]*this.x+t[3]*this.y;return this.x=t[0]*this.x+t[1]*this.y,this.y=e,this},_add:function(t){return this.x+=t.x,this.y+=t.y,this},_sub:function(t){return this.x-=t.x,this.y-=t.y,this},_mult:function(t){return this.x*=t,this.y*=t,this},_div:function(t){return this.x/=t,this.y/=t,this},_multByPoint:function(t){return this.x*=t.x,this.y*=t.y,this},_divByPoint:function(t){return this.x/=t.x,this.y/=t.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var t=this.y;return this.y=this.x,this.x=-t,this},_rotate:function(t){var e=Math.cos(t),r=Math.sin(t),i=r*this.x+e*this.y;return this.x=e*this.x-r*this.y,this.y=i,this},_rotateAround:function(t,e){var r=Math.cos(t),i=Math.sin(t),n=e.y+i*(this.x-e.x)+r*(this.y-e.y);return this.x=e.x+r*(this.x-e.x)-i*(this.y-e.y),this.y=n,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},o.convert=function(t){return t instanceof o?t:Array.isArray(t)?new o(t[0],t[1]):t};var s=a(.25,.1,.25,1);function l(t,e,r){return Math.min(r,Math.max(e,t))}function u(t,e,r){var i=r-e,n=((t-e)%i+i)%i+e;return n===e?r:n}function c(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];for(var i=0,n=e;i<n.length;i+=1){var o=n[i];for(var a in o)t[a]=o[a]}return t}var p=1;function h(){return p++}function f(){return function t(e){return e?(e^16*Math.random()>>e/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,t)}()}function d(t){return!!t&&/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(t)}function m(t,e){t.forEach(function(t){e[t]&&(e[t]=e[t].bind(e))})}function y(t,e){return-1!==t.indexOf(e,t.length-e.length)}function g(t,e,r){var i={};for(var n in t)i[n]=e.call(r||this,t[n],n,t);return i}function _(t,e,r){var i={};for(var n in t)e.call(r||this,t[n],n,t)&&(i[n]=t[n]);return i}function v(t){return Array.isArray(t)?t.map(v):"object"==typeof t&&t?g(t,v):t}var x={};function b(t){x[t]||("undefined"!=typeof console&&console.warn(t),x[t]=!0)}function w(t,e,r){return(r.y-t.y)*(e.x-t.x)>(e.y-t.y)*(r.x-t.x)}function S(t){for(var e=0,r=0,i=t.length,n=i-1,o=void 0,a=void 0;r<i;n=r++)e+=((a=t[n]).x-(o=t[r]).x)*(o.y+a.y);return e}function T(){return"undefined"!=typeof WorkerGlobalScope&&"undefined"!=typeof self&&self instanceof WorkerGlobalScope}function I(t){var e={};if(t.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,function(t,r,i,n){var o=i||n;return e[r]=!o||o.toLowerCase(),""}),e["max-age"]){var r=parseInt(e["max-age"],10);isNaN(r)?delete e["max-age"]:e["max-age"]=r}return e}var E=null;function A(t){if(null==E){var e=t.navigator?t.navigator.userAgent:null;E=!!t.safari||!(!e||!(/\b(iPad|iPhone|iPod)\b/.test(e)||e.match("Safari")&&!e.match("Chrome")))}return E}function z(t){try{var e=self[t];return e.setItem("_mapbox_test_",1),e.removeItem("_mapbox_test_"),!0}catch(t){return!1}}var P,C,k,M,D=self.performance&&self.performance.now?self.performance.now.bind(self.performance):Date.now.bind(Date),L=self.requestAnimationFrame||self.mozRequestAnimationFrame||self.webkitRequestAnimationFrame||self.msRequestAnimationFrame,B=self.cancelAnimationFrame||self.mozCancelAnimationFrame||self.webkitCancelAnimationFrame||self.msCancelAnimationFrame,R={now:D,frame:function(t){var e=L(t);return{cancel:function(){return B(e)}}},getImageData:function(t,e){void 0===e&&(e=0);var r=self.document.createElement("canvas"),i=r.getContext("2d");if(!i)throw new Error("failed to create canvas 2d context");return r.width=t.width,r.height=t.height,i.drawImage(t,0,0,t.width,t.height),i.getImageData(-e,-e,t.width+2*e,t.height+2*e)},resolveURL:function(t){return P||(P=self.document.createElement("a")),P.href=t,P.href},hardwareConcurrency:self.navigator.hardwareConcurrency||4,get devicePixelRatio(){return self.devicePixelRatio},get prefersReducedMotion(){return!!self.matchMedia&&(null==C&&(C=self.matchMedia("(prefers-reduced-motion: reduce)")),C.matches)}},F={API_URL:"https://api.mapbox.com",get EVENTS_URL(){return this.API_URL?0===this.API_URL.indexOf("https://api.mapbox.cn")?"https://events.mapbox.cn/events/v2":0===this.API_URL.indexOf("https://api.mapbox.com")?"https://events.mapbox.com/events/v2":null:null},FEEDBACK_URL:"https://apps.mapbox.com/feedback",REQUIRE_ACCESS_TOKEN:!0,ACCESS_TOKEN:null,MAX_PARALLEL_IMAGE_REQUESTS:16},O={supported:!1,testSupport:function(t){!U&&M&&(V?N(t):k=t)}},U=!1,V=!1;function N(t){var e=t.createTexture();t.bindTexture(t.TEXTURE_2D,e);try{if(t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,M),t.isContextLost())return;O.supported=!0}catch(t){}t.deleteTexture(e),U=!0}self.document&&((M=self.document.createElement("img")).onload=function(){k&&N(k),k=null,V=!0},M.onerror=function(){U=!0,k=null},M.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");var j="01",q=function(t,e){this._transformRequestFn=t,this._customAccessToken=e,this._createSkuToken()};function Z(t){return 0===t.indexOf("mapbox:")}q.prototype._createSkuToken=function(){var t=function(){for(var t="",e=0;e<10;e++)t+="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[Math.floor(62*Math.random())];return{token:["1",j,t].join(""),tokenExpiresAt:Date.now()+432e5}}();this._skuToken=t.token,this._skuTokenExpiresAt=t.tokenExpiresAt},q.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},q.prototype.transformRequest=function(t,e){return this._transformRequestFn&&this._transformRequestFn(t,e)||{url:t}},q.prototype.normalizeStyleURL=function(t,e){if(!Z(t))return t;var r=K(t);return r.path="/styles/v1"+r.path,this._makeAPIURL(r,this._customAccessToken||e)},q.prototype.normalizeGlyphsURL=function(t,e){if(!Z(t))return t;var r=K(t);return r.path="/fonts/v1"+r.path,this._makeAPIURL(r,this._customAccessToken||e)},q.prototype.normalizeSourceURL=function(t,e){if(!Z(t))return t;var r=K(t);return r.path="/v4/"+r.authority+".json",r.params.push("secure"),this._makeAPIURL(r,this._customAccessToken||e)},q.prototype.normalizeSpriteURL=function(t,e,r,i){var n=K(t);return Z(t)?(n.path="/styles/v1"+n.path+"/sprite"+e+r,this._makeAPIURL(n,this._customAccessToken||i)):(n.path+=""+e+r,H(n))},q.prototype.normalizeTileURL=function(t,e){if(this._isSkuTokenExpired()&&this._createSkuToken(),t&&!Z(t))return t;var r=K(t);r.path=r.path.replace(/(\.(png|jpg)\d*)(?=$)/,(R.devicePixelRatio>=2||512===e?"@2x":"")+(O.supported?".webp":"$1")),r.path=r.path.replace(/^.+\/v4\//,"/"),r.path="/v4"+r.path;var i=this._customAccessToken||function(t){for(var e=0,r=t;e<r.length;e+=1){var i=r[e].match(/^access_token=(.*)$/);if(i)return i[1]}return null}(r.params)||F.ACCESS_TOKEN;return F.REQUIRE_ACCESS_TOKEN&&i&&this._skuToken&&r.params.push("sku="+this._skuToken),this._makeAPIURL(r,i)},q.prototype.canonicalizeTileURL=function(t,e){var r=K(t);if(!r.path.match(/(^\/v4\/)/)||!r.path.match(/\.[\w]+$/))return t;var i="mapbox://tiles/";i+=r.path.replace("/v4/","");var n=r.params;return e&&(n=n.filter(function(t){return!t.match(/^access_token=/)})),n.length&&(i+="?"+n.join("&")),i},q.prototype.canonicalizeTileset=function(t,e){for(var r=!!e&&Z(e),i=[],n=0,o=t.tiles||[];n<o.length;n+=1){var a=o[n];X(a)?i.push(this.canonicalizeTileURL(a,r)):i.push(a)}return i},q.prototype._makeAPIURL=function(t,e){var r="See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes",i=K(F.API_URL);if(t.protocol=i.protocol,t.authority=i.authority,"/"!==i.path&&(t.path=""+i.path+t.path),!F.REQUIRE_ACCESS_TOKEN)return H(t);if(!(e=e||F.ACCESS_TOKEN))throw new Error("An API access token is required to use Mapbox GL. "+r);if("s"===e[0])throw new Error("Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). "+r);return t.params=t.params.filter(function(t){return-1===t.indexOf("access_token")}),t.params.push("access_token="+e),H(t)};var G=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;function X(t){return G.test(t)}var W=/^(\w+):\/\/([^/?]*)(\/[^?]+)?\??(.+)?/;function K(t){var e=t.match(W);if(!e)throw new Error("Unable to parse URL object");return{protocol:e[1],authority:e[2],path:e[3]||"/",params:e[4]?e[4].split("&"):[]}}function H(t){var e=t.params.length?"?"+t.params.join("&"):"";return t.protocol+"://"+t.authority+t.path+e}function J(t){if(!t)return null;var e=t.split(".");if(!e||3!==e.length)return null;try{return JSON.parse(decodeURIComponent(self.atob(e[1]).split("").map(function(t){return"%"+("00"+t.charCodeAt(0).toString(16)).slice(-2)}).join("")))}catch(t){return null}}var Y=function(t){this.type=t,this.anonId=null,this.eventData={},this.queue=[],this.pendingRequest=null};Y.prototype.getStorageKey=function(t){var e,r=J(F.ACCESS_TOKEN);return e=r&&r.u?self.btoa(encodeURIComponent(r.u).replace(/%([0-9A-F]{2})/g,function(t,e){return String.fromCharCode(Number("0x"+e))})):F.ACCESS_TOKEN||"",t?"mapbox.eventData."+t+":"+e:"mapbox.eventData:"+e},Y.prototype.fetchEventData=function(){var t=z("localStorage"),e=this.getStorageKey(),r=this.getStorageKey("uuid");if(t)try{var i=self.localStorage.getItem(e);i&&(this.eventData=JSON.parse(i));var n=self.localStorage.getItem(r);n&&(this.anonId=n)}catch(t){b("Unable to read from LocalStorage")}},Y.prototype.saveEventData=function(){var t=z("localStorage"),e=this.getStorageKey(),r=this.getStorageKey("uuid");if(t)try{self.localStorage.setItem(r,this.anonId),Object.keys(this.eventData).length>=1&&self.localStorage.setItem(e,JSON.stringify(this.eventData))}catch(t){b("Unable to write to LocalStorage")}},Y.prototype.processRequests=function(t){},Y.prototype.postEvent=function(t,e,r,i){var n=this;if(F.EVENTS_URL){var o=K(F.EVENTS_URL);o.params.push("access_token="+(i||F.ACCESS_TOKEN||""));var a={event:this.type,created:new Date(t).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:"1.10.1",skuId:j,userId:this.anonId},s=e?c(a,e):a,l={url:H(o),headers:{"Content-Type":"text/plain"},body:JSON.stringify([s])};this.pendingRequest=vt(l,function(t){n.pendingRequest=null,r(t),n.saveEventData(),n.processRequests(i)})}},Y.prototype.queueRequest=function(t,e){this.queue.push(t),this.processRequests(e)};var Q,$,tt=function(t){function e(){t.call(this,"map.load"),this.success={},this.skuToken=""}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.postMapLoadEvent=function(t,e,r,i){this.skuToken=r,(F.EVENTS_URL&&i||F.ACCESS_TOKEN&&Array.isArray(t)&&t.some(function(t){return Z(t)||X(t)}))&&this.queueRequest({id:e,timestamp:Date.now()},i)},e.prototype.processRequests=function(t){var e=this;if(!this.pendingRequest&&0!==this.queue.length){var r=this.queue.shift(),i=r.id,n=r.timestamp;i&&this.success[i]||(this.anonId||this.fetchEventData(),d(this.anonId)||(this.anonId=f()),this.postEvent(n,{skuToken:this.skuToken},function(t){t||i&&(e.success[i]=!0)},t))}},e}(Y),et=new(function(t){function e(e){t.call(this,"appUserTurnstile"),this._customAccessToken=e}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.postTurnstileEvent=function(t,e){F.EVENTS_URL&&F.ACCESS_TOKEN&&Array.isArray(t)&&t.some(function(t){return Z(t)||X(t)})&&this.queueRequest(Date.now(),e)},e.prototype.processRequests=function(t){var e=this;if(!this.pendingRequest&&0!==this.queue.length){this.anonId&&this.eventData.lastSuccess&&this.eventData.tokenU||this.fetchEventData();var r=J(F.ACCESS_TOKEN),i=r?r.u:F.ACCESS_TOKEN,n=i!==this.eventData.tokenU;d(this.anonId)||(this.anonId=f(),n=!0);var o=this.queue.shift();if(this.eventData.lastSuccess){var a=new Date(this.eventData.lastSuccess),s=new Date(o),l=(o-this.eventData.lastSuccess)/864e5;n=n||l>=1||l<-1||a.getDate()!==s.getDate()}else n=!0;if(!n)return this.processRequests();this.postEvent(o,{"enabled.telemetry":!1},function(t){t||(e.eventData.lastSuccess=o,e.eventData.tokenU=i)},t)}},e}(Y)),rt=et.postTurnstileEvent.bind(et),it=new tt,nt=it.postMapLoadEvent.bind(it),ot=500,at=50;function st(){self.caches&&!Q&&(Q=self.caches.open("mapbox-tiles"))}function lt(t){var e=t.indexOf("?");return e<0?t:t.slice(0,e)}var ut,ct=1/0;function pt(){return null==ut&&(ut=self.OffscreenCanvas&&new self.OffscreenCanvas(1,1).getContext("2d")&&"function"==typeof self.createImageBitmap),ut}var ht={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"};"function"==typeof Object.freeze&&Object.freeze(ht);var ft,dt,mt=function(t){function e(e,r,i){401===r&&X(i)&&(e+=": you may have provided an invalid Mapbox access token. See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes"),t.call(this,e),this.status=r,this.url=i,this.name=this.constructor.name,this.message=e}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.toString=function(){return this.name+": "+this.message+" ("+this.status+"): "+this.url},e}(Error),yt=T()?function(){return self.worker&&self.worker.referrer}:function(){return("blob:"===self.location.protocol?self.parent:self).location.href},gt=function(t,e){if(!(/^file:/.test(r=t.url)||/^file:/.test(yt())&&!/^\w+:/.test(r))){if(self.fetch&&self.Request&&self.AbortController&&self.Request.prototype.hasOwnProperty("signal"))return function(t,e){var r,i=new self.AbortController,n=new self.Request(t.url,{method:t.method||"GET",body:t.body,credentials:t.credentials,headers:t.headers,referrer:yt(),signal:i.signal}),o=!1,a=!1,s=(r=n.url).indexOf("sku=")>0&&X(r);"json"===t.type&&n.headers.set("Accept","application/json");var l=function(r,i,o){if(!a){if(r&&"SecurityError"!==r.message&&b(r),i&&o)return u(i);var l=Date.now();self.fetch(n).then(function(r){if(r.ok){var i=s?r.clone():null;return u(r,i,l)}return e(new mt(r.statusText,r.status,t.url))}).catch(function(t){20!==t.code&&e(new Error(t.message))})}},u=function(r,i,s){("arrayBuffer"===t.type?r.arrayBuffer():"json"===t.type?r.json():r.text()).then(function(t){a||(i&&s&&function(t,e,r){if(st(),Q){var i={status:e.status,statusText:e.statusText,headers:new self.Headers};e.headers.forEach(function(t,e){return i.headers.set(e,t)});var n=I(e.headers.get("Cache-Control")||"");n["no-store"]||(n["max-age"]&&i.headers.set("Expires",new Date(r+1e3*n["max-age"]).toUTCString()),new Date(i.headers.get("Expires")).getTime()-r<42e4||function(t,e){if(void 0===$)try{new Response(new ReadableStream),$=!0}catch(t){$=!1}$?e(t.body):t.blob().then(e)}(e,function(e){var r=new self.Response(e,i);st(),Q&&Q.then(function(e){return e.put(lt(t.url),r)}).catch(function(t){return b(t.message)})}))}}(n,i,s),o=!0,e(null,t,r.headers.get("Cache-Control"),r.headers.get("Expires")))}).catch(function(t){a||e(new Error(t.message))})};return s?function(t,e){if(st(),!Q)return e(null);var r=lt(t.url);Q.then(function(t){t.match(r).then(function(i){var n=function(t){if(!t)return!1;var e=new Date(t.headers.get("Expires")||0),r=I(t.headers.get("Cache-Control")||"");return e>Date.now()&&!r["no-cache"]}(i);t.delete(r),n&&t.put(r,i.clone()),e(null,i,n)}).catch(e)}).catch(e)}(n,l):l(null,null),{cancel:function(){a=!0,o||i.abort()}}}(t,e);if(T()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",t,e,void 0,!0)}var r;return function(t,e){var r=new self.XMLHttpRequest;for(var i in r.open(t.method||"GET",t.url,!0),"arrayBuffer"===t.type&&(r.responseType="arraybuffer"),t.headers)r.setRequestHeader(i,t.headers[i]);return"json"===t.type&&(r.responseType="text",r.setRequestHeader("Accept","application/json")),r.withCredentials="include"===t.credentials,r.onerror=function(){e(new Error(r.statusText))},r.onload=function(){if((r.status>=200&&r.status<300||0===r.status)&&null!==r.response){var i=r.response;if("json"===t.type)try{i=JSON.parse(r.response)}catch(t){return e(t)}e(null,i,r.getResponseHeader("Cache-Control"),r.getResponseHeader("Expires"))}else e(new mt(r.statusText,r.status,t.url))},r.send(t.body),{cancel:function(){return r.abort()}}}(t,e)},_t=function(t,e){return gt(c(t,{type:"arrayBuffer"}),e)},vt=function(t,e){return gt(c(t,{method:"POST"}),e)};ft=[],dt=0;var xt=function(t,e){if(O.supported&&(t.headers||(t.headers={}),t.headers.accept="image/webp,*/*"),dt>=F.MAX_PARALLEL_IMAGE_REQUESTS){var r={requestParameters:t,callback:e,cancelled:!1,cancel:function(){this.cancelled=!0}};return ft.push(r),r}dt++;var i=!1,n=function(){if(!i)for(i=!0,dt--;ft.length&&dt<F.MAX_PARALLEL_IMAGE_REQUESTS;){var t=ft.shift();t.cancelled||(t.cancel=xt(t.requestParameters,t.callback).cancel)}},o=_t(t,function(t,r,i,o){n(),t?e(t):r&&(pt()?function(t,e){var r=new self.Blob([new Uint8Array(t)],{type:"image/png"});self.createImageBitmap(r).then(function(t){e(null,t)}).catch(function(t){e(new Error("Could not load image because of "+t.message+". Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))})}(r,e):function(t,e,r,i){var n=new self.Image,o=self.URL;n.onload=function(){e(null,n),o.revokeObjectURL(n.src)},n.onerror=function(){return e(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))};var a=new self.Blob([new Uint8Array(t)],{type:"image/png"});n.cacheControl=r,n.expires=i,n.src=t.byteLength?o.createObjectURL(a):"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII="}(r,e,i,o))});return{cancel:function(){o.cancel(),n()}}};function bt(t,e,r){r[t]&&-1!==r[t].indexOf(e)||(r[t]=r[t]||[],r[t].push(e))}function wt(t,e,r){if(r&&r[t]){var i=r[t].indexOf(e);-1!==i&&r[t].splice(i,1)}}var St=function(t,e){void 0===e&&(e={}),c(this,e),this.type=t},Tt=function(t){function e(e,r){void 0===r&&(r={}),t.call(this,"error",c({error:e},r))}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e}(St),It=function(){};It.prototype.on=function(t,e){return this._listeners=this._listeners||{},bt(t,e,this._listeners),this},It.prototype.off=function(t,e){return wt(t,e,this._listeners),wt(t,e,this._oneTimeListeners),this},It.prototype.once=function(t,e){return this._oneTimeListeners=this._oneTimeListeners||{},bt(t,e,this._oneTimeListeners),this},It.prototype.fire=function(t,e){"string"==typeof t&&(t=new St(t,e||{}));var r=t.type;if(this.listens(r)){t.target=this;for(var i=0,n=this._listeners&&this._listeners[r]?this._listeners[r].slice():[];i<n.length;i+=1)n[i].call(this,t);for(var o=0,a=this._oneTimeListeners&&this._oneTimeListeners[r]?this._oneTimeListeners[r].slice():[];o<a.length;o+=1){var s=a[o];wt(r,s,this._oneTimeListeners),s.call(this,t)}var l=this._eventedParent;l&&(c(t,"function"==typeof this._eventedParentData?this._eventedParentData():this._eventedParentData),l.fire(t))}else t instanceof Tt&&console.error(t.error);return this},It.prototype.listens=function(t){return this._listeners&&this._listeners[t]&&this._listeners[t].length>0||this._oneTimeListeners&&this._oneTimeListeners[t]&&this._oneTimeListeners[t].length>0||this._eventedParent&&this._eventedParent.listens(t)},It.prototype.setEventedParent=function(t,e){return this._eventedParent=t,this._eventedParentData=e,this};var Et={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},sources:{required:!0,type:"sources"},sprite:{type:"string"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{}},default:"mapbox"},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},filter:{type:"array",value:"*"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{},within:{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},expression_name:{type:"enum",values:{let:{group:"Variable binding"},var:{group:"Variable binding"},literal:{group:"Types"},array:{group:"Types"},at:{group:"Lookup"},in:{group:"Lookup"},"index-of":{group:"Lookup"},slice:{group:"Lookup"},case:{group:"Decision"},match:{group:"Decision"},coalesce:{group:"Decision"},step:{group:"Ramps, scales, curves"},interpolate:{group:"Ramps, scales, curves"},"interpolate-hcl":{group:"Ramps, scales, curves"},"interpolate-lab":{group:"Ramps, scales, curves"},ln2:{group:"Math"},pi:{group:"Math"},e:{group:"Math"},typeof:{group:"Types"},string:{group:"Types"},number:{group:"Types"},boolean:{group:"Types"},object:{group:"Types"},collator:{group:"Types"},format:{group:"Types"},image:{group:"Types"},"number-format":{group:"Types"},"to-string":{group:"Types"},"to-number":{group:"Types"},"to-boolean":{group:"Types"},"to-rgba":{group:"Color"},"to-color":{group:"Types"},rgb:{group:"Color"},rgba:{group:"Color"},get:{group:"Lookup"},has:{group:"Lookup"},length:{group:"Lookup"},properties:{group:"Feature data"},"feature-state":{group:"Feature data"},"geometry-type":{group:"Feature data"},id:{group:"Feature data"},zoom:{group:"Zoom"},"heatmap-density":{group:"Heatmap"},"line-progress":{group:"Feature data"},accumulated:{group:"Feature data"},"+":{group:"Math"},"*":{group:"Math"},"-":{group:"Math"},"/":{group:"Math"},"%":{group:"Math"},"^":{group:"Math"},sqrt:{group:"Math"},log10:{group:"Math"},ln:{group:"Math"},log2:{group:"Math"},sin:{group:"Math"},cos:{group:"Math"},tan:{group:"Math"},asin:{group:"Math"},acos:{group:"Math"},atan:{group:"Math"},min:{group:"Math"},max:{group:"Math"},round:{group:"Math"},abs:{group:"Math"},ceil:{group:"Math"},floor:{group:"Math"},distance:{group:"Math"},"==":{group:"Decision"},"!=":{group:"Decision"},">":{group:"Decision"},"<":{group:"Decision"},">=":{group:"Decision"},"<=":{group:"Decision"},all:{group:"Decision"},any:{group:"Decision"},"!":{group:"Decision"},within:{group:"Decision"},"is-supported-script":{group:"String"},upcase:{group:"String"},downcase:{group:"String"},concat:{group:"String"},"resolved-locale":{group:"String"}}},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}}},At=function(t,e,r,i){this.message=(t?t+": ":"")+r,i&&(this.identifier=i),null!=e&&e.__line__&&(this.line=e.__line__)};function zt(t){var e=t.value;return e?[new At(t.key,e,"constants have been deprecated as of v8")]:[]}function Pt(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];for(var i=0,n=e;i<n.length;i+=1){var o=n[i];for(var a in o)t[a]=o[a]}return t}function Ct(t){return t instanceof Number||t instanceof String||t instanceof Boolean?t.valueOf():t}function kt(t){if(Array.isArray(t))return t.map(kt);if(t instanceof Object&&!(t instanceof Number||t instanceof String||t instanceof Boolean)){var e={};for(var r in t)e[r]=kt(t[r]);return e}return Ct(t)}var Mt=function(t){function e(e,r){t.call(this,r),this.message=r,this.key=e}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e}(Error),Dt=function(t,e){void 0===e&&(e=[]),this.parent=t,this.bindings={};for(var r=0,i=e;r<i.length;r+=1){var n=i[r];this.bindings[n[0]]=n[1]}};Dt.prototype.concat=function(t){return new Dt(this,t)},Dt.prototype.get=function(t){if(this.bindings[t])return this.bindings[t];if(this.parent)return this.parent.get(t);throw new Error(t+" not found in scope.")},Dt.prototype.has=function(t){return!!this.bindings[t]||!!this.parent&&this.parent.has(t)};var Lt={kind:"null"},Bt={kind:"number"},Rt={kind:"string"},Ft={kind:"boolean"},Ot={kind:"color"},Ut={kind:"object"},Vt={kind:"value"},Nt={kind:"collator"},jt={kind:"formatted"},qt={kind:"resolvedImage"};function Zt(t,e){return{kind:"array",itemType:t,N:e}}function Gt(t){if("array"===t.kind){var e=Gt(t.itemType);return"number"==typeof t.N?"array<"+e+", "+t.N+">":"value"===t.itemType.kind?"array":"array<"+e+">"}return t.kind}var Xt=[Lt,Bt,Rt,Ft,Ot,jt,Ut,Zt(Vt),qt];function Wt(t,e){if("error"===e.kind)return null;if("array"===t.kind){if("array"===e.kind&&(0===e.N&&"value"===e.itemType.kind||!Wt(t.itemType,e.itemType))&&("number"!=typeof t.N||t.N===e.N))return null}else{if(t.kind===e.kind)return null;if("value"===t.kind)for(var r=0,i=Xt;r<i.length;r+=1)if(!Wt(i[r],e))return null}return"Expected "+Gt(t)+" but found "+Gt(e)+" instead."}function Kt(t,e){return e.some(function(e){return e.kind===t.kind})}function Ht(t,e){return e.some(function(e){return"null"===e?null===t:"array"===e?Array.isArray(t):"object"===e?t&&!Array.isArray(t)&&"object"==typeof t:e===typeof t})}var Jt=e(function(t,e){var r={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function i(t){return(t=Math.round(t))<0?0:t>255?255:t}function n(t){return i("%"===t[t.length-1]?parseFloat(t)/100*255:parseInt(t))}function o(t){return(e="%"===t[t.length-1]?parseFloat(t)/100:parseFloat(t))<0?0:e>1?1:e;var e}function a(t,e,r){return r<0?r+=1:r>1&&(r-=1),6*r<1?t+(e-t)*r*6:2*r<1?e:3*r<2?t+(e-t)*(2/3-r)*6:t}try{e.parseCSSColor=function(t){var e,s=t.replace(/ /g,"").toLowerCase();if(s in r)return r[s].slice();if("#"===s[0])return 4===s.length?(e=parseInt(s.substr(1),16))>=0&&e<=4095?[(3840&e)>>4|(3840&e)>>8,240&e|(240&e)>>4,15&e|(15&e)<<4,1]:null:7===s.length&&(e=parseInt(s.substr(1),16))>=0&&e<=16777215?[(16711680&e)>>16,(65280&e)>>8,255&e,1]:null;var l=s.indexOf("("),u=s.indexOf(")");if(-1!==l&&u+1===s.length){var c=s.substr(0,l),p=s.substr(l+1,u-(l+1)).split(","),h=1;switch(c){case"rgba":if(4!==p.length)return null;h=o(p.pop());case"rgb":return 3!==p.length?null:[n(p[0]),n(p[1]),n(p[2]),h];case"hsla":if(4!==p.length)return null;h=o(p.pop());case"hsl":if(3!==p.length)return null;var f=(parseFloat(p[0])%360+360)%360/360,d=o(p[1]),m=o(p[2]),y=m<=.5?m*(d+1):m+d-m*d,g=2*m-y;return[i(255*a(g,y,f+1/3)),i(255*a(g,y,f)),i(255*a(g,y,f-1/3)),h];default:return null}}return null}}catch(t){}}).parseCSSColor,Yt=function(t,e,r,i){void 0===i&&(i=1),this.r=t,this.g=e,this.b=r,this.a=i};Yt.parse=function(t){if(t){if(t instanceof Yt)return t;if("string"==typeof t){var e=Jt(t);if(e)return new Yt(e[0]/255*e[3],e[1]/255*e[3],e[2]/255*e[3],e[3])}}},Yt.prototype.toString=function(){var t=this.toArray(),e=t[1],r=t[2],i=t[3];return"rgba("+Math.round(t[0])+","+Math.round(e)+","+Math.round(r)+","+i+")"},Yt.prototype.toArray=function(){var t=this.a;return 0===t?[0,0,0,0]:[255*this.r/t,255*this.g/t,255*this.b/t,t]},Yt.black=new Yt(0,0,0,1),Yt.white=new Yt(1,1,1,1),Yt.transparent=new Yt(0,0,0,0),Yt.red=new Yt(1,0,0,1);var Qt=function(t,e,r){this.sensitivity=t?e?"variant":"case":e?"accent":"base",this.locale=r,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};Qt.prototype.compare=function(t,e){return this.collator.compare(t,e)},Qt.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var $t=function(t,e,r,i,n){this.text=t,this.image=e,this.scale=r,this.fontStack=i,this.textColor=n},te=function(t){this.sections=t};te.fromString=function(t){return new te([new $t(t,null,null,null,null)])},te.prototype.isEmpty=function(){return 0===this.sections.length||!this.sections.some(function(t){return 0!==t.text.length||t.image&&0!==t.image.name.length})},te.factory=function(t){return t instanceof te?t:te.fromString(t)},te.prototype.toString=function(){return 0===this.sections.length?"":this.sections.map(function(t){return t.text}).join("")},te.prototype.serialize=function(){for(var t=["format"],e=0,r=this.sections;e<r.length;e+=1){var i=r[e];if(i.image)t.push(["image",i.image.name]);else{t.push(i.text);var n={};i.fontStack&&(n["text-font"]=["literal",i.fontStack.split(",")]),i.scale&&(n["font-scale"]=i.scale),i.textColor&&(n["text-color"]=["rgba"].concat(i.textColor.toArray())),t.push(n)}}return t};var ee=function(t){this.name=t.name,this.available=t.available};function re(t,e,r,i){return"number"==typeof t&&t>=0&&t<=255&&"number"==typeof e&&e>=0&&e<=255&&"number"==typeof r&&r>=0&&r<=255?void 0===i||"number"==typeof i&&i>=0&&i<=1?null:"Invalid rgba value ["+[t,e,r,i].join(", ")+"]: 'a' must be between 0 and 1.":"Invalid rgba value ["+("number"==typeof i?[t,e,r,i]:[t,e,r]).join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}function ie(t){if(null===t)return!0;if("string"==typeof t)return!0;if("boolean"==typeof t)return!0;if("number"==typeof t)return!0;if(t instanceof Yt)return!0;if(t instanceof Qt)return!0;if(t instanceof te)return!0;if(t instanceof ee)return!0;if(Array.isArray(t)){for(var e=0,r=t;e<r.length;e+=1)if(!ie(r[e]))return!1;return!0}if("object"==typeof t){for(var i in t)if(!ie(t[i]))return!1;return!0}return!1}function ne(t){if(null===t)return Lt;if("string"==typeof t)return Rt;if("boolean"==typeof t)return Ft;if("number"==typeof t)return Bt;if(t instanceof Yt)return Ot;if(t instanceof Qt)return Nt;if(t instanceof te)return jt;if(t instanceof ee)return qt;if(Array.isArray(t)){for(var e,r=t.length,i=0,n=t;i<n.length;i+=1){var o=ne(n[i]);if(e){if(e===o)continue;e=Vt;break}e=o}return Zt(e||Vt,r)}return Ut}function oe(t){var e=typeof t;return null===t?"":"string"===e||"number"===e||"boolean"===e?String(t):t instanceof Yt||t instanceof te||t instanceof ee?t.toString():JSON.stringify(t)}ee.prototype.toString=function(){return this.name},ee.fromString=function(t){return t?new ee({name:t,available:!1}):null},ee.prototype.serialize=function(){return["image",this.name]};var ae=function(t,e){this.type=t,this.value=e};ae.parse=function(t,e){if(2!==t.length)return e.error("'literal' expression requires exactly one argument, but found "+(t.length-1)+" instead.");if(!ie(t[1]))return e.error("invalid value");var r=t[1],i=ne(r),n=e.expectedType;return"array"!==i.kind||0!==i.N||!n||"array"!==n.kind||"number"==typeof n.N&&0!==n.N||(i=n),new ae(i,r)},ae.prototype.evaluate=function(){return this.value},ae.prototype.eachChild=function(){},ae.prototype.outputDefined=function(){return!0},ae.prototype.serialize=function(){return"array"===this.type.kind||"object"===this.type.kind?["literal",this.value]:this.value instanceof Yt?["rgba"].concat(this.value.toArray()):this.value instanceof te?this.value.serialize():this.value};var se=function(t){this.name="ExpressionEvaluationError",this.message=t};se.prototype.toJSON=function(){return this.message};var le={string:Rt,number:Bt,boolean:Ft,object:Ut},ue=function(t,e){this.type=t,this.args=e};ue.parse=function(t,e){if(t.length<2)return e.error("Expected at least one argument.");var r,i=1,n=t[0];if("array"===n){var o,a;if(t.length>2){var s=t[1];if("string"!=typeof s||!(s in le)||"object"===s)return e.error('The item type argument of "array" must be one of string, number, boolean',1);o=le[s],i++}else o=Vt;if(t.length>3){if(null!==t[2]&&("number"!=typeof t[2]||t[2]<0||t[2]!==Math.floor(t[2])))return e.error('The length argument to "array" must be a positive integer literal',2);a=t[2],i++}r=Zt(o,a)}else r=le[n];for(var l=[];i<t.length;i++){var u=e.parse(t[i],i,Vt);if(!u)return null;l.push(u)}return new ue(r,l)},ue.prototype.evaluate=function(t){for(var e=0;e<this.args.length;e++){var r=this.args[e].evaluate(t);if(!Wt(this.type,ne(r)))return r;if(e===this.args.length-1)throw new se("Expected value to be of type "+Gt(this.type)+", but found "+Gt(ne(r))+" instead.")}return null},ue.prototype.eachChild=function(t){this.args.forEach(t)},ue.prototype.outputDefined=function(){return this.args.every(function(t){return t.outputDefined()})},ue.prototype.serialize=function(){var t=this.type,e=[t.kind];if("array"===t.kind){var r=t.itemType;if("string"===r.kind||"number"===r.kind||"boolean"===r.kind){e.push(r.kind);var i=t.N;("number"==typeof i||this.args.length>1)&&e.push(i)}}return e.concat(this.args.map(function(t){return t.serialize()}))};var ce=function(t){this.type=jt,this.sections=t};ce.parse=function(t,e){if(t.length<2)return e.error("Expected at least one argument.");var r=t[1];if(!Array.isArray(r)&&"object"==typeof r)return e.error("First argument must be an image or text section.");for(var i=[],n=!1,o=1;o<=t.length-1;++o){var a=t[o];if(n&&"object"==typeof a&&!Array.isArray(a)){n=!1;var s=null;if(a["font-scale"]&&!(s=e.parse(a["font-scale"],1,Bt)))return null;var l=null;if(a["text-font"]&&!(l=e.parse(a["text-font"],1,Zt(Rt))))return null;var u=null;if(a["text-color"]&&!(u=e.parse(a["text-color"],1,Ot)))return null;var c=i[i.length-1];c.scale=s,c.font=l,c.textColor=u}else{var p=e.parse(t[o],1,Vt);if(!p)return null;var h=p.type.kind;if("string"!==h&&"value"!==h&&"null"!==h&&"resolvedImage"!==h)return e.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");n=!0,i.push({content:p,scale:null,font:null,textColor:null})}}return new ce(i)},ce.prototype.evaluate=function(t){return new te(this.sections.map(function(e){var r=e.content.evaluate(t);return ne(r)===qt?new $t("",r,null,null,null):new $t(oe(r),null,e.scale?e.scale.evaluate(t):null,e.font?e.font.evaluate(t).join(","):null,e.textColor?e.textColor.evaluate(t):null)}))},ce.prototype.eachChild=function(t){for(var e=0,r=this.sections;e<r.length;e+=1){var i=r[e];t(i.content),i.scale&&t(i.scale),i.font&&t(i.font),i.textColor&&t(i.textColor)}},ce.prototype.outputDefined=function(){return!1},ce.prototype.serialize=function(){for(var t=["format"],e=0,r=this.sections;e<r.length;e+=1){var i=r[e];t.push(i.content.serialize());var n={};i.scale&&(n["font-scale"]=i.scale.serialize()),i.font&&(n["text-font"]=i.font.serialize()),i.textColor&&(n["text-color"]=i.textColor.serialize()),t.push(n)}return t};var pe=function(t){this.type=qt,this.input=t};pe.parse=function(t,e){if(2!==t.length)return e.error("Expected two arguments.");var r=e.parse(t[1],1,Rt);return r?new pe(r):e.error("No image name provided.")},pe.prototype.evaluate=function(t){var e=this.input.evaluate(t),r=ee.fromString(e);return r&&t.availableImages&&(r.available=t.availableImages.indexOf(e)>-1),r},pe.prototype.eachChild=function(t){t(this.input)},pe.prototype.outputDefined=function(){return!1},pe.prototype.serialize=function(){return["image",this.input.serialize()]};var he={"to-boolean":Ft,"to-color":Ot,"to-number":Bt,"to-string":Rt},fe=function(t,e){this.type=t,this.args=e};fe.parse=function(t,e){if(t.length<2)return e.error("Expected at least one argument.");var r=t[0];if(("to-boolean"===r||"to-string"===r)&&2!==t.length)return e.error("Expected one argument.");for(var i=he[r],n=[],o=1;o<t.length;o++){var a=e.parse(t[o],o,Vt);if(!a)return null;n.push(a)}return new fe(i,n)},fe.prototype.evaluate=function(t){if("boolean"===this.type.kind)return Boolean(this.args[0].evaluate(t));if("color"===this.type.kind){for(var e,r,i=0,n=this.args;i<n.length;i+=1){if(r=null,(e=n[i].evaluate(t))instanceof Yt)return e;if("string"==typeof e){var o=t.parseColor(e);if(o)return o}else if(Array.isArray(e)&&!(r=e.length<3||e.length>4?"Invalid rbga value "+JSON.stringify(e)+": expected an array containing either three or four numeric values.":re(e[0],e[1],e[2],e[3])))return new Yt(e[0]/255,e[1]/255,e[2]/255,e[3])}throw new se(r||"Could not parse color from value '"+("string"==typeof e?e:String(JSON.stringify(e)))+"'")}if("number"===this.type.kind){for(var a=null,s=0,l=this.args;s<l.length;s+=1){if(null===(a=l[s].evaluate(t)))return 0;var u=Number(a);if(!isNaN(u))return u}throw new se("Could not convert "+JSON.stringify(a)+" to number.")}return"formatted"===this.type.kind?te.fromString(oe(this.args[0].evaluate(t))):"resolvedImage"===this.type.kind?ee.fromString(oe(this.args[0].evaluate(t))):oe(this.args[0].evaluate(t))},fe.prototype.eachChild=function(t){this.args.forEach(t)},fe.prototype.outputDefined=function(){return this.args.every(function(t){return t.outputDefined()})},fe.prototype.serialize=function(){if("formatted"===this.type.kind)return new ce([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if("resolvedImage"===this.type.kind)return new pe(this.args[0]).serialize();var t=["to-"+this.type.kind];return this.eachChild(function(e){t.push(e.serialize())}),t};var de=["Unknown","Point","LineString","Polygon"],me=function(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null};me.prototype.id=function(){return this.feature&&"id"in this.feature?this.feature.id:null},me.prototype.geometryType=function(){return this.feature?"number"==typeof this.feature.type?de[this.feature.type]:this.feature.type:null},me.prototype.geometry=function(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null},me.prototype.canonicalID=function(){return this.canonical},me.prototype.properties=function(){return this.feature&&this.feature.properties||{}},me.prototype.parseColor=function(t){var e=this._parseColorCache[t];return e||(e=this._parseColorCache[t]=Yt.parse(t)),e};var ye=function(t,e,r,i){this.name=t,this.type=e,this._evaluate=r,this.args=i};ye.prototype.evaluate=function(t){return this._evaluate(t,this.args)},ye.prototype.eachChild=function(t){this.args.forEach(t)},ye.prototype.outputDefined=function(){return!1},ye.prototype.serialize=function(){return[this.name].concat(this.args.map(function(t){return t.serialize()}))},ye.parse=function(t,e){var r,i=t[0],n=ye.definitions[i];if(!n)return e.error('Unknown expression "'+i+'". If you wanted a literal array, use ["literal", [...]].',0);for(var o=Array.isArray(n)?n[0]:n.type,a=Array.isArray(n)?[[n[1],n[2]]]:n.overloads,s=a.filter(function(e){var r=e[0];return!Array.isArray(r)||r.length===t.length-1}),l=null,u=0,c=s;u<c.length;u+=1){var p=c[u],h=p[0],f=p[1];l=new Oe(e.registry,e.path,null,e.scope);for(var d=[],m=!1,y=1;y<t.length;y++){var g=t[y],_=Array.isArray(h)?h[y-1]:h.type,v=l.parse(g,1+d.length,_);if(!v){m=!0;break}d.push(v)}if(!m)if(Array.isArray(h)&&h.length!==d.length)l.error("Expected "+h.length+" arguments, but found "+d.length+" instead.");else{for(var x=0;x<d.length;x++){var b=Array.isArray(h)?h[x]:h.type,w=d[x];l.concat(x+1).checkSubtype(b,w.type)}if(0===l.errors.length)return new ye(i,o,f,d)}}if(1===s.length)(r=e.errors).push.apply(r,l.errors);else{for(var S=(s.length?s:a).map(function(t){var e;return e=t[0],Array.isArray(e)?"("+e.map(Gt).join(", ")+")":"("+Gt(e.type)+"...)"}).join(" | "),T=[],I=1;I<t.length;I++){var E=e.parse(t[I],1+T.length);if(!E)return null;T.push(Gt(E.type))}e.error("Expected arguments of type "+S+", but found ("+T.join(", ")+") instead.")}return null},ye.register=function(t,e){for(var r in ye.definitions=e,e)t[r]=ye};var ge=function(t,e,r){this.type=Nt,this.locale=r,this.caseSensitive=t,this.diacriticSensitive=e};function _e(t,e){t[0]=Math.min(t[0],e[0]),t[1]=Math.min(t[1],e[1]),t[2]=Math.max(t[2],e[0]),t[3]=Math.max(t[3],e[1])}function ve(t,e){return!(t[0]<=e[0]||t[2]>=e[2]||t[1]<=e[1]||t[3]>=e[3])}function xe(t,e){var r=(180+t[0])/360,i=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+t[1]*Math.PI/360)))/360,n=Math.pow(2,e.z);return[Math.round(r*n*8192),Math.round(i*n*8192)]}function be(t,e,r){return e[1]>t[1]!=r[1]>t[1]&&t[0]<(r[0]-e[0])*(t[1]-e[1])/(r[1]-e[1])+e[0]}function we(t,e){for(var r,i,n,o,a,s,l,u=!1,c=0,p=e.length;c<p;c++)for(var h=e[c],f=0,d=h.length;f<d-1;f++){if((o=(r=t)[0]-(i=h[f])[0])*(l=r[1]-(n=h[f+1])[1])-(s=r[0]-n[0])*(a=r[1]-i[1])==0&&o*s<=0&&a*l<=0)return!1;be(t,h[f],h[f+1])&&(u=!u)}return u}function Se(t,e){for(var r=0;r<e.length;r++)if(we(t,e[r]))return!0;return!1}function Te(t,e,r,i){var n=i[0]-r[0],o=i[1]-r[1],a=(t[0]-r[0])*o-n*(t[1]-r[1]),s=(e[0]-r[0])*o-n*(e[1]-r[1]);return a>0&&s<0||a<0&&s>0}function Ie(t,e,r){for(var i=0,n=r;i<n.length;i+=1)for(var o=n[i],a=0;a<o.length-1;++a)if(0!=(p=[(c=o[a+1])[0]-(u=o[a])[0],c[1]-u[1]])[0]*(h=[(l=e)[0]-(s=t)[0],l[1]-s[1]])[1]-p[1]*h[0]&&Te(s,l,u,c)&&Te(u,c,s,l))return!0;var s,l,u,c,p,h;return!1}function Ee(t,e){for(var r=0;r<t.length;++r)if(!we(t[r],e))return!1;for(var i=0;i<t.length-1;++i)if(Ie(t[i],t[i+1],e))return!1;return!0}function Ae(t,e){for(var r=0;r<e.length;r++)if(Ee(t,e[r]))return!0;return!1}function ze(t,e,r){for(var i=[],n=0;n<t.length;n++){for(var o=[],a=0;a<t[n].length;a++){var s=xe(t[n][a],r);_e(e,s),o.push(s)}i.push(o)}return i}function Pe(t,e,r){for(var i=[],n=0;n<t.length;n++){var o=ze(t[n],e,r);i.push(o)}return i}function Ce(t,e,r,i){if(t[0]<r[0]||t[0]>r[2]){var n=.5*i,o=t[0]-r[0]>n?-i:r[0]-t[0]>n?i:0;0===o&&(o=t[0]-r[2]>n?-i:r[2]-t[0]>n?i:0),t[0]+=o}_e(e,t)}function ke(t,e,r,i){for(var n=8192*Math.pow(2,i.z),o=[8192*i.x,8192*i.y],a=[],s=0,l=t;s<l.length;s+=1)for(var u=0,c=l[s];u<c.length;u+=1){var p=c[u],h=[p.x+o[0],p.y+o[1]];Ce(h,e,r,n),a.push(h)}return a}function Me(t,e,r,i){for(var n,o=8192*Math.pow(2,i.z),a=[8192*i.x,8192*i.y],s=[],l=0,u=t;l<u.length;l+=1){for(var c=[],p=0,h=u[l];p<h.length;p+=1){var f=h[p],d=[f.x+a[0],f.y+a[1]];_e(e,d),c.push(d)}s.push(c)}if(e[2]-e[0]<=o/2){(n=e)[0]=n[1]=1/0,n[2]=n[3]=-1/0;for(var m=0,y=s;m<y.length;m+=1)for(var g=0,_=y[m];g<_.length;g+=1)Ce(_[g],e,r,o)}return s}ge.parse=function(t,e){if(2!==t.length)return e.error("Expected one argument.");var r=t[1];if("object"!=typeof r||Array.isArray(r))return e.error("Collator options argument must be an object.");var i=e.parse(void 0!==r["case-sensitive"]&&r["case-sensitive"],1,Ft);if(!i)return null;var n=e.parse(void 0!==r["diacritic-sensitive"]&&r["diacritic-sensitive"],1,Ft);if(!n)return null;var o=null;return r.locale&&!(o=e.parse(r.locale,1,Rt))?null:new ge(i,n,o)},ge.prototype.evaluate=function(t){return new Qt(this.caseSensitive.evaluate(t),this.diacriticSensitive.evaluate(t),this.locale?this.locale.evaluate(t):null)},ge.prototype.eachChild=function(t){t(this.caseSensitive),t(this.diacriticSensitive),this.locale&&t(this.locale)},ge.prototype.outputDefined=function(){return!1},ge.prototype.serialize=function(){var t={};return t["case-sensitive"]=this.caseSensitive.serialize(),t["diacritic-sensitive"]=this.diacriticSensitive.serialize(),this.locale&&(t.locale=this.locale.serialize()),["collator",t]};var De=function(t,e){this.type=Ft,this.geojson=t,this.geometries=e};function Le(t){if(t instanceof ye){if("get"===t.name&&1===t.args.length)return!1;if("feature-state"===t.name)return!1;if("has"===t.name&&1===t.args.length)return!1;if("properties"===t.name||"geometry-type"===t.name||"id"===t.name)return!1;if(/^filter-/.test(t.name))return!1}if(t instanceof De)return!1;var e=!0;return t.eachChild(function(t){e&&!Le(t)&&(e=!1)}),e}function Be(t){if(t instanceof ye&&"feature-state"===t.name)return!1;var e=!0;return t.eachChild(function(t){e&&!Be(t)&&(e=!1)}),e}function Re(t,e){if(t instanceof ye&&e.indexOf(t.name)>=0)return!1;var r=!0;return t.eachChild(function(t){r&&!Re(t,e)&&(r=!1)}),r}De.parse=function(t,e){if(2!==t.length)return e.error("'within' expression requires exactly one argument, but found "+(t.length-1)+" instead.");if(ie(t[1])){var r=t[1];if("FeatureCollection"===r.type)for(var i=0;i<r.features.length;++i){var n=r.features[i].geometry.type;if("Polygon"===n||"MultiPolygon"===n)return new De(r,r.features[i].geometry)}else if("Feature"===r.type){var o=r.geometry.type;if("Polygon"===o||"MultiPolygon"===o)return new De(r,r.geometry)}else if("Polygon"===r.type||"MultiPolygon"===r.type)return new De(r,r)}return e.error("'within' expression requires valid geojson object that contains polygon geometry type.")},De.prototype.evaluate=function(t){if(null!=t.geometry()&&null!=t.canonicalID()){if("Point"===t.geometryType())return function(t,e){var r=[1/0,1/0,-1/0,-1/0],i=[1/0,1/0,-1/0,-1/0],n=t.canonicalID();if("Polygon"===e.type){var o=ze(e.coordinates,i,n),a=ke(t.geometry(),r,i,n);if(!ve(r,i))return!1;for(var s=0,l=a;s<l.length;s+=1)if(!we(l[s],o))return!1}if("MultiPolygon"===e.type){var u=Pe(e.coordinates,i,n),c=ke(t.geometry(),r,i,n);if(!ve(r,i))return!1;for(var p=0,h=c;p<h.length;p+=1)if(!Se(h[p],u))return!1}return!0}(t,this.geometries);if("LineString"===t.geometryType())return function(t,e){var r=[1/0,1/0,-1/0,-1/0],i=[1/0,1/0,-1/0,-1/0],n=t.canonicalID();if("Polygon"===e.type){var o=ze(e.coordinates,i,n),a=Me(t.geometry(),r,i,n);if(!ve(r,i))return!1;for(var s=0,l=a;s<l.length;s+=1)if(!Ee(l[s],o))return!1}if("MultiPolygon"===e.type){var u=Pe(e.coordinates,i,n),c=Me(t.geometry(),r,i,n);if(!ve(r,i))return!1;for(var p=0,h=c;p<h.length;p+=1)if(!Ae(h[p],u))return!1}return!0}(t,this.geometries)}return!1},De.prototype.eachChild=function(){},De.prototype.outputDefined=function(){return!0},De.prototype.serialize=function(){return["within",this.geojson]};var Fe=function(t,e){this.type=e.type,this.name=t,this.boundExpression=e};Fe.parse=function(t,e){if(2!==t.length||"string"!=typeof t[1])return e.error("'var' expression requires exactly one string literal argument.");var r=t[1];return e.scope.has(r)?new Fe(r,e.scope.get(r)):e.error('Unknown variable "'+r+'". Make sure "'+r+'" has been bound in an enclosing "let" expression before using it.',1)},Fe.prototype.evaluate=function(t){return this.boundExpression.evaluate(t)},Fe.prototype.eachChild=function(){},Fe.prototype.outputDefined=function(){return!1},Fe.prototype.serialize=function(){return["var",this.name]};var Oe=function(t,e,r,i,n){void 0===e&&(e=[]),void 0===i&&(i=new Dt),void 0===n&&(n=[]),this.registry=t,this.path=e,this.key=e.map(function(t){return"["+t+"]"}).join(""),this.scope=i,this.errors=n,this.expectedType=r};function Ue(t,e){for(var r,i=t.length-1,n=0,o=i,a=0;n<=o;)if((r=t[a=Math.floor((n+o)/2)])<=e){if(a===i||e<t[a+1])return a;n=a+1}else{if(!(r>e))throw new se("Input is not a number.");o=a-1}return 0}Oe.prototype.parse=function(t,e,r,i,n){return void 0===n&&(n={}),e?this.concat(e,r,i)._parse(t,n):this._parse(t,n)},Oe.prototype._parse=function(t,e){function r(t,e,r){return"assert"===r?new ue(e,[t]):"coerce"===r?new fe(e,[t]):t}if(null!==t&&"string"!=typeof t&&"boolean"!=typeof t&&"number"!=typeof t||(t=["literal",t]),Array.isArray(t)){if(0===t.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var i=t[0];if("string"!=typeof i)return this.error("Expression name must be a string, but found "+typeof i+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var n=this.registry[i];if(n){var o=n.parse(t,this);if(!o)return null;if(this.expectedType){var a=this.expectedType,s=o.type;if("string"!==a.kind&&"number"!==a.kind&&"boolean"!==a.kind&&"object"!==a.kind&&"array"!==a.kind||"value"!==s.kind)if("color"!==a.kind&&"formatted"!==a.kind&&"resolvedImage"!==a.kind||"value"!==s.kind&&"string"!==s.kind){if(this.checkSubtype(a,s))return null}else o=r(o,a,e.typeAnnotation||"coerce");else o=r(o,a,e.typeAnnotation||"assert")}if(!(o instanceof ae)&&"resolvedImage"!==o.type.kind&&function t(e){if(e instanceof Fe)return t(e.boundExpression);if(e instanceof ye&&"error"===e.name)return!1;if(e instanceof ge)return!1;if(e instanceof De)return!1;var r=e instanceof fe||e instanceof ue,i=!0;return e.eachChild(function(e){i=r?i&&t(e):i&&e instanceof ae}),!!i&&Le(e)&&Re(e,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}(o)){var l=new me;try{o=new ae(o.type,o.evaluate(l))}catch(t){return this.error(t.message),null}}return o}return this.error('Unknown expression "'+i+'". If you wanted a literal array, use ["literal", [...]].',0)}return this.error(void 0===t?"'undefined' value invalid. Use null instead.":"object"==typeof t?'Bare objects invalid. Use ["literal", {...}] instead.':"Expected an array, but found "+typeof t+" instead.")},Oe.prototype.concat=function(t,e,r){var i="number"==typeof t?this.path.concat(t):this.path,n=r?this.scope.concat(r):this.scope;return new Oe(this.registry,i,e||null,n,this.errors)},Oe.prototype.error=function(t){for(var e=[],r=arguments.length-1;r-- >0;)e[r]=arguments[r+1];var i=""+this.key+e.map(function(t){return"["+t+"]"}).join("");this.errors.push(new Mt(i,t))},Oe.prototype.checkSubtype=function(t,e){var r=Wt(t,e);return r&&this.error(r),r};var Ve=function(t,e,r){this.type=t,this.input=e,this.labels=[],this.outputs=[];for(var i=0,n=r;i<n.length;i+=1){var o=n[i],a=o[1];this.labels.push(o[0]),this.outputs.push(a)}};function Ne(t,e,r){return t*(1-r)+e*r}Ve.parse=function(t,e){if(t.length-1<4)return e.error("Expected at least 4 arguments, but found only "+(t.length-1)+".");if((t.length-1)%2!=0)return e.error("Expected an even number of arguments.");var r=e.parse(t[1],1,Bt);if(!r)return null;var i=[],n=null;e.expectedType&&"value"!==e.expectedType.kind&&(n=e.expectedType);for(var o=1;o<t.length;o+=2){var a=1===o?-1/0:t[o],s=t[o+1],l=o,u=o+1;if("number"!=typeof a)return e.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',l);if(i.length&&i[i.length-1][0]>=a)return e.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',l);var c=e.parse(s,u,n);if(!c)return null;n=n||c.type,i.push([a,c])}return new Ve(n,r,i)},Ve.prototype.evaluate=function(t){var e=this.labels,r=this.outputs;if(1===e.length)return r[0].evaluate(t);var i=this.input.evaluate(t);if(i<=e[0])return r[0].evaluate(t);var n=e.length;return i>=e[n-1]?r[n-1].evaluate(t):r[Ue(e,i)].evaluate(t)},Ve.prototype.eachChild=function(t){t(this.input);for(var e=0,r=this.outputs;e<r.length;e+=1)t(r[e])},Ve.prototype.outputDefined=function(){return this.outputs.every(function(t){return t.outputDefined()})},Ve.prototype.serialize=function(){for(var t=["step",this.input.serialize()],e=0;e<this.labels.length;e++)e>0&&t.push(this.labels[e]),t.push(this.outputs[e].serialize());return t};var je=Object.freeze({__proto__:null,number:Ne,color:function(t,e,r){return new Yt(Ne(t.r,e.r,r),Ne(t.g,e.g,r),Ne(t.b,e.b,r),Ne(t.a,e.a,r))},array:function(t,e,r){return t.map(function(t,i){return Ne(t,e[i],r)})}}),qe=6/29*3*(6/29),Ze=Math.PI/180,Ge=180/Math.PI;function Xe(t){return t>.008856451679035631?Math.pow(t,1/3):t/qe+4/29}function We(t){return t>6/29?t*t*t:qe*(t-4/29)}function Ke(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function He(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Je(t){var e=He(t.r),r=He(t.g),i=He(t.b),n=Xe((.4124564*e+.3575761*r+.1804375*i)/.95047),o=Xe((.2126729*e+.7151522*r+.072175*i)/1);return{l:116*o-16,a:500*(n-o),b:200*(o-Xe((.0193339*e+.119192*r+.9503041*i)/1.08883)),alpha:t.a}}function Ye(t){var e=(t.l+16)/116,r=isNaN(t.a)?e:e+t.a/500,i=isNaN(t.b)?e:e-t.b/200;return e=1*We(e),r=.95047*We(r),i=1.08883*We(i),new Yt(Ke(3.2404542*r-1.5371385*e-.4985314*i),Ke(-.969266*r+1.8760108*e+.041556*i),Ke(.0556434*r-.2040259*e+1.0572252*i),t.alpha)}function Qe(t,e,r){var i=e-t;return t+r*(i>180||i<-180?i-360*Math.round(i/360):i)}var $e={forward:Je,reverse:Ye,interpolate:function(t,e,r){return{l:Ne(t.l,e.l,r),a:Ne(t.a,e.a,r),b:Ne(t.b,e.b,r),alpha:Ne(t.alpha,e.alpha,r)}}},tr={forward:function(t){var e=Je(t),r=e.l,i=e.a,n=e.b,o=Math.atan2(n,i)*Ge;return{h:o<0?o+360:o,c:Math.sqrt(i*i+n*n),l:r,alpha:t.a}},reverse:function(t){var e=t.h*Ze,r=t.c;return Ye({l:t.l,a:Math.cos(e)*r,b:Math.sin(e)*r,alpha:t.alpha})},interpolate:function(t,e,r){return{h:Qe(t.h,e.h,r),c:Ne(t.c,e.c,r),l:Ne(t.l,e.l,r),alpha:Ne(t.alpha,e.alpha,r)}}},er=Object.freeze({__proto__:null,lab:$e,hcl:tr}),rr=function(t,e,r,i,n){this.type=t,this.operator=e,this.interpolation=r,this.input=i,this.labels=[],this.outputs=[];for(var o=0,a=n;o<a.length;o+=1){var s=a[o],l=s[1];this.labels.push(s[0]),this.outputs.push(l)}};function ir(t,e,r,i){var n=i-r,o=t-r;return 0===n?0:1===e?o/n:(Math.pow(e,o)-1)/(Math.pow(e,n)-1)}rr.interpolationFactor=function(t,e,i,n){var o=0;if("exponential"===t.name)o=ir(e,t.base,i,n);else if("linear"===t.name)o=ir(e,1,i,n);else if("cubic-bezier"===t.name){var a=t.controlPoints;o=new r(a[0],a[1],a[2],a[3]).solve(ir(e,1,i,n))}return o},rr.parse=function(t,e){var r=t[0],i=t[1],n=t[2],o=t.slice(3);if(!Array.isArray(i)||0===i.length)return e.error("Expected an interpolation type expression.",1);if("linear"===i[0])i={name:"linear"};else if("exponential"===i[0]){var a=i[1];if("number"!=typeof a)return e.error("Exponential interpolation requires a numeric base.",1,1);i={name:"exponential",base:a}}else{if("cubic-bezier"!==i[0])return e.error("Unknown interpolation type "+String(i[0]),1,0);var s=i.slice(1);if(4!==s.length||s.some(function(t){return"number"!=typeof t||t<0||t>1}))return e.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);i={name:"cubic-bezier",controlPoints:s}}if(t.length-1<4)return e.error("Expected at least 4 arguments, but found only "+(t.length-1)+".");if((t.length-1)%2!=0)return e.error("Expected an even number of arguments.");if(!(n=e.parse(n,2,Bt)))return null;var l=[],u=null;"interpolate-hcl"===r||"interpolate-lab"===r?u=Ot:e.expectedType&&"value"!==e.expectedType.kind&&(u=e.expectedType);for(var c=0;c<o.length;c+=2){var p=o[c],h=o[c+1],f=c+3,d=c+4;if("number"!=typeof p)return e.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',f);if(l.length&&l[l.length-1][0]>=p)return e.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',f);var m=e.parse(h,d,u);if(!m)return null;u=u||m.type,l.push([p,m])}return"number"===u.kind||"color"===u.kind||"array"===u.kind&&"number"===u.itemType.kind&&"number"==typeof u.N?new rr(u,r,i,n,l):e.error("Type "+Gt(u)+" is not interpolatable.")},rr.prototype.evaluate=function(t){var e=this.labels,r=this.outputs;if(1===e.length)return r[0].evaluate(t);var i=this.input.evaluate(t);if(i<=e[0])return r[0].evaluate(t);var n=e.length;if(i>=e[n-1])return r[n-1].evaluate(t);var o=Ue(e,i),a=rr.interpolationFactor(this.interpolation,i,e[o],e[o+1]),s=r[o].evaluate(t),l=r[o+1].evaluate(t);return"interpolate"===this.operator?je[this.type.kind.toLowerCase()](s,l,a):"interpolate-hcl"===this.operator?tr.reverse(tr.interpolate(tr.forward(s),tr.forward(l),a)):$e.reverse($e.interpolate($e.forward(s),$e.forward(l),a))},rr.prototype.eachChild=function(t){t(this.input);for(var e=0,r=this.outputs;e<r.length;e+=1)t(r[e])},rr.prototype.outputDefined=function(){return this.outputs.every(function(t){return t.outputDefined()})},rr.prototype.serialize=function(){var t;t="linear"===this.interpolation.name?["linear"]:"exponential"===this.interpolation.name?1===this.interpolation.base?["linear"]:["exponential",this.interpolation.base]:["cubic-bezier"].concat(this.interpolation.controlPoints);for(var e=[this.operator,t,this.input.serialize()],r=0;r<this.labels.length;r++)e.push(this.labels[r],this.outputs[r].serialize());return e};var nr=function(t,e){this.type=t,this.args=e};nr.parse=function(t,e){if(t.length<2)return e.error("Expectected at least one argument.");var r=null,i=e.expectedType;i&&"value"!==i.kind&&(r=i);for(var n=[],o=0,a=t.slice(1);o<a.length;o+=1){var s=e.parse(a[o],1+n.length,r,void 0,{typeAnnotation:"omit"});if(!s)return null;r=r||s.type,n.push(s)}var l=i&&n.some(function(t){return Wt(i,t.type)});return new nr(l?Vt:r,n)},nr.prototype.evaluate=function(t){for(var e,r=null,i=0,n=0,o=this.args;n<o.length&&(i++,(r=o[n].evaluate(t))&&r instanceof ee&&!r.available&&(e||(e=r.name),r=null,i===this.args.length&&(r=e)),null===r);n+=1);return r},nr.prototype.eachChild=function(t){this.args.forEach(t)},nr.prototype.outputDefined=function(){return this.args.every(function(t){return t.outputDefined()})},nr.prototype.serialize=function(){var t=["coalesce"];return this.eachChild(function(e){t.push(e.serialize())}),t};var or=function(t,e){this.type=e.type,this.bindings=[].concat(t),this.result=e};or.prototype.evaluate=function(t){return this.result.evaluate(t)},or.prototype.eachChild=function(t){for(var e=0,r=this.bindings;e<r.length;e+=1)t(r[e][1]);t(this.result)},or.parse=function(t,e){if(t.length<4)return e.error("Expected at least 3 arguments, but found "+(t.length-1)+" instead.");for(var r=[],i=1;i<t.length-1;i+=2){var n=t[i];if("string"!=typeof n)return e.error("Expected string, but found "+typeof n+" instead.",i);if(/[^a-zA-Z0-9_]/.test(n))return e.error("Variable names must contain only alphanumeric characters or '_'.",i);var o=e.parse(t[i+1],i+1);if(!o)return null;r.push([n,o])}var a=e.parse(t[t.length-1],t.length-1,e.expectedType,r);return a?new or(r,a):null},or.prototype.outputDefined=function(){return this.result.outputDefined()},or.prototype.serialize=function(){for(var t=["let"],e=0,r=this.bindings;e<r.length;e+=1){var i=r[e];t.push(i[0],i[1].serialize())}return t.push(this.result.serialize()),t};var ar=function(t,e,r){this.type=t,this.index=e,this.input=r};ar.parse=function(t,e){if(3!==t.length)return e.error("Expected 2 arguments, but found "+(t.length-1)+" instead.");var r=e.parse(t[1],1,Bt),i=e.parse(t[2],2,Zt(e.expectedType||Vt));return r&&i?new ar(i.type.itemType,r,i):null},ar.prototype.evaluate=function(t){var e=this.index.evaluate(t),r=this.input.evaluate(t);if(e<0)throw new se("Array index out of bounds: "+e+" < 0.");if(e>=r.length)throw new se("Array index out of bounds: "+e+" > "+(r.length-1)+".");if(e!==Math.floor(e))throw new se("Array index must be an integer, but found "+e+" instead.");return r[e]},ar.prototype.eachChild=function(t){t(this.index),t(this.input)},ar.prototype.outputDefined=function(){return!1},ar.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var sr=function(t,e){this.type=Ft,this.needle=t,this.haystack=e};sr.parse=function(t,e){if(3!==t.length)return e.error("Expected 2 arguments, but found "+(t.length-1)+" instead.");var r=e.parse(t[1],1,Vt),i=e.parse(t[2],2,Vt);return r&&i?Kt(r.type,[Ft,Rt,Bt,Lt,Vt])?new sr(r,i):e.error("Expected first argument to be of type boolean, string, number or null, but found "+Gt(r.type)+" instead"):null},sr.prototype.evaluate=function(t){var e=this.needle.evaluate(t),r=this.haystack.evaluate(t);if(!r)return!1;if(!Ht(e,["boolean","string","number","null"]))throw new se("Expected first argument to be of type boolean, string, number or null, but found "+Gt(ne(e))+" instead.");if(!Ht(r,["string","array"]))throw new se("Expected second argument to be of type array or string, but found "+Gt(ne(r))+" instead.");return r.indexOf(e)>=0},sr.prototype.eachChild=function(t){t(this.needle),t(this.haystack)},sr.prototype.outputDefined=function(){return!0},sr.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var lr=function(t,e,r){this.type=Bt,this.needle=t,this.haystack=e,this.fromIndex=r};lr.parse=function(t,e){if(t.length<=2||t.length>=5)return e.error("Expected 3 or 4 arguments, but found "+(t.length-1)+" instead.");var r=e.parse(t[1],1,Vt),i=e.parse(t[2],2,Vt);if(!r||!i)return null;if(!Kt(r.type,[Ft,Rt,Bt,Lt,Vt]))return e.error("Expected first argument to be of type boolean, string, number or null, but found "+Gt(r.type)+" instead");if(4===t.length){var n=e.parse(t[3],3,Bt);return n?new lr(r,i,n):null}return new lr(r,i)},lr.prototype.evaluate=function(t){var e=this.needle.evaluate(t),r=this.haystack.evaluate(t);if(!Ht(e,["boolean","string","number","null"]))throw new se("Expected first argument to be of type boolean, string, number or null, but found "+Gt(ne(e))+" instead.");if(!Ht(r,["string","array"]))throw new se("Expected second argument to be of type array or string, but found "+Gt(ne(r))+" instead.");if(this.fromIndex){var i=this.fromIndex.evaluate(t);return r.indexOf(e,i)}return r.indexOf(e)},lr.prototype.eachChild=function(t){t(this.needle),t(this.haystack),this.fromIndex&&t(this.fromIndex)},lr.prototype.outputDefined=function(){return!1},lr.prototype.serialize=function(){if(null!=this.fromIndex&&void 0!==this.fromIndex){var t=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),t]}return["index-of",this.needle.serialize(),this.haystack.serialize()]};var ur=function(t,e,r,i,n,o){this.inputType=t,this.type=e,this.input=r,this.cases=i,this.outputs=n,this.otherwise=o};ur.parse=function(t,e){if(t.length<5)return e.error("Expected at least 4 arguments, but found only "+(t.length-1)+".");if(t.length%2!=1)return e.error("Expected an even number of arguments.");var r,i;e.expectedType&&"value"!==e.expectedType.kind&&(i=e.expectedType);for(var n={},o=[],a=2;a<t.length-1;a+=2){var s=t[a],l=t[a+1];Array.isArray(s)||(s=[s]);var u=e.concat(a);if(0===s.length)return u.error("Expected at least one branch label.");for(var c=0,p=s;c<p.length;c+=1){var h=p[c];if("number"!=typeof h&&"string"!=typeof h)return u.error("Branch labels must be numbers or strings.");if("number"==typeof h&&Math.abs(h)>Number.MAX_SAFE_INTEGER)return u.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if("number"==typeof h&&Math.floor(h)!==h)return u.error("Numeric branch labels must be integer values.");if(r){if(u.checkSubtype(r,ne(h)))return null}else r=ne(h);if(void 0!==n[String(h)])return u.error("Branch labels must be unique.");n[String(h)]=o.length}var f=e.parse(l,a,i);if(!f)return null;i=i||f.type,o.push(f)}var d=e.parse(t[1],1,Vt);if(!d)return null;var m=e.parse(t[t.length-1],t.length-1,i);return m?"value"!==d.type.kind&&e.concat(1).checkSubtype(r,d.type)?null:new ur(r,i,d,n,o,m):null},ur.prototype.evaluate=function(t){var e=this.input.evaluate(t);return(ne(e)===this.inputType&&this.outputs[this.cases[e]]||this.otherwise).evaluate(t)},ur.prototype.eachChild=function(t){t(this.input),this.outputs.forEach(t),t(this.otherwise)},ur.prototype.outputDefined=function(){return this.outputs.every(function(t){return t.outputDefined()})&&this.otherwise.outputDefined()},ur.prototype.serialize=function(){for(var t=this,e=["match",this.input.serialize()],r=[],i={},n=0,o=Object.keys(this.cases).sort();n<o.length;n+=1){var a=o[n];void 0===(p=i[this.cases[a]])?(i[this.cases[a]]=r.length,r.push([this.cases[a],[a]])):r[p][1].push(a)}for(var s=function(e){return"number"===t.inputType.kind?Number(e):e},l=0,u=r;l<u.length;l+=1){var c=u[l],p=c[0],h=c[1];e.push(1===h.length?s(h[0]):h.map(s)),e.push(this.outputs[outputIndex$1].serialize())}return e.push(this.otherwise.serialize()),e};var cr=function(t,e,r){this.type=t,this.branches=e,this.otherwise=r};cr.parse=function(t,e){if(t.length<4)return e.error("Expected at least 3 arguments, but found only "+(t.length-1)+".");if(t.length%2!=0)return e.error("Expected an odd number of arguments.");var r;e.expectedType&&"value"!==e.expectedType.kind&&(r=e.expectedType);for(var i=[],n=1;n<t.length-1;n+=2){var o=e.parse(t[n],n,Ft);if(!o)return null;var a=e.parse(t[n+1],n+1,r);if(!a)return null;i.push([o,a]),r=r||a.type}var s=e.parse(t[t.length-1],t.length-1,r);return s?new cr(r,i,s):null},cr.prototype.evaluate=function(t){for(var e=0,r=this.branches;e<r.length;e+=1){var i=r[e],n=i[1];if(i[0].evaluate(t))return n.evaluate(t)}return this.otherwise.evaluate(t)},cr.prototype.eachChild=function(t){for(var e=0,r=this.branches;e<r.length;e+=1){var i=r[e],n=i[1];t(i[0]),t(n)}t(this.otherwise)},cr.prototype.outputDefined=function(){return this.branches.every(function(t){return t[1].outputDefined()})&&this.otherwise.outputDefined()},cr.prototype.serialize=function(){var t=["case"];return this.eachChild(function(e){t.push(e.serialize())}),t};var pr=function(t,e,r,i){this.type=t,this.input=e,this.beginIndex=r,this.endIndex=i};function hr(t,e){return"=="===t||"!="===t?"boolean"===e.kind||"string"===e.kind||"number"===e.kind||"null"===e.kind||"value"===e.kind:"string"===e.kind||"number"===e.kind||"value"===e.kind}function fr(t,e,r,i){return 0===i.compare(e,r)}function dr(t,e,r){var i="=="!==t&&"!="!==t;return function(){function n(t,e,r){this.type=Ft,this.lhs=t,this.rhs=e,this.collator=r,this.hasUntypedArgument="value"===t.type.kind||"value"===e.type.kind}return n.parse=function(t,e){if(3!==t.length&&4!==t.length)return e.error("Expected two or three arguments.");var r=t[0],o=e.parse(t[1],1,Vt);if(!o)return null;if(!hr(r,o.type))return e.concat(1).error('"'+r+"\" comparisons are not supported for type '"+Gt(o.type)+"'.");var a=e.parse(t[2],2,Vt);if(!a)return null;if(!hr(r,a.type))return e.concat(2).error('"'+r+"\" comparisons are not supported for type '"+Gt(a.type)+"'.");if(o.type.kind!==a.type.kind&&"value"!==o.type.kind&&"value"!==a.type.kind)return e.error("Cannot compare types '"+Gt(o.type)+"' and '"+Gt(a.type)+"'.");i&&("value"===o.type.kind&&"value"!==a.type.kind?o=new ue(a.type,[o]):"value"!==o.type.kind&&"value"===a.type.kind&&(a=new ue(o.type,[a])));var s=null;if(4===t.length){if("string"!==o.type.kind&&"string"!==a.type.kind&&"value"!==o.type.kind&&"value"!==a.type.kind)return e.error("Cannot use collator to compare non-string types.");if(!(s=e.parse(t[3],3,Nt)))return null}return new n(o,a,s)},n.prototype.evaluate=function(n){var o=this.lhs.evaluate(n),a=this.rhs.evaluate(n);if(i&&this.hasUntypedArgument){var s=ne(o),l=ne(a);if(s.kind!==l.kind||"string"!==s.kind&&"number"!==s.kind)throw new se('Expected arguments for "'+t+'" to be (string, string) or (number, number), but found ('+s.kind+", "+l.kind+") instead.")}if(this.collator&&!i&&this.hasUntypedArgument){var u=ne(o),c=ne(a);if("string"!==u.kind||"string"!==c.kind)return e(n,o,a)}return this.collator?r(n,o,a,this.collator.evaluate(n)):e(n,o,a)},n.prototype.eachChild=function(t){t(this.lhs),t(this.rhs),this.collator&&t(this.collator)},n.prototype.outputDefined=function(){return!0},n.prototype.serialize=function(){var e=[t];return this.eachChild(function(t){e.push(t.serialize())}),e},n}()}pr.parse=function(t,e){if(t.length<=2||t.length>=5)return e.error("Expected 3 or 4 arguments, but found "+(t.length-1)+" instead.");var r=e.parse(t[1],1,Vt),i=e.parse(t[2],2,Bt);if(!r||!i)return null;if(!Kt(r.type,[Zt(Vt),Rt,Vt]))return e.error("Expected first argument to be of type array or string, but found "+Gt(r.type)+" instead");if(4===t.length){var n=e.parse(t[3],3,Bt);return n?new pr(r.type,r,i,n):null}return new pr(r.type,r,i)},pr.prototype.evaluate=function(t){var e=this.input.evaluate(t),r=this.beginIndex.evaluate(t);if(!Ht(e,["string","array"]))throw new se("Expected first argument to be of type array or string, but found "+Gt(ne(e))+" instead.");if(this.endIndex){var i=this.endIndex.evaluate(t);return e.slice(r,i)}return e.slice(r)},pr.prototype.eachChild=function(t){t(this.input),t(this.beginIndex),this.endIndex&&t(this.endIndex)},pr.prototype.outputDefined=function(){return!1},pr.prototype.serialize=function(){if(null!=this.endIndex&&void 0!==this.endIndex){var t=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),t]}return["slice",this.input.serialize(),this.beginIndex.serialize()]};var mr=dr("==",function(t,e,r){return e===r},fr),yr=dr("!=",function(t,e,r){return e!==r},function(t,e,r,i){return!fr(0,e,r,i)}),gr=dr("<",function(t,e,r){return e<r},function(t,e,r,i){return i.compare(e,r)<0}),_r=dr(">",function(t,e,r){return e>r},function(t,e,r,i){return i.compare(e,r)>0}),vr=dr("<=",function(t,e,r){return e<=r},function(t,e,r,i){return i.compare(e,r)<=0}),xr=dr(">=",function(t,e,r){return e>=r},function(t,e,r,i){return i.compare(e,r)>=0}),br=function(t,e,r,i,n){this.type=Rt,this.number=t,this.locale=e,this.currency=r,this.minFractionDigits=i,this.maxFractionDigits=n};br.parse=function(t,e){if(3!==t.length)return e.error("Expected two arguments.");var r=e.parse(t[1],1,Bt);if(!r)return null;var i=t[2];if("object"!=typeof i||Array.isArray(i))return e.error("NumberFormat options argument must be an object.");var n=null;if(i.locale&&!(n=e.parse(i.locale,1,Rt)))return null;var o=null;if(i.currency&&!(o=e.parse(i.currency,1,Rt)))return null;var a=null;if(i["min-fraction-digits"]&&!(a=e.parse(i["min-fraction-digits"],1,Bt)))return null;var s=null;return i["max-fraction-digits"]&&!(s=e.parse(i["max-fraction-digits"],1,Bt))?null:new br(r,n,o,a,s)},br.prototype.evaluate=function(t){return new Intl.NumberFormat(this.locale?this.locale.evaluate(t):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(t):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(t):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(t):void 0}).format(this.number.evaluate(t))},br.prototype.eachChild=function(t){t(this.number),this.locale&&t(this.locale),this.currency&&t(this.currency),this.minFractionDigits&&t(this.minFractionDigits),this.maxFractionDigits&&t(this.maxFractionDigits)},br.prototype.outputDefined=function(){return!1},br.prototype.serialize=function(){var t={};return this.locale&&(t.locale=this.locale.serialize()),this.currency&&(t.currency=this.currency.serialize()),this.minFractionDigits&&(t["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(t["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),t]};var wr=function(t){this.type=Bt,this.input=t};wr.parse=function(t,e){if(2!==t.length)return e.error("Expected 1 argument, but found "+(t.length-1)+" instead.");var r=e.parse(t[1],1);return r?"array"!==r.type.kind&&"string"!==r.type.kind&&"value"!==r.type.kind?e.error("Expected argument of type string or array, but found "+Gt(r.type)+" instead."):new wr(r):null},wr.prototype.evaluate=function(t){var e=this.input.evaluate(t);if("string"==typeof e)return e.length;if(Array.isArray(e))return e.length;throw new se("Expected value to be of type string or array, but found "+Gt(ne(e))+" instead.")},wr.prototype.eachChild=function(t){t(this.input)},wr.prototype.outputDefined=function(){return!1},wr.prototype.serialize=function(){var t=["length"];return this.eachChild(function(e){t.push(e.serialize())}),t};var Sr={"==":mr,"!=":yr,">":_r,"<":gr,">=":xr,"<=":vr,array:ue,at:ar,boolean:ue,case:cr,coalesce:nr,collator:ge,format:ce,image:pe,in:sr,"index-of":lr,interpolate:rr,"interpolate-hcl":rr,"interpolate-lab":rr,length:wr,let:or,literal:ae,match:ur,number:ue,"number-format":br,object:ue,slice:pr,step:Ve,string:ue,"to-boolean":fe,"to-color":fe,"to-number":fe,"to-string":fe,var:Fe,within:De};function Tr(t,e){var r=e[0],i=e[1],n=e[2],o=e[3];r=r.evaluate(t),i=i.evaluate(t),n=n.evaluate(t);var a=o?o.evaluate(t):1,s=re(r,i,n,a);if(s)throw new se(s);return new Yt(r/255*a,i/255*a,n/255*a,a)}function Ir(t,e){return t in e}function Er(t,e){var r=e[t];return void 0===r?null:r}function Ar(t){return{type:t}}function zr(t){return{result:"success",value:t}}function Pr(t){return{result:"error",value:t}}function Cr(t){return"data-driven"===t["property-type"]||"cross-faded-data-driven"===t["property-type"]}function kr(t){return!!t.expression&&t.expression.parameters.indexOf("zoom")>-1}function Mr(t){return!!t.expression&&t.expression.interpolated}function Dr(t){return t instanceof Number?"number":t instanceof String?"string":t instanceof Boolean?"boolean":Array.isArray(t)?"array":null===t?"null":typeof t}function Lr(t){return"object"==typeof t&&null!==t&&!Array.isArray(t)}function Br(t){return t}function Rr(t,e,r){return void 0!==t?t:void 0!==e?e:void 0!==r?r:void 0}function Fr(t,e,r,i,n){return Rr(typeof r===n?i[r]:void 0,t.default,e.default)}function Or(t,e,r){if("number"!==Dr(r))return Rr(t.default,e.default);var i=t.stops.length;if(1===i)return t.stops[0][1];if(r<=t.stops[0][0])return t.stops[0][1];if(r>=t.stops[i-1][0])return t.stops[i-1][1];var n=Ue(t.stops.map(function(t){return t[0]}),r);return t.stops[n][1]}function Ur(t,e,r){var i=void 0!==t.base?t.base:1;if("number"!==Dr(r))return Rr(t.default,e.default);var n=t.stops.length;if(1===n)return t.stops[0][1];if(r<=t.stops[0][0])return t.stops[0][1];if(r>=t.stops[n-1][0])return t.stops[n-1][1];var o=Ue(t.stops.map(function(t){return t[0]}),r),a=function(t,e,r,i){var n=i-r,o=t-r;return 0===n?0:1===e?o/n:(Math.pow(e,o)-1)/(Math.pow(e,n)-1)}(r,i,t.stops[o][0],t.stops[o+1][0]),s=t.stops[o][1],l=t.stops[o+1][1],u=je[e.type]||Br;if(t.colorSpace&&"rgb"!==t.colorSpace){var c=er[t.colorSpace];u=function(t,e){return c.reverse(c.interpolate(c.forward(t),c.forward(e),a))}}return"function"==typeof s.evaluate?{evaluate:function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];var r=s.evaluate.apply(void 0,t),i=l.evaluate.apply(void 0,t);if(void 0!==r&&void 0!==i)return u(r,i,a)}}:u(s,l,a)}function Vr(t,e,r){return"color"===e.type?r=Yt.parse(r):"formatted"===e.type?r=te.fromString(r.toString()):"resolvedImage"===e.type?r=ee.fromString(r.toString()):Dr(r)===e.type||"enum"===e.type&&e.values[r]||(r=void 0),Rr(r,t.default,e.default)}ye.register(Sr,{error:[{kind:"error"},[Rt],function(t,e){throw new se(e[0].evaluate(t))}],typeof:[Rt,[Vt],function(t,e){return Gt(ne(e[0].evaluate(t)))}],"to-rgba":[Zt(Bt,4),[Ot],function(t,e){return e[0].evaluate(t).toArray()}],rgb:[Ot,[Bt,Bt,Bt],Tr],rgba:[Ot,[Bt,Bt,Bt,Bt],Tr],has:{type:Ft,overloads:[[[Rt],function(t,e){return Ir(e[0].evaluate(t),t.properties())}],[[Rt,Ut],function(t,e){var r=e[1];return Ir(e[0].evaluate(t),r.evaluate(t))}]]},get:{type:Vt,overloads:[[[Rt],function(t,e){return Er(e[0].evaluate(t),t.properties())}],[[Rt,Ut],function(t,e){var r=e[1];return Er(e[0].evaluate(t),r.evaluate(t))}]]},"feature-state":[Vt,[Rt],function(t,e){return Er(e[0].evaluate(t),t.featureState||{})}],properties:[Ut,[],function(t){return t.properties()}],"geometry-type":[Rt,[],function(t){return t.geometryType()}],id:[Vt,[],function(t){return t.id()}],zoom:[Bt,[],function(t){return t.globals.zoom}],"heatmap-density":[Bt,[],function(t){return t.globals.heatmapDensity||0}],"line-progress":[Bt,[],function(t){return t.globals.lineProgress||0}],accumulated:[Vt,[],function(t){return void 0===t.globals.accumulated?null:t.globals.accumulated}],"+":[Bt,Ar(Bt),function(t,e){for(var r=0,i=0,n=e;i<n.length;i+=1)r+=n[i].evaluate(t);return r}],"*":[Bt,Ar(Bt),function(t,e){for(var r=1,i=0,n=e;i<n.length;i+=1)r*=n[i].evaluate(t);return r}],"-":{type:Bt,overloads:[[[Bt,Bt],function(t,e){var r=e[1];return e[0].evaluate(t)-r.evaluate(t)}],[[Bt],function(t,e){return-e[0].evaluate(t)}]]},"/":[Bt,[Bt,Bt],function(t,e){var r=e[1];return e[0].evaluate(t)/r.evaluate(t)}],"%":[Bt,[Bt,Bt],function(t,e){var r=e[1];return e[0].evaluate(t)%r.evaluate(t)}],ln2:[Bt,[],function(){return Math.LN2}],pi:[Bt,[],function(){return Math.PI}],e:[Bt,[],function(){return Math.E}],"^":[Bt,[Bt,Bt],function(t,e){var r=e[1];return Math.pow(e[0].evaluate(t),r.evaluate(t))}],sqrt:[Bt,[Bt],function(t,e){return Math.sqrt(e[0].evaluate(t))}],log10:[Bt,[Bt],function(t,e){return Math.log(e[0].evaluate(t))/Math.LN10}],ln:[Bt,[Bt],function(t,e){return Math.log(e[0].evaluate(t))}],log2:[Bt,[Bt],function(t,e){return Math.log(e[0].evaluate(t))/Math.LN2}],sin:[Bt,[Bt],function(t,e){return Math.sin(e[0].evaluate(t))}],cos:[Bt,[Bt],function(t,e){return Math.cos(e[0].evaluate(t))}],tan:[Bt,[Bt],function(t,e){return Math.tan(e[0].evaluate(t))}],asin:[Bt,[Bt],function(t,e){return Math.asin(e[0].evaluate(t))}],acos:[Bt,[Bt],function(t,e){return Math.acos(e[0].evaluate(t))}],atan:[Bt,[Bt],function(t,e){return Math.atan(e[0].evaluate(t))}],min:[Bt,Ar(Bt),function(t,e){return Math.min.apply(Math,e.map(function(e){return e.evaluate(t)}))}],max:[Bt,Ar(Bt),function(t,e){return Math.max.apply(Math,e.map(function(e){return e.evaluate(t)}))}],abs:[Bt,[Bt],function(t,e){return Math.abs(e[0].evaluate(t))}],round:[Bt,[Bt],function(t,e){var r=e[0].evaluate(t);return r<0?-Math.round(-r):Math.round(r)}],floor:[Bt,[Bt],function(t,e){return Math.floor(e[0].evaluate(t))}],ceil:[Bt,[Bt],function(t,e){return Math.ceil(e[0].evaluate(t))}],"filter-==":[Ft,[Rt,Vt],function(t,e){var r=e[0],i=e[1];return t.properties()[r.value]===i.value}],"filter-id-==":[Ft,[Vt],function(t,e){var r=e[0];return t.id()===r.value}],"filter-type-==":[Ft,[Rt],function(t,e){var r=e[0];return t.geometryType()===r.value}],"filter-<":[Ft,[Rt,Vt],function(t,e){var r=e[0],i=e[1],n=t.properties()[r.value],o=i.value;return typeof n==typeof o&&n<o}],"filter-id-<":[Ft,[Vt],function(t,e){var r=e[0],i=t.id(),n=r.value;return typeof i==typeof n&&i<n}],"filter->":[Ft,[Rt,Vt],function(t,e){var r=e[0],i=e[1],n=t.properties()[r.value],o=i.value;return typeof n==typeof o&&n>o}],"filter-id->":[Ft,[Vt],function(t,e){var r=e[0],i=t.id(),n=r.value;return typeof i==typeof n&&i>n}],"filter-<=":[Ft,[Rt,Vt],function(t,e){var r=e[0],i=e[1],n=t.properties()[r.value],o=i.value;return typeof n==typeof o&&n<=o}],"filter-id-<=":[Ft,[Vt],function(t,e){var r=e[0],i=t.id(),n=r.value;return typeof i==typeof n&&i<=n}],"filter->=":[Ft,[Rt,Vt],function(t,e){var r=e[0],i=e[1],n=t.properties()[r.value],o=i.value;return typeof n==typeof o&&n>=o}],"filter-id->=":[Ft,[Vt],function(t,e){var r=e[0],i=t.id(),n=r.value;return typeof i==typeof n&&i>=n}],"filter-has":[Ft,[Vt],function(t,e){return e[0].value in t.properties()}],"filter-has-id":[Ft,[],function(t){return null!==t.id()&&void 0!==t.id()}],"filter-type-in":[Ft,[Zt(Rt)],function(t,e){return e[0].value.indexOf(t.geometryType())>=0}],"filter-id-in":[Ft,[Zt(Vt)],function(t,e){return e[0].value.indexOf(t.id())>=0}],"filter-in-small":[Ft,[Rt,Zt(Vt)],function(t,e){var r=e[0];return e[1].value.indexOf(t.properties()[r.value])>=0}],"filter-in-large":[Ft,[Rt,Zt(Vt)],function(t,e){var r=e[0],i=e[1];return function(t,e,r,i){for(;r<=i;){var n=r+i>>1;if(e[n]===t)return!0;e[n]>t?i=n-1:r=n+1}return!1}(t.properties()[r.value],i.value,0,i.value.length-1)}],all:{type:Ft,overloads:[[[Ft,Ft],function(t,e){var r=e[1];return e[0].evaluate(t)&&r.evaluate(t)}],[Ar(Ft),function(t,e){for(var r=0,i=e;r<i.length;r+=1)if(!i[r].evaluate(t))return!1;return!0}]]},any:{type:Ft,overloads:[[[Ft,Ft],function(t,e){var r=e[1];return e[0].evaluate(t)||r.evaluate(t)}],[Ar(Ft),function(t,e){for(var r=0,i=e;r<i.length;r+=1)if(i[r].evaluate(t))return!0;return!1}]]},"!":[Ft,[Ft],function(t,e){return!e[0].evaluate(t)}],"is-supported-script":[Ft,[Rt],function(t,e){var r=t.globals&&t.globals.isSupportedScript;return!r||r(e[0].evaluate(t))}],upcase:[Rt,[Rt],function(t,e){return e[0].evaluate(t).toUpperCase()}],downcase:[Rt,[Rt],function(t,e){return e[0].evaluate(t).toLowerCase()}],concat:[Rt,Ar(Vt),function(t,e){return e.map(function(e){return oe(e.evaluate(t))}).join("")}],"resolved-locale":[Rt,[Nt],function(t,e){return e[0].evaluate(t).resolvedLocale()}]});var Nr=function(t,e){this.expression=t,this._warningHistory={},this._evaluator=new me,this._defaultValue=e?function(t){return"color"===t.type&&Lr(t.default)?new Yt(0,0,0,0):"color"===t.type?Yt.parse(t.default)||null:void 0===t.default?null:t.default}(e):null,this._enumValues=e&&"enum"===e.type?e.values:null};function jr(t){return Array.isArray(t)&&t.length>0&&"string"==typeof t[0]&&t[0]in Sr}function qr(t,e){var r=new Oe(Sr,[],e?function(t){var e={color:Ot,string:Rt,number:Bt,enum:Rt,boolean:Ft,formatted:jt,resolvedImage:qt};return"array"===t.type?Zt(e[t.value]||Vt,t.length):e[t.type]}(e):void 0),i=r.parse(t,void 0,void 0,void 0,e&&"string"===e.type?{typeAnnotation:"coerce"}:void 0);return i?zr(new Nr(i,e)):Pr(r.errors)}Nr.prototype.evaluateWithoutErrorHandling=function(t,e,r,i,n,o){return this._evaluator.globals=t,this._evaluator.feature=e,this._evaluator.featureState=r,this._evaluator.canonical=i,this._evaluator.availableImages=n||null,this._evaluator.formattedSection=o,this.expression.evaluate(this._evaluator)},Nr.prototype.evaluate=function(t,e,r,i,n,o){this._evaluator.globals=t,this._evaluator.feature=e||null,this._evaluator.featureState=r||null,this._evaluator.canonical=i,this._evaluator.availableImages=n||null,this._evaluator.formattedSection=o||null;try{var a=this.expression.evaluate(this._evaluator);if(null==a||"number"==typeof a&&a!=a)return this._defaultValue;if(this._enumValues&&!(a in this._enumValues))throw new se("Expected value to be one of "+Object.keys(this._enumValues).map(function(t){return JSON.stringify(t)}).join(", ")+", but found "+JSON.stringify(a)+" instead.");return a}catch(t){return this._warningHistory[t.message]||(this._warningHistory[t.message]=!0,"undefined"!=typeof console&&console.warn(t.message)),this._defaultValue}};var Zr=function(t,e){this.kind=t,this._styleExpression=e,this.isStateDependent="constant"!==t&&!Be(e.expression)};Zr.prototype.evaluateWithoutErrorHandling=function(t,e,r,i,n,o){return this._styleExpression.evaluateWithoutErrorHandling(t,e,r,i,n,o)},Zr.prototype.evaluate=function(t,e,r,i,n,o){return this._styleExpression.evaluate(t,e,r,i,n,o)};var Gr=function(t,e,r,i){this.kind=t,this.zoomStops=r,this._styleExpression=e,this.isStateDependent="camera"!==t&&!Be(e.expression),this.interpolationType=i};function Xr(t,e){if("error"===(t=qr(t,e)).result)return t;var r=t.value.expression,i=Le(r);if(!i&&!Cr(e))return Pr([new Mt("","data expressions not supported")]);var n=Re(r,["zoom"]);if(!n&&!kr(e))return Pr([new Mt("","zoom expressions not supported")]);var o=function t(e){var r=null;if(e instanceof or)r=t(e.result);else if(e instanceof nr)for(var i=0,n=e.args;i<n.length&&!(r=t(n[i]));i+=1);else(e instanceof Ve||e instanceof rr)&&e.input instanceof ye&&"zoom"===e.input.name&&(r=e);return r instanceof Mt||e.eachChild(function(e){var i=t(e);i instanceof Mt?r=i:!r&&i?r=new Mt("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):r&&i&&r!==i&&(r=new Mt("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),r}(r);return o||n?o instanceof Mt?Pr([o]):o instanceof rr&&!Mr(e)?Pr([new Mt("",'"interpolate" expressions cannot be used with this property')]):zr(o?new Gr(i?"camera":"composite",t.value,o.labels,o instanceof rr?o.interpolation:void 0):new Zr(i?"constant":"source",t.value)):Pr([new Mt("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}Gr.prototype.evaluateWithoutErrorHandling=function(t,e,r,i,n,o){return this._styleExpression.evaluateWithoutErrorHandling(t,e,r,i,n,o)},Gr.prototype.evaluate=function(t,e,r,i,n,o){return this._styleExpression.evaluate(t,e,r,i,n,o)},Gr.prototype.interpolationFactor=function(t,e,r){return this.interpolationType?rr.interpolationFactor(this.interpolationType,t,e,r):0};var Wr=function(t,e){this._parameters=t,this._specification=e,Pt(this,function t(e,r){var i,n,o,a="color"===r.type,s=e.stops&&"object"==typeof e.stops[0][0],l=s||!(s||void 0!==e.property),u=e.type||(Mr(r)?"exponential":"interval");if(a&&((e=Pt({},e)).stops&&(e.stops=e.stops.map(function(t){return[t[0],Yt.parse(t[1])]})),e.default=Yt.parse(e.default?e.default:r.default)),e.colorSpace&&"rgb"!==e.colorSpace&&!er[e.colorSpace])throw new Error("Unknown color space: "+e.colorSpace);if("exponential"===u)i=Ur;else if("interval"===u)i=Or;else if("categorical"===u){i=Fr,n=Object.create(null);for(var c=0,p=e.stops;c<p.length;c+=1){var h=p[c];n[h[0]]=h[1]}o=typeof e.stops[0][0]}else{if("identity"!==u)throw new Error('Unknown function type "'+u+'"');i=Vr}if(s){for(var f={},d=[],m=0;m<e.stops.length;m++){var y=e.stops[m],g=y[0].zoom;void 0===f[g]&&(f[g]={zoom:g,type:e.type,property:e.property,default:e.default,stops:[]},d.push(g)),f[g].stops.push([y[0].value,y[1]])}for(var _=[],v=0,x=d;v<x.length;v+=1){var b=x[v];_.push([f[b].zoom,t(f[b],r)])}var w={name:"linear"};return{kind:"composite",interpolationType:w,interpolationFactor:rr.interpolationFactor.bind(void 0,w),zoomStops:_.map(function(t){return t[0]}),evaluate:function(t,i){var n=t.zoom;return Ur({stops:_,base:e.base},r,n).evaluate(n,i)}}}if(l){var S="exponential"===u?{name:"exponential",base:void 0!==e.base?e.base:1}:null;return{kind:"camera",interpolationType:S,interpolationFactor:rr.interpolationFactor.bind(void 0,S),zoomStops:e.stops.map(function(t){return t[0]}),evaluate:function(t){return i(e,r,t.zoom,n,o)}}}return{kind:"source",evaluate:function(t,a){var s=a&&a.properties?a.properties[e.property]:void 0;return void 0===s?Rr(e.default,r.default):i(e,r,s,n,o)}}}(this._parameters,this._specification))};function Kr(t){var e=t.key,r=t.value,i=t.valueSpec||{},n=t.objectElementValidators||{},o=t.style,a=t.styleSpec,s=[],l=Dr(r);if("object"!==l)return[new At(e,r,"object expected, "+l+" found")];for(var u in r){var c=u.split(".")[0],p=i[c]||i["*"],h=void 0;if(n[c])h=n[c];else if(i[c])h=vi;else if(n["*"])h=n["*"];else{if(!i["*"]){s.push(new At(e,r[u],'unknown property "'+u+'"'));continue}h=vi}s=s.concat(h({key:(e?e+".":e)+u,value:r[u],valueSpec:p,style:o,styleSpec:a,object:r,objectKey:u},r))}for(var f in i)n[f]||i[f].required&&void 0===i[f].default&&void 0===r[f]&&s.push(new At(e,r,'missing required property "'+f+'"'));return s}function Hr(t){var e=t.value,r=t.valueSpec,i=t.style,n=t.styleSpec,o=t.key,a=t.arrayElementValidator||vi;if("array"!==Dr(e))return[new At(o,e,"array expected, "+Dr(e)+" found")];if(r.length&&e.length!==r.length)return[new At(o,e,"array length "+r.length+" expected, length "+e.length+" found")];if(r["min-length"]&&e.length<r["min-length"])return[new At(o,e,"array length at least "+r["min-length"]+" expected, length "+e.length+" found")];var s={type:r.value,values:r.values};n.$version<7&&(s.function=r.function),"object"===Dr(r.value)&&(s=r.value);for(var l=[],u=0;u<e.length;u++)l=l.concat(a({array:e,arrayIndex:u,value:e[u],valueSpec:s,style:i,styleSpec:n,key:o+"["+u+"]"}));return l}function Jr(t){var e=t.key,r=t.value,i=t.valueSpec,n=Dr(r);return"number"===n&&r!=r&&(n="NaN"),"number"!==n?[new At(e,r,"number expected, "+n+" found")]:"minimum"in i&&r<i.minimum?[new At(e,r,r+" is less than the minimum value "+i.minimum)]:"maximum"in i&&r>i.maximum?[new At(e,r,r+" is greater than the maximum value "+i.maximum)]:[]}function Yr(t){var e,r,i,n=t.valueSpec,o=Ct(t.value.type),a={},s="categorical"!==o&&void 0===t.value.property,l=!s,u="array"===Dr(t.value.stops)&&"array"===Dr(t.value.stops[0])&&"object"===Dr(t.value.stops[0][0]),c=Kr({key:t.key,value:t.value,valueSpec:t.styleSpec.function,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{stops:function(t){if("identity"===o)return[new At(t.key,t.value,'identity function may not have a "stops" property')];var e=[],r=t.value;return e=e.concat(Hr({key:t.key,value:r,valueSpec:t.valueSpec,style:t.style,styleSpec:t.styleSpec,arrayElementValidator:p})),"array"===Dr(r)&&0===r.length&&e.push(new At(t.key,r,"array must have at least one stop")),e},default:function(t){return vi({key:t.key,value:t.value,valueSpec:n,style:t.style,styleSpec:t.styleSpec})}}});return"identity"===o&&s&&c.push(new At(t.key,t.value,'missing required property "property"')),"identity"===o||t.value.stops||c.push(new At(t.key,t.value,'missing required property "stops"')),"exponential"===o&&t.valueSpec.expression&&!Mr(t.valueSpec)&&c.push(new At(t.key,t.value,"exponential functions not supported")),t.styleSpec.$version>=8&&(l&&!Cr(t.valueSpec)?c.push(new At(t.key,t.value,"property functions not supported")):s&&!kr(t.valueSpec)&&c.push(new At(t.key,t.value,"zoom functions not supported"))),"categorical"!==o&&!u||void 0!==t.value.property||c.push(new At(t.key,t.value,'"property" property is required')),c;function p(t){var e=[],o=t.value,s=t.key;if("array"!==Dr(o))return[new At(s,o,"array expected, "+Dr(o)+" found")];if(2!==o.length)return[new At(s,o,"array length 2 expected, length "+o.length+" found")];if(u){if("object"!==Dr(o[0]))return[new At(s,o,"object expected, "+Dr(o[0])+" found")];if(void 0===o[0].zoom)return[new At(s,o,"object stop key must have zoom")];if(void 0===o[0].value)return[new At(s,o,"object stop key must have value")];if(i&&i>Ct(o[0].zoom))return[new At(s,o[0].zoom,"stop zoom values must appear in ascending order")];Ct(o[0].zoom)!==i&&(i=Ct(o[0].zoom),r=void 0,a={}),e=e.concat(Kr({key:s+"[0]",value:o[0],valueSpec:{zoom:{}},style:t.style,styleSpec:t.styleSpec,objectElementValidators:{zoom:Jr,value:h}}))}else e=e.concat(h({key:s+"[0]",value:o[0],valueSpec:{},style:t.style,styleSpec:t.styleSpec},o));return jr(kt(o[1]))?e.concat([new At(s+"[1]",o[1],"expressions are not allowed in function stops.")]):e.concat(vi({key:s+"[1]",value:o[1],valueSpec:n,style:t.style,styleSpec:t.styleSpec}))}function h(t,i){var s=Dr(t.value),l=Ct(t.value),u=null!==t.value?t.value:i;if(e){if(s!==e)return[new At(t.key,u,s+" stop domain type must match previous stop domain type "+e)]}else e=s;if("number"!==s&&"string"!==s&&"boolean"!==s)return[new At(t.key,u,"stop domain value must be a number, string, or boolean")];if("number"!==s&&"categorical"!==o){var c="number expected, "+s+" found";return Cr(n)&&void 0===o&&(c+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new At(t.key,u,c)]}return"categorical"!==o||"number"!==s||isFinite(l)&&Math.floor(l)===l?"categorical"!==o&&"number"===s&&void 0!==r&&l<r?[new At(t.key,u,"stop domain values must appear in ascending order")]:(r=l,"categorical"===o&&l in a?[new At(t.key,u,"stop domain values must be unique")]:(a[l]=!0,[])):[new At(t.key,u,"integer expected, found "+l)]}}function Qr(t){var e=("property"===t.expressionContext?Xr:qr)(kt(t.value),t.valueSpec);if("error"===e.result)return e.value.map(function(e){return new At(""+t.key+e.key,t.value,e.message)});var r=e.value.expression||e.value._styleExpression.expression;if("property"===t.expressionContext&&"text-font"===t.propertyKey&&!r.outputDefined())return[new At(t.key,t.value,'Invalid data expression for "'+t.propertyKey+'". Output values must be contained as literals within the expression.')];if("property"===t.expressionContext&&"layout"===t.propertyType&&!Be(r))return[new At(t.key,t.value,'"feature-state" data expressions are not supported with layout properties.')];if("filter"===t.expressionContext&&!Be(r))return[new At(t.key,t.value,'"feature-state" data expressions are not supported with filters.')];if(t.expressionContext&&0===t.expressionContext.indexOf("cluster")){if(!Re(r,["zoom","feature-state"]))return[new At(t.key,t.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if("cluster-initial"===t.expressionContext&&!Le(r))return[new At(t.key,t.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function $r(t){var e=t.key,r=t.value,i=t.valueSpec,n=[];return Array.isArray(i.values)?-1===i.values.indexOf(Ct(r))&&n.push(new At(e,r,"expected one of ["+i.values.join(", ")+"], "+JSON.stringify(r)+" found")):-1===Object.keys(i.values).indexOf(Ct(r))&&n.push(new At(e,r,"expected one of ["+Object.keys(i.values).join(", ")+"], "+JSON.stringify(r)+" found")),n}function ti(t){if(!0===t||!1===t)return!0;if(!Array.isArray(t)||0===t.length)return!1;switch(t[0]){case"has":return t.length>=2&&"$id"!==t[1]&&"$type"!==t[1];case"in":return t.length>=3&&("string"!=typeof t[1]||Array.isArray(t[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return 3!==t.length||Array.isArray(t[1])||Array.isArray(t[2]);case"any":case"all":for(var e=0,r=t.slice(1);e<r.length;e+=1){var i=r[e];if(!ti(i)&&"boolean"!=typeof i)return!1}return!0;default:return!0}}Wr.deserialize=function(t){return new Wr(t._parameters,t._specification)},Wr.serialize=function(t){return{_parameters:t._parameters,_specification:t._specification}};var ei={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function ri(t){if(null==t)return{filter:function(){return!0},needGeometry:!1};ti(t)||(t=ni(t));var e=qr(t,ei);if("error"===e.result)throw new Error(e.value.map(function(t){return t.key+": "+t.message}).join(", "));return{filter:function(t,r,i){return e.value.evaluate(t,r,{},i)},needGeometry:function t(e){if(!Array.isArray(e))return!1;if("within"===e[0])return!0;for(var r=1;r<e.length;r++)if(t(e[r]))return!0;return!1}(t)}}function ii(t,e){return t<e?-1:t>e?1:0}function ni(t){if(!t)return!0;var e,r=t[0];return t.length<=1?"any"!==r:"=="===r?oi(t[1],t[2],"=="):"!="===r?li(oi(t[1],t[2],"==")):"<"===r||">"===r||"<="===r||">="===r?oi(t[1],t[2],r):"any"===r?(e=t.slice(1),["any"].concat(e.map(ni))):"all"===r?["all"].concat(t.slice(1).map(ni)):"none"===r?["all"].concat(t.slice(1).map(ni).map(li)):"in"===r?ai(t[1],t.slice(2)):"!in"===r?li(ai(t[1],t.slice(2))):"has"===r?si(t[1]):"!has"===r?li(si(t[1])):"within"!==r||t}function oi(t,e,r){switch(t){case"$type":return["filter-type-"+r,e];case"$id":return["filter-id-"+r,e];default:return["filter-"+r,t,e]}}function ai(t,e){if(0===e.length)return!1;switch(t){case"$type":return["filter-type-in",["literal",e]];case"$id":return["filter-id-in",["literal",e]];default:return e.length>200&&!e.some(function(t){return typeof t!=typeof e[0]})?["filter-in-large",t,["literal",e.sort(ii)]]:["filter-in-small",t,["literal",e]]}}function si(t){switch(t){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",t]}}function li(t){return["!",t]}function ui(t){return ti(kt(t.value))?Qr(Pt({},t,{expressionContext:"filter",valueSpec:{value:"boolean"}})):function t(e){var r=e.value,i=e.key;if("array"!==Dr(r))return[new At(i,r,"array expected, "+Dr(r)+" found")];var n,o=e.styleSpec,a=[];if(r.length<1)return[new At(i,r,"filter array must have at least 1 element")];switch(a=a.concat($r({key:i+"[0]",value:r[0],valueSpec:o.filter_operator,style:e.style,styleSpec:e.styleSpec})),Ct(r[0])){case"<":case"<=":case">":case">=":r.length>=2&&"$type"===Ct(r[1])&&a.push(new At(i,r,'"$type" cannot be use with operator "'+r[0]+'"'));case"==":case"!=":3!==r.length&&a.push(new At(i,r,'filter array for operator "'+r[0]+'" must have 3 elements'));case"in":case"!in":r.length>=2&&"string"!==(n=Dr(r[1]))&&a.push(new At(i+"[1]",r[1],"string expected, "+n+" found"));for(var s=2;s<r.length;s++)n=Dr(r[s]),"$type"===Ct(r[1])?a=a.concat($r({key:i+"["+s+"]",value:r[s],valueSpec:o.geometry_type,style:e.style,styleSpec:e.styleSpec})):"string"!==n&&"number"!==n&&"boolean"!==n&&a.push(new At(i+"["+s+"]",r[s],"string, number, or boolean expected, "+n+" found"));break;case"any":case"all":case"none":for(var l=1;l<r.length;l++)a=a.concat(t({key:i+"["+l+"]",value:r[l],style:e.style,styleSpec:e.styleSpec}));break;case"has":case"!has":n=Dr(r[1]),2!==r.length?a.push(new At(i,r,'filter array for "'+r[0]+'" operator must have 2 elements')):"string"!==n&&a.push(new At(i+"[1]",r[1],"string expected, "+n+" found"));break;case"within":n=Dr(r[1]),2!==r.length?a.push(new At(i,r,'filter array for "'+r[0]+'" operator must have 2 elements')):"object"!==n&&a.push(new At(i+"[1]",r[1],"object expected, "+n+" found"))}return a}(t)}function ci(t,e){var r=t.key,i=t.style,n=t.styleSpec,o=t.value,a=t.objectKey,s=n[e+"_"+t.layerType];if(!s)return[];var l=a.match(/^(.*)-transition$/);if("paint"===e&&l&&s[l[1]]&&s[l[1]].transition)return vi({key:r,value:o,valueSpec:n.transition,style:i,styleSpec:n});var u,c=t.valueSpec||s[a];if(!c)return[new At(r,o,'unknown property "'+a+'"')];if("string"===Dr(o)&&Cr(c)&&!c.tokens&&(u=/^{([^}]+)}$/.exec(o)))return[new At(r,o,'"'+a+'" does not support interpolation syntax\nUse an identity property function instead: `{ "type": "identity", "property": '+JSON.stringify(u[1])+" }`.")];var p=[];return"symbol"===t.layerType&&("text-field"===a&&i&&!i.glyphs&&p.push(new At(r,o,'use of "text-field" requires a style "glyphs" property')),"text-font"===a&&Lr(kt(o))&&"identity"===Ct(o.type)&&p.push(new At(r,o,'"text-font" does not support identity functions'))),p.concat(vi({key:t.key,value:o,valueSpec:c,style:i,styleSpec:n,expressionContext:"property",propertyType:e,propertyKey:a}))}function pi(t){return ci(t,"paint")}function hi(t){return ci(t,"layout")}function fi(t){var e=[],r=t.value,i=t.key,n=t.style,o=t.styleSpec;r.type||r.ref||e.push(new At(i,r,'either "type" or "ref" is required'));var a,s=Ct(r.type),l=Ct(r.ref);if(r.id)for(var u=Ct(r.id),c=0;c<t.arrayIndex;c++){var p=n.layers[c];Ct(p.id)===u&&e.push(new At(i,r.id,'duplicate layer id "'+r.id+'", previously used at line '+p.id.__line__))}if("ref"in r)["type","source","source-layer","filter","layout"].forEach(function(t){t in r&&e.push(new At(i,r[t],'"'+t+'" is prohibited for ref layers'))}),n.layers.forEach(function(t){Ct(t.id)===l&&(a=t)}),a?a.ref?e.push(new At(i,r.ref,"ref cannot reference another ref layer")):s=Ct(a.type):e.push(new At(i,r.ref,'ref layer "'+l+'" not found'));else if("background"!==s)if(r.source){var h=n.sources&&n.sources[r.source],f=h&&Ct(h.type);h?"vector"===f&&"raster"===s?e.push(new At(i,r.source,'layer "'+r.id+'" requires a raster source')):"raster"===f&&"raster"!==s?e.push(new At(i,r.source,'layer "'+r.id+'" requires a vector source')):"vector"!==f||r["source-layer"]?"raster-dem"===f&&"hillshade"!==s?e.push(new At(i,r.source,"raster-dem source can only be used with layer type 'hillshade'.")):"line"!==s||!r.paint||!r.paint["line-gradient"]||"geojson"===f&&h.lineMetrics||e.push(new At(i,r,'layer "'+r.id+'" specifies a line-gradient, which requires a GeoJSON source with `lineMetrics` enabled.')):e.push(new At(i,r,'layer "'+r.id+'" must specify a "source-layer"')):e.push(new At(i,r.source,'source "'+r.source+'" not found'))}else e.push(new At(i,r,'missing required property "source"'));return e=e.concat(Kr({key:i,value:r,valueSpec:o.layer,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{"*":function(){return[]},type:function(){return vi({key:i+".type",value:r.type,valueSpec:o.layer.type,style:t.style,styleSpec:t.styleSpec,object:r,objectKey:"type"})},filter:ui,layout:function(t){return Kr({layer:r,key:t.key,value:t.value,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{"*":function(t){return hi(Pt({layerType:s},t))}}})},paint:function(t){return Kr({layer:r,key:t.key,value:t.value,style:t.style,styleSpec:t.styleSpec,objectElementValidators:{"*":function(t){return pi(Pt({layerType:s},t))}}})}}}))}function di(t){var e=t.value,r=t.key,i=Dr(e);return"string"!==i?[new At(r,e,"string expected, "+i+" found")]:[]}var mi={promoteId:function(t){var e=t.key,r=t.value;if("string"===Dr(r))return di({key:e,value:r});var i=[];for(var n in r)i.push.apply(i,di({key:e+"."+n,value:r[n]}));return i}};function yi(t){var e=t.value,r=t.key,i=t.styleSpec,n=t.style;if(!e.type)return[new At(r,e,'"type" is required')];var o,a=Ct(e.type);switch(a){case"vector":case"raster":case"raster-dem":return Kr({key:r,value:e,valueSpec:i["source_"+a.replace("-","_")],style:t.style,styleSpec:i,objectElementValidators:mi});case"geojson":if(o=Kr({key:r,value:e,valueSpec:i.source_geojson,style:n,styleSpec:i,objectElementValidators:mi}),e.cluster)for(var s in e.clusterProperties){var l=e.clusterProperties[s],u=l[0],c="string"==typeof u?[u,["accumulated"],["get",s]]:u;o.push.apply(o,Qr({key:r+"."+s+".map",value:l[1],expressionContext:"cluster-map"})),o.push.apply(o,Qr({key:r+"."+s+".reduce",value:c,expressionContext:"cluster-reduce"}))}return o;case"video":return Kr({key:r,value:e,valueSpec:i.source_video,style:n,styleSpec:i});case"image":return Kr({key:r,value:e,valueSpec:i.source_image,style:n,styleSpec:i});case"canvas":return[new At(r,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return $r({key:r+".type",value:e.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:n,styleSpec:i})}}function gi(t){var e=t.value,r=t.styleSpec,i=r.light,n=t.style,o=[],a=Dr(e);if(void 0===e)return o;if("object"!==a)return o.concat([new At("light",e,"object expected, "+a+" found")]);for(var s in e){var l=s.match(/^(.*)-transition$/);o=o.concat(l&&i[l[1]]&&i[l[1]].transition?vi({key:s,value:e[s],valueSpec:r.transition,style:n,styleSpec:r}):i[s]?vi({key:s,value:e[s],valueSpec:i[s],style:n,styleSpec:r}):[new At(s,e[s],'unknown property "'+s+'"')])}return o}var _i={"*":function(){return[]},array:Hr,boolean:function(t){var e=t.value,r=t.key,i=Dr(e);return"boolean"!==i?[new At(r,e,"boolean expected, "+i+" found")]:[]},number:Jr,color:function(t){var e=t.key,r=t.value,i=Dr(r);return"string"!==i?[new At(e,r,"color expected, "+i+" found")]:null===Jt(r)?[new At(e,r,'color expected, "'+r+'" found')]:[]},constants:zt,enum:$r,filter:ui,function:Yr,layer:fi,object:Kr,source:yi,light:gi,string:di,formatted:function(t){return 0===di(t).length?[]:Qr(t)},resolvedImage:function(t){return 0===di(t).length?[]:Qr(t)}};function vi(t){var e=t.value,r=t.valueSpec,i=t.styleSpec;return r.expression&&Lr(Ct(e))?Yr(t):r.expression&&jr(kt(e))?Qr(t):r.type&&_i[r.type]?_i[r.type](t):Kr(Pt({},t,{valueSpec:r.type?i[r.type]:r}))}function xi(t){var e=t.value,r=t.key,i=di(t);return i.length||(-1===e.indexOf("{fontstack}")&&i.push(new At(r,e,'"glyphs" url must include a "{fontstack}" token')),-1===e.indexOf("{range}")&&i.push(new At(r,e,'"glyphs" url must include a "{range}" token'))),i}function bi(t,e){void 0===e&&(e=Et);var r=[];return r=r.concat(vi({key:"",value:t,valueSpec:e.$root,styleSpec:e,style:t,objectElementValidators:{glyphs:xi,"*":function(){return[]}}})),t.constants&&(r=r.concat(zt({key:"constants",value:t.constants,style:t,styleSpec:e}))),wi(r)}function wi(t){return[].concat(t).sort(function(t,e){return t.line-e.line})}function Si(t){return function(){for(var e=[],r=arguments.length;r--;)e[r]=arguments[r];return wi(t.apply(this,e))}}bi.source=Si(yi),bi.light=Si(gi),bi.layer=Si(fi),bi.filter=Si(ui),bi.paintProperty=Si(pi),bi.layoutProperty=Si(hi);var Ti=bi,Ii=Ti.light,Ei=Ti.paintProperty,Ai=Ti.layoutProperty;function zi(t,e){var r=!1;if(e&&e.length)for(var i=0,n=e;i<n.length;i+=1)t.fire(new Tt(new Error(n[i].message))),r=!0;return r}var Pi=Ci;function Ci(t,e,r){var i=this.cells=[];if(t instanceof ArrayBuffer){this.arrayBuffer=t;var n=new Int32Array(this.arrayBuffer);t=n[0],this.d=(e=n[1])+2*(r=n[2]);for(var o=0;o<this.d*this.d;o++){var a=n[3+o],s=n[3+o+1];i.push(a===s?null:n.subarray(a,s))}var l=n[3+i.length+1];this.keys=n.subarray(n[3+i.length],l),this.bboxes=n.subarray(l),this.insert=this._insertReadonly}else{this.d=e+2*r;for(var u=0;u<this.d*this.d;u++)i.push([]);this.keys=[],this.bboxes=[]}this.n=e,this.extent=t,this.padding=r,this.scale=e/t,this.uid=0;var c=r/e*t;this.min=-c,this.max=t+c}Ci.prototype.insert=function(t,e,r,i,n){this._forEachCell(e,r,i,n,this._insertCell,this.uid++),this.keys.push(t),this.bboxes.push(e),this.bboxes.push(r),this.bboxes.push(i),this.bboxes.push(n)},Ci.prototype._insertReadonly=function(){throw"Cannot insert into a GridIndex created from an ArrayBuffer."},Ci.prototype._insertCell=function(t,e,r,i,n,o){this.cells[n].push(o)},Ci.prototype.query=function(t,e,r,i,n){var o=this.min,a=this.max;if(t<=o&&e<=o&&a<=r&&a<=i&&!n)return Array.prototype.slice.call(this.keys);var s=[];return this._forEachCell(t,e,r,i,this._queryCell,s,{},n),s},Ci.prototype._queryCell=function(t,e,r,i,n,o,a,s){var l=this.cells[n];if(null!==l)for(var u=this.keys,c=this.bboxes,p=0;p<l.length;p++){var h=l[p];if(void 0===a[h]){var f=4*h;(s?s(c[f+0],c[f+1],c[f+2],c[f+3]):t<=c[f+2]&&e<=c[f+3]&&r>=c[f+0]&&i>=c[f+1])?(a[h]=!0,o.push(u[h])):a[h]=!1}}},Ci.prototype._forEachCell=function(t,e,r,i,n,o,a,s){for(var l=this._convertToCellCoord(t),u=this._convertToCellCoord(e),c=this._convertToCellCoord(r),p=this._convertToCellCoord(i),h=l;h<=c;h++)for(var f=u;f<=p;f++){var d=this.d*f+h;if((!s||s(this._convertFromCellCoord(h),this._convertFromCellCoord(f),this._convertFromCellCoord(h+1),this._convertFromCellCoord(f+1)))&&n.call(this,t,e,r,i,d,o,a,s))return}},Ci.prototype._convertFromCellCoord=function(t){return(t-this.padding)/this.scale},Ci.prototype._convertToCellCoord=function(t){return Math.max(0,Math.min(this.d-1,Math.floor(t*this.scale)+this.padding))},Ci.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var t=this.cells,e=3+this.cells.length+1+1,r=0,i=0;i<this.cells.length;i++)r+=this.cells[i].length;var n=new Int32Array(e+r+this.keys.length+this.bboxes.length);n[0]=this.extent,n[1]=this.n,n[2]=this.padding;for(var o=e,a=0;a<t.length;a++){var s=t[a];n[3+a]=o,n.set(s,o),o+=s.length}return n[3+t.length]=o,n.set(this.keys,o),n[3+t.length+1]=o+=this.keys.length,n.set(this.bboxes,o),o+=this.bboxes.length,n.buffer};var ki=self.ImageData,Mi=self.ImageBitmap,Di={};function Li(t,e,r){void 0===r&&(r={}),Object.defineProperty(e,"_classRegistryKey",{value:t,writeable:!1}),Di[t]={klass:e,omit:r.omit||[],shallow:r.shallow||[]}}for(var Bi in Li("Object",Object),Pi.serialize=function(t,e){var r=t.toArrayBuffer();return e&&e.push(r),{buffer:r}},Pi.deserialize=function(t){return new Pi(t.buffer)},Li("Grid",Pi),Li("Color",Yt),Li("Error",Error),Li("ResolvedImage",ee),Li("StylePropertyFunction",Wr),Li("StyleExpression",Nr,{omit:["_evaluator"]}),Li("ZoomDependentExpression",Gr),Li("ZoomConstantExpression",Zr),Li("CompoundExpression",ye,{omit:["_evaluate"]}),Sr)Sr[Bi]._classRegistryKey||Li("Expression_"+Bi,Sr[Bi]);function Ri(t){return t&&"undefined"!=typeof ArrayBuffer&&(t instanceof ArrayBuffer||t.constructor&&"ArrayBuffer"===t.constructor.name)}function Fi(t){return Mi&&t instanceof Mi}function Oi(t,e){if(null==t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||t instanceof Boolean||t instanceof Number||t instanceof String||t instanceof Date||t instanceof RegExp)return t;if(Ri(t)||Fi(t))return e&&e.push(t),t;if(ArrayBuffer.isView(t)){var r=t;return e&&e.push(r.buffer),r}if(t instanceof ki)return e&&e.push(t.data.buffer),t;if(Array.isArray(t)){for(var i=[],n=0,o=t;n<o.length;n+=1)i.push(Oi(o[n],e));return i}if("object"==typeof t){var a=t.constructor,s=a._classRegistryKey;if(!s)throw new Error("can't serialize object of unregistered class");var l=a.serialize?a.serialize(t,e):{};if(!a.serialize){for(var u in t)if(t.hasOwnProperty(u)&&!(Di[s].omit.indexOf(u)>=0)){var c=t[u];l[u]=Di[s].shallow.indexOf(u)>=0?c:Oi(c,e)}t instanceof Error&&(l.message=t.message)}if(l.$name)throw new Error("$name property is reserved for worker serialization logic.");return"Object"!==s&&(l.$name=s),l}throw new Error("can't serialize object of type "+typeof t)}function Ui(t){if(null==t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||t instanceof Boolean||t instanceof Number||t instanceof String||t instanceof Date||t instanceof RegExp||Ri(t)||Fi(t)||ArrayBuffer.isView(t)||t instanceof ki)return t;if(Array.isArray(t))return t.map(Ui);if("object"==typeof t){var e=t.$name||"Object",r=Di[e].klass;if(!r)throw new Error("can't deserialize unregistered class "+e);if(r.deserialize)return r.deserialize(t);for(var i=Object.create(r.prototype),n=0,o=Object.keys(t);n<o.length;n+=1){var a=o[n];if("$name"!==a){var s=t[a];i[a]=Di[e].shallow.indexOf(a)>=0?s:Ui(s)}}return i}throw new Error("can't deserialize object of type "+typeof t)}var Vi=function(){this.first=!0};Vi.prototype.update=function(t,e){var r=Math.floor(t);return this.first?(this.first=!1,this.lastIntegerZoom=r,this.lastIntegerZoomTime=0,this.lastZoom=t,this.lastFloorZoom=r,!0):(this.lastFloorZoom>r?(this.lastIntegerZoom=r+1,this.lastIntegerZoomTime=e):this.lastFloorZoom<r&&(this.lastIntegerZoom=r,this.lastIntegerZoomTime=e),t!==this.lastZoom&&(this.lastZoom=t,this.lastFloorZoom=r,!0))};var Ni={"Latin-1 Supplement":function(t){return t>=128&&t<=255},Arabic:function(t){return t>=1536&&t<=1791},"Arabic Supplement":function(t){return t>=1872&&t<=1919},"Arabic Extended-A":function(t){return t>=2208&&t<=2303},"Hangul Jamo":function(t){return t>=4352&&t<=4607},"Unified Canadian Aboriginal Syllabics":function(t){return t>=5120&&t<=5759},Khmer:function(t){return t>=6016&&t<=6143},"Unified Canadian Aboriginal Syllabics Extended":function(t){return t>=6320&&t<=6399},"General Punctuation":function(t){return t>=8192&&t<=8303},"Letterlike Symbols":function(t){return t>=8448&&t<=8527},"Number Forms":function(t){return t>=8528&&t<=8591},"Miscellaneous Technical":function(t){return t>=8960&&t<=9215},"Control Pictures":function(t){return t>=9216&&t<=9279},"Optical Character Recognition":function(t){return t>=9280&&t<=9311},"Enclosed Alphanumerics":function(t){return t>=9312&&t<=9471},"Geometric Shapes":function(t){return t>=9632&&t<=9727},"Miscellaneous Symbols":function(t){return t>=9728&&t<=9983},"Miscellaneous Symbols and Arrows":function(t){return t>=11008&&t<=11263},"CJK Radicals Supplement":function(t){return t>=11904&&t<=12031},"Kangxi Radicals":function(t){return t>=12032&&t<=12255},"Ideographic Description Characters":function(t){return t>=12272&&t<=12287},"CJK Symbols and Punctuation":function(t){return t>=12288&&t<=12351},Hiragana:function(t){return t>=12352&&t<=12447},Katakana:function(t){return t>=12448&&t<=12543},Bopomofo:function(t){return t>=12544&&t<=12591},"Hangul Compatibility Jamo":function(t){return t>=12592&&t<=12687},Kanbun:function(t){return t>=12688&&t<=12703},"Bopomofo Extended":function(t){return t>=12704&&t<=12735},"CJK Strokes":function(t){return t>=12736&&t<=12783},"Katakana Phonetic Extensions":function(t){return t>=12784&&t<=12799},"Enclosed CJK Letters and Months":function(t){return t>=12800&&t<=13055},"CJK Compatibility":function(t){return t>=13056&&t<=13311},"CJK Unified Ideographs Extension A":function(t){return t>=13312&&t<=19903},"Yijing Hexagram Symbols":function(t){return t>=19904&&t<=19967},"CJK Unified Ideographs":function(t){return t>=19968&&t<=40959},"Yi Syllables":function(t){return t>=40960&&t<=42127},"Yi Radicals":function(t){return t>=42128&&t<=42191},"Hangul Jamo Extended-A":function(t){return t>=43360&&t<=43391},"Hangul Syllables":function(t){return t>=44032&&t<=55215},"Hangul Jamo Extended-B":function(t){return t>=55216&&t<=55295},"Private Use Area":function(t){return t>=57344&&t<=63743},"CJK Compatibility Ideographs":function(t){return t>=63744&&t<=64255},"Arabic Presentation Forms-A":function(t){return t>=64336&&t<=65023},"Vertical Forms":function(t){return t>=65040&&t<=65055},"CJK Compatibility Forms":function(t){return t>=65072&&t<=65103},"Small Form Variants":function(t){return t>=65104&&t<=65135},"Arabic Presentation Forms-B":function(t){return t>=65136&&t<=65279},"Halfwidth and Fullwidth Forms":function(t){return t>=65280&&t<=65519}};function ji(t){for(var e=0,r=t;e<r.length;e+=1)if(qi(r[e].charCodeAt(0)))return!0;return!1}function qi(t){return!(746!==t&&747!==t&&(t<4352||!(Ni["Bopomofo Extended"](t)||Ni.Bopomofo(t)||Ni["CJK Compatibility Forms"](t)&&!(t>=65097&&t<=65103)||Ni["CJK Compatibility Ideographs"](t)||Ni["CJK Compatibility"](t)||Ni["CJK Radicals Supplement"](t)||Ni["CJK Strokes"](t)||!(!Ni["CJK Symbols and Punctuation"](t)||t>=12296&&t<=12305||t>=12308&&t<=12319||12336===t)||Ni["CJK Unified Ideographs Extension A"](t)||Ni["CJK Unified Ideographs"](t)||Ni["Enclosed CJK Letters and Months"](t)||Ni["Hangul Compatibility Jamo"](t)||Ni["Hangul Jamo Extended-A"](t)||Ni["Hangul Jamo Extended-B"](t)||Ni["Hangul Jamo"](t)||Ni["Hangul Syllables"](t)||Ni.Hiragana(t)||Ni["Ideographic Description Characters"](t)||Ni.Kanbun(t)||Ni["Kangxi Radicals"](t)||Ni["Katakana Phonetic Extensions"](t)||Ni.Katakana(t)&&12540!==t||!(!Ni["Halfwidth and Fullwidth Forms"](t)||65288===t||65289===t||65293===t||t>=65306&&t<=65310||65339===t||65341===t||65343===t||t>=65371&&t<=65503||65507===t||t>=65512&&t<=65519)||!(!Ni["Small Form Variants"](t)||t>=65112&&t<=65118||t>=65123&&t<=65126)||Ni["Unified Canadian Aboriginal Syllabics"](t)||Ni["Unified Canadian Aboriginal Syllabics Extended"](t)||Ni["Vertical Forms"](t)||Ni["Yijing Hexagram Symbols"](t)||Ni["Yi Syllables"](t)||Ni["Yi Radicals"](t))))}function Zi(t){return!(qi(t)||function(t){return!!(Ni["Latin-1 Supplement"](t)&&(167===t||169===t||174===t||177===t||188===t||189===t||190===t||215===t||247===t)||Ni["General Punctuation"](t)&&(8214===t||8224===t||8225===t||8240===t||8241===t||8251===t||8252===t||8258===t||8263===t||8264===t||8265===t||8273===t)||Ni["Letterlike Symbols"](t)||Ni["Number Forms"](t)||Ni["Miscellaneous Technical"](t)&&(t>=8960&&t<=8967||t>=8972&&t<=8991||t>=8996&&t<=9e3||9003===t||t>=9085&&t<=9114||t>=9150&&t<=9165||9167===t||t>=9169&&t<=9179||t>=9186&&t<=9215)||Ni["Control Pictures"](t)&&9251!==t||Ni["Optical Character Recognition"](t)||Ni["Enclosed Alphanumerics"](t)||Ni["Geometric Shapes"](t)||Ni["Miscellaneous Symbols"](t)&&!(t>=9754&&t<=9759)||Ni["Miscellaneous Symbols and Arrows"](t)&&(t>=11026&&t<=11055||t>=11088&&t<=11097||t>=11192&&t<=11243)||Ni["CJK Symbols and Punctuation"](t)||Ni.Katakana(t)||Ni["Private Use Area"](t)||Ni["CJK Compatibility Forms"](t)||Ni["Small Form Variants"](t)||Ni["Halfwidth and Fullwidth Forms"](t)||8734===t||8756===t||8757===t||t>=9984&&t<=10087||t>=10102&&t<=10131||65532===t||65533===t)}(t))}function Gi(t){return t>=1424&&t<=2303||Ni["Arabic Presentation Forms-A"](t)||Ni["Arabic Presentation Forms-B"](t)}function Xi(t,e){return!(!e&&Gi(t)||t>=2304&&t<=3583||t>=3840&&t<=4255||Ni.Khmer(t))}function Wi(t){for(var e=0,r=t;e<r.length;e+=1)if(Gi(r[e].charCodeAt(0)))return!0;return!1}var Ki=null,Hi="unavailable",Ji=null,Yi=function(t){t&&"string"==typeof t&&t.indexOf("NetworkError")>-1&&(Hi="error"),Ki&&Ki(t)};function Qi(){$i.fire(new St("pluginStateChange",{pluginStatus:Hi,pluginURL:Ji}))}var $i=new It,tn=function(){return Hi},en=function(){if("deferred"!==Hi||!Ji)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");Hi="loading",Qi(),Ji&&_t({url:Ji},function(t){t?Yi(t):(Hi="loaded",Qi())})},rn={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return"loaded"===Hi||null!=rn.applyArabicShaping},isLoading:function(){return"loading"===Hi},setState:function(t){Hi=t.pluginStatus,Ji=t.pluginURL},isParsed:function(){return null!=rn.applyArabicShaping&&null!=rn.processBidirectionalText&&null!=rn.processStyledBidirectionalText},getPluginURL:function(){return Ji}},nn=function(t,e){this.zoom=t,e?(this.now=e.now,this.fadeDuration=e.fadeDuration,this.zoomHistory=e.zoomHistory,this.transition=e.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Vi,this.transition={})};nn.prototype.isSupportedScript=function(t){return function(t,e){for(var r=0,i=t;r<i.length;r+=1)if(!Xi(i[r].charCodeAt(0),e))return!1;return!0}(t,rn.isLoaded())},nn.prototype.crossFadingFactor=function(){return 0===this.fadeDuration?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)},nn.prototype.getCrossfadeParameters=function(){var t=this.zoom,e=t-Math.floor(t),r=this.crossFadingFactor();return t>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:e+(1-e)*r}:{fromScale:.5,toScale:1,t:1-(1-r)*e}};var on=function(t,e){this.property=t,this.value=e,this.expression=function(t,e){if(Lr(t))return new Wr(t,e);if(jr(t)){var r=Xr(t,e);if("error"===r.result)throw new Error(r.value.map(function(t){return t.key+": "+t.message}).join(", "));return r.value}var i=t;return"string"==typeof t&&"color"===e.type&&(i=Yt.parse(t)),{kind:"constant",evaluate:function(){return i}}}(void 0===e?t.specification.default:e,t.specification)};on.prototype.isDataDriven=function(){return"source"===this.expression.kind||"composite"===this.expression.kind},on.prototype.possiblyEvaluate=function(t,e,r){return this.property.possiblyEvaluate(this,t,e,r)};var an=function(t){this.property=t,this.value=new on(t,void 0)};an.prototype.transitioned=function(t,e){return new ln(this.property,this.value,e,c({},t.transition,this.transition),t.now)},an.prototype.untransitioned=function(){return new ln(this.property,this.value,null,{},0)};var sn=function(t){this._properties=t,this._values=Object.create(t.defaultTransitionablePropertyValues)};sn.prototype.getValue=function(t){return v(this._values[t].value.value)},sn.prototype.setValue=function(t,e){this._values.hasOwnProperty(t)||(this._values[t]=new an(this._values[t].property)),this._values[t].value=new on(this._values[t].property,null===e?void 0:v(e))},sn.prototype.getTransition=function(t){return v(this._values[t].transition)},sn.prototype.setTransition=function(t,e){this._values.hasOwnProperty(t)||(this._values[t]=new an(this._values[t].property)),this._values[t].transition=v(e)||void 0},sn.prototype.serialize=function(){for(var t={},e=0,r=Object.keys(this._values);e<r.length;e+=1){var i=r[e],n=this.getValue(i);void 0!==n&&(t[i]=n);var o=this.getTransition(i);void 0!==o&&(t[i+"-transition"]=o)}return t},sn.prototype.transitioned=function(t,e){for(var r=new un(this._properties),i=0,n=Object.keys(this._values);i<n.length;i+=1){var o=n[i];r._values[o]=this._values[o].transitioned(t,e._values[o])}return r},sn.prototype.untransitioned=function(){for(var t=new un(this._properties),e=0,r=Object.keys(this._values);e<r.length;e+=1){var i=r[e];t._values[i]=this._values[i].untransitioned()}return t};var ln=function(t,e,r,i,n){this.property=t,this.value=e,this.begin=n+i.delay||0,this.end=this.begin+i.duration||0,t.specification.transition&&(i.delay||i.duration)&&(this.prior=r)};ln.prototype.possiblyEvaluate=function(t,e,r){var i=t.now||0,n=this.value.possiblyEvaluate(t,e,r),o=this.prior;if(o){if(i>this.end)return this.prior=null,n;if(this.value.isDataDriven())return this.prior=null,n;if(i<this.begin)return o.possiblyEvaluate(t,e,r);var a=(i-this.begin)/(this.end-this.begin);return this.property.interpolate(o.possiblyEvaluate(t,e,r),n,function(t){if(a<=0)return 0;if(a>=1)return 1;var e=a*a,r=e*a;return 4*(a<.5?r:3*(a-e)+r-.75)}())}return n};var un=function(t){this._properties=t,this._values=Object.create(t.defaultTransitioningPropertyValues)};un.prototype.possiblyEvaluate=function(t,e,r){for(var i=new hn(this._properties),n=0,o=Object.keys(this._values);n<o.length;n+=1){var a=o[n];i._values[a]=this._values[a].possiblyEvaluate(t,e,r)}return i},un.prototype.hasTransition=function(){for(var t=0,e=Object.keys(this._values);t<e.length;t+=1)if(this._values[e[t]].prior)return!0;return!1};var cn=function(t){this._properties=t,this._values=Object.create(t.defaultPropertyValues)};cn.prototype.getValue=function(t){return v(this._values[t].value)},cn.prototype.setValue=function(t,e){this._values[t]=new on(this._values[t].property,null===e?void 0:v(e))},cn.prototype.serialize=function(){for(var t={},e=0,r=Object.keys(this._values);e<r.length;e+=1){var i=r[e],n=this.getValue(i);void 0!==n&&(t[i]=n)}return t},cn.prototype.possiblyEvaluate=function(t,e,r){for(var i=new hn(this._properties),n=0,o=Object.keys(this._values);n<o.length;n+=1){var a=o[n];i._values[a]=this._values[a].possiblyEvaluate(t,e,r)}return i};var pn=function(t,e,r){this.property=t,this.value=e,this.parameters=r};pn.prototype.isConstant=function(){return"constant"===this.value.kind},pn.prototype.constantOr=function(t){return"constant"===this.value.kind?this.value.value:t},pn.prototype.evaluate=function(t,e,r,i){return this.property.evaluate(this.value,this.parameters,t,e,r,i)};var hn=function(t){this._properties=t,this._values=Object.create(t.defaultPossiblyEvaluatedValues)};hn.prototype.get=function(t){return this._values[t]};var fn=function(t){this.specification=t};fn.prototype.possiblyEvaluate=function(t,e){return t.expression.evaluate(e)},fn.prototype.interpolate=function(t,e,r){var i=je[this.specification.type];return i?i(t,e,r):t};var dn=function(t,e){this.specification=t,this.overrides=e};dn.prototype.possiblyEvaluate=function(t,e,r,i){return new pn(this,"constant"===t.expression.kind||"camera"===t.expression.kind?{kind:"constant",value:t.expression.evaluate(e,null,{},r,i)}:t.expression,e)},dn.prototype.interpolate=function(t,e,r){if("constant"!==t.value.kind||"constant"!==e.value.kind)return t;if(void 0===t.value.value||void 0===e.value.value)return new pn(this,{kind:"constant",value:void 0},t.parameters);var i=je[this.specification.type];return i?new pn(this,{kind:"constant",value:i(t.value.value,e.value.value,r)},t.parameters):t},dn.prototype.evaluate=function(t,e,r,i,n,o){return"constant"===t.kind?t.value:t.evaluate(e,r,i,n,o)};var mn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.possiblyEvaluate=function(t,e,r,i){if(void 0===t.value)return new pn(this,{kind:"constant",value:void 0},e);if("constant"===t.expression.kind){var n=t.expression.evaluate(e,null,{},r,i),o="resolvedImage"===t.property.specification.type&&"string"!=typeof n?n.name:n,a=this._calculate(o,o,o,e);return new pn(this,{kind:"constant",value:a},e)}if("camera"===t.expression.kind){var s=this._calculate(t.expression.evaluate({zoom:e.zoom-1}),t.expression.evaluate({zoom:e.zoom}),t.expression.evaluate({zoom:e.zoom+1}),e);return new pn(this,{kind:"constant",value:s},e)}return new pn(this,t.expression,e)},e.prototype.evaluate=function(t,e,r,i,n,o){if("source"===t.kind){var a=t.evaluate(e,r,i,n,o);return this._calculate(a,a,a,e)}return"composite"===t.kind?this._calculate(t.evaluate({zoom:Math.floor(e.zoom)-1},r,i),t.evaluate({zoom:Math.floor(e.zoom)},r,i),t.evaluate({zoom:Math.floor(e.zoom)+1},r,i),e):t.value},e.prototype._calculate=function(t,e,r,i){return i.zoom>i.zoomHistory.lastIntegerZoom?{from:t,to:e}:{from:r,to:e}},e.prototype.interpolate=function(t){return t},e}(dn),yn=function(t){this.specification=t};yn.prototype.possiblyEvaluate=function(t,e,r,i){if(void 0!==t.value){if("constant"===t.expression.kind){var n=t.expression.evaluate(e,null,{},r,i);return this._calculate(n,n,n,e)}return this._calculate(t.expression.evaluate(new nn(Math.floor(e.zoom-1),e)),t.expression.evaluate(new nn(Math.floor(e.zoom),e)),t.expression.evaluate(new nn(Math.floor(e.zoom+1),e)),e)}},yn.prototype._calculate=function(t,e,r,i){return i.zoom>i.zoomHistory.lastIntegerZoom?{from:t,to:e}:{from:r,to:e}},yn.prototype.interpolate=function(t){return t};var gn=function(t){this.specification=t};gn.prototype.possiblyEvaluate=function(t,e,r,i){return!!t.expression.evaluate(e,null,{},r,i)},gn.prototype.interpolate=function(){return!1};var _n=function(t){for(var e in this.properties=t,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[],t){var r=t[e];r.specification.overridable&&this.overridableProperties.push(e);var i=this.defaultPropertyValues[e]=new on(r,void 0),n=this.defaultTransitionablePropertyValues[e]=new an(r);this.defaultTransitioningPropertyValues[e]=n.untransitioned(),this.defaultPossiblyEvaluatedValues[e]=i.possiblyEvaluate({})}};Li("DataDrivenProperty",dn),Li("DataConstantProperty",fn),Li("CrossFadedDataDrivenProperty",mn),Li("CrossFadedProperty",yn),Li("ColorRampProperty",gn);var vn=function(t){function e(e,r){if(t.call(this),this.id=e.id,this.type=e.type,this._featureFilter={filter:function(){return!0},needGeometry:!1},"custom"!==e.type&&(this.metadata=(e=e).metadata,this.minzoom=e.minzoom,this.maxzoom=e.maxzoom,"background"!==e.type&&(this.source=e.source,this.sourceLayer=e["source-layer"],this.filter=e.filter),r.layout&&(this._unevaluatedLayout=new cn(r.layout)),r.paint)){for(var i in this._transitionablePaint=new sn(r.paint),e.paint)this.setPaintProperty(i,e.paint[i],{validate:!1});for(var n in e.layout)this.setLayoutProperty(n,e.layout[n],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new hn(r.paint)}}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},e.prototype.getLayoutProperty=function(t){return"visibility"===t?this.visibility:this._unevaluatedLayout.getValue(t)},e.prototype.setLayoutProperty=function(t,e,r){void 0===r&&(r={}),null!=e&&this._validate(Ai,"layers."+this.id+".layout."+t,t,e,r)||("visibility"!==t?this._unevaluatedLayout.setValue(t,e):this.visibility=e)},e.prototype.getPaintProperty=function(t){return y(t,"-transition")?this._transitionablePaint.getTransition(t.slice(0,-"-transition".length)):this._transitionablePaint.getValue(t)},e.prototype.setPaintProperty=function(t,e,r){if(void 0===r&&(r={}),null!=e&&this._validate(Ei,"layers."+this.id+".paint."+t,t,e,r))return!1;if(y(t,"-transition"))return this._transitionablePaint.setTransition(t.slice(0,-"-transition".length),e||void 0),!1;var i=this._transitionablePaint._values[t],n="cross-faded-data-driven"===i.property.specification["property-type"],o=i.value.isDataDriven(),a=i.value;this._transitionablePaint.setValue(t,e),this._handleSpecialPaintPropertyUpdate(t);var s=this._transitionablePaint._values[t].value;return s.isDataDriven()||o||n||this._handleOverridablePaintPropertyUpdate(t,a,s)},e.prototype._handleSpecialPaintPropertyUpdate=function(t){},e.prototype._handleOverridablePaintPropertyUpdate=function(t,e,r){return!1},e.prototype.isHidden=function(t){return!!(this.minzoom&&t<this.minzoom)||!!(this.maxzoom&&t>=this.maxzoom)||"none"===this.visibility},e.prototype.updateTransitions=function(t){this._transitioningPaint=this._transitionablePaint.transitioned(t,this._transitioningPaint)},e.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},e.prototype.recalculate=function(t,e){t.getCrossfadeParameters&&(this._crossfadeParameters=t.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(t,void 0,e)),this.paint=this._transitioningPaint.possiblyEvaluate(t,void 0,e)},e.prototype.serialize=function(){var t={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(t.layout=t.layout||{},t.layout.visibility=this.visibility),_(t,function(t,e){return!(void 0===t||"layout"===e&&!Object.keys(t).length||"paint"===e&&!Object.keys(t).length)})},e.prototype._validate=function(t,e,r,i,n){return void 0===n&&(n={}),(!n||!1!==n.validate)&&zi(this,t.call(Ti,{key:e,layerType:this.type,objectKey:r,value:i,styleSpec:Et,style:{glyphs:!0,sprite:!0}}))},e.prototype.is3D=function(){return!1},e.prototype.isTileClipped=function(){return!1},e.prototype.hasOffscreenPass=function(){return!1},e.prototype.resize=function(){},e.prototype.isStateDependent=function(){for(var t in this.paint._values){var e=this.paint.get(t);if(e instanceof pn&&Cr(e.property.specification)&&("source"===e.value.kind||"composite"===e.value.kind)&&e.value.isStateDependent)return!0}return!1},e}(It),xn={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},bn=function(t,e){this._structArray=t,this._pos1=e*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8},wn=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};function Sn(t,e){void 0===e&&(e=1);var r=0,i=0;return{members:t.map(function(t){var n=xn[t.type].BYTES_PER_ELEMENT,o=r=Tn(r,Math.max(e,n)),a=t.components||1;return i=Math.max(i,n),r+=n*a,{name:t.name,type:t.type,components:a,offset:o}}),size:Tn(r,Math.max(i,e)),alignment:e}}function Tn(t,e){return Math.ceil(t/e)*e}wn.serialize=function(t,e){return t._trim(),e&&(t.isTransferred=!0,e.push(t.arrayBuffer)),{length:t.length,arrayBuffer:t.arrayBuffer}},wn.deserialize=function(t){var e=Object.create(this.prototype);return e.arrayBuffer=t.arrayBuffer,e.length=t.length,e.capacity=t.arrayBuffer.byteLength/e.bytesPerElement,e._refreshViews(),e},wn.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},wn.prototype.clear=function(){this.length=0},wn.prototype.resize=function(t){this.reserve(t),this.length=t},wn.prototype.reserve=function(t){if(t>this.capacity){this.capacity=Math.max(t,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var e=this.uint8;this._refreshViews(),e&&this.uint8.set(e)}},wn.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};var In=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e){var r=this.length;return this.resize(r+1),this.emplace(r,t,e)},e.prototype.emplace=function(t,e,r){var i=2*t;return this.int16[i+0]=e,this.int16[i+1]=r,t},e}(wn);In.prototype.bytesPerElement=4,Li("StructArrayLayout2i4",In);var En=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,i){var n=this.length;return this.resize(n+1),this.emplace(n,t,e,r,i)},e.prototype.emplace=function(t,e,r,i,n){var o=4*t;return this.int16[o+0]=e,this.int16[o+1]=r,this.int16[o+2]=i,this.int16[o+3]=n,t},e}(wn);En.prototype.bytesPerElement=8,Li("StructArrayLayout4i8",En);var An=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,i,n,o){var a=this.length;return this.resize(a+1),this.emplace(a,t,e,r,i,n,o)},e.prototype.emplace=function(t,e,r,i,n,o,a){var s=6*t;return this.int16[s+0]=e,this.int16[s+1]=r,this.int16[s+2]=i,this.int16[s+3]=n,this.int16[s+4]=o,this.int16[s+5]=a,t},e}(wn);An.prototype.bytesPerElement=12,Li("StructArrayLayout2i4i12",An);var zn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,i,n,o){var a=this.length;return this.resize(a+1),this.emplace(a,t,e,r,i,n,o)},e.prototype.emplace=function(t,e,r,i,n,o,a){var s=4*t,l=8*t;return this.int16[s+0]=e,this.int16[s+1]=r,this.uint8[l+4]=i,this.uint8[l+5]=n,this.uint8[l+6]=o,this.uint8[l+7]=a,t},e}(wn);zn.prototype.bytesPerElement=8,Li("StructArrayLayout2i4ub8",zn);var Pn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,i,n,o,a,s,l,u){var c=this.length;return this.resize(c+1),this.emplace(c,t,e,r,i,n,o,a,s,l,u)},e.prototype.emplace=function(t,e,r,i,n,o,a,s,l,u,c){var p=9*t,h=18*t;return this.uint16[p+0]=e,this.uint16[p+1]=r,this.uint16[p+2]=i,this.uint16[p+3]=n,this.uint16[p+4]=o,this.uint16[p+5]=a,this.uint16[p+6]=s,this.uint16[p+7]=l,this.uint8[h+16]=u,this.uint8[h+17]=c,t},e}(wn);Pn.prototype.bytesPerElement=18,Li("StructArrayLayout8ui2ub18",Pn);var Cn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,i,n,o,a,s,l,u,c,p){var h=this.length;return this.resize(h+1),this.emplace(h,t,e,r,i,n,o,a,s,l,u,c,p)},e.prototype.emplace=function(t,e,r,i,n,o,a,s,l,u,c,p,h){var f=12*t;return this.int16[f+0]=e,this.int16[f+1]=r,this.int16[f+2]=i,this.int16[f+3]=n,this.uint16[f+4]=o,this.uint16[f+5]=a,this.uint16[f+6]=s,this.uint16[f+7]=l,this.int16[f+8]=u,this.int16[f+9]=c,this.int16[f+10]=p,this.int16[f+11]=h,t},e}(wn);Cn.prototype.bytesPerElement=24,Li("StructArrayLayout4i4ui4i24",Cn);var kn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r){var i=this.length;return this.resize(i+1),this.emplace(i,t,e,r)},e.prototype.emplace=function(t,e,r,i){var n=3*t;return this.float32[n+0]=e,this.float32[n+1]=r,this.float32[n+2]=i,t},e}(wn);kn.prototype.bytesPerElement=12,Li("StructArrayLayout3f12",kn);var Mn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t){var e=this.length;return this.resize(e+1),this.emplace(e,t)},e.prototype.emplace=function(t,e){return this.uint32[1*t+0]=e,t},e}(wn);Mn.prototype.bytesPerElement=4,Li("StructArrayLayout1ul4",Mn);var Dn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,i,n,o,a,s,l){var u=this.length;return this.resize(u+1),this.emplace(u,t,e,r,i,n,o,a,s,l)},e.prototype.emplace=function(t,e,r,i,n,o,a,s,l,u){var c=10*t,p=5*t;return this.int16[c+0]=e,this.int16[c+1]=r,this.int16[c+2]=i,this.int16[c+3]=n,this.int16[c+4]=o,this.int16[c+5]=a,this.uint32[p+3]=s,this.uint16[c+8]=l,this.uint16[c+9]=u,t},e}(wn);Dn.prototype.bytesPerElement=20,Li("StructArrayLayout6i1ul2ui20",Dn);var Ln=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,i,n,o){var a=this.length;return this.resize(a+1),this.emplace(a,t,e,r,i,n,o)},e.prototype.emplace=function(t,e,r,i,n,o,a){var s=6*t;return this.int16[s+0]=e,this.int16[s+1]=r,this.int16[s+2]=i,this.int16[s+3]=n,this.int16[s+4]=o,this.int16[s+5]=a,t},e}(wn);Ln.prototype.bytesPerElement=12,Li("StructArrayLayout2i2i2i12",Ln);var Bn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,i,n){var o=this.length;return this.resize(o+1),this.emplace(o,t,e,r,i,n)},e.prototype.emplace=function(t,e,r,i,n,o){var a=4*t,s=8*t;return this.float32[a+0]=e,this.float32[a+1]=r,this.float32[a+2]=i,this.int16[s+6]=n,this.int16[s+7]=o,t},e}(wn);Bn.prototype.bytesPerElement=16,Li("StructArrayLayout2f1f2i16",Bn);var Rn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,i){var n=this.length;return this.resize(n+1),this.emplace(n,t,e,r,i)},e.prototype.emplace=function(t,e,r,i,n){var o=12*t,a=3*t;return this.uint8[o+0]=e,this.uint8[o+1]=r,this.float32[a+1]=i,this.float32[a+2]=n,t},e}(wn);Rn.prototype.bytesPerElement=12,Li("StructArrayLayout2ub2f12",Rn);var Fn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r){var i=this.length;return this.resize(i+1),this.emplace(i,t,e,r)},e.prototype.emplace=function(t,e,r,i){var n=3*t;return this.uint16[n+0]=e,this.uint16[n+1]=r,this.uint16[n+2]=i,t},e}(wn);Fn.prototype.bytesPerElement=6,Li("StructArrayLayout3ui6",Fn);var On=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,i,n,o,a,s,l,u,c,p,h,f,d,m,y){var g=this.length;return this.resize(g+1),this.emplace(g,t,e,r,i,n,o,a,s,l,u,c,p,h,f,d,m,y)},e.prototype.emplace=function(t,e,r,i,n,o,a,s,l,u,c,p,h,f,d,m,y,g){var _=24*t,v=12*t,x=48*t;return this.int16[_+0]=e,this.int16[_+1]=r,this.uint16[_+2]=i,this.uint16[_+3]=n,this.uint32[v+2]=o,this.uint32[v+3]=a,this.uint32[v+4]=s,this.uint16[_+10]=l,this.uint16[_+11]=u,this.uint16[_+12]=c,this.float32[v+7]=p,this.float32[v+8]=h,this.uint8[x+36]=f,this.uint8[x+37]=d,this.uint8[x+38]=m,this.uint32[v+10]=y,this.int16[_+22]=g,t},e}(wn);On.prototype.bytesPerElement=48,Li("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",On);var Un=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,i,n,o,a,s,l,u,c,p,h,f,d,m,y,g,_,v,x,b,w,S,T,I,E,A){var z=this.length;return this.resize(z+1),this.emplace(z,t,e,r,i,n,o,a,s,l,u,c,p,h,f,d,m,y,g,_,v,x,b,w,S,T,I,E,A)},e.prototype.emplace=function(t,e,r,i,n,o,a,s,l,u,c,p,h,f,d,m,y,g,_,v,x,b,w,S,T,I,E,A,z){var P=34*t,C=17*t;return this.int16[P+0]=e,this.int16[P+1]=r,this.int16[P+2]=i,this.int16[P+3]=n,this.int16[P+4]=o,this.int16[P+5]=a,this.int16[P+6]=s,this.int16[P+7]=l,this.uint16[P+8]=u,this.uint16[P+9]=c,this.uint16[P+10]=p,this.uint16[P+11]=h,this.uint16[P+12]=f,this.uint16[P+13]=d,this.uint16[P+14]=m,this.uint16[P+15]=y,this.uint16[P+16]=g,this.uint16[P+17]=_,this.uint16[P+18]=v,this.uint16[P+19]=x,this.uint16[P+20]=b,this.uint16[P+21]=w,this.uint16[P+22]=S,this.uint32[C+12]=T,this.float32[C+13]=I,this.float32[C+14]=E,this.float32[C+15]=A,this.float32[C+16]=z,t},e}(wn);Un.prototype.bytesPerElement=68,Li("StructArrayLayout8i15ui1ul4f68",Un);var Vn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t){var e=this.length;return this.resize(e+1),this.emplace(e,t)},e.prototype.emplace=function(t,e){return this.float32[1*t+0]=e,t},e}(wn);Vn.prototype.bytesPerElement=4,Li("StructArrayLayout1f4",Vn);var Nn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r){var i=this.length;return this.resize(i+1),this.emplace(i,t,e,r)},e.prototype.emplace=function(t,e,r,i){var n=3*t;return this.int16[n+0]=e,this.int16[n+1]=r,this.int16[n+2]=i,t},e}(wn);Nn.prototype.bytesPerElement=6,Li("StructArrayLayout3i6",Nn);var jn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r){var i=this.length;return this.resize(i+1),this.emplace(i,t,e,r)},e.prototype.emplace=function(t,e,r,i){var n=4*t;return this.uint32[2*t+0]=e,this.uint16[n+2]=r,this.uint16[n+3]=i,t},e}(wn);jn.prototype.bytesPerElement=8,Li("StructArrayLayout1ul2ui8",jn);var qn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e){var r=this.length;return this.resize(r+1),this.emplace(r,t,e)},e.prototype.emplace=function(t,e,r){var i=2*t;return this.uint16[i+0]=e,this.uint16[i+1]=r,t},e}(wn);qn.prototype.bytesPerElement=4,Li("StructArrayLayout2ui4",qn);var Zn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t){var e=this.length;return this.resize(e+1),this.emplace(e,t)},e.prototype.emplace=function(t,e){return this.uint16[1*t+0]=e,t},e}(wn);Zn.prototype.bytesPerElement=2,Li("StructArrayLayout1ui2",Zn);var Gn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e){var r=this.length;return this.resize(r+1),this.emplace(r,t,e)},e.prototype.emplace=function(t,e,r){var i=2*t;return this.float32[i+0]=e,this.float32[i+1]=r,t},e}(wn);Gn.prototype.bytesPerElement=8,Li("StructArrayLayout2f8",Gn);var Xn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},e.prototype.emplaceBack=function(t,e,r,i){var n=this.length;return this.resize(n+1),this.emplace(n,t,e,r,i)},e.prototype.emplace=function(t,e,r,i,n){var o=4*t;return this.float32[o+0]=e,this.float32[o+1]=r,this.float32[o+2]=i,this.float32[o+3]=n,t},e}(wn);Xn.prototype.bytesPerElement=16,Li("StructArrayLayout4f16",Xn);var Wn=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var r={anchorPointX:{configurable:!0},anchorPointY:{configurable:!0},x1:{configurable:!0},y1:{configurable:!0},x2:{configurable:!0},y2:{configurable:!0},featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0},anchorPoint:{configurable:!0}};return r.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},r.x1.get=function(){return this._structArray.int16[this._pos2+2]},r.y1.get=function(){return this._structArray.int16[this._pos2+3]},r.x2.get=function(){return this._structArray.int16[this._pos2+4]},r.y2.get=function(){return this._structArray.int16[this._pos2+5]},r.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},r.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},r.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},r.anchorPoint.get=function(){return new n(this.anchorPointX,this.anchorPointY)},Object.defineProperties(e.prototype,r),e}(bn);Wn.prototype.size=20;var Kn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.get=function(t){return new Wn(this,t)},e}(Dn);Li("CollisionBoxArray",Kn);var Hn=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var r={anchorX:{configurable:!0},anchorY:{configurable:!0},glyphStartIndex:{configurable:!0},numGlyphs:{configurable:!0},vertexStartIndex:{configurable:!0},lineStartIndex:{configurable:!0},lineLength:{configurable:!0},segment:{configurable:!0},lowerSize:{configurable:!0},upperSize:{configurable:!0},lineOffsetX:{configurable:!0},lineOffsetY:{configurable:!0},writingMode:{configurable:!0},placedOrientation:{configurable:!0},hidden:{configurable:!0},crossTileID:{configurable:!0},associatedIconIndex:{configurable:!0}};return r.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},r.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},r.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},r.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},r.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},r.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},r.segment.get=function(){return this._structArray.uint16[this._pos2+10]},r.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},r.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},r.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},r.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},r.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},r.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},r.placedOrientation.set=function(t){this._structArray.uint8[this._pos1+37]=t},r.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},r.hidden.set=function(t){this._structArray.uint8[this._pos1+38]=t},r.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},r.crossTileID.set=function(t){this._structArray.uint32[this._pos4+10]=t},r.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},Object.defineProperties(e.prototype,r),e}(bn);Hn.prototype.size=48;var Jn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.get=function(t){return new Hn(this,t)},e}(On);Li("PlacedSymbolArray",Jn);var Yn=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var r={anchorX:{configurable:!0},anchorY:{configurable:!0},rightJustifiedTextSymbolIndex:{configurable:!0},centerJustifiedTextSymbolIndex:{configurable:!0},leftJustifiedTextSymbolIndex:{configurable:!0},verticalPlacedTextSymbolIndex:{configurable:!0},placedIconSymbolIndex:{configurable:!0},verticalPlacedIconSymbolIndex:{configurable:!0},key:{configurable:!0},textBoxStartIndex:{configurable:!0},textBoxEndIndex:{configurable:!0},verticalTextBoxStartIndex:{configurable:!0},verticalTextBoxEndIndex:{configurable:!0},iconBoxStartIndex:{configurable:!0},iconBoxEndIndex:{configurable:!0},verticalIconBoxStartIndex:{configurable:!0},verticalIconBoxEndIndex:{configurable:!0},featureIndex:{configurable:!0},numHorizontalGlyphVertices:{configurable:!0},numVerticalGlyphVertices:{configurable:!0},numIconVertices:{configurable:!0},numVerticalIconVertices:{configurable:!0},useRuntimeCollisionCircles:{configurable:!0},crossTileID:{configurable:!0},textBoxScale:{configurable:!0},textOffset0:{configurable:!0},textOffset1:{configurable:!0},collisionCircleDiameter:{configurable:!0}};return r.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},r.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},r.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},r.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},r.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},r.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},r.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},r.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},r.key.get=function(){return this._structArray.uint16[this._pos2+8]},r.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},r.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},r.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},r.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},r.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},r.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},r.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},r.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},r.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},r.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},r.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},r.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},r.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},r.useRuntimeCollisionCircles.get=function(){return this._structArray.uint16[this._pos2+22]},r.crossTileID.get=function(){return this._structArray.uint32[this._pos4+12]},r.crossTileID.set=function(t){this._structArray.uint32[this._pos4+12]=t},r.textBoxScale.get=function(){return this._structArray.float32[this._pos4+13]},r.textOffset0.get=function(){return this._structArray.float32[this._pos4+14]},r.textOffset1.get=function(){return this._structArray.float32[this._pos4+15]},r.collisionCircleDiameter.get=function(){return this._structArray.float32[this._pos4+16]},Object.defineProperties(e.prototype,r),e}(bn);Yn.prototype.size=68;var Qn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.get=function(t){return new Yn(this,t)},e}(Un);Li("SymbolInstanceArray",Qn);var $n=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getoffsetX=function(t){return this.float32[1*t+0]},e}(Vn);Li("GlyphOffsetArray",$n);var to=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getx=function(t){return this.int16[3*t+0]},e.prototype.gety=function(t){return this.int16[3*t+1]},e.prototype.gettileUnitDistanceFromAnchor=function(t){return this.int16[3*t+2]},e}(Nn);Li("SymbolLineVertexArray",to);var eo=function(t){function e(){t.apply(this,arguments)}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var r={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return r.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},r.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},r.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},Object.defineProperties(e.prototype,r),e}(bn);eo.prototype.size=8;var ro=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.get=function(t){return new eo(this,t)},e}(jn);Li("FeatureIndexArray",ro);var io=Sn([{name:"a_pos",components:2,type:"Int16"}],4).members,no=function(t){void 0===t&&(t=[]),this.segments=t};function oo(t,e){return 256*(t=l(Math.floor(t),0,255))+l(Math.floor(e),0,255)}no.prototype.prepareSegment=function(t,e,r,i){var n=this.segments[this.segments.length-1];return t>no.MAX_VERTEX_ARRAY_LENGTH&&b("Max vertices per segment is "+no.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+t),(!n||n.vertexLength+t>no.MAX_VERTEX_ARRAY_LENGTH||n.sortKey!==i)&&(n={vertexOffset:e.length,primitiveOffset:r.length,vertexLength:0,primitiveLength:0},void 0!==i&&(n.sortKey=i),this.segments.push(n)),n},no.prototype.get=function(){return this.segments},no.prototype.destroy=function(){for(var t=0,e=this.segments;t<e.length;t+=1){var r=e[t];for(var i in r.vaos)r.vaos[i].destroy()}},no.simpleSegment=function(t,e,r,i){return new no([{vertexOffset:t,primitiveOffset:e,vertexLength:r,primitiveLength:i,vaos:{},sortKey:0}])},no.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,Li("SegmentVector",no);var ao=Sn([{name:"a_pattern_from",components:4,type:"Uint16"},{name:"a_pattern_to",components:4,type:"Uint16"},{name:"a_pixel_ratio_from",components:1,type:"Uint8"},{name:"a_pixel_ratio_to",components:1,type:"Uint8"}]),so=e(function(t){t.exports=function(t,e){var r,i,n,o,a,s,l,u;for(i=t.length-(r=3&t.length),n=e,a=3432918353,s=461845907,u=0;u<i;)l=255&t.charCodeAt(u)|(255&t.charCodeAt(++u))<<8|(255&t.charCodeAt(++u))<<16|(255&t.charCodeAt(++u))<<24,++u,n=27492+(65535&(o=5*(65535&(n=(n^=l=(65535&(l=(l=(65535&l)*a+(((l>>>16)*a&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295)<<13|n>>>19))+((5*(n>>>16)&65535)<<16)&4294967295))+((58964+(o>>>16)&65535)<<16);switch(l=0,r){case 3:l^=(255&t.charCodeAt(u+2))<<16;case 2:l^=(255&t.charCodeAt(u+1))<<8;case 1:n^=l=(65535&(l=(l=(65535&(l^=255&t.charCodeAt(u)))*a+(((l>>>16)*a&65535)<<16)&4294967295)<<15|l>>>17))*s+(((l>>>16)*s&65535)<<16)&4294967295}return n^=t.length,n=2246822507*(65535&(n^=n>>>16))+((2246822507*(n>>>16)&65535)<<16)&4294967295,n=3266489909*(65535&(n^=n>>>13))+((3266489909*(n>>>16)&65535)<<16)&4294967295,(n^=n>>>16)>>>0}}),lo=e(function(t){t.exports=function(t,e){for(var r,i=t.length,n=e^i,o=0;i>=4;)r=1540483477*(65535&(r=255&t.charCodeAt(o)|(255&t.charCodeAt(++o))<<8|(255&t.charCodeAt(++o))<<16|(255&t.charCodeAt(++o))<<24))+((1540483477*(r>>>16)&65535)<<16),n=1540483477*(65535&n)+((1540483477*(n>>>16)&65535)<<16)^(r=1540483477*(65535&(r^=r>>>24))+((1540483477*(r>>>16)&65535)<<16)),i-=4,++o;switch(i){case 3:n^=(255&t.charCodeAt(o+2))<<16;case 2:n^=(255&t.charCodeAt(o+1))<<8;case 1:n=1540483477*(65535&(n^=255&t.charCodeAt(o)))+((1540483477*(n>>>16)&65535)<<16)}return n=1540483477*(65535&(n^=n>>>13))+((1540483477*(n>>>16)&65535)<<16),(n^=n>>>15)>>>0}}),uo=so,co=lo;uo.murmur3=so,uo.murmur2=co;var po=function(){this.ids=[],this.positions=[],this.indexed=!1};po.prototype.add=function(t,e,r,i){this.ids.push(fo(t)),this.positions.push(e,r,i)},po.prototype.getPositions=function(t){for(var e=fo(t),r=0,i=this.ids.length-1;r<i;){var n=r+i>>1;this.ids[n]>=e?i=n:r=n+1}for(var o=[];this.ids[r]===e;)o.push({index:this.positions[3*r],start:this.positions[3*r+1],end:this.positions[3*r+2]}),r++;return o},po.serialize=function(t,e){var r=new Float64Array(t.ids),i=new Uint32Array(t.positions);return function t(e,r,i,n){for(;i<n;){for(var o=e[i+n>>1],a=i-1,s=n+1;;){do{a++}while(e[a]<o);do{s--}while(e[s]>o);if(a>=s)break;mo(e,a,s),mo(r,3*a,3*s),mo(r,3*a+1,3*s+1),mo(r,3*a+2,3*s+2)}s-i<n-s?(t(e,r,i,s),i=s+1):(t(e,r,s+1,n),n=s)}}(r,i,0,r.length-1),e&&e.push(r.buffer,i.buffer),{ids:r,positions:i}},po.deserialize=function(t){var e=new po;return e.ids=t.ids,e.positions=t.positions,e.indexed=!0,e};var ho=Math.pow(2,53)-1;function fo(t){var e=+t;return!isNaN(e)&&e<=ho?e:uo(String(t))}function mo(t,e,r){var i=t[e];t[e]=t[r],t[r]=i}Li("FeaturePositionMap",po);var yo=function(t,e){this.gl=t.gl,this.location=e},go=function(t){function e(e,r){t.call(this,e,r),this.current=0}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.set=function(t){this.current!==t&&(this.current=t,this.gl.uniform1i(this.location,t))},e}(yo),_o=function(t){function e(e,r){t.call(this,e,r),this.current=0}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.set=function(t){this.current!==t&&(this.current=t,this.gl.uniform1f(this.location,t))},e}(yo),vo=function(t){function e(e,r){t.call(this,e,r),this.current=[0,0]}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.set=function(t){t[0]===this.current[0]&&t[1]===this.current[1]||(this.current=t,this.gl.uniform2f(this.location,t[0],t[1]))},e}(yo),xo=function(t){function e(e,r){t.call(this,e,r),this.current=[0,0,0]}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.set=function(t){t[0]===this.current[0]&&t[1]===this.current[1]&&t[2]===this.current[2]||(this.current=t,this.gl.uniform3f(this.location,t[0],t[1],t[2]))},e}(yo),bo=function(t){function e(e,r){t.call(this,e,r),this.current=[0,0,0,0]}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.set=function(t){t[0]===this.current[0]&&t[1]===this.current[1]&&t[2]===this.current[2]&&t[3]===this.current[3]||(this.current=t,this.gl.uniform4f(this.location,t[0],t[1],t[2],t[3]))},e}(yo),wo=function(t){function e(e,r){t.call(this,e,r),this.current=Yt.transparent}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.set=function(t){t.r===this.current.r&&t.g===this.current.g&&t.b===this.current.b&&t.a===this.current.a||(this.current=t,this.gl.uniform4f(this.location,t.r,t.g,t.b,t.a))},e}(yo),So=new Float32Array(16),To=function(t){function e(e,r){t.call(this,e,r),this.current=So}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.set=function(t){if(t[12]!==this.current[12]||t[0]!==this.current[0])return this.current=t,void this.gl.uniformMatrix4fv(this.location,!1,t);for(var e=1;e<16;e++)if(t[e]!==this.current[e]){this.current=t,this.gl.uniformMatrix4fv(this.location,!1,t);break}},e}(yo);function Io(t){return[oo(255*t.r,255*t.g),oo(255*t.b,255*t.a)]}var Eo=function(t,e,r){this.value=t,this.uniformNames=e.map(function(t){return"u_"+t}),this.type=r};Eo.prototype.setUniform=function(t,e,r){t.set(r.constantOr(this.value))},Eo.prototype.getBinding=function(t,e,r){return"color"===this.type?new wo(t,e):new _o(t,e)};var Ao=function(t,e){this.uniformNames=e.map(function(t){return"u_"+t}),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1};Ao.prototype.setConstantPatternPositions=function(t,e){this.pixelRatioFrom=e.pixelRatio,this.pixelRatioTo=t.pixelRatio,this.patternFrom=e.tlbr,this.patternTo=t.tlbr},Ao.prototype.setUniform=function(t,e,r,i){var n="u_pattern_to"===i?this.patternTo:"u_pattern_from"===i?this.patternFrom:"u_pixel_ratio_to"===i?this.pixelRatioTo:"u_pixel_ratio_from"===i?this.pixelRatioFrom:null;n&&t.set(n)},Ao.prototype.getBinding=function(t,e,r){return"u_pattern"===r.substr(0,9)?new bo(t,e):new _o(t,e)};var zo=function(t,e,r,i){this.expression=t,this.type=r,this.maxValue=0,this.paintVertexAttributes=e.map(function(t){return{name:"a_"+t,type:"Float32",components:"color"===r?2:1,offset:0}}),this.paintVertexArray=new i};zo.prototype.populatePaintArray=function(t,e,r,i,n){var o=this.paintVertexArray.length,a=this.expression.evaluate(new nn(0),e,{},i,[],n);this.paintVertexArray.resize(t),this._setPaintValue(o,t,a)},zo.prototype.updatePaintArray=function(t,e,r,i){var n=this.expression.evaluate({zoom:0},r,i);this._setPaintValue(t,e,n)},zo.prototype._setPaintValue=function(t,e,r){if("color"===this.type)for(var i=Io(r),n=t;n<e;n++)this.paintVertexArray.emplace(n,i[0],i[1]);else{for(var o=t;o<e;o++)this.paintVertexArray.emplace(o,r);this.maxValue=Math.max(this.maxValue,Math.abs(r))}},zo.prototype.upload=function(t){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=t.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))},zo.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()};var Po=function(t,e,r,i,n,o){this.expression=t,this.uniformNames=e.map(function(t){return"u_"+t+"_t"}),this.type=r,this.useIntegerZoom=i,this.zoom=n,this.maxValue=0,this.paintVertexAttributes=e.map(function(t){return{name:"a_"+t,type:"Float32",components:"color"===r?4:2,offset:0}}),this.paintVertexArray=new o};Po.prototype.populatePaintArray=function(t,e,r,i,n){var o=this.expression.evaluate(new nn(this.zoom),e,{},i,[],n),a=this.expression.evaluate(new nn(this.zoom+1),e,{},i,[],n),s=this.paintVertexArray.length;this.paintVertexArray.resize(t),this._setPaintValue(s,t,o,a)},Po.prototype.updatePaintArray=function(t,e,r,i){var n=this.expression.evaluate({zoom:this.zoom},r,i),o=this.expression.evaluate({zoom:this.zoom+1},r,i);this._setPaintValue(t,e,n,o)},Po.prototype._setPaintValue=function(t,e,r,i){if("color"===this.type)for(var n=Io(r),o=Io(i),a=t;a<e;a++)this.paintVertexArray.emplace(a,n[0],n[1],o[0],o[1]);else{for(var s=t;s<e;s++)this.paintVertexArray.emplace(s,r,i);this.maxValue=Math.max(this.maxValue,Math.abs(r),Math.abs(i))}},Po.prototype.upload=function(t){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=t.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))},Po.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()},Po.prototype.setUniform=function(t,e){var r=this.useIntegerZoom?Math.floor(e.zoom):e.zoom,i=l(this.expression.interpolationFactor(r,this.zoom,this.zoom+1),0,1);t.set(i)},Po.prototype.getBinding=function(t,e,r){return new _o(t,e)};var Co=function(t,e,r,i,n,o){this.expression=t,this.type=e,this.useIntegerZoom=r,this.zoom=i,this.layerId=o,this.zoomInPaintVertexArray=new n,this.zoomOutPaintVertexArray=new n};Co.prototype.populatePaintArray=function(t,e,r){var i=this.zoomInPaintVertexArray.length;this.zoomInPaintVertexArray.resize(t),this.zoomOutPaintVertexArray.resize(t),this._setPaintValues(i,t,e.patterns&&e.patterns[this.layerId],r)},Co.prototype.updatePaintArray=function(t,e,r,i,n){this._setPaintValues(t,e,r.patterns&&r.patterns[this.layerId],n)},Co.prototype._setPaintValues=function(t,e,r,i){if(i&&r){var n=i[r.min],o=i[r.mid],a=i[r.max];if(n&&o&&a)for(var s=t;s<e;s++)this.zoomInPaintVertexArray.emplace(s,o.tl[0],o.tl[1],o.br[0],o.br[1],n.tl[0],n.tl[1],n.br[0],n.br[1],o.pixelRatio,n.pixelRatio),this.zoomOutPaintVertexArray.emplace(s,o.tl[0],o.tl[1],o.br[0],o.br[1],a.tl[0],a.tl[1],a.br[0],a.br[1],o.pixelRatio,a.pixelRatio)}},Co.prototype.upload=function(t){this.zoomInPaintVertexArray&&this.zoomInPaintVertexArray.arrayBuffer&&this.zoomOutPaintVertexArray&&this.zoomOutPaintVertexArray.arrayBuffer&&(this.zoomInPaintVertexBuffer=t.createVertexBuffer(this.zoomInPaintVertexArray,ao.members,this.expression.isStateDependent),this.zoomOutPaintVertexBuffer=t.createVertexBuffer(this.zoomOutPaintVertexArray,ao.members,this.expression.isStateDependent))},Co.prototype.destroy=function(){this.zoomOutPaintVertexBuffer&&this.zoomOutPaintVertexBuffer.destroy(),this.zoomInPaintVertexBuffer&&this.zoomInPaintVertexBuffer.destroy()};var ko=function(t,e,r,i){this.binders={},this.layoutAttributes=i,this._buffers=[];var n=[];for(var o in t.paint._values)if(r(o)){var a=t.paint.get(o);if(a instanceof pn&&Cr(a.property.specification)){var s=Do(o,t.type),l=a.value,u=a.property.specification.type,c=a.property.useIntegerZoom,p=a.property.specification["property-type"],h="cross-faded"===p||"cross-faded-data-driven"===p;if("constant"===l.kind)this.binders[o]=h?new Ao(l.value,s):new Eo(l.value,s,u),n.push("/u_"+o);else if("source"===l.kind||h){var f=Lo(o,u,"source");this.binders[o]=h?new Co(l,u,c,e,f,t.id):new zo(l,s,u,f),n.push("/a_"+o)}else{var d=Lo(o,u,"composite");this.binders[o]=new Po(l,s,u,c,e,d),n.push("/z_"+o)}}}this.cacheKey=n.sort().join("")};ko.prototype.getMaxValue=function(t){var e=this.binders[t];return e instanceof zo||e instanceof Po?e.maxValue:0},ko.prototype.populatePaintArrays=function(t,e,r,i,n){for(var o in this.binders){var a=this.binders[o];(a instanceof zo||a instanceof Po||a instanceof Co)&&a.populatePaintArray(t,e,r,i,n)}},ko.prototype.setConstantPatternPositions=function(t,e){for(var r in this.binders){var i=this.binders[r];i instanceof Ao&&i.setConstantPatternPositions(t,e)}},ko.prototype.updatePaintArrays=function(t,e,r,i,n){var o=!1;for(var a in t)for(var s=0,l=e.getPositions(a);s<l.length;s+=1){var u=l[s],c=r.feature(u.index);for(var p in this.binders){var h=this.binders[p];if((h instanceof zo||h instanceof Po||h instanceof Co)&&!0===h.expression.isStateDependent){var f=i.paint.get(p);h.expression=f.value,h.updatePaintArray(u.start,u.end,c,t[a],n),o=!0}}}return o},ko.prototype.defines=function(){var t=[];for(var e in this.binders){var r=this.binders[e];(r instanceof Eo||r instanceof Ao)&&t.push.apply(t,r.uniformNames.map(function(t){return"#define HAS_UNIFORM_"+t}))}return t},ko.prototype.getPaintVertexBuffers=function(){return this._buffers},ko.prototype.getUniforms=function(t,e){var r=[];for(var i in this.binders){var n=this.binders[i];if(n instanceof Eo||n instanceof Ao||n instanceof Po)for(var o=0,a=n.uniformNames;o<a.length;o+=1){var s=a[o];if(e[s]){var l=n.getBinding(t,e[s],s);r.push({name:s,property:i,binding:l})}}}return r},ko.prototype.setUniforms=function(t,e,r,i){for(var n=0,o=e;n<o.length;n+=1){var a=o[n],s=a.name,l=a.property;this.binders[l].setUniform(a.binding,i,r.get(l),s)}},ko.prototype.updatePaintBuffers=function(t){for(var e in this._buffers=[],this.binders){var r=this.binders[e];if(t&&r instanceof Co){var i=2===t.fromScale?r.zoomInPaintVertexBuffer:r.zoomOutPaintVertexBuffer;i&&this._buffers.push(i)}else(r instanceof zo||r instanceof Po)&&r.paintVertexBuffer&&this._buffers.push(r.paintVertexBuffer)}},ko.prototype.upload=function(t){for(var e in this.binders){var r=this.binders[e];(r instanceof zo||r instanceof Po||r instanceof Co)&&r.upload(t)}this.updatePaintBuffers()},ko.prototype.destroy=function(){for(var t in this.binders){var e=this.binders[t];(e instanceof zo||e instanceof Po||e instanceof Co)&&e.destroy()}};var Mo=function(t,e,r,i){void 0===i&&(i=function(){return!0}),this.programConfigurations={};for(var n=0,o=e;n<o.length;n+=1){var a=o[n];this.programConfigurations[a.id]=new ko(a,r,i,t)}this.needsUpload=!1,this._featureMap=new po,this._bufferOffset=0};function Do(t,e){return{"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"icon-halo-width":["halo_width"],"line-gap-width":["gapwidth"],"line-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-extrusion-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"]}[t]||[t.replace(e+"-","").replace(/-/g,"_")]}function Lo(t,e,r){var i={color:{source:Gn,composite:Xn},number:{source:Vn,composite:Gn}},n=function(t){return{"line-pattern":{source:Pn,composite:Pn},"fill-pattern":{source:Pn,composite:Pn},"fill-extrusion-pattern":{source:Pn,composite:Pn}}[t]}(t);return n&&n[r]||i[e][r]}Mo.prototype.populatePaintArrays=function(t,e,r,i,n,o){for(var a in this.programConfigurations)this.programConfigurations[a].populatePaintArrays(t,e,i,n,o);void 0!==e.id&&this._featureMap.add(e.id,r,this._bufferOffset,t),this._bufferOffset=t,this.needsUpload=!0},Mo.prototype.updatePaintArrays=function(t,e,r,i){for(var n=0,o=r;n<o.length;n+=1){var a=o[n];this.needsUpload=this.programConfigurations[a.id].updatePaintArrays(t,this._featureMap,e,a,i)||this.needsUpload}},Mo.prototype.get=function(t){return this.programConfigurations[t]},Mo.prototype.upload=function(t){if(this.needsUpload){for(var e in this.programConfigurations)this.programConfigurations[e].upload(t);this.needsUpload=!1}},Mo.prototype.destroy=function(){for(var t in this.programConfigurations)this.programConfigurations[t].destroy()},Li("ConstantBinder",Eo),Li("CrossFadedConstantBinder",Ao),Li("SourceExpressionBinder",zo),Li("CrossFadedCompositeBinder",Co),Li("CompositeExpressionBinder",Po),Li("ProgramConfiguration",ko,{omit:["_buffers"]}),Li("ProgramConfigurationSet",Mo);var Bo={min:-1*Math.pow(2,14),max:Math.pow(2,14)-1};function Ro(t){for(var e=8192/t.extent,r=t.loadGeometry(),i=0;i<r.length;i++)for(var n=r[i],o=0;o<n.length;o++){var a=n[o];a.x=Math.round(a.x*e),a.y=Math.round(a.y*e),(a.x<Bo.min||a.x>Bo.max||a.y<Bo.min||a.y>Bo.max)&&(b("Geometry exceeds allowed extent, reduce your vector tile buffer size"),a.x=l(a.x,Bo.min,Bo.max),a.y=l(a.y,Bo.min,Bo.max))}return r}function Fo(t,e,r,i,n){t.emplaceBack(2*e+(i+1)/2,2*r+(n+1)/2)}var Oo=function(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(function(t){return t.id}),this.index=t.index,this.hasPattern=!1,this.layoutVertexArray=new In,this.indexArray=new Fn,this.segments=new no,this.programConfigurations=new Mo(io,t.layers,t.zoom),this.stateDependentLayerIds=this.layers.filter(function(t){return t.isStateDependent()}).map(function(t){return t.id})};function Uo(t,e){for(var r=0;r<t.length;r++)if(Ko(e,t[r]))return!0;for(var i=0;i<e.length;i++)if(Ko(t,e[i]))return!0;return!!qo(t,e)}function Vo(t,e,r){return!!Ko(t,e)||!!Go(e,t,r)}function No(t,e){if(1===t.length)return Wo(e,t[0]);for(var r=0;r<e.length;r++)for(var i=e[r],n=0;n<i.length;n++)if(Ko(t,i[n]))return!0;for(var o=0;o<t.length;o++)if(Wo(e,t[o]))return!0;for(var a=0;a<e.length;a++)if(qo(t,e[a]))return!0;return!1}function jo(t,e,r){if(t.length>1){if(qo(t,e))return!0;for(var i=0;i<e.length;i++)if(Go(e[i],t,r))return!0}for(var n=0;n<t.length;n++)if(Go(t[n],e,r))return!0;return!1}function qo(t,e){if(0===t.length||0===e.length)return!1;for(var r=0;r<t.length-1;r++)for(var i=t[r],n=t[r+1],o=0;o<e.length-1;o++)if(Zo(i,n,e[o],e[o+1]))return!0;return!1}function Zo(t,e,r,i){return w(t,r,i)!==w(e,r,i)&&w(t,e,r)!==w(t,e,i)}function Go(t,e,r){var i=r*r;if(1===e.length)return t.distSqr(e[0])<i;for(var n=1;n<e.length;n++)if(Xo(t,e[n-1],e[n])<i)return!0;return!1}function Xo(t,e,r){var i=e.distSqr(r);if(0===i)return t.distSqr(e);var n=((t.x-e.x)*(r.x-e.x)+(t.y-e.y)*(r.y-e.y))/i;return t.distSqr(n<0?e:n>1?r:r.sub(e)._mult(n)._add(e))}function Wo(t,e){for(var r,i,n,o=!1,a=0;a<t.length;a++)for(var s=0,l=(r=t[a]).length-1;s<r.length;l=s++)(i=r[s]).y>e.y!=(n=r[l]).y>e.y&&e.x<(n.x-i.x)*(e.y-i.y)/(n.y-i.y)+i.x&&(o=!o);return o}function Ko(t,e){for(var r=!1,i=0,n=t.length-1;i<t.length;n=i++){var o=t[i],a=t[n];o.y>e.y!=a.y>e.y&&e.x<(a.x-o.x)*(e.y-o.y)/(a.y-o.y)+o.x&&(r=!r)}return r}function Ho(t,e,r){var i=r[0],n=r[2];if(t.x<i.x&&e.x<i.x||t.x>n.x&&e.x>n.x||t.y<i.y&&e.y<i.y||t.y>n.y&&e.y>n.y)return!1;var o=w(t,e,r[0]);return o!==w(t,e,r[1])||o!==w(t,e,r[2])||o!==w(t,e,r[3])}function Jo(t,e,r){var i=e.paint.get(t).value;return"constant"===i.kind?i.value:r.programConfigurations.get(e.id).getMaxValue(t)}function Yo(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function Qo(t,e,r,i,o){if(!e[0]&&!e[1])return t;var a=n.convert(e)._mult(o);"viewport"===r&&a._rotate(-i);for(var s=[],l=0;l<t.length;l++)s.push(t[l].sub(a));return s}Oo.prototype.populate=function(t,e,r){var i=this.layers[0],n=[],o=null;"circle"===i.type&&(o=i.layout.get("circle-sort-key"));for(var a=0,s=t;a<s.length;a+=1){var l=s[a],u=l.feature,c=l.id,p=l.index,h=l.sourceLayerIndex,f=this.layers[0]._featureFilter.needGeometry,d={type:u.type,id:c,properties:u.properties,geometry:f?Ro(u):[]};if(this.layers[0]._featureFilter.filter(new nn(this.zoom),d,r)){f||(d.geometry=Ro(u));var m=o?o.evaluate(d,{},r):void 0;n.push({id:c,properties:u.properties,type:u.type,sourceLayerIndex:h,index:p,geometry:d.geometry,patterns:{},sortKey:m})}}o&&n.sort(function(t,e){return t.sortKey-e.sortKey});for(var y=0,g=n;y<g.length;y+=1){var _=g[y],v=_.geometry,x=_.index,b=_.sourceLayerIndex,w=t[x].feature;this.addFeature(_,v,x,r),e.featureIndex.insert(w,v,x,b,this.index)}},Oo.prototype.update=function(t,e,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,r)},Oo.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},Oo.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},Oo.prototype.upload=function(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,io),this.indexBuffer=t.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(t),this.uploaded=!0},Oo.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},Oo.prototype.addFeature=function(t,e,r,i){for(var n=0,o=e;n<o.length;n+=1)for(var a=0,s=o[n];a<s.length;a+=1){var l=s[a],u=l.x,c=l.y;if(!(u<0||u>=8192||c<0||c>=8192)){var p=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,t.sortKey),h=p.vertexLength;Fo(this.layoutVertexArray,u,c,-1,-1),Fo(this.layoutVertexArray,u,c,1,-1),Fo(this.layoutVertexArray,u,c,1,1),Fo(this.layoutVertexArray,u,c,-1,1),this.indexArray.emplaceBack(h,h+1,h+2),this.indexArray.emplaceBack(h,h+3,h+2),p.vertexLength+=4,p.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,r,{},i)},Li("CircleBucket",Oo,{omit:["layers"]});var $o=new _n({"circle-sort-key":new dn(Et.layout_circle["circle-sort-key"])}),ta={paint:new _n({"circle-radius":new dn(Et.paint_circle["circle-radius"]),"circle-color":new dn(Et.paint_circle["circle-color"]),"circle-blur":new dn(Et.paint_circle["circle-blur"]),"circle-opacity":new dn(Et.paint_circle["circle-opacity"]),"circle-translate":new fn(Et.paint_circle["circle-translate"]),"circle-translate-anchor":new fn(Et.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new fn(Et.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new fn(Et.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new dn(Et.paint_circle["circle-stroke-width"]),"circle-stroke-color":new dn(Et.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new dn(Et.paint_circle["circle-stroke-opacity"])}),layout:$o},ea="undefined"!=typeof Float32Array?Float32Array:Array;function ra(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function ia(t,e,r){var i=e[0],n=e[1],o=e[2],a=e[3],s=e[4],l=e[5],u=e[6],c=e[7],p=e[8],h=e[9],f=e[10],d=e[11],m=e[12],y=e[13],g=e[14],_=e[15],v=r[0],x=r[1],b=r[2],w=r[3];return t[0]=v*i+x*s+b*p+w*m,t[1]=v*n+x*l+b*h+w*y,t[2]=v*o+x*u+b*f+w*g,t[3]=v*a+x*c+b*d+w*_,t[4]=(v=r[4])*i+(x=r[5])*s+(b=r[6])*p+(w=r[7])*m,t[5]=v*n+x*l+b*h+w*y,t[6]=v*o+x*u+b*f+w*g,t[7]=v*a+x*c+b*d+w*_,t[8]=(v=r[8])*i+(x=r[9])*s+(b=r[10])*p+(w=r[11])*m,t[9]=v*n+x*l+b*h+w*y,t[10]=v*o+x*u+b*f+w*g,t[11]=v*a+x*c+b*d+w*_,t[12]=(v=r[12])*i+(x=r[13])*s+(b=r[14])*p+(w=r[15])*m,t[13]=v*n+x*l+b*h+w*y,t[14]=v*o+x*u+b*f+w*g,t[15]=v*a+x*c+b*d+w*_,t}Math.hypot||(Math.hypot=function(){for(var t=arguments,e=0,r=arguments.length;r--;)e+=t[r]*t[r];return Math.sqrt(e)});var na,oa=ia;function aa(t,e,r){var i=e[0],n=e[1],o=e[2],a=e[3];return t[0]=r[0]*i+r[4]*n+r[8]*o+r[12]*a,t[1]=r[1]*i+r[5]*n+r[9]*o+r[13]*a,t[2]=r[2]*i+r[6]*n+r[10]*o+r[14]*a,t[3]=r[3]*i+r[7]*n+r[11]*o+r[15]*a,t}na=new ea(3),ea!=Float32Array&&(na[0]=0,na[1]=0,na[2]=0),function(){var t=new ea(4);ea!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0)}();var sa=(function(){var t=new ea(2);ea!=Float32Array&&(t[0]=0,t[1]=0)}(),function(t){function e(e){t.call(this,e,ta)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.createBucket=function(t){return new Oo(t)},e.prototype.queryRadius=function(t){var e=t;return Jo("circle-radius",this,e)+Jo("circle-stroke-width",this,e)+Yo(this.paint.get("circle-translate"))},e.prototype.queryIntersectsFeature=function(t,e,r,i,n,o,a,s){for(var l=Qo(t,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),o.angle,a),u=this.paint.get("circle-radius").evaluate(e,r)+this.paint.get("circle-stroke-width").evaluate(e,r),c="map"===this.paint.get("circle-pitch-alignment"),p=c?l:function(t,e){return l.map(function(t){return la(t,e)})}(0,s),h=c?u*a:u,f=0,d=i;f<d.length;f+=1)for(var m=0,y=d[f];m<y.length;m+=1){var g=y[m],_=c?g:la(g,s),v=h,x=aa([],[g.x,g.y,0,1],s);if("viewport"===this.paint.get("circle-pitch-scale")&&"map"===this.paint.get("circle-pitch-alignment")?v*=x[3]/o.cameraToCenterDistance:"map"===this.paint.get("circle-pitch-scale")&&"viewport"===this.paint.get("circle-pitch-alignment")&&(v*=o.cameraToCenterDistance/x[3]),Vo(p,_,v))return!0}return!1},e}(vn));function la(t,e){var r=aa([],[t.x,t.y,0,1],e);return new n(r[0]/r[3],r[1]/r[3])}var ua=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e}(Oo);function ca(t,e,r,i){var n=e.width,o=e.height;if(i){if(i instanceof Uint8ClampedArray)i=new Uint8Array(i.buffer);else if(i.length!==n*o*r)throw new RangeError("mismatched image size")}else i=new Uint8Array(n*o*r);return t.width=n,t.height=o,t.data=i,t}function pa(t,e,r){var i=e.width,n=e.height;if(i!==t.width||n!==t.height){var o=ca({},{width:i,height:n},r);ha(t,o,{x:0,y:0},{x:0,y:0},{width:Math.min(t.width,i),height:Math.min(t.height,n)},r),t.width=i,t.height=n,t.data=o.data}}function ha(t,e,r,i,n,o){if(0===n.width||0===n.height)return e;if(n.width>t.width||n.height>t.height||r.x>t.width-n.width||r.y>t.height-n.height)throw new RangeError("out of range source coordinates for image copy");if(n.width>e.width||n.height>e.height||i.x>e.width-n.width||i.y>e.height-n.height)throw new RangeError("out of range destination coordinates for image copy");for(var a=t.data,s=e.data,l=0;l<n.height;l++)for(var u=((r.y+l)*t.width+r.x)*o,c=((i.y+l)*e.width+i.x)*o,p=0;p<n.width*o;p++)s[c+p]=a[u+p];return e}Li("HeatmapBucket",ua,{omit:["layers"]});var fa=function(t,e){ca(this,t,1,e)};fa.prototype.resize=function(t){pa(this,t,1)},fa.prototype.clone=function(){return new fa({width:this.width,height:this.height},new Uint8Array(this.data))},fa.copy=function(t,e,r,i,n){ha(t,e,r,i,n,1)};var da=function(t,e){ca(this,t,4,e)};da.prototype.resize=function(t){pa(this,t,4)},da.prototype.replace=function(t,e){e?this.data.set(t):this.data=t instanceof Uint8ClampedArray?new Uint8Array(t.buffer):t},da.prototype.clone=function(){return new da({width:this.width,height:this.height},new Uint8Array(this.data))},da.copy=function(t,e,r,i,n){ha(t,e,r,i,n,4)},Li("AlphaImage",fa),Li("RGBAImage",da);var ma={paint:new _n({"heatmap-radius":new dn(Et.paint_heatmap["heatmap-radius"]),"heatmap-weight":new dn(Et.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new fn(Et.paint_heatmap["heatmap-intensity"]),"heatmap-color":new gn(Et.paint_heatmap["heatmap-color"]),"heatmap-opacity":new fn(Et.paint_heatmap["heatmap-opacity"])})};function ya(t,e){for(var r=new Uint8Array(1024),i={},n=0,o=0;n<256;n++,o+=4){i[e]=n/255;var a=t.evaluate(i);r[o+0]=Math.floor(255*a.r/a.a),r[o+1]=Math.floor(255*a.g/a.a),r[o+2]=Math.floor(255*a.b/a.a),r[o+3]=Math.floor(255*a.a)}return new da({width:256,height:1},r)}var ga=function(t){function e(e){t.call(this,e,ma),this._updateColorRamp()}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.createBucket=function(t){return new ua(t)},e.prototype._handleSpecialPaintPropertyUpdate=function(t){"heatmap-color"===t&&this._updateColorRamp()},e.prototype._updateColorRamp=function(){this.colorRamp=ya(this._transitionablePaint._values["heatmap-color"].value.expression,"heatmapDensity"),this.colorRampTexture=null},e.prototype.resize=function(){this.heatmapFbo&&(this.heatmapFbo.destroy(),this.heatmapFbo=null)},e.prototype.queryRadius=function(){return 0},e.prototype.queryIntersectsFeature=function(){return!1},e.prototype.hasOffscreenPass=function(){return 0!==this.paint.get("heatmap-opacity")&&"none"!==this.visibility},e}(vn),_a={paint:new _n({"hillshade-illumination-direction":new fn(Et.paint_hillshade["hillshade-illumination-direction"]),"hillshade-illumination-anchor":new fn(Et.paint_hillshade["hillshade-illumination-anchor"]),"hillshade-exaggeration":new fn(Et.paint_hillshade["hillshade-exaggeration"]),"hillshade-shadow-color":new fn(Et.paint_hillshade["hillshade-shadow-color"]),"hillshade-highlight-color":new fn(Et.paint_hillshade["hillshade-highlight-color"]),"hillshade-accent-color":new fn(Et.paint_hillshade["hillshade-accent-color"])})},va=function(t){function e(e){t.call(this,e,_a)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.hasOffscreenPass=function(){return 0!==this.paint.get("hillshade-exaggeration")&&"none"!==this.visibility},e}(vn),xa=Sn([{name:"a_pos",components:2,type:"Int16"}],4).members,ba=Sa,wa=Sa;function Sa(t,e,r){r=r||2;var i,n,o,a,s,l,u,c=e&&e.length,p=c?e[0]*r:t.length,h=Ta(t,0,p,r,!0),f=[];if(!h||h.next===h.prev)return f;if(c&&(h=function(t,e,r,i){var n,o,a,s=[];for(n=0,o=e.length;n<o;n++)(a=Ta(t,e[n]*i,n<o-1?e[n+1]*i:t.length,i,!1))===a.next&&(a.steiner=!0),s.push(Ba(a));for(s.sort(ka),n=0;n<s.length;n++)Ma(s[n],r),r=Ia(r,r.next);return r}(t,e,h,r)),t.length>80*r){i=o=t[0],n=a=t[1];for(var d=r;d<p;d+=r)(s=t[d])<i&&(i=s),(l=t[d+1])<n&&(n=l),s>o&&(o=s),l>a&&(a=l);u=0!==(u=Math.max(o-i,a-n))?1/u:0}return Ea(h,f,r,i,n,u),f}function Ta(t,e,r,i,n){var o,a;if(n===Ka(t,e,r,i)>0)for(o=e;o<r;o+=i)a=Ga(o,t[o],t[o+1],a);else for(o=r-i;o>=e;o-=i)a=Ga(o,t[o],t[o+1],a);return a&&Ua(a,a.next)&&(Xa(a),a=a.next),a}function Ia(t,e){if(!t)return t;e||(e=t);var r,i=t;do{if(r=!1,i.steiner||!Ua(i,i.next)&&0!==Oa(i.prev,i,i.next))i=i.next;else{if(Xa(i),(i=e=i.prev)===i.next)break;r=!0}}while(r||i!==e);return e}function Ea(t,e,r,i,n,o,a){if(t){!a&&o&&function(t,e,r,i){var n=t;do{null===n.z&&(n.z=La(n.x,n.y,e,r,i)),n.prevZ=n.prev,n.nextZ=n.next,n=n.next}while(n!==t);n.prevZ.nextZ=null,n.prevZ=null,function(t){var e,r,i,n,o,a,s,l,u=1;do{for(r=t,t=null,o=null,a=0;r;){for(a++,i=r,s=0,e=0;e<u&&(s++,i=i.nextZ);e++);for(l=u;s>0||l>0&&i;)0!==s&&(0===l||!i||r.z<=i.z)?(n=r,r=r.nextZ,s--):(n=i,i=i.nextZ,l--),o?o.nextZ=n:t=n,n.prevZ=o,o=n;r=i}o.nextZ=null,u*=2}while(a>1)}(n)}(t,i,n,o);for(var s,l,u=t;t.prev!==t.next;)if(s=t.prev,l=t.next,o?za(t,i,n,o):Aa(t))e.push(s.i/r),e.push(t.i/r),e.push(l.i/r),Xa(t),t=l.next,u=l.next;else if((t=l)===u){a?1===a?Ea(t=Pa(Ia(t),e,r),e,r,i,n,o,2):2===a&&Ca(t,e,r,i,n,o):Ea(Ia(t),e,r,i,n,o,1);break}}}function Aa(t){var e=t.prev,r=t,i=t.next;if(Oa(e,r,i)>=0)return!1;for(var n=t.next.next;n!==t.prev;){if(Ra(e.x,e.y,r.x,r.y,i.x,i.y,n.x,n.y)&&Oa(n.prev,n,n.next)>=0)return!1;n=n.next}return!0}function za(t,e,r,i){var n=t.prev,o=t,a=t.next;if(Oa(n,o,a)>=0)return!1;for(var s=n.x>o.x?n.x>a.x?n.x:a.x:o.x>a.x?o.x:a.x,l=n.y>o.y?n.y>a.y?n.y:a.y:o.y>a.y?o.y:a.y,u=La(n.x<o.x?n.x<a.x?n.x:a.x:o.x<a.x?o.x:a.x,n.y<o.y?n.y<a.y?n.y:a.y:o.y<a.y?o.y:a.y,e,r,i),c=La(s,l,e,r,i),p=t.prevZ,h=t.nextZ;p&&p.z>=u&&h&&h.z<=c;){if(p!==t.prev&&p!==t.next&&Ra(n.x,n.y,o.x,o.y,a.x,a.y,p.x,p.y)&&Oa(p.prev,p,p.next)>=0)return!1;if(p=p.prevZ,h!==t.prev&&h!==t.next&&Ra(n.x,n.y,o.x,o.y,a.x,a.y,h.x,h.y)&&Oa(h.prev,h,h.next)>=0)return!1;h=h.nextZ}for(;p&&p.z>=u;){if(p!==t.prev&&p!==t.next&&Ra(n.x,n.y,o.x,o.y,a.x,a.y,p.x,p.y)&&Oa(p.prev,p,p.next)>=0)return!1;p=p.prevZ}for(;h&&h.z<=c;){if(h!==t.prev&&h!==t.next&&Ra(n.x,n.y,o.x,o.y,a.x,a.y,h.x,h.y)&&Oa(h.prev,h,h.next)>=0)return!1;h=h.nextZ}return!0}function Pa(t,e,r){var i=t;do{var n=i.prev,o=i.next.next;!Ua(n,o)&&Va(n,i,i.next,o)&&qa(n,o)&&qa(o,n)&&(e.push(n.i/r),e.push(i.i/r),e.push(o.i/r),Xa(i),Xa(i.next),i=t=o),i=i.next}while(i!==t);return Ia(i)}function Ca(t,e,r,i,n,o){var a=t;do{for(var s=a.next.next;s!==a.prev;){if(a.i!==s.i&&Fa(a,s)){var l=Za(a,s);return a=Ia(a,a.next),l=Ia(l,l.next),Ea(a,e,r,i,n,o),void Ea(l,e,r,i,n,o)}s=s.next}a=a.next}while(a!==t)}function ka(t,e){return t.x-e.x}function Ma(t,e){if(e=function(t,e){var r,i=e,n=t.x,o=t.y,a=-1/0;do{if(o<=i.y&&o>=i.next.y&&i.next.y!==i.y){var s=i.x+(o-i.y)*(i.next.x-i.x)/(i.next.y-i.y);if(s<=n&&s>a){if(a=s,s===n){if(o===i.y)return i;if(o===i.next.y)return i.next}r=i.x<i.next.x?i:i.next}}i=i.next}while(i!==e);if(!r)return null;if(n===a)return r;var l,u=r,c=r.x,p=r.y,h=1/0;i=r;do{n>=i.x&&i.x>=c&&n!==i.x&&Ra(o<p?n:a,o,c,p,o<p?a:n,o,i.x,i.y)&&(l=Math.abs(o-i.y)/(n-i.x),qa(i,t)&&(l<h||l===h&&(i.x>r.x||i.x===r.x&&Da(r,i)))&&(r=i,h=l)),i=i.next}while(i!==u);return r}(t,e)){var r=Za(e,t);Ia(e,e.next),Ia(r,r.next)}}function Da(t,e){return Oa(t.prev,t,e.prev)<0&&Oa(e.next,t,t.next)<0}function La(t,e,r,i,n){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)*n)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-i)*n)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function Ba(t){var e=t,r=t;do{(e.x<r.x||e.x===r.x&&e.y<r.y)&&(r=e),e=e.next}while(e!==t);return r}function Ra(t,e,r,i,n,o,a,s){return(n-a)*(e-s)-(t-a)*(o-s)>=0&&(t-a)*(i-s)-(r-a)*(e-s)>=0&&(r-a)*(o-s)-(n-a)*(i-s)>=0}function Fa(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var r=t;do{if(r.i!==t.i&&r.next.i!==t.i&&r.i!==e.i&&r.next.i!==e.i&&Va(r,r.next,t,e))return!0;r=r.next}while(r!==t);return!1}(t,e)&&(qa(t,e)&&qa(e,t)&&function(t,e){var r=t,i=!1,n=(t.x+e.x)/2,o=(t.y+e.y)/2;do{r.y>o!=r.next.y>o&&r.next.y!==r.y&&n<(r.next.x-r.x)*(o-r.y)/(r.next.y-r.y)+r.x&&(i=!i),r=r.next}while(r!==t);return i}(t,e)&&(Oa(t.prev,t,e.prev)||Oa(t,e.prev,e))||Ua(t,e)&&Oa(t.prev,t,t.next)>0&&Oa(e.prev,e,e.next)>0)}function Oa(t,e,r){return(e.y-t.y)*(r.x-e.x)-(e.x-t.x)*(r.y-e.y)}function Ua(t,e){return t.x===e.x&&t.y===e.y}function Va(t,e,r,i){var n=ja(Oa(t,e,r)),o=ja(Oa(t,e,i)),a=ja(Oa(r,i,t)),s=ja(Oa(r,i,e));return n!==o&&a!==s||!(0!==n||!Na(t,r,e))||!(0!==o||!Na(t,i,e))||!(0!==a||!Na(r,t,i))||!(0!==s||!Na(r,e,i))}function Na(t,e,r){return e.x<=Math.max(t.x,r.x)&&e.x>=Math.min(t.x,r.x)&&e.y<=Math.max(t.y,r.y)&&e.y>=Math.min(t.y,r.y)}function ja(t){return t>0?1:t<0?-1:0}function qa(t,e){return Oa(t.prev,t,t.next)<0?Oa(t,e,t.next)>=0&&Oa(t,t.prev,e)>=0:Oa(t,e,t.prev)<0||Oa(t,t.next,e)<0}function Za(t,e){var r=new Wa(t.i,t.x,t.y),i=new Wa(e.i,e.x,e.y),n=t.next,o=e.prev;return t.next=e,e.prev=t,r.next=n,n.prev=r,i.next=r,r.prev=i,o.next=i,i.prev=o,i}function Ga(t,e,r,i){var n=new Wa(t,e,r);return i?(n.next=i.next,n.prev=i,i.next.prev=n,i.next=n):(n.prev=n,n.next=n),n}function Xa(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function Wa(t,e,r){this.i=t,this.x=e,this.y=r,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function Ka(t,e,r,i){for(var n=0,o=e,a=r-i;o<r;o+=i)n+=(t[a]-t[o])*(t[o+1]+t[a+1]),a=o;return n}function Ha(t,e,r,i,n){!function t(e,r,i,n,o){for(;n>i;){if(n-i>600){var a=n-i+1,s=r-i+1,l=Math.log(a),u=.5*Math.exp(2*l/3),c=.5*Math.sqrt(l*u*(a-u)/a)*(s-a/2<0?-1:1);t(e,r,Math.max(i,Math.floor(r-s*u/a+c)),Math.min(n,Math.floor(r+(a-s)*u/a+c)),o)}var p=e[r],h=i,f=n;for(Ja(e,i,r),o(e[n],p)>0&&Ja(e,i,n);h<f;){for(Ja(e,h,f),h++,f--;o(e[h],p)<0;)h++;for(;o(e[f],p)>0;)f--}0===o(e[i],p)?Ja(e,i,f):Ja(e,++f,n),f<=r&&(i=f+1),r<=f&&(n=f-1)}}(t,e,r||0,i||t.length-1,n||Ya)}function Ja(t,e,r){var i=t[e];t[e]=t[r],t[r]=i}function Ya(t,e){return t<e?-1:t>e?1:0}function Qa(t,e){var r=t.length;if(r<=1)return[t];for(var i,n,o=[],a=0;a<r;a++){var s=S(t[a]);0!==s&&(t[a].area=Math.abs(s),void 0===n&&(n=s<0),n===s<0?(i&&o.push(i),i=[t[a]]):i.push(t[a]))}if(i&&o.push(i),e>1)for(var l=0;l<o.length;l++)o[l].length<=e||(Ha(o[l],e,1,o[l].length-1,$a),o[l]=o[l].slice(0,e));return o}function $a(t,e){return e.area-t.area}function ts(t,e,r){for(var i=r.patternDependencies,n=!1,o=0,a=e;o<a.length;o+=1){var s=a[o].paint.get(t+"-pattern");s.isConstant()||(n=!0);var l=s.constantOr(null);l&&(n=!0,i[l.to]=!0,i[l.from]=!0)}return n}function es(t,e,r,i,n){for(var o=n.patternDependencies,a=0,s=e;a<s.length;a+=1){var l=s[a],u=l.paint.get(t+"-pattern").value;if("constant"!==u.kind){var c=u.evaluate({zoom:i-1},r,{},n.availableImages),p=u.evaluate({zoom:i},r,{},n.availableImages),h=u.evaluate({zoom:i+1},r,{},n.availableImages);p=p&&p.name?p.name:p,h=h&&h.name?h.name:h,o[c=c&&c.name?c.name:c]=!0,o[p]=!0,o[h]=!0,r.patterns[l.id]={min:c,mid:p,max:h}}}return r}Sa.deviation=function(t,e,r,i){var n=e&&e.length,o=Math.abs(Ka(t,0,n?e[0]*r:t.length,r));if(n)for(var a=0,s=e.length;a<s;a++)o-=Math.abs(Ka(t,e[a]*r,a<s-1?e[a+1]*r:t.length,r));var l=0;for(a=0;a<i.length;a+=3){var u=i[a]*r,c=i[a+1]*r,p=i[a+2]*r;l+=Math.abs((t[u]-t[p])*(t[c+1]-t[u+1])-(t[u]-t[c])*(t[p+1]-t[u+1]))}return 0===o&&0===l?0:Math.abs((l-o)/o)},Sa.flatten=function(t){for(var e=t[0][0].length,r={vertices:[],holes:[],dimensions:e},i=0,n=0;n<t.length;n++){for(var o=0;o<t[n].length;o++)for(var a=0;a<e;a++)r.vertices.push(t[n][o][a]);n>0&&r.holes.push(i+=t[n-1].length)}return r},ba.default=wa;var rs=function(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(function(t){return t.id}),this.index=t.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new In,this.indexArray=new Fn,this.indexArray2=new qn,this.programConfigurations=new Mo(xa,t.layers,t.zoom),this.segments=new no,this.segments2=new no,this.stateDependentLayerIds=this.layers.filter(function(t){return t.isStateDependent()}).map(function(t){return t.id})};rs.prototype.populate=function(t,e,r){this.hasPattern=ts("fill",this.layers,e);for(var i=this.layers[0].layout.get("fill-sort-key"),n=[],o=0,a=t;o<a.length;o+=1){var s=a[o],l=s.feature,u=s.id,c=s.index,p=s.sourceLayerIndex,h=this.layers[0]._featureFilter.needGeometry,f={type:l.type,id:u,properties:l.properties,geometry:h?Ro(l):[]};if(this.layers[0]._featureFilter.filter(new nn(this.zoom),f,r)){h||(f.geometry=Ro(l));var d=i?i.evaluate(f,{},r,e.availableImages):void 0;n.push({id:u,properties:l.properties,type:l.type,sourceLayerIndex:p,index:c,geometry:f.geometry,patterns:{},sortKey:d})}}i&&n.sort(function(t,e){return t.sortKey-e.sortKey});for(var m=0,y=n;m<y.length;m+=1){var g=y[m],_=g.geometry,v=g.index,x=g.sourceLayerIndex;if(this.hasPattern){var b=es("fill",this.layers,g,this.zoom,e);this.patternFeatures.push(b)}else this.addFeature(g,_,v,r,{});e.featureIndex.insert(t[v].feature,_,v,x,this.index)}},rs.prototype.update=function(t,e,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,r)},rs.prototype.addFeatures=function(t,e,r){for(var i=0,n=this.patternFeatures;i<n.length;i+=1){var o=n[i];this.addFeature(o,o.geometry,o.index,e,r)}},rs.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},rs.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},rs.prototype.upload=function(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,xa),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.indexBuffer2=t.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(t),this.uploaded=!0},rs.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())},rs.prototype.addFeature=function(t,e,r,i,n){for(var o=0,a=Qa(e,500);o<a.length;o+=1){for(var s=a[o],l=0,u=0,c=s;u<c.length;u+=1)l+=c[u].length;for(var p=this.segments.prepareSegment(l,this.layoutVertexArray,this.indexArray),h=p.vertexLength,f=[],d=[],m=0,y=s;m<y.length;m+=1){var g=y[m];if(0!==g.length){g!==s[0]&&d.push(f.length/2);var _=this.segments2.prepareSegment(g.length,this.layoutVertexArray,this.indexArray2),v=_.vertexLength;this.layoutVertexArray.emplaceBack(g[0].x,g[0].y),this.indexArray2.emplaceBack(v+g.length-1,v),f.push(g[0].x),f.push(g[0].y);for(var x=1;x<g.length;x++)this.layoutVertexArray.emplaceBack(g[x].x,g[x].y),this.indexArray2.emplaceBack(v+x-1,v+x),f.push(g[x].x),f.push(g[x].y);_.vertexLength+=g.length,_.primitiveLength+=g.length}}for(var b=ba(f,d),w=0;w<b.length;w+=3)this.indexArray.emplaceBack(h+b[w],h+b[w+1],h+b[w+2]);p.vertexLength+=l,p.primitiveLength+=b.length/3}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,r,n,i)},Li("FillBucket",rs,{omit:["layers","patternFeatures"]});var is=new _n({"fill-sort-key":new dn(Et.layout_fill["fill-sort-key"])}),ns={paint:new _n({"fill-antialias":new fn(Et.paint_fill["fill-antialias"]),"fill-opacity":new dn(Et.paint_fill["fill-opacity"]),"fill-color":new dn(Et.paint_fill["fill-color"]),"fill-outline-color":new dn(Et.paint_fill["fill-outline-color"]),"fill-translate":new fn(Et.paint_fill["fill-translate"]),"fill-translate-anchor":new fn(Et.paint_fill["fill-translate-anchor"]),"fill-pattern":new mn(Et.paint_fill["fill-pattern"])}),layout:is},os=function(t){function e(e){t.call(this,e,ns)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.recalculate=function(e,r){t.prototype.recalculate.call(this,e,r);var i=this.paint._values["fill-outline-color"];"constant"===i.value.kind&&void 0===i.value.value&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])},e.prototype.createBucket=function(t){return new rs(t)},e.prototype.queryRadius=function(){return Yo(this.paint.get("fill-translate"))},e.prototype.queryIntersectsFeature=function(t,e,r,i,n,o,a){return No(Qo(t,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),o.angle,a),i)},e.prototype.isTileClipped=function(){return!0},e}(vn),as=Sn([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4).members,ss=ls;function ls(t,e,r,i,n){this.properties={},this.extent=r,this.type=0,this._pbf=t,this._geometry=-1,this._keys=i,this._values=n,t.readFields(us,this,e)}function us(t,e,r){1==t?e.id=r.readVarint():2==t?function(t,e){for(var r=t.readVarint()+t.pos;t.pos<r;){var i=e._keys[t.readVarint()],n=e._values[t.readVarint()];e.properties[i]=n}}(r,e):3==t?e.type=r.readVarint():4==t&&(e._geometry=r.pos)}function cs(t){for(var e,r,i=0,n=0,o=t.length,a=o-1;n<o;a=n++)i+=((r=t[a]).x-(e=t[n]).x)*(e.y+r.y);return i}ls.types=["Unknown","Point","LineString","Polygon"],ls.prototype.loadGeometry=function(){var t=this._pbf;t.pos=this._geometry;for(var e,r=t.readVarint()+t.pos,i=1,o=0,a=0,s=0,l=[];t.pos<r;){if(o<=0){var u=t.readVarint();i=7&u,o=u>>3}if(o--,1===i||2===i)a+=t.readSVarint(),s+=t.readSVarint(),1===i&&(e&&l.push(e),e=[]),e.push(new n(a,s));else{if(7!==i)throw new Error("unknown command "+i);e&&e.push(e[0].clone())}}return e&&l.push(e),l},ls.prototype.bbox=function(){var t=this._pbf;t.pos=this._geometry;for(var e=t.readVarint()+t.pos,r=1,i=0,n=0,o=0,a=1/0,s=-1/0,l=1/0,u=-1/0;t.pos<e;){if(i<=0){var c=t.readVarint();r=7&c,i=c>>3}if(i--,1===r||2===r)(n+=t.readSVarint())<a&&(a=n),n>s&&(s=n),(o+=t.readSVarint())<l&&(l=o),o>u&&(u=o);else if(7!==r)throw new Error("unknown command "+r)}return[a,l,s,u]},ls.prototype.toGeoJSON=function(t,e,r){var i,n,o=this.extent*Math.pow(2,r),a=this.extent*t,s=this.extent*e,l=this.loadGeometry(),u=ls.types[this.type];function c(t){for(var e=0;e<t.length;e++){var r=t[e];t[e]=[360*(r.x+a)/o-180,360/Math.PI*Math.atan(Math.exp((180-360*(r.y+s)/o)*Math.PI/180))-90]}}switch(this.type){case 1:var p=[];for(i=0;i<l.length;i++)p[i]=l[i][0];c(l=p);break;case 2:for(i=0;i<l.length;i++)c(l[i]);break;case 3:for(l=function(t){var e=t.length;if(e<=1)return[t];for(var r,i,n=[],o=0;o<e;o++){var a=cs(t[o]);0!==a&&(void 0===i&&(i=a<0),i===a<0?(r&&n.push(r),r=[t[o]]):r.push(t[o]))}return r&&n.push(r),n}(l),i=0;i<l.length;i++)for(n=0;n<l[i].length;n++)c(l[i][n])}1===l.length?l=l[0]:u="Multi"+u;var h={type:"Feature",geometry:{type:u,coordinates:l},properties:this.properties};return"id"in this&&(h.id=this.id),h};var ps=hs;function hs(t,e){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=t,this._keys=[],this._values=[],this._features=[],t.readFields(fs,this,e),this.length=this._features.length}function fs(t,e,r){15===t?e.version=r.readVarint():1===t?e.name=r.readString():5===t?e.extent=r.readVarint():2===t?e._features.push(r.pos):3===t?e._keys.push(r.readString()):4===t&&e._values.push(function(t){for(var e=null,r=t.readVarint()+t.pos;t.pos<r;){var i=t.readVarint()>>3;e=1===i?t.readString():2===i?t.readFloat():3===i?t.readDouble():4===i?t.readVarint64():5===i?t.readVarint():6===i?t.readSVarint():7===i?t.readBoolean():null}return e}(r))}function ds(t,e,r){if(3===t){var i=new ps(r,r.readVarint()+r.pos);i.length&&(e[i.name]=i)}}hs.prototype.feature=function(t){if(t<0||t>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[t];var e=this._pbf.readVarint()+this._pbf.pos;return new ss(this._pbf,e,this.extent,this._keys,this._values)};var ms={VectorTile:function(t,e){this.layers=t.readFields(ds,{},e)},VectorTileFeature:ss,VectorTileLayer:ps},ys=ms.VectorTileFeature.types,gs=Math.pow(2,13);function _s(t,e,r,i,n,o,a,s){t.emplaceBack(e,r,2*Math.floor(i*gs)+a,n*gs*2,o*gs*2,Math.round(s))}var vs=function(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(function(t){return t.id}),this.index=t.index,this.hasPattern=!1,this.layoutVertexArray=new An,this.indexArray=new Fn,this.programConfigurations=new Mo(as,t.layers,t.zoom),this.segments=new no,this.stateDependentLayerIds=this.layers.filter(function(t){return t.isStateDependent()}).map(function(t){return t.id})};function xs(t,e){return t.x===e.x&&(t.x<0||t.x>8192)||t.y===e.y&&(t.y<0||t.y>8192)}vs.prototype.populate=function(t,e,r){this.features=[],this.hasPattern=ts("fill-extrusion",this.layers,e);for(var i=0,n=t;i<n.length;i+=1){var o=n[i],a=o.feature,s=o.id,l=o.index,u=o.sourceLayerIndex,c=this.layers[0]._featureFilter.needGeometry,p={type:a.type,id:s,properties:a.properties,geometry:c?Ro(a):[]};if(this.layers[0]._featureFilter.filter(new nn(this.zoom),p,r)){var h={id:s,sourceLayerIndex:u,index:l,geometry:c?p.geometry:Ro(a),properties:a.properties,type:a.type,patterns:{}};void 0!==a.id&&(h.id=a.id),this.hasPattern?this.features.push(es("fill-extrusion",this.layers,h,this.zoom,e)):this.addFeature(h,h.geometry,l,r,{}),e.featureIndex.insert(a,h.geometry,l,u,this.index,!0)}}},vs.prototype.addFeatures=function(t,e,r){for(var i=0,n=this.features;i<n.length;i+=1){var o=n[i];this.addFeature(o,o.geometry,o.index,e,r)}},vs.prototype.update=function(t,e,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,r)},vs.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},vs.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},vs.prototype.upload=function(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,as),this.indexBuffer=t.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(t),this.uploaded=!0},vs.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},vs.prototype.addFeature=function(t,e,r,i,n){for(var o=0,a=Qa(e,500);o<a.length;o+=1){for(var s=a[o],l=0,u=0,c=s;u<c.length;u+=1)l+=c[u].length;for(var p=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray),h=0,f=s;h<f.length;h+=1){var d=f[h];if(0!==d.length&&!((M=d).every(function(t){return t.x<0})||M.every(function(t){return t.x>8192})||M.every(function(t){return t.y<0})||M.every(function(t){return t.y>8192})))for(var m=0,y=0;y<d.length;y++){var g=d[y];if(y>=1){var _=d[y-1];if(!xs(g,_)){p.vertexLength+4>no.MAX_VERTEX_ARRAY_LENGTH&&(p=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var v=g.sub(_)._perp()._unit(),x=_.dist(g);m+x>32768&&(m=0),_s(this.layoutVertexArray,g.x,g.y,v.x,v.y,0,0,m),_s(this.layoutVertexArray,g.x,g.y,v.x,v.y,0,1,m),_s(this.layoutVertexArray,_.x,_.y,v.x,v.y,0,0,m+=x),_s(this.layoutVertexArray,_.x,_.y,v.x,v.y,0,1,m);var b=p.vertexLength;this.indexArray.emplaceBack(b,b+2,b+1),this.indexArray.emplaceBack(b+1,b+2,b+3),p.vertexLength+=4,p.primitiveLength+=2}}}}if(p.vertexLength+l>no.MAX_VERTEX_ARRAY_LENGTH&&(p=this.segments.prepareSegment(l,this.layoutVertexArray,this.indexArray)),"Polygon"===ys[t.type]){for(var w=[],S=[],T=p.vertexLength,I=0,E=s;I<E.length;I+=1){var A=E[I];if(0!==A.length){A!==s[0]&&S.push(w.length/2);for(var z=0;z<A.length;z++){var P=A[z];_s(this.layoutVertexArray,P.x,P.y,0,0,1,1,0),w.push(P.x),w.push(P.y)}}}for(var C=ba(w,S),k=0;k<C.length;k+=3)this.indexArray.emplaceBack(T+C[k],T+C[k+2],T+C[k+1]);p.primitiveLength+=C.length/3,p.vertexLength+=l}}var M;this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,r,n,i)},Li("FillExtrusionBucket",vs,{omit:["layers","features"]});var bs={paint:new _n({"fill-extrusion-opacity":new fn(Et["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new dn(Et["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new fn(Et["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new fn(Et["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new mn(Et["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new dn(Et["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new dn(Et["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new fn(Et["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})},ws=function(t){function e(e){t.call(this,e,bs)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.createBucket=function(t){return new vs(t)},e.prototype.queryRadius=function(){return Yo(this.paint.get("fill-extrusion-translate"))},e.prototype.is3D=function(){return!0},e.prototype.queryIntersectsFeature=function(t,e,r,i,o,a,s,l){var u=Qo(t,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),a.angle,s),c=this.paint.get("fill-extrusion-height").evaluate(e,r),p=this.paint.get("fill-extrusion-base").evaluate(e,r),h=function(t,e,r,i){for(var o=[],a=0,s=t;a<s.length;a+=1){var l=s[a],u=[l.x,l.y,0,1];aa(u,u,e),o.push(new n(u[0]/u[3],u[1]/u[3]))}return o}(u,l),f=function(t,e,r,i){for(var o=[],a=[],s=i[8]*e,l=i[9]*e,u=i[10]*e,c=i[11]*e,p=i[8]*r,h=i[9]*r,f=i[10]*r,d=i[11]*r,m=0,y=t;m<y.length;m+=1){for(var g=[],_=[],v=0,x=y[m];v<x.length;v+=1){var b=x[v],w=b.x,S=b.y,T=i[0]*w+i[4]*S+i[12],I=i[1]*w+i[5]*S+i[13],E=i[2]*w+i[6]*S+i[14],A=i[3]*w+i[7]*S+i[15],z=E+u,P=A+c,C=T+p,k=I+h,M=E+f,D=A+d,L=new n((T+s)/P,(I+l)/P);L.z=z/P,g.push(L);var B=new n(C/D,k/D);B.z=M/D,_.push(B)}o.push(g),a.push(_)}return[o,a]}(i,p,c,l);return function(t,e,r){var i=1/0;No(r,e)&&(i=Ts(r,e[0]));for(var n=0;n<e.length;n++)for(var o=e[n],a=t[n],s=0;s<o.length-1;s++){var l=o[s],u=[l,o[s+1],a[s+1],a[s],l];Uo(r,u)&&(i=Math.min(i,Ts(r,u)))}return i!==1/0&&i}(f[0],f[1],h)},e}(vn);function Ss(t,e){return t.x*e.x+t.y*e.y}function Ts(t,e){if(1===t.length){for(var r,i=0,n=e[i++];!r||n.equals(r);)if(!(r=e[i++]))return 1/0;for(;i<e.length;i++){var o=e[i],a=t[0],s=r.sub(n),l=o.sub(n),u=a.sub(n),c=Ss(s,s),p=Ss(s,l),h=Ss(l,l),f=Ss(u,s),d=Ss(u,l),m=c*h-p*p,y=(h*f-p*d)/m,g=(c*d-p*f)/m,_=n.z*(1-y-g)+r.z*y+o.z*g;if(isFinite(_))return _}return 1/0}for(var v=1/0,x=0,b=e;x<b.length;x+=1)v=Math.min(v,b[x].z);return v}var Is=Sn([{name:"a_pos_normal",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4).members,Es=ms.VectorTileFeature.types,As=Math.cos(Math.PI/180*37.5),zs=Math.pow(2,14)/.5,Ps=function(t){this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(function(t){return t.id}),this.index=t.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new zn,this.indexArray=new Fn,this.programConfigurations=new Mo(Is,t.layers,t.zoom),this.segments=new no,this.stateDependentLayerIds=this.layers.filter(function(t){return t.isStateDependent()}).map(function(t){return t.id})};Ps.prototype.populate=function(t,e,r){this.hasPattern=ts("line",this.layers,e);for(var i=this.layers[0].layout.get("line-sort-key"),n=[],o=0,a=t;o<a.length;o+=1){var s=a[o],l=s.feature,u=s.id,c=s.index,p=s.sourceLayerIndex,h=this.layers[0]._featureFilter.needGeometry,f={type:l.type,id:u,properties:l.properties,geometry:h?Ro(l):[]};if(this.layers[0]._featureFilter.filter(new nn(this.zoom),f,r)){h||(f.geometry=Ro(l));var d=i?i.evaluate(f,{},r):void 0;n.push({id:u,properties:l.properties,type:l.type,sourceLayerIndex:p,index:c,geometry:f.geometry,patterns:{},sortKey:d})}}i&&n.sort(function(t,e){return t.sortKey-e.sortKey});for(var m=0,y=n;m<y.length;m+=1){var g=y[m],_=g.geometry,v=g.index,x=g.sourceLayerIndex;if(this.hasPattern){var b=es("line",this.layers,g,this.zoom,e);this.patternFeatures.push(b)}else this.addFeature(g,_,v,r,{});e.featureIndex.insert(t[v].feature,_,v,x,this.index)}},Ps.prototype.update=function(t,e,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(t,e,this.stateDependentLayers,r)},Ps.prototype.addFeatures=function(t,e,r){for(var i=0,n=this.patternFeatures;i<n.length;i+=1){var o=n[i];this.addFeature(o,o.geometry,o.index,e,r)}},Ps.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},Ps.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},Ps.prototype.upload=function(t){this.uploaded||(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,Is),this.indexBuffer=t.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(t),this.uploaded=!0},Ps.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},Ps.prototype.addFeature=function(t,e,r,i,n){for(var o=this.layers[0].layout,a=o.get("line-join").evaluate(t,{}),s=o.get("line-cap"),l=o.get("line-miter-limit"),u=o.get("line-round-limit"),c=0,p=e;c<p.length;c+=1)this.addLine(p[c],t,a,s,l,u);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,t,r,n,i)},Ps.prototype.addLine=function(t,e,r,i,n,o){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,e.properties&&e.properties.hasOwnProperty("mapbox_clip_start")&&e.properties.hasOwnProperty("mapbox_clip_end")){this.clipStart=+e.properties.mapbox_clip_start,this.clipEnd=+e.properties.mapbox_clip_end;for(var a=0;a<t.length-1;a++)this.totalDistance+=t[a].dist(t[a+1]);this.updateScaledDistance()}for(var s="Polygon"===Es[e.type],l=t.length;l>=2&&t[l-1].equals(t[l-2]);)l--;for(var u=0;u<l-1&&t[u].equals(t[u+1]);)u++;if(!(l<(s?3:2))){"bevel"===r&&(n=1.05);var c,p=this.overscaling<=16?122880/(512*this.overscaling):0,h=this.segments.prepareSegment(10*l,this.layoutVertexArray,this.indexArray),f=void 0,d=void 0,m=void 0,y=void 0;this.e1=this.e2=-1,s&&(y=t[u].sub(c=t[l-2])._unit()._perp());for(var g=u;g<l;g++)if(!(d=g===l-1?s?t[u+1]:void 0:t[g+1])||!t[g].equals(d)){y&&(m=y),c&&(f=c),c=t[g],y=d?d.sub(c)._unit()._perp():m;var _=(m=m||y).add(y);0===_.x&&0===_.y||_._unit();var v=m.x*y.x+m.y*y.y,x=_.x*y.x+_.y*y.y,b=0!==x?1/x:1/0,w=2*Math.sqrt(2-2*x),S=x<As&&f&&d,T=m.x*y.y-m.y*y.x>0;if(S&&g>u){var I=c.dist(f);if(I>2*p){var E=c.sub(c.sub(f)._mult(p/I)._round());this.updateDistance(f,E),this.addCurrentVertex(E,m,0,0,h),f=E}}var A=f&&d,z=A?r:s?"butt":i;if(A&&"round"===z&&(b<o?z="miter":b<=2&&(z="fakeround")),"miter"===z&&b>n&&(z="bevel"),"bevel"===z&&(b>2&&(z="flipbevel"),b<n&&(z="miter")),f&&this.updateDistance(f,c),"miter"===z)_._mult(b),this.addCurrentVertex(c,_,0,0,h);else if("flipbevel"===z){if(b>100)_=y.mult(-1);else{var P=b*m.add(y).mag()/m.sub(y).mag();_._perp()._mult(P*(T?-1:1))}this.addCurrentVertex(c,_,0,0,h),this.addCurrentVertex(c,_.mult(-1),0,0,h)}else if("bevel"===z||"fakeround"===z){var C=-Math.sqrt(b*b-1),k=T?C:0,M=T?0:C;if(f&&this.addCurrentVertex(c,m,k,M,h),"fakeround"===z)for(var D=Math.round(180*w/Math.PI/20),L=1;L<D;L++){var B=L/D;if(.5!==B){var R=B-.5;B+=B*R*(B-1)*((1.0904+v*(v*(3.55645-1.43519*v)-3.2452))*R*R+(.848013+v*(.215638*v-1.06021)))}var F=y.sub(m)._mult(B)._add(m)._unit()._mult(T?-1:1);this.addHalfVertex(c,F.x,F.y,!1,T,0,h)}d&&this.addCurrentVertex(c,y,-k,-M,h)}else if("butt"===z)this.addCurrentVertex(c,_,0,0,h);else if("square"===z){var O=f?1:-1;this.addCurrentVertex(c,_,O,O,h)}else"round"===z&&(f&&(this.addCurrentVertex(c,m,0,0,h),this.addCurrentVertex(c,m,1,1,h,!0)),d&&(this.addCurrentVertex(c,y,-1,-1,h,!0),this.addCurrentVertex(c,y,0,0,h)));if(S&&g<l-1){var U=c.dist(d);if(U>2*p){var V=c.add(d.sub(c)._mult(p/U)._round());this.updateDistance(c,V),this.addCurrentVertex(V,y,0,0,h),c=V}}}}},Ps.prototype.addCurrentVertex=function(t,e,r,i,n,o){void 0===o&&(o=!1);var a=e.y*i-e.x,s=-e.y-e.x*i;this.addHalfVertex(t,e.x+e.y*r,e.y-e.x*r,o,!1,r,n),this.addHalfVertex(t,a,s,o,!0,-i,n),this.distance>zs/2&&0===this.totalDistance&&(this.distance=0,this.addCurrentVertex(t,e,r,i,n,o))},Ps.prototype.addHalfVertex=function(t,e,r,i,n,o,a){var s=.5*this.scaledDistance;this.layoutVertexArray.emplaceBack((t.x<<1)+(i?1:0),(t.y<<1)+(n?1:0),Math.round(63*e)+128,Math.round(63*r)+128,1+(0===o?0:o<0?-1:1)|(63&s)<<2,s>>6);var l=a.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,l),a.primitiveLength++),n?this.e2=l:this.e1=l},Ps.prototype.updateScaledDistance=function(){this.scaledDistance=this.totalDistance>0?(this.clipStart+(this.clipEnd-this.clipStart)*this.distance/this.totalDistance)*(zs-1):this.distance},Ps.prototype.updateDistance=function(t,e){this.distance+=t.dist(e),this.updateScaledDistance()},Li("LineBucket",Ps,{omit:["layers","patternFeatures"]});var Cs=new _n({"line-cap":new fn(Et.layout_line["line-cap"]),"line-join":new dn(Et.layout_line["line-join"]),"line-miter-limit":new fn(Et.layout_line["line-miter-limit"]),"line-round-limit":new fn(Et.layout_line["line-round-limit"]),"line-sort-key":new dn(Et.layout_line["line-sort-key"])}),ks={paint:new _n({"line-opacity":new dn(Et.paint_line["line-opacity"]),"line-color":new dn(Et.paint_line["line-color"]),"line-translate":new fn(Et.paint_line["line-translate"]),"line-translate-anchor":new fn(Et.paint_line["line-translate-anchor"]),"line-width":new dn(Et.paint_line["line-width"]),"line-gap-width":new dn(Et.paint_line["line-gap-width"]),"line-offset":new dn(Et.paint_line["line-offset"]),"line-blur":new dn(Et.paint_line["line-blur"]),"line-dasharray":new yn(Et.paint_line["line-dasharray"]),"line-pattern":new mn(Et.paint_line["line-pattern"]),"line-gradient":new gn(Et.paint_line["line-gradient"])}),layout:Cs},Ms=new(function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.possiblyEvaluate=function(e,r){return r=new nn(Math.floor(r.zoom),{now:r.now,fadeDuration:r.fadeDuration,zoomHistory:r.zoomHistory,transition:r.transition}),t.prototype.possiblyEvaluate.call(this,e,r)},e.prototype.evaluate=function(e,r,i,n){return r=c({},r,{zoom:Math.floor(r.zoom)}),t.prototype.evaluate.call(this,e,r,i,n)},e}(dn))(ks.paint.properties["line-width"].specification);Ms.useIntegerZoom=!0;var Ds=function(t){function e(e){t.call(this,e,ks)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._handleSpecialPaintPropertyUpdate=function(t){"line-gradient"===t&&this._updateGradient()},e.prototype._updateGradient=function(){this.gradient=ya(this._transitionablePaint._values["line-gradient"].value.expression,"lineProgress"),this.gradientTexture=null},e.prototype.recalculate=function(e,r){t.prototype.recalculate.call(this,e,r),this.paint._values["line-floorwidth"]=Ms.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,e)},e.prototype.createBucket=function(t){return new Ps(t)},e.prototype.queryRadius=function(t){var e=t,r=Ls(Jo("line-width",this,e),Jo("line-gap-width",this,e)),i=Jo("line-offset",this,e);return r/2+Math.abs(i)+Yo(this.paint.get("line-translate"))},e.prototype.queryIntersectsFeature=function(t,e,r,i,o,a,s){var l=Qo(t,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),a.angle,s),u=s/2*Ls(this.paint.get("line-width").evaluate(e,r),this.paint.get("line-gap-width").evaluate(e,r)),c=this.paint.get("line-offset").evaluate(e,r);return c&&(i=function(t,e){for(var r=[],i=new n(0,0),o=0;o<t.length;o++){for(var a=t[o],s=[],l=0;l<a.length;l++){var u=a[l],c=a[l+1],p=0===l?i:u.sub(a[l-1])._unit()._perp(),h=l===a.length-1?i:c.sub(u)._unit()._perp(),f=p._add(h)._unit();f._mult(1/(f.x*h.x+f.y*h.y)),s.push(f._mult(e)._add(u))}r.push(s)}return r}(i,c*s)),function(t,e,r){for(var i=0;i<e.length;i++){var n=e[i];if(t.length>=3)for(var o=0;o<n.length;o++)if(Ko(t,n[o]))return!0;if(jo(t,n,r))return!0}return!1}(l,i,u)},e.prototype.isTileClipped=function(){return!0},e}(vn);function Ls(t,e){return e>0?e+2*t:t}var Bs=Sn([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),Rs=Sn([{name:"a_projected_pos",components:3,type:"Float32"}],4),Fs=(Sn([{name:"a_fade_opacity",components:1,type:"Uint32"}],4),Sn([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"}])),Os=(Sn([{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"}]),Sn([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4)),Us=Sn([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function Vs(t,e,r){return t.sections.forEach(function(t){t.text=function(t,e,r){var i=e.layout.get("text-transform").evaluate(r,{});return"uppercase"===i?t=t.toLocaleUpperCase():"lowercase"===i&&(t=t.toLocaleLowerCase()),rn.applyArabicShaping&&(t=rn.applyArabicShaping(t)),t}(t.text,e,r)}),t}Sn([{name:"triangle",components:3,type:"Uint16"}]),Sn([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Uint16",name:"glyphStartIndex"},{type:"Uint16",name:"numGlyphs"},{type:"Uint32",name:"vertexStartIndex"},{type:"Uint32",name:"lineStartIndex"},{type:"Uint32",name:"lineLength"},{type:"Uint16",name:"segment"},{type:"Uint16",name:"lowerSize"},{type:"Uint16",name:"upperSize"},{type:"Float32",name:"lineOffsetX"},{type:"Float32",name:"lineOffsetY"},{type:"Uint8",name:"writingMode"},{type:"Uint8",name:"placedOrientation"},{type:"Uint8",name:"hidden"},{type:"Uint32",name:"crossTileID"},{type:"Int16",name:"associatedIconIndex"}]),Sn([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Int16",name:"rightJustifiedTextSymbolIndex"},{type:"Int16",name:"centerJustifiedTextSymbolIndex"},{type:"Int16",name:"leftJustifiedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Int16",name:"placedIconSymbolIndex"},{type:"Int16",name:"verticalPlacedIconSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"verticalTextBoxStartIndex"},{type:"Uint16",name:"verticalTextBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"verticalIconBoxStartIndex"},{type:"Uint16",name:"verticalIconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint16",name:"numVerticalIconVertices"},{type:"Uint16",name:"useRuntimeCollisionCircles"},{type:"Uint32",name:"crossTileID"},{type:"Float32",name:"textBoxScale"},{type:"Float32",components:2,name:"textOffset"},{type:"Float32",name:"collisionCircleDiameter"}]),Sn([{type:"Float32",name:"offsetX"}]),Sn([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]);var Ns={"!":"︕","#":"#",$:"$","%":"%","&":"&","(":"︵",")":"︶","*":"*","+":"+",",":"︐","-":"︲",".":"・","/":"/",":":"︓",";":"︔","<":"︿","=":"=",">":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"},js=function(t,e,r,i,n){var o,a,s=8*n-i-1,l=(1<<s)-1,u=l>>1,c=-7,p=r?n-1:0,h=r?-1:1,f=t[e+p];for(p+=h,o=f&(1<<-c)-1,f>>=-c,c+=s;c>0;o=256*o+t[e+p],p+=h,c-=8);for(a=o&(1<<-c)-1,o>>=-c,c+=i;c>0;a=256*a+t[e+p],p+=h,c-=8);if(0===o)o=1-u;else{if(o===l)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,i),o-=u}return(f?-1:1)*a*Math.pow(2,o-i)},qs=function(t,e,r,i,n,o){var a,s,l,u=8*o-n-1,c=(1<<u)-1,p=c>>1,h=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,f=i?0:o-1,d=i?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=c):(a=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-a))<1&&(a--,l*=2),(e+=a+p>=1?h/l:h*Math.pow(2,1-p))*l>=2&&(a++,l/=2),a+p>=c?(s=0,a=c):a+p>=1?(s=(e*l-1)*Math.pow(2,n),a+=p):(s=e*Math.pow(2,p-1)*Math.pow(2,n),a=0));n>=8;t[r+f]=255&s,f+=d,s/=256,n-=8);for(a=a<<n|s,u+=n;u>0;t[r+f]=255&a,f+=d,a/=256,u-=8);t[r+f-d]|=128*m},Zs=Gs;function Gs(t){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(t)?t:new Uint8Array(t||0),this.pos=0,this.type=0,this.length=this.buf.length}Gs.Varint=0,Gs.Fixed64=1,Gs.Bytes=2,Gs.Fixed32=5;var Xs="undefined"==typeof TextDecoder?null:new TextDecoder("utf8");function Ws(t){return t.type===Gs.Bytes?t.readVarint()+t.pos:t.pos+1}function Ks(t,e,r){return r?4294967296*e+(t>>>0):4294967296*(e>>>0)+(t>>>0)}function Hs(t,e,r){var i=e<=16383?1:e<=2097151?2:e<=268435455?3:Math.floor(Math.log(e)/(7*Math.LN2));r.realloc(i);for(var n=r.pos-1;n>=t;n--)r.buf[n+i]=r.buf[n]}function Js(t,e){for(var r=0;r<t.length;r++)e.writeVarint(t[r])}function Ys(t,e){for(var r=0;r<t.length;r++)e.writeSVarint(t[r])}function Qs(t,e){for(var r=0;r<t.length;r++)e.writeFloat(t[r])}function $s(t,e){for(var r=0;r<t.length;r++)e.writeDouble(t[r])}function tl(t,e){for(var r=0;r<t.length;r++)e.writeBoolean(t[r])}function el(t,e){for(var r=0;r<t.length;r++)e.writeFixed32(t[r])}function rl(t,e){for(var r=0;r<t.length;r++)e.writeSFixed32(t[r])}function il(t,e){for(var r=0;r<t.length;r++)e.writeFixed64(t[r])}function nl(t,e){for(var r=0;r<t.length;r++)e.writeSFixed64(t[r])}function ol(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+16777216*t[e+3]}function al(t,e,r){t[r]=e,t[r+1]=e>>>8,t[r+2]=e>>>16,t[r+3]=e>>>24}function sl(t,e){return(t[e]|t[e+1]<<8|t[e+2]<<16)+(t[e+3]<<24)}function ll(t,e,r){1===t&&r.readMessage(ul,e)}function ul(t,e,r){if(3===t){var i=r.readMessage(cl,{}),n=i.width,o=i.height,a=i.left,s=i.top,l=i.advance;e.push({id:i.id,bitmap:new fa({width:n+6,height:o+6},i.bitmap),metrics:{width:n,height:o,left:a,top:s,advance:l}})}}function cl(t,e,r){1===t?e.id=r.readVarint():2===t?e.bitmap=r.readBytes():3===t?e.width=r.readVarint():4===t?e.height=r.readVarint():5===t?e.left=r.readSVarint():6===t?e.top=r.readSVarint():7===t&&(e.advance=r.readVarint())}function pl(t){for(var e=0,r=0,i=0,n=t;i<n.length;i+=1){var o=n[i];e+=o.w*o.h,r=Math.max(r,o.w)}t.sort(function(t,e){return e.h-t.h});for(var a=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(e/.95)),r),h:1/0}],s=0,l=0,u=0,c=t;u<c.length;u+=1)for(var p=c[u],h=a.length-1;h>=0;h--){var f=a[h];if(!(p.w>f.w||p.h>f.h)){if(p.x=f.x,p.y=f.y,l=Math.max(l,p.y+p.h),s=Math.max(s,p.x+p.w),p.w===f.w&&p.h===f.h){var d=a.pop();h<a.length&&(a[h]=d)}else p.h===f.h?(f.x+=p.w,f.w-=p.w):p.w===f.w?(f.y+=p.h,f.h-=p.h):(a.push({x:f.x+p.w,y:f.y,w:f.w-p.w,h:p.h}),f.y+=p.h,f.h-=p.h);break}}return{w:s,h:l,fill:e/(s*l)||0}}Gs.prototype={destroy:function(){this.buf=null},readFields:function(t,e,r){for(r=r||this.length;this.pos<r;){var i=this.readVarint(),n=i>>3,o=this.pos;this.type=7&i,t(n,e,this),this.pos===o&&this.skip(i)}return e},readMessage:function(t,e){return this.readFields(t,e,this.readVarint()+this.pos)},readFixed32:function(){var t=ol(this.buf,this.pos);return this.pos+=4,t},readSFixed32:function(){var t=sl(this.buf,this.pos);return this.pos+=4,t},readFixed64:function(){var t=ol(this.buf,this.pos)+4294967296*ol(this.buf,this.pos+4);return this.pos+=8,t},readSFixed64:function(){var t=ol(this.buf,this.pos)+4294967296*sl(this.buf,this.pos+4);return this.pos+=8,t},readFloat:function(){var t=js(this.buf,this.pos,!0,23,4);return this.pos+=4,t},readDouble:function(){var t=js(this.buf,this.pos,!0,52,8);return this.pos+=8,t},readVarint:function(t){var e,r,i=this.buf;return e=127&(r=i[this.pos++]),r<128?e:(e|=(127&(r=i[this.pos++]))<<7,r<128?e:(e|=(127&(r=i[this.pos++]))<<14,r<128?e:(e|=(127&(r=i[this.pos++]))<<21,r<128?e:function(t,e,r){var i,n,o=r.buf;if(i=(112&(n=o[r.pos++]))>>4,n<128)return Ks(t,i,e);if(i|=(127&(n=o[r.pos++]))<<3,n<128)return Ks(t,i,e);if(i|=(127&(n=o[r.pos++]))<<10,n<128)return Ks(t,i,e);if(i|=(127&(n=o[r.pos++]))<<17,n<128)return Ks(t,i,e);if(i|=(127&(n=o[r.pos++]))<<24,n<128)return Ks(t,i,e);if(i|=(1&(n=o[r.pos++]))<<31,n<128)return Ks(t,i,e);throw new Error("Expected varint not more than 10 bytes")}(e|=(15&(r=i[this.pos]))<<28,t,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var t=this.readVarint();return t%2==1?(t+1)/-2:t/2},readBoolean:function(){return Boolean(this.readVarint())},readString:function(){var t=this.readVarint()+this.pos,e=this.pos;return this.pos=t,t-e>=12&&Xs?function(t,e,r){return Xs.decode(t.subarray(e,r))}(this.buf,e,t):function(t,e,r){for(var i="",n=e;n<r;){var o,a,s,l=t[n],u=null,c=l>239?4:l>223?3:l>191?2:1;if(n+c>r)break;1===c?l<128&&(u=l):2===c?128==(192&(o=t[n+1]))&&(u=(31&l)<<6|63&o)<=127&&(u=null):3===c?(a=t[n+2],128==(192&(o=t[n+1]))&&128==(192&a)&&((u=(15&l)<<12|(63&o)<<6|63&a)<=2047||u>=55296&&u<=57343)&&(u=null)):4===c&&(a=t[n+2],s=t[n+3],128==(192&(o=t[n+1]))&&128==(192&a)&&128==(192&s)&&((u=(15&l)<<18|(63&o)<<12|(63&a)<<6|63&s)<=65535||u>=1114112)&&(u=null)),null===u?(u=65533,c=1):u>65535&&(u-=65536,i+=String.fromCharCode(u>>>10&1023|55296),u=56320|1023&u),i+=String.fromCharCode(u),n+=c}return i}(this.buf,e,t)},readBytes:function(){var t=this.readVarint()+this.pos,e=this.buf.subarray(this.pos,t);return this.pos=t,e},readPackedVarint:function(t,e){if(this.type!==Gs.Bytes)return t.push(this.readVarint(e));var r=Ws(this);for(t=t||[];this.pos<r;)t.push(this.readVarint(e));return t},readPackedSVarint:function(t){if(this.type!==Gs.Bytes)return t.push(this.readSVarint());var e=Ws(this);for(t=t||[];this.pos<e;)t.push(this.readSVarint());return t},readPackedBoolean:function(t){if(this.type!==Gs.Bytes)return t.push(this.readBoolean());var e=Ws(this);for(t=t||[];this.pos<e;)t.push(this.readBoolean());return t},readPackedFloat:function(t){if(this.type!==Gs.Bytes)return t.push(this.readFloat());var e=Ws(this);for(t=t||[];this.pos<e;)t.push(this.readFloat());return t},readPackedDouble:function(t){if(this.type!==Gs.Bytes)return t.push(this.readDouble());var e=Ws(this);for(t=t||[];this.pos<e;)t.push(this.readDouble());return t},readPackedFixed32:function(t){if(this.type!==Gs.Bytes)return t.push(this.readFixed32());var e=Ws(this);for(t=t||[];this.pos<e;)t.push(this.readFixed32());return t},readPackedSFixed32:function(t){if(this.type!==Gs.Bytes)return t.push(this.readSFixed32());var e=Ws(this);for(t=t||[];this.pos<e;)t.push(this.readSFixed32());return t},readPackedFixed64:function(t){if(this.type!==Gs.Bytes)return t.push(this.readFixed64());var e=Ws(this);for(t=t||[];this.pos<e;)t.push(this.readFixed64());return t},readPackedSFixed64:function(t){if(this.type!==Gs.Bytes)return t.push(this.readSFixed64());var e=Ws(this);for(t=t||[];this.pos<e;)t.push(this.readSFixed64());return t},skip:function(t){var e=7&t;if(e===Gs.Varint)for(;this.buf[this.pos++]>127;);else if(e===Gs.Bytes)this.pos=this.readVarint()+this.pos;else if(e===Gs.Fixed32)this.pos+=4;else{if(e!==Gs.Fixed64)throw new Error("Unimplemented type: "+e);this.pos+=8}},writeTag:function(t,e){this.writeVarint(t<<3|e)},realloc:function(t){for(var e=this.length||16;e<this.pos+t;)e*=2;if(e!==this.length){var r=new Uint8Array(e);r.set(this.buf),this.buf=r,this.length=e}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(t){this.realloc(4),al(this.buf,t,this.pos),this.pos+=4},writeSFixed32:function(t){this.realloc(4),al(this.buf,t,this.pos),this.pos+=4},writeFixed64:function(t){this.realloc(8),al(this.buf,-1&t,this.pos),al(this.buf,Math.floor(t*(1/4294967296)),this.pos+4),this.pos+=8},writeSFixed64:function(t){this.realloc(8),al(this.buf,-1&t,this.pos),al(this.buf,Math.floor(t*(1/4294967296)),this.pos+4),this.pos+=8},writeVarint:function(t){(t=+t||0)>268435455||t<0?function(t,e){var r,i;if(t>=0?(r=t%4294967296|0,i=t/4294967296|0):(i=~(-t/4294967296),4294967295^(r=~(-t%4294967296))?r=r+1|0:(r=0,i=i+1|0)),t>=0x10000000000000000||t<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");e.realloc(10),function(t,e,r){r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,t>>>=7,r.buf[r.pos++]=127&t|128,r.buf[r.pos]=127&(t>>>=7)}(r,0,e),function(t,e){var r=(7&t)<<4;e.buf[e.pos++]|=r|((t>>>=3)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t|((t>>>=7)?128:0),t&&(e.buf[e.pos++]=127&t)))))}(i,e)}(t,this):(this.realloc(4),this.buf[this.pos++]=127&t|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=127&(t>>>=7)|(t>127?128:0),t<=127||(this.buf[this.pos++]=t>>>7&127))))},writeSVarint:function(t){this.writeVarint(t<0?2*-t-1:2*t)},writeBoolean:function(t){this.writeVarint(Boolean(t))},writeString:function(t){t=String(t),this.realloc(4*t.length),this.pos++;var e=this.pos;this.pos=function(t,e,r){for(var i,n,o=0;o<e.length;o++){if((i=e.charCodeAt(o))>55295&&i<57344){if(!n){i>56319||o+1===e.length?(t[r++]=239,t[r++]=191,t[r++]=189):n=i;continue}if(i<56320){t[r++]=239,t[r++]=191,t[r++]=189,n=i;continue}i=n-55296<<10|i-56320|65536,n=null}else n&&(t[r++]=239,t[r++]=191,t[r++]=189,n=null);i<128?t[r++]=i:(i<2048?t[r++]=i>>6|192:(i<65536?t[r++]=i>>12|224:(t[r++]=i>>18|240,t[r++]=i>>12&63|128),t[r++]=i>>6&63|128),t[r++]=63&i|128)}return r}(this.buf,t,this.pos);var r=this.pos-e;r>=128&&Hs(e,r,this),this.pos=e-1,this.writeVarint(r),this.pos+=r},writeFloat:function(t){this.realloc(4),qs(this.buf,t,this.pos,!0,23,4),this.pos+=4},writeDouble:function(t){this.realloc(8),qs(this.buf,t,this.pos,!0,52,8),this.pos+=8},writeBytes:function(t){var e=t.length;this.writeVarint(e),this.realloc(e);for(var r=0;r<e;r++)this.buf[this.pos++]=t[r]},writeRawMessage:function(t,e){this.pos++;var r=this.pos;t(e,this);var i=this.pos-r;i>=128&&Hs(r,i,this),this.pos=r-1,this.writeVarint(i),this.pos+=i},writeMessage:function(t,e,r){this.writeTag(t,Gs.Bytes),this.writeRawMessage(e,r)},writePackedVarint:function(t,e){e.length&&this.writeMessage(t,Js,e)},writePackedSVarint:function(t,e){e.length&&this.writeMessage(t,Ys,e)},writePackedBoolean:function(t,e){e.length&&this.writeMessage(t,tl,e)},writePackedFloat:function(t,e){e.length&&this.writeMessage(t,Qs,e)},writePackedDouble:function(t,e){e.length&&this.writeMessage(t,$s,e)},writePackedFixed32:function(t,e){e.length&&this.writeMessage(t,el,e)},writePackedSFixed32:function(t,e){e.length&&this.writeMessage(t,rl,e)},writePackedFixed64:function(t,e){e.length&&this.writeMessage(t,il,e)},writePackedSFixed64:function(t,e){e.length&&this.writeMessage(t,nl,e)},writeBytesField:function(t,e){this.writeTag(t,Gs.Bytes),this.writeBytes(e)},writeFixed32Field:function(t,e){this.writeTag(t,Gs.Fixed32),this.writeFixed32(e)},writeSFixed32Field:function(t,e){this.writeTag(t,Gs.Fixed32),this.writeSFixed32(e)},writeFixed64Field:function(t,e){this.writeTag(t,Gs.Fixed64),this.writeFixed64(e)},writeSFixed64Field:function(t,e){this.writeTag(t,Gs.Fixed64),this.writeSFixed64(e)},writeVarintField:function(t,e){this.writeTag(t,Gs.Varint),this.writeVarint(e)},writeSVarintField:function(t,e){this.writeTag(t,Gs.Varint),this.writeSVarint(e)},writeStringField:function(t,e){this.writeTag(t,Gs.Bytes),this.writeString(e)},writeFloatField:function(t,e){this.writeTag(t,Gs.Fixed32),this.writeFloat(e)},writeDoubleField:function(t,e){this.writeTag(t,Gs.Fixed64),this.writeDouble(e)},writeBooleanField:function(t,e){this.writeVarintField(t,Boolean(e))}};var hl=function(t,e){var r=e.pixelRatio,i=e.version,n=e.stretchX,o=e.stretchY,a=e.content;this.paddedRect=t,this.pixelRatio=r,this.stretchX=n,this.stretchY=o,this.content=a,this.version=i},fl={tl:{configurable:!0},br:{configurable:!0},tlbr:{configurable:!0},displaySize:{configurable:!0}};fl.tl.get=function(){return[this.paddedRect.x+1,this.paddedRect.y+1]},fl.br.get=function(){return[this.paddedRect.x+this.paddedRect.w-1,this.paddedRect.y+this.paddedRect.h-1]},fl.tlbr.get=function(){return this.tl.concat(this.br)},fl.displaySize.get=function(){return[(this.paddedRect.w-2)/this.pixelRatio,(this.paddedRect.h-2)/this.pixelRatio]},Object.defineProperties(hl.prototype,fl);var dl=function(t,e){var r={},i={};this.haveRenderCallbacks=[];var n=[];this.addImages(t,r,n),this.addImages(e,i,n);var o=pl(n),a=new da({width:o.w||1,height:o.h||1});for(var s in t){var l=t[s],u=r[s].paddedRect;da.copy(l.data,a,{x:0,y:0},{x:u.x+1,y:u.y+1},l.data)}for(var c in e){var p=e[c],h=i[c].paddedRect,f=h.x+1,d=h.y+1,m=p.data.width,y=p.data.height;da.copy(p.data,a,{x:0,y:0},{x:f,y:d},p.data),da.copy(p.data,a,{x:0,y:y-1},{x:f,y:d-1},{width:m,height:1}),da.copy(p.data,a,{x:0,y:0},{x:f,y:d+y},{width:m,height:1}),da.copy(p.data,a,{x:m-1,y:0},{x:f-1,y:d},{width:1,height:y}),da.copy(p.data,a,{x:0,y:0},{x:f+m,y:d},{width:1,height:y})}this.image=a,this.iconPositions=r,this.patternPositions=i};dl.prototype.addImages=function(t,e,r){for(var i in t){var n=t[i],o={x:0,y:0,w:n.data.width+2,h:n.data.height+2};r.push(o),e[i]=new hl(o,n),n.hasRenderCallback&&this.haveRenderCallbacks.push(i)}},dl.prototype.patchUpdatedImages=function(t,e){for(var r in t.dispatchRenderCallbacks(this.haveRenderCallbacks),t.updatedImages)this.patchUpdatedImage(this.iconPositions[r],t.getImage(r),e),this.patchUpdatedImage(this.patternPositions[r],t.getImage(r),e)},dl.prototype.patchUpdatedImage=function(t,e,r){if(t&&e&&t.version!==e.version){t.version=e.version;var i=t.tl;r.update(e.data,void 0,{x:i[0],y:i[1]})}},Li("ImagePosition",hl),Li("ImageAtlas",dl);var ml={horizontal:1,vertical:2,horizontalOnly:3},yl=function(){this.scale=1,this.fontStack="",this.imageName=null};yl.forText=function(t,e){var r=new yl;return r.scale=t||1,r.fontStack=e,r},yl.forImage=function(t){var e=new yl;return e.imageName=t,e};var gl=function(){this.text="",this.sectionIndex=[],this.sections=[],this.imageSectionID=null};function _l(t,e,r,i,n,o,a,s,l,u,c,p,h,f,d,m){var y,g=gl.fromFeature(t,n);p===ml.vertical&&g.verticalizePunctuation();var _=rn.processBidirectionalText,v=rn.processStyledBidirectionalText;if(_&&1===g.sections.length){y=[];for(var x=0,b=_(g.toString(),Il(g,u,o,e,i,f,d));x<b.length;x+=1){var w=b[x],S=new gl;S.text=w,S.sections=g.sections;for(var T=0;T<w.length;T++)S.sectionIndex.push(0);y.push(S)}}else if(v){y=[];for(var I=0,E=v(g.text,g.sectionIndex,Il(g,u,o,e,i,f,d));I<E.length;I+=1){var A=E[I],z=new gl;z.text=A[0],z.sectionIndex=A[1],z.sections=g.sections,y.push(z)}}else y=function(t,e){for(var r=[],i=t.text,n=0,o=0,a=e;o<a.length;o+=1){var s=a[o];r.push(t.substring(n,s)),n=s}return n<i.length&&r.push(t.substring(n,i.length)),r}(g,Il(g,u,o,e,i,f,d));var P=[],C={positionedLines:P,text:g.toString(),top:c[1],bottom:c[1],left:c[0],right:c[0],writingMode:p,iconsInText:!1,verticalizable:!1};return function(t,e,r,i,n,o,a,s,l,u,c,p){for(var h=0,f=-17,d=0,m=0,y="right"===s?1:"left"===s?0:.5,g=0,_=0,v=n;_<v.length;_+=1){var x=v[_];x.trim();var b=x.getMaxScale(),w=24*(b-1),S={positionedGlyphs:[],lineOffset:0};t.positionedLines[g]=S;var T=S.positionedGlyphs,I=0;if(x.length()){for(var E=0;E<x.length();E++){var A=x.getSection(E),z=x.getSectionIndex(E),P=x.getCharCode(E),C=0,k=null,M=null,D=null,L=24,B=!(l===ml.horizontal||!c&&!qi(P)||c&&(vl[P]||(Z=P,Ni.Arabic(Z)||Ni["Arabic Supplement"](Z)||Ni["Arabic Extended-A"](Z)||Ni["Arabic Presentation Forms-A"](Z)||Ni["Arabic Presentation Forms-B"](Z))));if(A.imageName){var R=i[A.imageName];if(!R)continue;D=A.imageName,t.iconsInText=t.iconsInText||!0,M=R.paddedRect;var F=R.displaySize;A.scale=24*A.scale/p,C=w+(24-F[1]*A.scale),L=(k={width:F[0],height:F[1],left:1,top:-3,advance:B?F[1]:F[0]}).advance;var O=B?F[0]*A.scale-24*b:F[1]*A.scale-24*b;O>0&&O>I&&(I=O)}else{var U=r[A.fontStack],V=U&&U[P];if(V&&V.rect)M=V.rect,k=V.metrics;else{var N=e[A.fontStack],j=N&&N[P];if(!j)continue;k=j.metrics}C=24*(b-A.scale)}B?(t.verticalizable=!0,T.push({glyph:P,imageName:D,x:h,y:f+C,vertical:B,scale:A.scale,fontStack:A.fontStack,sectionIndex:z,metrics:k,rect:M}),h+=L*A.scale+u):(T.push({glyph:P,imageName:D,x:h,y:f+C,vertical:B,scale:A.scale,fontStack:A.fontStack,sectionIndex:z,metrics:k,rect:M}),h+=k.advance*A.scale+u)}0!==T.length&&(d=Math.max(h-u,d),Al(T,0,T.length-1,y,I)),h=0;var q=o*b+I;S.lineOffset=Math.max(I,w),f+=q,m=Math.max(q,m),++g}else f+=o,++g}var Z,G=f- -17,X=El(a),W=X.horizontalAlign,K=X.verticalAlign;(function(t,e,r,i,n,o,a,s,l){var u,c=(e-r)*n;u=o!==a?-s*i- -17:(-i*l+.5)*a;for(var p=0,h=t;p<h.length;p+=1)for(var f=0,d=h[p].positionedGlyphs;f<d.length;f+=1){var m=d[f];m.x+=c,m.y+=u}})(t.positionedLines,y,W,K,d,m,o,G,n.length),t.top+=-K*G,t.bottom=t.top+G,t.left+=-W*d,t.right=t.left+d}(C,e,r,i,y,a,s,l,p,u,h,m),!function(t){for(var e=0,r=P;e<r.length;e+=1)if(0!==r[e].positionedGlyphs.length)return!1;return!0}()&&C}gl.fromFeature=function(t,e){for(var r=new gl,i=0;i<t.sections.length;i++){var n=t.sections[i];n.image?r.addImageSection(n):r.addTextSection(n,e)}return r},gl.prototype.length=function(){return this.text.length},gl.prototype.getSection=function(t){return this.sections[this.sectionIndex[t]]},gl.prototype.getSectionIndex=function(t){return this.sectionIndex[t]},gl.prototype.getCharCode=function(t){return this.text.charCodeAt(t)},gl.prototype.verticalizePunctuation=function(){this.text=function(t){for(var e="",r=0;r<t.length;r++){var i=t.charCodeAt(r+1)||null,n=t.charCodeAt(r-1)||null;e+=i&&Zi(i)&&!Ns[t[r+1]]||n&&Zi(n)&&!Ns[t[r-1]]||!Ns[t[r]]?t[r]:Ns[t[r]]}return e}(this.text)},gl.prototype.trim=function(){for(var t=0,e=0;e<this.text.length&&vl[this.text.charCodeAt(e)];e++)t++;for(var r=this.text.length,i=this.text.length-1;i>=0&&i>=t&&vl[this.text.charCodeAt(i)];i--)r--;this.text=this.text.substring(t,r),this.sectionIndex=this.sectionIndex.slice(t,r)},gl.prototype.substring=function(t,e){var r=new gl;return r.text=this.text.substring(t,e),r.sectionIndex=this.sectionIndex.slice(t,e),r.sections=this.sections,r},gl.prototype.toString=function(){return this.text},gl.prototype.getMaxScale=function(){var t=this;return this.sectionIndex.reduce(function(e,r){return Math.max(e,t.sections[r].scale)},0)},gl.prototype.addTextSection=function(t,e){this.text+=t.text,this.sections.push(yl.forText(t.scale,t.fontStack||e));for(var r=this.sections.length-1,i=0;i<t.text.length;++i)this.sectionIndex.push(r)},gl.prototype.addImageSection=function(t){var e=t.image?t.image.name:"";if(0!==e.length){var r=this.getNextImageSectionCharCode();r?(this.text+=String.fromCharCode(r),this.sections.push(yl.forImage(e)),this.sectionIndex.push(this.sections.length-1)):b("Reached maximum number of images 6401")}else b("Can't add FormattedSection with an empty image.")},gl.prototype.getNextImageSectionCharCode=function(){return this.imageSectionID?this.imageSectionID>=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)};var vl={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},xl={};function bl(t,e,r,i,n,o){if(e.imageName){var a=i[e.imageName];return a?a.displaySize[0]*e.scale*24/o+n:0}var s=r[e.fontStack],l=s&&s[t];return l?l.metrics.advance*e.scale+n:0}function wl(t,e,r,i){var n=Math.pow(t-e,2);return i?t<e?n/2:2*n:n+Math.abs(r)*r}function Sl(t,e,r){var i=0;return 10===t&&(i-=1e4),r&&(i+=150),40!==t&&65288!==t||(i+=50),41!==e&&65289!==e||(i+=50),i}function Tl(t,e,r,i,n,o){for(var a=null,s=wl(e,r,n,o),l=0,u=i;l<u.length;l+=1){var c=u[l],p=wl(e-c.x,r,n,o)+c.badness;p<=s&&(a=c,s=p)}return{index:t,x:e,priorBreak:a,badness:s}}function Il(t,e,r,i,n,o,a){if("point"!==o)return[];if(!t)return[];for(var s,l=[],u=function(t,e,r,i,n,o){for(var a=0,s=0;s<t.length();s++){var l=t.getSection(s);a+=bl(t.getCharCode(s),l,i,n,e,o)}return a/Math.max(1,Math.ceil(a/r))}(t,e,r,i,n,a),c=t.text.indexOf("​")>=0,p=0,h=0;h<t.length();h++){var f=t.getSection(h),d=t.getCharCode(h);if(vl[d]||(p+=bl(d,f,i,n,e,a)),h<t.length()-1){var m=!((s=d)<11904||!(Ni["Bopomofo Extended"](s)||Ni.Bopomofo(s)||Ni["CJK Compatibility Forms"](s)||Ni["CJK Compatibility Ideographs"](s)||Ni["CJK Compatibility"](s)||Ni["CJK Radicals Supplement"](s)||Ni["CJK Strokes"](s)||Ni["CJK Symbols and Punctuation"](s)||Ni["CJK Unified Ideographs Extension A"](s)||Ni["CJK Unified Ideographs"](s)||Ni["Enclosed CJK Letters and Months"](s)||Ni["Halfwidth and Fullwidth Forms"](s)||Ni.Hiragana(s)||Ni["Ideographic Description Characters"](s)||Ni["Kangxi Radicals"](s)||Ni["Katakana Phonetic Extensions"](s)||Ni.Katakana(s)||Ni["Vertical Forms"](s)||Ni["Yi Radicals"](s)||Ni["Yi Syllables"](s)));(xl[d]||m||f.imageName)&&l.push(Tl(h+1,p,u,l,Sl(d,t.getCharCode(h+1),m&&c),!1))}}return function t(e){return e?t(e.priorBreak).concat(e.index):[]}(Tl(t.length(),p,u,l,0,!0))}function El(t){var e=.5,r=.5;switch(t){case"right":case"top-right":case"bottom-right":e=1;break;case"left":case"top-left":case"bottom-left":e=0}switch(t){case"bottom":case"bottom-right":case"bottom-left":r=1;break;case"top":case"top-right":case"top-left":r=0}return{horizontalAlign:e,verticalAlign:r}}function Al(t,e,r,i,n){if(i||n)for(var o=t[r],a=(t[r].x+o.metrics.advance*o.scale)*i,s=e;s<=r;s++)t[s].x-=a,t[s].y+=n}function zl(t,e,r,i,n,o){var a,s=t.image;if(s.content){var l=s.content,u=s.pixelRatio||1;a=[l[0]/u,l[1]/u,s.displaySize[0]-l[2]/u,s.displaySize[1]-l[3]/u]}var c,p,h,f,d=e.left*o,m=e.right*o;"width"===r||"both"===r?(f=n[0]+d-i[3],p=n[0]+m+i[1]):p=(f=n[0]+(d+m-s.displaySize[0])/2)+s.displaySize[0];var y=e.top*o,g=e.bottom*o;return"height"===r||"both"===r?(c=n[1]+y-i[0],h=n[1]+g+i[2]):h=(c=n[1]+(y+g-s.displaySize[1])/2)+s.displaySize[1],{image:s,top:c,right:p,bottom:h,left:f,collisionPadding:a}}xl[10]=!0,xl[32]=!0,xl[38]=!0,xl[40]=!0,xl[41]=!0,xl[43]=!0,xl[45]=!0,xl[47]=!0,xl[173]=!0,xl[183]=!0,xl[8203]=!0,xl[8208]=!0,xl[8211]=!0,xl[8231]=!0;var Pl=function(t){function e(e,r,i,n){t.call(this,e,r),this.angle=i,void 0!==n&&(this.segment=n)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.clone=function(){return new e(this.x,this.y,this.angle,this.segment)},e}(n);function Cl(t,e){var r=e.expression;if("constant"===r.kind)return{kind:"constant",layoutSize:r.evaluate(new nn(t+1))};if("source"===r.kind)return{kind:"source"};for(var i=r.zoomStops,n=r.interpolationType,o=0;o<i.length&&i[o]<=t;)o++;for(var a=o=Math.max(0,o-1);a<i.length&&i[a]<t+1;)a++;a=Math.min(i.length-1,a);var s=i[o],l=i[a];return"composite"===r.kind?{kind:"composite",minZoom:s,maxZoom:l,interpolationType:n}:{kind:"camera",minZoom:s,maxZoom:l,minSize:r.evaluate(new nn(s)),maxSize:r.evaluate(new nn(l)),interpolationType:n}}function kl(t,e,r){var i=e.uSize,n=r.lowerSize;return"source"===t.kind?n/128:"composite"===t.kind?Ne(n/128,r.upperSize/128,e.uSizeT):i}function Ml(t,e){var r=0,i=0;if("constant"===t.kind)i=t.layoutSize;else if("source"!==t.kind){var n=t.interpolationType,o=n?l(rr.interpolationFactor(n,e,t.minZoom,t.maxZoom),0,1):0;"camera"===t.kind?i=Ne(t.minSize,t.maxSize,o):r=o}return{uSizeT:r,uSize:i}}Li("Anchor",Pl);var Dl=Object.freeze({__proto__:null,getSizeData:Cl,evaluateSizeForFeature:kl,evaluateSizeForZoom:Ml,SIZE_PACK_FACTOR:128});function Ll(t,e,r,i,n){if(void 0===e.segment)return!0;for(var o=e,a=e.segment+1,s=0;s>-r/2;){if(--a<0)return!1;s-=t[a].dist(o),o=t[a]}s+=t[a].dist(t[a+1]),a++;for(var l=[],u=0;s<r/2;){var c=t[a],p=t[a+1];if(!p)return!1;var h=t[a-1].angleTo(c)-c.angleTo(p);for(h=Math.abs((h+3*Math.PI)%(2*Math.PI)-Math.PI),l.push({distance:s,angleDelta:h}),u+=h;s-l[0].distance>i;)u-=l.shift().angleDelta;if(u>n)return!1;a++,s+=c.dist(p)}return!0}function Bl(t){for(var e=0,r=0;r<t.length-1;r++)e+=t[r].dist(t[r+1]);return e}function Rl(t,e,r){return t?.6*e*r:0}function Fl(t,e){return Math.max(t?t.right-t.left:0,e?e.right-e.left:0)}function Ol(t,e,r,i,n,o){for(var a=Rl(r,n,o),s=Fl(r,i)*o,l=0,u=Bl(t)/2,c=0;c<t.length-1;c++){var p=t[c],h=t[c+1],f=p.dist(h);if(l+f>u){var d=(u-l)/f,m=Ne(p.x,h.x,d),y=Ne(p.y,h.y,d),g=new Pl(m,y,h.angleTo(p),c);return g._round(),!a||Ll(t,g,s,a,e)?g:void 0}l+=f}}function Ul(t,e,r,i,n,o,a,s,l){var u=Rl(i,o,a),c=Fl(i,n),p=c*a,h=0===t[0].x||t[0].x===l||0===t[0].y||t[0].y===l;return e-p<e/4&&(e=p+e/4),function t(e,r,i,n,o,a,s,l,u){for(var c=a/2,p=Bl(e),h=0,f=r-i,d=[],m=0;m<e.length-1;m++){for(var y=e[m],g=e[m+1],_=y.dist(g),v=g.angleTo(y);f+i<h+_;){var x=((f+=i)-h)/_,b=Ne(y.x,g.x,x),w=Ne(y.y,g.y,x);if(b>=0&&b<u&&w>=0&&w<u&&f-c>=0&&f+c<=p){var S=new Pl(b,w,v,m);S._round(),n&&!Ll(e,S,a,n,o)||d.push(S)}}h+=_}return l||d.length||s||(d=t(e,h/2,i,n,o,a,s,!0,u)),d}(t,h?e/2*s%e:(c/2+2*o)*a*s%e,e,u,r,p,h,!1,l)}function Vl(t,e,r,i,o){for(var a=[],s=0;s<t.length;s++)for(var l=t[s],u=void 0,c=0;c<l.length-1;c++){var p=l[c],h=l[c+1];p.x<e&&h.x<e||(p.x<e?p=new n(e,p.y+(e-p.x)/(h.x-p.x)*(h.y-p.y))._round():h.x<e&&(h=new n(e,p.y+(e-p.x)/(h.x-p.x)*(h.y-p.y))._round()),p.y<r&&h.y<r||(p.y<r?p=new n(p.x+(r-p.y)/(h.y-p.y)*(h.x-p.x),r)._round():h.y<r&&(h=new n(p.x+(r-p.y)/(h.y-p.y)*(h.x-p.x),r)._round()),p.x>=i&&h.x>=i||(p.x>=i?p=new n(i,p.y+(i-p.x)/(h.x-p.x)*(h.y-p.y))._round():h.x>=i&&(h=new n(i,p.y+(i-p.x)/(h.x-p.x)*(h.y-p.y))._round()),p.y>=o&&h.y>=o||(p.y>=o?p=new n(p.x+(o-p.y)/(h.y-p.y)*(h.x-p.x),o)._round():h.y>=o&&(h=new n(p.x+(o-p.y)/(h.y-p.y)*(h.x-p.x),o)._round()),u&&p.equals(u[u.length-1])||a.push(u=[p]),u.push(h)))))}return a}function Nl(t,e,r,i){var o=[],a=t.image,s=a.pixelRatio,l=a.paddedRect.w-2,u=a.paddedRect.h-2,c=t.right-t.left,p=t.bottom-t.top,h=a.stretchX||[[0,l]],f=a.stretchY||[[0,u]],d=function(t,e){return t+e[1]-e[0]},m=h.reduce(d,0),y=f.reduce(d,0),g=l-m,_=u-y,v=0,x=m,b=0,w=y,S=0,T=g,I=0,E=_;if(a.content&&i){var A=a.content;v=jl(h,0,A[0]),b=jl(f,0,A[1]),x=jl(h,A[0],A[2]),w=jl(f,A[1],A[3]),S=A[0]-v,I=A[1]-b,T=A[2]-A[0]-x,E=A[3]-A[1]-w}var z=function(i,o,l,u){var h=Zl(i.stretch-v,x,c,t.left),f=Gl(i.fixed-S,T,i.stretch,m),d=Zl(o.stretch-b,w,p,t.top),g=Gl(o.fixed-I,E,o.stretch,y),_=Zl(l.stretch-v,x,c,t.left),A=Gl(l.fixed-S,T,l.stretch,m),z=Zl(u.stretch-b,w,p,t.top),P=Gl(u.fixed-I,E,u.stretch,y),C=new n(h,d),k=new n(_,d),M=new n(_,z),D=new n(h,z),L=new n(f/s,g/s),B=new n(A/s,P/s),R=e*Math.PI/180;if(R){var F=Math.sin(R),O=Math.cos(R),U=[O,-F,F,O];C._matMult(U),k._matMult(U),D._matMult(U),M._matMult(U)}var V=i.stretch+i.fixed,N=o.stretch+o.fixed;return{tl:C,tr:k,bl:D,br:M,tex:{x:a.paddedRect.x+1+V,y:a.paddedRect.y+1+N,w:l.stretch+l.fixed-V,h:u.stretch+u.fixed-N},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:L,pixelOffsetBR:B,minFontScaleX:T/s/c,minFontScaleY:E/s/p,isSDF:r}};if(i&&(a.stretchX||a.stretchY))for(var P=ql(h,g,m),C=ql(f,_,y),k=0;k<P.length-1;k++)for(var M=P[k],D=P[k+1],L=0;L<C.length-1;L++)o.push(z(M,C[L],D,C[L+1]));else o.push(z({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:l+1},{fixed:0,stretch:u+1}));return o}function jl(t,e,r){for(var i=0,n=0,o=t;n<o.length;n+=1){var a=o[n];i+=Math.max(e,Math.min(r,a[1]))-Math.max(e,Math.min(r,a[0]))}return i}function ql(t,e,r){for(var i=[{fixed:-1,stretch:0}],n=0,o=t;n<o.length;n+=1){var a=o[n],s=a[0],l=a[1],u=i[i.length-1];i.push({fixed:s-u.stretch,stretch:u.stretch}),i.push({fixed:s-u.stretch,stretch:u.stretch+(l-s)})}return i.push({fixed:e+1,stretch:r}),i}function Zl(t,e,r,i){return t/e*r+i}function Gl(t,e,r,i){return t-e*r/i}var Xl=function(t,e,r,i,o,a,s,l,u,c){if(this.boxStartIndex=t.length,u){var p=a.top,h=a.bottom,f=a.collisionPadding;f&&(p-=f[1],h+=f[3]);var d=h-p;d>0&&(d=Math.max(10,d),this.circleDiameter=d)}else{var m=a.top*s-l,y=a.bottom*s+l,g=a.left*s-l,_=a.right*s+l,v=a.collisionPadding;if(v&&(g-=v[0]*s,m-=v[1]*s,_+=v[2]*s,y+=v[3]*s),c){var x=new n(g,m),b=new n(_,m),w=new n(g,y),S=new n(_,y),T=c*Math.PI/180;x._rotate(T),b._rotate(T),w._rotate(T),S._rotate(T),g=Math.min(x.x,b.x,w.x,S.x),_=Math.max(x.x,b.x,w.x,S.x),m=Math.min(x.y,b.y,w.y,S.y),y=Math.max(x.y,b.y,w.y,S.y)}t.emplaceBack(e.x,e.y,g,m,_,y,r,i,o)}this.boxEndIndex=t.length},Wl=function(t,e){if(void 0===t&&(t=[]),void 0===e&&(e=Kl),this.data=t,this.length=this.data.length,this.compare=e,this.length>0)for(var r=(this.length>>1)-1;r>=0;r--)this._down(r)};function Kl(t,e){return t<e?-1:t>e?1:0}function Hl(t,e,r){void 0===e&&(e=1),void 0===r&&(r=!1);for(var i=1/0,o=1/0,a=-1/0,s=-1/0,l=t[0],u=0;u<l.length;u++){var c=l[u];(!u||c.x<i)&&(i=c.x),(!u||c.y<o)&&(o=c.y),(!u||c.x>a)&&(a=c.x),(!u||c.y>s)&&(s=c.y)}var p=Math.min(a-i,s-o),h=p/2,f=new Wl([],Jl);if(0===p)return new n(i,o);for(var d=i;d<a;d+=p)for(var m=o;m<s;m+=p)f.push(new Yl(d+h,m+h,h,t));for(var y=function(t){for(var e=0,r=0,i=0,n=t[0],o=0,a=n.length,s=a-1;o<a;s=o++){var l=n[o],u=n[s],c=l.x*u.y-u.x*l.y;r+=(l.x+u.x)*c,i+=(l.y+u.y)*c,e+=3*c}return new Yl(r/e,i/e,0,t)}(t),g=f.length;f.length;){var _=f.pop();(_.d>y.d||!y.d)&&(y=_,r&&console.log("found best %d after %d probes",Math.round(1e4*_.d)/1e4,g)),_.max-y.d<=e||(f.push(new Yl(_.p.x-(h=_.h/2),_.p.y-h,h,t)),f.push(new Yl(_.p.x+h,_.p.y-h,h,t)),f.push(new Yl(_.p.x-h,_.p.y+h,h,t)),f.push(new Yl(_.p.x+h,_.p.y+h,h,t)),g+=4)}return r&&(console.log("num probes: "+g),console.log("best distance: "+y.d)),y.p}function Jl(t,e){return e.max-t.max}function Yl(t,e,r,i){this.p=new n(t,e),this.h=r,this.d=function(t,e){for(var r=!1,i=1/0,n=0;n<e.length;n++)for(var o=e[n],a=0,s=o.length,l=s-1;a<s;l=a++){var u=o[a],c=o[l];u.y>t.y!=c.y>t.y&&t.x<(c.x-u.x)*(t.y-u.y)/(c.y-u.y)+u.x&&(r=!r),i=Math.min(i,Xo(t,u,c))}return(r?1:-1)*Math.sqrt(i)}(this.p,i),this.max=this.d+this.h*Math.SQRT2}Wl.prototype.push=function(t){this.data.push(t),this.length++,this._up(this.length-1)},Wl.prototype.pop=function(){if(0!==this.length){var t=this.data[0],e=this.data.pop();return this.length--,this.length>0&&(this.data[0]=e,this._down(0)),t}},Wl.prototype.peek=function(){return this.data[0]},Wl.prototype._up=function(t){for(var e=this.data,r=this.compare,i=e[t];t>0;){var n=t-1>>1,o=e[n];if(r(i,o)>=0)break;e[t]=o,t=n}e[t]=i},Wl.prototype._down=function(t){for(var e=this.data,r=this.compare,i=this.length>>1,n=e[t];t<i;){var o=1+(t<<1),a=e[o],s=o+1;if(s<this.length&&r(e[s],a)<0&&(o=s,a=e[s]),r(a,n)>=0)break;e[t]=a,t=o}e[t]=n};var Ql=Number.POSITIVE_INFINITY;function $l(t,e){return e[1]!==Ql?function(t,e,r){var i=0,n=0;switch(e=Math.abs(e),r=Math.abs(r),t){case"top-right":case"top-left":case"top":n=r-7;break;case"bottom-right":case"bottom-left":case"bottom":n=7-r}switch(t){case"top-right":case"bottom-right":case"right":i=-e;break;case"top-left":case"bottom-left":case"left":i=e}return[i,n]}(t,e[0],e[1]):function(t,e){var r=0,i=0;e<0&&(e=0);var n=e/Math.sqrt(2);switch(t){case"top-right":case"top-left":i=n-7;break;case"bottom-right":case"bottom-left":i=7-n;break;case"bottom":i=7-e;break;case"top":i=e-7}switch(t){case"top-right":case"bottom-right":r=-n;break;case"top-left":case"bottom-left":r=n;break;case"left":r=e;break;case"right":r=-e}return[r,i]}(t,e[0])}function tu(t){switch(t){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function eu(t,e,r,i,o,a,s,l,u,c,p,h,f,d,m){var y=function(t,e,r,i,o,a,s,l){for(var u=i.layout.get("text-rotate").evaluate(a,{})*Math.PI/180,c=[],p=0,h=e.positionedLines;p<h.length;p+=1)for(var f=h[p],d=0,m=f.positionedGlyphs;d<m.length;d+=1){var y=m[d];if(y.rect){var g=y.rect||{},_=4,v=!0,x=1,b=0,w=(o||l)&&y.vertical,S=y.metrics.advance*y.scale/2;if(l&&e.verticalizable&&(b=f.lineOffset/2-(y.imageName?-(24-y.metrics.width*y.scale)/2:24*(y.scale-1))),y.imageName){var T=s[y.imageName];v=T.sdf,_=1/(x=T.pixelRatio)}var I=o?[y.x+S,y.y]:[0,0],E=o?[0,0]:[y.x+S+r[0],y.y+r[1]-b],A=[0,0];w&&(A=E,E=[0,0]);var z=(y.metrics.left-_)*y.scale-S+E[0],P=(-y.metrics.top-_)*y.scale+E[1],C=z+g.w*y.scale/x,k=P+g.h*y.scale/x,M=new n(z,P),D=new n(C,P),L=new n(z,k),B=new n(C,k);if(w){var R=new n(-S,S- -17),F=-Math.PI/2,O=12-S,U=new n(22-O,-(y.imageName?O:0)),V=new(Function.prototype.bind.apply(n,[null].concat(A)));M._rotateAround(F,R)._add(U)._add(V),D._rotateAround(F,R)._add(U)._add(V),L._rotateAround(F,R)._add(U)._add(V),B._rotateAround(F,R)._add(U)._add(V)}if(u){var N=Math.sin(u),j=Math.cos(u),q=[j,-N,N,j];M._matMult(q),D._matMult(q),L._matMult(q),B._matMult(q)}var Z=new n(0,0),G=new n(0,0);c.push({tl:M,tr:D,bl:L,br:B,tex:g,writingMode:e.writingMode,glyphOffset:I,sectionIndex:y.sectionIndex,isSDF:v,pixelOffsetTL:Z,pixelOffsetBR:G,minFontScaleX:0,minFontScaleY:0})}}return c}(0,r,l,o,a,s,i,t.allowVerticalPlacement),g=t.textSizeData,_=null;"source"===g.kind?(_=[128*o.layout.get("text-size").evaluate(s,{})])[0]>32640&&b(t.layerIds[0]+': Value for "text-size" is >= 255. Reduce your "text-size".'):"composite"===g.kind&&((_=[128*d.compositeTextSizes[0].evaluate(s,{},m),128*d.compositeTextSizes[1].evaluate(s,{},m)])[0]>32640||_[1]>32640)&&b(t.layerIds[0]+': Value for "text-size" is >= 255. Reduce your "text-size".'),t.addSymbols(t.text,y,_,l,a,s,c,e,u.lineStartIndex,u.lineLength,f,m);for(var v=0,x=p;v<x.length;v+=1)h[x[v]]=t.text.placedSymbolArray.length-1;return 4*y.length}function ru(t){for(var e in t)return t[e];return null}function iu(t,e,r,i){var n=t.compareText;if(e in n){for(var o=n[e],a=o.length-1;a>=0;a--)if(i.dist(o[a])<r)return!0}else n[e]=[];return n[e].push(i),!1}var nu=ms.VectorTileFeature.types,ou=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];function au(t,e,r,i,n,o,a,s,l,u,c,p,h){var f=s?Math.min(32640,Math.round(s[0])):0,d=s?Math.min(32640,Math.round(s[1])):0;t.emplaceBack(e,r,Math.round(32*i),Math.round(32*n),o,a,(f<<1)+(l?1:0),d,16*u,16*c,256*p,256*h)}function su(t,e,r){t.emplaceBack(e.x,e.y,r),t.emplaceBack(e.x,e.y,r),t.emplaceBack(e.x,e.y,r),t.emplaceBack(e.x,e.y,r)}function lu(t){for(var e=0,r=t.sections;e<r.length;e+=1)if(Wi(r[e].text))return!0;return!1}var uu=function(t){this.layoutVertexArray=new Cn,this.indexArray=new Fn,this.programConfigurations=t,this.segments=new no,this.dynamicLayoutVertexArray=new kn,this.opacityVertexArray=new Mn,this.placedSymbolArray=new Jn};uu.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length&&0===this.indexArray.length&&0===this.dynamicLayoutVertexArray.length&&0===this.opacityVertexArray.length},uu.prototype.upload=function(t,e,r,i){this.isEmpty()||(r&&(this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,Bs.members),this.indexBuffer=t.createIndexBuffer(this.indexArray,e),this.dynamicLayoutVertexBuffer=t.createVertexBuffer(this.dynamicLayoutVertexArray,Rs.members,!0),this.opacityVertexBuffer=t.createVertexBuffer(this.opacityVertexArray,ou,!0),this.opacityVertexBuffer.itemSize=1),(r||i)&&this.programConfigurations.upload(t))},uu.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy())},Li("SymbolBuffers",uu);var cu=function(t,e,r){this.layoutVertexArray=new t,this.layoutAttributes=e,this.indexArray=new r,this.segments=new no,this.collisionVertexArray=new Rn};cu.prototype.upload=function(t){this.layoutVertexBuffer=t.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=t.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=t.createVertexBuffer(this.collisionVertexArray,Fs.members,!0)},cu.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy())},Li("CollisionBuffers",cu);var pu=function(t){this.collisionBoxArray=t.collisionBoxArray,this.zoom=t.zoom,this.overscaling=t.overscaling,this.layers=t.layers,this.layerIds=this.layers.map(function(t){return t.id}),this.index=t.index,this.pixelRatio=t.pixelRatio,this.sourceLayerIndex=t.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[],this.placementInvProjMatrix=ra([]),this.placementViewportMatrix=ra([]);var e=this.layers[0]._unevaluatedLayout._values;this.textSizeData=Cl(this.zoom,e["text-size"]),this.iconSizeData=Cl(this.zoom,e["icon-size"]);var r=this.layers[0].layout,i=r.get("symbol-sort-key"),n=r.get("symbol-z-order");this.sortFeaturesByKey="viewport-y"!==n&&void 0!==i.constantOr(1),this.sortFeaturesByY=("viewport-y"===n||"auto"===n&&!this.sortFeaturesByKey)&&(r.get("text-allow-overlap")||r.get("icon-allow-overlap")||r.get("text-ignore-placement")||r.get("icon-ignore-placement")),"point"===r.get("symbol-placement")&&(this.writingModes=r.get("text-writing-mode").map(function(t){return ml[t]})),this.stateDependentLayerIds=this.layers.filter(function(t){return t.isStateDependent()}).map(function(t){return t.id}),this.sourceID=t.sourceID};pu.prototype.createArrays=function(){this.text=new uu(new Mo(Bs.members,this.layers,this.zoom,function(t){return/^text/.test(t)})),this.icon=new uu(new Mo(Bs.members,this.layers,this.zoom,function(t){return/^icon/.test(t)})),this.glyphOffsetArray=new $n,this.lineVertexArray=new to,this.symbolInstances=new Qn},pu.prototype.calculateGlyphDependencies=function(t,e,r,i,n){for(var o=0;o<t.length;o++)if(e[t.charCodeAt(o)]=!0,(r||i)&&n){var a=Ns[t.charAt(o)];a&&(e[a.charCodeAt(0)]=!0)}},pu.prototype.populate=function(t,e,r){var i=this.layers[0],n=i.layout,o=n.get("text-font"),a=n.get("text-field"),s=n.get("icon-image"),l=("constant"!==a.value.kind||a.value.value instanceof te&&!a.value.value.isEmpty()||a.value.value.toString().length>0)&&("constant"!==o.value.kind||o.value.value.length>0),u="constant"!==s.value.kind||!!s.value.value||Object.keys(s.parameters).length>0,c=n.get("symbol-sort-key");if(this.features=[],l||u){for(var p=e.iconDependencies,h=e.glyphDependencies,f=e.availableImages,d=new nn(this.zoom),m=0,y=t;m<y.length;m+=1){var g=y[m],_=g.feature,v=g.id,x=g.index,b=g.sourceLayerIndex,w=i._featureFilter.needGeometry,S={type:_.type,id:v,properties:_.properties,geometry:w?Ro(_):[]};if(i._featureFilter.filter(d,S,r)){w||(S.geometry=Ro(_));var T=void 0;if(l){var I=i.getValueAndResolveTokens("text-field",S,r,f),E=te.factory(I);lu(E)&&(this.hasRTLText=!0),(!this.hasRTLText||"unavailable"===tn()||this.hasRTLText&&rn.isParsed())&&(T=Vs(E,i,S))}var A=void 0;if(u){var z=i.getValueAndResolveTokens("icon-image",S,r,f);A=z instanceof ee?z:ee.fromString(z)}if(T||A){var P=this.sortFeaturesByKey?c.evaluate(S,{},r):void 0,C={id:v,text:T,icon:A,index:x,sourceLayerIndex:b,geometry:Ro(_),properties:_.properties,type:nu[_.type],sortKey:P};if(this.features.push(C),A&&(p[A.name]=!0),T){var k=o.evaluate(S,{},r).join(","),M="map"===n.get("text-rotation-alignment")&&"point"!==n.get("symbol-placement");this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(ml.vertical)>=0;for(var D=0,L=T.sections;D<L.length;D+=1){var B=L[D];if(B.image)p[B.image.name]=!0;else{var R=ji(T.toString()),F=B.fontStack||k,O=h[F]=h[F]||{};this.calculateGlyphDependencies(B.text,O,M,this.allowVerticalPlacement,R)}}}}}}"line"===n.get("symbol-placement")&&(this.features=function(t){var e={},r={},i=[],n=0;function o(e){i.push(t[e]),n++}function a(t,e,n){var o=r[t];return delete r[t],r[e]=o,i[o].geometry[0].pop(),i[o].geometry[0]=i[o].geometry[0].concat(n[0]),o}function s(t,r,n){var o=e[r];return delete e[r],e[t]=o,i[o].geometry[0].shift(),i[o].geometry[0]=n[0].concat(i[o].geometry[0]),o}function l(t,e,r){var i=r?e[0][e[0].length-1]:e[0][0];return t+":"+i.x+":"+i.y}for(var u=0;u<t.length;u++){var c=t[u],p=c.geometry,h=c.text?c.text.toString():null;if(h){var f=l(h,p),d=l(h,p,!0);if(f in r&&d in e&&r[f]!==e[d]){var m=s(f,d,p),y=a(f,d,i[m].geometry);delete e[f],delete r[d],r[l(h,i[y].geometry,!0)]=y,i[m].geometry=null}else f in r?a(f,d,p):d in e?s(f,d,p):(o(u),e[f]=n-1,r[d]=n-1)}else o(u)}return i.filter(function(t){return t.geometry})}(this.features)),this.sortFeaturesByKey&&this.features.sort(function(t,e){return t.sortKey-e.sortKey})}},pu.prototype.update=function(t,e,r){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(t,e,this.layers,r),this.icon.programConfigurations.updatePaintArrays(t,e,this.layers,r))},pu.prototype.isEmpty=function(){return 0===this.symbolInstances.length&&!this.hasRTLText},pu.prototype.uploadPending=function(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload},pu.prototype.upload=function(t){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(t),this.iconCollisionBox.upload(t)),this.text.upload(t,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(t,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0},pu.prototype.destroyDebugData=function(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()},pu.prototype.destroy=function(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()},pu.prototype.addToLineVertexArray=function(t,e){var r=this.lineVertexArray.length;if(void 0!==t.segment){for(var i=t.dist(e[t.segment+1]),n=t.dist(e[t.segment]),o={},a=t.segment+1;a<e.length;a++)o[a]={x:e[a].x,y:e[a].y,tileUnitDistanceFromAnchor:i},a<e.length-1&&(i+=e[a+1].dist(e[a]));for(var s=t.segment||0;s>=0;s--)o[s]={x:e[s].x,y:e[s].y,tileUnitDistanceFromAnchor:n},s>0&&(n+=e[s-1].dist(e[s]));for(var l=0;l<e.length;l++){var u=o[l];this.lineVertexArray.emplaceBack(u.x,u.y,u.tileUnitDistanceFromAnchor)}}return{lineStartIndex:r,lineLength:this.lineVertexArray.length-r}},pu.prototype.addSymbols=function(t,e,r,i,n,o,a,s,l,u,c,p){for(var h=t.indexArray,f=t.layoutVertexArray,d=t.segments.prepareSegment(4*e.length,f,h,o.sortKey),m=this.glyphOffsetArray.length,y=d.vertexLength,g=this.allowVerticalPlacement&&a===ml.vertical?Math.PI/2:0,_=o.text&&o.text.sections,v=0;v<e.length;v++){var x=e[v],b=x.tl,w=x.tr,S=x.bl,T=x.br,I=x.tex,E=x.pixelOffsetTL,A=x.pixelOffsetBR,z=x.minFontScaleX,P=x.minFontScaleY,C=x.glyphOffset,k=x.isSDF,M=x.sectionIndex,D=d.vertexLength,L=C[1];au(f,s.x,s.y,b.x,L+b.y,I.x,I.y,r,k,E.x,E.y,z,P),au(f,s.x,s.y,w.x,L+w.y,I.x+I.w,I.y,r,k,A.x,E.y,z,P),au(f,s.x,s.y,S.x,L+S.y,I.x,I.y+I.h,r,k,E.x,A.y,z,P),au(f,s.x,s.y,T.x,L+T.y,I.x+I.w,I.y+I.h,r,k,A.x,A.y,z,P),su(t.dynamicLayoutVertexArray,s,g),h.emplaceBack(D,D+1,D+2),h.emplaceBack(D+1,D+2,D+3),d.vertexLength+=4,d.primitiveLength+=2,this.glyphOffsetArray.emplaceBack(C[0]),v!==e.length-1&&M===e[v+1].sectionIndex||t.programConfigurations.populatePaintArrays(f.length,o,o.index,{},p,_&&_[M])}t.placedSymbolArray.emplaceBack(s.x,s.y,m,this.glyphOffsetArray.length-m,y,l,u,s.segment,r?r[0]:0,r?r[1]:0,i[0],i[1],a,0,!1,0,c)},pu.prototype._addCollisionDebugVertex=function(t,e,r,i,n,o){return e.emplaceBack(0,0),t.emplaceBack(r.x,r.y,i,n,Math.round(o.x),Math.round(o.y))},pu.prototype.addCollisionDebugVertices=function(t,e,r,i,o,a,s){var l=o.segments.prepareSegment(4,o.layoutVertexArray,o.indexArray),u=l.vertexLength,c=o.layoutVertexArray,p=o.collisionVertexArray,h=s.anchorX,f=s.anchorY;this._addCollisionDebugVertex(c,p,a,h,f,new n(t,e)),this._addCollisionDebugVertex(c,p,a,h,f,new n(r,e)),this._addCollisionDebugVertex(c,p,a,h,f,new n(r,i)),this._addCollisionDebugVertex(c,p,a,h,f,new n(t,i)),l.vertexLength+=4;var d=o.indexArray;d.emplaceBack(u,u+1),d.emplaceBack(u+1,u+2),d.emplaceBack(u+2,u+3),d.emplaceBack(u+3,u),l.primitiveLength+=4},pu.prototype.addDebugCollisionBoxes=function(t,e,r,i){for(var n=t;n<e;n++){var o=this.collisionBoxArray.get(n);this.addCollisionDebugVertices(o.x1,o.y1,o.x2,o.y2,i?this.textCollisionBox:this.iconCollisionBox,o.anchorPoint,r)}},pu.prototype.generateCollisionDebugBuffers=function(){this.hasDebugData()&&this.destroyDebugData(),this.textCollisionBox=new cu(Ln,Os.members,qn),this.iconCollisionBox=new cu(Ln,Os.members,qn);for(var t=0;t<this.symbolInstances.length;t++){var e=this.symbolInstances.get(t);this.addDebugCollisionBoxes(e.textBoxStartIndex,e.textBoxEndIndex,e,!0),this.addDebugCollisionBoxes(e.verticalTextBoxStartIndex,e.verticalTextBoxEndIndex,e,!0),this.addDebugCollisionBoxes(e.iconBoxStartIndex,e.iconBoxEndIndex,e,!1),this.addDebugCollisionBoxes(e.verticalIconBoxStartIndex,e.verticalIconBoxEndIndex,e,!1)}},pu.prototype._deserializeCollisionBoxesForSymbol=function(t,e,r,i,n,o,a,s,l){for(var u={},c=e;c<r;c++){var p=t.get(c);u.textBox={x1:p.x1,y1:p.y1,x2:p.x2,y2:p.y2,anchorPointX:p.anchorPointX,anchorPointY:p.anchorPointY},u.textFeatureIndex=p.featureIndex;break}for(var h=i;h<n;h++){var f=t.get(h);u.verticalTextBox={x1:f.x1,y1:f.y1,x2:f.x2,y2:f.y2,anchorPointX:f.anchorPointX,anchorPointY:f.anchorPointY},u.verticalTextFeatureIndex=f.featureIndex;break}for(var d=o;d<a;d++){var m=t.get(d);u.iconBox={x1:m.x1,y1:m.y1,x2:m.x2,y2:m.y2,anchorPointX:m.anchorPointX,anchorPointY:m.anchorPointY},u.iconFeatureIndex=m.featureIndex;break}for(var y=s;y<l;y++){var g=t.get(y);u.verticalIconBox={x1:g.x1,y1:g.y1,x2:g.x2,y2:g.y2,anchorPointX:g.anchorPointX,anchorPointY:g.anchorPointY},u.verticalIconFeatureIndex=g.featureIndex;break}return u},pu.prototype.deserializeCollisionBoxes=function(t){this.collisionArrays=[];for(var e=0;e<this.symbolInstances.length;e++){var r=this.symbolInstances.get(e);this.collisionArrays.push(this._deserializeCollisionBoxesForSymbol(t,r.textBoxStartIndex,r.textBoxEndIndex,r.verticalTextBoxStartIndex,r.verticalTextBoxEndIndex,r.iconBoxStartIndex,r.iconBoxEndIndex,r.verticalIconBoxStartIndex,r.verticalIconBoxEndIndex))}},pu.prototype.hasTextData=function(){return this.text.segments.get().length>0},pu.prototype.hasIconData=function(){return this.icon.segments.get().length>0},pu.prototype.hasDebugData=function(){return this.textCollisionBox&&this.iconCollisionBox},pu.prototype.hasTextCollisionBoxData=function(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0},pu.prototype.hasIconCollisionBoxData=function(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0},pu.prototype.addIndicesForPlacedSymbol=function(t,e){for(var r=t.placedSymbolArray.get(e),i=r.vertexStartIndex+4*r.numGlyphs,n=r.vertexStartIndex;n<i;n+=4)t.indexArray.emplaceBack(n,n+1,n+2),t.indexArray.emplaceBack(n+1,n+2,n+3)},pu.prototype.getSortedSymbolIndexes=function(t){if(this.sortedAngle===t&&void 0!==this.symbolInstanceIndexes)return this.symbolInstanceIndexes;for(var e=Math.sin(t),r=Math.cos(t),i=[],n=[],o=[],a=0;a<this.symbolInstances.length;++a){o.push(a);var s=this.symbolInstances.get(a);i.push(0|Math.round(e*s.anchorX+r*s.anchorY)),n.push(s.featureIndex)}return o.sort(function(t,e){return i[t]-i[e]||n[e]-n[t]}),o},pu.prototype.addToSortKeyRanges=function(t,e){var r=this.sortKeyRanges[this.sortKeyRanges.length-1];r&&r.sortKey===e?r.symbolInstanceEnd=t+1:this.sortKeyRanges.push({sortKey:e,symbolInstanceStart:t,symbolInstanceEnd:t+1})},pu.prototype.sortFeatures=function(t){var e=this;if(this.sortFeaturesByY&&this.sortedAngle!==t&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(t),this.sortedAngle=t,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var r=0,i=this.symbolInstanceIndexes;r<i.length;r+=1){var n=this.symbolInstances.get(i[r]);this.featureSortOrder.push(n.featureIndex),[n.rightJustifiedTextSymbolIndex,n.centerJustifiedTextSymbolIndex,n.leftJustifiedTextSymbolIndex].forEach(function(t,r,i){t>=0&&i.indexOf(t)===r&&e.addIndicesForPlacedSymbol(e.text,t)}),n.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,n.verticalPlacedTextSymbolIndex),n.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,n.placedIconSymbolIndex),n.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,n.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},Li("SymbolBucket",pu,{omit:["layers","collisionBoxArray","features","compareText"]}),pu.MAX_GLYPHS=65535,pu.addDynamicAttributes=su;var hu=new _n({"symbol-placement":new fn(Et.layout_symbol["symbol-placement"]),"symbol-spacing":new fn(Et.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new fn(Et.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new dn(Et.layout_symbol["symbol-sort-key"]),"symbol-z-order":new fn(Et.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new fn(Et.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new fn(Et.layout_symbol["icon-ignore-placement"]),"icon-optional":new fn(Et.layout_symbol["icon-optional"]),"icon-rotation-alignment":new fn(Et.layout_symbol["icon-rotation-alignment"]),"icon-size":new dn(Et.layout_symbol["icon-size"]),"icon-text-fit":new fn(Et.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new fn(Et.layout_symbol["icon-text-fit-padding"]),"icon-image":new dn(Et.layout_symbol["icon-image"]),"icon-rotate":new dn(Et.layout_symbol["icon-rotate"]),"icon-padding":new fn(Et.layout_symbol["icon-padding"]),"icon-keep-upright":new fn(Et.layout_symbol["icon-keep-upright"]),"icon-offset":new dn(Et.layout_symbol["icon-offset"]),"icon-anchor":new dn(Et.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new fn(Et.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new fn(Et.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new fn(Et.layout_symbol["text-rotation-alignment"]),"text-field":new dn(Et.layout_symbol["text-field"]),"text-font":new dn(Et.layout_symbol["text-font"]),"text-size":new dn(Et.layout_symbol["text-size"]),"text-max-width":new dn(Et.layout_symbol["text-max-width"]),"text-line-height":new fn(Et.layout_symbol["text-line-height"]),"text-letter-spacing":new dn(Et.layout_symbol["text-letter-spacing"]),"text-justify":new dn(Et.layout_symbol["text-justify"]),"text-radial-offset":new dn(Et.layout_symbol["text-radial-offset"]),"text-variable-anchor":new fn(Et.layout_symbol["text-variable-anchor"]),"text-anchor":new dn(Et.layout_symbol["text-anchor"]),"text-max-angle":new fn(Et.layout_symbol["text-max-angle"]),"text-writing-mode":new fn(Et.layout_symbol["text-writing-mode"]),"text-rotate":new dn(Et.layout_symbol["text-rotate"]),"text-padding":new fn(Et.layout_symbol["text-padding"]),"text-keep-upright":new fn(Et.layout_symbol["text-keep-upright"]),"text-transform":new dn(Et.layout_symbol["text-transform"]),"text-offset":new dn(Et.layout_symbol["text-offset"]),"text-allow-overlap":new fn(Et.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new fn(Et.layout_symbol["text-ignore-placement"]),"text-optional":new fn(Et.layout_symbol["text-optional"])}),fu={paint:new _n({"icon-opacity":new dn(Et.paint_symbol["icon-opacity"]),"icon-color":new dn(Et.paint_symbol["icon-color"]),"icon-halo-color":new dn(Et.paint_symbol["icon-halo-color"]),"icon-halo-width":new dn(Et.paint_symbol["icon-halo-width"]),"icon-halo-blur":new dn(Et.paint_symbol["icon-halo-blur"]),"icon-translate":new fn(Et.paint_symbol["icon-translate"]),"icon-translate-anchor":new fn(Et.paint_symbol["icon-translate-anchor"]),"text-opacity":new dn(Et.paint_symbol["text-opacity"]),"text-color":new dn(Et.paint_symbol["text-color"],{runtimeType:Ot,getOverride:function(t){return t.textColor},hasOverride:function(t){return!!t.textColor}}),"text-halo-color":new dn(Et.paint_symbol["text-halo-color"]),"text-halo-width":new dn(Et.paint_symbol["text-halo-width"]),"text-halo-blur":new dn(Et.paint_symbol["text-halo-blur"]),"text-translate":new fn(Et.paint_symbol["text-translate"]),"text-translate-anchor":new fn(Et.paint_symbol["text-translate-anchor"])}),layout:hu},du=function(t){this.type=t.property.overrides?t.property.overrides.runtimeType:Lt,this.defaultValue=t};du.prototype.evaluate=function(t){if(t.formattedSection){var e=this.defaultValue.property.overrides;if(e&&e.hasOverride(t.formattedSection))return e.getOverride(t.formattedSection)}return t.feature&&t.featureState?this.defaultValue.evaluate(t.feature,t.featureState):this.defaultValue.property.specification.default},du.prototype.eachChild=function(t){this.defaultValue.isConstant()||t(this.defaultValue.value._styleExpression.expression)},du.prototype.outputDefined=function(){return!1},du.prototype.serialize=function(){return null},Li("FormatSectionOverride",du,{omit:["defaultValue"]});var mu=function(t){function e(e){t.call(this,e,fu)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.recalculate=function(e,r){if(t.prototype.recalculate.call(this,e,r),"auto"===this.layout.get("icon-rotation-alignment")&&(this.layout._values["icon-rotation-alignment"]="point"!==this.layout.get("symbol-placement")?"map":"viewport"),"auto"===this.layout.get("text-rotation-alignment")&&(this.layout._values["text-rotation-alignment"]="point"!==this.layout.get("symbol-placement")?"map":"viewport"),"auto"===this.layout.get("text-pitch-alignment")&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")),"auto"===this.layout.get("icon-pitch-alignment")&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),"point"===this.layout.get("symbol-placement")){var i=this.layout.get("text-writing-mode");if(i){for(var n=[],o=0,a=i;o<a.length;o+=1){var s=a[o];n.indexOf(s)<0&&n.push(s)}this.layout._values["text-writing-mode"]=n}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()},e.prototype.getValueAndResolveTokens=function(t,e,r,i){var n=this.layout.get(t).evaluate(e,{},r,i),o=this._unevaluatedLayout._values[t];return o.isDataDriven()||jr(o.value)||!n?n:function(t,e){return n.replace(/{([^{}]+)}/g,function(e,r){return r in t?String(t[r]):""})}(e.properties)},e.prototype.createBucket=function(t){return new pu(t)},e.prototype.queryRadius=function(){return 0},e.prototype.queryIntersectsFeature=function(){return!1},e.prototype._setPaintOverrides=function(){for(var t=0,r=fu.paint.overridableProperties;t<r.length;t+=1){var i=r[t];if(e.hasPaintOverride(this.layout,i)){var n,o=this.paint.get(i),a=new du(o),s=new Nr(a,o.property.specification);n="constant"===o.value.kind||"source"===o.value.kind?new Zr("source",s):new Gr("composite",s,o.value.zoomStops,o.value._interpolationType),this.paint._values[i]=new pn(o.property,n,o.parameters)}}},e.prototype._handleOverridablePaintPropertyUpdate=function(t,r,i){return!(!this.layout||r.isDataDriven()||i.isDataDriven())&&e.hasPaintOverride(this.layout,t)},e.hasPaintOverride=function(t,e){var r=t.get("text-field"),i=fu.paint.properties[e],n=!1,o=function(t){for(var e=0,r=t;e<r.length;e+=1)if(i.overrides&&i.overrides.hasOverride(r[e]))return void(n=!0)};if("constant"===r.value.kind&&r.value.value instanceof te)o(r.value.value.sections);else if("source"===r.value.kind){var a=function(t){n||(t instanceof ae&&ne(t.value)===jt?o(t.value.sections):t instanceof ce?o(t.sections):t.eachChild(a))},s=r.value;s._styleExpression&&a(s._styleExpression.expression)}return n},e}(vn),yu={paint:new _n({"background-color":new fn(Et.paint_background["background-color"]),"background-pattern":new yn(Et.paint_background["background-pattern"]),"background-opacity":new fn(Et.paint_background["background-opacity"])})},gu=function(t){function e(e){t.call(this,e,yu)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e}(vn),_u={paint:new _n({"raster-opacity":new fn(Et.paint_raster["raster-opacity"]),"raster-hue-rotate":new fn(Et.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new fn(Et.paint_raster["raster-brightness-min"]),"raster-brightness-max":new fn(Et.paint_raster["raster-brightness-max"]),"raster-saturation":new fn(Et.paint_raster["raster-saturation"]),"raster-contrast":new fn(Et.paint_raster["raster-contrast"]),"raster-resampling":new fn(Et.paint_raster["raster-resampling"]),"raster-fade-duration":new fn(Et.paint_raster["raster-fade-duration"])})},vu=function(t){function e(e){t.call(this,e,_u)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e}(vn),xu=function(t){function e(e){t.call(this,e,{}),this.implementation=e}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.is3D=function(){return"3d"===this.implementation.renderingMode},e.prototype.hasOffscreenPass=function(){return void 0!==this.implementation.prerender},e.prototype.recalculate=function(){},e.prototype.updateTransitions=function(){},e.prototype.hasTransition=function(){},e.prototype.serialize=function(){},e.prototype.onAdd=function(t){this.implementation.onAdd&&this.implementation.onAdd(t,t.painter.context.gl)},e.prototype.onRemove=function(t){this.implementation.onRemove&&this.implementation.onRemove(t,t.painter.context.gl)},e}(vn),bu={circle:sa,heatmap:ga,hillshade:va,fill:os,"fill-extrusion":ws,line:Ds,symbol:mu,background:gu,raster:vu},wu=self.HTMLImageElement,Su=self.HTMLCanvasElement,Tu=self.HTMLVideoElement,Iu=self.ImageData,Eu=self.ImageBitmap,Au=function(t,e,r,i){this.context=t,this.format=r,this.texture=t.gl.createTexture(),this.update(e,i)};Au.prototype.update=function(t,e,r){var i=t.width,n=t.height,o=!(this.size&&this.size[0]===i&&this.size[1]===n||r),a=this.context,s=a.gl;if(this.useMipmap=Boolean(e&&e.useMipmap),s.bindTexture(s.TEXTURE_2D,this.texture),a.pixelStoreUnpackFlipY.set(!1),a.pixelStoreUnpack.set(1),a.pixelStoreUnpackPremultiplyAlpha.set(this.format===s.RGBA&&(!e||!1!==e.premultiply)),o)this.size=[i,n],t instanceof wu||t instanceof Su||t instanceof Tu||t instanceof Iu||Eu&&t instanceof Eu?s.texImage2D(s.TEXTURE_2D,0,this.format,this.format,s.UNSIGNED_BYTE,t):s.texImage2D(s.TEXTURE_2D,0,this.format,i,n,0,this.format,s.UNSIGNED_BYTE,t.data);else{var l=r||{x:0,y:0},u=l.x,c=l.y;t instanceof wu||t instanceof Su||t instanceof Tu||t instanceof Iu||Eu&&t instanceof Eu?s.texSubImage2D(s.TEXTURE_2D,0,u,c,s.RGBA,s.UNSIGNED_BYTE,t):s.texSubImage2D(s.TEXTURE_2D,0,u,c,i,n,s.RGBA,s.UNSIGNED_BYTE,t.data)}this.useMipmap&&this.isSizePowerOfTwo()&&s.generateMipmap(s.TEXTURE_2D)},Au.prototype.bind=function(t,e,r){var i=this.context.gl;i.bindTexture(i.TEXTURE_2D,this.texture),r!==i.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(r=i.LINEAR),t!==this.filter&&(i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,t),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,r||t),this.filter=t),e!==this.wrap&&(i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,e),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,e),this.wrap=e)},Au.prototype.isSizePowerOfTwo=function(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0},Au.prototype.destroy=function(){this.context.gl.deleteTexture(this.texture),this.texture=null};var zu=function(t){var e=this;this._callback=t,this._triggered=!1,"undefined"!=typeof MessageChannel&&(this._channel=new MessageChannel,this._channel.port2.onmessage=function(){e._triggered=!1,e._callback()})};zu.prototype.trigger=function(){var t=this;this._triggered||(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout(function(){t._triggered=!1,t._callback()},0))},zu.prototype.remove=function(){delete this._channel,this._callback=function(){}};var Pu=function(t,e,r){this.target=t,this.parent=e,this.mapId=r,this.callbacks={},this.tasks={},this.taskQueue=[],this.cancelCallbacks={},m(["receive","process"],this),this.invoker=new zu(this.process),this.target.addEventListener("message",this.receive,!1),this.globalScope=T()?t:self};function Cu(t,e,r){var i=2*Math.PI*6378137/256/Math.pow(2,r);return[t*i-2*Math.PI*6378137/2,e*i-2*Math.PI*6378137/2]}Pu.prototype.send=function(t,e,r,i,n){var o=this;void 0===n&&(n=!1);var a=Math.round(1e18*Math.random()).toString(36).substring(0,10);r&&(this.callbacks[a]=r);var s=A(this.globalScope)?void 0:[];return this.target.postMessage({id:a,type:t,hasCallback:!!r,targetMapId:i,mustQueue:n,sourceMapId:this.mapId,data:Oi(e,s)},s),{cancel:function(){r&&delete o.callbacks[a],o.target.postMessage({id:a,type:"<cancel>",targetMapId:i,sourceMapId:o.mapId})}}},Pu.prototype.receive=function(t){var e=t.data,r=e.id;if(r&&(!e.targetMapId||this.mapId===e.targetMapId))if("<cancel>"===e.type){delete this.tasks[r];var i=this.cancelCallbacks[r];delete this.cancelCallbacks[r],i&&i()}else T()||e.mustQueue?(this.tasks[r]=e,this.taskQueue.push(r),this.invoker.trigger()):this.processTask(r,e)},Pu.prototype.process=function(){if(this.taskQueue.length){var t=this.taskQueue.shift(),e=this.tasks[t];delete this.tasks[t],this.taskQueue.length&&this.invoker.trigger(),e&&this.processTask(t,e)}},Pu.prototype.processTask=function(t,e){var r=this;if("<response>"===e.type){var i=this.callbacks[t];delete this.callbacks[t],i&&(e.error?i(Ui(e.error)):i(null,Ui(e.data)))}else{var n=!1,o=A(this.globalScope)?void 0:[],a=e.hasCallback?function(e,i){n=!0,delete r.cancelCallbacks[t],r.target.postMessage({id:t,type:"<response>",sourceMapId:r.mapId,error:e?Oi(e):null,data:Oi(i,o)},o)}:function(t){n=!0},s=null,l=Ui(e.data);if(this.parent[e.type])s=this.parent[e.type](e.sourceMapId,l,a);else if(this.parent.getWorkerSource){var u=e.type.split(".");s=this.parent.getWorkerSource(e.sourceMapId,u[0],l.source)[u[1]](l,a)}else a(new Error("Could not find function "+e.type));!n&&s&&s.cancel&&(this.cancelCallbacks[t]=s.cancel)}},Pu.prototype.remove=function(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)};var ku=function(t,e){t&&(e?this.setSouthWest(t).setNorthEast(e):4===t.length?this.setSouthWest([t[0],t[1]]).setNorthEast([t[2],t[3]]):this.setSouthWest(t[0]).setNorthEast(t[1]))};ku.prototype.setNorthEast=function(t){return this._ne=t instanceof Mu?new Mu(t.lng,t.lat):Mu.convert(t),this},ku.prototype.setSouthWest=function(t){return this._sw=t instanceof Mu?new Mu(t.lng,t.lat):Mu.convert(t),this},ku.prototype.extend=function(t){var e,r,i=this._sw,n=this._ne;if(t instanceof Mu)e=t,r=t;else{if(!(t instanceof ku))return Array.isArray(t)?4===t.length||t.every(Array.isArray)?this.extend(ku.convert(t)):this.extend(Mu.convert(t)):this;if(r=t._ne,!(e=t._sw)||!r)return this}return i||n?(i.lng=Math.min(e.lng,i.lng),i.lat=Math.min(e.lat,i.lat),n.lng=Math.max(r.lng,n.lng),n.lat=Math.max(r.lat,n.lat)):(this._sw=new Mu(e.lng,e.lat),this._ne=new Mu(r.lng,r.lat)),this},ku.prototype.getCenter=function(){return new Mu((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},ku.prototype.getSouthWest=function(){return this._sw},ku.prototype.getNorthEast=function(){return this._ne},ku.prototype.getNorthWest=function(){return new Mu(this.getWest(),this.getNorth())},ku.prototype.getSouthEast=function(){return new Mu(this.getEast(),this.getSouth())},ku.prototype.getWest=function(){return this._sw.lng},ku.prototype.getSouth=function(){return this._sw.lat},ku.prototype.getEast=function(){return this._ne.lng},ku.prototype.getNorth=function(){return this._ne.lat},ku.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},ku.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},ku.prototype.isEmpty=function(){return!(this._sw&&this._ne)},ku.prototype.contains=function(t){var e=Mu.convert(t),r=e.lng,i=e.lat,n=this._sw.lng<=r&&r<=this._ne.lng;return this._sw.lng>this._ne.lng&&(n=this._sw.lng>=r&&r>=this._ne.lng),this._sw.lat<=i&&i<=this._ne.lat&&n},ku.convert=function(t){return!t||t instanceof ku?t:new ku(t)};var Mu=function(t,e){if(isNaN(t)||isNaN(e))throw new Error("Invalid LngLat object: ("+t+", "+e+")");if(this.lng=+t,this.lat=+e,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")};Mu.prototype.wrap=function(){return new Mu(u(this.lng,-180,180),this.lat)},Mu.prototype.toArray=function(){return[this.lng,this.lat]},Mu.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},Mu.prototype.distanceTo=function(t){var e=Math.PI/180,r=this.lat*e,i=t.lat*e,n=Math.sin(r)*Math.sin(i)+Math.cos(r)*Math.cos(i)*Math.cos((t.lng-this.lng)*e);return 6371008.8*Math.acos(Math.min(n,1))},Mu.prototype.toBounds=function(t){void 0===t&&(t=0);var e=360*t/40075017,r=e/Math.cos(Math.PI/180*this.lat);return new ku(new Mu(this.lng-r,this.lat-e),new Mu(this.lng+r,this.lat+e))},Mu.convert=function(t){if(t instanceof Mu)return t;if(Array.isArray(t)&&(2===t.length||3===t.length))return new Mu(Number(t[0]),Number(t[1]));if(!Array.isArray(t)&&"object"==typeof t&&null!==t)return new Mu(Number("lng"in t?t.lng:t.lon),Number(t.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: <lng>, lat: <lat>}, an object {lon: <lng>, lat: <lat>}, or an array of [<lng>, <lat>]")};var Du=2*Math.PI*6371008.8;function Lu(t){return Du*Math.cos(t*Math.PI/180)}function Bu(t){return(180+t)/360}function Ru(t){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+t*Math.PI/360)))/360}function Fu(t,e){return t/Lu(e)}function Ou(t){return 360/Math.PI*Math.atan(Math.exp((180-360*t)*Math.PI/180))-90}var Uu=function(t,e,r){void 0===r&&(r=0),this.x=+t,this.y=+e,this.z=+r};Uu.fromLngLat=function(t,e){void 0===e&&(e=0);var r=Mu.convert(t);return new Uu(Bu(r.lng),Ru(r.lat),Fu(e,r.lat))},Uu.prototype.toLngLat=function(){return new Mu(360*this.x-180,Ou(this.y))},Uu.prototype.toAltitude=function(){return this.z*Lu(Ou(this.y))},Uu.prototype.meterInMercatorCoordinateUnits=function(){return 1/Du*(t=Ou(this.y),1/Math.cos(t*Math.PI/180));var t};var Vu=function(t,e,r){this.z=t,this.x=e,this.y=r,this.key=qu(0,t,t,e,r)};Vu.prototype.equals=function(t){return this.z===t.z&&this.x===t.x&&this.y===t.y},Vu.prototype.url=function(t,e){var r,i,n,o,a,s=(i=this.y,n=this.z,o=Cu(256*(r=this.x),256*(i=Math.pow(2,n)-i-1),n),a=Cu(256*(r+1),256*(i+1),n),o[0]+","+o[1]+","+a[0]+","+a[1]),l=function(t,e,r){for(var i,n="",o=t;o>0;o--)n+=(e&(i=1<<o-1)?1:0)+(r&i?2:0);return n}(this.z,this.x,this.y);return t[(this.x+this.y)%t.length].replace("{prefix}",(this.x%16).toString(16)+(this.y%16).toString(16)).replace("{z}",String(this.z)).replace("{x}",String(this.x)).replace("{y}",String("tms"===e?Math.pow(2,this.z)-this.y-1:this.y)).replace("{quadkey}",l).replace("{bbox-epsg-3857}",s)},Vu.prototype.getTilePoint=function(t){var e=Math.pow(2,this.z);return new n(8192*(t.x*e-this.x),8192*(t.y*e-this.y))},Vu.prototype.toString=function(){return this.z+"/"+this.x+"/"+this.y};var Nu=function(t,e){this.wrap=t,this.canonical=e,this.key=qu(t,e.z,e.z,e.x,e.y)},ju=function(t,e,r,i,n){this.overscaledZ=t,this.wrap=e,this.canonical=new Vu(r,+i,+n),this.key=qu(e,t,r,i,n)};function qu(t,e,r,i,n){(t*=2)<0&&(t=-1*t-1);var o=1<<r;return(o*o*t+o*n+i).toString(36)+r.toString(36)+e.toString(36)}ju.prototype.equals=function(t){return this.overscaledZ===t.overscaledZ&&this.wrap===t.wrap&&this.canonical.equals(t.canonical)},ju.prototype.scaledTo=function(t){var e=this.canonical.z-t;return t>this.canonical.z?new ju(t,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new ju(t,this.wrap,t,this.canonical.x>>e,this.canonical.y>>e)},ju.prototype.calculateScaledKey=function(t,e){var r=this.canonical.z-t;return t>this.canonical.z?qu(this.wrap*+e,t,this.canonical.z,this.canonical.x,this.canonical.y):qu(this.wrap*+e,t,t,this.canonical.x>>r,this.canonical.y>>r)},ju.prototype.isChildOf=function(t){if(t.wrap!==this.wrap)return!1;var e=this.canonical.z-t.canonical.z;return 0===t.overscaledZ||t.overscaledZ<this.overscaledZ&&t.canonical.x===this.canonical.x>>e&&t.canonical.y===this.canonical.y>>e},ju.prototype.children=function(t){if(this.overscaledZ>=t)return[new ju(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var e=this.canonical.z+1,r=2*this.canonical.x,i=2*this.canonical.y;return[new ju(e,this.wrap,e,r,i),new ju(e,this.wrap,e,r+1,i),new ju(e,this.wrap,e,r,i+1),new ju(e,this.wrap,e,r+1,i+1)]},ju.prototype.isLessThan=function(t){return this.wrap<t.wrap||!(this.wrap>t.wrap)&&(this.overscaledZ<t.overscaledZ||!(this.overscaledZ>t.overscaledZ)&&(this.canonical.x<t.canonical.x||!(this.canonical.x>t.canonical.x)&&this.canonical.y<t.canonical.y))},ju.prototype.wrapped=function(){return new ju(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)},ju.prototype.unwrapTo=function(t){return new ju(this.overscaledZ,t,this.canonical.z,this.canonical.x,this.canonical.y)},ju.prototype.overscaleFactor=function(){return Math.pow(2,this.overscaledZ-this.canonical.z)},ju.prototype.toUnwrapped=function(){return new Nu(this.wrap,this.canonical)},ju.prototype.toString=function(){return this.overscaledZ+"/"+this.canonical.x+"/"+this.canonical.y},ju.prototype.getTilePoint=function(t){return this.canonical.getTilePoint(new Uu(t.x-this.wrap,t.y))},Li("CanonicalTileID",Vu),Li("OverscaledTileID",ju,{omit:["posMatrix"]});var Zu=function(t,e,r){if(this.uid=t,e.height!==e.width)throw new RangeError("DEM tiles must be square");if(r&&"mapbox"!==r&&"terrarium"!==r)return b('"'+r+'" is not a valid encoding type. Valid types include "mapbox" and "terrarium".');this.stride=e.height;var i=this.dim=e.height-2;this.data=new Uint32Array(e.data.buffer),this.encoding=r||"mapbox";for(var n=0;n<i;n++)this.data[this._idx(-1,n)]=this.data[this._idx(0,n)],this.data[this._idx(i,n)]=this.data[this._idx(i-1,n)],this.data[this._idx(n,-1)]=this.data[this._idx(n,0)],this.data[this._idx(n,i)]=this.data[this._idx(n,i-1)];this.data[this._idx(-1,-1)]=this.data[this._idx(0,0)],this.data[this._idx(i,-1)]=this.data[this._idx(i-1,0)],this.data[this._idx(-1,i)]=this.data[this._idx(0,i-1)],this.data[this._idx(i,i)]=this.data[this._idx(i-1,i-1)]};Zu.prototype.get=function(t,e){var r=new Uint8Array(this.data.buffer),i=4*this._idx(t,e);return("terrarium"===this.encoding?this._unpackTerrarium:this._unpackMapbox)(r[i],r[i+1],r[i+2])},Zu.prototype.getUnpackVector=function(){return"terrarium"===this.encoding?[256,1,1/256,32768]:[6553.6,25.6,.1,1e4]},Zu.prototype._idx=function(t,e){if(t<-1||t>=this.dim+1||e<-1||e>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(e+1)*this.stride+(t+1)},Zu.prototype._unpackMapbox=function(t,e,r){return(256*t*256+256*e+r)/10-1e4},Zu.prototype._unpackTerrarium=function(t,e,r){return 256*t+e+r/256-32768},Zu.prototype.getPixels=function(){return new da({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},Zu.prototype.backfillBorder=function(t,e,r){if(this.dim!==t.dim)throw new Error("dem dimension mismatch");var i=e*this.dim,n=e*this.dim+this.dim,o=r*this.dim,a=r*this.dim+this.dim;switch(e){case-1:i=n-1;break;case 1:n=i+1}switch(r){case-1:o=a-1;break;case 1:a=o+1}for(var s=-e*this.dim,l=-r*this.dim,u=o;u<a;u++)for(var c=i;c<n;c++)this.data[this._idx(c,u)]=t.data[this._idx(c+s,u+l)]},Li("DEMData",Zu);var Gu=function(t){this._stringToNumber={},this._numberToString=[];for(var e=0;e<t.length;e++){var r=t[e];this._stringToNumber[r]=e,this._numberToString[e]=r}};Gu.prototype.encode=function(t){return this._stringToNumber[t]},Gu.prototype.decode=function(t){return this._numberToString[t]};var Xu=function(t,e,r,i,n){this.type="Feature",this._vectorTileFeature=t,t._z=e,t._x=r,t._y=i,this.properties=t.properties,this.id=n},Wu={geometry:{configurable:!0}};Wu.geometry.get=function(){return void 0===this._geometry&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry},Wu.geometry.set=function(t){this._geometry=t},Xu.prototype.toJSON=function(){var t={geometry:this.geometry};for(var e in this)"_geometry"!==e&&"_vectorTileFeature"!==e&&(t[e]=this[e]);return t},Object.defineProperties(Xu.prototype,Wu);var Ku=function(){this.state={},this.stateChanges={},this.deletedStates={}};Ku.prototype.updateState=function(t,e,r){var i=String(e);if(this.stateChanges[t]=this.stateChanges[t]||{},this.stateChanges[t][i]=this.stateChanges[t][i]||{},c(this.stateChanges[t][i],r),null===this.deletedStates[t])for(var n in this.deletedStates[t]={},this.state[t])n!==i&&(this.deletedStates[t][n]=null);else if(this.deletedStates[t]&&null===this.deletedStates[t][i])for(var o in this.deletedStates[t][i]={},this.state[t][i])r[o]||(this.deletedStates[t][i][o]=null);else for(var a in r)this.deletedStates[t]&&this.deletedStates[t][i]&&null===this.deletedStates[t][i][a]&&delete this.deletedStates[t][i][a]},Ku.prototype.removeFeatureState=function(t,e,r){if(null!==this.deletedStates[t]){var i=String(e);if(this.deletedStates[t]=this.deletedStates[t]||{},r&&void 0!==e)null!==this.deletedStates[t][i]&&(this.deletedStates[t][i]=this.deletedStates[t][i]||{},this.deletedStates[t][i][r]=null);else if(void 0!==e)if(this.stateChanges[t]&&this.stateChanges[t][i])for(r in this.deletedStates[t][i]={},this.stateChanges[t][i])this.deletedStates[t][i][r]=null;else this.deletedStates[t][i]=null;else this.deletedStates[t]=null}},Ku.prototype.getState=function(t,e){var r=String(e),i=c({},(this.state[t]||{})[r],(this.stateChanges[t]||{})[r]);if(null===this.deletedStates[t])return{};if(this.deletedStates[t]){var n=this.deletedStates[t][e];if(null===n)return{};for(var o in n)delete i[o]}return i},Ku.prototype.initializeTileState=function(t,e){t.setFeatureState(this.state,e)},Ku.prototype.coalesceChanges=function(t,e){var r={};for(var i in this.stateChanges){this.state[i]=this.state[i]||{};var n={};for(var o in this.stateChanges[i])this.state[i][o]||(this.state[i][o]={}),c(this.state[i][o],this.stateChanges[i][o]),n[o]=this.state[i][o];r[i]=n}for(var a in this.deletedStates){this.state[a]=this.state[a]||{};var s={};if(null===this.deletedStates[a])for(var l in this.state[a])s[l]={},this.state[a][l]={};else for(var u in this.deletedStates[a]){if(null===this.deletedStates[a][u])this.state[a][u]={};else for(var p=0,h=Object.keys(this.deletedStates[a][u]);p<h.length;p+=1)delete this.state[a][u][h[p]];s[u]=this.state[a][u]}r[a]=r[a]||{},c(r[a],s)}if(this.stateChanges={},this.deletedStates={},0!==Object.keys(r).length)for(var f in t)t[f].setFeatureState(r,e)};var Hu=function(t,e){this.tileID=t,this.x=t.canonical.x,this.y=t.canonical.y,this.z=t.canonical.z,this.grid=new Pi(8192,16,0),this.grid3D=new Pi(8192,16,0),this.featureIndexArray=new ro,this.promoteId=e};function Ju(t,e,r,i,n){return g(t,function(t,o){var a=e instanceof hn?e.get(o):null;return a&&a.evaluate?a.evaluate(r,i,n):a})}function Yu(t){for(var e=1/0,r=1/0,i=-1/0,n=-1/0,o=0,a=t;o<a.length;o+=1){var s=a[o];e=Math.min(e,s.x),r=Math.min(r,s.y),i=Math.max(i,s.x),n=Math.max(n,s.y)}return{minX:e,minY:r,maxX:i,maxY:n}}function Qu(t,e){return e-t}Hu.prototype.insert=function(t,e,r,i,n,o){var a=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(r,i,n);for(var s=o?this.grid3D:this.grid,l=0;l<e.length;l++){for(var u=e[l],c=[1/0,1/0,-1/0,-1/0],p=0;p<u.length;p++){var h=u[p];c[0]=Math.min(c[0],h.x),c[1]=Math.min(c[1],h.y),c[2]=Math.max(c[2],h.x),c[3]=Math.max(c[3],h.y)}c[0]<8192&&c[1]<8192&&c[2]>=0&&c[3]>=0&&s.insert(a,c[0],c[1],c[2],c[3])}},Hu.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new ms.VectorTile(new Zs(this.rawTileData)).layers,this.sourceLayerCoder=new Gu(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},Hu.prototype.query=function(t,e,r,i){var o=this;this.loadVTLayers();for(var a=t.params||{},s=8192/t.tileSize/t.scale,l=ri(a.filter),u=t.queryGeometry,c=t.queryPadding*s,p=Yu(u),h=this.grid.query(p.minX-c,p.minY-c,p.maxX+c,p.maxY+c),f=Yu(t.cameraQueryGeometry),d=0,m=this.grid3D.query(f.minX-c,f.minY-c,f.maxX+c,f.maxY+c,function(e,r,i,o){return function(t,e,r,i,o){for(var a=0,s=t;a<s.length;a+=1){var l=s[a];if(e<=l.x&&r<=l.y&&i>=l.x&&o>=l.y)return!0}var u=[new n(e,r),new n(e,o),new n(i,o),new n(i,r)];if(t.length>2)for(var c=0,p=u;c<p.length;c+=1)if(Ko(t,p[c]))return!0;for(var h=0;h<t.length-1;h++)if(Ho(t[h],t[h+1],u))return!0;return!1}(t.cameraQueryGeometry,e-c,r-c,i+c,o+c)});d<m.length;d+=1)h.push(m[d]);h.sort(Qu);for(var y,g={},_=function(n){var c=h[n];if(c!==y){y=c;var p=o.featureIndexArray.get(c),f=null;o.loadMatchingFeature(g,p.bucketIndex,p.sourceLayerIndex,p.featureIndex,l,a.layers,a.availableImages,e,r,i,function(e,r,i){return f||(f=Ro(e)),r.queryIntersectsFeature(u,e,i,f,o.z,t.transform,s,t.pixelPosMatrix)})}},v=0;v<h.length;v++)_(v);return g},Hu.prototype.loadMatchingFeature=function(t,e,r,i,n,o,a,s,l,u,c){var p=this.bucketLayerIDs[e];if(!o||function(t,e){for(var r=0;r<t.length;r++)if(e.indexOf(t[r])>=0)return!0;return!1}(o,p)){var h=this.sourceLayerCoder.decode(r),f=this.vtLayers[h].feature(i);if(n.filter(new nn(this.tileID.overscaledZ),f))for(var d=this.getId(f,h),m=0;m<p.length;m++){var y=p[m];if(!(o&&o.indexOf(y)<0)){var g=s[y];if(g){var _={};void 0!==d&&u&&(_=u.getState(g.sourceLayer||"_geojsonTileLayer",d));var v=l[y];v.paint=Ju(v.paint,g.paint,f,_,a),v.layout=Ju(v.layout,g.layout,f,_,a);var x=!c||c(f,g,_);if(x){var b=new Xu(f,this.z,this.x,this.y,d);b.layer=v;var w=t[y];void 0===w&&(w=t[y]=[]),w.push({featureIndex:i,feature:b,intersectionZ:x})}}}}}},Hu.prototype.lookupSymbolFeatures=function(t,e,r,i,n,o,a,s){var l={};this.loadVTLayers();for(var u=ri(n),c=0,p=t;c<p.length;c+=1)this.loadMatchingFeature(l,r,i,p[c],u,o,a,s,e);return l},Hu.prototype.hasLayer=function(t){for(var e=0,r=this.bucketLayerIDs;e<r.length;e+=1)for(var i=0,n=r[e];i<n.length;i+=1)if(t===n[i])return!0;return!1},Hu.prototype.getId=function(t,e){var r=t.id;return this.promoteId&&"boolean"==typeof(r=t.properties["string"==typeof this.promoteId?this.promoteId:this.promoteId[e]])&&(r=Number(r)),r},Li("FeatureIndex",Hu,{omit:["rawTileData","sourceLayerCoder"]});var $u=function(t,e){this.tileID=t,this.uid=h(),this.uses=0,this.tileSize=e,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.expiredRequestCount=0,this.state="loading"};$u.prototype.registerFadeDuration=function(t){var e=t+this.timeAdded;e<R.now()||this.fadeEndTime&&e<this.fadeEndTime||(this.fadeEndTime=e)},$u.prototype.wasRequested=function(){return"errored"===this.state||"loaded"===this.state||"reloading"===this.state},$u.prototype.loadVectorData=function(t,e,r){if(this.hasData()&&this.unloadVectorData(),this.state="loaded",t){for(var i in t.featureIndex&&(this.latestFeatureIndex=t.featureIndex,t.rawTileData?(this.latestRawTileData=t.rawTileData,this.latestFeatureIndex.rawTileData=t.rawTileData):this.latestRawTileData&&(this.latestFeatureIndex.rawTileData=this.latestRawTileData)),this.collisionBoxArray=t.collisionBoxArray,this.buckets=function(t,e){var r={};if(!e)return r;for(var i=function(){var t=o[n],i=t.layerIds.map(function(t){return e.getLayer(t)}).filter(Boolean);if(0!==i.length){t.layers=i,t.stateDependentLayerIds&&(t.stateDependentLayers=t.stateDependentLayerIds.map(function(t){return i.filter(function(e){return e.id===t})[0]}));for(var a=0,s=i;a<s.length;a+=1)r[s[a].id]=t}},n=0,o=t;n<o.length;n+=1)i();return r}(t.buckets,e.style),this.hasSymbolBuckets=!1,this.buckets){var n=this.buckets[i];if(n instanceof pu){if(this.hasSymbolBuckets=!0,!r)break;n.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(var o in this.buckets){var a=this.buckets[o];if(a instanceof pu&&a.hasRTLText){this.hasRTLText=!0,rn.isLoading()||rn.isLoaded()||"deferred"!==tn()||en();break}}for(var s in this.queryPadding=0,this.buckets){var l=this.buckets[s];this.queryPadding=Math.max(this.queryPadding,e.style.getLayer(s).queryRadius(l))}t.imageAtlas&&(this.imageAtlas=t.imageAtlas),t.glyphAtlasImage&&(this.glyphAtlasImage=t.glyphAtlasImage)}else this.collisionBoxArray=new Kn},$u.prototype.unloadVectorData=function(){for(var t in this.buckets)this.buckets[t].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.imageAtlas&&(this.imageAtlas=null),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.latestFeatureIndex=null,this.state="unloaded"},$u.prototype.getBucket=function(t){return this.buckets[t.id]},$u.prototype.upload=function(t){for(var e in this.buckets){var r=this.buckets[e];r.uploadPending()&&r.upload(t)}var i=t.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new Au(t,this.imageAtlas.image,i.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new Au(t,this.glyphAtlasImage,i.ALPHA),this.glyphAtlasImage=null)},$u.prototype.prepare=function(t){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(t,this.imageAtlasTexture)},$u.prototype.queryRenderedFeatures=function(t,e,r,i,n,o,a,s,l,u){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:i,cameraQueryGeometry:n,scale:o,tileSize:this.tileSize,pixelPosMatrix:u,transform:s,params:a,queryPadding:this.queryPadding*l},t,e,r):{}},$u.prototype.querySourceFeatures=function(t,e){var r=this.latestFeatureIndex;if(r&&r.rawTileData){var i=r.loadVTLayers(),n=e?e.sourceLayer:"",o=i._geojsonTileLayer||i[n];if(o)for(var a=ri(e&&e.filter),s=this.tileID.canonical,l=s.z,u=s.x,c=s.y,p={z:l,x:u,y:c},h=0;h<o.length;h++){var f=o.feature(h);if(a.filter(new nn(this.tileID.overscaledZ),f)){var d=r.getId(f,n),m=new Xu(f,l,u,c,d);m.tile=p,t.push(m)}}}},$u.prototype.hasData=function(){return"loaded"===this.state||"reloading"===this.state||"expired"===this.state},$u.prototype.patternsLoaded=function(){return this.imageAtlas&&!!Object.keys(this.imageAtlas.patternPositions).length},$u.prototype.setExpiryData=function(t){var e=this.expirationTime;if(t.cacheControl){var r=I(t.cacheControl);r["max-age"]&&(this.expirationTime=Date.now()+1e3*r["max-age"])}else t.expires&&(this.expirationTime=new Date(t.expires).getTime());if(this.expirationTime){var i=Date.now(),n=!1;if(this.expirationTime>i)n=!1;else if(e)if(this.expirationTime<e)n=!0;else{var o=this.expirationTime-e;o?this.expirationTime=i+Math.max(o,3e4):n=!0}else n=!0;n?(this.expiredRequestCount++,this.state="expired"):this.expiredRequestCount=0}},$u.prototype.getExpiryTimeout=function(){if(this.expirationTime)return this.expiredRequestCount?1e3*(1<<Math.min(this.expiredRequestCount-1,31)):Math.min(this.expirationTime-(new Date).getTime(),Math.pow(2,31)-1)},$u.prototype.setFeatureState=function(t,e){if(this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData&&0!==Object.keys(t).length){var r=this.latestFeatureIndex.loadVTLayers();for(var i in this.buckets)if(e.style.hasLayer(i)){var n=this.buckets[i],o=n.layers[0].sourceLayer||"_geojsonTileLayer",a=r[o],s=t[o];if(a&&s&&0!==Object.keys(s).length){n.update(s,a,this.imageAtlas&&this.imageAtlas.patternPositions||{});var l=e&&e.style&&e.style.getLayer(i);l&&(this.queryPadding=Math.max(this.queryPadding,l.queryRadius(n)))}}}},$u.prototype.holdingForFade=function(){return void 0!==this.symbolFadeHoldUntil},$u.prototype.symbolFadeFinished=function(){return!this.symbolFadeHoldUntil||this.symbolFadeHoldUntil<R.now()},$u.prototype.clearFadeHold=function(){this.symbolFadeHoldUntil=void 0},$u.prototype.setHoldDuration=function(t){this.symbolFadeHoldUntil=R.now()+t},$u.prototype.setDependencies=function(t,e){for(var r={},i=0,n=e;i<n.length;i+=1)r[n[i]]=!0;this.dependencies[t]=r},$u.prototype.hasDependency=function(t,e){for(var r=0,i=t;r<i.length;r+=1){var n=this.dependencies[i[r]];if(n)for(var o=0,a=e;o<a.length;o+=1)if(n[a[o]])return!0}return!1};var tc=self.performance,ec=function(t){this._marks={start:[t.url,"start"].join("#"),end:[t.url,"end"].join("#"),measure:t.url.toString()},tc.mark(this._marks.start)};ec.prototype.finish=function(){tc.mark(this._marks.end);var t=tc.getEntriesByName(this._marks.measure);return 0===t.length&&(tc.measure(this._marks.measure,this._marks.start,this._marks.end),t=tc.getEntriesByName(this._marks.measure),tc.clearMarks(this._marks.start),tc.clearMarks(this._marks.end),tc.clearMeasures(this._marks.measure)),t},t.Actor=Pu,t.AlphaImage=fa,t.CanonicalTileID=Vu,t.CollisionBoxArray=Kn,t.Color=Yt,t.DEMData=Zu,t.DataConstantProperty=fn,t.DictionaryCoder=Gu,t.EXTENT=8192,t.ErrorEvent=Tt,t.EvaluationParameters=nn,t.Event=St,t.Evented=It,t.FeatureIndex=Hu,t.FillBucket=rs,t.FillExtrusionBucket=vs,t.ImageAtlas=dl,t.ImagePosition=hl,t.LineBucket=Ps,t.LngLat=Mu,t.LngLatBounds=ku,t.MercatorCoordinate=Uu,t.ONE_EM=24,t.OverscaledTileID=ju,t.Point=n,t.Point$1=n,t.Properties=_n,t.Protobuf=Zs,t.RGBAImage=da,t.RequestManager=q,t.RequestPerformance=ec,t.ResourceType=ht,t.SegmentVector=no,t.SourceFeatureState=Ku,t.StructArrayLayout1ui2=Zn,t.StructArrayLayout2f1f2i16=Bn,t.StructArrayLayout2i4=In,t.StructArrayLayout3ui6=Fn,t.StructArrayLayout4i8=En,t.SymbolBucket=pu,t.Texture=Au,t.Tile=$u,t.Transitionable=sn,t.Uniform1f=_o,t.Uniform1i=go,t.Uniform2f=vo,t.Uniform3f=xo,t.Uniform4f=bo,t.UniformColor=wo,t.UniformMatrix4f=To,t.UnwrappedTileID=Nu,t.ValidationError=At,t.WritingMode=ml,t.ZoomHistory=Vi,t.add=function(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t[2]=e[2]+r[2],t},t.addDynamicAttributes=su,t.asyncAll=function(t,e,r){if(!t.length)return r(null,[]);var i=t.length,n=new Array(t.length),o=null;t.forEach(function(t,a){e(t,function(t,e){t&&(o=t),n[a]=e,0==--i&&r(o,n)})})},t.bezier=a,t.bindAll=m,t.browser=R,t.cacheEntryPossiblyAdded=function(t){++ct>at&&(t.getActor().send("enforceCacheSizeLimit",ot),ct=0)},t.clamp=l,t.clearTileCache=function(t){var e=self.caches.delete("mapbox-tiles");t&&e.catch(t).then(function(){return t()})},t.clipLine=Vl,t.clone=function(t){var e=new ea(16);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e},t.clone$1=v,t.clone$2=function(t){var e=new ea(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e},t.collisionCircleLayout=Us,t.config=F,t.create=function(){var t=new ea(16);return ea!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0),t[0]=1,t[5]=1,t[10]=1,t[15]=1,t},t.create$1=function(){var t=new ea(9);return ea!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t},t.create$2=function(){var t=new ea(4);return ea!=Float32Array&&(t[1]=0,t[2]=0),t[0]=1,t[3]=1,t},t.createCommonjsModule=e,t.createExpression=qr,t.createLayout=Sn,t.createStyleLayer=function(t){return"custom"===t.type?new xu(t):new bu[t.type](t)},t.cross=function(t,e,r){var i=e[0],n=e[1],o=e[2],a=r[0],s=r[1],l=r[2];return t[0]=n*l-o*s,t[1]=o*a-i*l,t[2]=i*s-n*a,t},t.deepEqual=function t(e,r){if(Array.isArray(e)){if(!Array.isArray(r)||e.length!==r.length)return!1;for(var i=0;i<e.length;i++)if(!t(e[i],r[i]))return!1;return!0}if("object"==typeof e&&null!==e&&null!==r){if("object"!=typeof r)return!1;if(Object.keys(e).length!==Object.keys(r).length)return!1;for(var n in e)if(!t(e[n],r[n]))return!1;return!0}return e===r},t.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]},t.dot$1=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]},t.ease=s,t.emitValidationErrors=zi,t.endsWith=y,t.enforceCacheSizeLimit=function(t){st(),Q&&Q.then(function(e){e.keys().then(function(r){for(var i=0;i<r.length-t;i++)e.delete(r[i])})})},t.evaluateSizeForFeature=kl,t.evaluateSizeForZoom=Ml,t.evaluateVariableOffset=$l,t.evented=$i,t.extend=c,t.featureFilter=ri,t.filterObject=_,t.fromRotation=function(t,e){var r=Math.sin(e),i=Math.cos(e);return t[0]=i,t[1]=r,t[2]=0,t[3]=-r,t[4]=i,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},t.getAnchorAlignment=El,t.getAnchorJustification=tu,t.getArrayBuffer=_t,t.getImage=xt,t.getJSON=function(t,e){return gt(c(t,{type:"json"}),e)},t.getRTLTextPluginStatus=tn,t.getReferrer=yt,t.getVideo=function(t,e){var r,i,n=self.document.createElement("video");n.muted=!0,n.onloadstart=function(){e(null,n)};for(var o=0;o<t.length;o++){var a=self.document.createElement("source");r=t[o],i=void 0,(i=self.document.createElement("a")).href=r,(i.protocol!==self.document.location.protocol||i.host!==self.document.location.host)&&(n.crossOrigin="Anonymous"),a.src=t[o],n.appendChild(a)}return{cancel:function(){}}},t.identity=ra,t.invert=function(t,e){var r=e[0],i=e[1],n=e[2],o=e[3],a=e[4],s=e[5],l=e[6],u=e[7],c=e[8],p=e[9],h=e[10],f=e[11],d=e[12],m=e[13],y=e[14],g=e[15],_=r*s-i*a,v=r*l-n*a,x=r*u-o*a,b=i*l-n*s,w=i*u-o*s,S=n*u-o*l,T=c*m-p*d,I=c*y-h*d,E=c*g-f*d,A=p*y-h*m,z=p*g-f*m,P=h*g-f*y,C=_*P-v*z+x*A+b*E-w*I+S*T;return C?(t[0]=(s*P-l*z+u*A)*(C=1/C),t[1]=(n*z-i*P-o*A)*C,t[2]=(m*S-y*w+g*b)*C,t[3]=(h*w-p*S-f*b)*C,t[4]=(l*E-a*P-u*I)*C,t[5]=(r*P-n*E+o*I)*C,t[6]=(y*x-d*S-g*v)*C,t[7]=(c*S-h*x+f*v)*C,t[8]=(a*z-s*E+u*T)*C,t[9]=(i*E-r*z-o*T)*C,t[10]=(d*w-m*x+g*_)*C,t[11]=(p*x-c*w-f*_)*C,t[12]=(s*I-a*A-l*T)*C,t[13]=(r*A-i*I+n*T)*C,t[14]=(m*v-d*b-y*_)*C,t[15]=(c*b-p*v+h*_)*C,t):null},t.isChar=Ni,t.isMapboxURL=Z,t.keysDifference=function(t,e){var r=[];for(var i in t)i in e||r.push(i);return r},t.makeRequest=gt,t.mapObject=g,t.mercatorXfromLng=Bu,t.mercatorYfromLat=Ru,t.mercatorZfromAltitude=Fu,t.mul=oa,t.multiply=ia,t.mvt=ms,t.normalize=function(t,e){var r=e[0],i=e[1],n=e[2],o=r*r+i*i+n*n;return o>0&&(o=1/Math.sqrt(o)),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o,t},t.number=Ne,t.offscreenCanvasSupported=pt,t.ortho=function(t,e,r,i,n,o,a){var s=1/(e-r),l=1/(i-n),u=1/(o-a);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*u,t[11]=0,t[12]=(e+r)*s,t[13]=(n+i)*l,t[14]=(a+o)*u,t[15]=1,t},t.parseGlyphPBF=function(t){return new Zs(t).readFields(ll,[])},t.pbf=Zs,t.performSymbolLayout=function(t,e,r,i,n,o,a){t.createArrays(),t.tilePixelRatio=8192/(512*t.overscaling),t.compareText={},t.iconsNeedLinear=!1;var s=t.layers[0].layout,l=t.layers[0]._unevaluatedLayout._values,u={};if("composite"===t.textSizeData.kind){var c=t.textSizeData,p=c.maxZoom;u.compositeTextSizes=[l["text-size"].possiblyEvaluate(new nn(c.minZoom),a),l["text-size"].possiblyEvaluate(new nn(p),a)]}if("composite"===t.iconSizeData.kind){var h=t.iconSizeData,f=h.maxZoom;u.compositeIconSizes=[l["icon-size"].possiblyEvaluate(new nn(h.minZoom),a),l["icon-size"].possiblyEvaluate(new nn(f),a)]}u.layoutTextSize=l["text-size"].possiblyEvaluate(new nn(t.zoom+1),a),u.layoutIconSize=l["icon-size"].possiblyEvaluate(new nn(t.zoom+1),a),u.textMaxSize=l["text-size"].possiblyEvaluate(new nn(18));for(var d=24*s.get("text-line-height"),m="map"===s.get("text-rotation-alignment")&&"point"!==s.get("symbol-placement"),y=s.get("text-keep-upright"),g=s.get("text-size"),_=function(){var o=x[v],l=s.get("text-font").evaluate(o,{},a).join(","),c=g.evaluate(o,{},a),p=u.layoutTextSize.evaluate(o,{},a),h=u.layoutIconSize.evaluate(o,{},a),f={horizontal:{},vertical:void 0},_=o.text,w=[0,0];if(_){var S=_.toString(),T=24*s.get("text-letter-spacing").evaluate(o,{},a),I=function(t){for(var e=0,r=S;e<r.length;e+=1)if(i=r[e].charCodeAt(0),Ni.Arabic(i)||Ni["Arabic Supplement"](i)||Ni["Arabic Extended-A"](i)||Ni["Arabic Presentation Forms-A"](i)||Ni["Arabic Presentation Forms-B"](i))return!1;var i;return!0}()?T:0,E=s.get("text-anchor").evaluate(o,{},a),A=s.get("text-variable-anchor");if(!A){var z=s.get("text-radial-offset").evaluate(o,{},a);w=z?$l(E,[24*z,Ql]):s.get("text-offset").evaluate(o,{},a).map(function(t){return 24*t})}var P=m?"center":s.get("text-justify").evaluate(o,{},a),C=s.get("symbol-placement"),k="point"===C?24*s.get("text-max-width").evaluate(o,{},a):0,M=function(){t.allowVerticalPlacement&&ji(S)&&(f.vertical=_l(_,e,r,n,l,k,d,E,"left",I,w,ml.vertical,!0,C,p,c))};if(!m&&A){for(var D="auto"===P?A.map(function(t){return tu(t)}):[P],L=!1,B=0;B<D.length;B++){var R=D[B];if(!f.horizontal[R])if(L)f.horizontal[R]=f.horizontal[0];else{var F=_l(_,e,r,n,l,k,d,"center",R,I,w,ml.horizontal,!1,C,p,c);F&&(f.horizontal[R]=F,L=1===F.positionedLines.length)}}M()}else{"auto"===P&&(P=tu(E));var O=_l(_,e,r,n,l,k,d,E,P,I,w,ml.horizontal,!1,C,p,c);O&&(f.horizontal[P]=O),M(),ji(S)&&m&&y&&(f.vertical=_l(_,e,r,n,l,k,d,E,P,I,w,ml.vertical,!1,C,p,c))}}var U=void 0,V=!1;if(o.icon&&o.icon.name){var N=i[o.icon.name];N&&(U=function(t,e,r){var i=El(r),n=e[0]-t.displaySize[0]*i.horizontalAlign,o=e[1]-t.displaySize[1]*i.verticalAlign;return{image:t,top:o,bottom:o+t.displaySize[1],left:n,right:n+t.displaySize[0]}}(n[o.icon.name],s.get("icon-offset").evaluate(o,{},a),s.get("icon-anchor").evaluate(o,{},a)),V=N.sdf,void 0===t.sdfIcons?t.sdfIcons=N.sdf:t.sdfIcons!==N.sdf&&b("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),(N.pixelRatio!==t.pixelRatio||0!==s.get("icon-rotate").constantOr(1))&&(t.iconsNeedLinear=!0))}var j=ru(f.horizontal)||f.vertical;t.iconsInText=!!j&&j.iconsInText,(j||U)&&function(t,e,r,i,n,o,a,s,l,u,c){var p=o.textMaxSize.evaluate(e,{});void 0===p&&(p=a);var h,f=t.layers[0].layout,d=f.get("icon-offset").evaluate(e,{},c),m=ru(r.horizontal),y=a/24,g=t.tilePixelRatio*y,_=t.tilePixelRatio*p/24,v=t.tilePixelRatio*s,x=t.tilePixelRatio*f.get("symbol-spacing"),w=f.get("text-padding")*t.tilePixelRatio,S=f.get("icon-padding")*t.tilePixelRatio,T=f.get("text-max-angle")/180*Math.PI,I="map"===f.get("text-rotation-alignment")&&"point"!==f.get("symbol-placement"),E="map"===f.get("icon-rotation-alignment")&&"point"!==f.get("symbol-placement"),A=f.get("symbol-placement"),z=x/2,P=f.get("icon-text-fit");i&&"none"!==P&&(t.allowVerticalPlacement&&r.vertical&&(h=zl(i,r.vertical,P,f.get("icon-text-fit-padding"),d,y)),m&&(i=zl(i,m,P,f.get("icon-text-fit-padding"),d,y)));var C=function(s,p){p.x<0||p.x>=8192||p.y<0||p.y>=8192||function(t,e,r,i,n,o,a,s,l,u,c,p,h,f,d,m,y,g,_,v,x,w,S,T,I){var E,A,z,P,C,k=t.addToLineVertexArray(e,r),M=0,D=0,L=0,B=0,R=-1,F=-1,O={},U=uo(""),V=0,N=0;if(void 0===s._unevaluatedLayout.getValue("text-radial-offset")?(V=(E=s.layout.get("text-offset").evaluate(x,{},T).map(function(t){return 24*t}))[0],N=E[1]):(V=24*s.layout.get("text-radial-offset").evaluate(x,{},T),N=Ql),t.allowVerticalPlacement&&i.vertical){var j=s.layout.get("text-rotate").evaluate(x,{},T)+90;P=new Xl(l,e,u,c,p,i.vertical,h,f,d,j),a&&(C=new Xl(l,e,u,c,p,a,y,g,d,j))}if(n){var q=s.layout.get("icon-rotate").evaluate(x,{}),Z="none"!==s.layout.get("icon-text-fit"),G=Nl(n,q,S,Z),X=a?Nl(a,q,S,Z):void 0;z=new Xl(l,e,u,c,p,n,y,g,!1,q),M=4*G.length;var W=t.iconSizeData,K=null;"source"===W.kind?(K=[128*s.layout.get("icon-size").evaluate(x,{})])[0]>32640&&b(t.layerIds[0]+': Value for "icon-size" is >= 255. Reduce your "icon-size".'):"composite"===W.kind&&((K=[128*w.compositeIconSizes[0].evaluate(x,{},T),128*w.compositeIconSizes[1].evaluate(x,{},T)])[0]>32640||K[1]>32640)&&b(t.layerIds[0]+': Value for "icon-size" is >= 255. Reduce your "icon-size".'),t.addSymbols(t.icon,G,K,v,_,x,!1,e,k.lineStartIndex,k.lineLength,-1,T),R=t.icon.placedSymbolArray.length-1,X&&(D=4*X.length,t.addSymbols(t.icon,X,K,v,_,x,ml.vertical,e,k.lineStartIndex,k.lineLength,-1,T),F=t.icon.placedSymbolArray.length-1)}for(var H in i.horizontal){var J=i.horizontal[H];if(!A){U=uo(J.text);var Y=s.layout.get("text-rotate").evaluate(x,{},T);A=new Xl(l,e,u,c,p,J,h,f,d,Y)}var Q=1===J.positionedLines.length;if(L+=eu(t,e,J,o,s,d,x,m,k,i.vertical?ml.horizontal:ml.horizontalOnly,Q?Object.keys(i.horizontal):[H],O,R,w,T),Q)break}i.vertical&&(B+=eu(t,e,i.vertical,o,s,d,x,m,k,ml.vertical,["vertical"],O,F,w,T));var $=A?A.boxStartIndex:t.collisionBoxArray.length,tt=A?A.boxEndIndex:t.collisionBoxArray.length,et=P?P.boxStartIndex:t.collisionBoxArray.length,rt=P?P.boxEndIndex:t.collisionBoxArray.length,it=z?z.boxStartIndex:t.collisionBoxArray.length,nt=z?z.boxEndIndex:t.collisionBoxArray.length,ot=C?C.boxStartIndex:t.collisionBoxArray.length,at=C?C.boxEndIndex:t.collisionBoxArray.length,st=-1,lt=function(t,e){return t&&t.circleDiameter?Math.max(t.circleDiameter,e):e};st=lt(A,st),st=lt(P,st),st=lt(z,st);var ut=(st=lt(C,st))>-1?1:0;ut&&(st*=I/24),t.glyphOffsetArray.length>=pu.MAX_GLYPHS&&b("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),void 0!==x.sortKey&&t.addToSortKeyRanges(t.symbolInstances.length,x.sortKey),t.symbolInstances.emplaceBack(e.x,e.y,O.right>=0?O.right:-1,O.center>=0?O.center:-1,O.left>=0?O.left:-1,O.vertical||-1,R,F,U,$,tt,et,rt,it,nt,ot,at,u,L,B,M,D,ut,0,h,V,N,st)}(t,p,s,r,i,n,h,t.layers[0],t.collisionBoxArray,e.index,e.sourceLayerIndex,t.index,g,w,I,l,v,S,E,d,e,o,u,c,a)};if("line"===A)for(var k=0,M=Vl(e.geometry,0,0,8192,8192);k<M.length;k+=1)for(var D=M[k],L=0,B=Ul(D,x,T,r.vertical||m,i,24,_,t.overscaling,8192);L<B.length;L+=1){var R=B[L];m&&iu(t,m.text,z,R)||C(D,R)}else if("line-center"===A)for(var F=0,O=e.geometry;F<O.length;F+=1){var U=O[F];if(U.length>1){var V=Ol(U,T,r.vertical||m,i,24,_);V&&C(U,V)}}else if("Polygon"===e.type)for(var N=0,j=Qa(e.geometry,0);N<j.length;N+=1){var q=j[N],Z=Hl(q,16);C(q[0],new Pl(Z.x,Z.y,0))}else if("LineString"===e.type)for(var G=0,X=e.geometry;G<X.length;G+=1){var W=X[G];C(W,new Pl(W[0].x,W[0].y,0))}else if("Point"===e.type)for(var K=0,H=e.geometry;K<H.length;K+=1)for(var J=0,Y=H[K];J<Y.length;J+=1){var Q=Y[J];C([Q],new Pl(Q.x,Q.y,0))}}(t,o,f,U,i,u,p,h,w,V,a)},v=0,x=t.features;v<x.length;v+=1)_();o&&t.generateCollisionDebugBuffers()},t.perspective=function(t,e,r,i,n){var o,a=1/Math.tan(e/2);return t[0]=a/r,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=n&&n!==1/0?(t[10]=(n+i)*(o=1/(i-n)),t[14]=2*n*i*o):(t[10]=-1,t[14]=-2*i),t},t.pick=function(t,e){for(var r={},i=0;i<e.length;i++){var n=e[i];n in t&&(r[n]=t[n])}return r},t.plugin=rn,t.polygonIntersectsPolygon=Uo,t.postMapLoadEvent=nt,t.postTurnstileEvent=rt,t.potpack=pl,t.refProperties=["type","source","source-layer","minzoom","maxzoom","filter","layout"],t.register=Li,t.registerForPluginStateChange=function(t){return t({pluginStatus:Hi,pluginURL:Ji}),$i.on("pluginStateChange",t),t},t.rotate=function(t,e,r){var i=e[0],n=e[1],o=e[2],a=e[3],s=Math.sin(r),l=Math.cos(r);return t[0]=i*l+o*s,t[1]=n*l+a*s,t[2]=i*-s+o*l,t[3]=n*-s+a*l,t},t.rotateX=function(t,e,r){var i=Math.sin(r),n=Math.cos(r),o=e[4],a=e[5],s=e[6],l=e[7],u=e[8],c=e[9],p=e[10],h=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=o*n+u*i,t[5]=a*n+c*i,t[6]=s*n+p*i,t[7]=l*n+h*i,t[8]=u*n-o*i,t[9]=c*n-a*i,t[10]=p*n-s*i,t[11]=h*n-l*i,t},t.rotateZ=function(t,e,r){var i=Math.sin(r),n=Math.cos(r),o=e[0],a=e[1],s=e[2],l=e[3],u=e[4],c=e[5],p=e[6],h=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*n+u*i,t[1]=a*n+c*i,t[2]=s*n+p*i,t[3]=l*n+h*i,t[4]=u*n-o*i,t[5]=c*n-a*i,t[6]=p*n-s*i,t[7]=h*n-l*i,t},t.scale=function(t,e,r){var i=r[0],n=r[1],o=r[2];return t[0]=e[0]*i,t[1]=e[1]*i,t[2]=e[2]*i,t[3]=e[3]*i,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*o,t[9]=e[9]*o,t[10]=e[10]*o,t[11]=e[11]*o,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},t.scale$1=function(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t},t.scale$2=function(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t},t.setCacheLimits=function(t,e){ot=t,at=e},t.setRTLTextPlugin=function(t,e,r){if(void 0===r&&(r=!1),"deferred"===Hi||"loading"===Hi||"loaded"===Hi)throw new Error("setRTLTextPlugin cannot be called multiple times.");Ji=R.resolveURL(t),Hi="deferred",Ki=e,Qi(),r||en()},t.sphericalToCartesian=function(t){var e=t[0],r=t[1],i=t[2];return r+=90,r*=Math.PI/180,i*=Math.PI/180,{x:e*Math.cos(r)*Math.sin(i),y:e*Math.sin(r)*Math.sin(i),z:e*Math.cos(i)}},t.sqrLen=function(t){var e=t[0],r=t[1];return e*e+r*r},t.styleSpec=Et,t.sub=function(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t[2]=e[2]-r[2],t},t.symbolSize=Dl,t.transformMat3=function(t,e,r){var i=e[0],n=e[1],o=e[2];return t[0]=i*r[0]+n*r[3]+o*r[6],t[1]=i*r[1]+n*r[4]+o*r[7],t[2]=i*r[2]+n*r[5]+o*r[8],t},t.transformMat4=aa,t.translate=function(t,e,r){var i,n,o,a,s,l,u,c,p,h,f,d,m=r[0],y=r[1],g=r[2];return e===t?(t[12]=e[0]*m+e[4]*y+e[8]*g+e[12],t[13]=e[1]*m+e[5]*y+e[9]*g+e[13],t[14]=e[2]*m+e[6]*y+e[10]*g+e[14],t[15]=e[3]*m+e[7]*y+e[11]*g+e[15]):(n=e[1],o=e[2],a=e[3],s=e[4],l=e[5],u=e[6],c=e[7],p=e[8],h=e[9],f=e[10],d=e[11],t[0]=i=e[0],t[1]=n,t[2]=o,t[3]=a,t[4]=s,t[5]=l,t[6]=u,t[7]=c,t[8]=p,t[9]=h,t[10]=f,t[11]=d,t[12]=i*m+s*y+p*g+e[12],t[13]=n*m+l*y+h*g+e[13],t[14]=o*m+u*y+f*g+e[14],t[15]=a*m+c*y+d*g+e[15]),t},t.triggerPluginCompletionEvent=Yi,t.uniqueId=h,t.validateCustomStyleLayer=function(t){var e=[],r=t.id;return void 0===r&&e.push({message:"layers."+r+': missing required property "id"'}),void 0===t.render&&e.push({message:"layers."+r+': missing required method "render"'}),t.renderingMode&&"2d"!==t.renderingMode&&"3d"!==t.renderingMode&&e.push({message:"layers."+r+': property "renderingMode" must be either "2d" or "3d"'}),e},t.validateLight=Ii,t.validateStyle=Ti,t.values=function(t){var e=[];for(var r in t)e.push(t[r]);return e},t.vectorTile=ms,t.version="1.10.1",t.warnOnce=b,t.webpSupported=O,t.window=self,t.wrap=u}),i(0,function(t){function e(t){var r=typeof t;if("number"===r||"boolean"===r||"string"===r||null==t)return JSON.stringify(t);if(Array.isArray(t)){for(var i="[",n=0,o=t;n<o.length;n+=1)i+=e(o[n])+",";return i+"]"}for(var a=Object.keys(t).sort(),s="{",l=0;l<a.length;l++)s+=JSON.stringify(a[l])+":"+e(t[a[l]])+",";return s+"}"}function r(r){for(var i="",n=0,o=t.refProperties;n<o.length;n+=1)i+="/"+e(r[o[n]]);return i}var i=function(t){this.keyCache={},t&&this.replace(t)};i.prototype.replace=function(t){this._layerConfigs={},this._layers={},this.update(t,[])},i.prototype.update=function(e,i){for(var n=this,o=0,a=e;o<a.length;o+=1){var s=a[o];this._layerConfigs[s.id]=s;var l=this._layers[s.id]=t.createStyleLayer(s);l._featureFilter=t.featureFilter(l.filter),this.keyCache[s.id]&&delete this.keyCache[s.id]}for(var u=0,c=i;u<c.length;u+=1){var p=c[u];delete this.keyCache[p],delete this._layerConfigs[p],delete this._layers[p]}this.familiesBySource={};for(var h=0,f=function(t,e){for(var i={},n=0;n<t.length;n++){var o=e&&e[t[n].id]||r(t[n]);e&&(e[t[n].id]=o);var a=i[o];a||(a=i[o]=[]),a.push(t[n])}var s=[];for(var l in i)s.push(i[l]);return s}(t.values(this._layerConfigs),this.keyCache);h<f.length;h+=1){var d=f[h].map(function(t){return n._layers[t.id]}),m=d[0];if("none"!==m.visibility){var y=m.source||"",g=this.familiesBySource[y];g||(g=this.familiesBySource[y]={});var _=m.sourceLayer||"_geojsonTileLayer",v=g[_];v||(v=g[_]=[]),v.push(d)}}};var n=function(e){var r={},i=[];for(var n in e){var o=e[n],a=r[n]={};for(var s in o){var l=o[+s];if(l&&0!==l.bitmap.width&&0!==l.bitmap.height){var u={x:0,y:0,w:l.bitmap.width+2,h:l.bitmap.height+2};i.push(u),a[s]={rect:u,metrics:l.metrics}}}}var c=t.potpack(i),p=new t.AlphaImage({width:c.w||1,height:c.h||1});for(var h in e){var f=e[h];for(var d in f){var m=f[+d];if(m&&0!==m.bitmap.width&&0!==m.bitmap.height){var y=r[h][d].rect;t.AlphaImage.copy(m.bitmap,p,{x:0,y:0},{x:y.x+1,y:y.y+1},m.bitmap)}}}this.image=p,this.positions=r};t.register("GlyphAtlas",n);var o=function(e){this.tileID=new t.OverscaledTileID(e.tileID.overscaledZ,e.tileID.wrap,e.tileID.canonical.z,e.tileID.canonical.x,e.tileID.canonical.y),this.uid=e.uid,this.zoom=e.zoom,this.pixelRatio=e.pixelRatio,this.tileSize=e.tileSize,this.source=e.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=e.showCollisionBoxes,this.collectResourceTiming=!!e.collectResourceTiming,this.returnDependencies=!!e.returnDependencies,this.promoteId=e.promoteId};function a(e,r,i){for(var n=new t.EvaluationParameters(r),o=0,a=e;o<a.length;o+=1)a[o].recalculate(n,i)}function s(e,r){var i=t.getArrayBuffer(e.request,function(e,i,n,o){e?r(e):i&&r(null,{vectorTile:new t.vectorTile.VectorTile(new t.pbf(i)),rawData:i,cacheControl:n,expires:o})});return function(){i.cancel(),r()}}o.prototype.parse=function(e,r,i,o,s){var l=this;this.status="parsing",this.data=e,this.collisionBoxArray=new t.CollisionBoxArray;var u=new t.DictionaryCoder(Object.keys(e.layers).sort()),c=new t.FeatureIndex(this.tileID,this.promoteId);c.bucketLayerIDs=[];var p,h,f,d,m={},y={featureIndex:c,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:i},g=r.familiesBySource[this.source];for(var _ in g){var v=e.layers[_];if(v){1===v.version&&t.warnOnce('Vector tile source "'+this.source+'" layer "'+_+'" does not use vector tile spec v2 and therefore may have some rendering errors.');for(var x=u.encode(_),b=[],w=0;w<v.length;w++){var S=v.feature(w),T=c.getId(S,_);b.push({feature:S,id:T,index:w,sourceLayerIndex:x})}for(var I=0,E=g[_];I<E.length;I+=1){var A=E[I],z=A[0];z.minzoom&&this.zoom<Math.floor(z.minzoom)||z.maxzoom&&this.zoom>=z.maxzoom||"none"!==z.visibility&&(a(A,this.zoom,i),(m[z.id]=z.createBucket({index:c.bucketLayerIDs.length,layers:A,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:x,sourceID:this.source})).populate(b,y,this.tileID.canonical),c.bucketLayerIDs.push(A.map(function(t){return t.id})))}}}var P=t.mapObject(y.glyphDependencies,function(t){return Object.keys(t).map(Number)});Object.keys(P).length?o.send("getGlyphs",{uid:this.uid,stacks:P},function(t,e){p||(p=t,h=e,M.call(l))}):h={};var C=Object.keys(y.iconDependencies);C.length?o.send("getImages",{icons:C,source:this.source,tileID:this.tileID,type:"icons"},function(t,e){p||(p=t,f=e,M.call(l))}):f={};var k=Object.keys(y.patternDependencies);function M(){if(p)return s(p);if(h&&f&&d){var e=new n(h),r=new t.ImageAtlas(f,d);for(var o in m){var l=m[o];l instanceof t.SymbolBucket?(a(l.layers,this.zoom,i),t.performSymbolLayout(l,h,e.positions,f,r.iconPositions,this.showCollisionBoxes,this.tileID.canonical)):l.hasPattern&&(l instanceof t.LineBucket||l instanceof t.FillBucket||l instanceof t.FillExtrusionBucket)&&(a(l.layers,this.zoom,i),l.addFeatures(y,this.tileID.canonical,r.patternPositions))}this.status="done",s(null,{buckets:t.values(m).filter(function(t){return!t.isEmpty()}),featureIndex:c,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:e.image,imageAtlas:r,glyphMap:this.returnDependencies?h:null,iconMap:this.returnDependencies?f:null,glyphPositions:this.returnDependencies?e.positions:null})}}k.length?o.send("getImages",{icons:k,source:this.source,tileID:this.tileID,type:"patterns"},function(t,e){p||(p=t,d=e,M.call(l))}):d={},M.call(this)};var l=function(t,e,r,i){this.actor=t,this.layerIndex=e,this.availableImages=r,this.loadVectorData=i||s,this.loading={},this.loaded={}};l.prototype.loadTile=function(e,r){var i=this,n=e.uid;this.loading||(this.loading={});var a=!!(e&&e.request&&e.request.collectResourceTiming)&&new t.RequestPerformance(e.request),s=this.loading[n]=new o(e);s.abort=this.loadVectorData(e,function(e,o){if(delete i.loading[n],e||!o)return s.status="done",i.loaded[n]=s,r(e);var l=o.rawData,u={};o.expires&&(u.expires=o.expires),o.cacheControl&&(u.cacheControl=o.cacheControl);var c={};if(a){var p=a.finish();p&&(c.resourceTiming=JSON.parse(JSON.stringify(p)))}s.vectorTile=o.vectorTile,s.parse(o.vectorTile,i.layerIndex,i.availableImages,i.actor,function(e,i){if(e||!i)return r(e);r(null,t.extend({rawTileData:l.slice(0)},i,u,c))}),i.loaded=i.loaded||{},i.loaded[n]=s})},l.prototype.reloadTile=function(t,e){var r=this,i=this.loaded,n=t.uid,o=this;if(i&&i[n]){var a=i[n];a.showCollisionBoxes=t.showCollisionBoxes;var s=function(t,i){var n=a.reloadCallback;n&&(delete a.reloadCallback,a.parse(a.vectorTile,o.layerIndex,r.availableImages,o.actor,n)),e(t,i)};"parsing"===a.status?a.reloadCallback=s:"done"===a.status&&(a.vectorTile?a.parse(a.vectorTile,this.layerIndex,this.availableImages,this.actor,s):s())}},l.prototype.abortTile=function(t,e){var r=this.loading,i=t.uid;r&&r[i]&&r[i].abort&&(r[i].abort(),delete r[i]),e()},l.prototype.removeTile=function(t,e){var r=this.loaded,i=t.uid;r&&r[i]&&delete r[i],e()};var u=t.window.ImageBitmap,c=function(){this.loaded={}};function p(t,e){if(0!==t.length){h(t[0],e);for(var r=1;r<t.length;r++)h(t[r],!e)}}function h(t,e){for(var r=0,i=0,n=t.length,o=n-1;i<n;o=i++)r+=(t[i][0]-t[o][0])*(t[o][1]+t[i][1]);r>=0!=!!e&&t.reverse()}c.prototype.loadTile=function(e,r){var i=e.uid,n=e.encoding,o=e.rawImageData,a=u&&o instanceof u?this.getImageData(o):o,s=new t.DEMData(i,a,n);this.loaded=this.loaded||{},this.loaded[i]=s,r(null,s)},c.prototype.getImageData=function(e){this.offscreenCanvas&&this.offscreenCanvasContext||(this.offscreenCanvas=new OffscreenCanvas(e.width,e.height),this.offscreenCanvasContext=this.offscreenCanvas.getContext("2d")),this.offscreenCanvas.width=e.width,this.offscreenCanvas.height=e.height,this.offscreenCanvasContext.drawImage(e,0,0,e.width,e.height);var r=this.offscreenCanvasContext.getImageData(-1,-1,e.width+2,e.height+2);return this.offscreenCanvasContext.clearRect(0,0,this.offscreenCanvas.width,this.offscreenCanvas.height),new t.RGBAImage({width:r.width,height:r.height},r.data)},c.prototype.removeTile=function(t){var e=this.loaded,r=t.uid;e&&e[r]&&delete e[r]};var f=t.vectorTile.VectorTileFeature.prototype.toGeoJSON,d=function(e){this._feature=e,this.extent=t.EXTENT,this.type=e.type,this.properties=e.tags,"id"in e&&!isNaN(e.id)&&(this.id=parseInt(e.id,10))};d.prototype.loadGeometry=function(){if(1===this._feature.type){for(var e=[],r=0,i=this._feature.geometry;r<i.length;r+=1){var n=i[r];e.push([new t.Point$1(n[0],n[1])])}return e}for(var o=[],a=0,s=this._feature.geometry;a<s.length;a+=1){for(var l=[],u=0,c=s[a];u<c.length;u+=1){var p=c[u];l.push(new t.Point$1(p[0],p[1]))}o.push(l)}return o},d.prototype.toGeoJSON=function(t,e,r){return f.call(this,t,e,r)};var m=function(e){this.layers={_geojsonTileLayer:this},this.name="_geojsonTileLayer",this.extent=t.EXTENT,this.length=e.length,this._features=e};m.prototype.feature=function(t){return new d(this._features[t])};var y=t.vectorTile.VectorTileFeature,g=_;function _(t,e){this.options=e||{},this.features=t,this.length=t.length}function v(t,e){this.id="number"==typeof t.id?t.id:void 0,this.type=t.type,this.rawGeometry=1===t.type?[t.geometry]:t.geometry,this.properties=t.tags,this.extent=e||4096}_.prototype.feature=function(t){return new v(this.features[t],this.options.extent)},v.prototype.loadGeometry=function(){var e=this.rawGeometry;this.geometry=[];for(var r=0;r<e.length;r++){for(var i=e[r],n=[],o=0;o<i.length;o++)n.push(new t.Point$1(i[o][0],i[o][1]));this.geometry.push(n)}return this.geometry},v.prototype.bbox=function(){this.geometry||this.loadGeometry();for(var t=this.geometry,e=1/0,r=-1/0,i=1/0,n=-1/0,o=0;o<t.length;o++)for(var a=t[o],s=0;s<a.length;s++){var l=a[s];e=Math.min(e,l.x),r=Math.max(r,l.x),i=Math.min(i,l.y),n=Math.max(n,l.y)}return[e,i,r,n]},v.prototype.toGeoJSON=y.prototype.toGeoJSON;var x=w,b=g;function w(e){var r=new t.pbf;return function(t,e){for(var r in t.layers)e.writeMessage(3,S,t.layers[r])}(e,r),r.finish()}function S(t,e){var r;e.writeVarintField(15,t.version||1),e.writeStringField(1,t.name||""),e.writeVarintField(5,t.extent||4096);var i={keys:[],values:[],keycache:{},valuecache:{}};for(r=0;r<t.length;r++)i.feature=t.feature(r),e.writeMessage(2,T,i);var n=i.keys;for(r=0;r<n.length;r++)e.writeStringField(3,n[r]);var o=i.values;for(r=0;r<o.length;r++)e.writeMessage(4,P,o[r])}function T(t,e){var r=t.feature;void 0!==r.id&&e.writeVarintField(1,r.id),e.writeMessage(2,I,t),e.writeVarintField(3,r.type),e.writeMessage(4,z,r)}function I(t,e){var r=t.feature,i=t.keys,n=t.values,o=t.keycache,a=t.valuecache;for(var s in r.properties){var l=o[s];void 0===l&&(i.push(s),o[s]=l=i.length-1),e.writeVarint(l);var u=r.properties[s],c=typeof u;"string"!==c&&"boolean"!==c&&"number"!==c&&(u=JSON.stringify(u));var p=c+":"+u,h=a[p];void 0===h&&(n.push(u),a[p]=h=n.length-1),e.writeVarint(h)}}function E(t,e){return(e<<3)+(7&t)}function A(t){return t<<1^t>>31}function z(t,e){for(var r=t.loadGeometry(),i=t.type,n=0,o=0,a=r.length,s=0;s<a;s++){var l=r[s],u=1;1===i&&(u=l.length),e.writeVarint(E(1,u));for(var c=3===i?l.length-1:l.length,p=0;p<c;p++){1===p&&1!==i&&e.writeVarint(E(2,c-1));var h=l[p].x-n,f=l[p].y-o;e.writeVarint(A(h)),e.writeVarint(A(f)),n+=h,o+=f}3===i&&e.writeVarint(E(7,1))}}function P(t,e){var r=typeof t;"string"===r?e.writeStringField(1,t):"boolean"===r?e.writeBooleanField(7,t):"number"===r&&(t%1!=0?e.writeDoubleField(3,t):t<0?e.writeSVarintField(6,t):e.writeVarintField(5,t))}function C(t,e,r,i){k(t,r,i),k(e,2*r,2*i),k(e,2*r+1,2*i+1)}function k(t,e,r){var i=t[e];t[e]=t[r],t[r]=i}function M(t,e,r,i){var n=t-r,o=e-i;return n*n+o*o}x.fromVectorTileJs=w,x.fromGeojsonVt=function(t,e){e=e||{};var r={};for(var i in t)r[i]=new g(t[i].features,e),r[i].name=i,r[i].version=e.version,r[i].extent=e.extent;return w({layers:r})},x.GeoJSONWrapper=b;var D=function(t){return t[0]},L=function(t){return t[1]},B=function(t,e,r,i,n){void 0===e&&(e=D),void 0===r&&(r=L),void 0===i&&(i=64),void 0===n&&(n=Float64Array),this.nodeSize=i,this.points=t;for(var o=t.length<65536?Uint16Array:Uint32Array,a=this.ids=new o(t.length),s=this.coords=new n(2*t.length),l=0;l<t.length;l++)a[l]=l,s[2*l]=e(t[l]),s[2*l+1]=r(t[l]);!function t(e,r,i,n,o,a){if(!(o-n<=i)){var s=n+o>>1;!function t(e,r,i,n,o,a){for(;o>n;){if(o-n>600){var s=o-n+1,l=i-n+1,u=Math.log(s),c=.5*Math.exp(2*u/3),p=.5*Math.sqrt(u*c*(s-c)/s)*(l-s/2<0?-1:1);t(e,r,i,Math.max(n,Math.floor(i-l*c/s+p)),Math.min(o,Math.floor(i+(s-l)*c/s+p)),a)}var h=r[2*i+a],f=n,d=o;for(C(e,r,n,i),r[2*o+a]>h&&C(e,r,n,o);f<d;){for(C(e,r,f,d),f++,d--;r[2*f+a]<h;)f++;for(;r[2*d+a]>h;)d--}r[2*n+a]===h?C(e,r,n,d):C(e,r,++d,o),d<=i&&(n=d+1),i<=d&&(o=d-1)}}(e,r,s,n,o,a%2),t(e,r,i,n,s-1,a+1),t(e,r,i,s+1,o,a+1)}}(a,s,i,0,a.length-1,0)};B.prototype.range=function(t,e,r,i){return function(t,e,r,i,n,o,a){for(var s,l,u=[0,t.length-1,0],c=[];u.length;){var p=u.pop(),h=u.pop(),f=u.pop();if(h-f<=a)for(var d=f;d<=h;d++)l=e[2*d+1],(s=e[2*d])>=r&&s<=n&&l>=i&&l<=o&&c.push(t[d]);else{var m=Math.floor((f+h)/2);l=e[2*m+1],(s=e[2*m])>=r&&s<=n&&l>=i&&l<=o&&c.push(t[m]);var y=(p+1)%2;(0===p?r<=s:i<=l)&&(u.push(f),u.push(m-1),u.push(y)),(0===p?n>=s:o>=l)&&(u.push(m+1),u.push(h),u.push(y))}}return c}(this.ids,this.coords,t,e,r,i,this.nodeSize)},B.prototype.within=function(t,e,r){return function(t,e,r,i,n,o){for(var a=[0,t.length-1,0],s=[],l=n*n;a.length;){var u=a.pop(),c=a.pop(),p=a.pop();if(c-p<=o)for(var h=p;h<=c;h++)M(e[2*h],e[2*h+1],r,i)<=l&&s.push(t[h]);else{var f=Math.floor((p+c)/2),d=e[2*f],m=e[2*f+1];M(d,m,r,i)<=l&&s.push(t[f]);var y=(u+1)%2;(0===u?r-n<=d:i-n<=m)&&(a.push(p),a.push(f-1),a.push(y)),(0===u?r+n>=d:i+n>=m)&&(a.push(f+1),a.push(c),a.push(y))}}return s}(this.ids,this.coords,t,e,r,this.nodeSize)};var R={minZoom:0,maxZoom:16,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:function(t){return t}},F=function(t){this.options=Z(Object.create(R),t),this.trees=new Array(this.options.maxZoom+1)};function O(t,e,r,i,n){return{x:t,y:e,zoom:1/0,id:r,parentId:-1,numPoints:i,properties:n}}function U(t,e){var r=t.geometry.coordinates,i=r[1];return{x:j(r[0]),y:q(i),zoom:1/0,index:e,parentId:-1}}function V(t){return{type:"Feature",id:t.id,properties:N(t),geometry:{type:"Point",coordinates:[(i=t.x,360*(i-.5)),(e=t.y,r=(180-360*e)*Math.PI/180,360*Math.atan(Math.exp(r))/Math.PI-90)]}};var e,r,i}function N(t){var e=t.numPoints,r=e>=1e4?Math.round(e/1e3)+"k":e>=1e3?Math.round(e/100)/10+"k":e;return Z(Z({},t.properties),{cluster:!0,cluster_id:t.id,point_count:e,point_count_abbreviated:r})}function j(t){return t/360+.5}function q(t){var e=Math.sin(t*Math.PI/180),r=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return r<0?0:r>1?1:r}function Z(t,e){for(var r in e)t[r]=e[r];return t}function G(t){return t.x}function X(t){return t.y}function W(t,e,r,i,n,o){var a=n-r,s=o-i;if(0!==a||0!==s){var l=((t-r)*a+(e-i)*s)/(a*a+s*s);l>1?(r=n,i=o):l>0&&(r+=a*l,i+=s*l)}return(a=t-r)*a+(s=e-i)*s}function K(t,e,r,i){var n={id:void 0===t?null:t,type:e,geometry:r,tags:i,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return function(t){var e=t.geometry,r=t.type;if("Point"===r||"MultiPoint"===r||"LineString"===r)H(t,e);else if("Polygon"===r||"MultiLineString"===r)for(var i=0;i<e.length;i++)H(t,e[i]);else if("MultiPolygon"===r)for(i=0;i<e.length;i++)for(var n=0;n<e[i].length;n++)H(t,e[i][n])}(n),n}function H(t,e){for(var r=0;r<e.length;r+=3)t.minX=Math.min(t.minX,e[r]),t.minY=Math.min(t.minY,e[r+1]),t.maxX=Math.max(t.maxX,e[r]),t.maxY=Math.max(t.maxY,e[r+1])}function J(t,e,r,i){if(e.geometry){var n=e.geometry.coordinates,o=e.geometry.type,a=Math.pow(r.tolerance/((1<<r.maxZoom)*r.extent),2),s=[],l=e.id;if(r.promoteId?l=e.properties[r.promoteId]:r.generateId&&(l=i||0),"Point"===o)Y(n,s);else if("MultiPoint"===o)for(var u=0;u<n.length;u++)Y(n[u],s);else if("LineString"===o)Q(n,s,a,!1);else if("MultiLineString"===o){if(r.lineMetrics){for(u=0;u<n.length;u++)Q(n[u],s=[],a,!1),t.push(K(l,"LineString",s,e.properties));return}$(n,s,a,!1)}else if("Polygon"===o)$(n,s,a,!0);else{if("MultiPolygon"!==o){if("GeometryCollection"===o){for(u=0;u<e.geometry.geometries.length;u++)J(t,{id:l,geometry:e.geometry.geometries[u],properties:e.properties},r,i);return}throw new Error("Input data is not a valid GeoJSON object.")}for(u=0;u<n.length;u++){var c=[];$(n[u],c,a,!0),s.push(c)}}t.push(K(l,o,s,e.properties))}}function Y(t,e){e.push(tt(t[0])),e.push(et(t[1])),e.push(0)}function Q(t,e,r,i){for(var n,o,a=0,s=0;s<t.length;s++){var l=tt(t[s][0]),u=et(t[s][1]);e.push(l),e.push(u),e.push(0),s>0&&(a+=i?(n*u-l*o)/2:Math.sqrt(Math.pow(l-n,2)+Math.pow(u-o,2))),n=l,o=u}var c=e.length-3;e[2]=1,function t(e,r,i,n){for(var o,a=n,s=i-r>>1,l=i-r,u=e[r],c=e[r+1],p=e[i],h=e[i+1],f=r+3;f<i;f+=3){var d=W(e[f],e[f+1],u,c,p,h);if(d>a)o=f,a=d;else if(d===a){var m=Math.abs(f-s);m<l&&(o=f,l=m)}}a>n&&(o-r>3&&t(e,r,o,n),e[o+2]=a,i-o>3&&t(e,o,i,n))}(e,0,c,r),e[c+2]=1,e.size=Math.abs(a),e.start=0,e.end=e.size}function $(t,e,r,i){for(var n=0;n<t.length;n++){var o=[];Q(t[n],o,r,i),e.push(o)}}function tt(t){return t/360+.5}function et(t){var e=Math.sin(t*Math.PI/180),r=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return r<0?0:r>1?1:r}function rt(t,e,r,i,n,o,a,s){if(i/=e,o>=(r/=e)&&a<i)return t;if(a<r||o>=i)return null;for(var l=[],u=0;u<t.length;u++){var c=t[u],p=c.geometry,h=c.type,f=0===n?c.minX:c.minY,d=0===n?c.maxX:c.maxY;if(f>=r&&d<i)l.push(c);else if(!(d<r||f>=i)){var m=[];if("Point"===h||"MultiPoint"===h)it(p,m,r,i,n);else if("LineString"===h)nt(p,m,r,i,n,!1,s.lineMetrics);else if("MultiLineString"===h)at(p,m,r,i,n,!1);else if("Polygon"===h)at(p,m,r,i,n,!0);else if("MultiPolygon"===h)for(var y=0;y<p.length;y++){var g=[];at(p[y],g,r,i,n,!0),g.length&&m.push(g)}if(m.length){if(s.lineMetrics&&"LineString"===h){for(y=0;y<m.length;y++)l.push(K(c.id,h,m[y],c.tags));continue}"LineString"!==h&&"MultiLineString"!==h||(1===m.length?(h="LineString",m=m[0]):h="MultiLineString"),"Point"!==h&&"MultiPoint"!==h||(h=3===m.length?"Point":"MultiPoint"),l.push(K(c.id,h,m,c.tags))}}}return l.length?l:null}function it(t,e,r,i,n){for(var o=0;o<t.length;o+=3){var a=t[o+n];a>=r&&a<=i&&(e.push(t[o]),e.push(t[o+1]),e.push(t[o+2]))}}function nt(t,e,r,i,n,o,a){for(var s,l,u=ot(t),c=0===n?lt:ut,p=t.start,h=0;h<t.length-3;h+=3){var f=t[h],d=t[h+1],m=t[h+2],y=t[h+3],g=t[h+4],_=0===n?f:d,v=0===n?y:g,x=!1;a&&(s=Math.sqrt(Math.pow(f-y,2)+Math.pow(d-g,2))),_<r?v>r&&(l=c(u,f,d,y,g,r),a&&(u.start=p+s*l)):_>i?v<i&&(l=c(u,f,d,y,g,i),a&&(u.start=p+s*l)):st(u,f,d,m),v<r&&_>=r&&(l=c(u,f,d,y,g,r),x=!0),v>i&&_<=i&&(l=c(u,f,d,y,g,i),x=!0),!o&&x&&(a&&(u.end=p+s*l),e.push(u),u=ot(t)),a&&(p+=s)}var b=t.length-3;f=t[b],d=t[b+1],m=t[b+2],(_=0===n?f:d)>=r&&_<=i&&st(u,f,d,m),b=u.length-3,o&&b>=3&&(u[b]!==u[0]||u[b+1]!==u[1])&&st(u,u[0],u[1],u[2]),u.length&&e.push(u)}function ot(t){var e=[];return e.size=t.size,e.start=t.start,e.end=t.end,e}function at(t,e,r,i,n,o){for(var a=0;a<t.length;a++)nt(t[a],e,r,i,n,o,!1)}function st(t,e,r,i){t.push(e),t.push(r),t.push(i)}function lt(t,e,r,i,n,o){var a=(o-e)/(i-e);return t.push(o),t.push(r+(n-r)*a),t.push(1),a}function ut(t,e,r,i,n,o){var a=(o-r)/(n-r);return t.push(e+(i-e)*a),t.push(o),t.push(1),a}function ct(t,e){for(var r=[],i=0;i<t.length;i++){var n,o=t[i],a=o.type;if("Point"===a||"MultiPoint"===a||"LineString"===a)n=pt(o.geometry,e);else if("MultiLineString"===a||"Polygon"===a){n=[];for(var s=0;s<o.geometry.length;s++)n.push(pt(o.geometry[s],e))}else if("MultiPolygon"===a)for(n=[],s=0;s<o.geometry.length;s++){for(var l=[],u=0;u<o.geometry[s].length;u++)l.push(pt(o.geometry[s][u],e));n.push(l)}r.push(K(o.id,a,n,o.tags))}return r}function pt(t,e){var r=[];r.size=t.size,void 0!==t.start&&(r.start=t.start,r.end=t.end);for(var i=0;i<t.length;i+=3)r.push(t[i]+e,t[i+1],t[i+2]);return r}function ht(t,e){if(t.transformed)return t;var r,i,n,o=1<<t.z,a=t.x,s=t.y;for(r=0;r<t.features.length;r++){var l=t.features[r],u=l.geometry,c=l.type;if(l.geometry=[],1===c)for(i=0;i<u.length;i+=2)l.geometry.push(ft(u[i],u[i+1],e,o,a,s));else for(i=0;i<u.length;i++){var p=[];for(n=0;n<u[i].length;n+=2)p.push(ft(u[i][n],u[i][n+1],e,o,a,s));l.geometry.push(p)}}return t.transformed=!0,t}function ft(t,e,r,i,n,o){return[Math.round(r*(t*i-n)),Math.round(r*(e*i-o))]}function dt(t,e,r,i,n){for(var o=e===n.maxZoom?0:n.tolerance/((1<<e)*n.extent),a={features:[],numPoints:0,numSimplified:0,numFeatures:0,source:null,x:r,y:i,z:e,transformed:!1,minX:2,minY:1,maxX:-1,maxY:0},s=0;s<t.length;s++){a.numFeatures++,mt(a,t[s],o,n);var l=t[s].minX,u=t[s].minY,c=t[s].maxX,p=t[s].maxY;l<a.minX&&(a.minX=l),u<a.minY&&(a.minY=u),c>a.maxX&&(a.maxX=c),p>a.maxY&&(a.maxY=p)}return a}function mt(t,e,r,i){var n=e.geometry,o=e.type,a=[];if("Point"===o||"MultiPoint"===o)for(var s=0;s<n.length;s+=3)a.push(n[s]),a.push(n[s+1]),t.numPoints++,t.numSimplified++;else if("LineString"===o)yt(a,n,t,r,!1,!1);else if("MultiLineString"===o||"Polygon"===o)for(s=0;s<n.length;s++)yt(a,n[s],t,r,"Polygon"===o,0===s);else if("MultiPolygon"===o)for(var l=0;l<n.length;l++){var u=n[l];for(s=0;s<u.length;s++)yt(a,u[s],t,r,!0,0===s)}if(a.length){var c=e.tags||null;if("LineString"===o&&i.lineMetrics){for(var p in c={},e.tags)c[p]=e.tags[p];c.mapbox_clip_start=n.start/n.size,c.mapbox_clip_end=n.end/n.size}var h={geometry:a,type:"Polygon"===o||"MultiPolygon"===o?3:"LineString"===o||"MultiLineString"===o?2:1,tags:c};null!==e.id&&(h.id=e.id),t.features.push(h)}}function yt(t,e,r,i,n,o){var a=i*i;if(i>0&&e.size<(n?a:i))r.numPoints+=e.length/3;else{for(var s=[],l=0;l<e.length;l+=3)(0===i||e[l+2]>a)&&(r.numSimplified++,s.push(e[l]),s.push(e[l+1])),r.numPoints++;n&&function(t,e){for(var r=0,i=0,n=t.length,o=n-2;i<n;o=i,i+=2)r+=(t[i]-t[o])*(t[i+1]+t[o+1]);if(r>0===e)for(i=0,n=t.length;i<n/2;i+=2){var a=t[i],s=t[i+1];t[i]=t[n-2-i],t[i+1]=t[n-1-i],t[n-2-i]=a,t[n-1-i]=s}}(s,o),t.push(s)}}function gt(t,e){var r=(e=this.options=function(t,e){for(var r in e)t[r]=e[r];return t}(Object.create(this.options),e)).debug;if(r&&console.time("preprocess data"),e.maxZoom<0||e.maxZoom>24)throw new Error("maxZoom should be in the 0-24 range");if(e.promoteId&&e.generateId)throw new Error("promoteId and generateId cannot be used together.");var i=function(t,e){var r=[];if("FeatureCollection"===t.type)for(var i=0;i<t.features.length;i++)J(r,t.features[i],e,i);else J(r,"Feature"===t.type?t:{geometry:t},e);return r}(t,e);this.tiles={},this.tileCoords=[],r&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",e.indexMaxZoom,e.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),(i=function(t,e){var r=e.buffer/e.extent,i=t,n=rt(t,1,-1-r,r,0,-1,2,e),o=rt(t,1,1-r,2+r,0,-1,2,e);return(n||o)&&(i=rt(t,1,-r,1+r,0,-1,2,e)||[],n&&(i=ct(n,1).concat(i)),o&&(i=i.concat(ct(o,-1)))),i}(i,e)).length&&this.splitTile(i,0,0,0),r&&(i.length&&console.log("features: %d, points: %d",this.tiles[0].numFeatures,this.tiles[0].numPoints),console.timeEnd("generate tiles"),console.log("tiles generated:",this.total,JSON.stringify(this.stats)))}function _t(t,e,r){return 32*((1<<t)*r+e)+t}function vt(t,e){var r=t.tileID.canonical;if(!this._geoJSONIndex)return e(null,null);var i=this._geoJSONIndex.getTile(r.z,r.x,r.y);if(!i)return e(null,null);var n=new m(i.features),o=x(n);0===o.byteOffset&&o.byteLength===o.buffer.byteLength||(o=new Uint8Array(o)),e(null,{vectorTile:n,rawData:o.buffer})}F.prototype.load=function(t){var e=this.options,r=e.log,i=e.minZoom,n=e.maxZoom,o=e.nodeSize;r&&console.time("total time");var a="prepare "+t.length+" points";r&&console.time(a),this.points=t;for(var s=[],l=0;l<t.length;l++)t[l].geometry&&s.push(U(t[l],l));this.trees[n+1]=new B(s,G,X,o,Float32Array),r&&console.timeEnd(a);for(var u=n;u>=i;u--){var c=+Date.now();s=this._cluster(s,u),this.trees[u]=new B(s,G,X,o,Float32Array),r&&console.log("z%d: %d clusters in %dms",u,s.length,+Date.now()-c)}return r&&console.timeEnd("total time"),this},F.prototype.getClusters=function(t,e){var r=((t[0]+180)%360+360)%360-180,i=Math.max(-90,Math.min(90,t[1])),n=180===t[2]?180:((t[2]+180)%360+360)%360-180,o=Math.max(-90,Math.min(90,t[3]));if(t[2]-t[0]>=360)r=-180,n=180;else if(r>n){var a=this.getClusters([r,i,180,o],e),s=this.getClusters([-180,i,n,o],e);return a.concat(s)}for(var l=this.trees[this._limitZoom(e)],u=[],c=0,p=l.range(j(r),q(o),j(n),q(i));c<p.length;c+=1){var h=l.points[p[c]];u.push(h.numPoints?V(h):this.points[h.index])}return u},F.prototype.getChildren=function(t){var e=this._getOriginId(t),r=this._getOriginZoom(t),i="No cluster with the specified id.",n=this.trees[r];if(!n)throw new Error(i);var o=n.points[e];if(!o)throw new Error(i);for(var a=this.options.radius/(this.options.extent*Math.pow(2,r-1)),s=[],l=0,u=n.within(o.x,o.y,a);l<u.length;l+=1){var c=n.points[u[l]];c.parentId===t&&s.push(c.numPoints?V(c):this.points[c.index])}if(0===s.length)throw new Error(i);return s},F.prototype.getLeaves=function(t,e,r){var i=[];return this._appendLeaves(i,t,e=e||10,r=r||0,0),i},F.prototype.getTile=function(t,e,r){var i=this.trees[this._limitZoom(t)],n=Math.pow(2,t),o=this.options,a=o.radius/o.extent,s=(r-a)/n,l=(r+1+a)/n,u={features:[]};return this._addTileFeatures(i.range((e-a)/n,s,(e+1+a)/n,l),i.points,e,r,n,u),0===e&&this._addTileFeatures(i.range(1-a/n,s,1,l),i.points,n,r,n,u),e===n-1&&this._addTileFeatures(i.range(0,s,a/n,l),i.points,-1,r,n,u),u.features.length?u:null},F.prototype.getClusterExpansionZoom=function(t){for(var e=this._getOriginZoom(t)-1;e<=this.options.maxZoom;){var r=this.getChildren(t);if(e++,1!==r.length)break;t=r[0].properties.cluster_id}return e},F.prototype._appendLeaves=function(t,e,r,i,n){for(var o=0,a=this.getChildren(e);o<a.length;o+=1){var s=a[o],l=s.properties;if(l&&l.cluster?n+l.point_count<=i?n+=l.point_count:n=this._appendLeaves(t,l.cluster_id,r,i,n):n<i?n++:t.push(s),t.length===r)break}return n},F.prototype._addTileFeatures=function(t,e,r,i,n,o){for(var a=0,s=t;a<s.length;a+=1){var l=e[s[a]],u=l.numPoints,c={type:1,geometry:[[Math.round(this.options.extent*(l.x*n-r)),Math.round(this.options.extent*(l.y*n-i))]],tags:u?N(l):this.points[l.index].properties},p=void 0;u?p=l.id:this.options.generateId?p=l.index:this.points[l.index].id&&(p=this.points[l.index].id),void 0!==p&&(c.id=p),o.features.push(c)}},F.prototype._limitZoom=function(t){return Math.max(this.options.minZoom,Math.min(t,this.options.maxZoom+1))},F.prototype._cluster=function(t,e){for(var r=[],i=this.options,n=i.reduce,o=i.radius/(i.extent*Math.pow(2,e)),a=0;a<t.length;a++){var s=t[a];if(!(s.zoom<=e)){s.zoom=e;for(var l=this.trees[e+1],u=l.within(s.x,s.y,o),c=s.numPoints||1,p=s.x*c,h=s.y*c,f=n&&c>1?this._map(s,!0):null,d=(a<<5)+(e+1)+this.points.length,m=0,y=u;m<y.length;m+=1){var g=l.points[y[m]];if(!(g.zoom<=e)){g.zoom=e;var _=g.numPoints||1;p+=g.x*_,h+=g.y*_,c+=_,g.parentId=d,n&&(f||(f=this._map(s,!0)),n(f,this._map(g)))}}1===c?r.push(s):(s.parentId=d,r.push(O(p/c,h/c,d,c,f)))}}return r},F.prototype._getOriginId=function(t){return t-this.points.length>>5},F.prototype._getOriginZoom=function(t){return(t-this.points.length)%32},F.prototype._map=function(t,e){if(t.numPoints)return e?Z({},t.properties):t.properties;var r=this.points[t.index].properties,i=this.options.map(r);return e&&i===r?Z({},i):i},gt.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},gt.prototype.splitTile=function(t,e,r,i,n,o,a){for(var s=[t,e,r,i],l=this.options,u=l.debug;s.length;){i=s.pop(),r=s.pop(),e=s.pop(),t=s.pop();var c=1<<e,p=_t(e,r,i),h=this.tiles[p];if(!h&&(u>1&&console.time("creation"),h=this.tiles[p]=dt(t,e,r,i,l),this.tileCoords.push({z:e,x:r,y:i}),u)){u>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",e,r,i,h.numFeatures,h.numPoints,h.numSimplified),console.timeEnd("creation"));var f="z"+e;this.stats[f]=(this.stats[f]||0)+1,this.total++}if(h.source=t,n){if(e===l.maxZoom||e===n)continue;var d=1<<n-e;if(r!==Math.floor(o/d)||i!==Math.floor(a/d))continue}else if(e===l.indexMaxZoom||h.numPoints<=l.indexMaxPoints)continue;if(h.source=null,0!==t.length){u>1&&console.time("clipping");var m,y,g,_,v,x,b=.5*l.buffer/l.extent,w=.5-b,S=.5+b,T=1+b;m=y=g=_=null,v=rt(t,c,r-b,r+S,0,h.minX,h.maxX,l),x=rt(t,c,r+w,r+T,0,h.minX,h.maxX,l),t=null,v&&(m=rt(v,c,i-b,i+S,1,h.minY,h.maxY,l),y=rt(v,c,i+w,i+T,1,h.minY,h.maxY,l),v=null),x&&(g=rt(x,c,i-b,i+S,1,h.minY,h.maxY,l),_=rt(x,c,i+w,i+T,1,h.minY,h.maxY,l),x=null),u>1&&console.timeEnd("clipping"),s.push(m||[],e+1,2*r,2*i),s.push(y||[],e+1,2*r,2*i+1),s.push(g||[],e+1,2*r+1,2*i),s.push(_||[],e+1,2*r+1,2*i+1)}}},gt.prototype.getTile=function(t,e,r){var i=this.options,n=i.extent,o=i.debug;if(t<0||t>24)return null;var a=1<<t,s=_t(t,e=(e%a+a)%a,r);if(this.tiles[s])return ht(this.tiles[s],n);o>1&&console.log("drilling down to z%d-%d-%d",t,e,r);for(var l,u=t,c=e,p=r;!l&&u>0;)u--,c=Math.floor(c/2),p=Math.floor(p/2),l=this.tiles[_t(u,c,p)];return l&&l.source?(o>1&&console.log("found parent tile z%d-%d-%d",u,c,p),o>1&&console.time("drilling down"),this.splitTile(l.source,u,c,p,t,e,r),o>1&&console.timeEnd("drilling down"),this.tiles[s]?ht(this.tiles[s],n):null):null};var xt=function(e){function r(t,r,i,n){e.call(this,t,r,i,vt),n&&(this.loadGeoJSON=n)}return e&&(r.__proto__=e),(r.prototype=Object.create(e&&e.prototype)).constructor=r,r.prototype.loadData=function(t,e){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),this._pendingCallback=e,this._pendingLoadDataParams=t,this._state&&"Idle"!==this._state?this._state="NeedsLoadData":(this._state="Coalescing",this._loadData())},r.prototype._loadData=function(){var e=this;if(this._pendingCallback&&this._pendingLoadDataParams){var r=this._pendingCallback,i=this._pendingLoadDataParams;delete this._pendingCallback,delete this._pendingLoadDataParams;var n=!!(i&&i.request&&i.request.collectResourceTiming)&&new t.RequestPerformance(i.request);this.loadGeoJSON(i,function(o,a){if(o||!a)return r(o);if("object"!=typeof a)return r(new Error("Input data given to '"+i.source+"' is not a valid GeoJSON object."));!function t(e,r){var i,n=e&&e.type;if("FeatureCollection"===n)for(i=0;i<e.features.length;i++)t(e.features[i],r);else if("GeometryCollection"===n)for(i=0;i<e.geometries.length;i++)t(e.geometries[i],r);else if("Feature"===n)t(e.geometry,r);else if("Polygon"===n)p(e.coordinates,r);else if("MultiPolygon"===n)for(i=0;i<e.coordinates.length;i++)p(e.coordinates[i],r);return e}(a,!0);try{e._geoJSONIndex=i.cluster?new F(function(e){var r=e.superclusterOptions,i=e.clusterProperties;if(!i||!r)return r;for(var n={},o={},a={accumulated:null,zoom:0},s={properties:null},l=Object.keys(i),u=0,c=l;u<c.length;u+=1){var p=c[u],h=i[p],f=h[0],d=t.createExpression(h[1]),m=t.createExpression("string"==typeof f?[f,["accumulated"],["get",p]]:f);n[p]=d.value,o[p]=m.value}return r.map=function(t){s.properties=t;for(var e={},r=0,i=l;r<i.length;r+=1){var o=i[r];e[o]=n[o].evaluate(a,s)}return e},r.reduce=function(t,e){s.properties=e;for(var r=0,i=l;r<i.length;r+=1){var n=i[r];a.accumulated=t[n],t[n]=o[n].evaluate(a,s)}},r}(i)).load(a.features):new gt(a,i.geojsonVtOptions)}catch(o){return r(o)}e.loaded={};var s={};if(n){var l=n.finish();l&&(s.resourceTiming={},s.resourceTiming[i.source]=JSON.parse(JSON.stringify(l)))}r(null,s)})}},r.prototype.coalesce=function(){"Coalescing"===this._state?this._state="Idle":"NeedsLoadData"===this._state&&(this._state="Coalescing",this._loadData())},r.prototype.reloadTile=function(t,r){var i=this.loaded;return i&&i[t.uid]?e.prototype.reloadTile.call(this,t,r):this.loadTile(t,r)},r.prototype.loadGeoJSON=function(e,r){if(e.request)t.getJSON(e.request,r);else{if("string"!=typeof e.data)return r(new Error("Input data given to '"+e.source+"' is not a valid GeoJSON object."));try{return r(null,JSON.parse(e.data))}catch(t){return r(new Error("Input data given to '"+e.source+"' is not a valid GeoJSON object."))}}},r.prototype.removeSource=function(t,e){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),e()},r.prototype.getClusterExpansionZoom=function(t,e){try{e(null,this._geoJSONIndex.getClusterExpansionZoom(t.clusterId))}catch(t){e(t)}},r.prototype.getClusterChildren=function(t,e){try{e(null,this._geoJSONIndex.getChildren(t.clusterId))}catch(t){e(t)}},r.prototype.getClusterLeaves=function(t,e){try{e(null,this._geoJSONIndex.getLeaves(t.clusterId,t.limit,t.offset))}catch(t){e(t)}},r}(l),bt=function(e){var r=this;this.self=e,this.actor=new t.Actor(e,this),this.layerIndexes={},this.availableImages={},this.workerSourceTypes={vector:l,geojson:xt},this.workerSources={},this.demWorkerSources={},this.self.registerWorkerSource=function(t,e){if(r.workerSourceTypes[t])throw new Error('Worker source with name "'+t+'" already registered.');r.workerSourceTypes[t]=e},this.self.registerRTLTextPlugin=function(e){if(t.plugin.isParsed())throw new Error("RTL text plugin already registered.");t.plugin.applyArabicShaping=e.applyArabicShaping,t.plugin.processBidirectionalText=e.processBidirectionalText,t.plugin.processStyledBidirectionalText=e.processStyledBidirectionalText}};return bt.prototype.setReferrer=function(t,e){this.referrer=e},bt.prototype.setImages=function(t,e,r){for(var i in this.availableImages[t]=e,this.workerSources[t]){var n=this.workerSources[t][i];for(var o in n)n[o].availableImages=e}r()},bt.prototype.setLayers=function(t,e,r){this.getLayerIndex(t).replace(e),r()},bt.prototype.updateLayers=function(t,e,r){this.getLayerIndex(t).update(e.layers,e.removedIds),r()},bt.prototype.loadTile=function(t,e,r){this.getWorkerSource(t,e.type,e.source).loadTile(e,r)},bt.prototype.loadDEMTile=function(t,e,r){this.getDEMWorkerSource(t,e.source).loadTile(e,r)},bt.prototype.reloadTile=function(t,e,r){this.getWorkerSource(t,e.type,e.source).reloadTile(e,r)},bt.prototype.abortTile=function(t,e,r){this.getWorkerSource(t,e.type,e.source).abortTile(e,r)},bt.prototype.removeTile=function(t,e,r){this.getWorkerSource(t,e.type,e.source).removeTile(e,r)},bt.prototype.removeDEMTile=function(t,e){this.getDEMWorkerSource(t,e.source).removeTile(e)},bt.prototype.removeSource=function(t,e,r){if(this.workerSources[t]&&this.workerSources[t][e.type]&&this.workerSources[t][e.type][e.source]){var i=this.workerSources[t][e.type][e.source];delete this.workerSources[t][e.type][e.source],void 0!==i.removeSource?i.removeSource(e,r):r()}},bt.prototype.loadWorkerSource=function(t,e,r){try{this.self.importScripts(e.url),r()}catch(t){r(t.toString())}},bt.prototype.syncRTLPluginState=function(e,r,i){try{t.plugin.setState(r);var n=t.plugin.getPluginURL();if(t.plugin.isLoaded()&&!t.plugin.isParsed()&&null!=n){this.self.importScripts(n);var o=t.plugin.isParsed();i(o?void 0:new Error("RTL Text Plugin failed to import scripts from "+n),o)}}catch(t){i(t.toString())}},bt.prototype.getAvailableImages=function(t){var e=this.availableImages[t];return e||(e=[]),e},bt.prototype.getLayerIndex=function(t){var e=this.layerIndexes[t];return e||(e=this.layerIndexes[t]=new i),e},bt.prototype.getWorkerSource=function(t,e,r){var i=this;return this.workerSources[t]||(this.workerSources[t]={}),this.workerSources[t][e]||(this.workerSources[t][e]={}),this.workerSources[t][e][r]||(this.workerSources[t][e][r]=new this.workerSourceTypes[e]({send:function(e,r,n){i.actor.send(e,r,n,t)}},this.getLayerIndex(t),this.getAvailableImages(t))),this.workerSources[t][e][r]},bt.prototype.getDEMWorkerSource=function(t,e){return this.demWorkerSources[t]||(this.demWorkerSources[t]={}),this.demWorkerSources[t][e]||(this.demWorkerSources[t][e]=new c),this.demWorkerSources[t][e]},bt.prototype.enforceCacheSizeLimit=function(e,r){t.enforceCacheSizeLimit(r)},"undefined"!=typeof WorkerGlobalScope&&void 0!==t.window&&t.window instanceof WorkerGlobalScope&&(t.window.worker=new bt(t.window)),bt}),i(0,function(t){var e=t.createCommonjsModule(function(t){function e(t){return!r(t)}function r(t){return"undefined"==typeof window||"undefined"==typeof document?"not a browser":Array.prototype&&Array.prototype.every&&Array.prototype.filter&&Array.prototype.forEach&&Array.prototype.indexOf&&Array.prototype.lastIndexOf&&Array.prototype.map&&Array.prototype.some&&Array.prototype.reduce&&Array.prototype.reduceRight&&Array.isArray?Function.prototype&&Function.prototype.bind?Object.keys&&Object.create&&Object.getPrototypeOf&&Object.getOwnPropertyNames&&Object.isSealed&&Object.isFrozen&&Object.isExtensible&&Object.getOwnPropertyDescriptor&&Object.defineProperty&&Object.defineProperties&&Object.seal&&Object.freeze&&Object.preventExtensions?"JSON"in window&&"parse"in JSON&&"stringify"in JSON?function(){if(!("Worker"in window&&"Blob"in window&&"URL"in window))return!1;var t,e,r=new Blob([""],{type:"text/javascript"}),i=URL.createObjectURL(r);try{e=new Worker(i),t=!0}catch(e){t=!1}return e&&e.terminate(),URL.revokeObjectURL(i),t}()?"Uint8ClampedArray"in window?ArrayBuffer.isView?function(){var t=document.createElement("canvas");t.width=t.height=1;var e=t.getContext("2d");if(!e)return!1;var r=e.getImageData(0,0,1,1);return r&&r.width===t.width}()?(void 0===i[r=t&&t.failIfMajorPerformanceCaveat]&&(i[r]=function(t){var r=function(t){var r=document.createElement("canvas"),i=Object.create(e.webGLContextAttributes);return i.failIfMajorPerformanceCaveat=t,r.probablySupportsContext?r.probablySupportsContext("webgl",i)||r.probablySupportsContext("experimental-webgl",i):r.supportsContext?r.supportsContext("webgl",i)||r.supportsContext("experimental-webgl",i):r.getContext("webgl",i)||r.getContext("experimental-webgl",i)}(t);if(!r)return!1;var i=r.createShader(r.VERTEX_SHADER);return!(!i||r.isContextLost())&&(r.shaderSource(i,"void main() {}"),r.compileShader(i),!0===r.getShaderParameter(i,r.COMPILE_STATUS))}(r)),i[r]?void 0:"insufficient WebGL support"):"insufficient Canvas/getImageData support":"insufficient ArrayBuffer support":"insufficient Uint8ClampedArray support":"insufficient worker support":"insufficient JSON support":"insufficient Object support":"insufficient Function support":"insufficent Array support";var r}t.exports?t.exports=e:window&&(window.mapboxgl=window.mapboxgl||{},window.mapboxgl.supported=e,window.mapboxgl.notSupportedReason=r);var i={};e.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0}}),r={create:function(e,r,i){var n=t.window.document.createElement(e);return void 0!==r&&(n.className=r),i&&i.appendChild(n),n},createNS:function(e,r){return t.window.document.createElementNS(e,r)}},i=t.window.document.documentElement.style;function n(t){if(!i)return t[0];for(var e=0;e<t.length;e++)if(t[e]in i)return t[e];return t[0]}var o,a=n(["userSelect","MozUserSelect","WebkitUserSelect","msUserSelect"]);r.disableDrag=function(){i&&a&&(o=i[a],i[a]="none")},r.enableDrag=function(){i&&a&&(i[a]=o)};var s=n(["transform","WebkitTransform"]);r.setTransform=function(t,e){t.style[s]=e};var l=!1;try{var u=Object.defineProperty({},"passive",{get:function(){l=!0}});t.window.addEventListener("test",u,u),t.window.removeEventListener("test",u,u)}catch(t){l=!1}r.addEventListener=function(t,e,r,i){void 0===i&&(i={}),t.addEventListener(e,r,"passive"in i&&l?i:i.capture)},r.removeEventListener=function(t,e,r,i){void 0===i&&(i={}),t.removeEventListener(e,r,"passive"in i&&l?i:i.capture)};var c=function(e){e.preventDefault(),e.stopPropagation(),t.window.removeEventListener("click",c,!0)};function p(t){var e=t.userImage;return!!(e&&e.render&&e.render())&&(t.data.replace(new Uint8Array(e.data.buffer)),!0)}r.suppressClick=function(){t.window.addEventListener("click",c,!0),t.window.setTimeout(function(){t.window.removeEventListener("click",c,!0)},0)},r.mousePos=function(e,r){var i=e.getBoundingClientRect();return new t.Point(r.clientX-i.left-e.clientLeft,r.clientY-i.top-e.clientTop)},r.touchPos=function(e,r){for(var i=e.getBoundingClientRect(),n=[],o=0;o<r.length;o++)n.push(new t.Point(r[o].clientX-i.left-e.clientLeft,r[o].clientY-i.top-e.clientTop));return n},r.mouseButton=function(e){return void 0!==t.window.InstallTrigger&&2===e.button&&e.ctrlKey&&t.window.navigator.platform.toUpperCase().indexOf("MAC")>=0?0:e.button},r.remove=function(t){t.parentNode&&t.parentNode.removeChild(t)};var h=function(e){function r(){e.call(this),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new t.RGBAImage({width:1,height:1}),this.dirty=!0}return e&&(r.__proto__=e),(r.prototype=Object.create(e&&e.prototype)).constructor=r,r.prototype.isLoaded=function(){return this.loaded},r.prototype.setLoaded=function(t){if(this.loaded!==t&&(this.loaded=t,t)){for(var e=0,r=this.requestors;e<r.length;e+=1){var i=r[e];this._notify(i.ids,i.callback)}this.requestors=[]}},r.prototype.getImage=function(t){return this.images[t]},r.prototype.addImage=function(t,e){this._validate(t,e)&&(this.images[t]=e)},r.prototype._validate=function(e,r){var i=!0;return this._validateStretch(r.stretchX,r.data&&r.data.width)||(this.fire(new t.ErrorEvent(new Error('Image "'+e+'" has invalid "stretchX" value'))),i=!1),this._validateStretch(r.stretchY,r.data&&r.data.height)||(this.fire(new t.ErrorEvent(new Error('Image "'+e+'" has invalid "stretchY" value'))),i=!1),this._validateContent(r.content,r)||(this.fire(new t.ErrorEvent(new Error('Image "'+e+'" has invalid "content" value'))),i=!1),i},r.prototype._validateStretch=function(t,e){if(!t)return!0;for(var r=0,i=0,n=t;i<n.length;i+=1){var o=n[i];if(o[0]<r||o[1]<o[0]||e<o[1])return!1;r=o[1]}return!0},r.prototype._validateContent=function(t,e){return!(t&&(4!==t.length||t[0]<0||e.data.width<t[0]||t[1]<0||e.data.height<t[1]||t[2]<0||e.data.width<t[2]||t[3]<0||e.data.height<t[3]||t[2]<t[0]||t[3]<t[1]))},r.prototype.updateImage=function(t,e){e.version=this.images[t].version+1,this.images[t]=e,this.updatedImages[t]=!0},r.prototype.removeImage=function(t){var e=this.images[t];delete this.images[t],delete this.patterns[t],e.userImage&&e.userImage.onRemove&&e.userImage.onRemove()},r.prototype.listImages=function(){return Object.keys(this.images)},r.prototype.getImages=function(t,e){var r=!0;if(!this.isLoaded())for(var i=0,n=t;i<n.length;i+=1)this.images[n[i]]||(r=!1);this.isLoaded()||r?this._notify(t,e):this.requestors.push({ids:t,callback:e})},r.prototype._notify=function(e,r){for(var i={},n=0,o=e;n<o.length;n+=1){var a=o[n];this.images[a]||this.fire(new t.Event("styleimagemissing",{id:a}));var s=this.images[a];s?i[a]={data:s.data.clone(),pixelRatio:s.pixelRatio,sdf:s.sdf,version:s.version,stretchX:s.stretchX,stretchY:s.stretchY,content:s.content,hasRenderCallback:Boolean(s.userImage&&s.userImage.render)}:t.warnOnce('Image "'+a+'" could not be loaded. Please make sure you have added the image with map.addImage() or a "sprite" property in your style. You can provide missing images by listening for the "styleimagemissing" map event.')}r(null,i)},r.prototype.getPixelSize=function(){var t=this.atlasImage;return{width:t.width,height:t.height}},r.prototype.getPattern=function(e){var r=this.patterns[e],i=this.getImage(e);if(!i)return null;if(r&&r.position.version===i.version)return r.position;if(r)r.position.version=i.version;else{var n={w:i.data.width+2,h:i.data.height+2,x:0,y:0},o=new t.ImagePosition(n,i);this.patterns[e]={bin:n,position:o}}return this._updatePatternAtlas(),this.patterns[e].position},r.prototype.bind=function(e){var r=e.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new t.Texture(e,this.atlasImage,r.RGBA),this.atlasTexture.bind(r.LINEAR,r.CLAMP_TO_EDGE)},r.prototype._updatePatternAtlas=function(){var e=[];for(var r in this.patterns)e.push(this.patterns[r].bin);var i=t.potpack(e),n=i.w,o=i.h,a=this.atlasImage;for(var s in a.resize({width:n||1,height:o||1}),this.patterns){var l=this.patterns[s].bin,u=l.x+1,c=l.y+1,p=this.images[s].data,h=p.width,f=p.height;t.RGBAImage.copy(p,a,{x:0,y:0},{x:u,y:c},{width:h,height:f}),t.RGBAImage.copy(p,a,{x:0,y:f-1},{x:u,y:c-1},{width:h,height:1}),t.RGBAImage.copy(p,a,{x:0,y:0},{x:u,y:c+f},{width:h,height:1}),t.RGBAImage.copy(p,a,{x:h-1,y:0},{x:u-1,y:c},{width:1,height:f}),t.RGBAImage.copy(p,a,{x:0,y:0},{x:u+h,y:c},{width:1,height:f})}this.dirty=!0},r.prototype.beginFrame=function(){this.callbackDispatchedThisFrame={}},r.prototype.dispatchRenderCallbacks=function(t){for(var e=0,r=t;e<r.length;e+=1){var i=r[e];if(!this.callbackDispatchedThisFrame[i]){this.callbackDispatchedThisFrame[i]=!0;var n=this.images[i];p(n)&&this.updateImage(i,n)}}},r}(t.Evented),f=y,d=y,m=1e20;function y(t,e,r,i,n,o){this.fontSize=t||24,this.buffer=void 0===e?3:e,this.cutoff=i||.25,this.fontFamily=n||"sans-serif",this.fontWeight=o||"normal",this.radius=r||8;var a=this.size=this.fontSize+2*this.buffer;this.canvas=document.createElement("canvas"),this.canvas.width=this.canvas.height=a,this.ctx=this.canvas.getContext("2d"),this.ctx.font=this.fontWeight+" "+this.fontSize+"px "+this.fontFamily,this.ctx.textBaseline="middle",this.ctx.fillStyle="black",this.gridOuter=new Float64Array(a*a),this.gridInner=new Float64Array(a*a),this.f=new Float64Array(a),this.d=new Float64Array(a),this.z=new Float64Array(a+1),this.v=new Int16Array(a),this.middle=Math.round(a/2*(navigator.userAgent.indexOf("Gecko/")>=0?1.2:1))}function g(t,e,r,i,n,o,a){for(var s=0;s<e;s++){for(var l=0;l<r;l++)i[l]=t[l*e+s];for(_(i,n,o,a,r),l=0;l<r;l++)t[l*e+s]=n[l]}for(l=0;l<r;l++){for(s=0;s<e;s++)i[s]=t[l*e+s];for(_(i,n,o,a,e),s=0;s<e;s++)t[l*e+s]=Math.sqrt(n[s])}}function _(t,e,r,i,n){r[0]=0,i[0]=-m,i[1]=+m;for(var o=1,a=0;o<n;o++){for(var s=(t[o]+o*o-(t[r[a]]+r[a]*r[a]))/(2*o-2*r[a]);s<=i[a];)a--,s=(t[o]+o*o-(t[r[a]]+r[a]*r[a]))/(2*o-2*r[a]);r[++a]=o,i[a]=s,i[a+1]=+m}for(o=0,a=0;o<n;o++){for(;i[a+1]<o;)a++;e[o]=(o-r[a])*(o-r[a])+t[r[a]]}}y.prototype.draw=function(t){this.ctx.clearRect(0,0,this.size,this.size),this.ctx.fillText(t,this.buffer,this.middle);for(var e=this.ctx.getImageData(0,0,this.size,this.size),r=new Uint8ClampedArray(this.size*this.size),i=0;i<this.size*this.size;i++){var n=e.data[4*i+3]/255;this.gridOuter[i]=1===n?0:0===n?m:Math.pow(Math.max(0,.5-n),2),this.gridInner[i]=1===n?m:0===n?0:Math.pow(Math.max(0,n-.5),2)}for(g(this.gridOuter,this.size,this.size,this.f,this.d,this.v,this.z),g(this.gridInner,this.size,this.size,this.f,this.d,this.v,this.z),i=0;i<this.size*this.size;i++)r[i]=Math.max(0,Math.min(255,Math.round(255-255*((this.gridOuter[i]-this.gridInner[i])/this.radius+this.cutoff))));return r},f.default=d;var v=function(t,e){this.requestManager=t,this.localIdeographFontFamily=e,this.entries={}};v.prototype.setURL=function(t){this.url=t},v.prototype.getGlyphs=function(e,r){var i=this,n=[];for(var o in e)for(var a=0,s=e[o];a<s.length;a+=1)n.push({stack:o,id:s[a]});t.asyncAll(n,function(t,e){var r=t.stack,n=t.id,o=i.entries[r];o||(o=i.entries[r]={glyphs:{},requests:{},ranges:{}});var a=o.glyphs[n];if(void 0===a){if(a=i._tinySDF(o,r,n))return o.glyphs[n]=a,void e(null,{stack:r,id:n,glyph:a});var s=Math.floor(n/256);if(256*s>65535)e(new Error("glyphs > 65535 not supported"));else if(o.ranges[s])e(null,{stack:r,id:n,glyph:a});else{var l=o.requests[s];l||(l=o.requests[s]=[],v.loadGlyphRange(r,s,i.url,i.requestManager,function(t,e){if(e){for(var r in e)i._doesCharSupportLocalGlyph(+r)||(o.glyphs[+r]=e[+r]);o.ranges[s]=!0}for(var n=0,a=l;n<a.length;n+=1)(0,a[n])(t,e);delete o.requests[s]})),l.push(function(t,i){t?e(t):i&&e(null,{stack:r,id:n,glyph:i[n]||null})})}}else e(null,{stack:r,id:n,glyph:a})},function(t,e){if(t)r(t);else if(e){for(var i={},n=0,o=e;n<o.length;n+=1){var a=o[n],s=a.stack,l=a.id,u=a.glyph;(i[s]||(i[s]={}))[l]=u&&{id:u.id,bitmap:u.bitmap.clone(),metrics:u.metrics}}r(null,i)}})},v.prototype._doesCharSupportLocalGlyph=function(e){return!!this.localIdeographFontFamily&&(t.isChar["CJK Unified Ideographs"](e)||t.isChar["Hangul Syllables"](e)||t.isChar.Hiragana(e)||t.isChar.Katakana(e))},v.prototype._tinySDF=function(e,r,i){var n=this.localIdeographFontFamily;if(n&&this._doesCharSupportLocalGlyph(i)){var o=e.tinySDF;if(!o){var a="400";/bold/i.test(r)?a="900":/medium/i.test(r)?a="500":/light/i.test(r)&&(a="200"),o=e.tinySDF=new v.TinySDF(24,3,8,.25,n,a)}return{id:i,bitmap:new t.AlphaImage({width:30,height:30},o.draw(String.fromCharCode(i))),metrics:{width:24,height:24,left:0,top:-8,advance:24}}}},v.loadGlyphRange=function(e,r,i,n,o){var a=256*r,s=a+255,l=n.transformRequest(n.normalizeGlyphsURL(i).replace("{fontstack}",e).replace("{range}",a+"-"+s),t.ResourceType.Glyphs);t.getArrayBuffer(l,function(e,r){if(e)o(e);else if(r){for(var i={},n=0,a=t.parseGlyphPBF(r);n<a.length;n+=1){var s=a[n];i[s.id]=s}o(null,i)}})},v.TinySDF=f;var x=function(){this.specification=t.styleSpec.light.position};x.prototype.possiblyEvaluate=function(e,r){return t.sphericalToCartesian(e.expression.evaluate(r))},x.prototype.interpolate=function(e,r,i){return{x:t.number(e.x,r.x,i),y:t.number(e.y,r.y,i),z:t.number(e.z,r.z,i)}};var b=new t.Properties({anchor:new t.DataConstantProperty(t.styleSpec.light.anchor),position:new x,color:new t.DataConstantProperty(t.styleSpec.light.color),intensity:new t.DataConstantProperty(t.styleSpec.light.intensity)}),w=function(e){function r(r){e.call(this),this._transitionable=new t.Transitionable(b),this.setLight(r),this._transitioning=this._transitionable.untransitioned()}return e&&(r.__proto__=e),(r.prototype=Object.create(e&&e.prototype)).constructor=r,r.prototype.getLight=function(){return this._transitionable.serialize()},r.prototype.setLight=function(e,r){if(void 0===r&&(r={}),!this._validate(t.validateLight,e,r))for(var i in e){var n=e[i];t.endsWith(i,"-transition")?this._transitionable.setTransition(i.slice(0,-"-transition".length),n):this._transitionable.setValue(i,n)}},r.prototype.updateTransitions=function(t){this._transitioning=this._transitionable.transitioned(t,this._transitioning)},r.prototype.hasTransition=function(){return this._transitioning.hasTransition()},r.prototype.recalculate=function(t){this.properties=this._transitioning.possiblyEvaluate(t)},r.prototype._validate=function(e,r,i){return(!i||!1!==i.validate)&&t.emitValidationErrors(this,e.call(t.validateStyle,t.extend({value:r,style:{glyphs:!0,sprite:!0},styleSpec:t.styleSpec})))},r}(t.Evented),S=function(t,e){this.width=t,this.height=e,this.nextRow=0,this.data=new Uint8Array(this.width*this.height),this.dashEntry={}};S.prototype.getDash=function(t,e){var r=t.join(",")+String(e);return this.dashEntry[r]||(this.dashEntry[r]=this.addDash(t,e)),this.dashEntry[r]},S.prototype.getDashRanges=function(t,e,r){var i=[],n=t.length%2==1?-t[t.length-1]*r:0,o=t[0]*r,a=!0;i.push({left:n,right:o,isDash:a,zeroLength:0===t[0]});for(var s=t[0],l=1;l<t.length;l++){var u=t[l];i.push({left:n=s*r,right:o=(s+=u)*r,isDash:a=!a,zeroLength:0===u})}return i},S.prototype.addRoundDash=function(t,e,r){for(var i=e/2,n=-r;n<=r;n++)for(var o=this.width*(this.nextRow+r+n),a=0,s=t[a],l=0;l<this.width;l++){l/s.right>1&&(s=t[++a]);var u=Math.abs(l-s.left),c=Math.abs(l-s.right),p=Math.min(u,c),h=void 0,f=n/r*(i+1);if(s.isDash){var d=i-Math.abs(f);h=Math.sqrt(p*p+d*d)}else h=i-Math.sqrt(p*p+f*f);this.data[o+l]=Math.max(0,Math.min(255,h+128))}},S.prototype.addRegularDash=function(t){for(var e=t.length-1;e>=0;--e){var r=t[e],i=t[e+1];r.zeroLength?t.splice(e,1):i&&i.isDash===r.isDash&&(i.left=r.left,t.splice(e,1))}var n=t[0],o=t[t.length-1];n.isDash===o.isDash&&(n.left=o.left-this.width,o.right=n.right+this.width);for(var a=this.width*this.nextRow,s=0,l=t[s],u=0;u<this.width;u++){u/l.right>1&&(l=t[++s]);var c=Math.abs(u-l.left),p=Math.abs(u-l.right),h=Math.min(c,p);this.data[a+u]=Math.max(0,Math.min(255,(l.isDash?h:-h)+128))}},S.prototype.addDash=function(e,r){var i=r?7:0,n=2*i+1;if(this.nextRow+n>this.height)return t.warnOnce("LineAtlas out of space"),null;for(var o=0,a=0;a<e.length;a++)o+=e[a];if(0!==o){var s=this.width/o,l=this.getDashRanges(e,this.width,s);r?this.addRoundDash(l,s,i):this.addRegularDash(l)}var u={y:(this.nextRow+i+.5)/this.height,height:2*i/this.height,width:o};return this.nextRow+=n,this.dirty=!0,u},S.prototype.bind=function(t){var e=t.gl;this.texture?(e.bindTexture(e.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,e.texSubImage2D(e.TEXTURE_2D,0,0,0,this.width,this.height,e.ALPHA,e.UNSIGNED_BYTE,this.data))):(this.texture=e.createTexture(),e.bindTexture(e.TEXTURE_2D,this.texture),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.REPEAT),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.REPEAT),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texImage2D(e.TEXTURE_2D,0,e.ALPHA,this.width,this.height,0,e.ALPHA,e.UNSIGNED_BYTE,this.data))};var T=function e(r,i){this.workerPool=r,this.actors=[],this.currentActor=0,this.id=t.uniqueId();for(var n=this.workerPool.acquire(this.id),o=0;o<n.length;o++){var a=new e.Actor(n[o],i,this.id);a.name="Worker "+o,this.actors.push(a)}};function I(e,r,i){var n=function(n,o){if(n)return i(n);if(o){var a=t.pick(t.extend(o,e),["tiles","minzoom","maxzoom","attribution","mapbox_logo","bounds","scheme","tileSize","encoding"]);o.vector_layers&&(a.vectorLayers=o.vector_layers,a.vectorLayerIds=a.vectorLayers.map(function(t){return t.id})),a.tiles=r.canonicalizeTileset(a,e.url),i(null,a)}};return e.url?t.getJSON(r.transformRequest(r.normalizeSourceURL(e.url),t.ResourceType.Source),n):t.browser.frame(function(){return n(null,e)})}T.prototype.broadcast=function(e,r,i){t.asyncAll(this.actors,function(t,i){t.send(e,r,i)},i=i||function(){})},T.prototype.getActor=function(){return this.currentActor=(this.currentActor+1)%this.actors.length,this.actors[this.currentActor]},T.prototype.remove=function(){this.actors.forEach(function(t){t.remove()}),this.actors=[],this.workerPool.release(this.id)},T.Actor=t.Actor;var E=function(e,r,i){this.bounds=t.LngLatBounds.convert(this.validateBounds(e)),this.minzoom=r||0,this.maxzoom=i||24};E.prototype.validateBounds=function(t){return Array.isArray(t)&&4===t.length?[Math.max(-180,t[0]),Math.max(-90,t[1]),Math.min(180,t[2]),Math.min(90,t[3])]:[-180,-90,180,90]},E.prototype.contains=function(e){var r=Math.pow(2,e.z),i=Math.floor(t.mercatorXfromLng(this.bounds.getWest())*r),n=Math.floor(t.mercatorYfromLat(this.bounds.getNorth())*r),o=Math.ceil(t.mercatorXfromLng(this.bounds.getEast())*r),a=Math.ceil(t.mercatorYfromLat(this.bounds.getSouth())*r);return e.x>=i&&e.x<o&&e.y>=n&&e.y<a};var A=function(e){function r(r,i,n,o){if(e.call(this),this.id=r,this.dispatcher=n,this.type="vector",this.minzoom=0,this.maxzoom=22,this.scheme="xyz",this.tileSize=512,this.reparseOverscaled=!0,this.isTileClipped=!0,this._loaded=!1,t.extend(this,t.pick(i,["url","scheme","tileSize","promoteId"])),this._options=t.extend({type:"vector"},i),this._collectResourceTiming=i.collectResourceTiming,512!==this.tileSize)throw new Error("vector tile sources must have a tileSize of 512");this.setEventedParent(o)}return e&&(r.__proto__=e),(r.prototype=Object.create(e&&e.prototype)).constructor=r,r.prototype.load=function(){var e=this;this._loaded=!1,this.fire(new t.Event("dataloading",{dataType:"source"})),this._tileJSONRequest=I(this._options,this.map._requestManager,function(r,i){e._tileJSONRequest=null,e._loaded=!0,r?e.fire(new t.ErrorEvent(r)):i&&(t.extend(e,i),i.bounds&&(e.tileBounds=new E(i.bounds,e.minzoom,e.maxzoom)),t.postTurnstileEvent(i.tiles,e.map._requestManager._customAccessToken),t.postMapLoadEvent(i.tiles,e.map._getMapId(),e.map._requestManager._skuToken,e.map._requestManager._customAccessToken),e.fire(new t.Event("data",{dataType:"source",sourceDataType:"metadata"})),e.fire(new t.Event("data",{dataType:"source",sourceDataType:"content"})))})},r.prototype.loaded=function(){return this._loaded},r.prototype.hasTile=function(t){return!this.tileBounds||this.tileBounds.contains(t.canonical)},r.prototype.onAdd=function(t){this.map=t,this.load()},r.prototype.onRemove=function(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)},r.prototype.serialize=function(){return t.extend({},this._options)},r.prototype.loadTile=function(e,r){var i=this.map._requestManager.normalizeTileURL(e.tileID.canonical.url(this.tiles,this.scheme)),n={request:this.map._requestManager.transformRequest(i,t.ResourceType.Tile),uid:e.uid,tileID:e.tileID,zoom:e.tileID.overscaledZ,tileSize:this.tileSize*e.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:t.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};function o(i,n){return delete e.request,e.aborted?r(null):i&&404!==i.status?r(i):(n&&n.resourceTiming&&(e.resourceTiming=n.resourceTiming),this.map._refreshExpiredTiles&&n&&e.setExpiryData(n),e.loadVectorData(n,this.map.painter),t.cacheEntryPossiblyAdded(this.dispatcher),r(null),void(e.reloadCallback&&(this.loadTile(e,e.reloadCallback),e.reloadCallback=null)))}n.request.collectResourceTiming=this._collectResourceTiming,e.actor&&"expired"!==e.state?"loading"===e.state?e.reloadCallback=r:e.request=e.actor.send("reloadTile",n,o.bind(this)):(e.actor=this.dispatcher.getActor(),e.request=e.actor.send("loadTile",n,o.bind(this)))},r.prototype.abortTile=function(t){t.request&&(t.request.cancel(),delete t.request),t.actor&&t.actor.send("abortTile",{uid:t.uid,type:this.type,source:this.id},void 0)},r.prototype.unloadTile=function(t){t.unloadVectorData(),t.actor&&t.actor.send("removeTile",{uid:t.uid,type:this.type,source:this.id},void 0)},r.prototype.hasTransition=function(){return!1},r}(t.Evented),z=function(e){function r(r,i,n,o){e.call(this),this.id=r,this.dispatcher=n,this.setEventedParent(o),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=t.extend({type:"raster"},i),t.extend(this,t.pick(i,["url","scheme","tileSize"]))}return e&&(r.__proto__=e),(r.prototype=Object.create(e&&e.prototype)).constructor=r,r.prototype.load=function(){var e=this;this._loaded=!1,this.fire(new t.Event("dataloading",{dataType:"source"})),this._tileJSONRequest=I(this._options,this.map._requestManager,function(r,i){e._tileJSONRequest=null,e._loaded=!0,r?e.fire(new t.ErrorEvent(r)):i&&(t.extend(e,i),i.bounds&&(e.tileBounds=new E(i.bounds,e.minzoom,e.maxzoom)),t.postTurnstileEvent(i.tiles),t.postMapLoadEvent(i.tiles,e.map._getMapId(),e.map._requestManager._skuToken),e.fire(new t.Event("data",{dataType:"source",sourceDataType:"metadata"})),e.fire(new t.Event("data",{dataType:"source",sourceDataType:"content"})))})},r.prototype.loaded=function(){return this._loaded},r.prototype.onAdd=function(t){this.map=t,this.load()},r.prototype.onRemove=function(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)},r.prototype.serialize=function(){return t.extend({},this._options)},r.prototype.hasTile=function(t){return!this.tileBounds||this.tileBounds.contains(t.canonical)},r.prototype.loadTile=function(e,r){var i=this,n=this.map._requestManager.normalizeTileURL(e.tileID.canonical.url(this.tiles,this.scheme),this.tileSize);e.request=t.getImage(this.map._requestManager.transformRequest(n,t.ResourceType.Tile),function(n,o){if(delete e.request,e.aborted)e.state="unloaded",r(null);else if(n)e.state="errored",r(n);else if(o){i.map._refreshExpiredTiles&&e.setExpiryData(o),delete o.cacheControl,delete o.expires;var a=i.map.painter.context,s=a.gl;e.texture=i.map.painter.getTileTexture(o.width),e.texture?e.texture.update(o,{useMipmap:!0}):(e.texture=new t.Texture(a,o,s.RGBA,{useMipmap:!0}),e.texture.bind(s.LINEAR,s.CLAMP_TO_EDGE,s.LINEAR_MIPMAP_NEAREST),a.extTextureFilterAnisotropic&&s.texParameterf(s.TEXTURE_2D,a.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,a.extTextureFilterAnisotropicMax)),e.state="loaded",t.cacheEntryPossiblyAdded(i.dispatcher),r(null)}})},r.prototype.abortTile=function(t,e){t.request&&(t.request.cancel(),delete t.request),e()},r.prototype.unloadTile=function(t,e){t.texture&&this.map.painter.saveTileTexture(t.texture),e()},r.prototype.hasTransition=function(){return!1},r}(t.Evented),P=function(e){function r(r,i,n,o){e.call(this,r,i,n,o),this.type="raster-dem",this.maxzoom=22,this._options=t.extend({type:"raster-dem"},i),this.encoding=i.encoding||"mapbox"}return e&&(r.__proto__=e),(r.prototype=Object.create(e&&e.prototype)).constructor=r,r.prototype.serialize=function(){return{type:"raster-dem",url:this.url,tileSize:this.tileSize,tiles:this.tiles,bounds:this.bounds,encoding:this.encoding}},r.prototype.loadTile=function(e,r){var i=this.map._requestManager.normalizeTileURL(e.tileID.canonical.url(this.tiles,this.scheme),this.tileSize);e.request=t.getImage(this.map._requestManager.transformRequest(i,t.ResourceType.Tile),function(i,n){if(delete e.request,e.aborted)e.state="unloaded",r(null);else if(i)e.state="errored",r(i);else if(n){this.map._refreshExpiredTiles&&e.setExpiryData(n),delete n.cacheControl,delete n.expires;var o=t.window.ImageBitmap&&n instanceof t.window.ImageBitmap&&t.offscreenCanvasSupported()?n:t.browser.getImageData(n,1),a={uid:e.uid,coord:e.tileID,source:this.id,rawImageData:o,encoding:this.encoding};e.actor&&"expired"!==e.state||(e.actor=this.dispatcher.getActor(),e.actor.send("loadDEMTile",a,function(t,i){t&&(e.state="errored",r(t)),i&&(e.dem=i,e.needsHillshadePrepare=!0,e.state="loaded",r(null))}.bind(this)))}}.bind(this)),e.neighboringTiles=this._getNeighboringTiles(e.tileID)},r.prototype._getNeighboringTiles=function(e){var r=e.canonical,i=Math.pow(2,r.z),n=(r.x-1+i)%i,o=0===r.x?e.wrap-1:e.wrap,a=(r.x+1+i)%i,s=r.x+1===i?e.wrap+1:e.wrap,l={};return l[new t.OverscaledTileID(e.overscaledZ,o,r.z,n,r.y).key]={backfilled:!1},l[new t.OverscaledTileID(e.overscaledZ,s,r.z,a,r.y).key]={backfilled:!1},r.y>0&&(l[new t.OverscaledTileID(e.overscaledZ,o,r.z,n,r.y-1).key]={backfilled:!1},l[new t.OverscaledTileID(e.overscaledZ,e.wrap,r.z,r.x,r.y-1).key]={backfilled:!1},l[new t.OverscaledTileID(e.overscaledZ,s,r.z,a,r.y-1).key]={backfilled:!1}),r.y+1<i&&(l[new t.OverscaledTileID(e.overscaledZ,o,r.z,n,r.y+1).key]={backfilled:!1},l[new t.OverscaledTileID(e.overscaledZ,e.wrap,r.z,r.x,r.y+1).key]={backfilled:!1},l[new t.OverscaledTileID(e.overscaledZ,s,r.z,a,r.y+1).key]={backfilled:!1}),l},r.prototype.unloadTile=function(t){t.demTexture&&this.map.painter.saveTileTexture(t.demTexture),t.fbo&&(t.fbo.destroy(),delete t.fbo),t.dem&&delete t.dem,delete t.neighboringTiles,t.state="unloaded",t.actor&&t.actor.send("removeDEMTile",{uid:t.uid,source:this.id})},r}(z),C=function(e){function r(r,i,n,o){e.call(this),this.id=r,this.type="geojson",this.minzoom=0,this.maxzoom=18,this.tileSize=512,this.isTileClipped=!0,this.reparseOverscaled=!0,this._removed=!1,this._loaded=!1,this.actor=n.getActor(),this.setEventedParent(o),this._data=i.data,this._options=t.extend({},i),this._collectResourceTiming=i.collectResourceTiming,this._resourceTiming=[],void 0!==i.maxzoom&&(this.maxzoom=i.maxzoom),i.type&&(this.type=i.type),i.attribution&&(this.attribution=i.attribution),this.promoteId=i.promoteId;var a=t.EXTENT/this.tileSize;this.workerOptions=t.extend({source:this.id,cluster:i.cluster||!1,geojsonVtOptions:{buffer:(void 0!==i.buffer?i.buffer:128)*a,tolerance:(void 0!==i.tolerance?i.tolerance:.375)*a,extent:t.EXTENT,maxZoom:this.maxzoom,lineMetrics:i.lineMetrics||!1,generateId:i.generateId||!1},superclusterOptions:{maxZoom:void 0!==i.clusterMaxZoom?Math.min(i.clusterMaxZoom,this.maxzoom-1):this.maxzoom-1,extent:t.EXTENT,radius:(i.clusterRadius||50)*a,log:!1,generateId:i.generateId||!1},clusterProperties:i.clusterProperties},i.workerOptions)}return e&&(r.__proto__=e),(r.prototype=Object.create(e&&e.prototype)).constructor=r,r.prototype.load=function(){var e=this;this.fire(new t.Event("dataloading",{dataType:"source"})),this._updateWorkerData(function(r){if(r)e.fire(new t.ErrorEvent(r));else{var i={dataType:"source",sourceDataType:"metadata"};e._collectResourceTiming&&e._resourceTiming&&e._resourceTiming.length>0&&(i.resourceTiming=e._resourceTiming,e._resourceTiming=[]),e.fire(new t.Event("data",i))}})},r.prototype.onAdd=function(t){this.map=t,this.load()},r.prototype.setData=function(e){var r=this;return this._data=e,this.fire(new t.Event("dataloading",{dataType:"source"})),this._updateWorkerData(function(e){if(e)r.fire(new t.ErrorEvent(e));else{var i={dataType:"source",sourceDataType:"content"};r._collectResourceTiming&&r._resourceTiming&&r._resourceTiming.length>0&&(i.resourceTiming=r._resourceTiming,r._resourceTiming=[]),r.fire(new t.Event("data",i))}}),this},r.prototype.getClusterExpansionZoom=function(t,e){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:t,source:this.id},e),this},r.prototype.getClusterChildren=function(t,e){return this.actor.send("geojson.getClusterChildren",{clusterId:t,source:this.id},e),this},r.prototype.getClusterLeaves=function(t,e,r,i){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:t,limit:e,offset:r},i),this},r.prototype._updateWorkerData=function(e){var r=this;this._loaded=!1;var i=t.extend({},this.workerOptions),n=this._data;"string"==typeof n?(i.request=this.map._requestManager.transformRequest(t.browser.resolveURL(n),t.ResourceType.Source),i.request.collectResourceTiming=this._collectResourceTiming):i.data=JSON.stringify(n),this.actor.send(this.type+".loadData",i,function(t,n){r._removed||n&&n.abandoned||(r._loaded=!0,n&&n.resourceTiming&&n.resourceTiming[r.id]&&(r._resourceTiming=n.resourceTiming[r.id].slice(0)),r.actor.send(r.type+".coalesce",{source:i.source},null),e(t))})},r.prototype.loaded=function(){return this._loaded},r.prototype.loadTile=function(e,r){var i=this,n=e.actor?"reloadTile":"loadTile";e.actor=this.actor,e.request=this.actor.send(n,{type:this.type,uid:e.uid,tileID:e.tileID,zoom:e.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:t.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId},function(t,o){return delete e.request,e.unloadVectorData(),e.aborted?r(null):t?r(t):(e.loadVectorData(o,i.map.painter,"reloadTile"===n),r(null))})},r.prototype.abortTile=function(t){t.request&&(t.request.cancel(),delete t.request),t.aborted=!0},r.prototype.unloadTile=function(t){t.unloadVectorData(),this.actor.send("removeTile",{uid:t.uid,type:this.type,source:this.id})},r.prototype.onRemove=function(){this._removed=!0,this.actor.send("removeSource",{type:this.type,source:this.id})},r.prototype.serialize=function(){return t.extend({},this._options,{type:this.type,data:this._data})},r.prototype.hasTransition=function(){return!1},r}(t.Evented),k=t.createLayout([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]),M=function(e){function r(t,r,i,n){e.call(this),this.id=t,this.dispatcher=i,this.coordinates=r.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(n),this.options=r}return e&&(r.__proto__=e),(r.prototype=Object.create(e&&e.prototype)).constructor=r,r.prototype.load=function(e,r){var i=this;this._loaded=!1,this.fire(new t.Event("dataloading",{dataType:"source"})),this.url=this.options.url,t.getImage(this.map._requestManager.transformRequest(this.url,t.ResourceType.Image),function(n,o){i._loaded=!0,n?i.fire(new t.ErrorEvent(n)):o&&(i.image=o,e&&(i.coordinates=e),r&&r(),i._finishLoading())})},r.prototype.loaded=function(){return this._loaded},r.prototype.updateImage=function(t){var e=this;return this.image&&t.url?(this.options.url=t.url,this.load(t.coordinates,function(){e.texture=null}),this):this},r.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new t.Event("data",{dataType:"source",sourceDataType:"metadata"})))},r.prototype.onAdd=function(t){this.map=t,this.load()},r.prototype.setCoordinates=function(e){var r=this;this.coordinates=e;var i=e.map(t.MercatorCoordinate.fromLngLat);this.tileID=function(e){for(var r=1/0,i=1/0,n=-1/0,o=-1/0,a=0,s=e;a<s.length;a+=1){var l=s[a];r=Math.min(r,l.x),i=Math.min(i,l.y),n=Math.max(n,l.x),o=Math.max(o,l.y)}var u=Math.max(n-r,o-i),c=Math.max(0,Math.floor(-Math.log(u)/Math.LN2)),p=Math.pow(2,c);return new t.CanonicalTileID(c,Math.floor((r+n)/2*p),Math.floor((i+o)/2*p))}(i),this.minzoom=this.maxzoom=this.tileID.z;var n=i.map(function(t){return r.tileID.getTilePoint(t)._round()});return this._boundsArray=new t.StructArrayLayout4i8,this._boundsArray.emplaceBack(n[0].x,n[0].y,0,0),this._boundsArray.emplaceBack(n[1].x,n[1].y,t.EXTENT,0),this._boundsArray.emplaceBack(n[3].x,n[3].y,0,t.EXTENT),this._boundsArray.emplaceBack(n[2].x,n[2].y,t.EXTENT,t.EXTENT),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new t.Event("data",{dataType:"source",sourceDataType:"content"})),this},r.prototype.prepare=function(){if(0!==Object.keys(this.tiles).length&&this.image){var e=this.map.painter.context,r=e.gl;for(var i in this.boundsBuffer||(this.boundsBuffer=e.createVertexBuffer(this._boundsArray,k.members)),this.boundsSegments||(this.boundsSegments=t.SegmentVector.simpleSegment(0,0,4,2)),this.texture||(this.texture=new t.Texture(e,this.image,r.RGBA),this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE)),this.tiles){var n=this.tiles[i];"loaded"!==n.state&&(n.state="loaded",n.texture=this.texture)}}},r.prototype.loadTile=function(t,e){this.tileID&&this.tileID.equals(t.tileID.canonical)?(this.tiles[String(t.tileID.wrap)]=t,t.buckets={},e(null)):(t.state="errored",e(null))},r.prototype.serialize=function(){return{type:"image",url:this.options.url,coordinates:this.coordinates}},r.prototype.hasTransition=function(){return!1},r}(t.Evented),D=function(e){function r(t,r,i,n){e.call(this,t,r,i,n),this.roundZoom=!0,this.type="video",this.options=r}return e&&(r.__proto__=e),(r.prototype=Object.create(e&&e.prototype)).constructor=r,r.prototype.load=function(){var e=this;this._loaded=!1;var r=this.options;this.urls=[];for(var i=0,n=r.urls;i<n.length;i+=1)this.urls.push(this.map._requestManager.transformRequest(n[i],t.ResourceType.Source).url);t.getVideo(this.urls,function(r,i){e._loaded=!0,r?e.fire(new t.ErrorEvent(r)):i&&(e.video=i,e.video.loop=!0,e.video.addEventListener("playing",function(){e.map.triggerRepaint()}),e.map&&e.video.play(),e._finishLoading())})},r.prototype.pause=function(){this.video&&this.video.pause()},r.prototype.play=function(){this.video&&this.video.play()},r.prototype.seek=function(e){if(this.video){var r=this.video.seekable;e<r.start(0)||e>r.end(0)?this.fire(new t.ErrorEvent(new t.ValidationError("sources."+this.id,null,"Playback for this video can be set only between the "+r.start(0)+" and "+r.end(0)+"-second mark."))):this.video.currentTime=e}},r.prototype.getVideo=function(){return this.video},r.prototype.onAdd=function(t){this.map||(this.map=t,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},r.prototype.prepare=function(){if(!(0===Object.keys(this.tiles).length||this.video.readyState<2)){var e=this.map.painter.context,r=e.gl;for(var i in this.boundsBuffer||(this.boundsBuffer=e.createVertexBuffer(this._boundsArray,k.members)),this.boundsSegments||(this.boundsSegments=t.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE),r.texSubImage2D(r.TEXTURE_2D,0,0,0,r.RGBA,r.UNSIGNED_BYTE,this.video)):(this.texture=new t.Texture(e,this.video,r.RGBA),this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE)),this.tiles){var n=this.tiles[i];"loaded"!==n.state&&(n.state="loaded",n.texture=this.texture)}}},r.prototype.serialize=function(){return{type:"video",urls:this.urls,coordinates:this.coordinates}},r.prototype.hasTransition=function(){return this.video&&!this.video.paused},r}(M),L=function(e){function r(r,i,n,o){e.call(this,r,i,n,o),i.coordinates?Array.isArray(i.coordinates)&&4===i.coordinates.length&&!i.coordinates.some(function(t){return!Array.isArray(t)||2!==t.length||t.some(function(t){return"number"!=typeof t})})||this.fire(new t.ErrorEvent(new t.ValidationError("sources."+r,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new t.ErrorEvent(new t.ValidationError("sources."+r,null,'missing required property "coordinates"'))),i.animate&&"boolean"!=typeof i.animate&&this.fire(new t.ErrorEvent(new t.ValidationError("sources."+r,null,'optional "animate" property must be a boolean value'))),i.canvas?"string"==typeof i.canvas||i.canvas instanceof t.window.HTMLCanvasElement||this.fire(new t.ErrorEvent(new t.ValidationError("sources."+r,null,'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new t.ErrorEvent(new t.ValidationError("sources."+r,null,'missing required property "canvas"'))),this.options=i,this.animate=void 0===i.animate||i.animate}return e&&(r.__proto__=e),(r.prototype=Object.create(e&&e.prototype)).constructor=r,r.prototype.load=function(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof t.window.HTMLCanvasElement?this.options.canvas:t.window.document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new t.ErrorEvent(new Error("Canvas dimensions cannot be less than or equal to zero."))):(this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading())},r.prototype.getCanvas=function(){return this.canvas},r.prototype.onAdd=function(t){this.map=t,this.load(),this.canvas&&this.animate&&this.play()},r.prototype.onRemove=function(){this.pause()},r.prototype.prepare=function(){var e=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,e=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,e=!0),!this._hasInvalidDimensions()&&0!==Object.keys(this.tiles).length){var r=this.map.painter.context,i=r.gl;for(var n in this.boundsBuffer||(this.boundsBuffer=r.createVertexBuffer(this._boundsArray,k.members)),this.boundsSegments||(this.boundsSegments=t.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(e||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new t.Texture(r,this.canvas,i.RGBA,{premultiply:!0}),this.tiles){var o=this.tiles[n];"loaded"!==o.state&&(o.state="loaded",o.texture=this.texture)}}},r.prototype.serialize=function(){return{type:"canvas",coordinates:this.coordinates}},r.prototype.hasTransition=function(){return this._playing},r.prototype._hasInvalidDimensions=function(){for(var t=0,e=[this.canvas.width,this.canvas.height];t<e.length;t+=1){var r=e[t];if(isNaN(r)||r<=0)return!0}return!1},r}(M),B={vector:A,raster:z,"raster-dem":P,geojson:C,video:D,image:M,canvas:L};function R(e,r){var i=t.identity([]);return t.translate(i,i,[1,1,0]),t.scale(i,i,[.5*e.width,.5*e.height,1]),t.multiply(i,i,e.calculatePosMatrix(r.toUnwrapped()))}function F(t,e,r,i,n,o){var a=function(t,e,r){if(t)for(var i=0,n=t;i<n.length;i+=1){var o=e[n[i]];if(o&&o.source===r&&"fill-extrusion"===o.type)return!0}else for(var a in e){var s=e[a];if(s.source===r&&"fill-extrusion"===s.type)return!0}return!1}(n&&n.layers,e,t.id),s=o.maxPitchScaleFactor(),l=t.tilesIn(i,s,a);l.sort(O);for(var u=[],c=0,p=l;c<p.length;c+=1){var h=p[c];u.push({wrappedTileID:h.tileID.wrapped().key,queryResults:h.tile.queryRenderedFeatures(e,r,t._state,h.queryGeometry,h.cameraQueryGeometry,h.scale,n,o,s,R(t.transform,h.tileID))})}var f=function(t){for(var e={},r={},i=0,n=t;i<n.length;i+=1){var o=n[i],a=o.queryResults,s=o.wrappedTileID,l=r[s]=r[s]||{};for(var u in a)for(var c=a[u],p=l[u]=l[u]||{},h=e[u]=e[u]||[],f=0,d=c;f<d.length;f+=1){var m=d[f];p[m.featureIndex]||(p[m.featureIndex]=!0,h.push(m))}}return e}(u);for(var d in f)f[d].forEach(function(e){var r=e.feature,i=t.getFeatureState(r.layer["source-layer"],r.id);r.source=r.layer.source,r.layer["source-layer"]&&(r.sourceLayer=r.layer["source-layer"]),r.state=i});return f}function O(t,e){var r=t.tileID,i=e.tileID;return r.overscaledZ-i.overscaledZ||r.canonical.y-i.canonical.y||r.wrap-i.wrap||r.canonical.x-i.canonical.x}var U=function(t,e){this.max=t,this.onRemove=e,this.reset()};U.prototype.reset=function(){for(var t in this.data)for(var e=0,r=this.data[t];e<r.length;e+=1){var i=r[e];i.timeout&&clearTimeout(i.timeout),this.onRemove(i.value)}return this.data={},this.order=[],this},U.prototype.add=function(t,e,r){var i=this,n=t.wrapped().key;void 0===this.data[n]&&(this.data[n]=[]);var o={value:e,timeout:void 0};if(void 0!==r&&(o.timeout=setTimeout(function(){i.remove(t,o)},r)),this.data[n].push(o),this.order.push(n),this.order.length>this.max){var a=this._getAndRemoveByKey(this.order[0]);a&&this.onRemove(a)}return this},U.prototype.has=function(t){return t.wrapped().key in this.data},U.prototype.getAndRemove=function(t){return this.has(t)?this._getAndRemoveByKey(t.wrapped().key):null},U.prototype._getAndRemoveByKey=function(t){var e=this.data[t].shift();return e.timeout&&clearTimeout(e.timeout),0===this.data[t].length&&delete this.data[t],this.order.splice(this.order.indexOf(t),1),e.value},U.prototype.getByKey=function(t){var e=this.data[t];return e?e[0].value:null},U.prototype.get=function(t){return this.has(t)?this.data[t.wrapped().key][0].value:null},U.prototype.remove=function(t,e){if(!this.has(t))return this;var r=t.wrapped().key,i=void 0===e?0:this.data[r].indexOf(e),n=this.data[r][i];return this.data[r].splice(i,1),n.timeout&&clearTimeout(n.timeout),0===this.data[r].length&&delete this.data[r],this.onRemove(n.value),this.order.splice(this.order.indexOf(r),1),this},U.prototype.setMaxSize=function(t){for(this.max=t;this.order.length>this.max;){var e=this._getAndRemoveByKey(this.order[0]);e&&this.onRemove(e)}return this},U.prototype.filter=function(t){var e=[];for(var r in this.data)for(var i=0,n=this.data[r];i<n.length;i+=1){var o=n[i];t(o.value)||e.push(o)}for(var a=0,s=e;a<s.length;a+=1){var l=s[a];this.remove(l.value.tileID,l)}};var V=function(t,e,r){this.context=t;var i=t.gl;this.buffer=i.createBuffer(),this.dynamicDraw=Boolean(r),this.context.unbindVAO(),t.bindElementBuffer.set(this.buffer),i.bufferData(i.ELEMENT_ARRAY_BUFFER,e.arrayBuffer,this.dynamicDraw?i.DYNAMIC_DRAW:i.STATIC_DRAW),this.dynamicDraw||delete e.arrayBuffer};V.prototype.bind=function(){this.context.bindElementBuffer.set(this.buffer)},V.prototype.updateData=function(t){var e=this.context.gl;this.context.unbindVAO(),this.bind(),e.bufferSubData(e.ELEMENT_ARRAY_BUFFER,0,t.arrayBuffer)},V.prototype.destroy=function(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)};var N={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"},j=function(t,e,r,i){this.length=e.length,this.attributes=r,this.itemSize=e.bytesPerElement,this.dynamicDraw=i,this.context=t;var n=t.gl;this.buffer=n.createBuffer(),t.bindVertexBuffer.set(this.buffer),n.bufferData(n.ARRAY_BUFFER,e.arrayBuffer,this.dynamicDraw?n.DYNAMIC_DRAW:n.STATIC_DRAW),this.dynamicDraw||delete e.arrayBuffer};j.prototype.bind=function(){this.context.bindVertexBuffer.set(this.buffer)},j.prototype.updateData=function(t){var e=this.context.gl;this.bind(),e.bufferSubData(e.ARRAY_BUFFER,0,t.arrayBuffer)},j.prototype.enableAttributes=function(t,e){for(var r=0;r<this.attributes.length;r++){var i=e.attributes[this.attributes[r].name];void 0!==i&&t.enableVertexAttribArray(i)}},j.prototype.setVertexAttribPointers=function(t,e,r){for(var i=0;i<this.attributes.length;i++){var n=this.attributes[i],o=e.attributes[n.name];void 0!==o&&t.vertexAttribPointer(o,n.components,t[N[n.type]],!1,this.itemSize,n.offset+this.itemSize*(r||0))}},j.prototype.destroy=function(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)};var q=function(t){this.gl=t.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1};q.prototype.get=function(){return this.current},q.prototype.set=function(t){},q.prototype.getDefault=function(){return this.default},q.prototype.setDefault=function(){this.set(this.default)};var Z=function(e){function r(){e.apply(this,arguments)}return e&&(r.__proto__=e),(r.prototype=Object.create(e&&e.prototype)).constructor=r,r.prototype.getDefault=function(){return t.Color.transparent},r.prototype.set=function(t){var e=this.current;(t.r!==e.r||t.g!==e.g||t.b!==e.b||t.a!==e.a||this.dirty)&&(this.gl.clearColor(t.r,t.g,t.b,t.a),this.current=t,this.dirty=!1)},r}(q),G=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getDefault=function(){return 1},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.clearDepth(t),this.current=t,this.dirty=!1)},e}(q),X=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getDefault=function(){return 0},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.clearStencil(t),this.current=t,this.dirty=!1)},e}(q),W=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getDefault=function(){return[!0,!0,!0,!0]},e.prototype.set=function(t){var e=this.current;(t[0]!==e[0]||t[1]!==e[1]||t[2]!==e[2]||t[3]!==e[3]||this.dirty)&&(this.gl.colorMask(t[0],t[1],t[2],t[3]),this.current=t,this.dirty=!1)},e}(q),K=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getDefault=function(){return!0},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.depthMask(t),this.current=t,this.dirty=!1)},e}(q),H=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getDefault=function(){return 255},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.stencilMask(t),this.current=t,this.dirty=!1)},e}(q),J=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getDefault=function(){return{func:this.gl.ALWAYS,ref:0,mask:255}},e.prototype.set=function(t){var e=this.current;(t.func!==e.func||t.ref!==e.ref||t.mask!==e.mask||this.dirty)&&(this.gl.stencilFunc(t.func,t.ref,t.mask),this.current=t,this.dirty=!1)},e}(q),Y=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getDefault=function(){var t=this.gl;return[t.KEEP,t.KEEP,t.KEEP]},e.prototype.set=function(t){var e=this.current;(t[0]!==e[0]||t[1]!==e[1]||t[2]!==e[2]||this.dirty)&&(this.gl.stencilOp(t[0],t[1],t[2]),this.current=t,this.dirty=!1)},e}(q),Q=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getDefault=function(){return!1},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;t?e.enable(e.STENCIL_TEST):e.disable(e.STENCIL_TEST),this.current=t,this.dirty=!1}},e}(q),$=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getDefault=function(){return[0,1]},e.prototype.set=function(t){var e=this.current;(t[0]!==e[0]||t[1]!==e[1]||this.dirty)&&(this.gl.depthRange(t[0],t[1]),this.current=t,this.dirty=!1)},e}(q),tt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getDefault=function(){return!1},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;t?e.enable(e.DEPTH_TEST):e.disable(e.DEPTH_TEST),this.current=t,this.dirty=!1}},e}(q),et=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getDefault=function(){return this.gl.LESS},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.depthFunc(t),this.current=t,this.dirty=!1)},e}(q),rt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getDefault=function(){return!1},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;t?e.enable(e.BLEND):e.disable(e.BLEND),this.current=t,this.dirty=!1}},e}(q),it=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getDefault=function(){var t=this.gl;return[t.ONE,t.ZERO]},e.prototype.set=function(t){var e=this.current;(t[0]!==e[0]||t[1]!==e[1]||this.dirty)&&(this.gl.blendFunc(t[0],t[1]),this.current=t,this.dirty=!1)},e}(q),nt=function(e){function r(){e.apply(this,arguments)}return e&&(r.__proto__=e),(r.prototype=Object.create(e&&e.prototype)).constructor=r,r.prototype.getDefault=function(){return t.Color.transparent},r.prototype.set=function(t){var e=this.current;(t.r!==e.r||t.g!==e.g||t.b!==e.b||t.a!==e.a||this.dirty)&&(this.gl.blendColor(t.r,t.g,t.b,t.a),this.current=t,this.dirty=!1)},r}(q),ot=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getDefault=function(){return this.gl.FUNC_ADD},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.blendEquation(t),this.current=t,this.dirty=!1)},e}(q),at=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getDefault=function(){return!1},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;t?e.enable(e.CULL_FACE):e.disable(e.CULL_FACE),this.current=t,this.dirty=!1}},e}(q),st=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getDefault=function(){return this.gl.BACK},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.cullFace(t),this.current=t,this.dirty=!1)},e}(q),lt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getDefault=function(){return this.gl.CCW},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.frontFace(t),this.current=t,this.dirty=!1)},e}(q),ut=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getDefault=function(){return null},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.useProgram(t),this.current=t,this.dirty=!1)},e}(q),ct=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getDefault=function(){return this.gl.TEXTURE0},e.prototype.set=function(t){(t!==this.current||this.dirty)&&(this.gl.activeTexture(t),this.current=t,this.dirty=!1)},e}(q),pt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getDefault=function(){var t=this.gl;return[0,0,t.drawingBufferWidth,t.drawingBufferHeight]},e.prototype.set=function(t){var e=this.current;(t[0]!==e[0]||t[1]!==e[1]||t[2]!==e[2]||t[3]!==e[3]||this.dirty)&&(this.gl.viewport(t[0],t[1],t[2],t[3]),this.current=t,this.dirty=!1)},e}(q),ht=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getDefault=function(){return null},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;e.bindFramebuffer(e.FRAMEBUFFER,t),this.current=t,this.dirty=!1}},e}(q),ft=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getDefault=function(){return null},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;e.bindRenderbuffer(e.RENDERBUFFER,t),this.current=t,this.dirty=!1}},e}(q),dt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getDefault=function(){return null},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;e.bindTexture(e.TEXTURE_2D,t),this.current=t,this.dirty=!1}},e}(q),mt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getDefault=function(){return null},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;e.bindBuffer(e.ARRAY_BUFFER,t),this.current=t,this.dirty=!1}},e}(q),yt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getDefault=function(){return null},e.prototype.set=function(t){var e=this.gl;e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,t),this.current=t,this.dirty=!1},e}(q),gt=function(t){function e(e){t.call(this,e),this.vao=e.extVertexArrayObject}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getDefault=function(){return null},e.prototype.set=function(t){this.vao&&(t!==this.current||this.dirty)&&(this.vao.bindVertexArrayOES(t),this.current=t,this.dirty=!1)},e}(q),_t=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getDefault=function(){return 4},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;e.pixelStorei(e.UNPACK_ALIGNMENT,t),this.current=t,this.dirty=!1}},e}(q),vt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getDefault=function(){return!1},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,t),this.current=t,this.dirty=!1}},e}(q),xt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getDefault=function(){return!1},e.prototype.set=function(t){if(t!==this.current||this.dirty){var e=this.gl;e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,t),this.current=t,this.dirty=!1}},e}(q),bt=function(t){function e(e,r){t.call(this,e),this.context=e,this.parent=r}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.getDefault=function(){return null},e}(q),wt=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.setDirty=function(){this.dirty=!0},e.prototype.set=function(t){if(t!==this.current||this.dirty){this.context.bindFramebuffer.set(this.parent);var e=this.gl;e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,t,0),this.current=t,this.dirty=!1}},e}(bt),St=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.set=function(t){if(t!==this.current||this.dirty){this.context.bindFramebuffer.set(this.parent);var e=this.gl;e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.RENDERBUFFER,t),this.current=t,this.dirty=!1}},e}(bt),Tt=function(t,e,r,i){this.context=t,this.width=e,this.height=r;var n=this.framebuffer=t.gl.createFramebuffer();this.colorAttachment=new wt(t,n),i&&(this.depthAttachment=new St(t,n))};Tt.prototype.destroy=function(){var t=this.context.gl,e=this.colorAttachment.get();if(e&&t.deleteTexture(e),this.depthAttachment){var r=this.depthAttachment.get();r&&t.deleteRenderbuffer(r)}t.deleteFramebuffer(this.framebuffer)};var It=function(t,e,r){this.func=t,this.mask=e,this.range=r};It.ReadOnly=!1,It.ReadWrite=!0,It.disabled=new It(519,It.ReadOnly,[0,1]);var Et=function(t,e,r,i,n,o){this.test=t,this.ref=e,this.mask=r,this.fail=i,this.depthFail=n,this.pass=o};Et.disabled=new Et({func:519,mask:0},0,0,7680,7680,7680);var At=function(t,e,r){this.blendFunction=t,this.blendColor=e,this.mask=r};At.disabled=new At(At.Replace=[1,0],t.Color.transparent,[!1,!1,!1,!1]),At.unblended=new At(At.Replace,t.Color.transparent,[!0,!0,!0,!0]),At.alphaBlended=new At([1,771],t.Color.transparent,[!0,!0,!0,!0]);var zt=function(t,e,r){this.enable=t,this.mode=e,this.frontFace=r};zt.disabled=new zt(!1,1029,2305),zt.backCCW=new zt(!0,1029,2305);var Pt=function(t){this.gl=t,this.extVertexArrayObject=this.gl.getExtension("OES_vertex_array_object"),this.clearColor=new Z(this),this.clearDepth=new G(this),this.clearStencil=new X(this),this.colorMask=new W(this),this.depthMask=new K(this),this.stencilMask=new H(this),this.stencilFunc=new J(this),this.stencilOp=new Y(this),this.stencilTest=new Q(this),this.depthRange=new $(this),this.depthTest=new tt(this),this.depthFunc=new et(this),this.blend=new rt(this),this.blendFunc=new it(this),this.blendColor=new nt(this),this.blendEquation=new ot(this),this.cullFace=new at(this),this.cullFaceSide=new st(this),this.frontFace=new lt(this),this.program=new ut(this),this.activeTexture=new ct(this),this.viewport=new pt(this),this.bindFramebuffer=new ht(this),this.bindRenderbuffer=new ft(this),this.bindTexture=new dt(this),this.bindVertexBuffer=new mt(this),this.bindElementBuffer=new yt(this),this.bindVertexArrayOES=this.extVertexArrayObject&&new gt(this),this.pixelStoreUnpack=new _t(this),this.pixelStoreUnpackPremultiplyAlpha=new vt(this),this.pixelStoreUnpackFlipY=new xt(this),this.extTextureFilterAnisotropic=t.getExtension("EXT_texture_filter_anisotropic")||t.getExtension("MOZ_EXT_texture_filter_anisotropic")||t.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=t.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.extTextureHalfFloat=t.getExtension("OES_texture_half_float"),this.extTextureHalfFloat&&(t.getExtension("OES_texture_half_float_linear"),this.extRenderToTextureHalfFloat=t.getExtension("EXT_color_buffer_half_float")),this.extTimerQuery=t.getExtension("EXT_disjoint_timer_query")};Pt.prototype.setDefault=function(){this.unbindVAO(),this.clearColor.setDefault(),this.clearDepth.setDefault(),this.clearStencil.setDefault(),this.colorMask.setDefault(),this.depthMask.setDefault(),this.stencilMask.setDefault(),this.stencilFunc.setDefault(),this.stencilOp.setDefault(),this.stencilTest.setDefault(),this.depthRange.setDefault(),this.depthTest.setDefault(),this.depthFunc.setDefault(),this.blend.setDefault(),this.blendFunc.setDefault(),this.blendColor.setDefault(),this.blendEquation.setDefault(),this.cullFace.setDefault(),this.cullFaceSide.setDefault(),this.frontFace.setDefault(),this.program.setDefault(),this.activeTexture.setDefault(),this.bindFramebuffer.setDefault(),this.pixelStoreUnpack.setDefault(),this.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.pixelStoreUnpackFlipY.setDefault()},Pt.prototype.setDirty=function(){this.clearColor.dirty=!0,this.clearDepth.dirty=!0,this.clearStencil.dirty=!0,this.colorMask.dirty=!0,this.depthMask.dirty=!0,this.stencilMask.dirty=!0,this.stencilFunc.dirty=!0,this.stencilOp.dirty=!0,this.stencilTest.dirty=!0,this.depthRange.dirty=!0,this.depthTest.dirty=!0,this.depthFunc.dirty=!0,this.blend.dirty=!0,this.blendFunc.dirty=!0,this.blendColor.dirty=!0,this.blendEquation.dirty=!0,this.cullFace.dirty=!0,this.cullFaceSide.dirty=!0,this.frontFace.dirty=!0,this.program.dirty=!0,this.activeTexture.dirty=!0,this.viewport.dirty=!0,this.bindFramebuffer.dirty=!0,this.bindRenderbuffer.dirty=!0,this.bindTexture.dirty=!0,this.bindVertexBuffer.dirty=!0,this.bindElementBuffer.dirty=!0,this.extVertexArrayObject&&(this.bindVertexArrayOES.dirty=!0),this.pixelStoreUnpack.dirty=!0,this.pixelStoreUnpackPremultiplyAlpha.dirty=!0,this.pixelStoreUnpackFlipY.dirty=!0},Pt.prototype.createIndexBuffer=function(t,e){return new V(this,t,e)},Pt.prototype.createVertexBuffer=function(t,e,r){return new j(this,t,e,r)},Pt.prototype.createRenderbuffer=function(t,e,r){var i=this.gl,n=i.createRenderbuffer();return this.bindRenderbuffer.set(n),i.renderbufferStorage(i.RENDERBUFFER,t,e,r),this.bindRenderbuffer.set(null),n},Pt.prototype.createFramebuffer=function(t,e,r){return new Tt(this,t,e,r)},Pt.prototype.clear=function(t){var e=t.color,r=t.depth,i=this.gl,n=0;e&&(n|=i.COLOR_BUFFER_BIT,this.clearColor.set(e),this.colorMask.set([!0,!0,!0,!0])),void 0!==r&&(n|=i.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(r),this.depthMask.set(!0)),i.clear(n)},Pt.prototype.setCullFace=function(t){!1===t.enable?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(t.mode),this.frontFace.set(t.frontFace))},Pt.prototype.setDepthMode=function(t){t.func!==this.gl.ALWAYS||t.mask?(this.depthTest.set(!0),this.depthFunc.set(t.func),this.depthMask.set(t.mask),this.depthRange.set(t.range)):this.depthTest.set(!1)},Pt.prototype.setStencilMode=function(t){t.test.func!==this.gl.ALWAYS||t.mask?(this.stencilTest.set(!0),this.stencilMask.set(t.mask),this.stencilOp.set([t.fail,t.depthFail,t.pass]),this.stencilFunc.set({func:t.test.func,ref:t.ref,mask:t.test.mask})):this.stencilTest.set(!1)},Pt.prototype.setColorMode=function(e){t.deepEqual(e.blendFunction,At.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(e.blendFunction),this.blendColor.set(e.blendColor)),this.colorMask.set(e.mask)},Pt.prototype.unbindVAO=function(){this.extVertexArrayObject&&this.bindVertexArrayOES.set(null)};var Ct=function(e){function r(r,i,n){var o=this;e.call(this),this.id=r,this.dispatcher=n,this.on("data",function(t){"source"===t.dataType&&"metadata"===t.sourceDataType&&(o._sourceLoaded=!0),o._sourceLoaded&&!o._paused&&"source"===t.dataType&&"content"===t.sourceDataType&&(o.reload(),o.transform&&o.update(o.transform))}),this.on("error",function(){o._sourceErrored=!0}),this._source=function(e,r,i,n){var o=new B[r.type](e,r,i,n);if(o.id!==e)throw new Error("Expected Source id to be "+e+" instead of "+o.id);return t.bindAll(["load","abort","unload","serialize","prepare"],o),o}(r,i,n,this),this._tiles={},this._cache=new U(0,this._unloadTile.bind(this)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new t.SourceFeatureState}return e&&(r.__proto__=e),(r.prototype=Object.create(e&&e.prototype)).constructor=r,r.prototype.onAdd=function(t){this.map=t,this._maxTileCacheSize=t?t._maxTileCacheSize:null,this._source&&this._source.onAdd&&this._source.onAdd(t)},r.prototype.onRemove=function(t){this._source&&this._source.onRemove&&this._source.onRemove(t)},r.prototype.loaded=function(){if(this._sourceErrored)return!0;if(!this._sourceLoaded)return!1;if(!this._source.loaded())return!1;for(var t in this._tiles){var e=this._tiles[t];if("loaded"!==e.state&&"errored"!==e.state)return!1}return!0},r.prototype.getSource=function(){return this._source},r.prototype.pause=function(){this._paused=!0},r.prototype.resume=function(){if(this._paused){var t=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,t&&this.reload(),this.transform&&this.update(this.transform)}},r.prototype._loadTile=function(t,e){return this._source.loadTile(t,e)},r.prototype._unloadTile=function(t){if(this._source.unloadTile)return this._source.unloadTile(t,function(){})},r.prototype._abortTile=function(t){if(this._source.abortTile)return this._source.abortTile(t,function(){})},r.prototype.serialize=function(){return this._source.serialize()},r.prototype.prepare=function(t){for(var e in this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null),this._tiles){var r=this._tiles[e];r.upload(t),r.prepare(this.map.style.imageManager)}},r.prototype.getIds=function(){return t.values(this._tiles).map(function(t){return t.tileID}).sort(kt).map(function(t){return t.key})},r.prototype.getRenderableIds=function(e){var r=this,i=[];for(var n in this._tiles)this._isIdRenderable(n,e)&&i.push(this._tiles[n]);return e?i.sort(function(e,i){var n=e.tileID,o=i.tileID,a=new t.Point(n.canonical.x,n.canonical.y)._rotate(r.transform.angle),s=new t.Point(o.canonical.x,o.canonical.y)._rotate(r.transform.angle);return n.overscaledZ-o.overscaledZ||s.y-a.y||s.x-a.x}).map(function(t){return t.tileID.key}):i.map(function(t){return t.tileID}).sort(kt).map(function(t){return t.key})},r.prototype.hasRenderableParent=function(t){var e=this.findLoadedParent(t,0);return!!e&&this._isIdRenderable(e.tileID.key)},r.prototype._isIdRenderable=function(t,e){return this._tiles[t]&&this._tiles[t].hasData()&&!this._coveredTiles[t]&&(e||!this._tiles[t].holdingForFade())},r.prototype.reload=function(){if(this._paused)this._shouldReloadOnResume=!0;else for(var t in this._cache.reset(),this._tiles)"errored"!==this._tiles[t].state&&this._reloadTile(t,"reloading")},r.prototype._reloadTile=function(t,e){var r=this._tiles[t];r&&("loading"!==r.state&&(r.state=e),this._loadTile(r,this._tileLoaded.bind(this,r,t,e)))},r.prototype._tileLoaded=function(e,r,i,n){if(n)return e.state="errored",void(404!==n.status?this._source.fire(new t.ErrorEvent(n,{tile:e})):this.update(this.transform));e.timeAdded=t.browser.now(),"expired"===i&&(e.refreshedUponExpiration=!0),this._setTileReloadTimer(r,e),"raster-dem"===this.getSource().type&&e.dem&&this._backfillDEM(e),this._state.initializeTileState(e,this.map?this.map.painter:null),this._source.fire(new t.Event("data",{dataType:"source",tile:e,coord:e.tileID}))},r.prototype._backfillDEM=function(t){for(var e=this.getRenderableIds(),r=0;r<e.length;r++){var i=e[r];if(t.neighboringTiles&&t.neighboringTiles[i]){var n=this.getTileByID(i);o(t,n),o(n,t)}}function o(t,e){t.needsHillshadePrepare=!0;var r=e.tileID.canonical.x-t.tileID.canonical.x,i=e.tileID.canonical.y-t.tileID.canonical.y,n=Math.pow(2,t.tileID.canonical.z),o=e.tileID.key;0===r&&0===i||Math.abs(i)>1||(Math.abs(r)>1&&(1===Math.abs(r+n)?r+=n:1===Math.abs(r-n)&&(r-=n)),e.dem&&t.dem&&(t.dem.backfillBorder(e.dem,r,i),t.neighboringTiles&&t.neighboringTiles[o]&&(t.neighboringTiles[o].backfilled=!0)))}},r.prototype.getTile=function(t){return this.getTileByID(t.key)},r.prototype.getTileByID=function(t){return this._tiles[t]},r.prototype._retainLoadedChildren=function(t,e,r,i){for(var n in this._tiles){var o=this._tiles[n];if(!(i[n]||!o.hasData()||o.tileID.overscaledZ<=e||o.tileID.overscaledZ>r)){for(var a=o.tileID;o&&o.tileID.overscaledZ>e+1;){var s=o.tileID.scaledTo(o.tileID.overscaledZ-1);(o=this._tiles[s.key])&&o.hasData()&&(a=s)}for(var l=a;l.overscaledZ>e;)if(t[(l=l.scaledTo(l.overscaledZ-1)).key]){i[a.key]=a;break}}}},r.prototype.findLoadedParent=function(t,e){if(t.key in this._loadedParentTiles){var r=this._loadedParentTiles[t.key];return r&&r.tileID.overscaledZ>=e?r:null}for(var i=t.overscaledZ-1;i>=e;i--){var n=t.scaledTo(i),o=this._getLoadedTile(n);if(o)return o}},r.prototype._getLoadedTile=function(t){var e=this._tiles[t.key];return e&&e.hasData()?e:this._cache.getByKey(t.wrapped().key)},r.prototype.updateCacheSize=function(t){var e=Math.ceil(t.width/this._source.tileSize)+1,r=Math.ceil(t.height/this._source.tileSize)+1,i=Math.floor(e*r*5),n="number"==typeof this._maxTileCacheSize?Math.min(this._maxTileCacheSize,i):i;this._cache.setMaxSize(n)},r.prototype.handleWrapJump=function(t){var e=Math.round((t-(void 0===this._prevLng?t:this._prevLng))/360);if(this._prevLng=t,e){var r={};for(var i in this._tiles){var n=this._tiles[i];n.tileID=n.tileID.unwrapTo(n.tileID.wrap+e),r[n.tileID.key]=n}for(var o in this._tiles=r,this._timers)clearTimeout(this._timers[o]),delete this._timers[o];for(var a in this._tiles)this._setTileReloadTimer(a,this._tiles[a])}},r.prototype.update=function(e){var i=this;if(this.transform=e,this._sourceLoaded&&!this._paused){var n;this.updateCacheSize(e),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used?this._source.tileID?n=e.getVisibleUnwrappedCoordinates(this._source.tileID).map(function(e){return new t.OverscaledTileID(e.canonical.z,e.wrap,e.canonical.z,e.canonical.x,e.canonical.y)}):(n=e.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&&(n=n.filter(function(t){return i._source.hasTile(t)}))):n=[];var o=e.coveringZoomLevel(this._source),a=Math.max(o-r.maxOverzooming,this._source.minzoom),s=Math.max(o+r.maxUnderzooming,this._source.minzoom),l=this._updateRetainedTiles(n,o);if(Mt(this._source.type)){for(var u={},c={},p=0,h=Object.keys(l);p<h.length;p+=1){var f=h[p],d=l[f],m=this._tiles[f];if(m&&!(m.fadeEndTime&&m.fadeEndTime<=t.browser.now())){var y=this.findLoadedParent(d,a);y&&(this._addTile(y.tileID),u[y.tileID.key]=y.tileID),c[f]=d}}for(var g in this._retainLoadedChildren(c,o,s,l),u)l[g]||(this._coveredTiles[g]=!0,l[g]=u[g])}for(var _ in l)this._tiles[_].clearFadeHold();for(var v=0,x=t.keysDifference(this._tiles,l);v<x.length;v+=1){var b=x[v],w=this._tiles[b];w.hasSymbolBuckets&&!w.holdingForFade()?w.setHoldDuration(this.map._fadeDuration):w.hasSymbolBuckets&&!w.symbolFadeFinished()||this._removeTile(b)}this._updateLoadedParentTileCache()}},r.prototype.releaseSymbolFadeTiles=function(){for(var t in this._tiles)this._tiles[t].holdingForFade()&&this._removeTile(t)},r.prototype._updateRetainedTiles=function(t,e){for(var i={},n={},o=Math.max(e-r.maxOverzooming,this._source.minzoom),a=Math.max(e+r.maxUnderzooming,this._source.minzoom),s={},l=0,u=t;l<u.length;l+=1){var c=u[l],p=this._addTile(c);i[c.key]=c,p.hasData()||e<this._source.maxzoom&&(s[c.key]=c)}this._retainLoadedChildren(s,e,a,i);for(var h=0,f=t;h<f.length;h+=1){var d=f[h],m=this._tiles[d.key];if(!m.hasData()){if(e+1>this._source.maxzoom){var y=d.children(this._source.maxzoom)[0],g=this.getTile(y);if(g&&g.hasData()){i[y.key]=y;continue}}else{var _=d.children(this._source.maxzoom);if(i[_[0].key]&&i[_[1].key]&&i[_[2].key]&&i[_[3].key])continue}for(var v=m.wasRequested(),x=d.overscaledZ-1;x>=o;--x){var b=d.scaledTo(x);if(n[b.key])break;if(n[b.key]=!0,!(m=this.getTile(b))&&v&&(m=this._addTile(b)),m&&(i[b.key]=b,v=m.wasRequested(),m.hasData()))break}}}return i},r.prototype._updateLoadedParentTileCache=function(){for(var t in this._loadedParentTiles={},this._tiles){for(var e=[],r=void 0,i=this._tiles[t].tileID;i.overscaledZ>0;){if(i.key in this._loadedParentTiles){r=this._loadedParentTiles[i.key];break}e.push(i.key);var n=i.scaledTo(i.overscaledZ-1);if(r=this._getLoadedTile(n))break;i=n}for(var o=0,a=e;o<a.length;o+=1)this._loadedParentTiles[a[o]]=r}},r.prototype._addTile=function(e){var r=this._tiles[e.key];if(r)return r;(r=this._cache.getAndRemove(e))&&(this._setTileReloadTimer(e.key,r),r.tileID=e,this._state.initializeTileState(r,this.map?this.map.painter:null),this._cacheTimers[e.key]&&(clearTimeout(this._cacheTimers[e.key]),delete this._cacheTimers[e.key],this._setTileReloadTimer(e.key,r)));var i=Boolean(r);return i||(r=new t.Tile(e,this._source.tileSize*e.overscaleFactor()),this._loadTile(r,this._tileLoaded.bind(this,r,e.key,r.state))),r?(r.uses++,this._tiles[e.key]=r,i||this._source.fire(new t.Event("dataloading",{tile:r,coord:r.tileID,dataType:"source"})),r):null},r.prototype._setTileReloadTimer=function(t,e){var r=this;t in this._timers&&(clearTimeout(this._timers[t]),delete this._timers[t]);var i=e.getExpiryTimeout();i&&(this._timers[t]=setTimeout(function(){r._reloadTile(t,"expired"),delete r._timers[t]},i))},r.prototype._removeTile=function(t){var e=this._tiles[t];e&&(e.uses--,delete this._tiles[t],this._timers[t]&&(clearTimeout(this._timers[t]),delete this._timers[t]),e.uses>0||(e.hasData()&&"reloading"!==e.state?this._cache.add(e.tileID,e,e.getExpiryTimeout()):(e.aborted=!0,this._abortTile(e),this._unloadTile(e))))},r.prototype.clearTiles=function(){for(var t in this._shouldReloadOnResume=!1,this._paused=!1,this._tiles)this._removeTile(t);this._cache.reset()},r.prototype.tilesIn=function(e,r,i){var n=this,o=[],a=this.transform;if(!a)return o;for(var s=i?a.getCameraQueryGeometry(e):e,l=e.map(function(t){return a.pointCoordinate(t)}),u=s.map(function(t){return a.pointCoordinate(t)}),c=this.getIds(),p=1/0,h=1/0,f=-1/0,d=-1/0,m=0,y=u;m<y.length;m+=1){var g=y[m];p=Math.min(p,g.x),h=Math.min(h,g.y),f=Math.max(f,g.x),d=Math.max(d,g.y)}for(var _=function(e){var i=n._tiles[c[e]];if(!i.holdingForFade()){var s=i.tileID,m=Math.pow(2,a.zoom-i.tileID.overscaledZ),y=r*i.queryPadding*t.EXTENT/i.tileSize/m,g=[s.getTilePoint(new t.MercatorCoordinate(p,h)),s.getTilePoint(new t.MercatorCoordinate(f,d))];if(g[0].x-y<t.EXTENT&&g[0].y-y<t.EXTENT&&g[1].x+y>=0&&g[1].y+y>=0){var _=l.map(function(t){return s.getTilePoint(t)}),v=u.map(function(t){return s.getTilePoint(t)});o.push({tile:i,tileID:s,queryGeometry:_,cameraQueryGeometry:v,scale:m})}}},v=0;v<c.length;v++)_(v);return o},r.prototype.getVisibleCoordinates=function(t){for(var e=this,r=this.getRenderableIds(t).map(function(t){return e._tiles[t].tileID}),i=0,n=r;i<n.length;i+=1){var o=n[i];o.posMatrix=this.transform.calculatePosMatrix(o.toUnwrapped())}return r},r.prototype.hasTransition=function(){if(this._source.hasTransition())return!0;if(Mt(this._source.type))for(var e in this._tiles){var r=this._tiles[e];if(void 0!==r.fadeEndTime&&r.fadeEndTime>=t.browser.now())return!0}return!1},r.prototype.setFeatureState=function(t,e,r){this._state.updateState(t=t||"_geojsonTileLayer",e,r)},r.prototype.removeFeatureState=function(t,e,r){this._state.removeFeatureState(t=t||"_geojsonTileLayer",e,r)},r.prototype.getFeatureState=function(t,e){return this._state.getState(t=t||"_geojsonTileLayer",e)},r.prototype.setDependencies=function(t,e,r){var i=this._tiles[t];i&&i.setDependencies(e,r)},r.prototype.reloadTilesForDependencies=function(t,e){for(var r in this._tiles)this._tiles[r].hasDependency(t,e)&&this._reloadTile(r,"reloading");this._cache.filter(function(r){return!r.hasDependency(t,e)})},r}(t.Evented);function kt(t,e){var r=Math.abs(2*t.wrap)-+(t.wrap<0),i=Math.abs(2*e.wrap)-+(e.wrap<0);return t.overscaledZ-e.overscaledZ||i-r||e.canonical.y-t.canonical.y||e.canonical.x-t.canonical.x}function Mt(t){return"raster"===t||"image"===t||"video"===t}function Dt(){return new t.window.Worker(Xn.workerUrl)}Ct.maxOverzooming=10,Ct.maxUnderzooming=3;var Lt="mapboxgl_preloaded_worker_pool",Bt=function(){this.active={}};Bt.prototype.acquire=function(t){if(!this.workers)for(this.workers=[];this.workers.length<Bt.workerCount;)this.workers.push(new Dt);return this.active[t]=!0,this.workers.slice()},Bt.prototype.release=function(t){delete this.active[t],0===this.numActive()&&(this.workers.forEach(function(t){t.terminate()}),this.workers=null)},Bt.prototype.isPreloaded=function(){return!!this.active[Lt]},Bt.prototype.numActive=function(){return Object.keys(this.active).length};var Rt,Ft=Math.floor(t.browser.hardwareConcurrency/2);function Ot(){return Rt||(Rt=new Bt),Rt}function Ut(e,r){var i={};for(var n in e)"ref"!==n&&(i[n]=e[n]);return t.refProperties.forEach(function(t){t in r&&(i[t]=r[t])}),i}function Vt(t){t=t.slice();for(var e=Object.create(null),r=0;r<t.length;r++)e[t[r].id]=t[r];for(var i=0;i<t.length;i++)"ref"in t[i]&&(t[i]=Ut(t[i],e[t[i].ref]));return t}Bt.workerCount=Math.max(Math.min(Ft,6),1);var Nt={setStyle:"setStyle",addLayer:"addLayer",removeLayer:"removeLayer",setPaintProperty:"setPaintProperty",setLayoutProperty:"setLayoutProperty",setFilter:"setFilter",addSource:"addSource",removeSource:"removeSource",setGeoJSONSourceData:"setGeoJSONSourceData",setLayerZoomRange:"setLayerZoomRange",setLayerProperty:"setLayerProperty",setCenter:"setCenter",setZoom:"setZoom",setBearing:"setBearing",setPitch:"setPitch",setSprite:"setSprite",setGlyphs:"setGlyphs",setTransition:"setTransition",setLight:"setLight"};function jt(t,e,r){r.push({command:Nt.addSource,args:[t,e[t]]})}function qt(t,e,r){e.push({command:Nt.removeSource,args:[t]}),r[t]=!0}function Zt(t,e,r,i){qt(t,r,i),jt(t,e,r)}function Gt(e,r,i){var n;for(n in e[i])if(e[i].hasOwnProperty(n)&&"data"!==n&&!t.deepEqual(e[i][n],r[i][n]))return!1;for(n in r[i])if(r[i].hasOwnProperty(n)&&"data"!==n&&!t.deepEqual(e[i][n],r[i][n]))return!1;return!0}function Xt(e,r,i,n,o,a){var s;for(s in r=r||{},e=e||{})e.hasOwnProperty(s)&&(t.deepEqual(e[s],r[s])||i.push({command:a,args:[n,s,r[s],o]}));for(s in r)r.hasOwnProperty(s)&&!e.hasOwnProperty(s)&&(t.deepEqual(e[s],r[s])||i.push({command:a,args:[n,s,r[s],o]}))}function Wt(t){return t.id}function Kt(t,e){return t[e.id]=e,t}var Ht=function(t,e){this.reset(t,e)};Ht.prototype.reset=function(t,e){this.points=t||[],this._distances=[0];for(var r=1;r<this.points.length;r++)this._distances[r]=this._distances[r-1]+this.points[r].dist(this.points[r-1]);this.length=this._distances[this._distances.length-1],this.padding=Math.min(e||0,.5*this.length),this.paddedLength=this.length-2*this.padding},Ht.prototype.lerp=function(e){if(1===this.points.length)return this.points[0];e=t.clamp(e,0,1);for(var r=1,i=this._distances[r],n=e*this.paddedLength+this.padding;i<n&&r<this._distances.length;)i=this._distances[++r];var o=r-1,a=this._distances[o],s=i-a,l=s>0?(n-a)/s:0;return this.points[o].mult(1-l).add(this.points[r].mult(l))};var Jt=function(t,e,r){var i=this.boxCells=[],n=this.circleCells=[];this.xCellCount=Math.ceil(t/r),this.yCellCount=Math.ceil(e/r);for(var o=0;o<this.xCellCount*this.yCellCount;o++)i.push([]),n.push([]);this.circleKeys=[],this.boxKeys=[],this.bboxes=[],this.circles=[],this.width=t,this.height=e,this.xScale=this.xCellCount/t,this.yScale=this.yCellCount/e,this.boxUid=0,this.circleUid=0};function Yt(e,r,i,n,o){var a=t.create();return r?(t.scale(a,a,[1/o,1/o,1]),i||t.rotateZ(a,a,n.angle)):t.multiply(a,n.labelPlaneMatrix,e),a}function Qt(e,r,i,n,o){if(r){var a=t.clone(e);return t.scale(a,a,[o,o,1]),i||t.rotateZ(a,a,-n.angle),a}return n.glCoordMatrix}function $t(e,r){var i=[e.x,e.y,0,1];ce(i,i,r);var n=i[3];return{point:new t.Point(i[0]/n,i[1]/n),signedDistanceFromCamera:n}}function te(t,e){return.5+t/e*.5}function ee(t,e){var r=t[0]/t[3],i=t[1]/t[3];return r>=-e[0]&&r<=e[0]&&i>=-e[1]&&i<=e[1]}function re(e,r,i,n,o,a,s,l){var u=n?e.textSizeData:e.iconSizeData,c=t.evaluateSizeForZoom(u,i.transform.zoom),p=[256/i.width*2+1,256/i.height*2+1],h=n?e.text.dynamicLayoutVertexArray:e.icon.dynamicLayoutVertexArray;h.clear();for(var f=e.lineVertexArray,d=n?e.text.placedSymbolArray:e.icon.placedSymbolArray,m=i.transform.width/i.transform.height,y=!1,g=0;g<d.length;g++){var _=d.get(g);if(_.hidden||_.writingMode===t.WritingMode.vertical&&!y)ue(_.numGlyphs,h);else{y=!1;var v=[_.anchorX,_.anchorY,0,1];if(t.transformMat4(v,v,r),ee(v,p)){var x=te(i.transform.cameraToCenterDistance,v[3]),b=t.evaluateSizeForFeature(u,c,_),w=s?b/x:b*x,S=new t.Point(_.anchorX,_.anchorY),T=$t(S,o).point,I={},E=oe(_,w,!1,l,r,o,a,e.glyphOffsetArray,f,h,T,S,I,m);y=E.useVertical,(E.notEnoughRoom||y||E.needsFlipping&&oe(_,w,!0,l,r,o,a,e.glyphOffsetArray,f,h,T,S,I,m).notEnoughRoom)&&ue(_.numGlyphs,h)}else ue(_.numGlyphs,h)}}n?e.text.dynamicLayoutVertexBuffer.updateData(h):e.icon.dynamicLayoutVertexBuffer.updateData(h)}function ie(t,e,r,i,n,o,a,s,l,u,c){var p=s.glyphStartIndex+s.numGlyphs,h=s.lineStartIndex,f=s.lineStartIndex+s.lineLength,d=e.getoffsetX(s.glyphStartIndex),m=e.getoffsetX(p-1),y=se(t*d,r,i,n,o,a,s.segment,h,f,l,u,c);if(!y)return null;var g=se(t*m,r,i,n,o,a,s.segment,h,f,l,u,c);return g?{first:y,last:g}:null}function ne(e,r,i,n){return e===t.WritingMode.horizontal&&Math.abs(i.y-r.y)>Math.abs(i.x-r.x)*n?{useVertical:!0}:(e===t.WritingMode.vertical?r.y<i.y:r.x>i.x)?{needsFlipping:!0}:null}function oe(e,r,i,n,o,a,s,l,u,c,p,h,f,d){var m,y=r/24,g=e.lineOffsetX*y,_=e.lineOffsetY*y;if(e.numGlyphs>1){var v=e.glyphStartIndex+e.numGlyphs,x=e.lineStartIndex,b=e.lineStartIndex+e.lineLength,w=ie(y,l,g,_,i,p,h,e,u,a,f);if(!w)return{notEnoughRoom:!0};var S=$t(w.first.point,s).point,T=$t(w.last.point,s).point;if(n&&!i){var I=ne(e.writingMode,S,T,d);if(I)return I}m=[w.first];for(var E=e.glyphStartIndex+1;E<v-1;E++)m.push(se(y*l.getoffsetX(E),g,_,i,p,h,e.segment,x,b,u,a,f));m.push(w.last)}else{if(n&&!i){var A=$t(h,o).point,z=e.lineStartIndex+e.segment+1,P=new t.Point(u.getx(z),u.gety(z)),C=$t(P,o),k=C.signedDistanceFromCamera>0?C.point:ae(h,P,A,1,o),M=ne(e.writingMode,A,k,d);if(M)return M}var D=se(y*l.getoffsetX(e.glyphStartIndex),g,_,i,p,h,e.segment,e.lineStartIndex,e.lineStartIndex+e.lineLength,u,a,f);if(!D)return{notEnoughRoom:!0};m=[D]}for(var L=0,B=m;L<B.length;L+=1){var R=B[L];t.addDynamicAttributes(c,R.point,R.angle)}return{}}function ae(t,e,r,i,n){var o=$t(t.add(t.sub(e)._unit()),n).point,a=r.sub(o);return r.add(a._mult(i/a.mag()))}function se(e,r,i,n,o,a,s,l,u,c,p,h){var f=n?e-r:e+r,d=f>0?1:-1,m=0;n&&(d*=-1,m=Math.PI),d<0&&(m+=Math.PI);for(var y=d>0?l+s:l+s+1,g=o,_=o,v=0,x=0,b=Math.abs(f),w=[];v+x<=b;){if((y+=d)<l||y>=u)return null;if(_=g,w.push(g),void 0===(g=h[y])){var S=new t.Point(c.getx(y),c.gety(y)),T=$t(S,p);if(T.signedDistanceFromCamera>0)g=h[y]=T.point;else{var I=y-d;g=ae(0===v?a:new t.Point(c.getx(I),c.gety(I)),S,_,b-v+1,p)}}v+=x,x=_.dist(g)}var E=(b-v)/x,A=g.sub(_),z=A.mult(E)._add(_);z._add(A._unit()._perp()._mult(i*d));var P=m+Math.atan2(g.y-_.y,g.x-_.x);return w.push(z),{point:z,angle:P,path:w}}Jt.prototype.keysLength=function(){return this.boxKeys.length+this.circleKeys.length},Jt.prototype.insert=function(t,e,r,i,n){this._forEachCell(e,r,i,n,this._insertBoxCell,this.boxUid++),this.boxKeys.push(t),this.bboxes.push(e),this.bboxes.push(r),this.bboxes.push(i),this.bboxes.push(n)},Jt.prototype.insertCircle=function(t,e,r,i){this._forEachCell(e-i,r-i,e+i,r+i,this._insertCircleCell,this.circleUid++),this.circleKeys.push(t),this.circles.push(e),this.circles.push(r),this.circles.push(i)},Jt.prototype._insertBoxCell=function(t,e,r,i,n,o){this.boxCells[n].push(o)},Jt.prototype._insertCircleCell=function(t,e,r,i,n,o){this.circleCells[n].push(o)},Jt.prototype._query=function(t,e,r,i,n,o){if(r<0||t>this.width||i<0||e>this.height)return!n&&[];var a=[];if(t<=0&&e<=0&&this.width<=r&&this.height<=i){if(n)return!0;for(var s=0;s<this.boxKeys.length;s++)a.push({key:this.boxKeys[s],x1:this.bboxes[4*s],y1:this.bboxes[4*s+1],x2:this.bboxes[4*s+2],y2:this.bboxes[4*s+3]});for(var l=0;l<this.circleKeys.length;l++){var u=this.circles[3*l],c=this.circles[3*l+1],p=this.circles[3*l+2];a.push({key:this.circleKeys[l],x1:u-p,y1:c-p,x2:u+p,y2:c+p})}return o?a.filter(o):a}return this._forEachCell(t,e,r,i,this._queryCell,a,{hitTest:n,seenUids:{box:{},circle:{}}},o),n?a.length>0:a},Jt.prototype._queryCircle=function(t,e,r,i,n){var o=t-r,a=t+r,s=e-r,l=e+r;if(a<0||o>this.width||l<0||s>this.height)return!i&&[];var u=[];return this._forEachCell(o,s,a,l,this._queryCellCircle,u,{hitTest:i,circle:{x:t,y:e,radius:r},seenUids:{box:{},circle:{}}},n),i?u.length>0:u},Jt.prototype.query=function(t,e,r,i,n){return this._query(t,e,r,i,!1,n)},Jt.prototype.hitTest=function(t,e,r,i,n){return this._query(t,e,r,i,!0,n)},Jt.prototype.hitTestCircle=function(t,e,r,i){return this._queryCircle(t,e,r,!0,i)},Jt.prototype._queryCell=function(t,e,r,i,n,o,a,s){var l=a.seenUids,u=this.boxCells[n];if(null!==u)for(var c=this.bboxes,p=0,h=u;p<h.length;p+=1){var f=h[p];if(!l.box[f]){l.box[f]=!0;var d=4*f;if(t<=c[d+2]&&e<=c[d+3]&&r>=c[d+0]&&i>=c[d+1]&&(!s||s(this.boxKeys[f]))){if(a.hitTest)return o.push(!0),!0;o.push({key:this.boxKeys[f],x1:c[d],y1:c[d+1],x2:c[d+2],y2:c[d+3]})}}}var m=this.circleCells[n];if(null!==m)for(var y=this.circles,g=0,_=m;g<_.length;g+=1){var v=_[g];if(!l.circle[v]){l.circle[v]=!0;var x=3*v;if(this._circleAndRectCollide(y[x],y[x+1],y[x+2],t,e,r,i)&&(!s||s(this.circleKeys[v]))){if(a.hitTest)return o.push(!0),!0;var b=y[x],w=y[x+1],S=y[x+2];o.push({key:this.circleKeys[v],x1:b-S,y1:w-S,x2:b+S,y2:w+S})}}}},Jt.prototype._queryCellCircle=function(t,e,r,i,n,o,a,s){var l=a.circle,u=a.seenUids,c=this.boxCells[n];if(null!==c)for(var p=this.bboxes,h=0,f=c;h<f.length;h+=1){var d=f[h];if(!u.box[d]){u.box[d]=!0;var m=4*d;if(this._circleAndRectCollide(l.x,l.y,l.radius,p[m+0],p[m+1],p[m+2],p[m+3])&&(!s||s(this.boxKeys[d])))return o.push(!0),!0}}var y=this.circleCells[n];if(null!==y)for(var g=this.circles,_=0,v=y;_<v.length;_+=1){var x=v[_];if(!u.circle[x]){u.circle[x]=!0;var b=3*x;if(this._circlesCollide(g[b],g[b+1],g[b+2],l.x,l.y,l.radius)&&(!s||s(this.circleKeys[x])))return o.push(!0),!0}}},Jt.prototype._forEachCell=function(t,e,r,i,n,o,a,s){for(var l=this._convertToXCellCoord(t),u=this._convertToYCellCoord(e),c=this._convertToXCellCoord(r),p=this._convertToYCellCoord(i),h=l;h<=c;h++)for(var f=u;f<=p;f++)if(n.call(this,t,e,r,i,this.xCellCount*f+h,o,a,s))return},Jt.prototype._convertToXCellCoord=function(t){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(t*this.xScale)))},Jt.prototype._convertToYCellCoord=function(t){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(t*this.yScale)))},Jt.prototype._circlesCollide=function(t,e,r,i,n,o){var a=i-t,s=n-e,l=r+o;return l*l>a*a+s*s},Jt.prototype._circleAndRectCollide=function(t,e,r,i,n,o,a){var s=(o-i)/2,l=Math.abs(t-(i+s));if(l>s+r)return!1;var u=(a-n)/2,c=Math.abs(e-(n+u));if(c>u+r)return!1;if(l<=s||c<=u)return!0;var p=l-s,h=c-u;return p*p+h*h<=r*r};var le=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function ue(t,e){for(var r=0;r<t;r++){var i=e.length;e.resize(i+4),e.float32.set(le,3*i)}}function ce(t,e,r){var i=e[0],n=e[1];return t[0]=r[0]*i+r[4]*n+r[12],t[1]=r[1]*i+r[5]*n+r[13],t[3]=r[3]*i+r[7]*n+r[15],t}var pe=function(t,e,r){void 0===e&&(e=new Jt(t.width+200,t.height+200,25)),void 0===r&&(r=new Jt(t.width+200,t.height+200,25)),this.transform=t,this.grid=e,this.ignoredGrid=r,this.pitchfactor=Math.cos(t._pitch)*t.cameraToCenterDistance,this.screenRightBoundary=t.width+100,this.screenBottomBoundary=t.height+100,this.gridRightBoundary=t.width+200,this.gridBottomBoundary=t.height+200};function he(e,r,i){return r*(t.EXTENT/(e.tileSize*Math.pow(2,i-e.tileID.overscaledZ)))}pe.prototype.placeCollisionBox=function(t,e,r,i,n){var o=this.projectAndGetPerspectiveRatio(i,t.anchorPointX,t.anchorPointY),a=r*o.perspectiveRatio,s=t.x1*a+o.point.x,l=t.y1*a+o.point.y,u=t.x2*a+o.point.x,c=t.y2*a+o.point.y;return!this.isInsideGrid(s,l,u,c)||!e&&this.grid.hitTest(s,l,u,c,n)?{box:[],offscreen:!1}:{box:[s,l,u,c],offscreen:this.isOffscreen(s,l,u,c)}},pe.prototype.placeCollisionCircles=function(e,r,i,n,o,a,s,l,u,c,p,h,f){var d=[],m=new t.Point(r.anchorX,r.anchorY),y=$t(m,a),g=te(this.transform.cameraToCenterDistance,y.signedDistanceFromCamera),_=(c?o/g:o*g)/t.ONE_EM,v=$t(m,s).point,x=ie(_,n,r.lineOffsetX*_,r.lineOffsetY*_,!1,v,m,r,i,s,{}),b=!1,w=!1,S=!0;if(x){for(var T=.5*h*g+f,I=new t.Point(-100,-100),E=new t.Point(this.screenRightBoundary,this.screenBottomBoundary),A=new Ht,z=x.first,P=x.last,C=[],k=z.path.length-1;k>=1;k--)C.push(z.path[k]);for(var M=1;M<P.path.length;M++)C.push(P.path[M]);var D=2.5*T;if(l){var L=C.map(function(t){return $t(t,l)});C=L.some(function(t){return t.signedDistanceFromCamera<=0})?[]:L.map(function(t){return t.point})}var B=[];if(C.length>0){for(var R=C[0].clone(),F=C[0].clone(),O=1;O<C.length;O++)R.x=Math.min(R.x,C[O].x),R.y=Math.min(R.y,C[O].y),F.x=Math.max(F.x,C[O].x),F.y=Math.max(F.y,C[O].y);B=R.x>=I.x&&F.x<=E.x&&R.y>=I.y&&F.y<=E.y?[C]:F.x<I.x||R.x>E.x||F.y<I.y||R.y>E.y?[]:t.clipLine([C],I.x,I.y,E.x,E.y)}for(var U=0,V=B;U<V.length;U+=1){var N;A.reset(V[U],.25*T),N=A.length<=.5*T?1:Math.ceil(A.paddedLength/D)+1;for(var j=0;j<N;j++){var q=j/Math.max(N-1,1),Z=A.lerp(q),G=Z.x+100,X=Z.y+100;d.push(G,X,T,0);var W=G-T,K=X-T,H=G+T,J=X+T;if(S=S&&this.isOffscreen(W,K,H,J),w=w||this.isInsideGrid(W,K,H,J),!e&&this.grid.hitTestCircle(G,X,T,p)&&(b=!0,!u))return{circles:[],offscreen:!1,collisionDetected:b}}}}return{circles:!u&&b||!w?[]:d,offscreen:S,collisionDetected:b}},pe.prototype.queryRenderedSymbols=function(e){if(0===e.length||0===this.grid.keysLength()&&0===this.ignoredGrid.keysLength())return{};for(var r=[],i=1/0,n=1/0,o=-1/0,a=-1/0,s=0,l=e;s<l.length;s+=1){var u=l[s],c=new t.Point(u.x+100,u.y+100);i=Math.min(i,c.x),n=Math.min(n,c.y),o=Math.max(o,c.x),a=Math.max(a,c.y),r.push(c)}for(var p={},h={},f=0,d=this.grid.query(i,n,o,a).concat(this.ignoredGrid.query(i,n,o,a));f<d.length;f+=1){var m=d[f],y=m.key;if(void 0===p[y.bucketInstanceId]&&(p[y.bucketInstanceId]={}),!p[y.bucketInstanceId][y.featureIndex]){var g=[new t.Point(m.x1,m.y1),new t.Point(m.x2,m.y1),new t.Point(m.x2,m.y2),new t.Point(m.x1,m.y2)];t.polygonIntersectsPolygon(r,g)&&(p[y.bucketInstanceId][y.featureIndex]=!0,void 0===h[y.bucketInstanceId]&&(h[y.bucketInstanceId]=[]),h[y.bucketInstanceId].push(y.featureIndex))}}return h},pe.prototype.insertCollisionBox=function(t,e,r,i,n){(e?this.ignoredGrid:this.grid).insert({bucketInstanceId:r,featureIndex:i,collisionGroupID:n},t[0],t[1],t[2],t[3])},pe.prototype.insertCollisionCircles=function(t,e,r,i,n){for(var o=e?this.ignoredGrid:this.grid,a={bucketInstanceId:r,featureIndex:i,collisionGroupID:n},s=0;s<t.length;s+=4)o.insertCircle(a,t[s],t[s+1],t[s+2])},pe.prototype.projectAndGetPerspectiveRatio=function(e,r,i){var n=[r,i,0,1];return ce(n,n,e),{point:new t.Point((n[0]/n[3]+1)/2*this.transform.width+100,(-n[1]/n[3]+1)/2*this.transform.height+100),perspectiveRatio:.5+this.transform.cameraToCenterDistance/n[3]*.5}},pe.prototype.isOffscreen=function(t,e,r,i){return r<100||t>=this.screenRightBoundary||i<100||e>this.screenBottomBoundary},pe.prototype.isInsideGrid=function(t,e,r,i){return r>=0&&t<this.gridRightBoundary&&i>=0&&e<this.gridBottomBoundary},pe.prototype.getViewportMatrix=function(){var e=t.identity([]);return t.translate(e,e,[-100,-100,0]),e};var fe=function(t,e,r,i){this.opacity=t?Math.max(0,Math.min(1,t.opacity+(t.placed?e:-e))):i&&r?1:0,this.placed=r};fe.prototype.isHidden=function(){return 0===this.opacity&&!this.placed};var de=function(t,e,r,i,n){this.text=new fe(t?t.text:null,e,r,n),this.icon=new fe(t?t.icon:null,e,i,n)};de.prototype.isHidden=function(){return this.text.isHidden()&&this.icon.isHidden()};var me=function(t,e,r){this.text=t,this.icon=e,this.skipFade=r},ye=function(){this.invProjMatrix=t.create(),this.viewportMatrix=t.create(),this.circles=[]},ge=function(t,e,r,i,n){this.bucketInstanceId=t,this.featureIndex=e,this.sourceLayerIndex=r,this.bucketIndex=i,this.tileID=n},_e=function(t){this.crossSourceCollisions=t,this.maxGroupID=0,this.collisionGroups={}};function ve(e,r,i,n,o){var a=t.getAnchorAlignment(e),s=-(a.horizontalAlign-.5)*r,l=-(a.verticalAlign-.5)*i,u=t.evaluateVariableOffset(e,n);return new t.Point(s+u[0]*o,l+u[1]*o)}function xe(e,r,i,n,o,a){var s=e.x1,l=e.x2,u=e.y1,c=e.y2,p=e.anchorPointX,h=e.anchorPointY,f=new t.Point(r,i);return n&&f._rotate(o?a:-a),{x1:s+f.x,y1:u+f.y,x2:l+f.x,y2:c+f.y,anchorPointX:p,anchorPointY:h}}_e.prototype.get=function(t){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[t]){var e=++this.maxGroupID;this.collisionGroups[t]={ID:e,predicate:function(t){return t.collisionGroupID===e}}}return this.collisionGroups[t]};var be=function(t,e,r,i){this.transform=t.clone(),this.collisionIndex=new pe(this.transform),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=e,this.retainedQueryData={},this.collisionGroups=new _e(r),this.collisionCircleArrays={},this.prevPlacement=i,i&&(i.prevPlacement=void 0),this.placedOrientations={}};function we(t,e,r,i,n){t.emplaceBack(e?1:0,r?1:0,i||0,n||0),t.emplaceBack(e?1:0,r?1:0,i||0,n||0),t.emplaceBack(e?1:0,r?1:0,i||0,n||0),t.emplaceBack(e?1:0,r?1:0,i||0,n||0)}be.prototype.getBucketParts=function(e,r,i,n){var o=i.getBucket(r),a=i.latestFeatureIndex;if(o&&a&&r.id===o.layerIds[0]){var s=i.collisionBoxArray,l=o.layers[0].layout,u=Math.pow(2,this.transform.zoom-i.tileID.overscaledZ),c=i.tileSize/t.EXTENT,p=this.transform.calculatePosMatrix(i.tileID.toUnwrapped()),h="map"===l.get("text-pitch-alignment"),f="map"===l.get("text-rotation-alignment"),d=he(i,1,this.transform.zoom),m=Yt(p,h,f,this.transform,d),y=null;if(h){var g=Qt(p,h,f,this.transform,d);y=t.multiply([],this.transform.labelPlaneMatrix,g)}this.retainedQueryData[o.bucketInstanceId]=new ge(o.bucketInstanceId,a,o.sourceLayerIndex,o.index,i.tileID);var _={bucket:o,layout:l,posMatrix:p,textLabelPlaneMatrix:m,labelToScreenMatrix:y,scale:u,textPixelRatio:c,holdingForFade:i.holdingForFade(),collisionBoxArray:s,partiallyEvaluatedTextSize:t.evaluateSizeForZoom(o.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(o.sourceID)};if(n)for(var v=0,x=o.sortKeyRanges;v<x.length;v+=1){var b=x[v];e.push({sortKey:b.sortKey,symbolInstanceStart:b.symbolInstanceStart,symbolInstanceEnd:b.symbolInstanceEnd,parameters:_})}else e.push({symbolInstanceStart:0,symbolInstanceEnd:o.symbolInstances.length,parameters:_})}},be.prototype.attemptAnchorPlacement=function(t,e,r,i,n,o,a,s,l,u,c,p,h,f,d){var m,y=[p.textOffset0,p.textOffset1],g=ve(t,r,i,y,n),_=this.collisionIndex.placeCollisionBox(xe(e,g.x,g.y,o,a,this.transform.angle),c,s,l,u.predicate);if(!d||0!==this.collisionIndex.placeCollisionBox(xe(d,g.x,g.y,o,a,this.transform.angle),c,s,l,u.predicate).box.length)return _.box.length>0?(this.prevPlacement&&this.prevPlacement.variableOffsets[p.crossTileID]&&this.prevPlacement.placements[p.crossTileID]&&this.prevPlacement.placements[p.crossTileID].text&&(m=this.prevPlacement.variableOffsets[p.crossTileID].anchor),this.variableOffsets[p.crossTileID]={textOffset:y,width:r,height:i,anchor:t,textBoxScale:n,prevAnchor:m},this.markUsedJustification(h,t,p,f),h.allowVerticalPlacement&&(this.markUsedOrientation(h,f,p),this.placedOrientations[p.crossTileID]=f),{shift:g,placedGlyphBoxes:_}):void 0},be.prototype.placeLayerBucketPart=function(e,r,i){var n=this,o=e.parameters,a=o.bucket,s=o.layout,l=o.posMatrix,u=o.textLabelPlaneMatrix,c=o.labelToScreenMatrix,p=o.textPixelRatio,h=o.holdingForFade,f=o.collisionBoxArray,d=o.partiallyEvaluatedTextSize,m=o.collisionGroup,y=s.get("text-optional"),g=s.get("icon-optional"),_=s.get("text-allow-overlap"),v=s.get("icon-allow-overlap"),x="map"===s.get("text-rotation-alignment"),b="map"===s.get("text-pitch-alignment"),w="none"!==s.get("icon-text-fit"),S="viewport-y"===s.get("symbol-z-order"),T=_&&(v||!a.hasIconData()||g),I=v&&(_||!a.hasTextData()||y);!a.collisionArrays&&f&&a.deserializeCollisionBoxes(f);var E=function(e,o){if(!r[e.crossTileID])if(h)n.placements[e.crossTileID]=new me(!1,!1,!1);else{var f,S=!1,E=!1,A=!0,z=null,P={box:null,offscreen:null},C={box:null,offscreen:null},k=null,M=null,D=0,L=0,B=0;o.textFeatureIndex?D=o.textFeatureIndex:e.useRuntimeCollisionCircles&&(D=e.featureIndex),o.verticalTextFeatureIndex&&(L=o.verticalTextFeatureIndex);var R=o.textBox;if(R){var F=function(r){var i=t.WritingMode.horizontal;if(a.allowVerticalPlacement&&!r&&n.prevPlacement){var o=n.prevPlacement.placedOrientations[e.crossTileID];o&&(n.placedOrientations[e.crossTileID]=o,n.markUsedOrientation(a,i=o,e))}return i},O=function(r,i){if(a.allowVerticalPlacement&&e.numVerticalGlyphVertices>0&&o.verticalTextBox)for(var n=0,s=a.writingModes;n<s.length&&(s[n]===t.WritingMode.vertical?(P=i(),C=P):P=r(),!(P&&P.box&&P.box.length));n+=1);else P=r()};if(s.get("text-variable-anchor")){var U=s.get("text-variable-anchor");if(n.prevPlacement&&n.prevPlacement.variableOffsets[e.crossTileID]){var V=n.prevPlacement.variableOffsets[e.crossTileID];U.indexOf(V.anchor)>0&&(U=U.filter(function(t){return t!==V.anchor})).unshift(V.anchor)}var N=function(t,r,i){for(var o=t.x2-t.x1,s=t.y2-t.y1,u=e.textBoxScale,c=w&&!v?r:null,h={box:[],offscreen:!1},f=_?2*U.length:U.length,d=0;d<f;++d){var y=n.attemptAnchorPlacement(U[d%U.length],t,o,s,u,x,b,p,l,m,d>=U.length,e,a,i,c);if(y&&(h=y.placedGlyphBoxes)&&h.box&&h.box.length){S=!0,z=y.shift;break}}return h};O(function(){return N(R,o.iconBox,t.WritingMode.horizontal)},function(){var r=o.verticalTextBox;return a.allowVerticalPlacement&&!(P&&P.box&&P.box.length)&&e.numVerticalGlyphVertices>0&&r?N(r,o.verticalIconBox,t.WritingMode.vertical):{box:null,offscreen:null}}),P&&(S=P.box,A=P.offscreen);var j=F(P&&P.box);if(!S&&n.prevPlacement){var q=n.prevPlacement.variableOffsets[e.crossTileID];q&&(n.variableOffsets[e.crossTileID]=q,n.markUsedJustification(a,q.anchor,e,j))}}else{var Z=function(t,r){var i=n.collisionIndex.placeCollisionBox(t,_,p,l,m.predicate);return i&&i.box&&i.box.length&&(n.markUsedOrientation(a,r,e),n.placedOrientations[e.crossTileID]=r),i};O(function(){return Z(R,t.WritingMode.horizontal)},function(){var r=o.verticalTextBox;return a.allowVerticalPlacement&&e.numVerticalGlyphVertices>0&&r?Z(r,t.WritingMode.vertical):{box:null,offscreen:null}}),F(P&&P.box&&P.box.length)}}if(S=(f=P)&&f.box&&f.box.length>0,A=f&&f.offscreen,e.useRuntimeCollisionCircles){var G=a.text.placedSymbolArray.get(e.centerJustifiedTextSymbolIndex),X=t.evaluateSizeForFeature(a.textSizeData,d,G),W=s.get("text-padding");k=n.collisionIndex.placeCollisionCircles(_,G,a.lineVertexArray,a.glyphOffsetArray,X,l,u,c,i,b,m.predicate,e.collisionCircleDiameter,W),S=_||k.circles.length>0&&!k.collisionDetected,A=A&&k.offscreen}if(o.iconFeatureIndex&&(B=o.iconFeatureIndex),o.iconBox){var K=function(t){var e=w&&z?xe(t,z.x,z.y,x,b,n.transform.angle):t;return n.collisionIndex.placeCollisionBox(e,v,p,l,m.predicate)};E=C&&C.box&&C.box.length&&o.verticalIconBox?(M=K(o.verticalIconBox)).box.length>0:(M=K(o.iconBox)).box.length>0,A=A&&M.offscreen}var H=y||0===e.numHorizontalGlyphVertices&&0===e.numVerticalGlyphVertices,J=g||0===e.numIconVertices;if(H||J?J?H||(E=E&&S):S=E&&S:E=S=E&&S,S&&f&&f.box&&n.collisionIndex.insertCollisionBox(f.box,s.get("text-ignore-placement"),a.bucketInstanceId,C&&C.box&&L?L:D,m.ID),E&&M&&n.collisionIndex.insertCollisionBox(M.box,s.get("icon-ignore-placement"),a.bucketInstanceId,B,m.ID),k&&(S&&n.collisionIndex.insertCollisionCircles(k.circles,s.get("text-ignore-placement"),a.bucketInstanceId,D,m.ID),i)){var Y=a.bucketInstanceId,Q=n.collisionCircleArrays[Y];void 0===Q&&(Q=n.collisionCircleArrays[Y]=new ye);for(var $=0;$<k.circles.length;$+=4)Q.circles.push(k.circles[$+0]),Q.circles.push(k.circles[$+1]),Q.circles.push(k.circles[$+2]),Q.circles.push(k.collisionDetected?1:0)}n.placements[e.crossTileID]=new me(S||T,E||I,A||a.justReloaded),r[e.crossTileID]=!0}};if(S)for(var A=a.getSortedSymbolIndexes(this.transform.angle),z=A.length-1;z>=0;--z){var P=A[z];E(a.symbolInstances.get(P),a.collisionArrays[P])}else for(var C=e.symbolInstanceStart;C<e.symbolInstanceEnd;C++)E(a.symbolInstances.get(C),a.collisionArrays[C]);if(i&&a.bucketInstanceId in this.collisionCircleArrays){var k=this.collisionCircleArrays[a.bucketInstanceId];t.invert(k.invProjMatrix,l),k.viewportMatrix=this.collisionIndex.getViewportMatrix()}a.justReloaded=!1},be.prototype.markUsedJustification=function(e,r,i,n){var o;o=n===t.WritingMode.vertical?i.verticalPlacedTextSymbolIndex:{left:i.leftJustifiedTextSymbolIndex,center:i.centerJustifiedTextSymbolIndex,right:i.rightJustifiedTextSymbolIndex}[t.getAnchorJustification(r)];for(var a=0,s=[i.leftJustifiedTextSymbolIndex,i.centerJustifiedTextSymbolIndex,i.rightJustifiedTextSymbolIndex,i.verticalPlacedTextSymbolIndex];a<s.length;a+=1){var l=s[a];l>=0&&(e.text.placedSymbolArray.get(l).crossTileID=o>=0&&l!==o?0:i.crossTileID)}},be.prototype.markUsedOrientation=function(e,r,i){for(var n=r===t.WritingMode.horizontal||r===t.WritingMode.horizontalOnly?r:0,o=r===t.WritingMode.vertical?r:0,a=0,s=[i.leftJustifiedTextSymbolIndex,i.centerJustifiedTextSymbolIndex,i.rightJustifiedTextSymbolIndex];a<s.length;a+=1)e.text.placedSymbolArray.get(s[a]).placedOrientation=n;i.verticalPlacedTextSymbolIndex&&(e.text.placedSymbolArray.get(i.verticalPlacedTextSymbolIndex).placedOrientation=o)},be.prototype.commit=function(t){this.commitTime=t,this.zoomAtLastRecencyCheck=this.transform.zoom;var e=this.prevPlacement,r=!1;this.prevZoomAdjustment=e?e.zoomAdjustment(this.transform.zoom):0;var i=e?e.symbolFadeChange(t):1,n=e?e.opacities:{},o=e?e.variableOffsets:{},a=e?e.placedOrientations:{};for(var s in this.placements){var l=this.placements[s],u=n[s];u?(this.opacities[s]=new de(u,i,l.text,l.icon),r=r||l.text!==u.text.placed||l.icon!==u.icon.placed):(this.opacities[s]=new de(null,i,l.text,l.icon,l.skipFade),r=r||l.text||l.icon)}for(var c in n){var p=n[c];if(!this.opacities[c]){var h=new de(p,i,!1,!1);h.isHidden()||(this.opacities[c]=h,r=r||p.text.placed||p.icon.placed)}}for(var f in o)this.variableOffsets[f]||!this.opacities[f]||this.opacities[f].isHidden()||(this.variableOffsets[f]=o[f]);for(var d in a)this.placedOrientations[d]||!this.opacities[d]||this.opacities[d].isHidden()||(this.placedOrientations[d]=a[d]);r?this.lastPlacementChangeTime=t:"number"!=typeof this.lastPlacementChangeTime&&(this.lastPlacementChangeTime=e?e.lastPlacementChangeTime:t)},be.prototype.updateLayerOpacities=function(t,e){for(var r={},i=0,n=e;i<n.length;i+=1){var o=n[i],a=o.getBucket(t);a&&o.latestFeatureIndex&&t.id===a.layerIds[0]&&this.updateBucketOpacities(a,r,o.collisionBoxArray)}},be.prototype.updateBucketOpacities=function(e,r,i){var n=this;e.hasTextData()&&e.text.opacityVertexArray.clear(),e.hasIconData()&&e.icon.opacityVertexArray.clear(),e.hasIconCollisionBoxData()&&e.iconCollisionBox.collisionVertexArray.clear(),e.hasTextCollisionBoxData()&&e.textCollisionBox.collisionVertexArray.clear();var o=e.layers[0].layout,a=new de(null,0,!1,!1,!0),s=o.get("text-allow-overlap"),l=o.get("icon-allow-overlap"),u=o.get("text-variable-anchor"),c="map"===o.get("text-rotation-alignment"),p="map"===o.get("text-pitch-alignment"),h="none"!==o.get("icon-text-fit"),f=new de(null,0,s&&(l||!e.hasIconData()||o.get("icon-optional")),l&&(s||!e.hasTextData()||o.get("text-optional")),!0);!e.collisionArrays&&i&&(e.hasIconCollisionBoxData()||e.hasTextCollisionBoxData())&&e.deserializeCollisionBoxes(i);for(var d=function(t,e,r){for(var i=0;i<e/4;i++)t.opacityVertexArray.emplaceBack(r)},m=function(i){var o=e.symbolInstances.get(i),s=o.numHorizontalGlyphVertices,l=o.numVerticalGlyphVertices,m=o.crossTileID,y=n.opacities[m];r[m]?y=a:y||(n.opacities[m]=y=f),r[m]=!0;var g=o.numIconVertices>0,_=n.placedOrientations[o.crossTileID],v=_===t.WritingMode.vertical,x=_===t.WritingMode.horizontal||_===t.WritingMode.horizontalOnly;if(s>0||l>0){var b=Ce(y.text);d(e.text,s,v?ke:b),d(e.text,l,x?ke:b);var w=y.text.isHidden();[o.rightJustifiedTextSymbolIndex,o.centerJustifiedTextSymbolIndex,o.leftJustifiedTextSymbolIndex].forEach(function(t){t>=0&&(e.text.placedSymbolArray.get(t).hidden=w||v?1:0)}),o.verticalPlacedTextSymbolIndex>=0&&(e.text.placedSymbolArray.get(o.verticalPlacedTextSymbolIndex).hidden=w||x?1:0);var S=n.variableOffsets[o.crossTileID];S&&n.markUsedJustification(e,S.anchor,o,_);var T=n.placedOrientations[o.crossTileID];T&&(n.markUsedJustification(e,"left",o,T),n.markUsedOrientation(e,T,o))}if(g){var I=Ce(y.icon),E=!(h&&o.verticalPlacedIconSymbolIndex&&v);o.placedIconSymbolIndex>=0&&(d(e.icon,o.numIconVertices,E?I:ke),e.icon.placedSymbolArray.get(o.placedIconSymbolIndex).hidden=y.icon.isHidden()),o.verticalPlacedIconSymbolIndex>=0&&(d(e.icon,o.numVerticalIconVertices,E?ke:I),e.icon.placedSymbolArray.get(o.verticalPlacedIconSymbolIndex).hidden=y.icon.isHidden())}if(e.hasIconCollisionBoxData()||e.hasTextCollisionBoxData()){var A=e.collisionArrays[i];if(A){var z=new t.Point(0,0);if(A.textBox||A.verticalTextBox){var P=!0;if(u){var C=n.variableOffsets[m];C?(z=ve(C.anchor,C.width,C.height,C.textOffset,C.textBoxScale),c&&z._rotate(p?n.transform.angle:-n.transform.angle)):P=!1}A.textBox&&we(e.textCollisionBox.collisionVertexArray,y.text.placed,!P||v,z.x,z.y),A.verticalTextBox&&we(e.textCollisionBox.collisionVertexArray,y.text.placed,!P||x,z.x,z.y)}var k=Boolean(!x&&A.verticalIconBox);A.iconBox&&we(e.iconCollisionBox.collisionVertexArray,y.icon.placed,k,h?z.x:0,h?z.y:0),A.verticalIconBox&&we(e.iconCollisionBox.collisionVertexArray,y.icon.placed,!k,h?z.x:0,h?z.y:0)}}},y=0;y<e.symbolInstances.length;y++)m(y);if(e.sortFeatures(this.transform.angle),this.retainedQueryData[e.bucketInstanceId]&&(this.retainedQueryData[e.bucketInstanceId].featureSortOrder=e.featureSortOrder),e.hasTextData()&&e.text.opacityVertexBuffer&&e.text.opacityVertexBuffer.updateData(e.text.opacityVertexArray),e.hasIconData()&&e.icon.opacityVertexBuffer&&e.icon.opacityVertexBuffer.updateData(e.icon.opacityVertexArray),e.hasIconCollisionBoxData()&&e.iconCollisionBox.collisionVertexBuffer&&e.iconCollisionBox.collisionVertexBuffer.updateData(e.iconCollisionBox.collisionVertexArray),e.hasTextCollisionBoxData()&&e.textCollisionBox.collisionVertexBuffer&&e.textCollisionBox.collisionVertexBuffer.updateData(e.textCollisionBox.collisionVertexArray),e.bucketInstanceId in this.collisionCircleArrays){var g=this.collisionCircleArrays[e.bucketInstanceId];e.placementInvProjMatrix=g.invProjMatrix,e.placementViewportMatrix=g.viewportMatrix,e.collisionCircleArray=g.circles,delete this.collisionCircleArrays[e.bucketInstanceId]}},be.prototype.symbolFadeChange=function(t){return 0===this.fadeDuration?1:(t-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment},be.prototype.zoomAdjustment=function(t){return Math.max(0,(this.transform.zoom-t)/1.5)},be.prototype.hasTransitions=function(t){return this.stale||t-this.lastPlacementChangeTime<this.fadeDuration},be.prototype.stillRecent=function(t,e){var r=this.zoomAtLastRecencyCheck===e?1-this.zoomAdjustment(e):1;return this.zoomAtLastRecencyCheck=e,this.commitTime+this.fadeDuration*r>t},be.prototype.setStale=function(){this.stale=!0};var Se=Math.pow(2,25),Te=Math.pow(2,24),Ie=Math.pow(2,17),Ee=Math.pow(2,16),Ae=Math.pow(2,9),ze=Math.pow(2,8),Pe=Math.pow(2,1);function Ce(t){if(0===t.opacity&&!t.placed)return 0;if(1===t.opacity&&t.placed)return 4294967295;var e=t.placed?1:0,r=Math.floor(127*t.opacity);return r*Se+e*Te+r*Ie+e*Ee+r*Ae+e*ze+r*Pe+e}var ke=0,Me=function(t){this._sortAcrossTiles="viewport-y"!==t.layout.get("symbol-z-order")&&void 0!==t.layout.get("symbol-sort-key").constantOr(1),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]};Me.prototype.continuePlacement=function(t,e,r,i,n){for(var o=this._bucketParts;this._currentTileIndex<t.length;)if(e.getBucketParts(o,i,t[this._currentTileIndex],this._sortAcrossTiles),this._currentTileIndex++,n())return!0;for(this._sortAcrossTiles&&(this._sortAcrossTiles=!1,o.sort(function(t,e){return t.sortKey-e.sortKey}));this._currentPartIndex<o.length;)if(e.placeLayerBucketPart(o[this._currentPartIndex],this._seenCrossTileIDs,r),this._currentPartIndex++,n())return!0;return!1};var De=function(t,e,r,i,n,o,a){this.placement=new be(t,n,o,a),this._currentPlacementIndex=e.length-1,this._forceFullPlacement=r,this._showCollisionBoxes=i,this._done=!1};De.prototype.isDone=function(){return this._done},De.prototype.continuePlacement=function(e,r,i){for(var n=this,o=t.browser.now(),a=function(){var e=t.browser.now()-o;return!n._forceFullPlacement&&e>2};this._currentPlacementIndex>=0;){var s=r[e[this._currentPlacementIndex]],l=this.placement.collisionIndex.transform.zoom;if("symbol"===s.type&&(!s.minzoom||s.minzoom<=l)&&(!s.maxzoom||s.maxzoom>l)){if(this._inProgressLayer||(this._inProgressLayer=new Me(s)),this._inProgressLayer.continuePlacement(i[s.source],this.placement,this._showCollisionBoxes,s,a))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},De.prototype.commit=function(t){return this.placement.commit(t),this.placement};var Le=512/t.EXTENT/2,Be=function(t,e,r){this.tileID=t,this.indexedSymbolInstances={},this.bucketInstanceId=r;for(var i=0;i<e.length;i++){var n=e.get(i),o=n.key;this.indexedSymbolInstances[o]||(this.indexedSymbolInstances[o]=[]),this.indexedSymbolInstances[o].push({crossTileID:n.crossTileID,coord:this.getScaledCoordinates(n,t)})}};Be.prototype.getScaledCoordinates=function(e,r){var i=Le/Math.pow(2,r.canonical.z-this.tileID.canonical.z);return{x:Math.floor((r.canonical.x*t.EXTENT+e.anchorX)*i),y:Math.floor((r.canonical.y*t.EXTENT+e.anchorY)*i)}},Be.prototype.findMatches=function(t,e,r){for(var i=this.tileID.canonical.z<e.canonical.z?1:Math.pow(2,this.tileID.canonical.z-e.canonical.z),n=0;n<t.length;n++){var o=t.get(n);if(!o.crossTileID){var a=this.indexedSymbolInstances[o.key];if(a)for(var s=this.getScaledCoordinates(o,e),l=0,u=a;l<u.length;l+=1){var c=u[l];if(Math.abs(c.coord.x-s.x)<=i&&Math.abs(c.coord.y-s.y)<=i&&!r[c.crossTileID]){r[c.crossTileID]=!0,o.crossTileID=c.crossTileID;break}}}}};var Re=function(){this.maxCrossTileID=0};Re.prototype.generate=function(){return++this.maxCrossTileID};var Fe=function(){this.indexes={},this.usedCrossTileIDs={},this.lng=0};Fe.prototype.handleWrapJump=function(t){var e=Math.round((t-this.lng)/360);if(0!==e)for(var r in this.indexes){var i=this.indexes[r],n={};for(var o in i){var a=i[o];a.tileID=a.tileID.unwrapTo(a.tileID.wrap+e),n[a.tileID.key]=a}this.indexes[r]=n}this.lng=t},Fe.prototype.addBucket=function(t,e,r){if(this.indexes[t.overscaledZ]&&this.indexes[t.overscaledZ][t.key]){if(this.indexes[t.overscaledZ][t.key].bucketInstanceId===e.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(t.overscaledZ,this.indexes[t.overscaledZ][t.key])}for(var i=0;i<e.symbolInstances.length;i++)e.symbolInstances.get(i).crossTileID=0;this.usedCrossTileIDs[t.overscaledZ]||(this.usedCrossTileIDs[t.overscaledZ]={});var n=this.usedCrossTileIDs[t.overscaledZ];for(var o in this.indexes){var a=this.indexes[o];if(Number(o)>t.overscaledZ)for(var s in a){var l=a[s];l.tileID.isChildOf(t)&&l.findMatches(e.symbolInstances,t,n)}else{var u=a[t.scaledTo(Number(o)).key];u&&u.findMatches(e.symbolInstances,t,n)}}for(var c=0;c<e.symbolInstances.length;c++){var p=e.symbolInstances.get(c);p.crossTileID||(p.crossTileID=r.generate(),n[p.crossTileID]=!0)}return void 0===this.indexes[t.overscaledZ]&&(this.indexes[t.overscaledZ]={}),this.indexes[t.overscaledZ][t.key]=new Be(t,e.symbolInstances,e.bucketInstanceId),!0},Fe.prototype.removeBucketCrossTileIDs=function(t,e){for(var r in e.indexedSymbolInstances)for(var i=0,n=e.indexedSymbolInstances[r];i<n.length;i+=1)delete this.usedCrossTileIDs[t][n[i].crossTileID]},Fe.prototype.removeStaleBuckets=function(t){var e=!1;for(var r in this.indexes){var i=this.indexes[r];for(var n in i)t[i[n].bucketInstanceId]||(this.removeBucketCrossTileIDs(r,i[n]),delete i[n],e=!0)}return e};var Oe=function(){this.layerIndexes={},this.crossTileIDs=new Re,this.maxBucketInstanceId=0,this.bucketsInCurrentPlacement={}};Oe.prototype.addLayer=function(t,e,r){var i=this.layerIndexes[t.id];void 0===i&&(i=this.layerIndexes[t.id]=new Fe);var n=!1,o={};i.handleWrapJump(r);for(var a=0,s=e;a<s.length;a+=1){var l=s[a],u=l.getBucket(t);u&&t.id===u.layerIds[0]&&(u.bucketInstanceId||(u.bucketInstanceId=++this.maxBucketInstanceId),i.addBucket(l.tileID,u,this.crossTileIDs)&&(n=!0),o[u.bucketInstanceId]=!0)}return i.removeStaleBuckets(o)&&(n=!0),n},Oe.prototype.pruneUnusedLayers=function(t){var e={};for(var r in t.forEach(function(t){e[t]=!0}),this.layerIndexes)e[r]||delete this.layerIndexes[r]};var Ue=function(e,r){return t.emitValidationErrors(e,r&&r.filter(function(t){return"source.canvas"!==t.identifier}))},Ve=t.pick(Nt,["addLayer","removeLayer","setPaintProperty","setLayoutProperty","setFilter","addSource","removeSource","setLayerZoomRange","setLight","setTransition","setGeoJSONSourceData"]),Ne=t.pick(Nt,["setCenter","setZoom","setBearing","setPitch"]),je=function(){var e={},r=t.styleSpec.$version;for(var i in t.styleSpec.$root){var n,o=t.styleSpec.$root[i];o.required&&null!=(n="version"===i?r:"array"===o.type?[]:{})&&(e[i]=n)}return e}(),qe=function(e){function r(i,n){var o=this;void 0===n&&(n={}),e.call(this),this.map=i,this.dispatcher=new T(Ot(),this),this.imageManager=new h,this.imageManager.setEventedParent(this),this.glyphManager=new v(i._requestManager,n.localIdeographFontFamily),this.lineAtlas=new S(256,512),this.crossTileSymbolIndex=new Oe,this._layers={},this._serializedLayers={},this._order=[],this.sourceCaches={},this.zoomHistory=new t.ZoomHistory,this._loaded=!1,this._availableImages=[],this._resetUpdates(),this.dispatcher.broadcast("setReferrer",t.getReferrer());var a=this;this._rtlTextPluginCallback=r.registerForPluginStateChange(function(e){a.dispatcher.broadcast("syncRTLPluginState",{pluginStatus:e.pluginStatus,pluginURL:e.pluginURL},function(e,r){if(t.triggerPluginCompletionEvent(e),r&&r.every(function(t){return t}))for(var i in a.sourceCaches)a.sourceCaches[i].reload()})}),this.on("data",function(t){if("source"===t.dataType&&"metadata"===t.sourceDataType){var e=o.sourceCaches[t.sourceId];if(e){var r=e.getSource();if(r&&r.vectorLayerIds)for(var i in o._layers){var n=o._layers[i];n.source===r.id&&o._validateLayer(n)}}}})}return e&&(r.__proto__=e),(r.prototype=Object.create(e&&e.prototype)).constructor=r,r.prototype.loadURL=function(e,r){var i=this;void 0===r&&(r={}),this.fire(new t.Event("dataloading",{dataType:"style"}));var n="boolean"==typeof r.validate?r.validate:!t.isMapboxURL(e);e=this.map._requestManager.normalizeStyleURL(e,r.accessToken);var o=this.map._requestManager.transformRequest(e,t.ResourceType.Style);this._request=t.getJSON(o,function(e,r){i._request=null,e?i.fire(new t.ErrorEvent(e)):r&&i._load(r,n)})},r.prototype.loadJSON=function(e,r){var i=this;void 0===r&&(r={}),this.fire(new t.Event("dataloading",{dataType:"style"})),this._request=t.browser.frame(function(){i._request=null,i._load(e,!1!==r.validate)})},r.prototype.loadEmpty=function(){this.fire(new t.Event("dataloading",{dataType:"style"})),this._load(je,!1)},r.prototype._load=function(e,r){if(!r||!Ue(this,t.validateStyle(e))){for(var i in this._loaded=!0,this.stylesheet=e,e.sources)this.addSource(i,e.sources[i],{validate:!1});e.sprite?this._loadSprite(e.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(e.glyphs);var n=Vt(this.stylesheet.layers);this._order=n.map(function(t){return t.id}),this._layers={},this._serializedLayers={};for(var o=0,a=n;o<a.length;o+=1){var s=a[o];(s=t.createStyleLayer(s)).setEventedParent(this,{layer:{id:s.id}}),this._layers[s.id]=s,this._serializedLayers[s.id]=s.serialize()}this.dispatcher.broadcast("setLayers",this._serializeLayers(this._order)),this.light=new w(this.stylesheet.light),this.fire(new t.Event("data",{dataType:"style"})),this.fire(new t.Event("style.load"))}},r.prototype._loadSprite=function(e){var r=this;this._spriteRequest=function(e,r,i){var n,o,a,s=t.browser.devicePixelRatio>1?"@2x":"",l=t.getJSON(r.transformRequest(r.normalizeSpriteURL(e,s,".json"),t.ResourceType.SpriteJSON),function(t,e){l=null,a||(a=t,n=e,c())}),u=t.getImage(r.transformRequest(r.normalizeSpriteURL(e,s,".png"),t.ResourceType.SpriteImage),function(t,e){u=null,a||(a=t,o=e,c())});function c(){if(a)i(a);else if(n&&o){var e=t.browser.getImageData(o),r={};for(var s in n){var l=n[s],u=l.width,c=l.height,p=l.x,h=l.y,f=l.sdf,d=l.pixelRatio,m=l.stretchX,y=l.stretchY,g=l.content,_=new t.RGBAImage({width:u,height:c});t.RGBAImage.copy(e,_,{x:p,y:h},{x:0,y:0},{width:u,height:c}),r[s]={data:_,pixelRatio:d,sdf:f,stretchX:m,stretchY:y,content:g}}i(null,r)}}return{cancel:function(){l&&(l.cancel(),l=null),u&&(u.cancel(),u=null)}}}(e,this.map._requestManager,function(e,i){if(r._spriteRequest=null,e)r.fire(new t.ErrorEvent(e));else if(i)for(var n in i)r.imageManager.addImage(n,i[n]);r.imageManager.setLoaded(!0),r._availableImages=r.imageManager.listImages(),r.dispatcher.broadcast("setImages",r._availableImages),r.fire(new t.Event("data",{dataType:"style"}))})},r.prototype._validateLayer=function(e){var r=this.sourceCaches[e.source];if(r){var i=e.sourceLayer;if(i){var n=r.getSource();("geojson"===n.type||n.vectorLayerIds&&-1===n.vectorLayerIds.indexOf(i))&&this.fire(new t.ErrorEvent(new Error('Source layer "'+i+'" does not exist on source "'+n.id+'" as specified by style layer "'+e.id+'"')))}}},r.prototype.loaded=function(){if(!this._loaded)return!1;if(Object.keys(this._updatedSources).length)return!1;for(var t in this.sourceCaches)if(!this.sourceCaches[t].loaded())return!1;return!!this.imageManager.isLoaded()},r.prototype._serializeLayers=function(t){for(var e=[],r=0,i=t;r<i.length;r+=1){var n=this._layers[i[r]];"custom"!==n.type&&e.push(n.serialize())}return e},r.prototype.hasTransitions=function(){if(this.light&&this.light.hasTransition())return!0;for(var t in this.sourceCaches)if(this.sourceCaches[t].hasTransition())return!0;for(var e in this._layers)if(this._layers[e].hasTransition())return!0;return!1},r.prototype._checkLoaded=function(){if(!this._loaded)throw new Error("Style is not done loading")},r.prototype.update=function(e){if(this._loaded){var r=this._changed;if(this._changed){var i=Object.keys(this._updatedLayers),n=Object.keys(this._removedLayers);for(var o in(i.length||n.length)&&this._updateWorkerLayers(i,n),this._updatedSources){var a=this._updatedSources[o];"reload"===a?this._reloadSource(o):"clear"===a&&this._clearSource(o)}for(var s in this._updateTilesForChangedImages(),this._updatedPaintProps)this._layers[s].updateTransitions(e);this.light.updateTransitions(e),this._resetUpdates()}for(var l in this.sourceCaches)this.sourceCaches[l].used=!1;for(var u=0,c=this._order;u<c.length;u+=1){var p=this._layers[c[u]];p.recalculate(e,this._availableImages),!p.isHidden(e.zoom)&&p.source&&(this.sourceCaches[p.source].used=!0)}this.light.recalculate(e),this.z=e.zoom,r&&this.fire(new t.Event("data",{dataType:"style"}))}},r.prototype._updateTilesForChangedImages=function(){var t=Object.keys(this._changedImages);if(t.length){for(var e in this.sourceCaches)this.sourceCaches[e].reloadTilesForDependencies(["icons","patterns"],t);this._changedImages={}}},r.prototype._updateWorkerLayers=function(t,e){this.dispatcher.broadcast("updateLayers",{layers:this._serializeLayers(t),removedIds:e})},r.prototype._resetUpdates=function(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={}},r.prototype.setState=function(e){var r=this;if(this._checkLoaded(),Ue(this,t.validateStyle(e)))return!1;(e=t.clone$1(e)).layers=Vt(e.layers);var i=function(e,r){if(!e)return[{command:Nt.setStyle,args:[r]}];var i=[];try{if(!t.deepEqual(e.version,r.version))return[{command:Nt.setStyle,args:[r]}];t.deepEqual(e.center,r.center)||i.push({command:Nt.setCenter,args:[r.center]}),t.deepEqual(e.zoom,r.zoom)||i.push({command:Nt.setZoom,args:[r.zoom]}),t.deepEqual(e.bearing,r.bearing)||i.push({command:Nt.setBearing,args:[r.bearing]}),t.deepEqual(e.pitch,r.pitch)||i.push({command:Nt.setPitch,args:[r.pitch]}),t.deepEqual(e.sprite,r.sprite)||i.push({command:Nt.setSprite,args:[r.sprite]}),t.deepEqual(e.glyphs,r.glyphs)||i.push({command:Nt.setGlyphs,args:[r.glyphs]}),t.deepEqual(e.transition,r.transition)||i.push({command:Nt.setTransition,args:[r.transition]}),t.deepEqual(e.light,r.light)||i.push({command:Nt.setLight,args:[r.light]});var n={},o=[];!function(e,r,i,n){var o;for(o in r=r||{},e=e||{})e.hasOwnProperty(o)&&(r.hasOwnProperty(o)||qt(o,i,n));for(o in r)r.hasOwnProperty(o)&&(e.hasOwnProperty(o)?t.deepEqual(e[o],r[o])||("geojson"===e[o].type&&"geojson"===r[o].type&&Gt(e,r,o)?i.push({command:Nt.setGeoJSONSourceData,args:[o,r[o].data]}):Zt(o,r,i,n)):jt(o,r,i))}(e.sources,r.sources,o,n);var a=[];e.layers&&e.layers.forEach(function(t){n[t.source]?i.push({command:Nt.removeLayer,args:[t.id]}):a.push(t)}),i=i.concat(o),function(e,r,i){r=r||[];var n,o,a,s,l,u,c,p=(e=e||[]).map(Wt),h=r.map(Wt),f=e.reduce(Kt,{}),d=r.reduce(Kt,{}),m=p.slice(),y=Object.create(null);for(n=0,o=0;n<p.length;n++)d.hasOwnProperty(a=p[n])?o++:(i.push({command:Nt.removeLayer,args:[a]}),m.splice(m.indexOf(a,o),1));for(n=0,o=0;n<h.length;n++)m[m.length-1-n]!==(a=h[h.length-1-n])&&(f.hasOwnProperty(a)?(i.push({command:Nt.removeLayer,args:[a]}),m.splice(m.lastIndexOf(a,m.length-o),1)):o++,i.push({command:Nt.addLayer,args:[d[a],u=m[m.length-n]]}),m.splice(m.length-n,0,a),y[a]=!0);for(n=0;n<h.length;n++)if(s=f[a=h[n]],l=d[a],!y[a]&&!t.deepEqual(s,l))if(t.deepEqual(s.source,l.source)&&t.deepEqual(s["source-layer"],l["source-layer"])&&t.deepEqual(s.type,l.type)){for(c in Xt(s.layout,l.layout,i,a,null,Nt.setLayoutProperty),Xt(s.paint,l.paint,i,a,null,Nt.setPaintProperty),t.deepEqual(s.filter,l.filter)||i.push({command:Nt.setFilter,args:[a,l.filter]}),t.deepEqual(s.minzoom,l.minzoom)&&t.deepEqual(s.maxzoom,l.maxzoom)||i.push({command:Nt.setLayerZoomRange,args:[a,l.minzoom,l.maxzoom]}),s)s.hasOwnProperty(c)&&"layout"!==c&&"paint"!==c&&"filter"!==c&&"metadata"!==c&&"minzoom"!==c&&"maxzoom"!==c&&(0===c.indexOf("paint.")?Xt(s[c],l[c],i,a,c.slice(6),Nt.setPaintProperty):t.deepEqual(s[c],l[c])||i.push({command:Nt.setLayerProperty,args:[a,c,l[c]]}));for(c in l)l.hasOwnProperty(c)&&!s.hasOwnProperty(c)&&"layout"!==c&&"paint"!==c&&"filter"!==c&&"metadata"!==c&&"minzoom"!==c&&"maxzoom"!==c&&(0===c.indexOf("paint.")?Xt(s[c],l[c],i,a,c.slice(6),Nt.setPaintProperty):t.deepEqual(s[c],l[c])||i.push({command:Nt.setLayerProperty,args:[a,c,l[c]]}))}else i.push({command:Nt.removeLayer,args:[a]}),u=m[m.lastIndexOf(a)+1],i.push({command:Nt.addLayer,args:[l,u]})}(a,r.layers,i)}catch(t){console.warn("Unable to compute style diff:",t),i=[{command:Nt.setStyle,args:[r]}]}return i}(this.serialize(),e).filter(function(t){return!(t.command in Ne)});if(0===i.length)return!1;var n=i.filter(function(t){return!(t.command in Ve)});if(n.length>0)throw new Error("Unimplemented: "+n.map(function(t){return t.command}).join(", ")+".");return i.forEach(function(t){"setTransition"!==t.command&&r[t.command].apply(r,t.args)}),this.stylesheet=e,!0},r.prototype.addImage=function(e,r){if(this.getImage(e))return this.fire(new t.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(e,r),this._availableImages=this.imageManager.listImages(),this._changedImages[e]=!0,this._changed=!0,this.fire(new t.Event("data",{dataType:"style"}))},r.prototype.updateImage=function(t,e){this.imageManager.updateImage(t,e)},r.prototype.getImage=function(t){return this.imageManager.getImage(t)},r.prototype.removeImage=function(e){if(!this.getImage(e))return this.fire(new t.ErrorEvent(new Error("No image with this name exists.")));this.imageManager.removeImage(e),this._availableImages=this.imageManager.listImages(),this._changedImages[e]=!0,this._changed=!0,this.fire(new t.Event("data",{dataType:"style"}))},r.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},r.prototype.addSource=function(e,r,i){var n=this;if(void 0===i&&(i={}),this._checkLoaded(),void 0!==this.sourceCaches[e])throw new Error("There is already a source with this ID");if(!r.type)throw new Error("The type property must be defined, but the only the following properties were given: "+Object.keys(r).join(", ")+".");if(!(["vector","raster","geojson","video","image"].indexOf(r.type)>=0&&this._validate(t.validateStyle.source,"sources."+e,r,null,i))){this.map&&this.map._collectResourceTiming&&(r.collectResourceTiming=!0);var o=this.sourceCaches[e]=new Ct(e,r,this.dispatcher);o.style=this,o.setEventedParent(this,function(){return{isSourceLoaded:n.loaded(),source:o.serialize(),sourceId:e}}),o.onAdd(this.map),this._changed=!0}},r.prototype.removeSource=function(e){if(this._checkLoaded(),void 0===this.sourceCaches[e])throw new Error("There is no source with this ID");for(var r in this._layers)if(this._layers[r].source===e)return this.fire(new t.ErrorEvent(new Error('Source "'+e+'" cannot be removed while layer "'+r+'" is using it.')));var i=this.sourceCaches[e];delete this.sourceCaches[e],delete this._updatedSources[e],i.fire(new t.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:e})),i.setEventedParent(null),i.clearTiles(),i.onRemove&&i.onRemove(this.map),this._changed=!0},r.prototype.setGeoJSONSourceData=function(t,e){this._checkLoaded(),this.sourceCaches[t].getSource().setData(e),this._changed=!0},r.prototype.getSource=function(t){return this.sourceCaches[t]&&this.sourceCaches[t].getSource()},r.prototype.addLayer=function(e,r,i){void 0===i&&(i={}),this._checkLoaded();var n=e.id;if(this.getLayer(n))this.fire(new t.ErrorEvent(new Error('Layer with id "'+n+'" already exists on this map')));else{var o;if("custom"===e.type){if(Ue(this,t.validateCustomStyleLayer(e)))return;o=t.createStyleLayer(e)}else{if("object"==typeof e.source&&(this.addSource(n,e.source),e=t.clone$1(e),e=t.extend(e,{source:n})),this._validate(t.validateStyle.layer,"layers."+n,e,{arrayIndex:-1},i))return;o=t.createStyleLayer(e),this._validateLayer(o),o.setEventedParent(this,{layer:{id:n}}),this._serializedLayers[o.id]=o.serialize()}var a=r?this._order.indexOf(r):this._order.length;if(r&&-1===a)this.fire(new t.ErrorEvent(new Error('Layer with id "'+r+'" does not exist on this map.')));else{if(this._order.splice(a,0,n),this._layerOrderChanged=!0,this._layers[n]=o,this._removedLayers[n]&&o.source&&"custom"!==o.type){var s=this._removedLayers[n];delete this._removedLayers[n],s.type!==o.type?this._updatedSources[o.source]="clear":(this._updatedSources[o.source]="reload",this.sourceCaches[o.source].pause())}this._updateLayer(o),o.onAdd&&o.onAdd(this.map)}}},r.prototype.moveLayer=function(e,r){if(this._checkLoaded(),this._changed=!0,this._layers[e]){if(e!==r){var i=this._order.indexOf(e);this._order.splice(i,1);var n=r?this._order.indexOf(r):this._order.length;r&&-1===n?this.fire(new t.ErrorEvent(new Error('Layer with id "'+r+'" does not exist on this map.'))):(this._order.splice(n,0,e),this._layerOrderChanged=!0)}}else this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be moved.")))},r.prototype.removeLayer=function(e){this._checkLoaded();var r=this._layers[e];if(r){r.setEventedParent(null);var i=this._order.indexOf(e);this._order.splice(i,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[e]=r,delete this._layers[e],delete this._serializedLayers[e],delete this._updatedLayers[e],delete this._updatedPaintProps[e],r.onRemove&&r.onRemove(this.map)}else this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be removed.")))},r.prototype.getLayer=function(t){return this._layers[t]},r.prototype.hasLayer=function(t){return t in this._layers},r.prototype.setLayerZoomRange=function(e,r,i){this._checkLoaded();var n=this.getLayer(e);n?n.minzoom===r&&n.maxzoom===i||(null!=r&&(n.minzoom=r),null!=i&&(n.maxzoom=i),this._updateLayer(n)):this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot have zoom extent.")))},r.prototype.setFilter=function(e,r,i){void 0===i&&(i={}),this._checkLoaded();var n=this.getLayer(e);if(n){if(!t.deepEqual(n.filter,r))return null==r?(n.filter=void 0,void this._updateLayer(n)):void(this._validate(t.validateStyle.filter,"layers."+n.id+".filter",r,null,i)||(n.filter=t.clone$1(r),this._updateLayer(n)))}else this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be filtered.")))},r.prototype.getFilter=function(e){return t.clone$1(this.getLayer(e).filter)},r.prototype.setLayoutProperty=function(e,r,i,n){void 0===n&&(n={}),this._checkLoaded();var o=this.getLayer(e);o?t.deepEqual(o.getLayoutProperty(r),i)||(o.setLayoutProperty(r,i,n),this._updateLayer(o)):this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be styled.")))},r.prototype.getLayoutProperty=function(e,r){var i=this.getLayer(e);if(i)return i.getLayoutProperty(r);this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style.")))},r.prototype.setPaintProperty=function(e,r,i,n){void 0===n&&(n={}),this._checkLoaded();var o=this.getLayer(e);o?t.deepEqual(o.getPaintProperty(r),i)||(o.setPaintProperty(r,i,n)&&this._updateLayer(o),this._changed=!0,this._updatedPaintProps[e]=!0):this.fire(new t.ErrorEvent(new Error("The layer '"+e+"' does not exist in the map's style and cannot be styled.")))},r.prototype.getPaintProperty=function(t,e){return this.getLayer(t).getPaintProperty(e)},r.prototype.setFeatureState=function(e,r){this._checkLoaded();var i=e.source,n=e.sourceLayer,o=this.sourceCaches[i];if(void 0!==o){var a=o.getSource().type;"geojson"===a&&n?this.fire(new t.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):"vector"!==a||n?(void 0===e.id&&this.fire(new t.ErrorEvent(new Error("The feature id parameter must be provided."))),o.setFeatureState(n,e.id,r)):this.fire(new t.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new t.ErrorEvent(new Error("The source '"+i+"' does not exist in the map's style.")))},r.prototype.removeFeatureState=function(e,r){this._checkLoaded();var i=e.source,n=this.sourceCaches[i];if(void 0!==n){var o=n.getSource().type,a="vector"===o?e.sourceLayer:void 0;"vector"!==o||a?r&&"string"!=typeof e.id&&"number"!=typeof e.id?this.fire(new t.ErrorEvent(new Error("A feature id is requred to remove its specific state property."))):n.removeFeatureState(a,e.id,r):this.fire(new t.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new t.ErrorEvent(new Error("The source '"+i+"' does not exist in the map's style.")))},r.prototype.getFeatureState=function(e){this._checkLoaded();var r=e.source,i=e.sourceLayer,n=this.sourceCaches[r];if(void 0!==n){if("vector"!==n.getSource().type||i)return void 0===e.id&&this.fire(new t.ErrorEvent(new Error("The feature id parameter must be provided."))),n.getFeatureState(i,e.id);this.fire(new t.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new t.ErrorEvent(new Error("The source '"+r+"' does not exist in the map's style.")))},r.prototype.getTransition=function(){return t.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},r.prototype.serialize=function(){return t.filterObject({version:this.stylesheet.version,name:this.stylesheet.name,metadata:this.stylesheet.metadata,light:this.stylesheet.light,center:this.stylesheet.center,zoom:this.stylesheet.zoom,bearing:this.stylesheet.bearing,pitch:this.stylesheet.pitch,sprite:this.stylesheet.sprite,glyphs:this.stylesheet.glyphs,transition:this.stylesheet.transition,sources:t.mapObject(this.sourceCaches,function(t){return t.serialize()}),layers:this._serializeLayers(this._order)},function(t){return void 0!==t})},r.prototype._updateLayer=function(t){this._updatedLayers[t.id]=!0,t.source&&!this._updatedSources[t.source]&&"raster"!==this.sourceCaches[t.source].getSource().type&&(this._updatedSources[t.source]="reload",this.sourceCaches[t.source].pause()),this._changed=!0},r.prototype._flattenAndSortRenderedFeatures=function(t){for(var e=this,r=function(t){return"fill-extrusion"===e._layers[t].type},i={},n=[],o=this._order.length-1;o>=0;o--){var a=this._order[o];if(r(a)){i[a]=o;for(var s=0,l=t;s<l.length;s+=1){var u=l[s][a];if(u)for(var c=0,p=u;c<p.length;c+=1)n.push(p[c])}}}n.sort(function(t,e){return e.intersectionZ-t.intersectionZ});for(var h=[],f=this._order.length-1;f>=0;f--){var d=this._order[f];if(r(d))for(var m=n.length-1;m>=0;m--){var y=n[m].feature;if(i[y.layer.id]<f)break;h.push(y),n.pop()}else for(var g=0,_=t;g<_.length;g+=1){var v=_[g][d];if(v)for(var x=0,b=v;x<b.length;x+=1)h.push(b[x].feature)}}return h},r.prototype.queryRenderedFeatures=function(e,r,i){r&&r.filter&&this._validate(t.validateStyle.filter,"queryRenderedFeatures.filter",r.filter,null,r);var n={};if(r&&r.layers){if(!Array.isArray(r.layers))return this.fire(new t.ErrorEvent(new Error("parameters.layers must be an Array."))),[];for(var o=0,a=r.layers;o<a.length;o+=1){var s=a[o],l=this._layers[s];if(!l)return this.fire(new t.ErrorEvent(new Error("The layer '"+s+"' does not exist in the map's style and cannot be queried for features."))),[];n[l.source]=!0}}var u=[];for(var c in r.availableImages=this._availableImages,this.sourceCaches)r.layers&&!n[c]||u.push(F(this.sourceCaches[c],this._layers,this._serializedLayers,e,r,i));return this.placement&&u.push(function(t,e,r,i,n,o,a){for(var s={},l=o.queryRenderedSymbols(i),u=[],c=0,p=Object.keys(l).map(Number);c<p.length;c+=1)u.push(a[p[c]]);u.sort(O);for(var h=function(){var r=d[f],i=r.featureIndex.lookupSymbolFeatures(l[r.bucketInstanceId],e,r.bucketIndex,r.sourceLayerIndex,n.filter,n.layers,n.availableImages,t);for(var o in i){var a=s[o]=s[o]||[],u=i[o];u.sort(function(t,e){var i=r.featureSortOrder;if(i){var n=i.indexOf(t.featureIndex);return i.indexOf(e.featureIndex)-n}return e.featureIndex-t.featureIndex});for(var c=0,p=u;c<p.length;c+=1)a.push(p[c])}},f=0,d=u;f<d.length;f+=1)h();var m=function(e){s[e].forEach(function(i){var n=i.feature,o=r[t[e].source].getFeatureState(n.layer["source-layer"],n.id);n.source=n.layer.source,n.layer["source-layer"]&&(n.sourceLayer=n.layer["source-layer"]),n.state=o})};for(var y in s)m(y);return s}(this._layers,this._serializedLayers,this.sourceCaches,e,r,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(u)},r.prototype.querySourceFeatures=function(e,r){r&&r.filter&&this._validate(t.validateStyle.filter,"querySourceFeatures.filter",r.filter,null,r);var i=this.sourceCaches[e];return i?function(t,e){for(var r=t.getRenderableIds().map(function(e){return t.getTileByID(e)}),i=[],n={},o=0;o<r.length;o++){var a=r[o],s=a.tileID.canonical.key;n[s]||(n[s]=!0,a.querySourceFeatures(i,e))}return i}(i,r):[]},r.prototype.addSourceType=function(t,e,i){return r.getSourceType(t)?i(new Error('A source type called "'+t+'" already exists.')):(r.setSourceType(t,e),e.workerSourceURL?void this.dispatcher.broadcast("loadWorkerSource",{name:t,url:e.workerSourceURL},i):i(null,null))},r.prototype.getLight=function(){return this.light.getLight()},r.prototype.setLight=function(e,r){void 0===r&&(r={}),this._checkLoaded();var i=this.light.getLight(),n=!1;for(var o in e)if(!t.deepEqual(e[o],i[o])){n=!0;break}if(n){var a={now:t.browser.now(),transition:t.extend({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(e,r),this.light.updateTransitions(a)}},r.prototype._validate=function(e,r,i,n,o){return void 0===o&&(o={}),(!o||!1!==o.validate)&&Ue(this,e.call(t.validateStyle,t.extend({key:r,style:this.serialize(),value:i,styleSpec:t.styleSpec},n)))},r.prototype._remove=function(){for(var e in this._request&&(this._request.cancel(),this._request=null),this._spriteRequest&&(this._spriteRequest.cancel(),this._spriteRequest=null),t.evented.off("pluginStateChange",this._rtlTextPluginCallback),this._layers)this._layers[e].setEventedParent(null);for(var r in this.sourceCaches)this.sourceCaches[r].clearTiles(),this.sourceCaches[r].setEventedParent(null);this.imageManager.setEventedParent(null),this.setEventedParent(null),this.dispatcher.remove()},r.prototype._clearSource=function(t){this.sourceCaches[t].clearTiles()},r.prototype._reloadSource=function(t){this.sourceCaches[t].resume(),this.sourceCaches[t].reload()},r.prototype._updateSources=function(t){for(var e in this.sourceCaches)this.sourceCaches[e].update(t)},r.prototype._generateCollisionBoxes=function(){for(var t in this.sourceCaches)this._reloadSource(t)},r.prototype._updatePlacement=function(e,r,i,n,o){void 0===o&&(o=!1);for(var a=!1,s=!1,l={},u=0,c=this._order;u<c.length;u+=1){var p=this._layers[c[u]];if("symbol"===p.type){if(!l[p.source]){var h=this.sourceCaches[p.source];l[p.source]=h.getRenderableIds(!0).map(function(t){return h.getTileByID(t)}).sort(function(t,e){return e.tileID.overscaledZ-t.tileID.overscaledZ||(t.tileID.isLessThan(e.tileID)?-1:1)})}var f=this.crossTileSymbolIndex.addLayer(p,l[p.source],e.center.lng);a=a||f}}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),((o=o||this._layerOrderChanged||0===i)||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(t.browser.now(),e.zoom))&&(this.pauseablePlacement=new De(e,this._order,o,r,i,n,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,l),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(t.browser.now()),s=!0),a&&this.pauseablePlacement.placement.setStale()),s||a)for(var d=0,m=this._order;d<m.length;d+=1){var y=this._layers[m[d]];"symbol"===y.type&&this.placement.updateLayerOpacities(y,l[y.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(t.browser.now())},r.prototype._releaseSymbolFadeTiles=function(){for(var t in this.sourceCaches)this.sourceCaches[t].releaseSymbolFadeTiles()},r.prototype.getImages=function(t,e,r){this.imageManager.getImages(e.icons,r),this._updateTilesForChangedImages();var i=this.sourceCaches[e.source];i&&i.setDependencies(e.tileID.key,e.type,e.icons)},r.prototype.getGlyphs=function(t,e,r){this.glyphManager.getGlyphs(e.stacks,r)},r.prototype.getResource=function(e,r,i){return t.makeRequest(r,i)},r}(t.Evented);qe.getSourceType=function(t){return B[t]},qe.setSourceType=function(t,e){B[t]=e},qe.registerForPluginStateChange=t.registerForPluginStateChange;var Ze=t.createLayout([{name:"a_pos",type:"Int16",components:2}]),Ge=gr("#ifdef GL_ES\nprecision mediump float;\n#else\n#if !defined(lowp)\n#define lowp\n#endif\n#if !defined(mediump)\n#define mediump\n#endif\n#if !defined(highp)\n#define highp\n#endif\n#endif","#ifdef GL_ES\nprecision highp float;\n#else\n#if !defined(lowp)\n#define lowp\n#endif\n#if !defined(mediump)\n#define mediump\n#endif\n#if !defined(highp)\n#define highp\n#endif\n#endif\nvec2 unpack_float(const float packedValue) {int packedIntValue=int(packedValue);int v0=packedIntValue/256;return vec2(v0,packedIntValue-v0*256);}vec2 unpack_opacity(const float packedOpacity) {int intOpacity=int(packedOpacity)/2;return vec2(float(intOpacity)/127.0,mod(packedOpacity,2.0));}vec4 decode_color(const vec2 encodedColor) {return vec4(unpack_float(encodedColor[0])/255.0,unpack_float(encodedColor[1])/255.0\n);}float unpack_mix_vec2(const vec2 packedValue,const float t) {return mix(packedValue[0],packedValue[1],t);}vec4 unpack_mix_color(const vec4 packedColors,const float t) {vec4 minColor=decode_color(vec2(packedColors[0],packedColors[1]));vec4 maxColor=decode_color(vec2(packedColors[2],packedColors[3]));return mix(minColor,maxColor,t);}vec2 get_pattern_pos(const vec2 pixel_coord_upper,const vec2 pixel_coord_lower,const vec2 pattern_size,const float tile_units_to_pixels,const vec2 pos) {vec2 offset=mod(mod(mod(pixel_coord_upper,pattern_size)*256.0,pattern_size)*256.0+pixel_coord_lower,pattern_size);return (tile_units_to_pixels*pos+offset)/pattern_size;}"),Xe=gr("uniform vec4 u_color;uniform float u_opacity;void main() {gl_FragColor=u_color*u_opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),We=gr("uniform vec2 u_pattern_tl_a;uniform vec2 u_pattern_br_a;uniform vec2 u_pattern_tl_b;uniform vec2 u_pattern_br_b;uniform vec2 u_texsize;uniform float u_mix;uniform float u_opacity;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(u_pattern_tl_a/u_texsize,u_pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(u_pattern_tl_b/u_texsize,u_pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_mix)*u_opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_pattern_size_a;uniform vec2 u_pattern_size_b;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_scale_a;uniform float u_scale_b;uniform float u_tile_units_to_pixels;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_a*u_pattern_size_a,u_tile_units_to_pixels,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_b*u_pattern_size_b,u_tile_units_to_pixels,a_pos);}"),Ke=gr("varying vec3 v_data;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define mediump float radius\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define highp vec4 stroke_color\n#pragma mapbox: define mediump float stroke_width\n#pragma mapbox: define lowp float stroke_opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize mediump float radius\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize highp vec4 stroke_color\n#pragma mapbox: initialize mediump float stroke_width\n#pragma mapbox: initialize lowp float stroke_opacity\nvec2 extrude=v_data.xy;float extrude_length=length(extrude);lowp float antialiasblur=v_data.z;float antialiased_blur=-max(blur,antialiasblur);float opacity_t=smoothstep(0.0,antialiased_blur,extrude_length-1.0);float color_t=stroke_width < 0.01 ? 0.0 : smoothstep(antialiased_blur,0.0,extrude_length-radius/(radius+stroke_width));gl_FragColor=opacity_t*mix(color*opacity,stroke_color*stroke_opacity,color_t);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform bool u_scale_with_map;uniform bool u_pitch_with_map;uniform vec2 u_extrude_scale;uniform lowp float u_device_pixel_ratio;uniform highp float u_camera_to_center_distance;attribute vec2 a_pos;varying vec3 v_data;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define mediump float radius\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define highp vec4 stroke_color\n#pragma mapbox: define mediump float stroke_width\n#pragma mapbox: define lowp float stroke_opacity\nvoid main(void) {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize mediump float radius\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize highp vec4 stroke_color\n#pragma mapbox: initialize mediump float stroke_width\n#pragma mapbox: initialize lowp float stroke_opacity\nvec2 extrude=vec2(mod(a_pos,2.0)*2.0-1.0);vec2 circle_center=floor(a_pos*0.5);if (u_pitch_with_map) {vec2 corner_position=circle_center;if (u_scale_with_map) {corner_position+=extrude*(radius+stroke_width)*u_extrude_scale;} else {vec4 projected_center=u_matrix*vec4(circle_center,0,1);corner_position+=extrude*(radius+stroke_width)*u_extrude_scale*(projected_center.w/u_camera_to_center_distance);}gl_Position=u_matrix*vec4(corner_position,0,1);} else {gl_Position=u_matrix*vec4(circle_center,0,1);if (u_scale_with_map) {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*u_camera_to_center_distance;} else {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*gl_Position.w;}}lowp float antialiasblur=1.0/u_device_pixel_ratio/(radius+stroke_width);v_data=vec3(extrude.x,extrude.y,antialiasblur);}"),He=gr("void main() {gl_FragColor=vec4(1.0);}","attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),Je=gr("uniform highp float u_intensity;varying vec2 v_extrude;\n#pragma mapbox: define highp float weight\n#define GAUSS_COEF 0.3989422804014327\nvoid main() {\n#pragma mapbox: initialize highp float weight\nfloat d=-0.5*3.0*3.0*dot(v_extrude,v_extrude);float val=weight*u_intensity*GAUSS_COEF*exp(d);gl_FragColor=vec4(val,1.0,1.0,1.0);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform float u_extrude_scale;uniform float u_opacity;uniform float u_intensity;attribute vec2 a_pos;varying vec2 v_extrude;\n#pragma mapbox: define highp float weight\n#pragma mapbox: define mediump float radius\nconst highp float ZERO=1.0/255.0/16.0;\n#define GAUSS_COEF 0.3989422804014327\nvoid main(void) {\n#pragma mapbox: initialize highp float weight\n#pragma mapbox: initialize mediump float radius\nvec2 unscaled_extrude=vec2(mod(a_pos,2.0)*2.0-1.0);float S=sqrt(-2.0*log(ZERO/weight/u_intensity/GAUSS_COEF))/3.0;v_extrude=S*unscaled_extrude;vec2 extrude=v_extrude*radius*u_extrude_scale;vec4 pos=vec4(floor(a_pos*0.5)+extrude,0,1);gl_Position=u_matrix*pos;}"),Ye=gr("uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;varying vec2 v_pos;void main() {float t=texture2D(u_image,v_pos).r;vec4 color=texture2D(u_color_ramp,vec2(t,0.5));gl_FragColor=color*u_opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(0.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_world;attribute vec2 a_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos*u_world,0,1);v_pos.x=a_pos.x;v_pos.y=1.0-a_pos.y;}"),Qe=gr("varying float v_placed;varying float v_notUsed;void main() {float alpha=0.5;gl_FragColor=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {gl_FragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {gl_FragColor*=.1;}}","attribute vec2 a_pos;attribute vec2 a_anchor_pos;attribute vec2 a_extrude;attribute vec2 a_placed;attribute vec2 a_shift;uniform mat4 u_matrix;uniform vec2 u_extrude_scale;uniform float u_camera_to_center_distance;varying float v_placed;varying float v_notUsed;void main() {vec4 projectedPoint=u_matrix*vec4(a_anchor_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);gl_Position=u_matrix*vec4(a_pos,0.0,1.0);gl_Position.xy+=(a_extrude+a_shift)*u_extrude_scale*gl_Position.w*collision_perspective_ratio;v_placed=a_placed.x;v_notUsed=a_placed.y;}"),$e=gr("varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;void main() {float alpha=0.5*min(v_perspective_ratio,1.0);float stroke_radius=0.9*max(v_perspective_ratio,1.0);float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);gl_FragColor=color*alpha*opacity_t;}","attribute vec2 a_pos;attribute float a_radius;attribute vec2 a_flags;uniform mat4 u_matrix;uniform mat4 u_inv_matrix;uniform vec2 u_viewport_size;uniform float u_camera_to_center_distance;varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;vec3 toTilePosition(vec2 screenPos) {vec4 rayStart=u_inv_matrix*vec4(screenPos,-1.0,1.0);vec4 rayEnd =u_inv_matrix*vec4(screenPos, 1.0,1.0);rayStart.xyz/=rayStart.w;rayEnd.xyz /=rayEnd.w;highp float t=(0.0-rayStart.z)/(rayEnd.z-rayStart.z);return mix(rayStart.xyz,rayEnd.xyz,t);}void main() {vec2 quadCenterPos=a_pos;float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;vec3 tilePos=toTilePosition(quadCenterPos);vec4 clipPos=u_matrix*vec4(tilePos,1.0);highp float camera_to_anchor_distance=clipPos.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_perspective_ratio=collision_perspective_ratio;v_collision=collision;gl_Position=vec4(clipPos.xyz/clipPos.w,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}"),tr=gr("uniform highp vec4 u_color;uniform sampler2D u_overlay;varying vec2 v_uv;void main() {vec4 overlay_color=texture2D(u_overlay,v_uv);gl_FragColor=mix(u_color,overlay_color,overlay_color.a);}","attribute vec2 a_pos;varying vec2 v_uv;uniform mat4 u_matrix;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=u_matrix*vec4(a_pos*u_overlay_scale,0,1);}"),er=gr("#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float opacity\ngl_FragColor=color*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float opacity\ngl_Position=u_matrix*vec4(a_pos,0,1);}"),rr=gr("varying vec2 v_pos;\n#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 outline_color\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=outline_color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;uniform vec2 u_world;varying vec2 v_pos;\n#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 outline_color\n#pragma mapbox: initialize lowp float opacity\ngl_Position=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}"),ir=gr("uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=mix(color1,color2,u_fade)*alpha*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;gl_Position=u_matrix*vec4(a_pos,0,1);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}"),nr=gr("uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_fade)*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}"),or=gr("varying vec4 v_color;void main() {gl_FragColor=v_color;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec4 v_color;\n#pragma mapbox: define highp float base\n#pragma mapbox: define highp float height\n#pragma mapbox: define highp vec4 color\nvoid main() {\n#pragma mapbox: initialize highp float base\n#pragma mapbox: initialize highp float height\n#pragma mapbox: initialize highp vec4 color\nvec3 normal=a_normal_ed.xyz;base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);gl_Position=u_matrix*vec4(a_pos,t > 0.0 ? height : base,1);float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;float directional=clamp(dot(normal/16384.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}"),ar=gr("uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float base\n#pragma mapbox: initialize lowp float height\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);gl_FragColor=mixedColor*v_lighting;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float base\n#pragma mapbox: initialize lowp float height\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);float z=t > 0.0 ? height : base;gl_Position=u_matrix*vec4(a_pos,z,1);vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0\n? a_pos\n: vec2(edgedistance,z*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}"),sr=gr("#ifdef GL_ES\nprecision highp float;\n#endif\nuniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform float u_maxzoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture2D(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack)/4.0;}void main() {vec2 epsilon=1.0/u_dimension;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggeration=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/ pow(2.0,(u_zoom-u_maxzoom)*exaggeration+19.2562-u_zoom);gl_FragColor=clamp(vec4(deriv.x/2.0+0.5,deriv.y/2.0+0.5,1.0,1.0),0.0,1.0);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_dimension;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}"),lr=gr("uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent;\n#define PI 3.141592653589793\nvoid main() {vec4 pixel=texture2D(u_image,v_pos);vec2 deriv=((pixel.rg*2.0)-1.0);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));float slope=atan(1.25*length(deriv)/scaleFactor);float aspect=deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);float intensity=u_light.x;float azimuth=u_light.y+PI;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadow,u_highlight,shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);gl_FragColor=accent_color*(1.0-shade_color.a)+shade_color;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=a_texture_pos/8192.0;}"),ur=gr("uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);gl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_linesofar;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}"),cr=gr("uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp float v_lineprogress;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture2D(u_image,vec2(v_lineprogress,0.5));gl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define MAX_LINE_DISTANCE 32767.0\n#define scale 0.015873016\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_lineprogress;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_lineprogress=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0/MAX_LINE_DISTANCE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}"),pr=gr("uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture2D(u_image,pos_a),texture2D(u_image,pos_b),u_fade);gl_FragColor=color*alpha*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\n#define LINE_DISTANCE_SCALE 2.0\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}"),hr=gr("uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;uniform float u_mix;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float sdfdist_a=texture2D(u_image,v_tex_a).a;float sdfdist_b=texture2D(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);alpha*=smoothstep(0.5-u_sdfgamma/floorwidth,0.5+u_sdfgamma/floorwidth,sdfdist);gl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\n#define LINE_DISTANCE_SCALE 2.0\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_patternscale_a;uniform float u_tex_y_a;uniform vec2 u_patternscale_b;uniform float u_tex_y_b;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_tex_a=vec2(a_linesofar*u_patternscale_a.x/floorwidth,normal.y*u_patternscale_a.y+u_tex_y_a);v_tex_b=vec2(a_linesofar*u_patternscale_b.x/floorwidth,normal.y*u_patternscale_b.y+u_tex_y_b);v_width2=vec2(outset,inset);}"),fr=gr("uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;varying vec2 v_pos0;varying vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture2D(u_image0,v_pos0);vec4 color1=texture2D(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);gl_FragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos0;varying vec2 v_pos1;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos0=(((a_texture_pos/8192.0)-0.5)/u_buffer_scale )+0.5;v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}"),dr=gr("uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity;\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\nlowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;varying vec2 v_tex;varying float v_fade_opacity;\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0),0.0,1.0);v_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;v_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));}"),mr=gr("#define SDF_PX 8.0\nuniform bool u_is_halo;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;varying vec2 v_data0;varying vec3 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nfloat EDGE_GAMMA=0.105/u_device_pixel_ratio;vec2 tex=v_data0.xy;float gamma_scale=v_data1.x;float size=v_data1.y;float fade_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;varying vec2 v_data0;varying vec3 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}"),yr=gr("#define SDF_PX 8.0\n#define SDF 1.0\n#define ICON 0.0\nuniform bool u_is_halo;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;varying vec4 v_data0;varying vec4 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nfloat fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;gl_FragColor=texture2D(u_texture_icon,tex_icon)*alpha;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\nreturn;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;varying vec4 v_data0;varying vec4 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}");function gr(t,e){var r=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,i={};return{fragmentSource:t=t.replace(r,function(t,e,r,n,o){return i[o]=!0,"define"===e?"\n#ifndef HAS_UNIFORM_u_"+o+"\nvarying "+r+" "+n+" "+o+";\n#else\nuniform "+r+" "+n+" u_"+o+";\n#endif\n":"\n#ifdef HAS_UNIFORM_u_"+o+"\n "+r+" "+n+" "+o+" = u_"+o+";\n#endif\n"}),vertexSource:e=e.replace(r,function(t,e,r,n,o){var a="float"===n?"vec2":"vec4",s=o.match(/color/)?"color":a;return i[o]?"define"===e?"\n#ifndef HAS_UNIFORM_u_"+o+"\nuniform lowp float u_"+o+"_t;\nattribute "+r+" "+a+" a_"+o+";\nvarying "+r+" "+n+" "+o+";\n#else\nuniform "+r+" "+n+" u_"+o+";\n#endif\n":"vec4"===s?"\n#ifndef HAS_UNIFORM_u_"+o+"\n "+o+" = a_"+o+";\n#else\n "+r+" "+n+" "+o+" = u_"+o+";\n#endif\n":"\n#ifndef HAS_UNIFORM_u_"+o+"\n "+o+" = unpack_mix_"+s+"(a_"+o+", u_"+o+"_t);\n#else\n "+r+" "+n+" "+o+" = u_"+o+";\n#endif\n":"define"===e?"\n#ifndef HAS_UNIFORM_u_"+o+"\nuniform lowp float u_"+o+"_t;\nattribute "+r+" "+a+" a_"+o+";\n#else\nuniform "+r+" "+n+" u_"+o+";\n#endif\n":"vec4"===s?"\n#ifndef HAS_UNIFORM_u_"+o+"\n "+r+" "+n+" "+o+" = a_"+o+";\n#else\n "+r+" "+n+" "+o+" = u_"+o+";\n#endif\n":"\n#ifndef HAS_UNIFORM_u_"+o+"\n "+r+" "+n+" "+o+" = unpack_mix_"+s+"(a_"+o+", u_"+o+"_t);\n#else\n "+r+" "+n+" "+o+" = u_"+o+";\n#endif\n"})}}var _r=Object.freeze({__proto__:null,prelude:Ge,background:Xe,backgroundPattern:We,circle:Ke,clippingMask:He,heatmap:Je,heatmapTexture:Ye,collisionBox:Qe,collisionCircle:$e,debug:tr,fill:er,fillOutline:rr,fillOutlinePattern:ir,fillPattern:nr,fillExtrusion:or,fillExtrusionPattern:ar,hillshadePrepare:sr,hillshade:lr,line:ur,lineGradient:cr,linePattern:pr,lineSDF:hr,raster:fr,symbolIcon:dr,symbolSDF:mr,symbolTextAndIcon:yr}),vr=function(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null};vr.prototype.bind=function(t,e,r,i,n,o,a,s){this.context=t;for(var l=this.boundPaintVertexBuffers.length!==i.length,u=0;!l&&u<i.length;u++)this.boundPaintVertexBuffers[u]!==i[u]&&(l=!0);t.extVertexArrayObject&&this.vao&&this.boundProgram===e&&this.boundLayoutVertexBuffer===r&&!l&&this.boundIndexBuffer===n&&this.boundVertexOffset===o&&this.boundDynamicVertexBuffer===a&&this.boundDynamicVertexBuffer2===s?(t.bindVertexArrayOES.set(this.vao),a&&a.bind(),n&&n.dynamicDraw&&n.bind(),s&&s.bind()):this.freshBind(e,r,i,n,o,a,s)},vr.prototype.freshBind=function(t,e,r,i,n,o,a){var s,l=t.numAttributes,u=this.context,c=u.gl;if(u.extVertexArrayObject)this.vao&&this.destroy(),this.vao=u.extVertexArrayObject.createVertexArrayOES(),u.bindVertexArrayOES.set(this.vao),s=0,this.boundProgram=t,this.boundLayoutVertexBuffer=e,this.boundPaintVertexBuffers=r,this.boundIndexBuffer=i,this.boundVertexOffset=n,this.boundDynamicVertexBuffer=o,this.boundDynamicVertexBuffer2=a;else{s=u.currentNumAttributes||0;for(var p=l;p<s;p++)c.disableVertexAttribArray(p)}e.enableAttributes(c,t);for(var h=0,f=r;h<f.length;h+=1)f[h].enableAttributes(c,t);o&&o.enableAttributes(c,t),a&&a.enableAttributes(c,t),e.bind(),e.setVertexAttribPointers(c,t,n);for(var d=0,m=r;d<m.length;d+=1){var y=m[d];y.bind(),y.setVertexAttribPointers(c,t,n)}o&&(o.bind(),o.setVertexAttribPointers(c,t,n)),i&&i.bind(),a&&(a.bind(),a.setVertexAttribPointers(c,t,n)),u.currentNumAttributes=l},vr.prototype.destroy=function(){this.vao&&(this.context.extVertexArrayObject.deleteVertexArrayOES(this.vao),this.vao=null)};var xr=function(t,e,r,i,n){var o=t.gl;this.program=o.createProgram();var a=r?r.defines():[];n&&a.push("#define OVERDRAW_INSPECTOR;");var s=a.concat(Ge.fragmentSource,e.fragmentSource).join("\n"),l=a.concat(Ge.vertexSource,e.vertexSource).join("\n"),u=o.createShader(o.FRAGMENT_SHADER);if(o.isContextLost())this.failedToCreate=!0;else{o.shaderSource(u,s),o.compileShader(u),o.attachShader(this.program,u);var c=o.createShader(o.VERTEX_SHADER);if(o.isContextLost())this.failedToCreate=!0;else{o.shaderSource(c,l),o.compileShader(c),o.attachShader(this.program,c);for(var p=r?r.layoutAttributes:[],h=0;h<p.length;h++)o.bindAttribLocation(this.program,h,p[h].name);o.linkProgram(this.program),o.deleteShader(c),o.deleteShader(u),this.numAttributes=o.getProgramParameter(this.program,o.ACTIVE_ATTRIBUTES),this.attributes={};for(var f={},d=0;d<this.numAttributes;d++){var m=o.getActiveAttrib(this.program,d);m&&(this.attributes[m.name]=o.getAttribLocation(this.program,m.name))}for(var y=o.getProgramParameter(this.program,o.ACTIVE_UNIFORMS),g=0;g<y;g++){var _=o.getActiveUniform(this.program,g);_&&(f[_.name]=o.getUniformLocation(this.program,_.name))}this.fixedUniforms=i(t,f),this.binderUniforms=r?r.getUniforms(t,f):[]}}};function br(t,e,r){var i=1/he(r,1,e.transform.tileZoom),n=Math.pow(2,r.tileID.overscaledZ),o=r.tileSize*Math.pow(2,e.transform.tileZoom)/n,a=o*(r.tileID.canonical.x+r.tileID.wrap*n),s=o*r.tileID.canonical.y;return{u_image:0,u_texsize:r.imageAtlasTexture.size,u_scale:[i,t.fromScale,t.toScale],u_fade:t.t,u_pixel_coord_upper:[a>>16,s>>16],u_pixel_coord_lower:[65535&a,65535&s]}}xr.prototype.draw=function(t,e,r,i,n,o,a,s,l,u,c,p,h,f,d,m){var y,g=t.gl;if(!this.failedToCreate){for(var _ in t.program.set(this.program),t.setDepthMode(r),t.setStencilMode(i),t.setColorMode(n),t.setCullFace(o),this.fixedUniforms)this.fixedUniforms[_].set(a[_]);f&&f.setUniforms(t,this.binderUniforms,p,{zoom:h});for(var v=(y={},y[g.LINES]=2,y[g.TRIANGLES]=3,y[g.LINE_STRIP]=1,y)[e],x=0,b=c.get();x<b.length;x+=1){var w=b[x],S=w.vaos||(w.vaos={});(S[s]||(S[s]=new vr)).bind(t,this,l,f?f.getPaintVertexBuffers():[],u,w.vertexOffset,d,m),g.drawElements(e,w.primitiveLength*v,g.UNSIGNED_SHORT,w.primitiveOffset*v*2)}}};var wr=function(e,r,i,n){var o=r.style.light,a=o.properties.get("position"),s=[a.x,a.y,a.z],l=t.create$1();"viewport"===o.properties.get("anchor")&&t.fromRotation(l,-r.transform.angle),t.transformMat3(s,s,l);var u=o.properties.get("color");return{u_matrix:e,u_lightpos:s,u_lightintensity:o.properties.get("intensity"),u_lightcolor:[u.r,u.g,u.b],u_vertical_gradient:+i,u_opacity:n}},Sr=function(e,r,i,n,o,a,s){return t.extend(wr(e,r,i,n),br(a,r,s),{u_height_factor:-Math.pow(2,o.overscaledZ)/s.tileSize/8})},Tr=function(t){return{u_matrix:t}},Ir=function(e,r,i,n){return t.extend(Tr(e),br(i,r,n))},Er=function(t,e){return{u_matrix:t,u_world:e}},Ar=function(e,r,i,n,o){return t.extend(Ir(e,r,i,n),{u_world:o})},zr=function(e,r,i,n){var o,a,s=e.transform;if("map"===n.paint.get("circle-pitch-alignment")){var l=he(i,1,s.zoom);o=!0,a=[l,l]}else o=!1,a=s.pixelsToGLUnits;return{u_camera_to_center_distance:s.cameraToCenterDistance,u_scale_with_map:+("map"===n.paint.get("circle-pitch-scale")),u_matrix:e.translatePosMatrix(r.posMatrix,i,n.paint.get("circle-translate"),n.paint.get("circle-translate-anchor")),u_pitch_with_map:+o,u_device_pixel_ratio:t.browser.devicePixelRatio,u_extrude_scale:a}},Pr=function(t,e,r){var i=he(r,1,e.zoom),n=Math.pow(2,e.zoom-r.tileID.overscaledZ),o=r.tileID.overscaleFactor();return{u_matrix:t,u_camera_to_center_distance:e.cameraToCenterDistance,u_pixels_to_tile_units:i,u_extrude_scale:[e.pixelsToGLUnits[0]/(i*n),e.pixelsToGLUnits[1]/(i*n)],u_overscale_factor:o}},Cr=function(t,e,r){return{u_matrix:t,u_inv_matrix:e,u_camera_to_center_distance:r.cameraToCenterDistance,u_viewport_size:[r.width,r.height]}},kr=function(t,e,r){return void 0===r&&(r=1),{u_matrix:t,u_color:e,u_overlay:0,u_overlay_scale:r}},Mr=function(t){return{u_matrix:t}},Dr=function(t,e,r,i){return{u_matrix:t,u_extrude_scale:he(e,1,r),u_intensity:i}},Lr=function(e,r,i){var n=e.transform;return{u_matrix:Ur(e,r,i),u_ratio:1/he(r,1,n.zoom),u_device_pixel_ratio:t.browser.devicePixelRatio,u_units_to_pixels:[1/n.pixelsToGLUnits[0],1/n.pixelsToGLUnits[1]]}},Br=function(e,r,i){return t.extend(Lr(e,r,i),{u_image:0})},Rr=function(e,r,i,n){var o=e.transform,a=Or(r,o);return{u_matrix:Ur(e,r,i),u_texsize:r.imageAtlasTexture.size,u_ratio:1/he(r,1,o.zoom),u_device_pixel_ratio:t.browser.devicePixelRatio,u_image:0,u_scale:[a,n.fromScale,n.toScale],u_fade:n.t,u_units_to_pixels:[1/o.pixelsToGLUnits[0],1/o.pixelsToGLUnits[1]]}},Fr=function(e,r,i,n,o){var a=e.lineAtlas,s=Or(r,e.transform),l="round"===i.layout.get("line-cap"),u=a.getDash(n.from,l),c=a.getDash(n.to,l),p=u.width*o.fromScale,h=c.width*o.toScale;return t.extend(Lr(e,r,i),{u_patternscale_a:[s/p,-u.height/2],u_patternscale_b:[s/h,-c.height/2],u_sdfgamma:a.width/(256*Math.min(p,h)*t.browser.devicePixelRatio)/2,u_image:0,u_tex_y_a:u.y,u_tex_y_b:c.y,u_mix:o.t})};function Or(t,e){return 1/he(t,1,e.tileZoom)}function Ur(t,e,r){return t.translatePosMatrix(e.tileID.posMatrix,e,r.paint.get("line-translate"),r.paint.get("line-translate-anchor"))}var Vr=function(t,e,r,i,n){return{u_matrix:t,u_tl_parent:e,u_scale_parent:r,u_buffer_scale:1,u_fade_t:i.mix,u_opacity:i.opacity*n.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:n.paint.get("raster-brightness-min"),u_brightness_high:n.paint.get("raster-brightness-max"),u_saturation_factor:(a=n.paint.get("raster-saturation"),a>0?1-1/(1.001-a):-a),u_contrast_factor:(o=n.paint.get("raster-contrast"),o>0?1/(1-o):1+o),u_spin_weights:Nr(n.paint.get("raster-hue-rotate"))};var o,a};function Nr(t){t*=Math.PI/180;var e=Math.sin(t),r=Math.cos(t);return[(2*r+1)/3,(-Math.sqrt(3)*e-r+1)/3,(Math.sqrt(3)*e-r+1)/3]}var jr,qr=function(t,e,r,i,n,o,a,s,l,u){var c=n.transform;return{u_is_size_zoom_constant:+("constant"===t||"source"===t),u_is_size_feature_constant:+("constant"===t||"camera"===t),u_size_t:e?e.uSizeT:0,u_size:e?e.uSize:0,u_camera_to_center_distance:c.cameraToCenterDistance,u_pitch:c.pitch/360*2*Math.PI,u_rotate_symbol:+r,u_aspect_ratio:c.width/c.height,u_fade_change:n.options.fadeDuration?n.symbolFadeChange:1,u_matrix:o,u_label_plane_matrix:a,u_coord_matrix:s,u_is_text:+l,u_pitch_with_map:+i,u_texsize:u,u_texture:0}},Zr=function(e,r,i,n,o,a,s,l,u,c,p){var h=o.transform;return t.extend(qr(e,r,i,n,o,a,s,l,u,c),{u_gamma_scale:n?Math.cos(h._pitch)*h.cameraToCenterDistance:1,u_device_pixel_ratio:t.browser.devicePixelRatio,u_is_halo:+p})},Gr=function(e,r,i,n,o,a,s,l,u,c){return t.extend(Zr(e,r,i,n,o,a,s,l,!0,u,!0),{u_texsize_icon:c,u_texture_icon:1})},Xr=function(t,e,r){return{u_matrix:t,u_opacity:e,u_color:r}},Wr=function(e,r,i,n,o,a){return t.extend(function(t,e,r,i){var n=r.imageManager.getPattern(t.from.toString()),o=r.imageManager.getPattern(t.to.toString()),a=r.imageManager.getPixelSize(),s=a.width,l=a.height,u=Math.pow(2,i.tileID.overscaledZ),c=i.tileSize*Math.pow(2,r.transform.tileZoom)/u,p=c*(i.tileID.canonical.x+i.tileID.wrap*u),h=c*i.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:n.tl,u_pattern_br_a:n.br,u_pattern_tl_b:o.tl,u_pattern_br_b:o.br,u_texsize:[s,l],u_mix:e.t,u_pattern_size_a:n.displaySize,u_pattern_size_b:o.displaySize,u_scale_a:e.fromScale,u_scale_b:e.toScale,u_tile_units_to_pixels:1/he(i,1,r.transform.tileZoom),u_pixel_coord_upper:[p>>16,h>>16],u_pixel_coord_lower:[65535&p,65535&h]}}(n,a,i,o),{u_matrix:e,u_opacity:r})},Kr={fillExtrusion:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_lightpos:new t.Uniform3f(e,r.u_lightpos),u_lightintensity:new t.Uniform1f(e,r.u_lightintensity),u_lightcolor:new t.Uniform3f(e,r.u_lightcolor),u_vertical_gradient:new t.Uniform1f(e,r.u_vertical_gradient),u_opacity:new t.Uniform1f(e,r.u_opacity)}},fillExtrusionPattern:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_lightpos:new t.Uniform3f(e,r.u_lightpos),u_lightintensity:new t.Uniform1f(e,r.u_lightintensity),u_lightcolor:new t.Uniform3f(e,r.u_lightcolor),u_vertical_gradient:new t.Uniform1f(e,r.u_vertical_gradient),u_height_factor:new t.Uniform1f(e,r.u_height_factor),u_image:new t.Uniform1i(e,r.u_image),u_texsize:new t.Uniform2f(e,r.u_texsize),u_pixel_coord_upper:new t.Uniform2f(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(e,r.u_pixel_coord_lower),u_scale:new t.Uniform3f(e,r.u_scale),u_fade:new t.Uniform1f(e,r.u_fade),u_opacity:new t.Uniform1f(e,r.u_opacity)}},fill:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix)}},fillPattern:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_image:new t.Uniform1i(e,r.u_image),u_texsize:new t.Uniform2f(e,r.u_texsize),u_pixel_coord_upper:new t.Uniform2f(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(e,r.u_pixel_coord_lower),u_scale:new t.Uniform3f(e,r.u_scale),u_fade:new t.Uniform1f(e,r.u_fade)}},fillOutline:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_world:new t.Uniform2f(e,r.u_world)}},fillOutlinePattern:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_world:new t.Uniform2f(e,r.u_world),u_image:new t.Uniform1i(e,r.u_image),u_texsize:new t.Uniform2f(e,r.u_texsize),u_pixel_coord_upper:new t.Uniform2f(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(e,r.u_pixel_coord_lower),u_scale:new t.Uniform3f(e,r.u_scale),u_fade:new t.Uniform1f(e,r.u_fade)}},circle:function(e,r){return{u_camera_to_center_distance:new t.Uniform1f(e,r.u_camera_to_center_distance),u_scale_with_map:new t.Uniform1i(e,r.u_scale_with_map),u_pitch_with_map:new t.Uniform1i(e,r.u_pitch_with_map),u_extrude_scale:new t.Uniform2f(e,r.u_extrude_scale),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_matrix:new t.UniformMatrix4f(e,r.u_matrix)}},collisionBox:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_camera_to_center_distance:new t.Uniform1f(e,r.u_camera_to_center_distance),u_pixels_to_tile_units:new t.Uniform1f(e,r.u_pixels_to_tile_units),u_extrude_scale:new t.Uniform2f(e,r.u_extrude_scale),u_overscale_factor:new t.Uniform1f(e,r.u_overscale_factor)}},collisionCircle:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_inv_matrix:new t.UniformMatrix4f(e,r.u_inv_matrix),u_camera_to_center_distance:new t.Uniform1f(e,r.u_camera_to_center_distance),u_viewport_size:new t.Uniform2f(e,r.u_viewport_size)}},debug:function(e,r){return{u_color:new t.UniformColor(e,r.u_color),u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_overlay:new t.Uniform1i(e,r.u_overlay),u_overlay_scale:new t.Uniform1f(e,r.u_overlay_scale)}},clippingMask:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix)}},heatmap:function(e,r){return{u_extrude_scale:new t.Uniform1f(e,r.u_extrude_scale),u_intensity:new t.Uniform1f(e,r.u_intensity),u_matrix:new t.UniformMatrix4f(e,r.u_matrix)}},heatmapTexture:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_world:new t.Uniform2f(e,r.u_world),u_image:new t.Uniform1i(e,r.u_image),u_color_ramp:new t.Uniform1i(e,r.u_color_ramp),u_opacity:new t.Uniform1f(e,r.u_opacity)}},hillshade:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_image:new t.Uniform1i(e,r.u_image),u_latrange:new t.Uniform2f(e,r.u_latrange),u_light:new t.Uniform2f(e,r.u_light),u_shadow:new t.UniformColor(e,r.u_shadow),u_highlight:new t.UniformColor(e,r.u_highlight),u_accent:new t.UniformColor(e,r.u_accent)}},hillshadePrepare:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_image:new t.Uniform1i(e,r.u_image),u_dimension:new t.Uniform2f(e,r.u_dimension),u_zoom:new t.Uniform1f(e,r.u_zoom),u_maxzoom:new t.Uniform1f(e,r.u_maxzoom),u_unpack:new t.Uniform4f(e,r.u_unpack)}},line:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_ratio:new t.Uniform1f(e,r.u_ratio),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_units_to_pixels:new t.Uniform2f(e,r.u_units_to_pixels)}},lineGradient:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_ratio:new t.Uniform1f(e,r.u_ratio),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_units_to_pixels:new t.Uniform2f(e,r.u_units_to_pixels),u_image:new t.Uniform1i(e,r.u_image)}},linePattern:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_texsize:new t.Uniform2f(e,r.u_texsize),u_ratio:new t.Uniform1f(e,r.u_ratio),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_image:new t.Uniform1i(e,r.u_image),u_units_to_pixels:new t.Uniform2f(e,r.u_units_to_pixels),u_scale:new t.Uniform3f(e,r.u_scale),u_fade:new t.Uniform1f(e,r.u_fade)}},lineSDF:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_ratio:new t.Uniform1f(e,r.u_ratio),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_units_to_pixels:new t.Uniform2f(e,r.u_units_to_pixels),u_patternscale_a:new t.Uniform2f(e,r.u_patternscale_a),u_patternscale_b:new t.Uniform2f(e,r.u_patternscale_b),u_sdfgamma:new t.Uniform1f(e,r.u_sdfgamma),u_image:new t.Uniform1i(e,r.u_image),u_tex_y_a:new t.Uniform1f(e,r.u_tex_y_a),u_tex_y_b:new t.Uniform1f(e,r.u_tex_y_b),u_mix:new t.Uniform1f(e,r.u_mix)}},raster:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_tl_parent:new t.Uniform2f(e,r.u_tl_parent),u_scale_parent:new t.Uniform1f(e,r.u_scale_parent),u_buffer_scale:new t.Uniform1f(e,r.u_buffer_scale),u_fade_t:new t.Uniform1f(e,r.u_fade_t),u_opacity:new t.Uniform1f(e,r.u_opacity),u_image0:new t.Uniform1i(e,r.u_image0),u_image1:new t.Uniform1i(e,r.u_image1),u_brightness_low:new t.Uniform1f(e,r.u_brightness_low),u_brightness_high:new t.Uniform1f(e,r.u_brightness_high),u_saturation_factor:new t.Uniform1f(e,r.u_saturation_factor),u_contrast_factor:new t.Uniform1f(e,r.u_contrast_factor),u_spin_weights:new t.Uniform3f(e,r.u_spin_weights)}},symbolIcon:function(e,r){return{u_is_size_zoom_constant:new t.Uniform1i(e,r.u_is_size_zoom_constant),u_is_size_feature_constant:new t.Uniform1i(e,r.u_is_size_feature_constant),u_size_t:new t.Uniform1f(e,r.u_size_t),u_size:new t.Uniform1f(e,r.u_size),u_camera_to_center_distance:new t.Uniform1f(e,r.u_camera_to_center_distance),u_pitch:new t.Uniform1f(e,r.u_pitch),u_rotate_symbol:new t.Uniform1i(e,r.u_rotate_symbol),u_aspect_ratio:new t.Uniform1f(e,r.u_aspect_ratio),u_fade_change:new t.Uniform1f(e,r.u_fade_change),u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_label_plane_matrix:new t.UniformMatrix4f(e,r.u_label_plane_matrix),u_coord_matrix:new t.UniformMatrix4f(e,r.u_coord_matrix),u_is_text:new t.Uniform1i(e,r.u_is_text),u_pitch_with_map:new t.Uniform1i(e,r.u_pitch_with_map),u_texsize:new t.Uniform2f(e,r.u_texsize),u_texture:new t.Uniform1i(e,r.u_texture)}},symbolSDF:function(e,r){return{u_is_size_zoom_constant:new t.Uniform1i(e,r.u_is_size_zoom_constant),u_is_size_feature_constant:new t.Uniform1i(e,r.u_is_size_feature_constant),u_size_t:new t.Uniform1f(e,r.u_size_t),u_size:new t.Uniform1f(e,r.u_size),u_camera_to_center_distance:new t.Uniform1f(e,r.u_camera_to_center_distance),u_pitch:new t.Uniform1f(e,r.u_pitch),u_rotate_symbol:new t.Uniform1i(e,r.u_rotate_symbol),u_aspect_ratio:new t.Uniform1f(e,r.u_aspect_ratio),u_fade_change:new t.Uniform1f(e,r.u_fade_change),u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_label_plane_matrix:new t.UniformMatrix4f(e,r.u_label_plane_matrix),u_coord_matrix:new t.UniformMatrix4f(e,r.u_coord_matrix),u_is_text:new t.Uniform1i(e,r.u_is_text),u_pitch_with_map:new t.Uniform1i(e,r.u_pitch_with_map),u_texsize:new t.Uniform2f(e,r.u_texsize),u_texture:new t.Uniform1i(e,r.u_texture),u_gamma_scale:new t.Uniform1f(e,r.u_gamma_scale),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_is_halo:new t.Uniform1i(e,r.u_is_halo)}},symbolTextAndIcon:function(e,r){return{u_is_size_zoom_constant:new t.Uniform1i(e,r.u_is_size_zoom_constant),u_is_size_feature_constant:new t.Uniform1i(e,r.u_is_size_feature_constant),u_size_t:new t.Uniform1f(e,r.u_size_t),u_size:new t.Uniform1f(e,r.u_size),u_camera_to_center_distance:new t.Uniform1f(e,r.u_camera_to_center_distance),u_pitch:new t.Uniform1f(e,r.u_pitch),u_rotate_symbol:new t.Uniform1i(e,r.u_rotate_symbol),u_aspect_ratio:new t.Uniform1f(e,r.u_aspect_ratio),u_fade_change:new t.Uniform1f(e,r.u_fade_change),u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_label_plane_matrix:new t.UniformMatrix4f(e,r.u_label_plane_matrix),u_coord_matrix:new t.UniformMatrix4f(e,r.u_coord_matrix),u_is_text:new t.Uniform1i(e,r.u_is_text),u_pitch_with_map:new t.Uniform1i(e,r.u_pitch_with_map),u_texsize:new t.Uniform2f(e,r.u_texsize),u_texsize_icon:new t.Uniform2f(e,r.u_texsize_icon),u_texture:new t.Uniform1i(e,r.u_texture),u_texture_icon:new t.Uniform1i(e,r.u_texture_icon),u_gamma_scale:new t.Uniform1f(e,r.u_gamma_scale),u_device_pixel_ratio:new t.Uniform1f(e,r.u_device_pixel_ratio),u_is_halo:new t.Uniform1i(e,r.u_is_halo)}},background:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_opacity:new t.Uniform1f(e,r.u_opacity),u_color:new t.UniformColor(e,r.u_color)}},backgroundPattern:function(e,r){return{u_matrix:new t.UniformMatrix4f(e,r.u_matrix),u_opacity:new t.Uniform1f(e,r.u_opacity),u_image:new t.Uniform1i(e,r.u_image),u_pattern_tl_a:new t.Uniform2f(e,r.u_pattern_tl_a),u_pattern_br_a:new t.Uniform2f(e,r.u_pattern_br_a),u_pattern_tl_b:new t.Uniform2f(e,r.u_pattern_tl_b),u_pattern_br_b:new t.Uniform2f(e,r.u_pattern_br_b),u_texsize:new t.Uniform2f(e,r.u_texsize),u_mix:new t.Uniform1f(e,r.u_mix),u_pattern_size_a:new t.Uniform2f(e,r.u_pattern_size_a),u_pattern_size_b:new t.Uniform2f(e,r.u_pattern_size_b),u_scale_a:new t.Uniform1f(e,r.u_scale_a),u_scale_b:new t.Uniform1f(e,r.u_scale_b),u_pixel_coord_upper:new t.Uniform2f(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new t.Uniform2f(e,r.u_pixel_coord_lower),u_tile_units_to_pixels:new t.Uniform1f(e,r.u_tile_units_to_pixels)}}};function Hr(e,r,i,n,o,a,s){for(var l=e.context,u=l.gl,c=e.useProgram("collisionBox"),p=[],h=0,f=0,d=0;d<n.length;d++){var m=n[d],y=r.getTile(m),g=y.getBucket(i);if(g){var _=m.posMatrix;0===o[0]&&0===o[1]||(_=e.translatePosMatrix(m.posMatrix,y,o,a));var v=s?g.textCollisionBox:g.iconCollisionBox,x=g.collisionCircleArray;if(x.length>0){var b=t.create(),w=_;t.mul(b,g.placementInvProjMatrix,e.transform.glCoordMatrix),t.mul(b,b,g.placementViewportMatrix),p.push({circleArray:x,circleOffset:f,transform:w,invTransform:b}),f=h+=x.length/4}v&&c.draw(l,u.LINES,It.disabled,Et.disabled,e.colorModeForRenderPass(),zt.disabled,Pr(_,e.transform,y),i.id,v.layoutVertexBuffer,v.indexBuffer,v.segments,null,e.transform.zoom,null,null,v.collisionVertexBuffer)}}if(s&&p.length){var S=e.useProgram("collisionCircle"),T=new t.StructArrayLayout2f1f2i16;T.resize(4*h),T._trim();for(var I=0,E=0,A=p;E<A.length;E+=1)for(var z=A[E],P=0;P<z.circleArray.length/4;P++){var C=4*P,k=z.circleArray[C+0],M=z.circleArray[C+1],D=z.circleArray[C+2],L=z.circleArray[C+3];T.emplace(I++,k,M,D,L,0),T.emplace(I++,k,M,D,L,1),T.emplace(I++,k,M,D,L,2),T.emplace(I++,k,M,D,L,3)}(!jr||jr.length<2*h)&&(jr=function(e){var r=2*h,i=new t.StructArrayLayout3ui6;i.resize(r),i._trim();for(var n=0;n<r;n++){var o=6*n;i.uint16[o+0]=4*n+0,i.uint16[o+1]=4*n+1,i.uint16[o+2]=4*n+2,i.uint16[o+3]=4*n+2,i.uint16[o+4]=4*n+3,i.uint16[o+5]=4*n+0}return i}());for(var B=l.createIndexBuffer(jr,!0),R=l.createVertexBuffer(T,t.collisionCircleLayout.members,!0),F=0,O=p;F<O.length;F+=1){var U=O[F],V=Cr(U.transform,U.invTransform,e.transform);S.draw(l,u.TRIANGLES,It.disabled,Et.disabled,e.colorModeForRenderPass(),zt.disabled,V,i.id,R,B,t.SegmentVector.simpleSegment(0,2*U.circleOffset,U.circleArray.length,U.circleArray.length/2),null,e.transform.zoom,null,null,null)}R.destroy(),B.destroy()}}var Jr=t.identity(new Float32Array(16));function Yr(e,r,i,n,o,a){var s=t.getAnchorAlignment(e),l=-(s.horizontalAlign-.5)*r,u=-(s.verticalAlign-.5)*i,c=t.evaluateVariableOffset(e,n);return new t.Point((l/o+c[0])*a,(u/o+c[1])*a)}function Qr(e,r,i,n,o,a,s,l,u,c,p){var h=e.text.placedSymbolArray,f=e.text.dynamicLayoutVertexArray,d=e.icon.dynamicLayoutVertexArray,m={};f.clear();for(var y=0;y<h.length;y++){var g=h.get(y),_=g.hidden||!g.crossTileID||e.allowVerticalPlacement&&!g.placedOrientation?null:n[g.crossTileID];if(_){var v=new t.Point(g.anchorX,g.anchorY),x=$t(v,i?l:s),b=te(a.cameraToCenterDistance,x.signedDistanceFromCamera),w=o.evaluateSizeForFeature(e.textSizeData,c,g)*b/t.ONE_EM;i&&(w*=e.tilePixelRatio/u);for(var S=Yr(_.anchor,_.width,_.height,_.textOffset,_.textBoxScale,w),T=i?$t(v.add(S),s).point:x.point.add(r?S.rotate(-a.angle):S),I=e.allowVerticalPlacement&&g.placedOrientation===t.WritingMode.vertical?Math.PI/2:0,E=0;E<g.numGlyphs;E++)t.addDynamicAttributes(f,T,I);p&&g.associatedIconIndex>=0&&(m[g.associatedIconIndex]={shiftedAnchor:T,angle:I})}else ue(g.numGlyphs,f)}if(p){d.clear();for(var A=e.icon.placedSymbolArray,z=0;z<A.length;z++){var P=A.get(z);if(P.hidden)ue(P.numGlyphs,d);else{var C=m[z];if(C)for(var k=0;k<P.numGlyphs;k++)t.addDynamicAttributes(d,C.shiftedAnchor,C.angle);else ue(P.numGlyphs,d)}}e.icon.dynamicLayoutVertexBuffer.updateData(d)}e.text.dynamicLayoutVertexBuffer.updateData(f)}function $r(t,e,r){return r.iconsInText&&e?"symbolTextAndIcon":t?"symbolSDF":"symbolIcon"}function ti(e,r,i,n,o,a,s,l,u,c,p,h){for(var f=e.context,d=f.gl,m=e.transform,y="map"===l,g="map"===u,_=y&&"point"!==i.layout.get("symbol-placement"),v=y&&!g&&!_,x=void 0!==i.layout.get("symbol-sort-key").constantOr(1),b=e.depthModeForSublayer(0,It.ReadOnly),w=i.layout.get("text-variable-anchor"),S=[],T=0,I=n;T<I.length;T+=1){var E=I[T],A=r.getTile(E),z=A.getBucket(i);if(z){var P=o?z.text:z.icon;if(P&&P.segments.get().length){var C=P.programConfigurations.get(i.id),k=o||z.sdfIcons,M=o?z.textSizeData:z.iconSizeData,D=g||0!==m.pitch,L=e.useProgram($r(k,o,z),C),B=t.evaluateSizeForZoom(M,m.zoom),R=void 0,F=[0,0],O=void 0,U=void 0,V=null,N=void 0;if(o)O=A.glyphAtlasTexture,U=d.LINEAR,R=A.glyphAtlasTexture.size,z.iconsInText&&(F=A.imageAtlasTexture.size,V=A.imageAtlasTexture,N=D||e.options.rotating||e.options.zooming||"composite"===M.kind||"camera"===M.kind?d.LINEAR:d.NEAREST);else{var j=1!==i.layout.get("icon-size").constantOr(0)||z.iconsNeedLinear;O=A.imageAtlasTexture,U=k||e.options.rotating||e.options.zooming||j||D?d.LINEAR:d.NEAREST,R=A.imageAtlasTexture.size}var q=he(A,1,e.transform.zoom),Z=Yt(E.posMatrix,g,y,e.transform,q),G=Qt(E.posMatrix,g,y,e.transform,q),X=w&&z.hasTextData(),W="none"!==i.layout.get("icon-text-fit")&&X&&z.hasIconData();_&&re(z,E.posMatrix,e,o,Z,G,g,c);var K=e.translatePosMatrix(E.posMatrix,A,a,s),H=_||o&&w||W?Jr:Z,J=e.translatePosMatrix(G,A,a,s,!0),Y=k&&0!==i.paint.get(o?"text-halo-width":"icon-halo-width").constantOr(1),Q={program:L,buffers:P,uniformValues:k?z.iconsInText?Gr(M.kind,B,v,g,e,K,H,J,R,F):Zr(M.kind,B,v,g,e,K,H,J,o,R,!0):qr(M.kind,B,v,g,e,K,H,J,o,R),atlasTexture:O,atlasTextureIcon:V,atlasInterpolation:U,atlasInterpolationIcon:N,isSDF:k,hasHalo:Y};if(x)for(var $=0,tt=P.segments.get();$<tt.length;$+=1){var et=tt[$];S.push({segments:new t.SegmentVector([et]),sortKey:et.sortKey,state:Q})}else S.push({segments:P.segments,sortKey:0,state:Q})}}}x&&S.sort(function(t,e){return t.sortKey-e.sortKey});for(var rt=0,it=S;rt<it.length;rt+=1){var nt=it[rt],ot=nt.state;if(f.activeTexture.set(d.TEXTURE0),ot.atlasTexture.bind(ot.atlasInterpolation,d.CLAMP_TO_EDGE),ot.atlasTextureIcon&&(f.activeTexture.set(d.TEXTURE1),ot.atlasTextureIcon&&ot.atlasTextureIcon.bind(ot.atlasInterpolationIcon,d.CLAMP_TO_EDGE)),ot.isSDF){var at=ot.uniformValues;ot.hasHalo&&(at.u_is_halo=1,ei(ot.buffers,nt.segments,i,e,ot.program,b,p,h,at)),at.u_is_halo=0}ei(ot.buffers,nt.segments,i,e,ot.program,b,p,h,ot.uniformValues)}}function ei(t,e,r,i,n,o,a,s,l){var u=i.context;n.draw(u,u.gl.TRIANGLES,o,a,s,zt.disabled,l,r.id,t.layoutVertexBuffer,t.indexBuffer,e,r.paint,i.transform.zoom,t.programConfigurations.get(r.id),t.dynamicLayoutVertexBuffer,t.opacityVertexBuffer)}function ri(t,e,r,i,n,o,a){var s,l,u,c,p,h=t.context.gl,f=r.paint.get("fill-pattern"),d=f&&f.constantOr(1),m=r.getCrossfadeParameters();a?(l=d&&!r.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",s=h.LINES):(l=d?"fillPattern":"fill",s=h.TRIANGLES);for(var y=0,g=i;y<g.length;y+=1){var _=g[y],v=e.getTile(_);if(!d||v.patternsLoaded()){var x=v.getBucket(r);if(x){var b=x.programConfigurations.get(r.id),w=t.useProgram(l,b);d&&(t.context.activeTexture.set(h.TEXTURE0),v.imageAtlasTexture.bind(h.LINEAR,h.CLAMP_TO_EDGE),b.updatePaintBuffers(m));var S=f.constantOr(null);if(S&&v.imageAtlas){var T=v.imageAtlas,I=T.patternPositions[S.to.toString()],E=T.patternPositions[S.from.toString()];I&&E&&b.setConstantPatternPositions(I,E)}var A=t.translatePosMatrix(_.posMatrix,v,r.paint.get("fill-translate"),r.paint.get("fill-translate-anchor"));if(a){c=x.indexBuffer2,p=x.segments2;var z=[h.drawingBufferWidth,h.drawingBufferHeight];u="fillOutlinePattern"===l&&d?Ar(A,t,m,v,z):Er(A,z)}else c=x.indexBuffer,p=x.segments,u=d?Ir(A,t,m,v):Tr(A);w.draw(t.context,s,n,t.stencilModeForClipping(_),o,zt.disabled,u,r.id,x.layoutVertexBuffer,c,p,r.paint,t.transform.zoom,b)}}}}function ii(t,e,r,i,n,o,a){for(var s=t.context,l=s.gl,u=r.paint.get("fill-extrusion-pattern"),c=u.constantOr(1),p=r.getCrossfadeParameters(),h=r.paint.get("fill-extrusion-opacity"),f=0,d=i;f<d.length;f+=1){var m=d[f],y=e.getTile(m),g=y.getBucket(r);if(g){var _=g.programConfigurations.get(r.id),v=t.useProgram(c?"fillExtrusionPattern":"fillExtrusion",_);c&&(t.context.activeTexture.set(l.TEXTURE0),y.imageAtlasTexture.bind(l.LINEAR,l.CLAMP_TO_EDGE),_.updatePaintBuffers(p));var x=u.constantOr(null);if(x&&y.imageAtlas){var b=y.imageAtlas,w=b.patternPositions[x.to.toString()],S=b.patternPositions[x.from.toString()];w&&S&&_.setConstantPatternPositions(w,S)}var T=t.translatePosMatrix(m.posMatrix,y,r.paint.get("fill-extrusion-translate"),r.paint.get("fill-extrusion-translate-anchor")),I=r.paint.get("fill-extrusion-vertical-gradient"),E=c?Sr(T,t,I,h,m,p,y):wr(T,t,I,h);v.draw(s,s.gl.TRIANGLES,n,o,a,zt.backCCW,E,r.id,g.layoutVertexBuffer,g.indexBuffer,g.segments,r.paint,t.transform.zoom,_)}}}function ni(e,r,i,n,o,a){var s=e.context,l=s.gl,u=r.fbo;if(u){var c=e.useProgram("hillshade");s.activeTexture.set(l.TEXTURE0),l.bindTexture(l.TEXTURE_2D,u.colorAttachment.get());var p=function(e,r,i){var n=i.paint.get("hillshade-shadow-color"),o=i.paint.get("hillshade-highlight-color"),a=i.paint.get("hillshade-accent-color"),s=i.paint.get("hillshade-illumination-direction")*(Math.PI/180);"viewport"===i.paint.get("hillshade-illumination-anchor")&&(s-=e.transform.angle);var l,u,c,p=!e.options.moving;return{u_matrix:e.transform.calculatePosMatrix(r.tileID.toUnwrapped(),p),u_image:0,u_latrange:(l=r.tileID,u=Math.pow(2,l.canonical.z),c=l.canonical.y,[new t.MercatorCoordinate(0,c/u).toLngLat().lat,new t.MercatorCoordinate(0,(c+1)/u).toLngLat().lat]),u_light:[i.paint.get("hillshade-exaggeration"),s],u_shadow:n,u_highlight:o,u_accent:a}}(e,r,i);c.draw(s,l.TRIANGLES,n,o,a,zt.disabled,p,i.id,e.rasterBoundsBuffer,e.quadTriangleIndexBuffer,e.rasterBoundsSegments)}}function oi(e,r,i,n,o,a,s){var l=e.context,u=l.gl,c=r.dem;if(c&&c.data){var p=c.dim,h=c.stride,f=c.getPixels();if(l.activeTexture.set(u.TEXTURE1),l.pixelStoreUnpackPremultiplyAlpha.set(!1),r.demTexture=r.demTexture||e.getTileTexture(h),r.demTexture){var d=r.demTexture;d.update(f,{premultiply:!1}),d.bind(u.NEAREST,u.CLAMP_TO_EDGE)}else r.demTexture=new t.Texture(l,f,u.RGBA,{premultiply:!1}),r.demTexture.bind(u.NEAREST,u.CLAMP_TO_EDGE);l.activeTexture.set(u.TEXTURE0);var m=r.fbo;if(!m){var y=new t.Texture(l,{width:p,height:p,data:null},u.RGBA);y.bind(u.LINEAR,u.CLAMP_TO_EDGE),(m=r.fbo=l.createFramebuffer(p,p,!0)).colorAttachment.set(y.texture)}l.bindFramebuffer.set(m.framebuffer),l.viewport.set([0,0,p,p]),e.useProgram("hillshadePrepare").draw(l,u.TRIANGLES,o,a,s,zt.disabled,function(e,r,i){var n=r.stride,o=t.create();return t.ortho(o,0,t.EXTENT,-t.EXTENT,0,0,1),t.translate(o,o,[0,-t.EXTENT,0]),{u_matrix:o,u_image:1,u_dimension:[n,n],u_zoom:e.overscaledZ,u_maxzoom:i,u_unpack:r.getUnpackVector()}}(r.tileID,c,n),i.id,e.rasterBoundsBuffer,e.quadTriangleIndexBuffer,e.rasterBoundsSegments),r.needsHillshadePrepare=!1}}function ai(e,r,i,n,o){var a=n.paint.get("raster-fade-duration");if(a>0){var s=t.browser.now(),l=(s-e.timeAdded)/a,u=r?(s-r.timeAdded)/a:-1,c=i.getSource(),p=o.coveringZoomLevel({tileSize:c.tileSize,roundZoom:c.roundZoom}),h=!r||Math.abs(r.tileID.overscaledZ-p)>Math.abs(e.tileID.overscaledZ-p),f=h&&e.refreshedUponExpiration?1:t.clamp(h?l:1-u,0,1);return e.refreshedUponExpiration&&l>=1&&(e.refreshedUponExpiration=!1),r?{opacity:1,mix:1-f}:{opacity:f,mix:0}}return{opacity:1,mix:0}}var si=new t.Color(1,0,0,1),li=new t.Color(0,1,0,1),ui=new t.Color(0,0,1,1),ci=new t.Color(1,0,1,1),pi=new t.Color(0,1,1,1);function hi(t,e,r,i){di(t,0,e+r/2,t.transform.width,r,i)}function fi(t,e,r,i){di(t,e-r/2,0,r,t.transform.height,i)}function di(e,r,i,n,o,a){var s=e.context,l=s.gl;l.enable(l.SCISSOR_TEST),l.scissor(r*t.browser.devicePixelRatio,i*t.browser.devicePixelRatio,n*t.browser.devicePixelRatio,o*t.browser.devicePixelRatio),s.clear({color:a}),l.disable(l.SCISSOR_TEST)}function mi(e,r,i){var n=e.context,o=n.gl,a=i.posMatrix,s=e.useProgram("debug"),l=It.disabled,u=Et.disabled,c=e.colorModeForRenderPass();n.activeTexture.set(o.TEXTURE0),e.emptyTexture.bind(o.LINEAR,o.CLAMP_TO_EDGE),s.draw(n,o.LINE_STRIP,l,u,c,zt.disabled,kr(a,t.Color.red),"$debug",e.debugBuffer,e.tileBorderIndexBuffer,e.debugSegments);var p=r.getTileByID(i.key).latestRawTileData,h=Math.floor((p&&p.byteLength||0)/1024),f=r.getTile(i).tileSize,d=512/Math.min(f,512)*(i.overscaledZ/e.transform.zoom)*.5,m=i.canonical.toString();i.overscaledZ!==i.canonical.z&&(m+=" => "+i.overscaledZ),function(t,e){t.initDebugOverlayCanvas();var r=t.debugOverlayCanvas,i=t.context.gl,n=t.debugOverlayCanvas.getContext("2d");n.clearRect(0,0,r.width,r.height),n.shadowColor="white",n.shadowBlur=2,n.lineWidth=1.5,n.strokeStyle="white",n.textBaseline="top",n.font="bold 36px Open Sans, sans-serif",n.fillText(e,5,5),n.strokeText(e,5,5),t.debugOverlayTexture.update(r),t.debugOverlayTexture.bind(i.LINEAR,i.CLAMP_TO_EDGE)}(e,m+" "+h+"kb"),s.draw(n,o.TRIANGLES,l,u,At.alphaBlended,zt.disabled,kr(a,t.Color.transparent,d),"$debug",e.debugBuffer,e.quadTriangleIndexBuffer,e.debugSegments)}var yi={symbol:function(e,r,i,n,o){if("translucent"===e.renderPass){var a=Et.disabled,s=e.colorModeForRenderPass();i.layout.get("text-variable-anchor")&&function(e,r,i,n,o,a,s){for(var l=r.transform,u="map"===o,c="map"===a,p=0,h=e;p<h.length;p+=1){var f=h[p],d=n.getTile(f),m=d.getBucket(i);if(m&&m.text&&m.text.segments.get().length){var y=t.evaluateSizeForZoom(m.textSizeData,l.zoom),g=he(d,1,r.transform.zoom),_=Yt(f.posMatrix,c,u,r.transform,g),v="none"!==i.layout.get("icon-text-fit")&&m.hasIconData();if(y){var x=Math.pow(2,l.zoom-d.tileID.overscaledZ);Qr(m,u,c,s,t.symbolSize,l,_,f.posMatrix,x,y,v)}}}}(n,e,i,r,i.layout.get("text-rotation-alignment"),i.layout.get("text-pitch-alignment"),o),0!==i.paint.get("icon-opacity").constantOr(1)&&ti(e,r,i,n,!1,i.paint.get("icon-translate"),i.paint.get("icon-translate-anchor"),i.layout.get("icon-rotation-alignment"),i.layout.get("icon-pitch-alignment"),i.layout.get("icon-keep-upright"),a,s),0!==i.paint.get("text-opacity").constantOr(1)&&ti(e,r,i,n,!0,i.paint.get("text-translate"),i.paint.get("text-translate-anchor"),i.layout.get("text-rotation-alignment"),i.layout.get("text-pitch-alignment"),i.layout.get("text-keep-upright"),a,s),r.map.showCollisionBoxes&&(Hr(e,r,i,n,i.paint.get("text-translate"),i.paint.get("text-translate-anchor"),!0),Hr(e,r,i,n,i.paint.get("icon-translate"),i.paint.get("icon-translate-anchor"),!1))}},circle:function(e,r,i,n){if("translucent"===e.renderPass){var o=i.paint.get("circle-opacity"),a=i.paint.get("circle-stroke-width"),s=i.paint.get("circle-stroke-opacity"),l=void 0!==i.layout.get("circle-sort-key").constantOr(1);if(0!==o.constantOr(1)||0!==a.constantOr(1)&&0!==s.constantOr(1)){for(var u=e.context,c=u.gl,p=e.depthModeForSublayer(0,It.ReadOnly),h=Et.disabled,f=e.colorModeForRenderPass(),d=[],m=0;m<n.length;m++){var y=n[m],g=r.getTile(y),_=g.getBucket(i);if(_){var v=_.programConfigurations.get(i.id),x={programConfiguration:v,program:e.useProgram("circle",v),layoutVertexBuffer:_.layoutVertexBuffer,indexBuffer:_.indexBuffer,uniformValues:zr(e,y,g,i)};if(l)for(var b=0,w=_.segments.get();b<w.length;b+=1){var S=w[b];d.push({segments:new t.SegmentVector([S]),sortKey:S.sortKey,state:x})}else d.push({segments:_.segments,sortKey:0,state:x})}}l&&d.sort(function(t,e){return t.sortKey-e.sortKey});for(var T=0,I=d;T<I.length;T+=1){var E=I[T],A=E.state;A.program.draw(u,c.TRIANGLES,p,h,f,zt.disabled,A.uniformValues,i.id,A.layoutVertexBuffer,A.indexBuffer,E.segments,i.paint,e.transform.zoom,A.programConfiguration)}}}},heatmap:function(e,r,i,n){if(0!==i.paint.get("heatmap-opacity"))if("offscreen"===e.renderPass){var o=e.context,a=o.gl,s=Et.disabled,l=new At([a.ONE,a.ONE],t.Color.transparent,[!0,!0,!0,!0]);!function(t,e,r){var i=t.gl;t.activeTexture.set(i.TEXTURE1),t.viewport.set([0,0,e.width/4,e.height/4]);var n=r.heatmapFbo;if(n)i.bindTexture(i.TEXTURE_2D,n.colorAttachment.get()),t.bindFramebuffer.set(n.framebuffer);else{var o=i.createTexture();i.bindTexture(i.TEXTURE_2D,o),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,i.LINEAR),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,i.LINEAR),n=r.heatmapFbo=t.createFramebuffer(e.width/4,e.height/4,!1),function(t,e,r,i){var n=t.gl;n.texImage2D(n.TEXTURE_2D,0,n.RGBA,e.width/4,e.height/4,0,n.RGBA,t.extRenderToTextureHalfFloat?t.extTextureHalfFloat.HALF_FLOAT_OES:n.UNSIGNED_BYTE,null),i.colorAttachment.set(r)}(t,e,o,n)}}(o,e,i),o.clear({color:t.Color.transparent});for(var u=0;u<n.length;u++){var c=n[u];if(!r.hasRenderableParent(c)){var p=r.getTile(c),h=p.getBucket(i);if(h){var f=h.programConfigurations.get(i.id);e.useProgram("heatmap",f).draw(o,a.TRIANGLES,It.disabled,s,l,zt.disabled,Dr(c.posMatrix,p,e.transform.zoom,i.paint.get("heatmap-intensity")),i.id,h.layoutVertexBuffer,h.indexBuffer,h.segments,i.paint,e.transform.zoom,f)}}}o.viewport.set([0,0,e.width,e.height])}else"translucent"===e.renderPass&&(e.context.setColorMode(e.colorModeForRenderPass()),function(e,r){var i=e.context,n=i.gl,o=r.heatmapFbo;if(o){i.activeTexture.set(n.TEXTURE0),n.bindTexture(n.TEXTURE_2D,o.colorAttachment.get()),i.activeTexture.set(n.TEXTURE1);var a=r.colorRampTexture;a||(a=r.colorRampTexture=new t.Texture(i,r.colorRamp,n.RGBA)),a.bind(n.LINEAR,n.CLAMP_TO_EDGE),e.useProgram("heatmapTexture").draw(i,n.TRIANGLES,It.disabled,Et.disabled,e.colorModeForRenderPass(),zt.disabled,function(e,r,i,n){var o=t.create();t.ortho(o,0,e.width,e.height,0,0,1);var a=e.context.gl;return{u_matrix:o,u_world:[a.drawingBufferWidth,a.drawingBufferHeight],u_image:0,u_color_ramp:1,u_opacity:r.paint.get("heatmap-opacity")}}(e,r),r.id,e.viewportBuffer,e.quadTriangleIndexBuffer,e.viewportSegments,r.paint,e.transform.zoom)}}(e,i))},line:function(e,r,i,n){if("translucent"===e.renderPass){var o=i.paint.get("line-opacity"),a=i.paint.get("line-width");if(0!==o.constantOr(1)&&0!==a.constantOr(1)){var s=e.depthModeForSublayer(0,It.ReadOnly),l=e.colorModeForRenderPass(),u=i.paint.get("line-dasharray"),c=i.paint.get("line-pattern"),p=c.constantOr(1),h=i.paint.get("line-gradient"),f=i.getCrossfadeParameters(),d=p?"linePattern":u?"lineSDF":h?"lineGradient":"line",m=e.context,y=m.gl,g=!0;if(h){m.activeTexture.set(y.TEXTURE0);var _=i.gradientTexture;if(!i.gradient)return;_||(_=i.gradientTexture=new t.Texture(m,i.gradient,y.RGBA)),_.bind(y.LINEAR,y.CLAMP_TO_EDGE)}for(var v=0,x=n;v<x.length;v+=1){var b=x[v],w=r.getTile(b);if(!p||w.patternsLoaded()){var S=w.getBucket(i);if(S){var T=S.programConfigurations.get(i.id),I=e.context.program.get(),E=e.useProgram(d,T),A=g||E.program!==I,z=c.constantOr(null);if(z&&w.imageAtlas){var P=w.imageAtlas,C=P.patternPositions[z.to.toString()],k=P.patternPositions[z.from.toString()];C&&k&&T.setConstantPatternPositions(C,k)}var M=p?Rr(e,w,i,f):u?Fr(e,w,i,u,f):h?Br(e,w,i):Lr(e,w,i);p?(m.activeTexture.set(y.TEXTURE0),w.imageAtlasTexture.bind(y.LINEAR,y.CLAMP_TO_EDGE),T.updatePaintBuffers(f)):u&&(A||e.lineAtlas.dirty)&&(m.activeTexture.set(y.TEXTURE0),e.lineAtlas.bind(m)),E.draw(m,y.TRIANGLES,s,e.stencilModeForClipping(b),l,zt.disabled,M,i.id,S.layoutVertexBuffer,S.indexBuffer,S.segments,i.paint,e.transform.zoom,T),g=!1}}}}}},fill:function(e,r,i,n){var o=i.paint.get("fill-color"),a=i.paint.get("fill-opacity");if(0!==a.constantOr(1)){var s=e.colorModeForRenderPass(),l=i.paint.get("fill-pattern"),u=e.opaquePassEnabledForLayer()&&!l.constantOr(1)&&1===o.constantOr(t.Color.transparent).a&&1===a.constantOr(0)?"opaque":"translucent";if(e.renderPass===u){var c=e.depthModeForSublayer(1,"opaque"===e.renderPass?It.ReadWrite:It.ReadOnly);ri(e,r,i,n,c,s,!1)}if("translucent"===e.renderPass&&i.paint.get("fill-antialias")){var p=e.depthModeForSublayer(i.getPaintProperty("fill-outline-color")?2:0,It.ReadOnly);ri(e,r,i,n,p,s,!0)}}},"fill-extrusion":function(t,e,r,i){var n=r.paint.get("fill-extrusion-opacity");if(0!==n&&"translucent"===t.renderPass){var o=new It(t.context.gl.LEQUAL,It.ReadWrite,t.depthRangeFor3D);if(1!==n||r.paint.get("fill-extrusion-pattern").constantOr(1))ii(t,e,r,i,o,Et.disabled,At.disabled),ii(t,e,r,i,o,t.stencilModeFor3D(),t.colorModeForRenderPass());else{var a=t.colorModeForRenderPass();ii(t,e,r,i,o,Et.disabled,a)}}},hillshade:function(t,e,r,i){if("offscreen"===t.renderPass||"translucent"===t.renderPass){for(var n=t.context,o=e.getSource().maxzoom,a=t.depthModeForSublayer(0,It.ReadOnly),s=t.colorModeForRenderPass(),l="translucent"===t.renderPass?t.stencilConfigForOverlap(i):[{},i],u=l[0],c=0,p=l[1];c<p.length;c+=1){var h=p[c],f=e.getTile(h);f.needsHillshadePrepare&&"offscreen"===t.renderPass?oi(t,f,r,o,a,Et.disabled,s):"translucent"===t.renderPass&&ni(t,f,r,a,u[h.overscaledZ],s)}n.viewport.set([0,0,t.width,t.height])}},raster:function(t,e,r,i){if("translucent"===t.renderPass&&0!==r.paint.get("raster-opacity")&&i.length)for(var n=t.context,o=n.gl,a=e.getSource(),s=t.useProgram("raster"),l=t.colorModeForRenderPass(),u=a instanceof M?[{},i]:t.stencilConfigForOverlap(i),c=u[0],p=u[1],h=p[p.length-1].overscaledZ,f=!t.options.moving,d=0,m=p;d<m.length;d+=1){var y=m[d],g=t.depthModeForSublayer(y.overscaledZ-h,1===r.paint.get("raster-opacity")?It.ReadWrite:It.ReadOnly,o.LESS),_=e.getTile(y),v=t.transform.calculatePosMatrix(y.toUnwrapped(),f);_.registerFadeDuration(r.paint.get("raster-fade-duration"));var x=e.findLoadedParent(y,0),b=ai(_,x,e,r,t.transform),w=void 0,S=void 0,T="nearest"===r.paint.get("raster-resampling")?o.NEAREST:o.LINEAR;n.activeTexture.set(o.TEXTURE0),_.texture.bind(T,o.CLAMP_TO_EDGE,o.LINEAR_MIPMAP_NEAREST),n.activeTexture.set(o.TEXTURE1),x?(x.texture.bind(T,o.CLAMP_TO_EDGE,o.LINEAR_MIPMAP_NEAREST),w=Math.pow(2,x.tileID.overscaledZ-_.tileID.overscaledZ),S=[_.tileID.canonical.x*w%1,_.tileID.canonical.y*w%1]):_.texture.bind(T,o.CLAMP_TO_EDGE,o.LINEAR_MIPMAP_NEAREST);var I=Vr(v,S||[0,0],w||1,b,r);a instanceof M?s.draw(n,o.TRIANGLES,g,Et.disabled,l,zt.disabled,I,r.id,a.boundsBuffer,t.quadTriangleIndexBuffer,a.boundsSegments):s.draw(n,o.TRIANGLES,g,c[y.overscaledZ],l,zt.disabled,I,r.id,t.rasterBoundsBuffer,t.quadTriangleIndexBuffer,t.rasterBoundsSegments)}},background:function(t,e,r){var i=r.paint.get("background-color"),n=r.paint.get("background-opacity");if(0!==n){var o=t.context,a=o.gl,s=t.transform,l=s.tileSize,u=r.paint.get("background-pattern");if(!t.isPatternMissing(u)){var c=!u&&1===i.a&&1===n&&t.opaquePassEnabledForLayer()?"opaque":"translucent";if(t.renderPass===c){var p=Et.disabled,h=t.depthModeForSublayer(0,"opaque"===c?It.ReadWrite:It.ReadOnly),f=t.colorModeForRenderPass(),d=t.useProgram(u?"backgroundPattern":"background"),m=s.coveringTiles({tileSize:l});u&&(o.activeTexture.set(a.TEXTURE0),t.imageManager.bind(t.context));for(var y=r.getCrossfadeParameters(),g=0,_=m;g<_.length;g+=1){var v=_[g],x=t.transform.calculatePosMatrix(v.toUnwrapped()),b=u?Wr(x,n,t,u,{tileID:v,tileSize:l},y):Xr(x,n,i);d.draw(o,a.TRIANGLES,h,p,f,zt.disabled,b,r.id,t.tileExtentBuffer,t.quadTriangleIndexBuffer,t.tileExtentSegments)}}}}},debug:function(t,e,r){for(var i=0;i<r.length;i++)mi(t,e,r[i])},custom:function(t,e,r){var i=t.context,n=r.implementation;if("offscreen"===t.renderPass){var o=n.prerender;o&&(t.setCustomLayerDefaults(),i.setColorMode(t.colorModeForRenderPass()),o.call(n,i.gl,t.transform.customLayerMatrix()),i.setDirty(),t.setBaseState())}else if("translucent"===t.renderPass){t.setCustomLayerDefaults(),i.setColorMode(t.colorModeForRenderPass()),i.setStencilMode(Et.disabled);var a="3d"===n.renderingMode?new It(t.context.gl.LEQUAL,It.ReadWrite,t.depthRangeFor3D):t.depthModeForSublayer(0,It.ReadOnly);i.setDepthMode(a),n.render(i.gl,t.transform.customLayerMatrix()),i.setDirty(),t.setBaseState(),i.bindFramebuffer.set(null)}}},gi=function(t,e){this.context=new Pt(t),this.transform=e,this._tileTextures={},this.setup(),this.numSublayers=Ct.maxUnderzooming+Ct.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new Oe,this.gpuTimers={}};gi.prototype.resize=function(e,r){if(this.width=e*t.browser.devicePixelRatio,this.height=r*t.browser.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(var i=0,n=this.style._order;i<n.length;i+=1)this.style._layers[n[i]].resize()},gi.prototype.setup=function(){var e=this.context,r=new t.StructArrayLayout2i4;r.emplaceBack(0,0),r.emplaceBack(t.EXTENT,0),r.emplaceBack(0,t.EXTENT),r.emplaceBack(t.EXTENT,t.EXTENT),this.tileExtentBuffer=e.createVertexBuffer(r,Ze.members),this.tileExtentSegments=t.SegmentVector.simpleSegment(0,0,4,2);var i=new t.StructArrayLayout2i4;i.emplaceBack(0,0),i.emplaceBack(t.EXTENT,0),i.emplaceBack(0,t.EXTENT),i.emplaceBack(t.EXTENT,t.EXTENT),this.debugBuffer=e.createVertexBuffer(i,Ze.members),this.debugSegments=t.SegmentVector.simpleSegment(0,0,4,5);var n=new t.StructArrayLayout4i8;n.emplaceBack(0,0,0,0),n.emplaceBack(t.EXTENT,0,t.EXTENT,0),n.emplaceBack(0,t.EXTENT,0,t.EXTENT),n.emplaceBack(t.EXTENT,t.EXTENT,t.EXTENT,t.EXTENT),this.rasterBoundsBuffer=e.createVertexBuffer(n,k.members),this.rasterBoundsSegments=t.SegmentVector.simpleSegment(0,0,4,2);var o=new t.StructArrayLayout2i4;o.emplaceBack(0,0),o.emplaceBack(1,0),o.emplaceBack(0,1),o.emplaceBack(1,1),this.viewportBuffer=e.createVertexBuffer(o,Ze.members),this.viewportSegments=t.SegmentVector.simpleSegment(0,0,4,2);var a=new t.StructArrayLayout1ui2;a.emplaceBack(0),a.emplaceBack(1),a.emplaceBack(3),a.emplaceBack(2),a.emplaceBack(0),this.tileBorderIndexBuffer=e.createIndexBuffer(a);var s=new t.StructArrayLayout3ui6;s.emplaceBack(0,1,2),s.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=e.createIndexBuffer(s),this.emptyTexture=new t.Texture(e,{width:1,height:1,data:new Uint8Array([0,0,0,0])},e.gl.RGBA);var l=this.context.gl;this.stencilClearMode=new Et({func:l.ALWAYS,mask:0},0,255,l.ZERO,l.ZERO,l.ZERO)},gi.prototype.clearStencil=function(){var e=this.context,r=e.gl;this.nextStencilID=1,this.currentStencilSource=void 0;var i=t.create();t.ortho(i,0,this.width,this.height,0,0,1),t.scale(i,i,[r.drawingBufferWidth,r.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(e,r.TRIANGLES,It.disabled,this.stencilClearMode,At.disabled,zt.disabled,Mr(i),"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)},gi.prototype._renderTileClippingMasks=function(t,e){if(this.currentStencilSource!==t.source&&t.isTileClipped()&&e&&e.length){this.currentStencilSource=t.source;var r=this.context,i=r.gl;this.nextStencilID+e.length>256&&this.clearStencil(),r.setColorMode(At.disabled),r.setDepthMode(It.disabled);var n=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(var o=0,a=e;o<a.length;o+=1){var s=a[o],l=this._tileClippingMaskIDs[s.key]=this.nextStencilID++;n.draw(r,i.TRIANGLES,It.disabled,new Et({func:i.ALWAYS,mask:0},l,255,i.KEEP,i.KEEP,i.REPLACE),At.disabled,zt.disabled,Mr(s.posMatrix),"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}},gi.prototype.stencilModeFor3D=function(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();var t=this.nextStencilID++,e=this.context.gl;return new Et({func:e.NOTEQUAL,mask:255},t,255,e.KEEP,e.KEEP,e.REPLACE)},gi.prototype.stencilModeForClipping=function(t){var e=this.context.gl;return new Et({func:e.EQUAL,mask:255},this._tileClippingMaskIDs[t.key],0,e.KEEP,e.KEEP,e.REPLACE)},gi.prototype.stencilConfigForOverlap=function(t){var e,r=this.context.gl,i=t.sort(function(t,e){return e.overscaledZ-t.overscaledZ}),n=i[i.length-1].overscaledZ,o=i[0].overscaledZ-n+1;if(o>1){this.currentStencilSource=void 0,this.nextStencilID+o>256&&this.clearStencil();for(var a={},s=0;s<o;s++)a[s+n]=new Et({func:r.GEQUAL,mask:255},s+this.nextStencilID,255,r.KEEP,r.KEEP,r.REPLACE);return this.nextStencilID+=o,[a,i]}return[(e={},e[n]=Et.disabled,e),i]},gi.prototype.colorModeForRenderPass=function(){var e=this.context.gl;return this._showOverdrawInspector?new At([e.CONSTANT_COLOR,e.ONE],new t.Color(1/8,1/8,1/8,0),[!0,!0,!0,!0]):"opaque"===this.renderPass?At.unblended:At.alphaBlended},gi.prototype.depthModeForSublayer=function(t,e,r){if(!this.opaquePassEnabledForLayer())return It.disabled;var i=1-((1+this.currentLayer)*this.numSublayers+t)*this.depthEpsilon;return new It(r||this.context.gl.LEQUAL,e,[i,i])},gi.prototype.opaquePassEnabledForLayer=function(){return this.currentLayer<this.opaquePassCutoff},gi.prototype.render=function(e,r){var i=this;this.style=e,this.options=r,this.lineAtlas=e.lineAtlas,this.imageManager=e.imageManager,this.glyphManager=e.glyphManager,this.symbolFadeChange=e.placement.symbolFadeChange(t.browser.now()),this.imageManager.beginFrame();var n=this.style._order,o=this.style.sourceCaches;for(var a in o){var s=o[a];s.used&&s.prepare(this.context)}var l,u,c={},p={},h={};for(var f in o){var d=o[f];c[f]=d.getVisibleCoordinates(),p[f]=c[f].slice().reverse(),h[f]=d.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(var m=0;m<n.length;m++)if(this.style._layers[n[m]].is3D()){this.opaquePassCutoff=m;break}this.renderPass="offscreen";for(var y=0,g=n;y<g.length;y+=1){var _=this.style._layers[g[y]];if(_.hasOffscreenPass()&&!_.isHidden(this.transform.zoom)){var v=p[_.source];("custom"===_.type||v.length)&&this.renderLayer(this,o[_.source],_,v)}}for(this.context.bindFramebuffer.set(null),this.context.clear({color:r.showOverdrawInspector?t.Color.black:t.Color.transparent,depth:1}),this.clearStencil(),this._showOverdrawInspector=r.showOverdrawInspector,this.depthRangeFor3D=[0,1-(e._order.length+2)*this.numSublayers*this.depthEpsilon],this.renderPass="opaque",this.currentLayer=n.length-1;this.currentLayer>=0;this.currentLayer--){var x=this.style._layers[n[this.currentLayer]],b=o[x.source],w=c[x.source];this._renderTileClippingMasks(x,w),this.renderLayer(this,b,x,w)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer<n.length;this.currentLayer++){var S=this.style._layers[n[this.currentLayer]],T=o[S.source],I=("symbol"===S.type?h:p)[S.source];this._renderTileClippingMasks(S,c[S.source]),this.renderLayer(this,T,S,I)}this.options.showTileBoundaries&&(t.values(this.style._layers).forEach(function(t){t.source&&!t.isHidden(i.transform.zoom)&&(t.source!==(u&&u.id)&&(u=i.style.sourceCaches[t.source]),(!l||l.getSource().maxzoom<u.getSource().maxzoom)&&(l=u))}),l&&yi.debug(this,l,l.getVisibleCoordinates())),this.options.showPadding&&function(t){var e=t.transform.padding;hi(t,t.transform.height-(e.top||0),3,si),hi(t,e.bottom||0,3,li),fi(t,e.left||0,3,ui),fi(t,t.transform.width-(e.right||0),3,ci);var r=t.transform.centerPoint;!function(t,e,r,i){di(t,e-1,r-10,2,20,i),di(t,e-10,r-1,20,2,i)}(t,r.x,t.transform.height-r.y,pi)}(this),this.context.setDefault()},gi.prototype.renderLayer=function(t,e,r,i){r.isHidden(this.transform.zoom)||("background"===r.type||"custom"===r.type||i.length)&&(this.id=r.id,this.gpuTimingStart(r),yi[r.type](t,e,r,i,this.style.placement.variableOffsets),this.gpuTimingEnd())},gi.prototype.gpuTimingStart=function(t){if(this.options.gpuTiming){var e=this.context.extTimerQuery,r=this.gpuTimers[t.id];r||(r=this.gpuTimers[t.id]={calls:0,cpuTime:0,query:e.createQueryEXT()}),r.calls++,e.beginQueryEXT(e.TIME_ELAPSED_EXT,r.query)}},gi.prototype.gpuTimingEnd=function(){if(this.options.gpuTiming){var t=this.context.extTimerQuery;t.endQueryEXT(t.TIME_ELAPSED_EXT)}},gi.prototype.collectGpuTimers=function(){var t=this.gpuTimers;return this.gpuTimers={},t},gi.prototype.queryGpuTimers=function(t){var e={};for(var r in t){var i=t[r],n=this.context.extTimerQuery,o=n.getQueryObjectEXT(i.query,n.QUERY_RESULT_EXT)/1e6;n.deleteQueryEXT(i.query),e[r]=o}return e},gi.prototype.translatePosMatrix=function(e,r,i,n,o){if(!i[0]&&!i[1])return e;var a=o?"map"===n?this.transform.angle:0:"viewport"===n?-this.transform.angle:0;if(a){var s=Math.sin(a),l=Math.cos(a);i=[i[0]*l-i[1]*s,i[0]*s+i[1]*l]}var u=[o?i[0]:he(r,i[0],this.transform.zoom),o?i[1]:he(r,i[1],this.transform.zoom),0],c=new Float32Array(16);return t.translate(c,e,u),c},gi.prototype.saveTileTexture=function(t){var e=this._tileTextures[t.size[0]];e?e.push(t):this._tileTextures[t.size[0]]=[t]},gi.prototype.getTileTexture=function(t){var e=this._tileTextures[t];return e&&e.length>0?e.pop():null},gi.prototype.isPatternMissing=function(t){if(!t)return!1;if(!t.from||!t.to)return!0;var e=this.imageManager.getPattern(t.from.toString()),r=this.imageManager.getPattern(t.to.toString());return!e||!r},gi.prototype.useProgram=function(t,e){this.cache=this.cache||{};var r=""+t+(e?e.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[r]||(this.cache[r]=new xr(this.context,_r[t],e,Kr[t],this._showOverdrawInspector)),this.cache[r]},gi.prototype.setCustomLayerDefaults=function(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()},gi.prototype.setBaseState=function(){var t=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(t.FUNC_ADD)},gi.prototype.initDebugOverlayCanvas=function(){null==this.debugOverlayCanvas&&(this.debugOverlayCanvas=t.window.document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new t.Texture(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))},gi.prototype.destroy=function(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()};var _i=function(t,e){this.points=t,this.planes=e};_i.fromInvProjectionMatrix=function(e,r,i){var n=Math.pow(2,i),o=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map(function(r){return t.transformMat4([],r,e)}).map(function(e){return t.scale$1([],e,1/e[3]/r*n)}),a=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(function(e){var r=t.sub([],o[e[0]],o[e[1]]),i=t.sub([],o[e[2]],o[e[1]]),n=t.normalize([],t.cross([],r,i)),a=-t.dot(n,o[e[1]]);return n.concat(a)});return new _i(o,a)};var vi=function(e,r){this.min=e,this.max=r,this.center=t.scale$2([],t.add([],this.min,this.max),.5)};vi.prototype.quadrant=function(e){for(var r=[e%2==0,e<2],i=t.clone$2(this.min),n=t.clone$2(this.max),o=0;o<r.length;o++)i[o]=r[o]?this.min[o]:this.center[o],n[o]=r[o]?this.center[o]:this.max[o];return n[2]=this.max[2],new vi(i,n)},vi.prototype.distanceX=function(t){return Math.max(Math.min(this.max[0],t[0]),this.min[0])-t[0]},vi.prototype.distanceY=function(t){return Math.max(Math.min(this.max[1],t[1]),this.min[1])-t[1]},vi.prototype.intersects=function(e){for(var r=[[this.min[0],this.min[1],0,1],[this.max[0],this.min[1],0,1],[this.max[0],this.max[1],0,1],[this.min[0],this.max[1],0,1]],i=!0,n=0;n<e.planes.length;n++){for(var o=e.planes[n],a=0,s=0;s<r.length;s++)a+=t.dot$1(o,r[s])>=0;if(0===a)return 0;a!==r.length&&(i=!1)}if(i)return 2;for(var l=0;l<3;l++){for(var u=Number.MAX_VALUE,c=-Number.MAX_VALUE,p=0;p<e.points.length;p++){var h=e.points[p][l]-this.min[l];u=Math.min(u,h),c=Math.max(c,h)}if(c<0||u>this.max[l]-this.min[l])return 0}return 1};var xi=function(t,e,r,i){if(void 0===t&&(t=0),void 0===e&&(e=0),void 0===r&&(r=0),void 0===i&&(i=0),isNaN(t)||t<0||isNaN(e)||e<0||isNaN(r)||r<0||isNaN(i)||i<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=t,this.bottom=e,this.left=r,this.right=i};xi.prototype.interpolate=function(e,r,i){return null!=r.top&&null!=e.top&&(this.top=t.number(e.top,r.top,i)),null!=r.bottom&&null!=e.bottom&&(this.bottom=t.number(e.bottom,r.bottom,i)),null!=r.left&&null!=e.left&&(this.left=t.number(e.left,r.left,i)),null!=r.right&&null!=e.right&&(this.right=t.number(e.right,r.right,i)),this},xi.prototype.getCenter=function(e,r){var i=t.clamp((this.left+e-this.right)/2,0,e),n=t.clamp((this.top+r-this.bottom)/2,0,r);return new t.Point(i,n)},xi.prototype.equals=function(t){return this.top===t.top&&this.bottom===t.bottom&&this.left===t.left&&this.right===t.right},xi.prototype.clone=function(){return new xi(this.top,this.bottom,this.left,this.right)},xi.prototype.toJSON=function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}};var bi=function(e,r,i,n,o){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=void 0===o||o,this._minZoom=e||0,this._maxZoom=r||22,this._minPitch=null==i?0:i,this._maxPitch=null==n?60:n,this.setMaxBounds(),this.width=0,this.height=0,this._center=new t.LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new xi,this._posMatrixCache={},this._alignedPosMatrixCache={}},wi={minZoom:{configurable:!0},maxZoom:{configurable:!0},minPitch:{configurable:!0},maxPitch:{configurable:!0},renderWorldCopies:{configurable:!0},worldSize:{configurable:!0},centerOffset:{configurable:!0},size:{configurable:!0},bearing:{configurable:!0},pitch:{configurable:!0},fov:{configurable:!0},zoom:{configurable:!0},center:{configurable:!0},padding:{configurable:!0},centerPoint:{configurable:!0},unmodified:{configurable:!0},point:{configurable:!0}};bi.prototype.clone=function(){var t=new bi(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return t.tileSize=this.tileSize,t.latRange=this.latRange,t.width=this.width,t.height=this.height,t._center=this._center,t.zoom=this.zoom,t.angle=this.angle,t._fov=this._fov,t._pitch=this._pitch,t._unmodified=this._unmodified,t._edgeInsets=this._edgeInsets.clone(),t._calcMatrices(),t},wi.minZoom.get=function(){return this._minZoom},wi.minZoom.set=function(t){this._minZoom!==t&&(this._minZoom=t,this.zoom=Math.max(this.zoom,t))},wi.maxZoom.get=function(){return this._maxZoom},wi.maxZoom.set=function(t){this._maxZoom!==t&&(this._maxZoom=t,this.zoom=Math.min(this.zoom,t))},wi.minPitch.get=function(){return this._minPitch},wi.minPitch.set=function(t){this._minPitch!==t&&(this._minPitch=t,this.pitch=Math.max(this.pitch,t))},wi.maxPitch.get=function(){return this._maxPitch},wi.maxPitch.set=function(t){this._maxPitch!==t&&(this._maxPitch=t,this.pitch=Math.min(this.pitch,t))},wi.renderWorldCopies.get=function(){return this._renderWorldCopies},wi.renderWorldCopies.set=function(t){void 0===t?t=!0:null===t&&(t=!1),this._renderWorldCopies=t},wi.worldSize.get=function(){return this.tileSize*this.scale},wi.centerOffset.get=function(){return this.centerPoint._sub(this.size._div(2))},wi.size.get=function(){return new t.Point(this.width,this.height)},wi.bearing.get=function(){return-this.angle/Math.PI*180},wi.bearing.set=function(e){var r=-t.wrap(e,-180,180)*Math.PI/180;this.angle!==r&&(this._unmodified=!1,this.angle=r,this._calcMatrices(),this.rotationMatrix=t.create$2(),t.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},wi.pitch.get=function(){return this._pitch/Math.PI*180},wi.pitch.set=function(e){var r=t.clamp(e,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==r&&(this._unmodified=!1,this._pitch=r,this._calcMatrices())},wi.fov.get=function(){return this._fov/Math.PI*180},wi.fov.set=function(t){t=Math.max(.01,Math.min(60,t)),this._fov!==t&&(this._unmodified=!1,this._fov=t/180*Math.PI,this._calcMatrices())},wi.zoom.get=function(){return this._zoom},wi.zoom.set=function(t){var e=Math.min(Math.max(t,this.minZoom),this.maxZoom);this._zoom!==e&&(this._unmodified=!1,this._zoom=e,this.scale=this.zoomScale(e),this.tileZoom=Math.floor(e),this.zoomFraction=e-this.tileZoom,this._constrain(),this._calcMatrices())},wi.center.get=function(){return this._center},wi.center.set=function(t){t.lat===this._center.lat&&t.lng===this._center.lng||(this._unmodified=!1,this._center=t,this._constrain(),this._calcMatrices())},wi.padding.get=function(){return this._edgeInsets.toJSON()},wi.padding.set=function(t){this._edgeInsets.equals(t)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,t,1),this._calcMatrices())},wi.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)},bi.prototype.isPaddingEqual=function(t){return this._edgeInsets.equals(t)},bi.prototype.interpolatePadding=function(t,e,r){this._unmodified=!1,this._edgeInsets.interpolate(t,e,r),this._constrain(),this._calcMatrices()},bi.prototype.coveringZoomLevel=function(t){var e=(t.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/t.tileSize));return Math.max(0,e)},bi.prototype.getVisibleUnwrappedCoordinates=function(e){var r=[new t.UnwrappedTileID(0,e)];if(this._renderWorldCopies)for(var i=this.pointCoordinate(new t.Point(0,0)),n=this.pointCoordinate(new t.Point(this.width,0)),o=this.pointCoordinate(new t.Point(this.width,this.height)),a=this.pointCoordinate(new t.Point(0,this.height)),s=Math.floor(Math.min(i.x,n.x,o.x,a.x)),l=Math.floor(Math.max(i.x,n.x,o.x,a.x)),u=s-1;u<=l+1;u++)0!==u&&r.push(new t.UnwrappedTileID(u,e));return r},bi.prototype.coveringTiles=function(e){var r=this.coveringZoomLevel(e),i=r;if(void 0!==e.minzoom&&r<e.minzoom)return[];void 0!==e.maxzoom&&r>e.maxzoom&&(r=e.maxzoom);var n=t.MercatorCoordinate.fromLngLat(this.center),o=Math.pow(2,r),a=[o*n.x,o*n.y,0],s=_i.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,r),l=e.minzoom||0;this.pitch<=60&&this._edgeInsets.top<.1&&(l=r);var u=function(t){return{aabb:new vi([t*o,0,0],[(t+1)*o,o,0]),zoom:0,x:0,y:0,wrap:t,fullyVisible:!1}},c=[],p=[],h=r,f=e.reparseOverscaled?i:r;if(this._renderWorldCopies)for(var d=1;d<=3;d++)c.push(u(-d)),c.push(u(d));for(c.push(u(0));c.length>0;){var m=c.pop(),y=m.x,g=m.y,_=m.fullyVisible;if(!_){var v=m.aabb.intersects(s);if(0===v)continue;_=2===v}var x=m.aabb.distanceX(a),b=m.aabb.distanceY(a),w=Math.max(Math.abs(x),Math.abs(b));if(m.zoom===h||w>3+(1<<h-m.zoom)-2&&m.zoom>=l)p.push({tileID:new t.OverscaledTileID(m.zoom===h?f:m.zoom,m.wrap,m.zoom,y,g),distanceSq:t.sqrLen([a[0]-.5-y,a[1]-.5-g])});else for(var S=0;S<4;S++){var T=(y<<1)+S%2,I=(g<<1)+(S>>1);c.push({aabb:m.aabb.quadrant(S),zoom:m.zoom+1,x:T,y:I,wrap:m.wrap,fullyVisible:_})}}return p.sort(function(t,e){return t.distanceSq-e.distanceSq}).map(function(t){return t.tileID})},bi.prototype.resize=function(t,e){this.width=t,this.height=e,this.pixelsToGLUnits=[2/t,-2/e],this._constrain(),this._calcMatrices()},wi.unmodified.get=function(){return this._unmodified},bi.prototype.zoomScale=function(t){return Math.pow(2,t)},bi.prototype.scaleZoom=function(t){return Math.log(t)/Math.LN2},bi.prototype.project=function(e){var r=t.clamp(e.lat,-this.maxValidLatitude,this.maxValidLatitude);return new t.Point(t.mercatorXfromLng(e.lng)*this.worldSize,t.mercatorYfromLat(r)*this.worldSize)},bi.prototype.unproject=function(e){return new t.MercatorCoordinate(e.x/this.worldSize,e.y/this.worldSize).toLngLat()},wi.point.get=function(){return this.project(this.center)},bi.prototype.setLocationAtPoint=function(e,r){var i=this.pointCoordinate(r),n=this.pointCoordinate(this.centerPoint),o=this.locationCoordinate(e),a=new t.MercatorCoordinate(o.x-(i.x-n.x),o.y-(i.y-n.y));this.center=this.coordinateLocation(a),this._renderWorldCopies&&(this.center=this.center.wrap())},bi.prototype.locationPoint=function(t){return this.coordinatePoint(this.locationCoordinate(t))},bi.prototype.pointLocation=function(t){return this.coordinateLocation(this.pointCoordinate(t))},bi.prototype.locationCoordinate=function(e){return t.MercatorCoordinate.fromLngLat(e)},bi.prototype.coordinateLocation=function(t){return t.toLngLat()},bi.prototype.pointCoordinate=function(e){var r=[e.x,e.y,0,1],i=[e.x,e.y,1,1];t.transformMat4(r,r,this.pixelMatrixInverse),t.transformMat4(i,i,this.pixelMatrixInverse);var n=r[3],o=i[3],a=r[1]/n,s=i[1]/o,l=r[2]/n,u=i[2]/o,c=l===u?0:(0-l)/(u-l);return new t.MercatorCoordinate(t.number(r[0]/n,i[0]/o,c)/this.worldSize,t.number(a,s,c)/this.worldSize)},bi.prototype.coordinatePoint=function(e){var r=[e.x*this.worldSize,e.y*this.worldSize,0,1];return t.transformMat4(r,r,this.pixelMatrix),new t.Point(r[0]/r[3],r[1]/r[3])},bi.prototype.getBounds=function(){return(new t.LngLatBounds).extend(this.pointLocation(new t.Point(0,0))).extend(this.pointLocation(new t.Point(this.width,0))).extend(this.pointLocation(new t.Point(this.width,this.height))).extend(this.pointLocation(new t.Point(0,this.height)))},bi.prototype.getMaxBounds=function(){return this.latRange&&2===this.latRange.length&&this.lngRange&&2===this.lngRange.length?new t.LngLatBounds([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null},bi.prototype.setMaxBounds=function(t){t?(this.lngRange=[t.getWest(),t.getEast()],this.latRange=[t.getSouth(),t.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])},bi.prototype.calculatePosMatrix=function(e,r){void 0===r&&(r=!1);var i=e.key,n=r?this._alignedPosMatrixCache:this._posMatrixCache;if(n[i])return n[i];var o=e.canonical,a=this.worldSize/this.zoomScale(o.z),s=o.x+Math.pow(2,o.z)*e.wrap,l=t.identity(new Float64Array(16));return t.translate(l,l,[s*a,o.y*a,0]),t.scale(l,l,[a/t.EXTENT,a/t.EXTENT,1]),t.multiply(l,r?this.alignedProjMatrix:this.projMatrix,l),n[i]=new Float32Array(l),n[i]},bi.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},bi.prototype._constrain=function(){if(this.center&&this.width&&this.height&&!this._constraining){this._constraining=!0;var e,r,i,n,o=-90,a=90,s=-180,l=180,u=this.size,c=this._unmodified;if(this.latRange){var p=this.latRange;o=t.mercatorYfromLat(p[1])*this.worldSize,e=(a=t.mercatorYfromLat(p[0])*this.worldSize)-o<u.y?u.y/(a-o):0}if(this.lngRange){var h=this.lngRange;s=t.mercatorXfromLng(h[0])*this.worldSize,r=(l=t.mercatorXfromLng(h[1])*this.worldSize)-s<u.x?u.x/(l-s):0}var f=this.point,d=Math.max(r||0,e||0);if(d)return this.center=this.unproject(new t.Point(r?(l+s)/2:f.x,e?(a+o)/2:f.y)),this.zoom+=this.scaleZoom(d),this._unmodified=c,void(this._constraining=!1);if(this.latRange){var m=f.y,y=u.y/2;m-y<o&&(n=o+y),m+y>a&&(n=a-y)}if(this.lngRange){var g=f.x,_=u.x/2;g-_<s&&(i=s+_),g+_>l&&(i=l-_)}void 0===i&&void 0===n||(this.center=this.unproject(new t.Point(void 0!==i?i:f.x,void 0!==n?n:f.y))),this._unmodified=c,this._constraining=!1}},bi.prototype._calcMatrices=function(){if(this.height){var e=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height;var r=Math.PI/2+this._pitch,i=this._fov*(.5+e.y/this.height),n=Math.sin(i)*this.cameraToCenterDistance/Math.sin(t.clamp(Math.PI-r-i,.01,Math.PI-.01)),o=this.point,a=o.x,s=o.y,l=1.01*(Math.cos(Math.PI/2-this._pitch)*n+this.cameraToCenterDistance),u=this.height/50,c=new Float64Array(16);t.perspective(c,this._fov,this.width/this.height,u,l),c[8]=2*-e.x/this.width,c[9]=2*e.y/this.height,t.scale(c,c,[1,-1,1]),t.translate(c,c,[0,0,-this.cameraToCenterDistance]),t.rotateX(c,c,this._pitch),t.rotateZ(c,c,this.angle),t.translate(c,c,[-a,-s,0]),this.mercatorMatrix=t.scale([],c,[this.worldSize,this.worldSize,this.worldSize]),t.scale(c,c,[1,1,t.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=c,this.invProjMatrix=t.invert([],this.projMatrix);var p=this.width%2/2,h=this.height%2/2,f=Math.cos(this.angle),d=Math.sin(this.angle),m=a-Math.round(a)+f*p+d*h,y=s-Math.round(s)+f*h+d*p,g=new Float64Array(c);if(t.translate(g,g,[m>.5?m-1:m,y>.5?y-1:y,0]),this.alignedProjMatrix=g,c=t.create(),t.scale(c,c,[this.width/2,-this.height/2,1]),t.translate(c,c,[1,-1,0]),this.labelPlaneMatrix=c,c=t.create(),t.scale(c,c,[1,-1,1]),t.translate(c,c,[-1,-1,0]),t.scale(c,c,[2/this.width,2/this.height,1]),this.glCoordMatrix=c,this.pixelMatrix=t.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),!(c=t.invert(new Float64Array(16),this.pixelMatrix)))throw new Error("failed to invert matrix");this.pixelMatrixInverse=c,this._posMatrixCache={},this._alignedPosMatrixCache={}}},bi.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var e=this.pointCoordinate(new t.Point(0,0)),r=[e.x*this.worldSize,e.y*this.worldSize,0,1];return t.transformMat4(r,r,this.pixelMatrix)[3]/this.cameraToCenterDistance},bi.prototype.getCameraPoint=function(){var e=Math.tan(this._pitch)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new t.Point(0,e))},bi.prototype.getCameraQueryGeometry=function(e){var r=this.getCameraPoint();if(1===e.length)return[e[0],r];for(var i=r.x,n=r.y,o=r.x,a=r.y,s=0,l=e;s<l.length;s+=1){var u=l[s];i=Math.min(i,u.x),n=Math.min(n,u.y),o=Math.max(o,u.x),a=Math.max(a,u.y)}return[new t.Point(i,n),new t.Point(o,n),new t.Point(o,a),new t.Point(i,a),new t.Point(i,n)]},Object.defineProperties(bi.prototype,wi);var Si=function(e){var r,i,n,o;this._hashName=e&&encodeURIComponent(e),t.bindAll(["_getCurrentHash","_onHashChange","_updateHash"],this),this._updateHash=(r=this._updateHashUnthrottled.bind(this),i=!1,n=null,o=function(){n=null,i&&(r(),n=setTimeout(o,300),i=!1)},function(){return i=!0,n||o(),n})};Si.prototype.addTo=function(e){return this._map=e,t.window.addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this},Si.prototype.remove=function(){return t.window.removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),delete this._map,this},Si.prototype.getHashString=function(e){var r=this._map.getCenter(),i=Math.round(100*this._map.getZoom())/100,n=Math.ceil((i*Math.LN2+Math.log(512/360/.5))/Math.LN10),o=Math.pow(10,n),a=Math.round(r.lng*o)/o,s=Math.round(r.lat*o)/o,l=this._map.getBearing(),u=this._map.getPitch(),c="";if(c+=e?"/"+a+"/"+s+"/"+i:i+"/"+s+"/"+a,(l||u)&&(c+="/"+Math.round(10*l)/10),u&&(c+="/"+Math.round(u)),this._hashName){var p=this._hashName,h=!1,f=t.window.location.hash.slice(1).split("&").map(function(t){var e=t.split("=")[0];return e===p?(h=!0,e+"="+c):t}).filter(function(t){return t});return h||f.push(p+"="+c),"#"+f.join("&")}return"#"+c},Si.prototype._getCurrentHash=function(){var e,r=this,i=t.window.location.hash.replace("#","");return this._hashName?(i.split("&").map(function(t){return t.split("=")}).forEach(function(t){t[0]===r._hashName&&(e=t)}),(e&&e[1]||"").split("/")):i.split("/")},Si.prototype._onHashChange=function(){var t=this._getCurrentHash();if(t.length>=3&&!t.some(function(t){return isNaN(t)})){var e=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(t[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+t[2],+t[1]],zoom:+t[0],bearing:e,pitch:+(t[4]||0)}),!0}return!1},Si.prototype._updateHashUnthrottled=function(){var e=this.getHashString();try{t.window.history.replaceState(t.window.history.state,"",e)}catch(t){}};var Ti={linearity:.3,easing:t.bezier(0,0,.3,1)},Ii=t.extend({deceleration:2500,maxSpeed:1400},Ti),Ei=t.extend({deceleration:20,maxSpeed:1400},Ti),Ai=t.extend({deceleration:1e3,maxSpeed:360},Ti),zi=t.extend({deceleration:1e3,maxSpeed:90},Ti),Pi=function(t){this._map=t,this.clear()};function Ci(t,e){(!t.duration||t.duration<e.duration)&&(t.duration=e.duration,t.easing=e.easing)}function ki(e,r,i){var n=i.maxSpeed,o=i.linearity,a=i.deceleration,s=t.clamp(e*o/(r/1e3),-n,n),l=Math.abs(s)/(a*o);return{easing:i.easing,duration:1e3*l,amount:s*(l/2)}}Pi.prototype.clear=function(){this._inertiaBuffer=[]},Pi.prototype.record=function(e){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:t.browser.now(),settings:e})},Pi.prototype._drainInertiaBuffer=function(){for(var e=this._inertiaBuffer,r=t.browser.now();e.length>0&&r-e[0].time>160;)e.shift()},Pi.prototype._onMoveEnd=function(e){if(this._drainInertiaBuffer(),!(this._inertiaBuffer.length<2)){for(var r={zoom:0,bearing:0,pitch:0,pan:new t.Point(0,0),pinchAround:void 0,around:void 0},i=0,n=this._inertiaBuffer;i<n.length;i+=1){var o=n[i].settings;r.zoom+=o.zoomDelta||0,r.bearing+=o.bearingDelta||0,r.pitch+=o.pitchDelta||0,o.panDelta&&r.pan._add(o.panDelta),o.around&&(r.around=o.around),o.pinchAround&&(r.pinchAround=o.pinchAround)}var a=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,s={};if(r.pan.mag()){var l=ki(r.pan.mag(),a,t.extend({},Ii,e||{}));s.offset=r.pan.mult(l.amount/r.pan.mag()),s.center=this._map.transform.center,Ci(s,l)}if(r.zoom){var u=ki(r.zoom,a,Ei);s.zoom=this._map.transform.zoom+u.amount,Ci(s,u)}if(r.bearing){var c=ki(r.bearing,a,Ai);s.bearing=this._map.transform.bearing+t.clamp(c.amount,-179,179),Ci(s,c)}if(r.pitch){var p=ki(r.pitch,a,zi);s.pitch=this._map.transform.pitch+p.amount,Ci(s,p)}if(s.zoom||s.bearing){var h=void 0===r.pinchAround?r.around:r.pinchAround;s.around=h?this._map.unproject(h):this._map.getCenter()}return this.clear(),t.extend(s,{noMoveStart:!0})}};var Mi=function(e){function i(i,n,o,a){void 0===a&&(a={});var s=r.mousePos(n.getCanvasContainer(),o),l=n.unproject(s);e.call(this,i,t.extend({point:s,lngLat:l,originalEvent:o},a)),this._defaultPrevented=!1,this.target=n}e&&(i.__proto__=e),(i.prototype=Object.create(e&&e.prototype)).constructor=i;var n={defaultPrevented:{configurable:!0}};return i.prototype.preventDefault=function(){this._defaultPrevented=!0},n.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(i.prototype,n),i}(t.Event),Di=function(e){function i(i,n,o){var a="touchend"===i?o.changedTouches:o.touches,s=r.touchPos(n.getCanvasContainer(),a),l=s.map(function(t){return n.unproject(t)}),u=s.reduce(function(t,e,r,i){return t.add(e.div(i.length))},new t.Point(0,0)),c=n.unproject(u);e.call(this,i,{points:s,point:u,lngLats:l,lngLat:c,originalEvent:o}),this._defaultPrevented=!1}e&&(i.__proto__=e),(i.prototype=Object.create(e&&e.prototype)).constructor=i;var n={defaultPrevented:{configurable:!0}};return i.prototype.preventDefault=function(){this._defaultPrevented=!0},n.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(i.prototype,n),i}(t.Event),Li=function(t){function e(e,r,i){t.call(this,e,{originalEvent:i}),this._defaultPrevented=!1}t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e;var r={defaultPrevented:{configurable:!0}};return e.prototype.preventDefault=function(){this._defaultPrevented=!0},r.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(e.prototype,r),e}(t.Event),Bi=function(t,e){this._map=t,this._clickTolerance=e.clickTolerance};Bi.prototype.reset=function(){delete this._mousedownPos},Bi.prototype.wheel=function(t){return this._firePreventable(new Li(t.type,this._map,t))},Bi.prototype.mousedown=function(t,e){return this._mousedownPos=e,this._firePreventable(new Mi(t.type,this._map,t))},Bi.prototype.mouseup=function(t){this._map.fire(new Mi(t.type,this._map,t))},Bi.prototype.click=function(t,e){this._mousedownPos&&this._mousedownPos.dist(e)>=this._clickTolerance||this._map.fire(new Mi(t.type,this._map,t))},Bi.prototype.dblclick=function(t){return this._firePreventable(new Mi(t.type,this._map,t))},Bi.prototype.mouseover=function(t){this._map.fire(new Mi(t.type,this._map,t))},Bi.prototype.mouseout=function(t){this._map.fire(new Mi(t.type,this._map,t))},Bi.prototype.touchstart=function(t){return this._firePreventable(new Di(t.type,this._map,t))},Bi.prototype.touchmove=function(t){this._map.fire(new Di(t.type,this._map,t))},Bi.prototype.touchend=function(t){this._map.fire(new Di(t.type,this._map,t))},Bi.prototype.touchcancel=function(t){this._map.fire(new Di(t.type,this._map,t))},Bi.prototype._firePreventable=function(t){if(this._map.fire(t),t.defaultPrevented)return{}},Bi.prototype.isEnabled=function(){return!0},Bi.prototype.isActive=function(){return!1},Bi.prototype.enable=function(){},Bi.prototype.disable=function(){};var Ri=function(t){this._map=t};Ri.prototype.reset=function(){this._delayContextMenu=!1,delete this._contextMenuEvent},Ri.prototype.mousemove=function(t){this._map.fire(new Mi(t.type,this._map,t))},Ri.prototype.mousedown=function(){this._delayContextMenu=!0},Ri.prototype.mouseup=function(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Mi("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)},Ri.prototype.contextmenu=function(t){this._delayContextMenu?this._contextMenuEvent=t:this._map.fire(new Mi(t.type,this._map,t)),this._map.listens("contextmenu")&&t.preventDefault()},Ri.prototype.isEnabled=function(){return!0},Ri.prototype.isActive=function(){return!1},Ri.prototype.enable=function(){},Ri.prototype.disable=function(){};var Fi=function(t,e){this._map=t,this._el=t.getCanvasContainer(),this._container=t.getContainer(),this._clickTolerance=e.clickTolerance||1};function Oi(t,e){for(var r={},i=0;i<t.length;i++)r[t[i].identifier]=e[i];return r}Fi.prototype.isEnabled=function(){return!!this._enabled},Fi.prototype.isActive=function(){return!!this._active},Fi.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},Fi.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},Fi.prototype.mousedown=function(t,e){this.isEnabled()&&t.shiftKey&&0===t.button&&(r.disableDrag(),this._startPos=this._lastPos=e,this._active=!0)},Fi.prototype.mousemoveWindow=function(t,e){if(this._active){var i=e;if(!(this._lastPos.equals(i)||!this._box&&i.dist(this._startPos)<this._clickTolerance)){var n=this._startPos;this._lastPos=i,this._box||(this._box=r.create("div","mapboxgl-boxzoom",this._container),this._container.classList.add("mapboxgl-crosshair"),this._fireEvent("boxzoomstart",t));var o=Math.min(n.x,i.x),a=Math.max(n.x,i.x),s=Math.min(n.y,i.y),l=Math.max(n.y,i.y);r.setTransform(this._box,"translate("+o+"px,"+s+"px)"),this._box.style.width=a-o+"px",this._box.style.height=l-s+"px"}}},Fi.prototype.mouseupWindow=function(e,i){var n=this;if(this._active&&0===e.button){var o=this._startPos,a=i;if(this.reset(),r.suppressClick(),o.x!==a.x||o.y!==a.y)return this._map.fire(new t.Event("boxzoomend",{originalEvent:e})),{cameraAnimation:function(t){return t.fitScreenCoordinates(o,a,n._map.getBearing(),{linear:!0})}};this._fireEvent("boxzoomcancel",e)}},Fi.prototype.keydown=function(t){this._active&&27===t.keyCode&&(this.reset(),this._fireEvent("boxzoomcancel",t))},Fi.prototype.reset=function(){this._active=!1,this._container.classList.remove("mapboxgl-crosshair"),this._box&&(r.remove(this._box),this._box=null),r.enableDrag(),delete this._startPos,delete this._lastPos},Fi.prototype._fireEvent=function(e,r){return this._map.fire(new t.Event(e,{originalEvent:r}))};var Ui=function(t){this.reset(),this.numTouches=t.numTouches};Ui.prototype.reset=function(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1},Ui.prototype.touchstart=function(e,r,i){(this.centroid||i.length>this.numTouches)&&(this.aborted=!0),this.aborted||(void 0===this.startTime&&(this.startTime=e.timeStamp),i.length===this.numTouches&&(this.centroid=function(e){for(var r=new t.Point(0,0),i=0,n=e;i<n.length;i+=1)r._add(n[i]);return r.div(e.length)}(r),this.touches=Oi(i,r)))},Ui.prototype.touchmove=function(t,e,r){if(!this.aborted&&this.centroid){var i=Oi(r,e);for(var n in this.touches){var o=i[n];(!o||o.dist(this.touches[n])>30)&&(this.aborted=!0)}}},Ui.prototype.touchend=function(t,e,r){if((!this.centroid||t.timeStamp-this.startTime>500)&&(this.aborted=!0),0===r.length){var i=!this.aborted&&this.centroid;if(this.reset(),i)return i}};var Vi=function(t){this.singleTap=new Ui(t),this.numTaps=t.numTaps,this.reset()};Vi.prototype.reset=function(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()},Vi.prototype.touchstart=function(t,e,r){this.singleTap.touchstart(t,e,r)},Vi.prototype.touchmove=function(t,e,r){this.singleTap.touchmove(t,e,r)},Vi.prototype.touchend=function(t,e,r){var i=this.singleTap.touchend(t,e,r);if(i){var n=t.timeStamp-this.lastTime<500,o=!this.lastTap||this.lastTap.dist(i)<30;if(n&&o||this.reset(),this.count++,this.lastTime=t.timeStamp,this.lastTap=i,this.count===this.numTaps)return this.reset(),i}};var Ni=function(){this._zoomIn=new Vi({numTouches:1,numTaps:2}),this._zoomOut=new Vi({numTouches:2,numTaps:1}),this.reset()};Ni.prototype.reset=function(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()},Ni.prototype.touchstart=function(t,e,r){this._zoomIn.touchstart(t,e,r),this._zoomOut.touchstart(t,e,r)},Ni.prototype.touchmove=function(t,e,r){this._zoomIn.touchmove(t,e,r),this._zoomOut.touchmove(t,e,r)},Ni.prototype.touchend=function(t,e,r){var i=this,n=this._zoomIn.touchend(t,e,r),o=this._zoomOut.touchend(t,e,r);return n?(this._active=!0,t.preventDefault(),setTimeout(function(){return i.reset()},0),{cameraAnimation:function(e){return e.easeTo({duration:300,zoom:e.getZoom()+1,around:e.unproject(n)},{originalEvent:t})}}):o?(this._active=!0,t.preventDefault(),setTimeout(function(){return i.reset()},0),{cameraAnimation:function(e){return e.easeTo({duration:300,zoom:e.getZoom()-1,around:e.unproject(o)},{originalEvent:t})}}):void 0},Ni.prototype.touchcancel=function(){this.reset()},Ni.prototype.enable=function(){this._enabled=!0},Ni.prototype.disable=function(){this._enabled=!1,this.reset()},Ni.prototype.isEnabled=function(){return this._enabled},Ni.prototype.isActive=function(){return this._active};var ji=function(t){this.reset(),this._clickTolerance=t.clickTolerance||1};ji.prototype.reset=function(){this._active=!1,this._moved=!1,delete this._lastPoint,delete this._eventButton},ji.prototype._correctButton=function(t,e){return!1},ji.prototype._move=function(t,e){return{}},ji.prototype.mousedown=function(t,e){if(!this._lastPoint){var i=r.mouseButton(t);this._correctButton(t,i)&&(this._lastPoint=e,this._eventButton=i)}},ji.prototype.mousemoveWindow=function(t,e){var r=this._lastPoint;if(r&&(t.preventDefault(),this._moved||!(e.dist(r)<this._clickTolerance)))return this._moved=!0,this._lastPoint=e,this._move(r,e)},ji.prototype.mouseupWindow=function(t){r.mouseButton(t)===this._eventButton&&(this._moved&&r.suppressClick(),this.reset())},ji.prototype.enable=function(){this._enabled=!0},ji.prototype.disable=function(){this._enabled=!1,this.reset()},ji.prototype.isEnabled=function(){return this._enabled},ji.prototype.isActive=function(){return this._active};var qi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.mousedown=function(e,r){t.prototype.mousedown.call(this,e,r),this._lastPoint&&(this._active=!0)},e.prototype._correctButton=function(t,e){return 0===e&&!t.ctrlKey},e.prototype._move=function(t,e){return{around:e,panDelta:e.sub(t)}},e}(ji),Zi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._correctButton=function(t,e){return 0===e&&t.ctrlKey||2===e},e.prototype._move=function(t,e){var r=.8*(e.x-t.x);if(r)return this._active=!0,{bearingDelta:r}},e.prototype.contextmenu=function(t){t.preventDefault()},e}(ji),Gi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype._correctButton=function(t,e){return 0===e&&t.ctrlKey||2===e},e.prototype._move=function(t,e){var r=-.5*(e.y-t.y);if(r)return this._active=!0,{pitchDelta:r}},e.prototype.contextmenu=function(t){t.preventDefault()},e}(ji),Xi=function(t){this._minTouches=1,this._clickTolerance=t.clickTolerance||1,this.reset()};Xi.prototype.reset=function(){this._active=!1,this._touches={},this._sum=new t.Point(0,0)},Xi.prototype.touchstart=function(t,e,r){return this._calculateTransform(t,e,r)},Xi.prototype.touchmove=function(t,e,r){if(this._active)return t.preventDefault(),this._calculateTransform(t,e,r)},Xi.prototype.touchend=function(t,e,r){this._calculateTransform(t,e,r),this._active&&r.length<this._minTouches&&this.reset()},Xi.prototype.touchcancel=function(){this.reset()},Xi.prototype._calculateTransform=function(e,r,i){i.length>0&&(this._active=!0);var n=Oi(i,r),o=new t.Point(0,0),a=new t.Point(0,0),s=0;for(var l in n){var u=n[l],c=this._touches[l];c&&(o._add(u),a._add(u.sub(c)),s++,n[l]=u)}if(this._touches=n,!(s<this._minTouches)&&a.mag()){var p=a.div(s);if(this._sum._add(p),!(this._sum.mag()<this._clickTolerance))return{around:o.div(s),panDelta:p}}},Xi.prototype.enable=function(){this._enabled=!0},Xi.prototype.disable=function(){this._enabled=!1,this.reset()},Xi.prototype.isEnabled=function(){return this._enabled},Xi.prototype.isActive=function(){return this._active};var Wi=function(){this.reset()};function Ki(t,e,r){for(var i=0;i<t.length;i++)if(t[i].identifier===r)return e[i]}function Hi(t,e){return Math.log(t/e)/Math.LN2}Wi.prototype.reset=function(){this._active=!1,delete this._firstTwoTouches},Wi.prototype._start=function(t){},Wi.prototype._move=function(t,e,r){return{}},Wi.prototype.touchstart=function(t,e,r){this._firstTwoTouches||r.length<2||(this._firstTwoTouches=[r[0].identifier,r[1].identifier],this._start([e[0],e[1]]))},Wi.prototype.touchmove=function(t,e,r){if(this._firstTwoTouches){t.preventDefault();var i=this._firstTwoTouches,n=i[1],o=Ki(r,e,i[0]),a=Ki(r,e,n);if(o&&a){var s=this._aroundCenter?null:o.add(a).div(2);return this._move([o,a],s,t)}}},Wi.prototype.touchend=function(t,e,i){if(this._firstTwoTouches){var n=this._firstTwoTouches,o=n[1],a=Ki(i,e,n[0]),s=Ki(i,e,o);a&&s||(this._active&&r.suppressClick(),this.reset())}},Wi.prototype.touchcancel=function(){this.reset()},Wi.prototype.enable=function(t){this._enabled=!0,this._aroundCenter=!!t&&"center"===t.around},Wi.prototype.disable=function(){this._enabled=!1,this.reset()},Wi.prototype.isEnabled=function(){return this._enabled},Wi.prototype.isActive=function(){return this._active};var Ji=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.reset=function(){t.prototype.reset.call(this),delete this._distance,delete this._startDistance},e.prototype._start=function(t){this._startDistance=this._distance=t[0].dist(t[1])},e.prototype._move=function(t,e){var r=this._distance;if(this._distance=t[0].dist(t[1]),this._active||!(Math.abs(Hi(this._distance,this._startDistance))<.1))return this._active=!0,{zoomDelta:Hi(this._distance,r),pinchAround:e}},e}(Wi);function Yi(t,e){return 180*t.angleWith(e)/Math.PI}var Qi=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.reset=function(){t.prototype.reset.call(this),delete this._minDiameter,delete this._startVector,delete this._vector},e.prototype._start=function(t){this._startVector=this._vector=t[0].sub(t[1]),this._minDiameter=t[0].dist(t[1])},e.prototype._move=function(t,e){var r=this._vector;if(this._vector=t[0].sub(t[1]),this._active||!this._isBelowThreshold(this._vector))return this._active=!0,{bearingDelta:Yi(this._vector,r),pinchAround:e}},e.prototype._isBelowThreshold=function(t){this._minDiameter=Math.min(this._minDiameter,t.mag());var e=25/(Math.PI*this._minDiameter)*360,r=Yi(t,this._startVector);return Math.abs(r)<e},e}(Wi);function $i(t){return Math.abs(t.y)>Math.abs(t.x)}var tn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e.prototype.reset=function(){t.prototype.reset.call(this),this._valid=void 0,delete this._firstMove,delete this._lastPoints},e.prototype._start=function(t){this._lastPoints=t,$i(t[0].sub(t[1]))&&(this._valid=!1)},e.prototype._move=function(t,e,r){var i=t[0].sub(this._lastPoints[0]),n=t[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically(i,n,r.timeStamp),this._valid)return this._lastPoints=t,this._active=!0,{pitchDelta:(i.y+n.y)/2*-.5}},e.prototype.gestureBeginsVertically=function(t,e,r){if(void 0!==this._valid)return this._valid;var i=t.mag()>=2,n=e.mag()>=2;if(i||n){if(!i||!n)return void 0===this._firstMove&&(this._firstMove=r),r-this._firstMove<100&&void 0;var o=t.y>0==e.y>0;return $i(t)&&$i(e)&&o}},e}(Wi),en={panStep:100,bearingStep:15,pitchStep:10},rn=function(){var t=en;this._panStep=t.panStep,this._bearingStep=t.bearingStep,this._pitchStep=t.pitchStep};function nn(t){return t*(2-t)}rn.prototype.reset=function(){this._active=!1},rn.prototype.keydown=function(t){var e=this;if(!(t.altKey||t.ctrlKey||t.metaKey)){var r=0,i=0,n=0,o=0,a=0;switch(t.keyCode){case 61:case 107:case 171:case 187:r=1;break;case 189:case 109:case 173:r=-1;break;case 37:t.shiftKey?i=-1:(t.preventDefault(),o=-1);break;case 39:t.shiftKey?i=1:(t.preventDefault(),o=1);break;case 38:t.shiftKey?n=1:(t.preventDefault(),a=-1);break;case 40:t.shiftKey?n=-1:(t.preventDefault(),a=1);break;default:return}return{cameraAnimation:function(s){var l=s.getZoom();s.easeTo({duration:300,easeId:"keyboardHandler",easing:nn,zoom:r?Math.round(l)+r*(t.shiftKey?2:1):l,bearing:s.getBearing()+i*e._bearingStep,pitch:s.getPitch()+n*e._pitchStep,offset:[-o*e._panStep,-a*e._panStep],center:s.getCenter()},{originalEvent:t})}}}},rn.prototype.enable=function(){this._enabled=!0},rn.prototype.disable=function(){this._enabled=!1,this.reset()},rn.prototype.isEnabled=function(){return this._enabled},rn.prototype.isActive=function(){return this._active};var on=function(e,r){this._map=e,this._el=e.getCanvasContainer(),this._handler=r,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=1/450,t.bindAll(["_onWheel","_onTimeout","_onScrollFrame","_onScrollFinished"],this)};on.prototype.setZoomRate=function(t){this._defaultZoomRate=t},on.prototype.setWheelZoomRate=function(t){this._wheelZoomRate=t},on.prototype.isEnabled=function(){return!!this._enabled},on.prototype.isActive=function(){return!!this._active||void 0!==this._finishTimeout},on.prototype.isZooming=function(){return!!this._zooming},on.prototype.enable=function(t){this.isEnabled()||(this._enabled=!0,this._aroundCenter=t&&"center"===t.around)},on.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},on.prototype.wheel=function(e){if(this.isEnabled()){var r=e.deltaMode===t.window.WheelEvent.DOM_DELTA_LINE?40*e.deltaY:e.deltaY,i=t.browser.now(),n=i-(this._lastWheelEventTime||0);this._lastWheelEventTime=i,0!==r&&r%4.000244140625==0?this._type="wheel":0!==r&&Math.abs(r)<4?this._type="trackpad":n>400?(this._type=null,this._lastValue=r,this._timeout=setTimeout(this._onTimeout,40,e)):this._type||(this._type=Math.abs(n*r)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,r+=this._lastValue)),e.shiftKey&&r&&(r/=4),this._type&&(this._lastWheelEvent=e,this._delta-=r,this._active||this._start(e)),e.preventDefault()}},on.prototype._onTimeout=function(t){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(t)},on.prototype._start=function(e){if(this._delta){this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);var i=r.mousePos(this._el,e);this._around=t.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(i)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}},on.prototype.renderFrame=function(){return this._onScrollFrame()},on.prototype._onScrollFrame=function(){var e=this;if(this._frameId&&(this._frameId=null,this.isActive())){var r=this._map.transform;if(0!==this._delta){var i="wheel"===this._type&&Math.abs(this._delta)>4.000244140625?this._wheelZoomRate:this._defaultZoomRate,n=2/(1+Math.exp(-Math.abs(this._delta*i)));this._delta<0&&0!==n&&(n=1/n);var o="number"==typeof this._targetZoom?r.zoomScale(this._targetZoom):r.scale;this._targetZoom=Math.min(r.maxZoom,Math.max(r.minZoom,r.scaleZoom(o*n))),"wheel"===this._type&&(this._startZoom=r.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var a,s="number"==typeof this._targetZoom?this._targetZoom:r.zoom,l=this._startZoom,u=this._easing,c=!1;if("wheel"===this._type&&l&&u){var p=Math.min((t.browser.now()-this._lastWheelEventTime)/200,1),h=u(p);a=t.number(l,s,h),p<1?this._frameId||(this._frameId=!0):c=!0}else a=s,c=!0;return this._active=!0,c&&(this._active=!1,this._finishTimeout=setTimeout(function(){e._zooming=!1,e._handler._triggerRenderFrame(),delete e._targetZoom,delete e._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!c,zoomDelta:a-r.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}},on.prototype._smoothOutEasing=function(e){var r=t.ease;if(this._prevEase){var i=this._prevEase,n=(t.browser.now()-i.start)/i.duration,o=i.easing(n+.01)-i.easing(n),a=.27/Math.sqrt(o*o+1e-4)*.01,s=Math.sqrt(.0729-a*a);r=t.bezier(a,s,.25,1)}return this._prevEase={start:t.browser.now(),duration:e,easing:r},r},on.prototype.reset=function(){this._active=!1};var an=function(t,e){this._clickZoom=t,this._tapZoom=e};an.prototype.enable=function(){this._clickZoom.enable(),this._tapZoom.enable()},an.prototype.disable=function(){this._clickZoom.disable(),this._tapZoom.disable()},an.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()},an.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()};var sn=function(){this.reset()};sn.prototype.reset=function(){this._active=!1},sn.prototype.dblclick=function(t,e){return t.preventDefault(),{cameraAnimation:function(r){r.easeTo({duration:300,zoom:r.getZoom()+(t.shiftKey?-1:1),around:r.unproject(e)},{originalEvent:t})}}},sn.prototype.enable=function(){this._enabled=!0},sn.prototype.disable=function(){this._enabled=!1,this.reset()},sn.prototype.isEnabled=function(){return this._enabled},sn.prototype.isActive=function(){return this._active};var ln=function(){this._tap=new Vi({numTouches:1,numTaps:1}),this.reset()};ln.prototype.reset=function(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()},ln.prototype.touchstart=function(t,e,r){this._swipePoint||(this._tapTime&&t.timeStamp-this._tapTime>500&&this.reset(),this._tapTime?r.length>0&&(this._swipePoint=e[0],this._swipeTouch=r[0].identifier):this._tap.touchstart(t,e,r))},ln.prototype.touchmove=function(t,e,r){if(this._tapTime){if(this._swipePoint){if(r[0].identifier!==this._swipeTouch)return;var i=e[0],n=i.y-this._swipePoint.y;return this._swipePoint=i,t.preventDefault(),this._active=!0,{zoomDelta:n/128}}}else this._tap.touchmove(t,e,r)},ln.prototype.touchend=function(t,e,r){this._tapTime?this._swipePoint&&0===r.length&&this.reset():this._tap.touchend(t,e,r)&&(this._tapTime=t.timeStamp)},ln.prototype.touchcancel=function(){this.reset()},ln.prototype.enable=function(){this._enabled=!0},ln.prototype.disable=function(){this._enabled=!1,this.reset()},ln.prototype.isEnabled=function(){return this._enabled},ln.prototype.isActive=function(){return this._active};var un=function(t,e,r){this._el=t,this._mousePan=e,this._touchPan=r};un.prototype.enable=function(t){this._inertiaOptions=t||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("mapboxgl-touch-drag-pan")},un.prototype.disable=function(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("mapboxgl-touch-drag-pan")},un.prototype.isEnabled=function(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()},un.prototype.isActive=function(){return this._mousePan.isActive()||this._touchPan.isActive()};var cn=function(t,e,r){this._pitchWithRotate=t.pitchWithRotate,this._mouseRotate=e,this._mousePitch=r};cn.prototype.enable=function(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()},cn.prototype.disable=function(){this._mouseRotate.disable(),this._mousePitch.disable()},cn.prototype.isEnabled=function(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())},cn.prototype.isActive=function(){return this._mouseRotate.isActive()||this._mousePitch.isActive()};var pn=function(t,e,r,i){this._el=t,this._touchZoom=e,this._touchRotate=r,this._tapDragZoom=i,this._rotationDisabled=!1,this._enabled=!0};pn.prototype.enable=function(t){this._touchZoom.enable(t),this._rotationDisabled||this._touchRotate.enable(t),this._tapDragZoom.enable(),this._el.classList.add("mapboxgl-touch-zoom-rotate")},pn.prototype.disable=function(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("mapboxgl-touch-zoom-rotate")},pn.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()},pn.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()},pn.prototype.disableRotation=function(){this._rotationDisabled=!0,this._touchRotate.disable()},pn.prototype.enableRotation=function(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()};var hn=function(t){return t.zoom||t.drag||t.pitch||t.rotate},fn=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),(e.prototype=Object.create(t&&t.prototype)).constructor=e,e}(t.Event);function dn(t){return t.panDelta&&t.panDelta.mag()||t.zoomDelta||t.bearingDelta||t.pitchDelta}var mn=function(e,i){this._map=e,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Pi(e),this._bearingSnap=i.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(i),t.bindAll(["handleEvent","handleWindowEvent"],this);var n=this._el;this._listeners=[[n,"touchstart",{passive:!1}],[n,"touchmove",{passive:!1}],[n,"touchend",void 0],[n,"touchcancel",void 0],[n,"mousedown",void 0],[n,"mousemove",void 0],[n,"mouseup",void 0],[t.window.document,"mousemove",{capture:!0}],[t.window.document,"mouseup",void 0],[n,"mouseover",void 0],[n,"mouseout",void 0],[n,"dblclick",void 0],[n,"click",void 0],[n,"keydown",{capture:!1}],[n,"keyup",void 0],[n,"wheel",{passive:!1}],[n,"contextmenu",void 0],[t.window,"blur",void 0]];for(var o=0,a=this._listeners;o<a.length;o+=1){var s=a[o],l=s[0];r.addEventListener(l,s[1],l===t.window.document?this.handleWindowEvent:this.handleEvent,s[2])}};mn.prototype.destroy=function(){for(var e=0,i=this._listeners;e<i.length;e+=1){var n=i[e],o=n[0];r.removeEventListener(o,n[1],o===t.window.document?this.handleWindowEvent:this.handleEvent,n[2])}},mn.prototype._addDefaultHandlers=function(t){var e=this._map,r=e.getCanvasContainer();this._add("mapEvent",new Bi(e,t));var i=e.boxZoom=new Fi(e,t);this._add("boxZoom",i);var n=new Ni,o=new sn;e.doubleClickZoom=new an(o,n),this._add("tapZoom",n),this._add("clickZoom",o);var a=new ln;this._add("tapDragZoom",a);var s=e.touchPitch=new tn;this._add("touchPitch",s);var l=new Zi(t),u=new Gi(t);e.dragRotate=new cn(t,l,u),this._add("mouseRotate",l,["mousePitch"]),this._add("mousePitch",u,["mouseRotate"]);var c=new qi(t),p=new Xi(t);e.dragPan=new un(r,c,p),this._add("mousePan",c),this._add("touchPan",p,["touchZoom","touchRotate"]);var h=new Qi,f=new Ji;e.touchZoomRotate=new pn(r,f,h,a),this._add("touchRotate",h,["touchPan","touchZoom"]),this._add("touchZoom",f,["touchPan","touchRotate"]);var d=e.scrollZoom=new on(e,this);this._add("scrollZoom",d,["mousePan"]);var m=e.keyboard=new rn;this._add("keyboard",m),this._add("blockableMapEvent",new Ri(e));for(var y=0,g=["boxZoom","doubleClickZoom","tapDragZoom","touchPitch","dragRotate","dragPan","touchZoomRotate","scrollZoom","keyboard"];y<g.length;y+=1){var _=g[y];t.interactive&&t[_]&&e[_].enable(t[_])}},mn.prototype._add=function(t,e,r){this._handlers.push({handlerName:t,handler:e,allowed:r}),this._handlersById[t]=e},mn.prototype.stop=function(){if(!this._updatingCamera){for(var t=0,e=this._handlers;t<e.length;t+=1)e[t].handler.reset();this._inertia.clear(),this._fireEvents({},{}),this._changes=[]}},mn.prototype.isActive=function(){for(var t=0,e=this._handlers;t<e.length;t+=1)if(e[t].handler.isActive())return!0;return!1},mn.prototype.isZooming=function(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()},mn.prototype.isRotating=function(){return!!this._eventsInProgress.rotate},mn.prototype.isMoving=function(){return Boolean(hn(this._eventsInProgress))||this.isZooming()},mn.prototype._blockedByActive=function(t,e,r){for(var i in t)if(i!==r&&(!e||e.indexOf(i)<0))return!0;return!1},mn.prototype.handleWindowEvent=function(t){this.handleEvent(t,t.type+"Window")},mn.prototype._getMapTouches=function(t){for(var e=[],r=0,i=t;r<i.length;r+=1){var n=i[r];this._el.contains(n.target)&&e.push(n)}return e},mn.prototype.handleEvent=function(t,e){if("blur"!==t.type){this._updatingCamera=!0;for(var i="renderFrame"===t.type?void 0:t,n={needsRenderFrame:!1},o={},a={},s=t.touches?this._getMapTouches(t.touches):void 0,l=s?r.touchPos(this._el,s):r.mousePos(this._el,t),u=0,c=this._handlers;u<c.length;u+=1){var p=c[u],h=p.handlerName,f=p.handler,d=p.allowed;if(f.isEnabled()){var m=void 0;this._blockedByActive(a,d,h)?f.reset():f[e||t.type]&&(m=f[e||t.type](t,l,s),this.mergeHandlerResult(n,o,m,h,i),m&&m.needsRenderFrame&&this._triggerRenderFrame()),(m||f.isActive())&&(a[h]=f)}}var y={};for(var g in this._previousActiveHandlers)a[g]||(y[g]=i);this._previousActiveHandlers=a,(Object.keys(y).length||dn(n))&&(this._changes.push([n,o,y]),this._triggerRenderFrame()),(Object.keys(a).length||dn(n))&&this._map._stop(!0),this._updatingCamera=!1;var _=n.cameraAnimation;_&&(this._inertia.clear(),this._fireEvents({},{}),this._changes=[],_(this._map))}else this.stop()},mn.prototype.mergeHandlerResult=function(e,r,i,n,o){if(i){t.extend(e,i);var a={handlerName:n,originalEvent:i.originalEvent||o};void 0!==i.zoomDelta&&(r.zoom=a),void 0!==i.panDelta&&(r.drag=a),void 0!==i.pitchDelta&&(r.pitch=a),void 0!==i.bearingDelta&&(r.rotate=a)}},mn.prototype._applyChanges=function(){for(var e={},r={},i={},n=0,o=this._changes;n<o.length;n+=1){var a=o[n],s=a[0],l=a[1],u=a[2];s.panDelta&&(e.panDelta=(e.panDelta||new t.Point(0,0))._add(s.panDelta)),s.zoomDelta&&(e.zoomDelta=(e.zoomDelta||0)+s.zoomDelta),s.bearingDelta&&(e.bearingDelta=(e.bearingDelta||0)+s.bearingDelta),s.pitchDelta&&(e.pitchDelta=(e.pitchDelta||0)+s.pitchDelta),void 0!==s.around&&(e.around=s.around),void 0!==s.pinchAround&&(e.pinchAround=s.pinchAround),s.noInertia&&(e.noInertia=s.noInertia),t.extend(r,l),t.extend(i,u)}this._updateMapTransform(e,r,i),this._changes=[]},mn.prototype._updateMapTransform=function(t,e,r){var i=this._map,n=i.transform;if(!dn(t))return this._fireEvents(e,r);var o=t.panDelta,a=t.zoomDelta,s=t.bearingDelta,l=t.pitchDelta,u=t.around,c=t.pinchAround;void 0!==c&&(u=c),i._stop(!0),u=u||i.transform.centerPoint;var p=n.pointLocation(o?u.sub(o):u);s&&(n.bearing+=s),l&&(n.pitch+=l),a&&(n.zoom+=a),n.setLocationAtPoint(p,u),this._map._update(),t.noInertia||this._inertia.record(t),this._fireEvents(e,r)},mn.prototype._fireEvents=function(e,r){var i=this,n=hn(this._eventsInProgress),o=hn(e),a={};for(var s in e)this._eventsInProgress[s]||(a[s+"start"]=e[s].originalEvent),this._eventsInProgress[s]=e[s];for(var l in!n&&o&&this._fireEvent("movestart",o.originalEvent),a)this._fireEvent(l,a[l]);for(var u in e.rotate&&(this._bearingChanged=!0),o&&this._fireEvent("move",o.originalEvent),e)this._fireEvent(u,e[u].originalEvent);var c,p={};for(var h in this._eventsInProgress){var f=this._eventsInProgress[h],d=f.handlerName,m=f.originalEvent;this._handlersById[d].isActive()||(delete this._eventsInProgress[h],p[h+"end"]=c=r[d]||m)}for(var y in p)this._fireEvent(y,p[y]);var g=hn(this._eventsInProgress);if((n||o)&&!g){this._updatingCamera=!0;var _=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),v=function(t){return 0!==t&&-i._bearingSnap<t&&t<i._bearingSnap};_?(v(_.bearing||this._map.getBearing())&&(_.bearing=0),this._map.easeTo(_,{originalEvent:c})):(this._map.fire(new t.Event("moveend",{originalEvent:c})),v(this._map.getBearing())&&this._map.resetNorth()),this._bearingChanged=!1,this._updatingCamera=!1}},mn.prototype._fireEvent=function(e,r){this._map.fire(new t.Event(e,r?{originalEvent:r}:{}))},mn.prototype._triggerRenderFrame=function(){var t=this;void 0===this._frameId&&(this._frameId=this._map._requestRenderFrame(function(e){delete t._frameId,t.handleEvent(new fn("renderFrame",{timeStamp:e})),t._applyChanges()}))};var yn=function(e){function r(r,i){e.call(this),this._moving=!1,this._zooming=!1,this.transform=r,this._bearingSnap=i.bearingSnap,t.bindAll(["_renderFrameCallback"],this)}return e&&(r.__proto__=e),(r.prototype=Object.create(e&&e.prototype)).constructor=r,r.prototype.getCenter=function(){return new t.LngLat(this.transform.center.lng,this.transform.center.lat)},r.prototype.setCenter=function(t,e){return this.jumpTo({center:t},e)},r.prototype.panBy=function(e,r,i){return e=t.Point.convert(e).mult(-1),this.panTo(this.transform.center,t.extend({offset:e},r),i)},r.prototype.panTo=function(e,r,i){return this.easeTo(t.extend({center:e},r),i)},r.prototype.getZoom=function(){return this.transform.zoom},r.prototype.setZoom=function(t,e){return this.jumpTo({zoom:t},e),this},r.prototype.zoomTo=function(e,r,i){return this.easeTo(t.extend({zoom:e},r),i)},r.prototype.zoomIn=function(t,e){return this.zoomTo(this.getZoom()+1,t,e),this},r.prototype.zoomOut=function(t,e){return this.zoomTo(this.getZoom()-1,t,e),this},r.prototype.getBearing=function(){return this.transform.bearing},r.prototype.setBearing=function(t,e){return this.jumpTo({bearing:t},e),this},r.prototype.getPadding=function(){return this.transform.padding},r.prototype.setPadding=function(t,e){return this.jumpTo({padding:t},e),this},r.prototype.rotateTo=function(e,r,i){return this.easeTo(t.extend({bearing:e},r),i)},r.prototype.resetNorth=function(e,r){return this.rotateTo(0,t.extend({duration:1e3},e),r),this},r.prototype.resetNorthPitch=function(e,r){return this.easeTo(t.extend({bearing:0,pitch:0,duration:1e3},e),r),this},r.prototype.snapToNorth=function(t,e){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(t,e):this},r.prototype.getPitch=function(){return this.transform.pitch},r.prototype.setPitch=function(t,e){return this.jumpTo({pitch:t},e),this},r.prototype.cameraForBounds=function(e,r){return e=t.LngLatBounds.convert(e),this._cameraForBoxAndBearing(e.getNorthWest(),e.getSouthEast(),0,r)},r.prototype._cameraForBoxAndBearing=function(e,r,i,n){var o={top:0,bottom:0,right:0,left:0};if("number"==typeof(n=t.extend({padding:o,offset:[0,0],maxZoom:this.transform.maxZoom},n)).padding){var a=n.padding;n.padding={top:a,bottom:a,right:a,left:a}}n.padding=t.extend(o,n.padding);var s=this.transform,l=s.padding,u=s.project(t.LngLat.convert(e)),c=s.project(t.LngLat.convert(r)),p=u.rotate(-i*Math.PI/180),h=c.rotate(-i*Math.PI/180),f=new t.Point(Math.max(p.x,h.x),Math.max(p.y,h.y)),d=new t.Point(Math.min(p.x,h.x),Math.min(p.y,h.y)),m=f.sub(d),y=(s.width-(l.left+l.right+n.padding.left+n.padding.right))/m.x,g=(s.height-(l.top+l.bottom+n.padding.top+n.padding.bottom))/m.y;if(!(g<0||y<0)){var _=Math.min(s.scaleZoom(s.scale*Math.min(y,g)),n.maxZoom),v=t.Point.convert(n.offset),x=new t.Point(v.x+(n.padding.left-n.padding.right)/2,v.y+(n.padding.top-n.padding.bottom)/2).mult(s.scale/s.zoomScale(_));return{center:s.unproject(u.add(c).div(2).sub(x)),zoom:_,bearing:i}}t.warnOnce("Map cannot fit within canvas with the given bounds, padding, and/or offset.")},r.prototype.fitBounds=function(t,e,r){return this._fitInternal(this.cameraForBounds(t,e),e,r)},r.prototype.fitScreenCoordinates=function(e,r,i,n,o){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.pointLocation(t.Point.convert(e)),this.transform.pointLocation(t.Point.convert(r)),i,n),n,o)},r.prototype._fitInternal=function(e,r,i){return e?(delete(r=t.extend(e,r)).padding,r.linear?this.easeTo(r,i):this.flyTo(r,i)):this},r.prototype.jumpTo=function(e,r){this.stop();var i=this.transform,n=!1,o=!1,a=!1;return"zoom"in e&&i.zoom!==+e.zoom&&(n=!0,i.zoom=+e.zoom),void 0!==e.center&&(i.center=t.LngLat.convert(e.center)),"bearing"in e&&i.bearing!==+e.bearing&&(o=!0,i.bearing=+e.bearing),"pitch"in e&&i.pitch!==+e.pitch&&(a=!0,i.pitch=+e.pitch),null==e.padding||i.isPaddingEqual(e.padding)||(i.padding=e.padding),this.fire(new t.Event("movestart",r)).fire(new t.Event("move",r)),n&&this.fire(new t.Event("zoomstart",r)).fire(new t.Event("zoom",r)).fire(new t.Event("zoomend",r)),o&&this.fire(new t.Event("rotatestart",r)).fire(new t.Event("rotate",r)).fire(new t.Event("rotateend",r)),a&&this.fire(new t.Event("pitchstart",r)).fire(new t.Event("pitch",r)).fire(new t.Event("pitchend",r)),this.fire(new t.Event("moveend",r))},r.prototype.easeTo=function(e,r){var i=this;this._stop(!1,e.easeId),(!1===(e=t.extend({offset:[0,0],duration:500,easing:t.ease},e)).animate||!e.essential&&t.browser.prefersReducedMotion)&&(e.duration=0);var n=this.transform,o=this.getZoom(),a=this.getBearing(),s=this.getPitch(),l=this.getPadding(),u="zoom"in e?+e.zoom:o,c="bearing"in e?this._normalizeBearing(e.bearing,a):a,p="pitch"in e?+e.pitch:s,h="padding"in e?e.padding:n.padding,f=t.Point.convert(e.offset),d=n.centerPoint.add(f),m=n.pointLocation(d),y=t.LngLat.convert(e.center||m);this._normalizeCenter(y);var g,_,v=n.project(m),x=n.project(y).sub(v),b=n.zoomScale(u-o);e.around&&(g=t.LngLat.convert(e.around),_=n.locationPoint(g));var w={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching};return this._zooming=this._zooming||u!==o,this._rotating=this._rotating||a!==c,this._pitching=this._pitching||p!==s,this._padding=!n.isPaddingEqual(h),this._easeId=e.easeId,this._prepareEase(r,e.noMoveStart,w),clearTimeout(this._easeEndTimeoutID),this._ease(function(e){if(i._zooming&&(n.zoom=t.number(o,u,e)),i._rotating&&(n.bearing=t.number(a,c,e)),i._pitching&&(n.pitch=t.number(s,p,e)),i._padding&&(n.interpolatePadding(l,h,e),d=n.centerPoint.add(f)),g)n.setLocationAtPoint(g,_);else{var m=n.zoomScale(n.zoom-o),y=u>o?Math.min(2,b):Math.max(.5,b),w=Math.pow(y,1-e),S=n.unproject(v.add(x.mult(e*w)).mult(m));n.setLocationAtPoint(n.renderWorldCopies?S.wrap():S,d)}i._fireMoveEvents(r)},function(t){i._afterEase(r,t)},e),this},r.prototype._prepareEase=function(e,r,i){void 0===i&&(i={}),this._moving=!0,r||i.moving||this.fire(new t.Event("movestart",e)),this._zooming&&!i.zooming&&this.fire(new t.Event("zoomstart",e)),this._rotating&&!i.rotating&&this.fire(new t.Event("rotatestart",e)),this._pitching&&!i.pitching&&this.fire(new t.Event("pitchstart",e))},r.prototype._fireMoveEvents=function(e){this.fire(new t.Event("move",e)),this._zooming&&this.fire(new t.Event("zoom",e)),this._rotating&&this.fire(new t.Event("rotate",e)),this._pitching&&this.fire(new t.Event("pitch",e))},r.prototype._afterEase=function(e,r){if(!this._easeId||!r||this._easeId!==r){delete this._easeId;var i=this._zooming,n=this._rotating,o=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,i&&this.fire(new t.Event("zoomend",e)),n&&this.fire(new t.Event("rotateend",e)),o&&this.fire(new t.Event("pitchend",e)),this.fire(new t.Event("moveend",e))}},r.prototype.flyTo=function(e,r){var i=this;if(!e.essential&&t.browser.prefersReducedMotion){var n=t.pick(e,["center","zoom","bearing","pitch","around"]);return this.jumpTo(n,r)}this.stop(),e=t.extend({offset:[0,0],speed:1.2,curve:1.42,easing:t.ease},e);var o=this.transform,a=this.getZoom(),s=this.getBearing(),l=this.getPitch(),u=this.getPadding(),c="zoom"in e?t.clamp(+e.zoom,o.minZoom,o.maxZoom):a,p="bearing"in e?this._normalizeBearing(e.bearing,s):s,h="pitch"in e?+e.pitch:l,f="padding"in e?e.padding:o.padding,d=o.zoomScale(c-a),m=t.Point.convert(e.offset),y=o.centerPoint.add(m),g=o.pointLocation(y),_=t.LngLat.convert(e.center||g);this._normalizeCenter(_);var v=o.project(g),x=o.project(_).sub(v),b=e.curve,w=Math.max(o.width,o.height),S=w/d,T=x.mag();if("minZoom"in e){var I=t.clamp(Math.min(e.minZoom,a,c),o.minZoom,o.maxZoom),E=w/o.zoomScale(I-a);b=Math.sqrt(E/T*2)}var A=b*b;function z(t){var e=(S*S-w*w+(t?-1:1)*A*A*T*T)/(2*(t?S:w)*A*T);return Math.log(Math.sqrt(e*e+1)-e)}function P(t){return(Math.exp(t)-Math.exp(-t))/2}function C(t){return(Math.exp(t)+Math.exp(-t))/2}var k=z(0),M=function(t){return C(k)/C(k+b*t)},D=function(t){return w*((C(k)*(P(e=k+b*t)/C(e))-P(k))/A)/T;var e},L=(z(1)-k)/b;if(Math.abs(T)<1e-6||!isFinite(L)){if(Math.abs(w-S)<1e-6)return this.easeTo(e,r);var B=S<w?-1:1;L=Math.abs(Math.log(S/w))/b,D=function(){return 0},M=function(t){return Math.exp(B*b*t)}}return e.duration="duration"in e?+e.duration:1e3*L/("screenSpeed"in e?+e.screenSpeed/b:+e.speed),e.maxDuration&&e.duration>e.maxDuration&&(e.duration=0),this._zooming=!0,this._rotating=s!==p,this._pitching=h!==l,this._padding=!o.isPaddingEqual(f),this._prepareEase(r,!1),this._ease(function(e){var n=e*L,d=1/M(n);o.zoom=1===e?c:a+o.scaleZoom(d),i._rotating&&(o.bearing=t.number(s,p,e)),i._pitching&&(o.pitch=t.number(l,h,e)),i._padding&&(o.interpolatePadding(u,f,e),y=o.centerPoint.add(m));var g=1===e?_:o.unproject(v.add(x.mult(D(n))).mult(d));o.setLocationAtPoint(o.renderWorldCopies?g.wrap():g,y),i._fireMoveEvents(r)},function(){return i._afterEase(r)},e),this},r.prototype.isEasing=function(){return!!this._easeFrameId},r.prototype.stop=function(){return this._stop()},r.prototype._stop=function(t,e){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var r=this._onEaseEnd;delete this._onEaseEnd,r.call(this,e)}if(!t){var i=this.handlers;i&&i.stop()}return this},r.prototype._ease=function(e,r,i){!1===i.animate||0===i.duration?(e(1),r()):(this._easeStart=t.browser.now(),this._easeOptions=i,this._onEaseFrame=e,this._onEaseEnd=r,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},r.prototype._renderFrameCallback=function(){var e=Math.min((t.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(e)),e<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},r.prototype._normalizeBearing=function(e,r){e=t.wrap(e,-180,180);var i=Math.abs(e-r);return Math.abs(e-360-r)<i&&(e-=360),Math.abs(e+360-r)<i&&(e+=360),e},r.prototype._normalizeCenter=function(t){var e=this.transform;if(e.renderWorldCopies&&!e.lngRange){var r=t.lng-e.center.lng;t.lng+=r>180?-360:r<-180?360:0}},r}(t.Evented),gn=function(e){void 0===e&&(e={}),this.options=e,t.bindAll(["_updateEditLink","_updateData","_updateCompact"],this)};gn.prototype.getDefaultPosition=function(){return"bottom-right"},gn.prototype.onAdd=function(t){var e=this.options&&this.options.compact;return this._map=t,this._container=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-attrib"),this._innerContainer=r.create("div","mapboxgl-ctrl-attrib-inner",this._container),e&&this._container.classList.add("mapboxgl-compact"),this._updateAttributions(),this._updateEditLink(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("moveend",this._updateEditLink),void 0===e&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container},gn.prototype.onRemove=function(){r.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("moveend",this._updateEditLink),this._map.off("resize",this._updateCompact),this._map=void 0,this._attribHTML=void 0},gn.prototype._updateEditLink=function(){var e=this._editLink;e||(e=this._editLink=this._container.querySelector(".mapbox-improve-map"));var r=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:this._map._requestManager._customAccessToken||t.config.ACCESS_TOKEN}];if(e){var i=r.reduce(function(t,e,i){return e.value&&(t+=e.key+"="+e.value+(i<r.length-1?"&":"")),t},"?");e.href=t.config.FEEDBACK_URL+"/"+i+(this._map._hash?this._map._hash.getHashString(!0):""),e.rel="noopener nofollow"}},gn.prototype._updateData=function(t){!t||"metadata"!==t.sourceDataType&&"style"!==t.dataType||(this._updateAttributions(),this._updateEditLink())},gn.prototype._updateAttributions=function(){if(this._map.style){var t=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?t=t.concat(this.options.customAttribution.map(function(t){return"string"!=typeof t?"":t})):"string"==typeof this.options.customAttribution&&t.push(this.options.customAttribution)),this._map.style.stylesheet){var e=this._map.style.stylesheet;this.styleOwner=e.owner,this.styleId=e.id}var r=this._map.style.sourceCaches;for(var i in r){var n=r[i];if(n.used){var o=n.getSource();o.attribution&&t.indexOf(o.attribution)<0&&t.push(o.attribution)}}t.sort(function(t,e){return t.length-e.length});var a=(t=t.filter(function(e,r){for(var i=r+1;i<t.length;i++)if(t[i].indexOf(e)>=0)return!1;return!0})).join(" | ");a!==this._attribHTML&&(this._attribHTML=a,t.length?(this._innerContainer.innerHTML=a,this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null)}},gn.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact")};var _n=function(){t.bindAll(["_updateLogo"],this),t.bindAll(["_updateCompact"],this)};_n.prototype.onAdd=function(t){this._map=t,this._container=r.create("div","mapboxgl-ctrl");var e=r.create("a","mapboxgl-ctrl-logo");return e.target="_blank",e.rel="noopener nofollow",e.href="https://www.mapbox.com/",e.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),e.setAttribute("rel","noopener nofollow"),this._container.appendChild(e),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container},_n.prototype.onRemove=function(){r.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)},_n.prototype.getDefaultPosition=function(){return"bottom-left"},_n.prototype._updateLogo=function(t){t&&"metadata"!==t.sourceDataType||(this._container.style.display=this._logoRequired()?"block":"none")},_n.prototype._logoRequired=function(){if(this._map.style){var t=this._map.style.sourceCaches;for(var e in t)if(t[e].getSource().mapbox_logo)return!0;return!1}},_n.prototype._updateCompact=function(){var t=this._container.children;if(t.length){var e=t[0];this._map.getCanvasContainer().offsetWidth<250?e.classList.add("mapboxgl-compact"):e.classList.remove("mapboxgl-compact")}};var vn=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};vn.prototype.add=function(t){var e=++this._id;return this._queue.push({callback:t,id:e,cancelled:!1}),e},vn.prototype.remove=function(t){for(var e=this._currentlyRunning,r=0,i=e?this._queue.concat(e):this._queue;r<i.length;r+=1){var n=i[r];if(n.id===t)return void(n.cancelled=!0)}},vn.prototype.run=function(t){void 0===t&&(t=0);var e=this._currentlyRunning=this._queue;this._queue=[];for(var r=0,i=e;r<i.length;r+=1){var n=i[r];if(!n.cancelled&&(n.callback(t),this._cleared))break}this._cleared=!1,this._currentlyRunning=!1},vn.prototype.clear=function(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]};var xn={"FullscreenControl.Enter":"Enter fullscreen","FullscreenControl.Exit":"Exit fullscreen","GeolocateControl.FindMyLocation":"Find my location","GeolocateControl.LocationNotAvailable":"Location not available","LogoControl.Title":"Mapbox logo","NavigationControl.ResetBearing":"Reset bearing to north","NavigationControl.ZoomIn":"Zoom in","NavigationControl.ZoomOut":"Zoom out","ScaleControl.Feet":"ft","ScaleControl.Meters":"m","ScaleControl.Kilometers":"km","ScaleControl.Miles":"mi","ScaleControl.NauticalMiles":"nm"},bn=t.window.HTMLImageElement,wn=t.window.HTMLElement,Sn=t.window.ImageBitmap,Tn={center:[0,0],zoom:0,bearing:0,pitch:0,minZoom:-2,maxZoom:22,minPitch:0,maxPitch:60,interactive:!0,scrollZoom:!0,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,touchPitch:!0,bearingSnap:7,clickTolerance:3,pitchWithRotate:!0,hash:!1,attributionControl:!0,failIfMajorPerformanceCaveat:!1,preserveDrawingBuffer:!1,trackResize:!0,renderWorldCopies:!0,refreshExpiredTiles:!0,maxTileCacheSize:null,localIdeographFontFamily:"sans-serif",transformRequest:null,accessToken:null,fadeDuration:300,crossSourceCollisions:!0},In=function(i){function n(e){var r=this;if(null!=(e=t.extend({},Tn,e)).minZoom&&null!=e.maxZoom&&e.minZoom>e.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(null!=e.minPitch&&null!=e.maxPitch&&e.minPitch>e.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(null!=e.minPitch&&e.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(null!=e.maxPitch&&e.maxPitch>60)throw new Error("maxPitch must be less than or equal to 60");var n=new bi(e.minZoom,e.maxZoom,e.minPitch,e.maxPitch,e.renderWorldCopies);if(i.call(this,n,e),this._interactive=e.interactive,this._maxTileCacheSize=e.maxTileCacheSize,this._failIfMajorPerformanceCaveat=e.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=e.preserveDrawingBuffer,this._antialias=e.antialias,this._trackResize=e.trackResize,this._bearingSnap=e.bearingSnap,this._refreshExpiredTiles=e.refreshExpiredTiles,this._fadeDuration=e.fadeDuration,this._crossSourceCollisions=e.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=e.collectResourceTiming,this._renderTaskQueue=new vn,this._controls=[],this._mapId=t.uniqueId(),this._locale=t.extend({},xn,e.locale),this._requestManager=new t.RequestManager(e.transformRequest,e.accessToken),"string"==typeof e.container){if(this._container=t.window.document.getElementById(e.container),!this._container)throw new Error("Container '"+e.container+"' not found.")}else{if(!(e.container instanceof wn))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=e.container}if(e.maxBounds&&this.setMaxBounds(e.maxBounds),t.bindAll(["_onWindowOnline","_onWindowResize","_contextLost","_contextRestored"],this),this._setupContainer(),this._setupPainter(),void 0===this.painter)throw new Error("Failed to initialize WebGL.");this.on("move",function(){return r._update(!1)}),this.on("moveend",function(){return r._update(!1)}),this.on("zoom",function(){return r._update(!0)}),void 0!==t.window&&(t.window.addEventListener("online",this._onWindowOnline,!1),t.window.addEventListener("resize",this._onWindowResize,!1)),this.handlers=new mn(this,e),this._hash=e.hash&&new Si("string"==typeof e.hash&&e.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:e.center,zoom:e.zoom,bearing:e.bearing,pitch:e.pitch}),e.bounds&&(this.resize(),this.fitBounds(e.bounds,t.extend({},e.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=e.localIdeographFontFamily,e.style&&this.setStyle(e.style,{localIdeographFontFamily:e.localIdeographFontFamily}),e.attributionControl&&this.addControl(new gn({customAttribution:e.customAttribution})),this.addControl(new _n,e.logoPosition),this.on("style.load",function(){r.transform.unmodified&&r.jumpTo(r.style.stylesheet)}),this.on("data",function(e){r._update("style"===e.dataType),r.fire(new t.Event(e.dataType+"data",e))}),this.on("dataloading",function(e){r.fire(new t.Event(e.dataType+"dataloading",e))})}i&&(n.__proto__=i),(n.prototype=Object.create(i&&i.prototype)).constructor=n;var o={showTileBoundaries:{configurable:!0},showPadding:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0},version:{configurable:!0}};return n.prototype._getMapId=function(){return this._mapId},n.prototype.addControl=function(e,r){if(void 0===r&&e.getDefaultPosition&&(r=e.getDefaultPosition()),void 0===r&&(r="top-right"),!e||!e.onAdd)return this.fire(new t.ErrorEvent(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));var i=e.onAdd(this);this._controls.push(e);var n=this._controlPositions[r];return-1!==r.indexOf("bottom")?n.insertBefore(i,n.firstChild):n.appendChild(i),this},n.prototype.removeControl=function(e){if(!e||!e.onRemove)return this.fire(new t.ErrorEvent(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));var r=this._controls.indexOf(e);return r>-1&&this._controls.splice(r,1),e.onRemove(this),this},n.prototype.resize=function(e){var r=this._containerDimensions(),i=r[0],n=r[1];this._resizeCanvas(i,n),this.transform.resize(i,n),this.painter.resize(i,n);var o=!this._moving;return o&&(this.stop(),this.fire(new t.Event("movestart",e)).fire(new t.Event("move",e))),this.fire(new t.Event("resize",e)),o&&this.fire(new t.Event("moveend",e)),this},n.prototype.getBounds=function(){return this.transform.getBounds()},n.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},n.prototype.setMaxBounds=function(e){return this.transform.setMaxBounds(t.LngLatBounds.convert(e)),this._update()},n.prototype.setMinZoom=function(t){if((t=null==t?-2:t)>=-2&&t<=this.transform.maxZoom)return this.transform.minZoom=t,this._update(),this.getZoom()<t&&this.setZoom(t),this;throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")},n.prototype.getMinZoom=function(){return this.transform.minZoom},n.prototype.setMaxZoom=function(t){if((t=null==t?22:t)>=this.transform.minZoom)return this.transform.maxZoom=t,this._update(),this.getZoom()>t&&this.setZoom(t),this;throw new Error("maxZoom must be greater than the current minZoom")},n.prototype.getMaxZoom=function(){return this.transform.maxZoom},n.prototype.setMinPitch=function(t){if((t=null==t?0:t)<0)throw new Error("minPitch must be greater than or equal to 0");if(t>=0&&t<=this.transform.maxPitch)return this.transform.minPitch=t,this._update(),this.getPitch()<t&&this.setPitch(t),this;throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")},n.prototype.getMinPitch=function(){return this.transform.minPitch},n.prototype.setMaxPitch=function(t){if((t=null==t?60:t)>60)throw new Error("maxPitch must be less than or equal to 60");if(t>=this.transform.minPitch)return this.transform.maxPitch=t,this._update(),this.getPitch()>t&&this.setPitch(t),this;throw new Error("maxPitch must be greater than the current minPitch")},n.prototype.getMaxPitch=function(){return this.transform.maxPitch},n.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},n.prototype.setRenderWorldCopies=function(t){return this.transform.renderWorldCopies=t,this._update()},n.prototype.project=function(e){return this.transform.locationPoint(t.LngLat.convert(e))},n.prototype.unproject=function(e){return this.transform.pointLocation(t.Point.convert(e))},n.prototype.isMoving=function(){return this._moving||this.handlers.isMoving()},n.prototype.isZooming=function(){return this._zooming||this.handlers.isZooming()},n.prototype.isRotating=function(){return this._rotating||this.handlers.isRotating()},n.prototype._createDelegatedListener=function(t,e,r){var i,n=this;if("mouseenter"===t||"mouseover"===t){var o=!1;return{layer:e,listener:r,delegates:{mousemove:function(i){var a=n.getLayer(e)?n.queryRenderedFeatures(i.point,{layers:[e]}):[];a.length?o||(o=!0,r.call(n,new Mi(t,n,i.originalEvent,{features:a}))):o=!1},mouseout:function(){o=!1}}}}if("mouseleave"===t||"mouseout"===t){var a=!1;return{layer:e,listener:r,delegates:{mousemove:function(i){(n.getLayer(e)?n.queryRenderedFeatures(i.point,{layers:[e]}):[]).length?a=!0:a&&(a=!1,r.call(n,new Mi(t,n,i.originalEvent)))},mouseout:function(e){a&&(a=!1,r.call(n,new Mi(t,n,e.originalEvent)))}}}}return{layer:e,listener:r,delegates:(i={},i[t]=function(t){var i=n.getLayer(e)?n.queryRenderedFeatures(t.point,{layers:[e]}):[];i.length&&(t.features=i,r.call(n,t),delete t.features)},i)}},n.prototype.on=function(t,e,r){if(void 0===r)return i.prototype.on.call(this,t,e);var n=this._createDelegatedListener(t,e,r);for(var o in this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[t]=this._delegatedListeners[t]||[],this._delegatedListeners[t].push(n),n.delegates)this.on(o,n.delegates[o]);return this},n.prototype.once=function(t,e,r){if(void 0===r)return i.prototype.once.call(this,t,e);var n=this._createDelegatedListener(t,e,r);for(var o in n.delegates)this.once(o,n.delegates[o]);return this},n.prototype.off=function(t,e,r){var n=this;return void 0===r?i.prototype.off.call(this,t,e):(this._delegatedListeners&&this._delegatedListeners[t]&&function(i){for(var o=i[t],a=0;a<o.length;a++){var s=o[a];if(s.layer===e&&s.listener===r){for(var l in s.delegates)n.off(l,s.delegates[l]);return o.splice(a,1),n}}}(this._delegatedListeners),this)},n.prototype.queryRenderedFeatures=function(e,r){if(!this.style)return[];var i;if(void 0!==r||void 0===e||e instanceof t.Point||Array.isArray(e)||(r=e,e=void 0),r=r||{},(e=e||[[0,0],[this.transform.width,this.transform.height]])instanceof t.Point||"number"==typeof e[0])i=[t.Point.convert(e)];else{var n=t.Point.convert(e[0]),o=t.Point.convert(e[1]);i=[n,new t.Point(o.x,n.y),o,new t.Point(n.x,o.y),n]}return this.style.queryRenderedFeatures(i,r,this.transform)},n.prototype.querySourceFeatures=function(t,e){return this.style.querySourceFeatures(t,e)},n.prototype.setStyle=function(e,r){return!1!==(r=t.extend({},{localIdeographFontFamily:this._localIdeographFontFamily},r)).diff&&r.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&e?(this._diffStyle(e,r),this):(this._localIdeographFontFamily=r.localIdeographFontFamily,this._updateStyle(e,r))},n.prototype._getUIString=function(t){var e=this._locale[t];if(null==e)throw new Error("Missing UI string '"+t+"'");return e},n.prototype._updateStyle=function(t,e){return this.style&&(this.style.setEventedParent(null),this.style._remove()),t?(this.style=new qe(this,e||{}),this.style.setEventedParent(this,{style:this.style}),"string"==typeof t?this.style.loadURL(t):this.style.loadJSON(t),this):(delete this.style,this)},n.prototype._lazyInitEmptyStyle=function(){this.style||(this.style=new qe(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())},n.prototype._diffStyle=function(e,r){var i=this;if("string"==typeof e){var n=this._requestManager.normalizeStyleURL(e),o=this._requestManager.transformRequest(n,t.ResourceType.Style);t.getJSON(o,function(e,n){e?i.fire(new t.ErrorEvent(e)):n&&i._updateDiff(n,r)})}else"object"==typeof e&&this._updateDiff(e,r)},n.prototype._updateDiff=function(e,r){try{this.style.setState(e)&&this._update(!0)}catch(i){t.warnOnce("Unable to perform style diff: "+(i.message||i.error||i)+". Rebuilding the style from scratch."),this._updateStyle(e,r)}},n.prototype.getStyle=function(){if(this.style)return this.style.serialize()},n.prototype.isStyleLoaded=function(){return this.style?this.style.loaded():t.warnOnce("There is no style added to the map.")},n.prototype.addSource=function(t,e){return this._lazyInitEmptyStyle(),this.style.addSource(t,e),this._update(!0)},n.prototype.isSourceLoaded=function(e){var r=this.style&&this.style.sourceCaches[e];if(void 0!==r)return r.loaded();this.fire(new t.ErrorEvent(new Error("There is no source with ID '"+e+"'")))},n.prototype.areTilesLoaded=function(){var t=this.style&&this.style.sourceCaches;for(var e in t){var r=t[e]._tiles;for(var i in r){var n=r[i];if("loaded"!==n.state&&"errored"!==n.state)return!1}}return!0},n.prototype.addSourceType=function(t,e,r){return this._lazyInitEmptyStyle(),this.style.addSourceType(t,e,r)},n.prototype.removeSource=function(t){return this.style.removeSource(t),this._update(!0)},n.prototype.getSource=function(t){return this.style.getSource(t)},n.prototype.addImage=function(e,r,i){void 0===i&&(i={});var n=i.pixelRatio;void 0===n&&(n=1);var o=i.sdf;void 0===o&&(o=!1);var a=i.stretchX,s=i.stretchY,l=i.content;if(this._lazyInitEmptyStyle(),r instanceof bn||Sn&&r instanceof Sn){var u=t.browser.getImageData(r);this.style.addImage(e,{data:new t.RGBAImage({width:u.width,height:u.height},u.data),pixelRatio:n,stretchX:a,stretchY:s,content:l,sdf:o,version:0})}else{if(void 0===r.width||void 0===r.height)return this.fire(new t.ErrorEvent(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));var c=r;this.style.addImage(e,{data:new t.RGBAImage({width:r.width,height:r.height},new Uint8Array(r.data)),pixelRatio:n,stretchX:a,stretchY:s,content:l,sdf:o,version:0,userImage:c}),c.onAdd&&c.onAdd(this,e)}},n.prototype.updateImage=function(e,r){var i=this.style.getImage(e);if(!i)return this.fire(new t.ErrorEvent(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));var n=r instanceof bn||Sn&&r instanceof Sn?t.browser.getImageData(r):r,o=n.width,a=n.height,s=n.data;return void 0===o||void 0===a?this.fire(new t.ErrorEvent(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`"))):o!==i.data.width||a!==i.data.height?this.fire(new t.ErrorEvent(new Error("The width and height of the updated image must be that same as the previous version of the image"))):(i.data.replace(s,!(r instanceof bn||Sn&&r instanceof Sn)),void this.style.updateImage(e,i))},n.prototype.hasImage=function(e){return e?!!this.style.getImage(e):(this.fire(new t.ErrorEvent(new Error("Missing required image id"))),!1)},n.prototype.removeImage=function(t){this.style.removeImage(t)},n.prototype.loadImage=function(e,r){t.getImage(this._requestManager.transformRequest(e,t.ResourceType.Image),r)},n.prototype.listImages=function(){return this.style.listImages()},n.prototype.addLayer=function(t,e){return this._lazyInitEmptyStyle(),this.style.addLayer(t,e),this._update(!0)},n.prototype.moveLayer=function(t,e){return this.style.moveLayer(t,e),this._update(!0)},n.prototype.removeLayer=function(t){return this.style.removeLayer(t),this._update(!0)},n.prototype.getLayer=function(t){return this.style.getLayer(t)},n.prototype.setLayerZoomRange=function(t,e,r){return this.style.setLayerZoomRange(t,e,r),this._update(!0)},n.prototype.setFilter=function(t,e,r){return void 0===r&&(r={}),this.style.setFilter(t,e,r),this._update(!0)},n.prototype.getFilter=function(t){return this.style.getFilter(t)},n.prototype.setPaintProperty=function(t,e,r,i){return void 0===i&&(i={}),this.style.setPaintProperty(t,e,r,i),this._update(!0)},n.prototype.getPaintProperty=function(t,e){return this.style.getPaintProperty(t,e)},n.prototype.setLayoutProperty=function(t,e,r,i){return void 0===i&&(i={}),this.style.setLayoutProperty(t,e,r,i),this._update(!0)},n.prototype.getLayoutProperty=function(t,e){return this.style.getLayoutProperty(t,e)},n.prototype.setLight=function(t,e){return void 0===e&&(e={}),this._lazyInitEmptyStyle(),this.style.setLight(t,e),this._update(!0)},n.prototype.getLight=function(){return this.style.getLight()},n.prototype.setFeatureState=function(t,e){return this.style.setFeatureState(t,e),this._update()},n.prototype.removeFeatureState=function(t,e){return this.style.removeFeatureState(t,e),this._update()},n.prototype.getFeatureState=function(t){return this.style.getFeatureState(t)},n.prototype.getContainer=function(){return this._container},n.prototype.getCanvasContainer=function(){return this._canvasContainer},n.prototype.getCanvas=function(){return this._canvas},n.prototype._containerDimensions=function(){var t=0,e=0;return this._container&&(t=this._container.clientWidth||400,e=this._container.clientHeight||300),[t,e]},n.prototype._detectMissingCSS=function(){"rgb(250, 128, 114)"!==t.window.getComputedStyle(this._missingCSSCanary).getPropertyValue("background-color")&&t.warnOnce("This page appears to be missing CSS declarations for Mapbox GL JS, which may cause the map to display incorrectly. Please ensure your page includes mapbox-gl.css, as described in https://www.mapbox.com/mapbox-gl-js/api/.")},n.prototype._setupContainer=function(){var t=this._container;t.classList.add("mapboxgl-map"),(this._missingCSSCanary=r.create("div","mapboxgl-canary",t)).style.visibility="hidden",this._detectMissingCSS();var e=this._canvasContainer=r.create("div","mapboxgl-canvas-container",t);this._interactive&&e.classList.add("mapboxgl-interactive"),this._canvas=r.create("canvas","mapboxgl-canvas",e),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex","0"),this._canvas.setAttribute("aria-label","Map");var i=this._containerDimensions();this._resizeCanvas(i[0],i[1]);var n=this._controlContainer=r.create("div","mapboxgl-control-container",t),o=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(function(t){o[t]=r.create("div","mapboxgl-ctrl-"+t,n)})},n.prototype._resizeCanvas=function(e,r){var i=t.browser.devicePixelRatio||1;this._canvas.width=i*e,this._canvas.height=i*r,this._canvas.style.width=e+"px",this._canvas.style.height=r+"px"},n.prototype._setupPainter=function(){var r=t.extend({},e.webGLContextAttributes,{failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1}),i=this._canvas.getContext("webgl",r)||this._canvas.getContext("experimental-webgl",r);i?(this.painter=new gi(i,this.transform),t.webpSupported.testSupport(i)):this.fire(new t.ErrorEvent(new Error("Failed to initialize WebGL")))},n.prototype._contextLost=function(e){e.preventDefault(),this._frame&&(this._frame.cancel(),this._frame=null),this.fire(new t.Event("webglcontextlost",{originalEvent:e}))},n.prototype._contextRestored=function(e){this._setupPainter(),this.resize(),this._update(),this.fire(new t.Event("webglcontextrestored",{originalEvent:e}))},n.prototype.loaded=function(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()},n.prototype._update=function(t){return this.style?(this._styleDirty=this._styleDirty||t,this._sourcesDirty=!0,this.triggerRepaint(),this):this},n.prototype._requestRenderFrame=function(t){return this._update(),this._renderTaskQueue.add(t)},n.prototype._cancelRenderFrame=function(t){this._renderTaskQueue.remove(t)},n.prototype._render=function(e){var r,i=this,n=0,o=this.painter.context.extTimerQuery;if(this.listens("gpu-timing-frame")&&(r=o.createQueryEXT(),o.beginQueryEXT(o.TIME_ELAPSED_EXT,r),n=t.browser.now()),this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(e),!this._removed){var a=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;var s=this.transform.zoom,l=t.browser.now();this.style.zoomHistory.update(s,l);var u=new t.EvaluationParameters(s,{now:l,fadeDuration:this._fadeDuration,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),c=u.crossFadingFactor();1===c&&c===this._crossFadingFactor||(a=!0,this._crossFadingFactor=c),this.style.update(u)}if(this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,this._fadeDuration,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:this._fadeDuration,showPadding:this.showPadding,gpuTiming:!!this.listens("gpu-timing-layer")}),this.fire(new t.Event("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire(new t.Event("load"))),this.style&&(this.style.hasTransitions()||a)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles(),this.listens("gpu-timing-frame")){var p=t.browser.now()-n;o.endQueryEXT(o.TIME_ELAPSED_EXT,r),setTimeout(function(){var e=o.getQueryObjectEXT(r,o.QUERY_RESULT_EXT)/1e6;o.deleteQueryEXT(r),i.fire(new t.Event("gpu-timing-frame",{cpuTime:p,gpuTime:e}))},50)}if(this.listens("gpu-timing-layer")){var h=this.painter.collectGpuTimers();setTimeout(function(){var e=i.painter.queryGpuTimers(h);i.fire(new t.Event("gpu-timing-layer",{layerTimes:e}))},50)}return this._sourcesDirty||this._styleDirty||this._placementDirty||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&(this._fullyLoaded||(this._fullyLoaded=!0),this.fire(new t.Event("idle"))),this}},n.prototype.remove=function(){this._hash&&this._hash.remove();for(var e=0,r=this._controls;e<r.length;e+=1)r[e].onRemove(this);this._controls=[],this._frame&&(this._frame.cancel(),this._frame=null),this._renderTaskQueue.clear(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),void 0!==t.window&&(t.window.removeEventListener("resize",this._onWindowResize,!1),t.window.removeEventListener("online",this._onWindowOnline,!1));var i=this.painter.context.gl.getExtension("WEBGL_lose_context");i&&i.loseContext(),En(this._canvasContainer),En(this._controlContainer),En(this._missingCSSCanary),this._container.classList.remove("mapboxgl-map"),this._removed=!0,this.fire(new t.Event("remove"))},n.prototype.triggerRepaint=function(){var e=this;this.style&&!this._frame&&(this._frame=t.browser.frame(function(t){e._frame=null,e._render(t)}))},n.prototype._onWindowOnline=function(){this._update()},n.prototype._onWindowResize=function(t){this._trackResize&&this.resize({originalEvent:t})._update()},o.showTileBoundaries.get=function(){return!!this._showTileBoundaries},o.showTileBoundaries.set=function(t){this._showTileBoundaries!==t&&(this._showTileBoundaries=t,this._update())},o.showPadding.get=function(){return!!this._showPadding},o.showPadding.set=function(t){this._showPadding!==t&&(this._showPadding=t,this._update())},o.showCollisionBoxes.get=function(){return!!this._showCollisionBoxes},o.showCollisionBoxes.set=function(t){this._showCollisionBoxes!==t&&(this._showCollisionBoxes=t,t?this.style._generateCollisionBoxes():this._update())},o.showOverdrawInspector.get=function(){return!!this._showOverdrawInspector},o.showOverdrawInspector.set=function(t){this._showOverdrawInspector!==t&&(this._showOverdrawInspector=t,this._update())},o.repaint.get=function(){return!!this._repaint},o.repaint.set=function(t){this._repaint!==t&&(this._repaint=t,this.triggerRepaint())},o.vertices.get=function(){return!!this._vertices},o.vertices.set=function(t){this._vertices=t,this._update()},n.prototype._setCacheLimits=function(e,r){t.setCacheLimits(e,r)},o.version.get=function(){return t.version},Object.defineProperties(n.prototype,o),n}(yn);function En(t){t.parentNode&&t.parentNode.removeChild(t)}var An={showCompass:!0,showZoom:!0,visualizePitch:!1},zn=function(e){var i=this;this.options=t.extend({},An,e),this._container=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._container.addEventListener("contextmenu",function(t){return t.preventDefault()}),this.options.showZoom&&(t.bindAll(["_setButtonTitle","_updateZoomButtons"],this),this._zoomInButton=this._createButton("mapboxgl-ctrl-zoom-in",function(t){return i._map.zoomIn({},{originalEvent:t})}),r.create("span","mapboxgl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden",!0),this._zoomOutButton=this._createButton("mapboxgl-ctrl-zoom-out",function(t){return i._map.zoomOut({},{originalEvent:t})}),r.create("span","mapboxgl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden",!0)),this.options.showCompass&&(t.bindAll(["_rotateCompassArrow"],this),this._compass=this._createButton("mapboxgl-ctrl-compass",function(t){i.options.visualizePitch?i._map.resetNorthPitch({},{originalEvent:t}):i._map.resetNorth({},{originalEvent:t})}),this._compassIcon=r.create("span","mapboxgl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden",!0))};zn.prototype._updateZoomButtons=function(){var t=this._map.getZoom();this._zoomInButton.disabled=t===this._map.getMaxZoom(),this._zoomOutButton.disabled=t===this._map.getMinZoom()},zn.prototype._rotateCompassArrow=function(){var t=this.options.visualizePitch?"scale("+1/Math.pow(Math.cos(this._map.transform.pitch*(Math.PI/180)),.5)+") rotateX("+this._map.transform.pitch+"deg) rotateZ("+this._map.transform.angle*(180/Math.PI)+"deg)":"rotate("+this._map.transform.angle*(180/Math.PI)+"deg)";this._compassIcon.style.transform=t},zn.prototype.onAdd=function(t){return this._map=t,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new Pn(this._map,this._compass,this.options.visualizePitch)),this._container},zn.prototype.onRemove=function(){r.remove(this._container),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map},zn.prototype._createButton=function(t,e){var i=r.create("button",t,this._container);return i.type="button",i.addEventListener("click",e),i},zn.prototype._setButtonTitle=function(t,e){var r=this._map._getUIString("NavigationControl."+e);t.title=r,t.setAttribute("aria-label",r)};var Pn=function(e,i,n){void 0===n&&(n=!1),this._clickTolerance=10,this.element=i,this.mouseRotate=new Zi({clickTolerance:e.dragRotate._mouseRotate._clickTolerance}),this.map=e,n&&(this.mousePitch=new Gi({clickTolerance:e.dragRotate._mousePitch._clickTolerance})),t.bindAll(["mousedown","mousemove","mouseup","touchstart","touchmove","touchend","reset"],this),r.addEventListener(i,"mousedown",this.mousedown),r.addEventListener(i,"touchstart",this.touchstart,{passive:!1}),r.addEventListener(i,"touchmove",this.touchmove),r.addEventListener(i,"touchend",this.touchend),r.addEventListener(i,"touchcancel",this.reset)};function Cn(e,r,i){if(e=new t.LngLat(e.lng,e.lat),r){var n=new t.LngLat(e.lng-360,e.lat),o=new t.LngLat(e.lng+360,e.lat),a=i.locationPoint(e).distSqr(r);i.locationPoint(n).distSqr(r)<a?e=n:i.locationPoint(o).distSqr(r)<a&&(e=o)}for(;Math.abs(e.lng-i.center.lng)>180;){var s=i.locationPoint(e);if(s.x>=0&&s.y>=0&&s.x<=i.width&&s.y<=i.height)break;e.lng>i.center.lng?e.lng-=360:e.lng+=360}return e}Pn.prototype.down=function(t,e){this.mouseRotate.mousedown(t,e),this.mousePitch&&this.mousePitch.mousedown(t,e),r.disableDrag()},Pn.prototype.move=function(t,e){var r=this.map,i=this.mouseRotate.mousemoveWindow(t,e);if(i&&i.bearingDelta&&r.setBearing(r.getBearing()+i.bearingDelta),this.mousePitch){var n=this.mousePitch.mousemoveWindow(t,e);n&&n.pitchDelta&&r.setPitch(r.getPitch()+n.pitchDelta)}},Pn.prototype.off=function(){var t=this.element;r.removeEventListener(t,"mousedown",this.mousedown),r.removeEventListener(t,"touchstart",this.touchstart,{passive:!1}),r.removeEventListener(t,"touchmove",this.touchmove),r.removeEventListener(t,"touchend",this.touchend),r.removeEventListener(t,"touchcancel",this.reset),this.offTemp()},Pn.prototype.offTemp=function(){r.enableDrag(),r.removeEventListener(t.window,"mousemove",this.mousemove),r.removeEventListener(t.window,"mouseup",this.mouseup)},Pn.prototype.mousedown=function(e){this.down(t.extend({},e,{ctrlKey:!0,preventDefault:function(){return e.preventDefault()}}),r.mousePos(this.element,e)),r.addEventListener(t.window,"mousemove",this.mousemove),r.addEventListener(t.window,"mouseup",this.mouseup)},Pn.prototype.mousemove=function(t){this.move(t,r.mousePos(this.element,t))},Pn.prototype.mouseup=function(t){this.mouseRotate.mouseupWindow(t),this.mousePitch&&this.mousePitch.mouseupWindow(t),this.offTemp()},Pn.prototype.touchstart=function(t){1!==t.targetTouches.length?this.reset():(this._startPos=this._lastPos=r.touchPos(this.element,t.targetTouches)[0],this.down({type:"mousedown",button:0,ctrlKey:!0,preventDefault:function(){return t.preventDefault()}},this._startPos))},Pn.prototype.touchmove=function(t){1!==t.targetTouches.length?this.reset():(this._lastPos=r.touchPos(this.element,t.targetTouches)[0],this.move({preventDefault:function(){return t.preventDefault()}},this._lastPos))},Pn.prototype.touchend=function(t){0===t.targetTouches.length&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)<this._clickTolerance&&this.element.click(),this.reset()},Pn.prototype.reset=function(){this.mouseRotate.reset(),this.mousePitch&&this.mousePitch.reset(),delete this._startPos,delete this._lastPos,this.offTemp()};var kn={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function Mn(t,e,r){var i=t.classList;for(var n in kn)i.remove("mapboxgl-"+r+"-anchor-"+n);i.add("mapboxgl-"+r+"-anchor-"+e)}var Dn,Ln=function(e){function i(i,n){var o=this;if(e.call(this),(i instanceof t.window.HTMLElement||n)&&(i=t.extend({element:i},n)),t.bindAll(["_update","_onMove","_onUp","_addDragHandler","_onMapClick","_onKeyPress"],this),this._anchor=i&&i.anchor||"center",this._color=i&&i.color||"#3FB1CE",this._draggable=i&&i.draggable||!1,this._state="inactive",this._rotation=i&&i.rotation||0,this._rotationAlignment=i&&i.rotationAlignment||"auto",this._pitchAlignment=i&&i.pitchAlignment&&"auto"!==i.pitchAlignment?i.pitchAlignment:this._rotationAlignment,i&&i.element)this._element=i.element,this._offset=t.Point.convert(i&&i.offset||[0,0]);else{this._defaultMarker=!0,this._element=r.create("div"),this._element.setAttribute("aria-label","Map marker");var a=r.createNS("http://www.w3.org/2000/svg","svg");a.setAttributeNS(null,"display","block"),a.setAttributeNS(null,"height","41px"),a.setAttributeNS(null,"width","27px"),a.setAttributeNS(null,"viewBox","0 0 27 41");var s=r.createNS("http://www.w3.org/2000/svg","g");s.setAttributeNS(null,"stroke","none"),s.setAttributeNS(null,"stroke-width","1"),s.setAttributeNS(null,"fill","none"),s.setAttributeNS(null,"fill-rule","evenodd");var l=r.createNS("http://www.w3.org/2000/svg","g");l.setAttributeNS(null,"fill-rule","nonzero");var u=r.createNS("http://www.w3.org/2000/svg","g");u.setAttributeNS(null,"transform","translate(3.0, 29.0)"),u.setAttributeNS(null,"fill","#000000");for(var c=0,p=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}];c<p.length;c+=1){var h=p[c],f=r.createNS("http://www.w3.org/2000/svg","ellipse");f.setAttributeNS(null,"opacity","0.04"),f.setAttributeNS(null,"cx","10.5"),f.setAttributeNS(null,"cy","5.80029008"),f.setAttributeNS(null,"rx",h.rx),f.setAttributeNS(null,"ry",h.ry),u.appendChild(f)}var d=r.createNS("http://www.w3.org/2000/svg","g");d.setAttributeNS(null,"fill",this._color);var m=r.createNS("http://www.w3.org/2000/svg","path");m.setAttributeNS(null,"d","M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"),d.appendChild(m);var y=r.createNS("http://www.w3.org/2000/svg","g");y.setAttributeNS(null,"opacity","0.25"),y.setAttributeNS(null,"fill","#000000");var g=r.createNS("http://www.w3.org/2000/svg","path");g.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),y.appendChild(g);var _=r.createNS("http://www.w3.org/2000/svg","g");_.setAttributeNS(null,"transform","translate(6.0, 7.0)"),_.setAttributeNS(null,"fill","#FFFFFF");var v=r.createNS("http://www.w3.org/2000/svg","g");v.setAttributeNS(null,"transform","translate(8.0, 8.0)");var x=r.createNS("http://www.w3.org/2000/svg","circle");x.setAttributeNS(null,"fill","#000000"),x.setAttributeNS(null,"opacity","0.25"),x.setAttributeNS(null,"cx","5.5"),x.setAttributeNS(null,"cy","5.5"),x.setAttributeNS(null,"r","5.4999962");var b=r.createNS("http://www.w3.org/2000/svg","circle");b.setAttributeNS(null,"fill","#FFFFFF"),b.setAttributeNS(null,"cx","5.5"),b.setAttributeNS(null,"cy","5.5"),b.setAttributeNS(null,"r","5.4999962"),v.appendChild(x),v.appendChild(b),l.appendChild(u),l.appendChild(d),l.appendChild(y),l.appendChild(_),l.appendChild(v),a.appendChild(l),this._element.appendChild(a),this._offset=t.Point.convert(i&&i.offset||[0,-14])}this._element.classList.add("mapboxgl-marker"),this._element.addEventListener("dragstart",function(t){t.preventDefault()}),this._element.addEventListener("mousedown",function(t){t.preventDefault()}),this._element.addEventListener("focus",function(){var t=o._map.getContainer();t.scrollTop=0,t.scrollLeft=0}),Mn(this._element,this._anchor,"marker"),this._popup=null}return e&&(i.__proto__=e),(i.prototype=Object.create(e&&e.prototype)).constructor=i,i.prototype.addTo=function(t){return this.remove(),this._map=t,t.getCanvasContainer().appendChild(this._element),t.on("move",this._update),t.on("moveend",this._update),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this},i.prototype.remove=function(){return this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),delete this._map),r.remove(this._element),this._popup&&this._popup.remove(),this},i.prototype.getLngLat=function(){return this._lngLat},i.prototype.setLngLat=function(e){return this._lngLat=t.LngLat.convert(e),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this},i.prototype.getElement=function(){return this._element},i.prototype.setPopup=function(t){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),t){if(!("offset"in t.options)){var e=Math.sqrt(Math.pow(13.5,2)/2);t.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[e,-1*(24.6+e)],"bottom-right":[-e,-1*(24.6+e)],left:[13.5,-24.6],right:[-13.5,-24.6]}:this._offset}this._popup=t,this._lngLat&&this._popup.setLngLat(this._lngLat),this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this},i.prototype._onKeyPress=function(t){var e=t.code,r=t.charCode||t.keyCode;"Space"!==e&&"Enter"!==e&&32!==r&&13!==r||this.togglePopup()},i.prototype._onMapClick=function(t){var e=t.originalEvent.target,r=this._element;this._popup&&(e===r||r.contains(e))&&this.togglePopup()},i.prototype.getPopup=function(){return this._popup},i.prototype.togglePopup=function(){var t=this._popup;return t?(t.isOpen()?t.remove():t.addTo(this._map),this):this},i.prototype._update=function(t){if(this._map){this._map.transform.renderWorldCopies&&(this._lngLat=Cn(this._lngLat,this._pos,this._map.transform)),this._pos=this._map.project(this._lngLat)._add(this._offset);var e="";"viewport"===this._rotationAlignment||"auto"===this._rotationAlignment?e="rotateZ("+this._rotation+"deg)":"map"===this._rotationAlignment&&(e="rotateZ("+(this._rotation-this._map.getBearing())+"deg)");var i="";"viewport"===this._pitchAlignment||"auto"===this._pitchAlignment?i="rotateX(0deg)":"map"===this._pitchAlignment&&(i="rotateX("+this._map.getPitch()+"deg)"),t&&"moveend"!==t.type||(this._pos=this._pos.round()),r.setTransform(this._element,kn[this._anchor]+" translate("+this._pos.x+"px, "+this._pos.y+"px) "+i+" "+e)}},i.prototype.getOffset=function(){return this._offset},i.prototype.setOffset=function(e){return this._offset=t.Point.convert(e),this._update(),this},i.prototype._onMove=function(e){this._pos=e.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none","pending"===this._state&&(this._state="active",this.fire(new t.Event("dragstart"))),this.fire(new t.Event("drag"))},i.prototype._onUp=function(){this._element.style.pointerEvents="auto",this._positionDelta=null,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),"active"===this._state&&this.fire(new t.Event("dragend")),this._state="inactive"},i.prototype._addDragHandler=function(t){this._element.contains(t.originalEvent.target)&&(t.preventDefault(),this._positionDelta=t.point.sub(this._pos).add(this._offset),this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},i.prototype.setDraggable=function(t){return this._draggable=!!t,this._map&&(t?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this},i.prototype.isDraggable=function(){return this._draggable},i.prototype.setRotation=function(t){return this._rotation=t||0,this._update(),this},i.prototype.getRotation=function(){return this._rotation},i.prototype.setRotationAlignment=function(t){return this._rotationAlignment=t||"auto",this._update(),this},i.prototype.getRotationAlignment=function(){return this._rotationAlignment},i.prototype.setPitchAlignment=function(t){return this._pitchAlignment=t&&"auto"!==t?t:this._rotationAlignment,this._update(),this},i.prototype.getPitchAlignment=function(){return this._pitchAlignment},i}(t.Evented),Bn={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},Rn=0,Fn=!1,On=function(e){function i(r){e.call(this),this.options=t.extend({},Bn,r),t.bindAll(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker"],this)}return e&&(i.__proto__=e),(i.prototype=Object.create(e&&e.prototype)).constructor=i,i.prototype.onAdd=function(e){var i;return this._map=e,this._container=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),i=this._setupUI,void 0!==Dn?i(Dn):void 0!==t.window.navigator.permissions?t.window.navigator.permissions.query({name:"geolocation"}).then(function(t){i(Dn="denied"!==t.state)}):i(Dn=!!t.window.navigator.geolocation),this._container},i.prototype.onRemove=function(){void 0!==this._geolocationWatchID&&(t.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),r.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,Rn=0,Fn=!1},i.prototype._isOutOfMapMaxBounds=function(t){var e=this._map.getMaxBounds(),r=t.coords;return e&&(r.longitude<e.getWest()||r.longitude>e.getEast()||r.latitude<e.getSouth()||r.latitude>e.getNorth())},i.prototype._setErrorState=function(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting")}},i.prototype._onSuccess=function(e){if(this._map){if(this._isOutOfMapMaxBounds(e))return this._setErrorState(),this.fire(new t.Event("outofmaxbounds",e)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=e,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background")}this.options.showUserLocation&&"OFF"!==this._watchState&&this._updateMarker(e),this.options.trackUserLocation&&"ACTIVE_LOCK"!==this._watchState||this._updateCamera(e),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new t.Event("geolocate",e)),this._finish()}},i.prototype._updateCamera=function(e){var r=new t.LngLat(e.coords.longitude,e.coords.latitude),i=e.coords.accuracy,n=this._map.getBearing(),o=t.extend({bearing:n},this.options.fitBoundsOptions);this._map.fitBounds(r.toBounds(i),o,{geolocateSource:!0})},i.prototype._updateMarker=function(e){if(e){var r=new t.LngLat(e.coords.longitude,e.coords.latitude);this._accuracyCircleMarker.setLngLat(r).addTo(this._map),this._userLocationDotMarker.setLngLat(r).addTo(this._map),this._accuracy=e.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},i.prototype._updateCircleRadius=function(){var t=this._map._container.clientHeight/2,e=this._map.unproject([0,t]),r=this._map.unproject([1,t]),i=e.distanceTo(r),n=Math.ceil(2*this._accuracy/i);this._circleElement.style.width=n+"px",this._circleElement.style.height=n+"px"},i.prototype._onZoom=function(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},i.prototype._onError=function(e){if(this._map){if(this.options.trackUserLocation)if(1===e.code){this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;var r=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=r,this._geolocateButton.setAttribute("aria-label",r),void 0!==this._geolocationWatchID&&this._clearWatch()}else{if(3===e.code&&Fn)return;this._setErrorState()}"OFF"!==this._watchState&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new t.Event("error",e)),this._finish()}},i.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},i.prototype._setupUI=function(e){var i=this;if(this._container.addEventListener("contextmenu",function(t){return t.preventDefault()}),this._geolocateButton=r.create("button","mapboxgl-ctrl-geolocate",this._container),r.create("span","mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden",!0),this._geolocateButton.type="button",!1===e){t.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");var n=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=n,this._geolocateButton.setAttribute("aria-label",n)}else{var o=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=o,this._geolocateButton.setAttribute("aria-label",o)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=r.create("div","mapboxgl-user-location-dot"),this._userLocationDotMarker=new Ln(this._dotElement),this._circleElement=r.create("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Ln({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",function(e){e.geolocateSource||"ACTIVE_LOCK"!==i._watchState||e.originalEvent&&"resize"===e.originalEvent.type||(i._watchState="BACKGROUND",i._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),i._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),i.fire(new t.Event("trackuserlocationend")))})},i.prototype.trigger=function(){if(!this._setup)return t.warnOnce("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new t.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Rn--,Fn=!1,this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this.fire(new t.Event("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new t.Event("trackuserlocationstart"))}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"BACKGROUND":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");break;case"BACKGROUND_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error")}if("OFF"===this._watchState&&void 0!==this._geolocationWatchID)this._clearWatch();else if(void 0===this._geolocationWatchID){var e;this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),++Rn>1?(e={maximumAge:6e5,timeout:0},Fn=!0):(e=this.options.positionOptions,Fn=!1),this._geolocationWatchID=t.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,e)}}else t.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},i.prototype._clearWatch=function(){t.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)},i}(t.Evented),Un={maxWidth:100,unit:"metric"},Vn=function(e){this.options=t.extend({},Un,e),t.bindAll(["_onMove","setUnit"],this)};function Nn(t,e,r){var i=r&&r.maxWidth||100,n=t._container.clientHeight/2,o=t.unproject([0,n]),a=t.unproject([i,n]),s=o.distanceTo(a);if(r&&"imperial"===r.unit){var l=3.2808*s;l>5280?jn(e,i,l/5280,t._getUIString("ScaleControl.Miles")):jn(e,i,l,t._getUIString("ScaleControl.Feet"))}else r&&"nautical"===r.unit?jn(e,i,s/1852,t._getUIString("ScaleControl.NauticalMiles")):s>=1e3?jn(e,i,s/1e3,t._getUIString("ScaleControl.Kilometers")):jn(e,i,s,t._getUIString("ScaleControl.Meters"))}function jn(t,e,r,i){var n,o,a,s=(n=r,(o=Math.pow(10,(""+Math.floor(n)).length-1))*(a=(a=n/o)>=10?10:a>=5?5:a>=3?3:a>=2?2:a>=1?1:function(t){var e=Math.pow(10,Math.ceil(-Math.log(t)/Math.LN10));return Math.round(t*e)/e}(a)));t.style.width=e*(s/r)+"px",t.innerHTML=s+"&nbsp;"+i}Vn.prototype.getDefaultPosition=function(){return"bottom-left"},Vn.prototype._onMove=function(){Nn(this._map,this._container,this.options)},Vn.prototype.onAdd=function(t){return this._map=t,this._container=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",t.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container},Vn.prototype.onRemove=function(){r.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},Vn.prototype.setUnit=function(t){this.options.unit=t,Nn(this._map,this._container,this.options)};var qn=function(e){this._fullscreen=!1,e&&e.container&&(e.container instanceof t.window.HTMLElement?this._container=e.container:t.warnOnce("Full screen control 'container' must be a DOM element.")),t.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in t.window.document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in t.window.document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in t.window.document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in t.window.document&&(this._fullscreenchange="MSFullscreenChange")};qn.prototype.onAdd=function(e){return this._map=e,this._container||(this._container=this._map.getContainer()),this._controlContainer=r.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",t.warnOnce("This device does not support fullscreen mode.")),this._controlContainer},qn.prototype.onRemove=function(){r.remove(this._controlContainer),this._map=null,t.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},qn.prototype._checkFullscreenSupport=function(){return!!(t.window.document.fullscreenEnabled||t.window.document.mozFullScreenEnabled||t.window.document.msFullscreenEnabled||t.window.document.webkitFullscreenEnabled)},qn.prototype._setupUI=function(){var e=this._fullscreenButton=r.create("button","mapboxgl-ctrl-fullscreen",this._controlContainer);r.create("span","mapboxgl-ctrl-icon",e).setAttribute("aria-hidden",!0),e.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),t.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},qn.prototype._updateTitle=function(){var t=this._getTitle();this._fullscreenButton.setAttribute("aria-label",t),this._fullscreenButton.title=t},qn.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")},qn.prototype._isFullscreen=function(){return this._fullscreen},qn.prototype._changeIcon=function(){(t.window.document.fullscreenElement||t.window.document.mozFullScreenElement||t.window.document.webkitFullscreenElement||t.window.document.msFullscreenElement)===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"),this._updateTitle())},qn.prototype._onClickFullscreen=function(){this._isFullscreen()?t.window.document.exitFullscreen?t.window.document.exitFullscreen():t.window.document.mozCancelFullScreen?t.window.document.mozCancelFullScreen():t.window.document.msExitFullscreen?t.window.document.msExitFullscreen():t.window.document.webkitCancelFullScreen&&t.window.document.webkitCancelFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen&&this._container.webkitRequestFullscreen()};var Zn={closeButton:!0,closeOnClick:!0,className:"",maxWidth:"240px"},Gn=function(e){function i(r){e.call(this),this.options=t.extend(Object.create(Zn),r),t.bindAll(["_update","_onClose","remove","_onMouseMove","_onMouseUp","_onDrag"],this)}return e&&(i.__proto__=e),(i.prototype=Object.create(e&&e.prototype)).constructor=i,i.prototype.addTo=function(e){return this._map&&this.remove(),this._map=e,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")):this._map.on("move",this._update),this.fire(new t.Event("open")),this},i.prototype.isOpen=function(){return!!this._map},i.prototype.remove=function(){return this._content&&r.remove(this._content),this._container&&(r.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),delete this._map),this.fire(new t.Event("close")),this},i.prototype.getLngLat=function(){return this._lngLat},i.prototype.setLngLat=function(e){return this._lngLat=t.LngLat.convert(e),this._pos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.remove("mapboxgl-track-pointer")),this},i.prototype.trackPointer=function(){return this._trackPointer=!0,this._pos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")),this},i.prototype.getElement=function(){return this._container},i.prototype.setText=function(e){return this.setDOMContent(t.window.document.createTextNode(e))},i.prototype.setHTML=function(e){var r,i=t.window.document.createDocumentFragment(),n=t.window.document.createElement("body");for(n.innerHTML=e;r=n.firstChild;)i.appendChild(r);return this.setDOMContent(i)},i.prototype.getMaxWidth=function(){return this._container&&this._container.style.maxWidth},i.prototype.setMaxWidth=function(t){return this.options.maxWidth=t,this._update(),this},i.prototype.setDOMContent=function(t){return this._createContent(),this._content.appendChild(t),this._update(),this},i.prototype.addClassName=function(t){this._container&&this._container.classList.add(t)},i.prototype.removeClassName=function(t){this._container&&this._container.classList.remove(t)},i.prototype.toggleClassName=function(t){if(this._container)return this._container.classList.toggle(t)},i.prototype._createContent=function(){this._content&&r.remove(this._content),this._content=r.create("div","mapboxgl-popup-content",this._container),this.options.closeButton&&(this._closeButton=r.create("button","mapboxgl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.setAttribute("aria-label","Close popup"),this._closeButton.innerHTML="&#215;",this._closeButton.addEventListener("click",this._onClose))},i.prototype._onMouseUp=function(t){this._update(t.point)},i.prototype._onMouseMove=function(t){this._update(t.point)},i.prototype._onDrag=function(t){this._update(t.point)},i.prototype._update=function(e){var i=this;if(this._map&&(this._lngLat||this._trackPointer)&&this._content&&(this._container||(this._container=r.create("div","mapboxgl-popup",this._map.getContainer()),this._tip=r.create("div","mapboxgl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(" ").forEach(function(t){return i._container.classList.add(t)}),this._trackPointer&&this._container.classList.add("mapboxgl-popup-track-pointer")),this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._map.transform.renderWorldCopies&&!this._trackPointer&&(this._lngLat=Cn(this._lngLat,this._pos,this._map.transform)),!this._trackPointer||e)){var n=this._pos=this._trackPointer&&e?e:this._map.project(this._lngLat),o=this.options.anchor,a=function e(r){if(r){if("number"==typeof r){var i=Math.round(Math.sqrt(.5*Math.pow(r,2)));return{center:new t.Point(0,0),top:new t.Point(0,r),"top-left":new t.Point(i,i),"top-right":new t.Point(-i,i),bottom:new t.Point(0,-r),"bottom-left":new t.Point(i,-i),"bottom-right":new t.Point(-i,-i),left:new t.Point(r,0),right:new t.Point(-r,0)}}if(r instanceof t.Point||Array.isArray(r)){var n=t.Point.convert(r);return{center:n,top:n,"top-left":n,"top-right":n,bottom:n,"bottom-left":n,"bottom-right":n,left:n,right:n}}return{center:t.Point.convert(r.center||[0,0]),top:t.Point.convert(r.top||[0,0]),"top-left":t.Point.convert(r["top-left"]||[0,0]),"top-right":t.Point.convert(r["top-right"]||[0,0]),bottom:t.Point.convert(r.bottom||[0,0]),"bottom-left":t.Point.convert(r["bottom-left"]||[0,0]),"bottom-right":t.Point.convert(r["bottom-right"]||[0,0]),left:t.Point.convert(r.left||[0,0]),right:t.Point.convert(r.right||[0,0])}}return e(new t.Point(0,0))}(this.options.offset);if(!o){var s,l=this._container.offsetWidth,u=this._container.offsetHeight;s=n.y+a.bottom.y<u?["top"]:n.y>this._map.transform.height-u?["bottom"]:[],n.x<l/2?s.push("left"):n.x>this._map.transform.width-l/2&&s.push("right"),o=0===s.length?"bottom":s.join("-")}var c=n.add(a[o]).round();r.setTransform(this._container,kn[o]+" translate("+c.x+"px,"+c.y+"px)"),Mn(this._container,o,"popup")}},i.prototype._onClose=function(){this.remove()},i}(t.Evented),Xn={version:t.version,supported:e,setRTLTextPlugin:t.setRTLTextPlugin,getRTLTextPluginStatus:t.getRTLTextPluginStatus,Map:In,NavigationControl:zn,GeolocateControl:On,AttributionControl:gn,ScaleControl:Vn,FullscreenControl:qn,Popup:Gn,Marker:Ln,Style:qe,LngLat:t.LngLat,LngLatBounds:t.LngLatBounds,Point:t.Point,MercatorCoordinate:t.MercatorCoordinate,Evented:t.Evented,config:t.config,prewarm:function(){Ot().acquire(Lt)},clearPrewarmedResources:function(){var t=Rt;t&&(t.isPreloaded()&&1===t.numActive()?(t.release(Lt),Rt=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},get accessToken(){return t.config.ACCESS_TOKEN},set accessToken(e){t.config.ACCESS_TOKEN=e},get baseApiUrl(){return t.config.API_URL},set baseApiUrl(e){t.config.API_URL=e},get workerCount(){return Bt.workerCount},set workerCount(t){Bt.workerCount=t},get maxParallelImageRequests(){return t.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(e){t.config.MAX_PARALLEL_IMAGE_REQUESTS=e},clearStorage:function(e){t.clearTileCache(e)},workerUrl:""};return Xn}),r});
+//# sourceMappingURL=/sm/611dc9144edc1667053630223290333ac72ae99b79697a40bc8590e55c95a75d.map \ No newline at end of file
diff --git a/assets/lib/mermaid/mermaid.min.js b/assets/lib/mermaid/mermaid.min.js
index 3d6ba36b..75b86f97 100644
--- a/assets/lib/mermaid/mermaid.min.js
+++ b/assets/lib/mermaid/mermaid.min.js
@@ -1,11 +1,4 @@
-!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.mermaid=e():t.mermaid=e()}("undefined"!=typeof self?self:this,(function(){return 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}return 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=901)}([function(t,e,n){"use strict";var r=function(t,e){return t<e?-1:t>e?1:t>=e?0:NaN},i=function(t){var e;return 1===t.length&&(e=t,t=function(t,n){return r(e(t),n)}),{left:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var o=r+i>>>1;t(e[o],n)<0?r=o+1:i=o}return r},right:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var o=r+i>>>1;t(e[o],n)>0?i=o:r=o+1}return r}}};var o=i(r),a=o.right,u=o.left,s=a,c=function(t,e){null==e&&(e=f);for(var n=0,r=t.length-1,i=t[0],o=new Array(r<0?0:r);n<r;)o[n]=e(i,i=t[++n]);return o};function f(t,e){return[t,e]}var l=function(t,e,n){var r,i,o,a,u=t.length,s=e.length,c=new Array(u*s);for(null==n&&(n=f),r=o=0;r<u;++r)for(a=t[r],i=0;i<s;++i,++o)c[o]=n(a,e[i]);return c},h=function(t,e){return e<t?-1:e>t?1:e>=t?0:NaN},d=function(t){return null===t?NaN:+t},p=function(t,e){var n,r,i=t.length,o=0,a=-1,u=0,s=0;if(null==e)for(;++a<i;)isNaN(n=d(t[a]))||(s+=(r=n-u)*(n-(u+=r/++o)));else for(;++a<i;)isNaN(n=d(e(t[a],a,t)))||(s+=(r=n-u)*(n-(u+=r/++o)));if(o>1)return s/(o-1)},g=function(t,e){var n=p(t,e);return n?Math.sqrt(n):n},y=function(t,e){var n,r,i,o=t.length,a=-1;if(null==e){for(;++a<o;)if(null!=(n=t[a])&&n>=n)for(r=i=n;++a<o;)null!=(n=t[a])&&(r>n&&(r=n),i<n&&(i=n))}else for(;++a<o;)if(null!=(n=e(t[a],a,t))&&n>=n)for(r=i=n;++a<o;)null!=(n=e(t[a],a,t))&&(r>n&&(r=n),i<n&&(i=n));return[r,i]},b=Array.prototype,v=b.slice,m=b.map,_=function(t){return function(){return t}},w=function(t){return t},x=function(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)),o=new Array(i);++r<i;)o[r]=t+r*n;return o},k=Math.sqrt(50),E=Math.sqrt(10),A=Math.sqrt(2),S=function(t,e,n){var r,i,o,a,u=-1;if(n=+n,(t=+t)===(e=+e)&&n>0)return[t];if((r=e<t)&&(i=t,t=e,e=i),0===(a=M(t,e,n))||!isFinite(a))return[];if(a>0)for(t=Math.ceil(t/a),e=Math.floor(e/a),o=new Array(i=Math.ceil(e-t+1));++u<i;)o[u]=(t+u)*a;else for(t=Math.floor(t*a),e=Math.ceil(e*a),o=new Array(i=Math.ceil(t-e+1));++u<i;)o[u]=(t-u)/a;return r&&o.reverse(),o};function M(t,e,n){var r=(e-t)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),o=r/Math.pow(10,i);return i>=0?(o>=k?10:o>=E?5:o>=A?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=k?10:o>=E?5:o>=A?2:1)}function T(t,e,n){var r=Math.abs(e-t)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),o=r/i;return o>=k?i*=10:o>=E?i*=5:o>=A&&(i*=2),e<t?-i:i}var O=function(t){return Math.ceil(Math.log(t.length)/Math.LN2)+1},D=function(){var t=w,e=y,n=O;function r(r){var i,o,a=r.length,u=new Array(a);for(i=0;i<a;++i)u[i]=t(r[i],i,r);var c=e(u),f=c[0],l=c[1],h=n(u,f,l);Array.isArray(h)||(h=T(f,l,h),h=x(Math.ceil(f/h)*h,l,h));for(var d=h.length;h[0]<=f;)h.shift(),--d;for(;h[d-1]>l;)h.pop(),--d;var p,g=new Array(d+1);for(i=0;i<=d;++i)(p=g[i]=[]).x0=i>0?h[i-1]:f,p.x1=i<d?h[i]:l;for(i=0;i<a;++i)f<=(o=u[i])&&o<=l&&g[s(h,o,0,d)].push(r[i]);return g}return r.value=function(e){return arguments.length?(t="function"==typeof e?e:_(e),r):t},r.domain=function(t){return arguments.length?(e="function"==typeof t?t:_([t[0],t[1]]),r):e},r.thresholds=function(t){return arguments.length?(n="function"==typeof t?t:Array.isArray(t)?_(v.call(t)):_(t),r):n},r},C=function(t,e,n){if(null==n&&(n=d),r=t.length){if((e=+e)<=0||r<2)return+n(t[0],0,t);if(e>=1)return+n(t[r-1],r-1,t);var r,i=(r-1)*e,o=Math.floor(i),a=+n(t[o],o,t);return a+(+n(t[o+1],o+1,t)-a)*(i-o)}},N=function(t,e,n){return t=m.call(t,d).sort(r),Math.ceil((n-e)/(2*(C(t,.75)-C(t,.25))*Math.pow(t.length,-1/3)))},I=function(t,e,n){return Math.ceil((n-e)/(3.5*g(t)*Math.pow(t.length,-1/3)))},R=function(t,e){var n,r,i=t.length,o=-1;if(null==e){for(;++o<i;)if(null!=(n=t[o])&&n>=n)for(r=n;++o<i;)null!=(n=t[o])&&n>r&&(r=n)}else for(;++o<i;)if(null!=(n=e(t[o],o,t))&&n>=n)for(r=n;++o<i;)null!=(n=e(t[o],o,t))&&n>r&&(r=n);return r},j=function(t,e){var n,r=t.length,i=r,o=-1,a=0;if(null==e)for(;++o<r;)isNaN(n=d(t[o]))?--i:a+=n;else for(;++o<r;)isNaN(n=d(e(t[o],o,t)))?--i:a+=n;if(i)return a/i},L=function(t,e){var n,i=t.length,o=-1,a=[];if(null==e)for(;++o<i;)isNaN(n=d(t[o]))||a.push(n);else for(;++o<i;)isNaN(n=d(e(t[o],o,t)))||a.push(n);return C(a.sort(r),.5)},B=function(t){for(var e,n,r,i=t.length,o=-1,a=0;++o<i;)a+=t[o].length;for(n=new Array(a);--i>=0;)for(e=(r=t[i]).length;--e>=0;)n[--a]=r[e];return n},P=function(t,e){var n,r,i=t.length,o=-1;if(null==e){for(;++o<i;)if(null!=(n=t[o])&&n>=n)for(r=n;++o<i;)null!=(n=t[o])&&r>n&&(r=n)}else for(;++o<i;)if(null!=(n=e(t[o],o,t))&&n>=n)for(r=n;++o<i;)null!=(n=e(t[o],o,t))&&r>n&&(r=n);return r},F=function(t,e){for(var n=e.length,r=new Array(n);n--;)r[n]=t[e[n]];return r},q=function(t,e){if(n=t.length){var n,i,o=0,a=0,u=t[a];for(null==e&&(e=r);++o<n;)(e(i=t[o],u)<0||0!==e(u,u))&&(u=i,a=o);return 0===e(u,u)?a:void 0}},U=function(t,e,n){for(var r,i,o=(null==n?t.length:n)-(e=null==e?0:+e);o;)i=Math.random()*o--|0,r=t[o+e],t[o+e]=t[i+e],t[i+e]=r;return t},z=function(t,e){var n,r=t.length,i=-1,o=0;if(null==e)for(;++i<r;)(n=+t[i])&&(o+=n);else for(;++i<r;)(n=+e(t[i],i,t))&&(o+=n);return o},Y=function(t){if(!(i=t.length))return[];for(var e=-1,n=P(t,V),r=new Array(n);++e<n;)for(var i,o=-1,a=r[e]=new Array(i);++o<i;)a[o]=t[o][e];return r};function V(t){return t.length}var G=function(){return Y(arguments)};n.d(e,"b",(function(){return s})),n.d(e,"d",(function(){return a})),n.d(e,"c",(function(){return u})),n.d(e,"a",(function(){return r})),n.d(e,"e",(function(){return i})),n.d(e,"f",(function(){return l})),n.d(e,"g",(function(){return h})),n.d(e,"h",(function(){return g})),n.d(e,"i",(function(){return y})),n.d(e,"j",(function(){return D})),n.d(e,"w",(function(){return N})),n.d(e,"x",(function(){return I})),n.d(e,"y",(function(){return O})),n.d(e,"k",(function(){return R})),n.d(e,"l",(function(){return j})),n.d(e,"m",(function(){return L})),n.d(e,"n",(function(){return B})),n.d(e,"o",(function(){return P})),n.d(e,"p",(function(){return c})),n.d(e,"q",(function(){return F})),n.d(e,"r",(function(){return C})),n.d(e,"s",(function(){return x})),n.d(e,"t",(function(){return q})),n.d(e,"u",(function(){return U})),n.d(e,"v",(function(){return z})),n.d(e,"B",(function(){return S})),n.d(e,"z",(function(){return M})),n.d(e,"A",(function(){return T})),n.d(e,"C",(function(){return Y})),n.d(e,"D",(function(){return p})),n.d(e,"E",(function(){return G}))},function(t,e,n){(function(t,r){var i=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,2],n=[1,3],r=[1,4],i=[2,4],o=[1,9],a=[1,11],u=[1,12],s=[1,14],c=[1,15],f=[1,16],l=[1,18],h=[1,19],d=[1,20],p=[1,21],g=[1,22],y=[1,23],b=[1,25],v=[1,26],m=[1,4,5,10,15,16,17,19,21,22,23,24,25,27,29,30,31,42],_=[1,34],w=[4,5,10,15,16,17,19,21,22,23,24,25,27,31,42],x=[4,5,10,15,16,17,19,21,22,23,24,25,27,30,31,42],k=[4,5,10,15,16,17,19,21,22,23,24,25,27,29,31,42],E=[40,41,42],A={trace:function(){},yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,participant:10,actor:11,AS:12,restOfLine:13,signal:14,autonumber:15,activate:16,deactivate:17,note_statement:18,title:19,text2:20,loop:21,end:22,rect:23,opt:24,alt:25,else_sections:26,par:27,par_sections:28,and:29,else:30,note:31,placement:32,over:33,actor_pair:34,spaceList:35,",":36,left_of:37,right_of:38,signaltype:39,"+":40,"-":41,ACTOR:42,SOLID_OPEN_ARROW:43,DOTTED_OPEN_ARROW:44,SOLID_ARROW:45,DOTTED_ARROW:46,SOLID_CROSS:47,DOTTED_CROSS:48,TXT:49,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",10:"participant",12:"AS",13:"restOfLine",15:"autonumber",16:"activate",17:"deactivate",19:"title",21:"loop",22:"end",23:"rect",24:"opt",25:"alt",27:"par",29:"and",30:"else",31:"note",33:"over",36:",",37:"left_of",38:"right_of",40:"+",41:"-",42:"ACTOR",43:"SOLID_OPEN_ARROW",44:"DOTTED_OPEN_ARROW",45:"SOLID_ARROW",46:"DOTTED_ARROW",47:"SOLID_CROSS",48:"DOTTED_CROSS",49:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,5],[9,3],[9,2],[9,1],[9,3],[9,3],[9,2],[9,3],[9,4],[9,4],[9,4],[9,4],[9,4],[28,1],[28,4],[26,1],[26,4],[18,4],[18,4],[35,2],[35,1],[34,3],[34,1],[32,1],[32,1],[14,5],[14,5],[14,4],[11,1],[39,1],[39,1],[39,1],[39,1],[39,1],[39,1],[20,1]],performAction:function(t,e,n,r,i,o,a){var u=o.length-1;switch(i){case 3:return r.apply(o[u]),o[u];case 4:this.$=[];break;case 5:o[u-1].push(o[u]),this.$=o[u-1];break;case 6:case 7:this.$=o[u];break;case 8:this.$=[];break;case 9:o[u-3].description=o[u-1],this.$=o[u-3];break;case 10:this.$=o[u-1];break;case 12:r.enableSequenceNumbers();break;case 13:this.$={type:"activeStart",signalType:r.LINETYPE.ACTIVE_START,actor:o[u-1]};break;case 14:this.$={type:"activeEnd",signalType:r.LINETYPE.ACTIVE_END,actor:o[u-1]};break;case 16:this.$=[{type:"setTitle",text:o[u-1]}];break;case 17:o[u-1].unshift({type:"loopStart",loopText:o[u-2],signalType:r.LINETYPE.LOOP_START}),o[u-1].push({type:"loopEnd",loopText:o[u-2],signalType:r.LINETYPE.LOOP_END}),this.$=o[u-1];break;case 18:o[u-1].unshift({type:"rectStart",color:o[u-2],signalType:r.LINETYPE.RECT_START}),o[u-1].push({type:"rectEnd",color:o[u-2],signalType:r.LINETYPE.RECT_END}),this.$=o[u-1];break;case 19:o[u-1].unshift({type:"optStart",optText:o[u-2],signalType:r.LINETYPE.OPT_START}),o[u-1].push({type:"optEnd",optText:o[u-2],signalType:r.LINETYPE.OPT_END}),this.$=o[u-1];break;case 20:o[u-1].unshift({type:"altStart",altText:o[u-2],signalType:r.LINETYPE.ALT_START}),o[u-1].push({type:"altEnd",signalType:r.LINETYPE.ALT_END}),this.$=o[u-1];break;case 21:o[u-1].unshift({type:"parStart",parText:o[u-2],signalType:r.LINETYPE.PAR_START}),o[u-1].push({type:"parEnd",signalType:r.LINETYPE.PAR_END}),this.$=o[u-1];break;case 23:this.$=o[u-3].concat([{type:"and",parText:o[u-1],signalType:r.LINETYPE.PAR_AND},o[u]]);break;case 25:this.$=o[u-3].concat([{type:"else",altText:o[u-1],signalType:r.LINETYPE.ALT_ELSE},o[u]]);break;case 26:this.$=[o[u-1],{type:"addNote",placement:o[u-2],actor:o[u-1].actor,text:o[u]}];break;case 27:o[u-2]=[].concat(o[u-1],o[u-1]).slice(0,2),o[u-2][0]=o[u-2][0].actor,o[u-2][1]=o[u-2][1].actor,this.$=[o[u-1],{type:"addNote",placement:r.PLACEMENT.OVER,actor:o[u-2].slice(0,2),text:o[u]}];break;case 30:this.$=[o[u-2],o[u]];break;case 31:this.$=o[u];break;case 32:this.$=r.PLACEMENT.LEFTOF;break;case 33:this.$=r.PLACEMENT.RIGHTOF;break;case 34:this.$=[o[u-4],o[u-1],{type:"addMessage",from:o[u-4].actor,to:o[u-1].actor,signalType:o[u-3],msg:o[u]},{type:"activeStart",signalType:r.LINETYPE.ACTIVE_START,actor:o[u-1]}];break;case 35:this.$=[o[u-4],o[u-1],{type:"addMessage",from:o[u-4].actor,to:o[u-1].actor,signalType:o[u-3],msg:o[u]},{type:"activeEnd",signalType:r.LINETYPE.ACTIVE_END,actor:o[u-4]}];break;case 36:this.$=[o[u-3],o[u-1],{type:"addMessage",from:o[u-3].actor,to:o[u-1].actor,signalType:o[u-2],msg:o[u]}];break;case 37:this.$={type:"addActor",actor:o[u]};break;case 38:this.$=r.LINETYPE.SOLID_OPEN;break;case 39:this.$=r.LINETYPE.DOTTED_OPEN;break;case 40:this.$=r.LINETYPE.SOLID;break;case 41:this.$=r.LINETYPE.DOTTED;break;case 42:this.$=r.LINETYPE.SOLID_CROSS;break;case 43:this.$=r.LINETYPE.DOTTED_CROSS;break;case 44:this.$=o[u].substring(1).trim().replace(/\\n/gm,"\n")}},table:[{3:1,4:e,5:n,6:r},{1:[3]},{3:5,4:e,5:n,6:r},{3:6,4:e,5:n,6:r},t([1,4,5,10,15,16,17,19,21,23,24,25,27,31,42],i,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:o,5:a,8:8,9:10,10:u,11:24,14:13,15:s,16:c,17:f,18:17,19:l,21:h,23:d,24:p,25:g,27:y,31:b,42:v},t(m,[2,5]),{9:27,10:u,11:24,14:13,15:s,16:c,17:f,18:17,19:l,21:h,23:d,24:p,25:g,27:y,31:b,42:v},t(m,[2,7]),t(m,[2,8]),{11:28,42:v},{5:[1,29]},t(m,[2,12]),{11:30,42:v},{11:31,42:v},{5:[1,32]},{20:33,49:_},{13:[1,35]},{13:[1,36]},{13:[1,37]},{13:[1,38]},{13:[1,39]},{39:40,43:[1,41],44:[1,42],45:[1,43],46:[1,44],47:[1,45],48:[1,46]},{32:47,33:[1,48],37:[1,49],38:[1,50]},t([5,12,36,43,44,45,46,47,48,49],[2,37]),t(m,[2,6]),{5:[1,52],12:[1,51]},t(m,[2,11]),{5:[1,53]},{5:[1,54]},t(m,[2,15]),{5:[1,55]},{5:[2,44]},t(w,i,{7:56}),t(w,i,{7:57}),t(w,i,{7:58}),t(x,i,{26:59,7:60}),t(k,i,{28:61,7:62}),{11:65,40:[1,63],41:[1,64],42:v},t(E,[2,38]),t(E,[2,39]),t(E,[2,40]),t(E,[2,41]),t(E,[2,42]),t(E,[2,43]),{11:66,42:v},{11:68,34:67,42:v},{42:[2,32]},{42:[2,33]},{13:[1,69]},t(m,[2,10]),t(m,[2,13]),t(m,[2,14]),t(m,[2,16]),{4:o,5:a,8:8,9:10,10:u,11:24,14:13,15:s,16:c,17:f,18:17,19:l,21:h,22:[1,70],23:d,24:p,25:g,27:y,31:b,42:v},{4:o,5:a,8:8,9:10,10:u,11:24,14:13,15:s,16:c,17:f,18:17,19:l,21:h,22:[1,71],23:d,24:p,25:g,27:y,31:b,42:v},{4:o,5:a,8:8,9:10,10:u,11:24,14:13,15:s,16:c,17:f,18:17,19:l,21:h,22:[1,72],23:d,24:p,25:g,27:y,31:b,42:v},{22:[1,73]},{4:o,5:a,8:8,9:10,10:u,11:24,14:13,15:s,16:c,17:f,18:17,19:l,21:h,22:[2,24],23:d,24:p,25:g,27:y,30:[1,74],31:b,42:v},{22:[1,75]},{4:o,5:a,8:8,9:10,10:u,11:24,14:13,15:s,16:c,17:f,18:17,19:l,21:h,22:[2,22],23:d,24:p,25:g,27:y,29:[1,76],31:b,42:v},{11:77,42:v},{11:78,42:v},{20:79,49:_},{20:80,49:_},{20:81,49:_},{36:[1,82],49:[2,31]},{5:[1,83]},t(m,[2,17]),t(m,[2,18]),t(m,[2,19]),t(m,[2,20]),{13:[1,84]},t(m,[2,21]),{13:[1,85]},{20:86,49:_},{20:87,49:_},{5:[2,36]},{5:[2,26]},{5:[2,27]},{11:88,42:v},t(m,[2,9]),t(x,i,{7:60,26:89}),t(k,i,{7:62,28:90}),{5:[2,34]},{5:[2,35]},{49:[2,30]},{22:[2,25]},{22:[2,23]}],defaultActions:{5:[2,1],6:[2,2],34:[2,44],49:[2,32],50:[2,33],79:[2,36],80:[2,26],81:[2,27],86:[2,34],87:[2,35],88:[2,30],89:[2,25],90:[2,23]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],o=[],a=this.table,u="",s=0,c=0,f=0,l=2,h=1,d=o.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var b=p.yylloc;o.push(b);var v=p.options&&p.options.ranges;function m(){var t;return"number"!=typeof(t=r.pop()||p.lex()||h)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var _,w,x,k,E,A,S,M,T,O={};;){if(x=n[n.length-1],this.defaultActions[x]?k=this.defaultActions[x]:(null==_&&(_=m()),k=a[x]&&a[x][_]),void 0===k||!k.length||!k[0]){var D="";for(A in T=[],a[x])this.terminals_[A]&&A>l&&T.push("'"+this.terminals_[A]+"'");D=p.showPosition?"Parse error on line "+(s+1)+":\n"+p.showPosition()+"\nExpecting "+T.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(s+1)+": Unexpected "+(_==h?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(D,{text:p.match,token:this.terminals_[_]||_,line:p.yylineno,loc:b,expected:T})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+x+", token: "+_);switch(k[0]){case 1:n.push(_),i.push(p.yytext),o.push(p.yylloc),n.push(k[1]),_=null,w?(_=w,w=null):(c=p.yyleng,u=p.yytext,s=p.yylineno,b=p.yylloc,f>0&&f--);break;case 2:if(S=this.productions_[k[1]][1],O.$=i[i.length-S],O._$={first_line:o[o.length-(S||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(S||1)].first_column,last_column:o[o.length-1].last_column},v&&(O._$.range=[o[o.length-(S||1)].range[0],o[o.length-1].range[1]]),void 0!==(E=this.performAction.apply(O,[u,c,s,g.yy,k[1],i,o].concat(d))))return E;S&&(n=n.slice(0,-1*S*2),i=i.slice(0,-1*S),o=o.slice(0,-1*S)),n.push(this.productions_[k[1]][0]),i.push(O.$),o.push(O._$),M=a[n[n.length-2]][n[n.length-1]],n.push(M);break;case 3:return!0}}return!0}},S={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var o in i)this[o]=i[o];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),o=0;o<i.length;o++)if((n=this._input.match(this.rules[i[o]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=o,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[o])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return 5;case 1:case 2:case 3:case 4:break;case 5:return this.begin("ID"),10;case 6:return e.yytext=e.yytext.trim(),this.begin("ALIAS"),42;case 7:return this.popState(),this.popState(),this.begin("LINE"),12;case 8:return this.popState(),this.popState(),5;case 9:return this.begin("LINE"),21;case 10:return this.begin("LINE"),23;case 11:return this.begin("LINE"),24;case 12:return this.begin("LINE"),25;case 13:return this.begin("LINE"),30;case 14:return this.begin("LINE"),27;case 15:return this.begin("LINE"),29;case 16:return this.popState(),13;case 17:return 22;case 18:return 37;case 19:return 38;case 20:return 33;case 21:return 31;case 22:return this.begin("ID"),16;case 23:return this.begin("ID"),17;case 24:return 19;case 25:return 6;case 26:return 15;case 27:return 36;case 28:return 5;case 29:return e.yytext=e.yytext.trim(),42;case 30:return 45;case 31:return 46;case 32:return 43;case 33:return 44;case 34:return 47;case 35:return 48;case 36:return 49;case 37:return 40;case 38:return 41;case 39:return 5;case 40:return"INVALID"}},rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:participant\b)/i,/^(?:[^\->:\n,;]+?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:and\b)/i,/^(?:[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\b)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\+\->:\n,;]+)/i,/^(?:->>)/i,/^(?:-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?::[^#\n;]+)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[2,3,16],inclusive:!1},ALIAS:{rules:[2,3,7,8],inclusive:!1},ID:{rules:[2,3,6],inclusive:!1},INITIAL:{rules:[0,1,3,4,5,9,10,11,12,13,14,15,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40],inclusive:!0}}};function M(){this.yy={}}return A.lexer=S,M.prototype=A,A.Parser=M,new M}();e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(r){r[1]||(console.log("Usage: "+r[0]+" FILE"),t.exit(1));var i=n(54).readFileSync(n(55).normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n(17),n(14)(t))},function(t,e){"function"==typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}}},function(t,e,n){var r=n(18),i=r.Buffer;function o(t,e){for(var n in t)e[n]=t[n]}function a(t,e,n){return i(t,e,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=r:(o(r,e),e.Buffer=a),a.prototype=Object.create(i.prototype),o(i,a),a.from=function(t,e,n){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,n)},a.alloc=function(t,e,n){if("number"!=typeof t)throw new TypeError("Argument must be a number");var r=i(t);return void 0!==e?"string"==typeof n?r.fill(e,n):r.fill(e):r.fill(0),r},a.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},a.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return r.SlowBuffer(t)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var r=new Date,i=new Date;function o(t,e,n,a){function u(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return u.floor=function(e){return t(e=new Date(+e)),e},u.ceil=function(n){return t(n=new Date(n-1)),e(n,1),t(n),n},u.round=function(t){var e=u(t),n=u.ceil(t);return t-e<n-t?e:n},u.offset=function(t,n){return e(t=new Date(+t),null==n?1:Math.floor(n)),t},u.range=function(n,r,i){var o,a=[];if(n=u.ceil(n),i=null==i?1:Math.floor(i),!(n<r&&i>0))return a;do{a.push(o=new Date(+n)),e(n,i),t(n)}while(o<n&&n<r);return a},u.filter=function(n){return o((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&&(u.count=function(e,o){return r.setTime(+e),i.setTime(+o),t(r),t(i),Math.floor(n(r,i))},u.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?u.filter(a?function(e){return a(e)%t==0}:function(e){return u.count(0,e)%t==0}):u:null}),u}},function(t,e,n){"use strict";n.d(e,"d",(function(){return r})),n.d(e,"c",(function(){return i})),n.d(e,"b",(function(){return o})),n.d(e,"a",(function(){return a})),n.d(e,"e",(function(){return u}));var r=1e3,i=6e4,o=36e5,a=864e5,u=6048e5},function(t,e,n){"use strict";n.d(e,"c",(function(){return o})),n.d(e,"b",(function(){return a})),n.d(e,"a",(function(){return u}));var r=n(115);function i(t,e){return function(n){return t+n*e}}function o(t,e){var n=e-t;return n?i(t,n>180||n<-180?n-360*Math.round(n/360):n):Object(r.a)(isNaN(t)?e:t)}function a(t){return 1==(t=+t)?u: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):Object(r.a)(isNaN(e)?n:e)}}function u(t,e){var n=e-t;return n?i(t,n):Object(r.a)(isNaN(t)?e:t)}},function(t,e,n){var r;try{r={cloneDeep:n(681),constant:n(251),defaults:n(387),each:n(252),filter:n(361),find:n(682),flatten:n(389),forEach:n(359),forIn:n(687),has:n(258),isUndefined:n(372),last:n(688),map:n(373),mapValues:n(689),max:n(690),merge:n(692),min:n(697),minBy:n(698),now:n(699),pick:n(394),range:n(395),reduce:n(375),sortBy:n(706),uniqueId:n(396),values:n(380),zipObject:n(711)}}catch(t){}r||(r=window._),t.exports=r},function(t,e,n){var r;try{r={cloneDeep:n(752),constant:n(234),defaults:n(753),each:n(311),filter:n(314),find:n(754),flatten:n(403),forEach:n(312),forIn:n(759),has:n(325),isUndefined:n(326),last:n(760),map:n(327),mapValues:n(761),max:n(762),merge:n(764),min:n(770),minBy:n(771),now:n(772),pick:n(773),range:n(778),reduce:n(329),sortBy:n(781),uniqueId:n(786),values:n(334),zipObject:n(787)}}catch(t){}r||(r=window._),t.exports=r},function(t,e,n){"use strict";n.d(e,"g",(function(){return a})),n.d(e,"c",(function(){return u})),n.d(e,"k",(function(){return s})),n.d(e,"m",(function(){return c})),n.d(e,"i",(function(){return f})),n.d(e,"a",(function(){return l})),n.d(e,"e",(function(){return h})),n.d(e,"h",(function(){return d})),n.d(e,"d",(function(){return p})),n.d(e,"l",(function(){return g})),n.d(e,"n",(function(){return y})),n.d(e,"j",(function(){return b})),n.d(e,"b",(function(){return v})),n.d(e,"f",(function(){return m}));var r=n(4),i=n(5);function o(t){return Object(r.a)((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-(e.getTimezoneOffset()-t.getTimezoneOffset())*i.c)/i.e}))}var a=o(0),u=o(1),s=o(2),c=o(3),f=o(4),l=o(5),h=o(6),d=a.range,p=u.range,g=s.range,y=c.range,b=f.range,v=l.range,m=h.range},function(t,e,n){"use strict";n.d(e,"g",(function(){return a})),n.d(e,"c",(function(){return u})),n.d(e,"k",(function(){return s})),n.d(e,"m",(function(){return c})),n.d(e,"i",(function(){return f})),n.d(e,"a",(function(){return l})),n.d(e,"e",(function(){return h})),n.d(e,"h",(function(){return d})),n.d(e,"d",(function(){return p})),n.d(e,"l",(function(){return g})),n.d(e,"n",(function(){return y})),n.d(e,"j",(function(){return b})),n.d(e,"b",(function(){return v})),n.d(e,"f",(function(){return m}));var r=n(4),i=n(5);function o(t){return Object(r.a)((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)/i.e}))}var a=o(0),u=o(1),s=o(2),c=o(3),f=o(4),l=o(5),h=o(6),d=a.range,p=u.range,g=s.range,y=c.range,b=f.range,v=l.range,m=h.range},function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"d",(function(){return o})),n.d(e,"c",(function(){return a})),n.d(e,"e",(function(){return _})),n.d(e,"h",(function(){return k})),n.d(e,"g",(function(){return E})),n.d(e,"b",(function(){return A})),n.d(e,"f",(function(){return C}));var r=n(24);function i(){}var o=.7,a=1/o,u="\\s*([+-]?\\d+)\\s*",s="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",c="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",f=/^#([0-9a-f]{3,8})$/,l=new RegExp("^rgb\\("+[u,u,u]+"\\)$"),h=new RegExp("^rgb\\("+[c,c,c]+"\\)$"),d=new RegExp("^rgba\\("+[u,u,u,s]+"\\)$"),p=new RegExp("^rgba\\("+[c,c,c,s]+"\\)$"),g=new RegExp("^hsl\\("+[s,c,c]+"\\)$"),y=new RegExp("^hsla\\("+[s,c,c,s]+"\\)$"),b={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 v(){return this.rgb().formatHex()}function m(){return this.rgb().formatRgb()}function _(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=f.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?w(e):3===n?new A(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?new A(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?new A(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=l.exec(t))?new A(e[1],e[2],e[3],1):(e=h.exec(t))?new A(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=d.exec(t))?x(e[1],e[2],e[3],e[4]):(e=p.exec(t))?x(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=g.exec(t))?O(e[1],e[2]/100,e[3]/100,1):(e=y.exec(t))?O(e[1],e[2]/100,e[3]/100,e[4]):b.hasOwnProperty(t)?w(b[t]):"transparent"===t?new A(NaN,NaN,NaN,0):null}function w(t){return new A(t>>16&255,t>>8&255,255&t,1)}function x(t,e,n,r){return r<=0&&(t=e=n=NaN),new A(t,e,n,r)}function k(t){return t instanceof i||(t=_(t)),t?new A((t=t.rgb()).r,t.g,t.b,t.opacity):new A}function E(t,e,n,r){return 1===arguments.length?k(t):new A(t,e,n,null==r?1:r)}function A(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function S(){return"#"+T(this.r)+T(this.g)+T(this.b)}function M(){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 T(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function O(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new N(t,e,n,r)}function D(t){if(t instanceof N)return new N(t.h,t.s,t.l,t.opacity);if(t instanceof i||(t=_(t)),!t)return new N;if(t instanceof N)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,o=Math.min(e,n,r),a=Math.max(e,n,r),u=NaN,s=a-o,c=(a+o)/2;return s?(u=e===a?(n-r)/s+6*(n<r):n===a?(r-e)/s+2:(e-n)/s+4,s/=c<.5?a+o:2-a-o,u*=60):s=c>0&&c<1?0:u,new N(u,s,c,t.opacity)}function C(t,e,n,r){return 1===arguments.length?D(t):new N(t,e,n,null==r?1:r)}function N(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function I(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}Object(r.a)(i,_,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:v,formatHex:v,formatHsl:function(){return D(this).formatHsl()},formatRgb:m,toString:m}),Object(r.a)(A,E,Object(r.b)(i,{brighter:function(t){return t=null==t?a:Math.pow(a,t),new A(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?o:Math.pow(o,t),new A(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:S,formatHex:S,formatRgb:M,toString:M})),Object(r.a)(N,C,Object(r.b)(i,{brighter:function(t){return t=null==t?a:Math.pow(a,t),new N(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?o:Math.pow(o,t),new N(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 A(I(t>=240?t-240:t+120,i,r),I(t,i,r),I(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+")")}}))},function(t,e,n){(function(t){!function(t,e){"use strict";function r(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}function o(t,e,n){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(n=e,e=10),this._init(t||0,e||10,n||"be"))}var a;"object"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{a=n(849).Buffer}catch(t){}function u(t,e,n){for(var r=0,i=Math.min(t.length,n),o=e;o<i;o++){var a=t.charCodeAt(o)-48;r<<=4,r|=a>=49&&a<=54?a-49+10:a>=17&&a<=22?a-17+10:15&a}return r}function s(t,e,n,r){for(var i=0,o=Math.min(t.length,n),a=e;a<o;a++){var u=t.charCodeAt(a)-48;i*=r,i+=u>=49?u-49+10:u>=17?u-17+10:u}return i}o.isBN=function(t){return t instanceof o||null!==t&&"object"==typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,n){if("number"==typeof t)return this._initNumber(t,e,n);if("object"==typeof t)return this._initArray(t,e,n);"hex"===e&&(e=16),r(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&i++,16===e?this._parseHex(t,i):this._parseBase(t,e,i),"-"===t[0]&&(this.negative=1),this.strip(),"le"===n&&this._initArray(this.toArray(),e,n)},o.prototype._initNumber=function(t,e,n){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(r(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),e,n)},o.prototype._initArray=function(t,e,n){if(r("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,a,u=0;if("be"===n)for(i=t.length-1,o=0;i>=0;i-=3)a=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=a<<u&67108863,this.words[o+1]=a>>>26-u&67108863,(u+=24)>=26&&(u-=26,o++);else if("le"===n)for(i=0,o=0;i<t.length;i+=3)a=t[i]|t[i+1]<<8|t[i+2]<<16,this.words[o]|=a<<u&67108863,this.words[o+1]=a>>>26-u&67108863,(u+=24)>=26&&(u-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var r,i,o=0;for(n=t.length-6,r=0;n>=e;n-=6)i=u(t,n,n+6),this.words[r]|=i<<o&67108863,this.words[r+1]|=i>>>26-o&4194303,(o+=24)>=26&&(o-=26,r++);n+6!==e&&(i=u(t,e,n+6),this.words[r]|=i<<o&67108863,this.words[r+1]|=i>>>26-o&4194303),this.strip()},o.prototype._parseBase=function(t,e,n){this.words=[0],this.length=1;for(var r=0,i=1;i<=67108863;i*=e)r++;r--,i=i/e|0;for(var o=t.length-n,a=o%r,u=Math.min(o,o-a)+n,c=0,f=n;f<u;f+=r)c=s(t,f,f+r,e),this.imuln(i),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c);if(0!==a){var l=1;for(c=s(t,f,t.length,e),f=0;f<a;f++)l*=e;this.imuln(l),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c)}},o.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},o.prototype.clone=function(){var t=new o(null);return this.copy(t),t},o.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},o.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var c=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],l=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function h(t,e,n){n.negative=e.negative^t.negative;var r=t.length+e.length|0;n.length=r,r=r-1|0;var i=0|t.words[0],o=0|e.words[0],a=i*o,u=67108863&a,s=a/67108864|0;n.words[0]=u;for(var c=1;c<r;c++){for(var f=s>>>26,l=67108863&s,h=Math.min(c,e.length-1),d=Math.max(0,c-t.length+1);d<=h;d++){var p=c-d|0;f+=(a=(i=0|t.words[p])*(o=0|e.words[d])+l)/67108864|0,l=67108863&a}n.words[c]=0|l,s=0|f}return 0!==s?n.words[c]=0|s:n.length--,n.strip()}o.prototype.toString=function(t,e){var n;if(e=0|e||1,16===(t=t||10)||"hex"===t){n="";for(var i=0,o=0,a=0;a<this.length;a++){var u=this.words[a],s=(16777215&(u<<i|o)).toString(16);n=0!==(o=u>>>24-i&16777215)||a!==this.length-1?c[6-s.length]+s+n:s+n,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(n=o.toString(16)+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(t===(0|t)&&t>=2&&t<=36){var h=f[t],d=l[t];n="";var p=this.clone();for(p.negative=0;!p.isZero();){var g=p.modn(d).toString(t);n=(p=p.idivn(d)).isZero()?g+n:c[h-g.length]+g+n}for(this.isZero()&&(n="0"+n);n.length%e!=0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,e){return r(void 0!==a),this.toArrayLike(a,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,n){var i=this.byteLength(),o=n||Math.max(1,i);r(i<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0"),this.strip();var a,u,s="le"===e,c=new t(o),f=this.clone();if(s){for(u=0;!f.isZero();u++)a=f.andln(255),f.iushrn(8),c[u]=a;for(;u<o;u++)c[u]=0}else{for(u=0;u<o-i;u++)c[u]=0;for(u=0;!f.isZero();u++)a=f.andln(255),f.iushrn(8),c[o-u-1]=a}return c},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,n=0;return e>=4096&&(n+=13,e>>>=13),e>=64&&(n+=7,e>>>=7),e>=8&&(n+=4,e>>>=4),e>=2&&(n+=2,e>>>=2),n+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,n=0;return 0==(8191&e)&&(n+=13,e>>>=13),0==(127&e)&&(n+=7,e>>>=7),0==(15&e)&&(n+=4,e>>>=4),0==(3&e)&&(n+=2,e>>>=2),0==(1&e)&&n++,n},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var n=this._zeroBits(this.words[e]);if(t+=n,26!==n)break}return t},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},o.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this.strip()},o.prototype.ior=function(t){return r(0==(this.negative|t.negative)),this.iuor(t)},o.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var n=0;n<e.length;n++)this.words[n]=this.words[n]&t.words[n];return this.length=e.length,this.strip()},o.prototype.iand=function(t){return r(0==(this.negative|t.negative)),this.iuand(t)},o.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,n;this.length>t.length?(e=this,n=t):(e=t,n=this);for(var r=0;r<n.length;r++)this.words[r]=e.words[r]^n.words[r];if(this!==e)for(;r<e.length;r++)this.words[r]=e.words[r];return this.length=e.length,this.strip()},o.prototype.ixor=function(t){return r(0==(this.negative|t.negative)),this.iuxor(t)},o.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){r("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),n=t%26;this._expand(e),n>0&&e--;for(var i=0;i<e;i++)this.words[i]=67108863&~this.words[i];return n>0&&(this.words[i]=~this.words[i]&67108863>>26-n),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){r("number"==typeof t&&t>=0);var n=t/26|0,i=t%26;return this._expand(n+1),this.words[n]=e?this.words[n]|1<<i:this.words[n]&~(1<<i),this.strip()},o.prototype.iadd=function(t){var e,n,r;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(n=this,r=t):(n=t,r=this);for(var i=0,o=0;o<r.length;o++)e=(0|n.words[o])+(0|r.words[o])+i,this.words[o]=67108863&e,i=e>>>26;for(;0!==i&&o<n.length;o++)e=(0|n.words[o])+i,this.words[o]=67108863&e,i=e>>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;o<n.length;o++)this.words[o]=n.words[o];return this},o.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var n,r,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(n=this,r=t):(n=t,r=this);for(var o=0,a=0;a<r.length;a++)o=(e=(0|n.words[a])-(0|r.words[a])+o)>>26,this.words[a]=67108863&e;for(;0!==o&&a<n.length;a++)o=(e=(0|n.words[a])+o)>>26,this.words[a]=67108863&e;if(0===o&&a<n.length&&n!==this)for(;a<n.length;a++)this.words[a]=n.words[a];return this.length=Math.max(this.length,a),n!==this&&(this.negative=1),this.strip()},o.prototype.sub=function(t){return this.clone().isub(t)};var d=function(t,e,n){var r,i,o,a=t.words,u=e.words,s=n.words,c=0,f=0|a[0],l=8191&f,h=f>>>13,d=0|a[1],p=8191&d,g=d>>>13,y=0|a[2],b=8191&y,v=y>>>13,m=0|a[3],_=8191&m,w=m>>>13,x=0|a[4],k=8191&x,E=x>>>13,A=0|a[5],S=8191&A,M=A>>>13,T=0|a[6],O=8191&T,D=T>>>13,C=0|a[7],N=8191&C,I=C>>>13,R=0|a[8],j=8191&R,L=R>>>13,B=0|a[9],P=8191&B,F=B>>>13,q=0|u[0],U=8191&q,z=q>>>13,Y=0|u[1],V=8191&Y,G=Y>>>13,H=0|u[2],W=8191&H,$=H>>>13,K=0|u[3],Z=8191&K,X=K>>>13,J=0|u[4],Q=8191&J,tt=J>>>13,et=0|u[5],nt=8191&et,rt=et>>>13,it=0|u[6],ot=8191&it,at=it>>>13,ut=0|u[7],st=8191&ut,ct=ut>>>13,ft=0|u[8],lt=8191&ft,ht=ft>>>13,dt=0|u[9],pt=8191&dt,gt=dt>>>13;n.negative=t.negative^e.negative,n.length=19;var yt=(c+(r=Math.imul(l,U))|0)+((8191&(i=(i=Math.imul(l,z))+Math.imul(h,U)|0))<<13)|0;c=((o=Math.imul(h,z))+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,r=Math.imul(p,U),i=(i=Math.imul(p,z))+Math.imul(g,U)|0,o=Math.imul(g,z);var bt=(c+(r=r+Math.imul(l,V)|0)|0)+((8191&(i=(i=i+Math.imul(l,G)|0)+Math.imul(h,V)|0))<<13)|0;c=((o=o+Math.imul(h,G)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,r=Math.imul(b,U),i=(i=Math.imul(b,z))+Math.imul(v,U)|0,o=Math.imul(v,z),r=r+Math.imul(p,V)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(g,V)|0,o=o+Math.imul(g,G)|0;var vt=(c+(r=r+Math.imul(l,W)|0)|0)+((8191&(i=(i=i+Math.imul(l,$)|0)+Math.imul(h,W)|0))<<13)|0;c=((o=o+Math.imul(h,$)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,r=Math.imul(_,U),i=(i=Math.imul(_,z))+Math.imul(w,U)|0,o=Math.imul(w,z),r=r+Math.imul(b,V)|0,i=(i=i+Math.imul(b,G)|0)+Math.imul(v,V)|0,o=o+Math.imul(v,G)|0,r=r+Math.imul(p,W)|0,i=(i=i+Math.imul(p,$)|0)+Math.imul(g,W)|0,o=o+Math.imul(g,$)|0;var mt=(c+(r=r+Math.imul(l,Z)|0)|0)+((8191&(i=(i=i+Math.imul(l,X)|0)+Math.imul(h,Z)|0))<<13)|0;c=((o=o+Math.imul(h,X)|0)+(i>>>13)|0)+(mt>>>26)|0,mt&=67108863,r=Math.imul(k,U),i=(i=Math.imul(k,z))+Math.imul(E,U)|0,o=Math.imul(E,z),r=r+Math.imul(_,V)|0,i=(i=i+Math.imul(_,G)|0)+Math.imul(w,V)|0,o=o+Math.imul(w,G)|0,r=r+Math.imul(b,W)|0,i=(i=i+Math.imul(b,$)|0)+Math.imul(v,W)|0,o=o+Math.imul(v,$)|0,r=r+Math.imul(p,Z)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(g,Z)|0,o=o+Math.imul(g,X)|0;var _t=(c+(r=r+Math.imul(l,Q)|0)|0)+((8191&(i=(i=i+Math.imul(l,tt)|0)+Math.imul(h,Q)|0))<<13)|0;c=((o=o+Math.imul(h,tt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,r=Math.imul(S,U),i=(i=Math.imul(S,z))+Math.imul(M,U)|0,o=Math.imul(M,z),r=r+Math.imul(k,V)|0,i=(i=i+Math.imul(k,G)|0)+Math.imul(E,V)|0,o=o+Math.imul(E,G)|0,r=r+Math.imul(_,W)|0,i=(i=i+Math.imul(_,$)|0)+Math.imul(w,W)|0,o=o+Math.imul(w,$)|0,r=r+Math.imul(b,Z)|0,i=(i=i+Math.imul(b,X)|0)+Math.imul(v,Z)|0,o=o+Math.imul(v,X)|0,r=r+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(g,Q)|0,o=o+Math.imul(g,tt)|0;var wt=(c+(r=r+Math.imul(l,nt)|0)|0)+((8191&(i=(i=i+Math.imul(l,rt)|0)+Math.imul(h,nt)|0))<<13)|0;c=((o=o+Math.imul(h,rt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,r=Math.imul(O,U),i=(i=Math.imul(O,z))+Math.imul(D,U)|0,o=Math.imul(D,z),r=r+Math.imul(S,V)|0,i=(i=i+Math.imul(S,G)|0)+Math.imul(M,V)|0,o=o+Math.imul(M,G)|0,r=r+Math.imul(k,W)|0,i=(i=i+Math.imul(k,$)|0)+Math.imul(E,W)|0,o=o+Math.imul(E,$)|0,r=r+Math.imul(_,Z)|0,i=(i=i+Math.imul(_,X)|0)+Math.imul(w,Z)|0,o=o+Math.imul(w,X)|0,r=r+Math.imul(b,Q)|0,i=(i=i+Math.imul(b,tt)|0)+Math.imul(v,Q)|0,o=o+Math.imul(v,tt)|0,r=r+Math.imul(p,nt)|0,i=(i=i+Math.imul(p,rt)|0)+Math.imul(g,nt)|0,o=o+Math.imul(g,rt)|0;var xt=(c+(r=r+Math.imul(l,ot)|0)|0)+((8191&(i=(i=i+Math.imul(l,at)|0)+Math.imul(h,ot)|0))<<13)|0;c=((o=o+Math.imul(h,at)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,r=Math.imul(N,U),i=(i=Math.imul(N,z))+Math.imul(I,U)|0,o=Math.imul(I,z),r=r+Math.imul(O,V)|0,i=(i=i+Math.imul(O,G)|0)+Math.imul(D,V)|0,o=o+Math.imul(D,G)|0,r=r+Math.imul(S,W)|0,i=(i=i+Math.imul(S,$)|0)+Math.imul(M,W)|0,o=o+Math.imul(M,$)|0,r=r+Math.imul(k,Z)|0,i=(i=i+Math.imul(k,X)|0)+Math.imul(E,Z)|0,o=o+Math.imul(E,X)|0,r=r+Math.imul(_,Q)|0,i=(i=i+Math.imul(_,tt)|0)+Math.imul(w,Q)|0,o=o+Math.imul(w,tt)|0,r=r+Math.imul(b,nt)|0,i=(i=i+Math.imul(b,rt)|0)+Math.imul(v,nt)|0,o=o+Math.imul(v,rt)|0,r=r+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,at)|0)+Math.imul(g,ot)|0,o=o+Math.imul(g,at)|0;var kt=(c+(r=r+Math.imul(l,st)|0)|0)+((8191&(i=(i=i+Math.imul(l,ct)|0)+Math.imul(h,st)|0))<<13)|0;c=((o=o+Math.imul(h,ct)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,r=Math.imul(j,U),i=(i=Math.imul(j,z))+Math.imul(L,U)|0,o=Math.imul(L,z),r=r+Math.imul(N,V)|0,i=(i=i+Math.imul(N,G)|0)+Math.imul(I,V)|0,o=o+Math.imul(I,G)|0,r=r+Math.imul(O,W)|0,i=(i=i+Math.imul(O,$)|0)+Math.imul(D,W)|0,o=o+Math.imul(D,$)|0,r=r+Math.imul(S,Z)|0,i=(i=i+Math.imul(S,X)|0)+Math.imul(M,Z)|0,o=o+Math.imul(M,X)|0,r=r+Math.imul(k,Q)|0,i=(i=i+Math.imul(k,tt)|0)+Math.imul(E,Q)|0,o=o+Math.imul(E,tt)|0,r=r+Math.imul(_,nt)|0,i=(i=i+Math.imul(_,rt)|0)+Math.imul(w,nt)|0,o=o+Math.imul(w,rt)|0,r=r+Math.imul(b,ot)|0,i=(i=i+Math.imul(b,at)|0)+Math.imul(v,ot)|0,o=o+Math.imul(v,at)|0,r=r+Math.imul(p,st)|0,i=(i=i+Math.imul(p,ct)|0)+Math.imul(g,st)|0,o=o+Math.imul(g,ct)|0;var Et=(c+(r=r+Math.imul(l,lt)|0)|0)+((8191&(i=(i=i+Math.imul(l,ht)|0)+Math.imul(h,lt)|0))<<13)|0;c=((o=o+Math.imul(h,ht)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,r=Math.imul(P,U),i=(i=Math.imul(P,z))+Math.imul(F,U)|0,o=Math.imul(F,z),r=r+Math.imul(j,V)|0,i=(i=i+Math.imul(j,G)|0)+Math.imul(L,V)|0,o=o+Math.imul(L,G)|0,r=r+Math.imul(N,W)|0,i=(i=i+Math.imul(N,$)|0)+Math.imul(I,W)|0,o=o+Math.imul(I,$)|0,r=r+Math.imul(O,Z)|0,i=(i=i+Math.imul(O,X)|0)+Math.imul(D,Z)|0,o=o+Math.imul(D,X)|0,r=r+Math.imul(S,Q)|0,i=(i=i+Math.imul(S,tt)|0)+Math.imul(M,Q)|0,o=o+Math.imul(M,tt)|0,r=r+Math.imul(k,nt)|0,i=(i=i+Math.imul(k,rt)|0)+Math.imul(E,nt)|0,o=o+Math.imul(E,rt)|0,r=r+Math.imul(_,ot)|0,i=(i=i+Math.imul(_,at)|0)+Math.imul(w,ot)|0,o=o+Math.imul(w,at)|0,r=r+Math.imul(b,st)|0,i=(i=i+Math.imul(b,ct)|0)+Math.imul(v,st)|0,o=o+Math.imul(v,ct)|0,r=r+Math.imul(p,lt)|0,i=(i=i+Math.imul(p,ht)|0)+Math.imul(g,lt)|0,o=o+Math.imul(g,ht)|0;var At=(c+(r=r+Math.imul(l,pt)|0)|0)+((8191&(i=(i=i+Math.imul(l,gt)|0)+Math.imul(h,pt)|0))<<13)|0;c=((o=o+Math.imul(h,gt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,r=Math.imul(P,V),i=(i=Math.imul(P,G))+Math.imul(F,V)|0,o=Math.imul(F,G),r=r+Math.imul(j,W)|0,i=(i=i+Math.imul(j,$)|0)+Math.imul(L,W)|0,o=o+Math.imul(L,$)|0,r=r+Math.imul(N,Z)|0,i=(i=i+Math.imul(N,X)|0)+Math.imul(I,Z)|0,o=o+Math.imul(I,X)|0,r=r+Math.imul(O,Q)|0,i=(i=i+Math.imul(O,tt)|0)+Math.imul(D,Q)|0,o=o+Math.imul(D,tt)|0,r=r+Math.imul(S,nt)|0,i=(i=i+Math.imul(S,rt)|0)+Math.imul(M,nt)|0,o=o+Math.imul(M,rt)|0,r=r+Math.imul(k,ot)|0,i=(i=i+Math.imul(k,at)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,at)|0,r=r+Math.imul(_,st)|0,i=(i=i+Math.imul(_,ct)|0)+Math.imul(w,st)|0,o=o+Math.imul(w,ct)|0,r=r+Math.imul(b,lt)|0,i=(i=i+Math.imul(b,ht)|0)+Math.imul(v,lt)|0,o=o+Math.imul(v,ht)|0;var St=(c+(r=r+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,gt)|0)+Math.imul(g,pt)|0))<<13)|0;c=((o=o+Math.imul(g,gt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,r=Math.imul(P,W),i=(i=Math.imul(P,$))+Math.imul(F,W)|0,o=Math.imul(F,$),r=r+Math.imul(j,Z)|0,i=(i=i+Math.imul(j,X)|0)+Math.imul(L,Z)|0,o=o+Math.imul(L,X)|0,r=r+Math.imul(N,Q)|0,i=(i=i+Math.imul(N,tt)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,tt)|0,r=r+Math.imul(O,nt)|0,i=(i=i+Math.imul(O,rt)|0)+Math.imul(D,nt)|0,o=o+Math.imul(D,rt)|0,r=r+Math.imul(S,ot)|0,i=(i=i+Math.imul(S,at)|0)+Math.imul(M,ot)|0,o=o+Math.imul(M,at)|0,r=r+Math.imul(k,st)|0,i=(i=i+Math.imul(k,ct)|0)+Math.imul(E,st)|0,o=o+Math.imul(E,ct)|0,r=r+Math.imul(_,lt)|0,i=(i=i+Math.imul(_,ht)|0)+Math.imul(w,lt)|0,o=o+Math.imul(w,ht)|0;var Mt=(c+(r=r+Math.imul(b,pt)|0)|0)+((8191&(i=(i=i+Math.imul(b,gt)|0)+Math.imul(v,pt)|0))<<13)|0;c=((o=o+Math.imul(v,gt)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,r=Math.imul(P,Z),i=(i=Math.imul(P,X))+Math.imul(F,Z)|0,o=Math.imul(F,X),r=r+Math.imul(j,Q)|0,i=(i=i+Math.imul(j,tt)|0)+Math.imul(L,Q)|0,o=o+Math.imul(L,tt)|0,r=r+Math.imul(N,nt)|0,i=(i=i+Math.imul(N,rt)|0)+Math.imul(I,nt)|0,o=o+Math.imul(I,rt)|0,r=r+Math.imul(O,ot)|0,i=(i=i+Math.imul(O,at)|0)+Math.imul(D,ot)|0,o=o+Math.imul(D,at)|0,r=r+Math.imul(S,st)|0,i=(i=i+Math.imul(S,ct)|0)+Math.imul(M,st)|0,o=o+Math.imul(M,ct)|0,r=r+Math.imul(k,lt)|0,i=(i=i+Math.imul(k,ht)|0)+Math.imul(E,lt)|0,o=o+Math.imul(E,ht)|0;var Tt=(c+(r=r+Math.imul(_,pt)|0)|0)+((8191&(i=(i=i+Math.imul(_,gt)|0)+Math.imul(w,pt)|0))<<13)|0;c=((o=o+Math.imul(w,gt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,r=Math.imul(P,Q),i=(i=Math.imul(P,tt))+Math.imul(F,Q)|0,o=Math.imul(F,tt),r=r+Math.imul(j,nt)|0,i=(i=i+Math.imul(j,rt)|0)+Math.imul(L,nt)|0,o=o+Math.imul(L,rt)|0,r=r+Math.imul(N,ot)|0,i=(i=i+Math.imul(N,at)|0)+Math.imul(I,ot)|0,o=o+Math.imul(I,at)|0,r=r+Math.imul(O,st)|0,i=(i=i+Math.imul(O,ct)|0)+Math.imul(D,st)|0,o=o+Math.imul(D,ct)|0,r=r+Math.imul(S,lt)|0,i=(i=i+Math.imul(S,ht)|0)+Math.imul(M,lt)|0,o=o+Math.imul(M,ht)|0;var Ot=(c+(r=r+Math.imul(k,pt)|0)|0)+((8191&(i=(i=i+Math.imul(k,gt)|0)+Math.imul(E,pt)|0))<<13)|0;c=((o=o+Math.imul(E,gt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,r=Math.imul(P,nt),i=(i=Math.imul(P,rt))+Math.imul(F,nt)|0,o=Math.imul(F,rt),r=r+Math.imul(j,ot)|0,i=(i=i+Math.imul(j,at)|0)+Math.imul(L,ot)|0,o=o+Math.imul(L,at)|0,r=r+Math.imul(N,st)|0,i=(i=i+Math.imul(N,ct)|0)+Math.imul(I,st)|0,o=o+Math.imul(I,ct)|0,r=r+Math.imul(O,lt)|0,i=(i=i+Math.imul(O,ht)|0)+Math.imul(D,lt)|0,o=o+Math.imul(D,ht)|0;var Dt=(c+(r=r+Math.imul(S,pt)|0)|0)+((8191&(i=(i=i+Math.imul(S,gt)|0)+Math.imul(M,pt)|0))<<13)|0;c=((o=o+Math.imul(M,gt)|0)+(i>>>13)|0)+(Dt>>>26)|0,Dt&=67108863,r=Math.imul(P,ot),i=(i=Math.imul(P,at))+Math.imul(F,ot)|0,o=Math.imul(F,at),r=r+Math.imul(j,st)|0,i=(i=i+Math.imul(j,ct)|0)+Math.imul(L,st)|0,o=o+Math.imul(L,ct)|0,r=r+Math.imul(N,lt)|0,i=(i=i+Math.imul(N,ht)|0)+Math.imul(I,lt)|0,o=o+Math.imul(I,ht)|0;var Ct=(c+(r=r+Math.imul(O,pt)|0)|0)+((8191&(i=(i=i+Math.imul(O,gt)|0)+Math.imul(D,pt)|0))<<13)|0;c=((o=o+Math.imul(D,gt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,r=Math.imul(P,st),i=(i=Math.imul(P,ct))+Math.imul(F,st)|0,o=Math.imul(F,ct),r=r+Math.imul(j,lt)|0,i=(i=i+Math.imul(j,ht)|0)+Math.imul(L,lt)|0,o=o+Math.imul(L,ht)|0;var Nt=(c+(r=r+Math.imul(N,pt)|0)|0)+((8191&(i=(i=i+Math.imul(N,gt)|0)+Math.imul(I,pt)|0))<<13)|0;c=((o=o+Math.imul(I,gt)|0)+(i>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,r=Math.imul(P,lt),i=(i=Math.imul(P,ht))+Math.imul(F,lt)|0,o=Math.imul(F,ht);var It=(c+(r=r+Math.imul(j,pt)|0)|0)+((8191&(i=(i=i+Math.imul(j,gt)|0)+Math.imul(L,pt)|0))<<13)|0;c=((o=o+Math.imul(L,gt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863;var Rt=(c+(r=Math.imul(P,pt))|0)+((8191&(i=(i=Math.imul(P,gt))+Math.imul(F,pt)|0))<<13)|0;return c=((o=Math.imul(F,gt))+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,s[0]=yt,s[1]=bt,s[2]=vt,s[3]=mt,s[4]=_t,s[5]=wt,s[6]=xt,s[7]=kt,s[8]=Et,s[9]=At,s[10]=St,s[11]=Mt,s[12]=Tt,s[13]=Ot,s[14]=Dt,s[15]=Ct,s[16]=Nt,s[17]=It,s[18]=Rt,0!==c&&(s[19]=c,n.length++),n};function p(t,e,n){return(new g).mulp(t,e,n)}function g(t,e){this.x=t,this.y=e}Math.imul||(d=h),o.prototype.mulTo=function(t,e){var n=this.length+t.length;return 10===this.length&&10===t.length?d(this,t,e):n<63?h(this,t,e):n<1024?function(t,e,n){n.negative=e.negative^t.negative,n.length=t.length+e.length;for(var r=0,i=0,o=0;o<n.length-1;o++){var a=i;i=0;for(var u=67108863&r,s=Math.min(o,e.length-1),c=Math.max(0,o-t.length+1);c<=s;c++){var f=o-c,l=(0|t.words[f])*(0|e.words[c]),h=67108863&l;u=67108863&(h=h+u|0),i+=(a=(a=a+(l/67108864|0)|0)+(h>>>26)|0)>>>26,a&=67108863}n.words[o]=u,r=a,a=i}return 0!==r?n.words[o]=r:n.length--,n.strip()}(this,t,e):p(this,t,e)},g.prototype.makeRBT=function(t){for(var e=new Array(t),n=o.prototype._countBits(t)-1,r=0;r<t;r++)e[r]=this.revBin(r,n,t);return e},g.prototype.revBin=function(t,e,n){if(0===t||t===n-1)return t;for(var r=0,i=0;i<e;i++)r|=(1&t)<<e-i-1,t>>=1;return r},g.prototype.permute=function(t,e,n,r,i,o){for(var a=0;a<o;a++)r[a]=e[t[a]],i[a]=n[t[a]]},g.prototype.transform=function(t,e,n,r,i,o){this.permute(o,t,e,n,r,i);for(var a=1;a<i;a<<=1)for(var u=a<<1,s=Math.cos(2*Math.PI/u),c=Math.sin(2*Math.PI/u),f=0;f<i;f+=u)for(var l=s,h=c,d=0;d<a;d++){var p=n[f+d],g=r[f+d],y=n[f+d+a],b=r[f+d+a],v=l*y-h*b;b=l*b+h*y,y=v,n[f+d]=p+y,r[f+d]=g+b,n[f+d+a]=p-y,r[f+d+a]=g-b,d!==u&&(v=s*l-c*h,h=s*h+c*l,l=v)}},g.prototype.guessLen13b=function(t,e){var n=1|Math.max(e,t),r=1&n,i=0;for(n=n/2|0;n;n>>>=1)i++;return 1<<i+1+r},g.prototype.conjugate=function(t,e,n){if(!(n<=1))for(var r=0;r<n/2;r++){var i=t[r];t[r]=t[n-r-1],t[n-r-1]=i,i=e[r],e[r]=-e[n-r-1],e[n-r-1]=-i}},g.prototype.normalize13b=function(t,e){for(var n=0,r=0;r<e/2;r++){var i=8192*Math.round(t[2*r+1]/e)+Math.round(t[2*r]/e)+n;t[r]=67108863&i,n=i<67108864?0:i/67108864|0}return t},g.prototype.convert13b=function(t,e,n,i){for(var o=0,a=0;a<e;a++)o+=0|t[a],n[2*a]=8191&o,o>>>=13,n[2*a+1]=8191&o,o>>>=13;for(a=2*e;a<i;++a)n[a]=0;r(0===o),r(0==(-8192&o))},g.prototype.stub=function(t){for(var e=new Array(t),n=0;n<t;n++)e[n]=0;return e},g.prototype.mulp=function(t,e,n){var r=2*this.guessLen13b(t.length,e.length),i=this.makeRBT(r),o=this.stub(r),a=new Array(r),u=new Array(r),s=new Array(r),c=new Array(r),f=new Array(r),l=new Array(r),h=n.words;h.length=r,this.convert13b(t.words,t.length,a,r),this.convert13b(e.words,e.length,c,r),this.transform(a,o,u,s,r,i),this.transform(c,o,f,l,r,i);for(var d=0;d<r;d++){var p=u[d]*f[d]-s[d]*l[d];s[d]=u[d]*l[d]+s[d]*f[d],u[d]=p}return this.conjugate(u,s,r),this.transform(u,s,h,o,r,i),this.conjugate(h,o,r),this.normalize13b(h,r),n.negative=t.negative^e.negative,n.length=t.length+e.length,n.strip()},o.prototype.mul=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},o.prototype.mulf=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),p(this,t,e)},o.prototype.imul=function(t){return this.clone().mulTo(t,this)},o.prototype.imuln=function(t){r("number"==typeof t),r(t<67108864);for(var e=0,n=0;n<this.length;n++){var i=(0|this.words[n])*t,o=(67108863&i)+(67108863&e);e>>=26,e+=i/67108864|0,e+=o>>>26,this.words[n]=67108863&o}return 0!==e&&(this.words[n]=e,this.length++),this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),n=0;n<e.length;n++){var r=n/26|0,i=n%26;e[n]=(t.words[r]&1<<i)>>>i}return e}(t);if(0===e.length)return new o(1);for(var n=this,r=0;r<e.length&&0===e[r];r++,n=n.sqr());if(++r<e.length)for(var i=n.sqr();r<e.length;r++,i=i.sqr())0!==e[r]&&(n=n.mul(i));return n},o.prototype.iushln=function(t){r("number"==typeof t&&t>=0);var e,n=t%26,i=(t-n)/26,o=67108863>>>26-n<<26-n;if(0!==n){var a=0;for(e=0;e<this.length;e++){var u=this.words[e]&o,s=(0|this.words[e])-u<<n;this.words[e]=s|a,a=u>>>26-n}a&&(this.words[e]=a,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e<i;e++)this.words[e]=0;this.length+=i}return this.strip()},o.prototype.ishln=function(t){return r(0===this.negative),this.iushln(t)},o.prototype.iushrn=function(t,e,n){var i;r("number"==typeof t&&t>=0),i=e?(e-e%26)/26:0;var o=t%26,a=Math.min((t-o)/26,this.length),u=67108863^67108863>>>o<<o,s=n;if(i-=a,i=Math.max(0,i),s){for(var c=0;c<a;c++)s.words[c]=this.words[c];s.length=a}if(0===a);else if(this.length>a)for(this.length-=a,c=0;c<this.length;c++)this.words[c]=this.words[c+a];else this.words[0]=0,this.length=1;var f=0;for(c=this.length-1;c>=0&&(0!==f||c>=i);c--){var l=0|this.words[c];this.words[c]=f<<26-o|l>>>o,f=l&u}return s&&0!==f&&(s.words[s.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,n){return r(0===this.negative),this.iushrn(t,e,n)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){r("number"==typeof t&&t>=0);var e=t%26,n=(t-e)/26,i=1<<e;return!(this.length<=n)&&!!(this.words[n]&i)},o.prototype.imaskn=function(t){r("number"==typeof t&&t>=0);var e=t%26,n=(t-e)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==e&&n++,this.length=Math.min(n,this.length),0!==e){var i=67108863^67108863>>>e<<e;this.words[this.length-1]&=i}return this.strip()},o.prototype.maskn=function(t){return this.clone().imaskn(t)},o.prototype.iaddn=function(t){return r("number"==typeof t),r(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},o.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(r("number"==typeof t),r(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},o.prototype.addn=function(t){return this.clone().iaddn(t)},o.prototype.subn=function(t){return this.clone().isubn(t)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(t,e,n){var i,o,a=t.length+n;this._expand(a);var u=0;for(i=0;i<t.length;i++){o=(0|this.words[i+n])+u;var s=(0|t.words[i])*e;u=((o-=67108863&s)>>26)-(s/67108864|0),this.words[i+n]=67108863&o}for(;i<this.length-n;i++)u=(o=(0|this.words[i+n])+u)>>26,this.words[i+n]=67108863&o;if(0===u)return this.strip();for(r(-1===u),u=0,i=0;i<this.length;i++)u=(o=-(0|this.words[i])+u)>>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var n=(this.length,t.length),r=this.clone(),i=t,a=0|i.words[i.length-1];0!==(n=26-this._countBits(a))&&(i=i.ushln(n),r.iushln(n),a=0|i.words[i.length-1]);var u,s=r.length-i.length;if("mod"!==e){(u=new o(null)).length=s+1,u.words=new Array(u.length);for(var c=0;c<u.length;c++)u.words[c]=0}var f=r.clone()._ishlnsubmul(i,1,s);0===f.negative&&(r=f,u&&(u.words[s]=1));for(var l=s-1;l>=0;l--){var h=67108864*(0|r.words[i.length+l])+(0|r.words[i.length+l-1]);for(h=Math.min(h/a|0,67108863),r._ishlnsubmul(i,h,l);0!==r.negative;)h--,r.negative=0,r._ishlnsubmul(i,1,l),r.isZero()||(r.negative^=1);u&&(u.words[l]=h)}return u&&u.strip(),r.strip(),"div"!==e&&0!==n&&r.iushrn(n),{div:u||null,mod:r}},o.prototype.divmod=function(t,e,n){return r(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(u=this.neg().divmod(t,e),"mod"!==e&&(i=u.div.neg()),"div"!==e&&(a=u.mod.neg(),n&&0!==a.negative&&a.iadd(t)),{div:i,mod:a}):0===this.negative&&0!==t.negative?(u=this.divmod(t.neg(),e),"mod"!==e&&(i=u.div.neg()),{div:i,mod:u.mod}):0!=(this.negative&t.negative)?(u=this.neg().divmod(t.neg(),e),"div"!==e&&(a=u.mod.neg(),n&&0!==a.negative&&a.isub(t)),{div:u.div,mod:a}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,e);var i,a,u},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var n=0!==e.div.negative?e.mod.isub(t):e.mod,r=t.ushrn(1),i=t.andln(1),o=n.cmp(r);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){r(t<=67108863);for(var e=(1<<26)%t,n=0,i=this.length-1;i>=0;i--)n=(e*n+(0|this.words[i]))%t;return n},o.prototype.idivn=function(t){r(t<=67108863);for(var e=0,n=this.length-1;n>=0;n--){var i=(0|this.words[n])+67108864*e;this.words[n]=i/t|0,e=i%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){r(0===t.negative),r(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),a=new o(0),u=new o(0),s=new o(1),c=0;e.isEven()&&n.isEven();)e.iushrn(1),n.iushrn(1),++c;for(var f=n.clone(),l=e.clone();!e.isZero();){for(var h=0,d=1;0==(e.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(e.iushrn(h);h-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(f),a.isub(l)),i.iushrn(1),a.iushrn(1);for(var p=0,g=1;0==(n.words[0]&g)&&p<26;++p,g<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(u.isOdd()||s.isOdd())&&(u.iadd(f),s.isub(l)),u.iushrn(1),s.iushrn(1);e.cmp(n)>=0?(e.isub(n),i.isub(u),a.isub(s)):(n.isub(e),u.isub(i),s.isub(a))}return{a:u,b:s,gcd:n.iushln(c)}},o.prototype._invmp=function(t){r(0===t.negative),r(!t.isZero());var e=this,n=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,a=new o(1),u=new o(0),s=n.clone();e.cmpn(1)>0&&n.cmpn(1)>0;){for(var c=0,f=1;0==(e.words[0]&f)&&c<26;++c,f<<=1);if(c>0)for(e.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(s),a.iushrn(1);for(var l=0,h=1;0==(n.words[0]&h)&&l<26;++l,h<<=1);if(l>0)for(n.iushrn(l);l-- >0;)u.isOdd()&&u.iadd(s),u.iushrn(1);e.cmp(n)>=0?(e.isub(n),a.isub(u)):(n.isub(e),u.isub(a))}return(i=0===e.cmpn(1)?a:u).cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),n=t.clone();e.negative=0,n.negative=0;for(var r=0;e.isEven()&&n.isEven();r++)e.iushrn(1),n.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=e.cmp(n);if(i<0){var o=e;e=n,n=o}else if(0===i||0===n.cmpn(1))break;e.isub(n)}return n.iushln(r)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){r("number"==typeof t);var e=t%26,n=(t-e)/26,i=1<<e;if(this.length<=n)return this._expand(n+1),this.words[n]|=i,this;for(var o=i,a=n;0!==o&&a<this.length;a++){var u=0|this.words[a];o=(u+=o)>>>26,u&=67108863,this.words[a]=u}return 0!==o&&(this.words[a]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,n=t<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)e=1;else{n&&(t=-t),r(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:i<t?-1:1}return 0!==this.negative?0|-e:e},o.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},o.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,n=this.length-1;n>=0;n--){var r=0|this.words[n],i=0|t.words[n];if(r!==i){r<i?e=-1:r>i&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new x(t)},o.prototype.toRed=function(t){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return r(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return r(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var y={k256:null,p224:null,p192:null,p25519:null};function b(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function v(){b.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function m(){b.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){b.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function w(){b.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function x(t){if("string"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else r(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function k(t){x.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}b.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},b.prototype.ireduce=function(t){var e,n=t;do{this.split(n,this.tmp),e=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(e>this.n);var r=e<this.n?-1:n.ucmp(this.p);return 0===r?(n.words[0]=0,n.length=1):r>0?n.isub(this.p):n.strip(),n},b.prototype.split=function(t,e){t.iushrn(this.n,0,e)},b.prototype.imulK=function(t){return t.imul(this.k)},i(v,b),v.prototype.split=function(t,e){for(var n=Math.min(t.length,9),r=0;r<n;r++)e.words[r]=t.words[r];if(e.length=n,t.length<=9)return t.words[0]=0,void(t.length=1);var i=t.words[9];for(e.words[e.length++]=4194303&i,r=10;r<t.length;r++){var o=0|t.words[r];t.words[r-10]=(4194303&o)<<4|i>>>22,i=o}i>>>=22,t.words[r-10]=i,0===i&&t.length>10?t.length-=10:t.length-=9},v.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,n=0;n<t.length;n++){var r=0|t.words[n];e+=977*r,t.words[n]=67108863&e,e=64*r+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},i(m,b),i(_,b),i(w,b),w.prototype.imulK=function(t){for(var e=0,n=0;n<t.length;n++){var r=19*(0|t.words[n])+e,i=67108863&r;r>>>=26,t.words[n]=i,e=r}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(y[t])return y[t];var e;if("k256"===t)e=new v;else if("p224"===t)e=new m;else if("p192"===t)e=new _;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new w}return y[t]=e,e},x.prototype._verify1=function(t){r(0===t.negative,"red works only with positives"),r(t.red,"red works only with red numbers")},x.prototype._verify2=function(t,e){r(0==(t.negative|e.negative),"red works only with positives"),r(t.red&&t.red===e.red,"red works only with red numbers")},x.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},x.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},x.prototype.add=function(t,e){this._verify2(t,e);var n=t.add(e);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},x.prototype.iadd=function(t,e){this._verify2(t,e);var n=t.iadd(e);return n.cmp(this.m)>=0&&n.isub(this.m),n},x.prototype.sub=function(t,e){this._verify2(t,e);var n=t.sub(e);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},x.prototype.isub=function(t,e){this._verify2(t,e);var n=t.isub(e);return n.cmpn(0)<0&&n.iadd(this.m),n},x.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},x.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},x.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},x.prototype.isqr=function(t){return this.imul(t,t.clone())},x.prototype.sqr=function(t){return this.mul(t,t)},x.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(r(e%2==1),3===e){var n=this.m.add(new o(1)).iushrn(2);return this.pow(t,n)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);r(!i.isZero());var u=new o(1).toRed(this),s=u.redNeg(),c=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new o(2*f*f).toRed(this);0!==this.pow(f,c).cmp(s);)f.redIAdd(s);for(var l=this.pow(f,i),h=this.pow(t,i.addn(1).iushrn(1)),d=this.pow(t,i),p=a;0!==d.cmp(u);){for(var g=d,y=0;0!==g.cmp(u);y++)g=g.redSqr();r(y<p);var b=this.pow(l,new o(1).iushln(p-y-1));h=h.redMul(b),l=b.redSqr(),d=d.redMul(l),p=y}return h},x.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},x.prototype.pow=function(t,e){if(e.isZero())return new o(1).toRed(this);if(0===e.cmpn(1))return t.clone();var n=new Array(16);n[0]=new o(1).toRed(this),n[1]=t;for(var r=2;r<n.length;r++)n[r]=this.mul(n[r-1],t);var i=n[0],a=0,u=0,s=e.bitLength()%26;for(0===s&&(s=26),r=e.length-1;r>=0;r--){for(var c=e.words[r],f=s-1;f>=0;f--){var l=c>>f&1;i!==n[0]&&(i=this.sqr(i)),0!==l||0!==a?(a<<=1,a|=l,(4===++u||0===r&&0===f)&&(i=this.mul(i,n[a]),u=0,a=0)):u=0}s=26}return i},x.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},x.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new k(t)},i(k,x),k.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},k.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},k.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var n=t.imul(e),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},k.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var n=t.mul(e),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},k.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t,this)}).call(this,n(14)(t))},function(t,e,n){"use strict";var r=n(66),i=n(113),o=function(t){return Object(i.a)(Object(r.a)(t).call(document.documentElement))},a=0;function u(){return new s}function s(){this._="@"+(++a).toString(36)}s.prototype=u.prototype={constructor:s,get:function(t){for(var e=this._;!(e in t);)if(!(t=t.parentNode))return;return t[e]},set:function(t,e){return t[this._]=e},remove:function(t){return this._ in t&&delete t[this._]},toString:function(){return this._}};var c=n(203),f=n(285),l=n(105),h=n(68),d=n(67),p=n(49),g=function(t){return"string"==typeof t?new p.a([document.querySelectorAll(t)],[document.documentElement]):new p.a([null==t?[]:t],p.c)},y=n(106),b=n(204),v=n(205),m=n(284),_=n(112),w=function(t,e){null==e&&(e=Object(_.a)().touches);for(var n=0,r=e?e.length:0,i=new Array(r);n<r;++n)i[n]=Object(d.a)(t,e[n]);return i},x=n(107),k=n(47);n.d(e,"b",(function(){return o})),n.d(e,"c",(function(){return r.a})),n.d(e,"f",(function(){return u})),n.d(e,"g",(function(){return c.a})),n.d(e,"h",(function(){return f.a})),n.d(e,"i",(function(){return l.a})),n.d(e,"j",(function(){return h.a})),n.d(e,"a",(function(){return d.a})),n.d(e,"k",(function(){return i.a})),n.d(e,"l",(function(){return g})),n.d(e,"m",(function(){return p.b})),n.d(e,"n",(function(){return y.a})),n.d(e,"o",(function(){return b.a})),n.d(e,"p",(function(){return v.b})),n.d(e,"q",(function(){return m.a})),n.d(e,"r",(function(){return w})),n.d(e,"s",(function(){return x.a})),n.d(e,"e",(function(){return k.c})),n.d(e,"d",(function(){return k.a}))},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e){var n=Array.isArray;t.exports=n},function(t,e){var n=Array.isArray;t.exports=n},function(t,e){var n,r,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function u(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(t){n=o}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(t){r=a}}();var s,c=[],f=!1,l=-1;function h(){f&&s&&(f=!1,s.length?c=s.concat(c):l=-1,c.length&&d())}function d(){if(!f){var t=u(h);f=!0;for(var e=c.length;e;){for(s=c,c=[];++l<e;)s&&s[l].run();l=-1,e=c.length}s=null,f=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function p(t,e){this.fun=t,this.array=e}function g(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];c.push(new p(t,e)),1!==c.length||f||u(d)},p.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=g,i.addListener=g,i.once=g,i.off=g,i.removeListener=g,i.removeAllListeners=g,i.emit=g,i.prependListener=g,i.prependOnceListener=g,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t,e,n){"use strict";(function(t){
-/*!
- * The buffer module from node.js, for the browser.
- *
- * @author Feross Aboukhadijeh <http://feross.org>
- * @license MIT
- */
-var r=n(813),i=n(814),o=n(408);function a(){return s.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function u(t,e){if(a()<e)throw new RangeError("Invalid typed array length");return s.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=s.prototype:(null===t&&(t=new s(e)),t.length=e),t}function s(t,e,n){if(!(s.TYPED_ARRAY_SUPPORT||this instanceof s))return new s(t,e,n);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return l(this,t)}return c(this,t,e,n)}function c(t,e,n,r){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,n,r){if(e.byteLength,n<0||e.byteLength<n)throw new RangeError("'offset' is out of bounds");if(e.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");e=void 0===n&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,n):new Uint8Array(e,n,r);s.TYPED_ARRAY_SUPPORT?(t=e).__proto__=s.prototype:t=h(t,e);return t}(t,e,n,r):"string"==typeof e?function(t,e,n){"string"==typeof n&&""!==n||(n="utf8");if(!s.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|p(e,n),i=(t=u(t,r)).write(e,n);i!==r&&(t=t.slice(0,i));return t}(t,e,n):function(t,e){if(s.isBuffer(e)){var n=0|d(e.length);return 0===(t=u(t,n)).length?t:(e.copy(t,0,0,n),t)}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(r=e.length)!=r?u(t,0):h(t,e);if("Buffer"===e.type&&o(e.data))return h(t,e.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function f(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function l(t,e){if(f(e),t=u(t,e<0?0:0|d(e)),!s.TYPED_ARRAY_SUPPORT)for(var n=0;n<e;++n)t[n]=0;return t}function h(t,e){var n=e.length<0?0:0|d(e.length);t=u(t,n);for(var r=0;r<n;r+=1)t[r]=255&e[r];return t}function d(t){if(t>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|t}function p(t,e){if(s.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var r=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return q(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return U(t).length;default:if(r)return q(t).length;e=(""+e).toLowerCase(),r=!0}}function g(t,e,n){var r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return O(this,e,n);case"utf8":case"utf-8":return S(this,e,n);case"ascii":return M(this,e,n);case"latin1":case"binary":return T(this,e,n);case"base64":return A(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function y(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function b(t,e,n,r,i){if(0===t.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(i)return-1;n=t.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof e&&(e=s.from(e,r)),s.isBuffer(e))return 0===e.length?-1:v(t,e,n,r,i);if("number"==typeof e)return e&=255,s.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):v(t,[e],n,r,i);throw new TypeError("val must be string, number or Buffer")}function v(t,e,n,r,i){var o,a=1,u=t.length,s=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;a=2,u/=2,s/=2,n/=2}function c(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(i){var f=-1;for(o=n;o<u;o++)if(c(t,o)===c(e,-1===f?0:o-f)){if(-1===f&&(f=o),o-f+1===s)return f*a}else-1!==f&&(o-=o-f),f=-1}else for(n+s>u&&(n=u-s),o=n;o>=0;o--){for(var l=!0,h=0;h<s;h++)if(c(t,o+h)!==c(e,h)){l=!1;break}if(l)return o}return-1}function m(t,e,n,r){n=Number(n)||0;var i=t.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o=e.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var a=0;a<r;++a){var u=parseInt(e.substr(2*a,2),16);if(isNaN(u))return a;t[n+a]=u}return a}function _(t,e,n,r){return z(q(e,t.length-n),t,n,r)}function w(t,e,n,r){return z(function(t){for(var e=[],n=0;n<t.length;++n)e.push(255&t.charCodeAt(n));return e}(e),t,n,r)}function x(t,e,n,r){return w(t,e,n,r)}function k(t,e,n,r){return z(U(e),t,n,r)}function E(t,e,n,r){return z(function(t,e){for(var n,r,i,o=[],a=0;a<t.length&&!((e-=2)<0);++a)n=t.charCodeAt(a),r=n>>8,i=n%256,o.push(i),o.push(r);return o}(e,t.length-n),t,n,r)}function A(t,e,n){return 0===e&&n===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(e,n))}function S(t,e,n){n=Math.min(t.length,n);for(var r=[],i=e;i<n;){var o,a,u,s,c=t[i],f=null,l=c>239?4:c>223?3:c>191?2:1;if(i+l<=n)switch(l){case 1:c<128&&(f=c);break;case 2:128==(192&(o=t[i+1]))&&(s=(31&c)<<6|63&o)>127&&(f=s);break;case 3:o=t[i+1],a=t[i+2],128==(192&o)&&128==(192&a)&&(s=(15&c)<<12|(63&o)<<6|63&a)>2047&&(s<55296||s>57343)&&(f=s);break;case 4:o=t[i+1],a=t[i+2],u=t[i+3],128==(192&o)&&128==(192&a)&&128==(192&u)&&(s=(15&c)<<18|(63&o)<<12|(63&a)<<6|63&u)>65535&&s<1114112&&(f=s)}null===f?(f=65533,l=1):f>65535&&(f-=65536,r.push(f>>>10&1023|55296),f=56320|1023&f),r.push(f),i+=l}return function(t){var e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);var n="",r=0;for(;r<e;)n+=String.fromCharCode.apply(String,t.slice(r,r+=4096));return n}(r)}e.Buffer=s,e.SlowBuffer=function(t){+t!=t&&(t=0);return s.alloc(+t)},e.INSPECT_MAX_BYTES=50,s.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),e.kMaxLength=a(),s.poolSize=8192,s._augment=function(t){return t.__proto__=s.prototype,t},s.from=function(t,e,n){return c(null,t,e,n)},s.TYPED_ARRAY_SUPPORT&&(s.prototype.__proto__=Uint8Array.prototype,s.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&s[Symbol.species]===s&&Object.defineProperty(s,Symbol.species,{value:null,configurable:!0})),s.alloc=function(t,e,n){return function(t,e,n,r){return f(e),e<=0?u(t,e):void 0!==n?"string"==typeof r?u(t,e).fill(n,r):u(t,e).fill(n):u(t,e)}(null,t,e,n)},s.allocUnsafe=function(t){return l(null,t)},s.allocUnsafeSlow=function(t){return l(null,t)},s.isBuffer=function(t){return!(null==t||!t._isBuffer)},s.compare=function(t,e){if(!s.isBuffer(t)||!s.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var n=t.length,r=e.length,i=0,o=Math.min(n,r);i<o;++i)if(t[i]!==e[i]){n=t[i],r=e[i];break}return n<r?-1:r<n?1:0},s.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},s.concat=function(t,e){if(!o(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return s.alloc(0);var n;if(void 0===e)for(e=0,n=0;n<t.length;++n)e+=t[n].length;var r=s.allocUnsafe(e),i=0;for(n=0;n<t.length;++n){var a=t[n];if(!s.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(r,i),i+=a.length}return r},s.byteLength=p,s.prototype._isBuffer=!0,s.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)y(this,e,e+1);return this},s.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)y(this,e,e+3),y(this,e+1,e+2);return this},s.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)y(this,e,e+7),y(this,e+1,e+6),y(this,e+2,e+5),y(this,e+3,e+4);return this},s.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?S(this,0,t):g.apply(this,arguments)},s.prototype.equals=function(t){if(!s.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===s.compare(this,t)},s.prototype.inspect=function(){var t="",n=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(t+=" ... ")),"<Buffer "+t+">"},s.prototype.compare=function(t,e,n,r,i){if(!s.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),e<0||n>t.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&e>=n)return 0;if(r>=i)return-1;if(e>=n)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(r>>>=0),a=(n>>>=0)-(e>>>=0),u=Math.min(o,a),c=this.slice(r,i),f=t.slice(e,n),l=0;l<u;++l)if(c[l]!==f[l]){o=c[l],a=f[l];break}return o<a?-1:a<o?1:0},s.prototype.includes=function(t,e,n){return-1!==this.indexOf(t,e,n)},s.prototype.indexOf=function(t,e,n){return b(this,t,e,n,!0)},s.prototype.lastIndexOf=function(t,e,n){return b(this,t,e,n,!1)},s.prototype.write=function(t,e,n,r){if(void 0===e)r="utf8",n=this.length,e=0;else if(void 0===n&&"string"==typeof e)r=e,n=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-e;if((void 0===n||n>i)&&(n=i),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return m(this,t,e,n);case"utf8":case"utf-8":return _(this,t,e,n);case"ascii":return w(this,t,e,n);case"latin1":case"binary":return x(this,t,e,n);case"base64":return k(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,t,e,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function M(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;i<n;++i)r+=String.fromCharCode(127&t[i]);return r}function T(t,e,n){var r="";n=Math.min(t.length,n);for(var i=e;i<n;++i)r+=String.fromCharCode(t[i]);return r}function O(t,e,n){var r=t.length;(!e||e<0)&&(e=0),(!n||n<0||n>r)&&(n=r);for(var i="",o=e;o<n;++o)i+=F(t[o]);return i}function D(t,e,n){for(var r=t.slice(e,n),i="",o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function C(t,e,n){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>n)throw new RangeError("Trying to access beyond buffer length")}function N(t,e,n,r,i,o){if(!s.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(n+r>t.length)throw new RangeError("Index out of range")}function I(t,e,n,r){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-n,2);i<o;++i)t[n+i]=(e&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function R(t,e,n,r){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-n,4);i<o;++i)t[n+i]=e>>>8*(r?i:3-i)&255}function j(t,e,n,r,i,o){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function L(t,e,n,r,o){return o||j(t,0,n,4),i.write(t,e,n,r,23,4),n+4}function B(t,e,n,r,o){return o||j(t,0,n,8),i.write(t,e,n,r,52,8),n+8}s.prototype.slice=function(t,e){var n,r=this.length;if((t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t),s.TYPED_ARRAY_SUPPORT)(n=this.subarray(t,e)).__proto__=s.prototype;else{var i=e-t;n=new s(i,void 0);for(var o=0;o<i;++o)n[o]=this[o+t]}return n},s.prototype.readUIntLE=function(t,e,n){t|=0,e|=0,n||C(t,e,this.length);for(var r=this[t],i=1,o=0;++o<e&&(i*=256);)r+=this[t+o]*i;return r},s.prototype.readUIntBE=function(t,e,n){t|=0,e|=0,n||C(t,e,this.length);for(var r=this[t+--e],i=1;e>0&&(i*=256);)r+=this[t+--e]*i;return r},s.prototype.readUInt8=function(t,e){return e||C(t,1,this.length),this[t]},s.prototype.readUInt16LE=function(t,e){return e||C(t,2,this.length),this[t]|this[t+1]<<8},s.prototype.readUInt16BE=function(t,e){return e||C(t,2,this.length),this[t]<<8|this[t+1]},s.prototype.readUInt32LE=function(t,e){return e||C(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},s.prototype.readUInt32BE=function(t,e){return e||C(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},s.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||C(t,e,this.length);for(var r=this[t],i=1,o=0;++o<e&&(i*=256);)r+=this[t+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*e)),r},s.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||C(t,e,this.length);for(var r=e,i=1,o=this[t+--r];r>0&&(i*=256);)o+=this[t+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},s.prototype.readInt8=function(t,e){return e||C(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},s.prototype.readInt16LE=function(t,e){e||C(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt16BE=function(t,e){e||C(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},s.prototype.readInt32LE=function(t,e){return e||C(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},s.prototype.readInt32BE=function(t,e){return e||C(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},s.prototype.readFloatLE=function(t,e){return e||C(t,4,this.length),i.read(this,t,!0,23,4)},s.prototype.readFloatBE=function(t,e){return e||C(t,4,this.length),i.read(this,t,!1,23,4)},s.prototype.readDoubleLE=function(t,e){return e||C(t,8,this.length),i.read(this,t,!0,52,8)},s.prototype.readDoubleBE=function(t,e){return e||C(t,8,this.length),i.read(this,t,!1,52,8)},s.prototype.writeUIntLE=function(t,e,n,r){(t=+t,e|=0,n|=0,r)||N(this,t,e,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[e]=255&t;++o<n&&(i*=256);)this[e+o]=t/i&255;return e+n},s.prototype.writeUIntBE=function(t,e,n,r){(t=+t,e|=0,n|=0,r)||N(this,t,e,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+n},s.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||N(this,t,e,1,255,0),s.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},s.prototype.writeUInt16LE=function(t,e,n){return t=+t,e|=0,n||N(this,t,e,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):I(this,t,e,!0),e+2},s.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||N(this,t,e,2,65535,0),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):I(this,t,e,!1),e+2},s.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||N(this,t,e,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):R(this,t,e,!0),e+4},s.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||N(this,t,e,4,4294967295,0),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):R(this,t,e,!1),e+4},s.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);N(this,t,e,n,i-1,-i)}var o=0,a=1,u=0;for(this[e]=255&t;++o<n&&(a*=256);)t<0&&0===u&&0!==this[e+o-1]&&(u=1),this[e+o]=(t/a>>0)-u&255;return e+n},s.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e|=0,!r){var i=Math.pow(2,8*n-1);N(this,t,e,n,i-1,-i)}var o=n-1,a=1,u=0;for(this[e+o]=255&t;--o>=0&&(a*=256);)t<0&&0===u&&0!==this[e+o+1]&&(u=1),this[e+o]=(t/a>>0)-u&255;return e+n},s.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||N(this,t,e,1,127,-128),s.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},s.prototype.writeInt16LE=function(t,e,n){return t=+t,e|=0,n||N(this,t,e,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):I(this,t,e,!0),e+2},s.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||N(this,t,e,2,32767,-32768),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):I(this,t,e,!1),e+2},s.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||N(this,t,e,4,2147483647,-2147483648),s.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):R(this,t,e,!0),e+4},s.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||N(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),s.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):R(this,t,e,!1),e+4},s.prototype.writeFloatLE=function(t,e,n){return L(this,t,e,!0,n)},s.prototype.writeFloatBE=function(t,e,n){return L(this,t,e,!1,n)},s.prototype.writeDoubleLE=function(t,e,n){return B(this,t,e,!0,n)},s.prototype.writeDoubleBE=function(t,e,n){return B(this,t,e,!1,n)},s.prototype.copy=function(t,e,n,r){if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e<r-n&&(r=t.length-e+n);var i,o=r-n;if(this===t&&n<e&&e<r)for(i=o-1;i>=0;--i)t[i+e]=this[i+n];else if(o<1e3||!s.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)t[i+e]=this[i+n];else Uint8Array.prototype.set.call(t,this.subarray(n,n+o),e);return o},s.prototype.fill=function(t,e,n,r){if("string"==typeof t){if("string"==typeof e?(r=e,e=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!s.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;var o;if(e>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(o=e;o<n;++o)this[o]=t;else{var a=s.isBuffer(t)?t:q(new s(t,r).toString()),u=a.length;for(o=0;o<n-e;++o)this[o+e]=a[o%u]}return this};var P=/[^+\/0-9A-Za-z-_]/g;function F(t){return t<16?"0"+t.toString(16):t.toString(16)}function q(t,e){var n;e=e||1/0;for(var r=t.length,i=null,o=[],a=0;a<r;++a){if((n=t.charCodeAt(a))>55295&&n<57344){if(!i){if(n>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(e-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(e-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((e-=1)<0)break;o.push(n)}else if(n<2048){if((e-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function U(t){return r.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(P,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function z(t,e,n,r){for(var i=0;i<r&&!(i+n>=e.length||i>=t.length);++i)e[i+n]=t[i];return i}}).call(this,n(25))},function(t,e,n){
+!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.mermaid=e():t.mermaid=e()}("undefined"!=typeof self?self:this,(function(){return 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}return 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=353)}([function(t,e,n){"use strict";n.r(e);var r=function(t,e){return t<e?-1:t>e?1:t>=e?0:NaN},i=function(t){var e;return 1===t.length&&(e=t,t=function(t,n){return r(e(t),n)}),{left:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var a=r+i>>>1;t(e[a],n)<0?r=a+1:i=a}return r},right:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var a=r+i>>>1;t(e[a],n)>0?i=a:r=a+1}return r}}};var a=i(r),o=a.right,s=a.left,u=o,c=function(t,e){null==e&&(e=l);for(var n=0,r=t.length-1,i=t[0],a=new Array(r<0?0:r);n<r;)a[n]=e(i,i=t[++n]);return a};function l(t,e){return[t,e]}var f=function(t,e,n){var r,i,a,o,s=t.length,u=e.length,c=new Array(s*u);for(null==n&&(n=l),r=a=0;r<s;++r)for(o=t[r],i=0;i<u;++i,++a)c[a]=n(o,e[i]);return c},h=function(t,e){return e<t?-1:e>t?1:e>=t?0:NaN},d=function(t){return null===t?NaN:+t},p=function(t,e){var n,r,i=t.length,a=0,o=-1,s=0,u=0;if(null==e)for(;++o<i;)isNaN(n=d(t[o]))||(u+=(r=n-s)*(n-(s+=r/++a)));else for(;++o<i;)isNaN(n=d(e(t[o],o,t)))||(u+=(r=n-s)*(n-(s+=r/++a)));if(a>1)return u/(a-1)},y=function(t,e){var n=p(t,e);return n?Math.sqrt(n):n},g=function(t,e){var n,r,i,a=t.length,o=-1;if(null==e){for(;++o<a;)if(null!=(n=t[o])&&n>=n)for(r=i=n;++o<a;)null!=(n=t[o])&&(r>n&&(r=n),i<n&&(i=n))}else for(;++o<a;)if(null!=(n=e(t[o],o,t))&&n>=n)for(r=i=n;++o<a;)null!=(n=e(t[o],o,t))&&(r>n&&(r=n),i<n&&(i=n));return[r,i]},m=Array.prototype,v=m.slice,b=m.map,x=function(t){return function(){return t}},_=function(t){return t},w=function(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)),a=new Array(i);++r<i;)a[r]=t+r*n;return a},k=Math.sqrt(50),E=Math.sqrt(10),A=Math.sqrt(2),T=function(t,e,n){var r,i,a,o,s=-1;if(n=+n,(t=+t)===(e=+e)&&n>0)return[t];if((r=e<t)&&(i=t,t=e,e=i),0===(o=S(t,e,n))||!isFinite(o))return[];if(o>0)for(t=Math.ceil(t/o),e=Math.floor(e/o),a=new Array(i=Math.ceil(e-t+1));++s<i;)a[s]=(t+s)*o;else for(t=Math.floor(t*o),e=Math.ceil(e*o),a=new Array(i=Math.ceil(t-e+1));++s<i;)a[s]=(t-s)/o;return r&&a.reverse(),a};function S(t,e,n){var r=(e-t)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),a=r/Math.pow(10,i);return i>=0?(a>=k?10:a>=E?5:a>=A?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(a>=k?10:a>=E?5:a>=A?2:1)}function M(t,e,n){var r=Math.abs(e-t)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),a=r/i;return a>=k?i*=10:a>=E?i*=5:a>=A&&(i*=2),e<t?-i:i}var O=function(t){return Math.ceil(Math.log(t.length)/Math.LN2)+1},N=function(){var t=_,e=g,n=O;function r(r){var i,a,o=r.length,s=new Array(o);for(i=0;i<o;++i)s[i]=t(r[i],i,r);var c=e(s),l=c[0],f=c[1],h=n(s,l,f);Array.isArray(h)||(h=M(l,f,h),h=w(Math.ceil(l/h)*h,f,h));for(var d=h.length;h[0]<=l;)h.shift(),--d;for(;h[d-1]>f;)h.pop(),--d;var p,y=new Array(d+1);for(i=0;i<=d;++i)(p=y[i]=[]).x0=i>0?h[i-1]:l,p.x1=i<d?h[i]:f;for(i=0;i<o;++i)l<=(a=s[i])&&a<=f&&y[u(h,a,0,d)].push(r[i]);return y}return r.value=function(e){return arguments.length?(t="function"==typeof e?e:x(e),r):t},r.domain=function(t){return arguments.length?(e="function"==typeof t?t:x([t[0],t[1]]),r):e},r.thresholds=function(t){return arguments.length?(n="function"==typeof t?t:Array.isArray(t)?x(v.call(t)):x(t),r):n},r},C=function(t,e,n){if(null==n&&(n=d),r=t.length){if((e=+e)<=0||r<2)return+n(t[0],0,t);if(e>=1)return+n(t[r-1],r-1,t);var r,i=(r-1)*e,a=Math.floor(i),o=+n(t[a],a,t);return o+(+n(t[a+1],a+1,t)-o)*(i-a)}},D=function(t,e,n){return t=b.call(t,d).sort(r),Math.ceil((n-e)/(2*(C(t,.75)-C(t,.25))*Math.pow(t.length,-1/3)))},L=function(t,e,n){return Math.ceil((n-e)/(3.5*y(t)*Math.pow(t.length,-1/3)))},F=function(t,e){var n,r,i=t.length,a=-1;if(null==e){for(;++a<i;)if(null!=(n=t[a])&&n>=n)for(r=n;++a<i;)null!=(n=t[a])&&n>r&&(r=n)}else for(;++a<i;)if(null!=(n=e(t[a],a,t))&&n>=n)for(r=n;++a<i;)null!=(n=e(t[a],a,t))&&n>r&&(r=n);return r},I=function(t,e){var n,r=t.length,i=r,a=-1,o=0;if(null==e)for(;++a<r;)isNaN(n=d(t[a]))?--i:o+=n;else for(;++a<r;)isNaN(n=d(e(t[a],a,t)))?--i:o+=n;if(i)return o/i},P=function(t,e){var n,i=t.length,a=-1,o=[];if(null==e)for(;++a<i;)isNaN(n=d(t[a]))||o.push(n);else for(;++a<i;)isNaN(n=d(e(t[a],a,t)))||o.push(n);return C(o.sort(r),.5)},R=function(t){for(var e,n,r,i=t.length,a=-1,o=0;++a<i;)o+=t[a].length;for(n=new Array(o);--i>=0;)for(e=(r=t[i]).length;--e>=0;)n[--o]=r[e];return n},B=function(t,e){var n,r,i=t.length,a=-1;if(null==e){for(;++a<i;)if(null!=(n=t[a])&&n>=n)for(r=n;++a<i;)null!=(n=t[a])&&r>n&&(r=n)}else for(;++a<i;)if(null!=(n=e(t[a],a,t))&&n>=n)for(r=n;++a<i;)null!=(n=e(t[a],a,t))&&r>n&&(r=n);return r},j=function(t,e){for(var n=e.length,r=new Array(n);n--;)r[n]=t[e[n]];return r},Y=function(t,e){if(n=t.length){var n,i,a=0,o=0,s=t[o];for(null==e&&(e=r);++a<n;)(e(i=t[a],s)<0||0!==e(s,s))&&(s=i,o=a);return 0===e(s,s)?o:void 0}},z=function(t,e,n){for(var r,i,a=(null==n?t.length:n)-(e=null==e?0:+e);a;)i=Math.random()*a--|0,r=t[a+e],t[a+e]=t[i+e],t[i+e]=r;return t},U=function(t,e){var n,r=t.length,i=-1,a=0;if(null==e)for(;++i<r;)(n=+t[i])&&(a+=n);else for(;++i<r;)(n=+e(t[i],i,t))&&(a+=n);return a},$=function(t){if(!(i=t.length))return[];for(var e=-1,n=B(t,G),r=new Array(n);++e<n;)for(var i,a=-1,o=r[e]=new Array(i);++a<i;)o[a]=t[a][e];return r};function G(t){return t.length}var V=function(){return $(arguments)},H=Array.prototype.slice,W=function(t){return t};function q(t){return"translate("+(t+.5)+",0)"}function X(t){return"translate(0,"+(t+.5)+")"}function Z(t){return function(e){return+t(e)}}function J(t){var e=Math.max(0,t.bandwidth()-1)/2;return t.round()&&(e=Math.round(e)),function(n){return+t(n)+e}}function Q(){return!this.__axis}function K(t,e){var n=[],r=null,i=null,a=6,o=6,s=3,u=1===t||4===t?-1:1,c=4===t||2===t?"x":"y",l=1===t||3===t?q:X;function f(f){var h=null==r?e.ticks?e.ticks.apply(e,n):e.domain():r,d=null==i?e.tickFormat?e.tickFormat.apply(e,n):W:i,p=Math.max(a,0)+s,y=e.range(),g=+y[0]+.5,m=+y[y.length-1]+.5,v=(e.bandwidth?J:Z)(e.copy()),b=f.selection?f.selection():f,x=b.selectAll(".domain").data([null]),_=b.selectAll(".tick").data(h,e).order(),w=_.exit(),k=_.enter().append("g").attr("class","tick"),E=_.select("line"),A=_.select("text");x=x.merge(x.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),_=_.merge(k),E=E.merge(k.append("line").attr("stroke","currentColor").attr(c+"2",u*a)),A=A.merge(k.append("text").attr("fill","currentColor").attr(c,u*p).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),f!==b&&(x=x.transition(f),_=_.transition(f),E=E.transition(f),A=A.transition(f),w=w.transition(f).attr("opacity",1e-6).attr("transform",(function(t){return isFinite(t=v(t))?l(t):this.getAttribute("transform")})),k.attr("opacity",1e-6).attr("transform",(function(t){var e=this.parentNode.__axis;return l(e&&isFinite(e=e(t))?e:v(t))}))),w.remove(),x.attr("d",4===t||2==t?o?"M"+u*o+","+g+"H0.5V"+m+"H"+u*o:"M0.5,"+g+"V"+m:o?"M"+g+","+u*o+"V0.5H"+m+"V"+u*o:"M"+g+",0.5H"+m),_.attr("opacity",1).attr("transform",(function(t){return l(v(t))})),E.attr(c+"2",u*a),A.attr(c,u*p).text(d),b.filter(Q).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===t?"start":4===t?"end":"middle"),b.each((function(){this.__axis=v}))}return f.scale=function(t){return arguments.length?(e=t,f):e},f.ticks=function(){return n=H.call(arguments),f},f.tickArguments=function(t){return arguments.length?(n=null==t?[]:H.call(t),f):n.slice()},f.tickValues=function(t){return arguments.length?(r=null==t?null:H.call(t),f):r&&r.slice()},f.tickFormat=function(t){return arguments.length?(i=t,f):i},f.tickSize=function(t){return arguments.length?(a=o=+t,f):a},f.tickSizeInner=function(t){return arguments.length?(a=+t,f):a},f.tickSizeOuter=function(t){return arguments.length?(o=+t,f):o},f.tickPadding=function(t){return arguments.length?(s=+t,f):s},f}function tt(t){return K(1,t)}function et(t){return K(2,t)}function nt(t){return K(3,t)}function rt(t){return K(4,t)}var it={value:function(){}};function at(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new ot(r)}function ot(t){this._=t}function st(t,e){return t.trim().split(/^|\s+/).map((function(t){var n="",r=t.indexOf(".");if(r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}}))}function ut(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function ct(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=it,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}ot.prototype=at.prototype={constructor:ot,on:function(t,e){var n,r=this._,i=st(t+"",r),a=-1,o=i.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++a<o;)if(n=(t=i[a]).type)r[n]=ct(r[n],t.name,e);else if(null==e)for(n in r)r[n]=ct(r[n],t.name,null);return this}for(;++a<o;)if((n=(t=i[a]).type)&&(n=ut(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new ot(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),a=0;a<n;++a)i[a]=arguments[a+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=0,n=(r=this._[t]).length;a<n;++a)r[a].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,a=r.length;i<a;++i)r[i].value.apply(e,n)}};var lt=at;function ft(){}var ht=function(t){return null==t?ft:function(){return this.querySelector(t)}};function dt(){return[]}var pt=function(t){return null==t?dt:function(){return this.querySelectorAll(t)}},yt=function(t){return function(){return this.matches(t)}},gt=function(t){return new Array(t.length)};function mt(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}mt.prototype={constructor:mt,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function vt(t,e,n,r,i,a){for(var o,s=0,u=e.length,c=a.length;s<c;++s)(o=e[s])?(o.__data__=a[s],r[s]=o):n[s]=new mt(t,a[s]);for(;s<u;++s)(o=e[s])&&(i[s]=o)}function bt(t,e,n,r,i,a,o){var s,u,c,l={},f=e.length,h=a.length,d=new Array(f);for(s=0;s<f;++s)(u=e[s])&&(d[s]=c="$"+o.call(u,u.__data__,s,e),c in l?i[s]=u:l[c]=u);for(s=0;s<h;++s)(u=l[c="$"+o.call(t,a[s],s,a)])?(r[s]=u,u.__data__=a[s],l[c]=null):n[s]=new mt(t,a[s]);for(s=0;s<f;++s)(u=e[s])&&l[d[s]]===u&&(i[s]=u)}function xt(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}var _t="http://www.w3.org/1999/xhtml",wt={svg:"http://www.w3.org/2000/svg",xhtml:_t,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},kt=function(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),wt.hasOwnProperty(e)?{space:wt[e],local:t}:t};function Et(t){return function(){this.removeAttribute(t)}}function At(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Tt(t,e){return function(){this.setAttribute(t,e)}}function St(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Mt(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function Ot(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}var Nt=function(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView};function Ct(t){return function(){this.style.removeProperty(t)}}function Dt(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Lt(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function Ft(t,e){return t.style.getPropertyValue(e)||Nt(t).getComputedStyle(t,null).getPropertyValue(e)}function It(t){return function(){delete this[t]}}function Pt(t,e){return function(){this[t]=e}}function Rt(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function Bt(t){return t.trim().split(/^|\s+/)}function jt(t){return t.classList||new Yt(t)}function Yt(t){this._node=t,this._names=Bt(t.getAttribute("class")||"")}function zt(t,e){for(var n=jt(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function Ut(t,e){for(var n=jt(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function $t(t){return function(){zt(this,t)}}function Gt(t){return function(){Ut(this,t)}}function Vt(t,e){return function(){(e.apply(this,arguments)?zt:Ut)(this,t)}}Yt.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function Ht(){this.textContent=""}function Wt(t){return function(){this.textContent=t}}function qt(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function Xt(){this.innerHTML=""}function Zt(t){return function(){this.innerHTML=t}}function Jt(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function Qt(){this.nextSibling&&this.parentNode.appendChild(this)}function Kt(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function te(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===_t&&e.documentElement.namespaceURI===_t?e.createElement(t):e.createElementNS(n,t)}}function ee(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}var ne=function(t){var e=kt(t);return(e.local?ee:te)(e)};function re(){return null}function ie(){var t=this.parentNode;t&&t.removeChild(this)}function ae(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function oe(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}var se={},ue=null;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(se={mouseenter:"mouseover",mouseleave:"mouseout"}));function ce(t,e,n){return t=le(t,e,n),function(e){var n=e.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||t.call(this,e)}}function le(t,e,n){return function(r){var i=ue;ue=r;try{t.call(this,this.__data__,e,n)}finally{ue=i}}}function fe(t){return t.trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}function he(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,a=e.length;r<a;++r)n=e[r],t.type&&n.type!==t.type||n.name!==t.name?e[++i]=n:this.removeEventListener(n.type,n.listener,n.capture);++i?e.length=i:delete this.__on}}}function de(t,e,n){var r=se.hasOwnProperty(t.type)?ce:le;return function(i,a,o){var s,u=this.__on,c=r(e,a,o);if(u)for(var l=0,f=u.length;l<f;++l)if((s=u[l]).type===t.type&&s.name===t.name)return this.removeEventListener(s.type,s.listener,s.capture),this.addEventListener(s.type,s.listener=c,s.capture=n),void(s.value=e);this.addEventListener(t.type,c,n),s={type:t.type,name:t.name,value:e,listener:c,capture:n},u?u.push(s):this.__on=[s]}}function pe(t,e,n,r){var i=ue;t.sourceEvent=ue,ue=t;try{return e.apply(n,r)}finally{ue=i}}function ye(t,e,n){var r=Nt(t),i=r.CustomEvent;"function"==typeof i?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function ge(t,e){return function(){return ye(this,t,e)}}function me(t,e){return function(){return ye(this,t,e.apply(this,arguments))}}var ve=[null];function be(t,e){this._groups=t,this._parents=e}function xe(){return new be([[document.documentElement]],ve)}be.prototype=xe.prototype={constructor:be,select:function(t){"function"!=typeof t&&(t=ht(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o,s=e[i],u=s.length,c=r[i]=new Array(u),l=0;l<u;++l)(a=s[l])&&(o=t.call(a,a.__data__,l,s))&&("__data__"in a&&(o.__data__=a.__data__),c[l]=o);return new be(r,this._parents)},selectAll:function(t){"function"!=typeof t&&(t=pt(t));for(var e=this._groups,n=e.length,r=[],i=[],a=0;a<n;++a)for(var o,s=e[a],u=s.length,c=0;c<u;++c)(o=s[c])&&(r.push(t.call(o,o.__data__,c,s)),i.push(o));return new be(r,i)},filter:function(t){"function"!=typeof t&&(t=yt(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o=e[i],s=o.length,u=r[i]=[],c=0;c<s;++c)(a=o[c])&&t.call(a,a.__data__,c,o)&&u.push(a);return new be(r,this._parents)},data:function(t,e){if(!t)return p=new Array(this.size()),l=-1,this.each((function(t){p[++l]=t})),p;var n,r=e?bt:vt,i=this._parents,a=this._groups;"function"!=typeof t&&(n=t,t=function(){return n});for(var o=a.length,s=new Array(o),u=new Array(o),c=new Array(o),l=0;l<o;++l){var f=i[l],h=a[l],d=h.length,p=t.call(f,f&&f.__data__,l,i),y=p.length,g=u[l]=new Array(y),m=s[l]=new Array(y);r(f,h,g,m,c[l]=new Array(d),p,e);for(var v,b,x=0,_=0;x<y;++x)if(v=g[x]){for(x>=_&&(_=x+1);!(b=m[_])&&++_<y;);v._next=b||null}}return(s=new be(s,i))._enter=u,s._exit=c,s},enter:function(){return new be(this._enter||this._groups.map(gt),this._parents)},exit:function(){return new be(this._exit||this._groups.map(gt),this._parents)},join:function(t,e,n){var r=this.enter(),i=this,a=this.exit();return r="function"==typeof t?t(r):r.append(t+""),null!=e&&(i=e(i)),null==n?a.remove():n(a),r&&i?r.merge(i).order():i},merge:function(t){for(var e=this._groups,n=t._groups,r=e.length,i=n.length,a=Math.min(r,i),o=new Array(r),s=0;s<a;++s)for(var u,c=e[s],l=n[s],f=c.length,h=o[s]=new Array(f),d=0;d<f;++d)(u=c[d]||l[d])&&(h[d]=u);for(;s<r;++s)o[s]=e[s];return new be(o,this._parents)},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,i=t[e],a=i.length-1,o=i[a];--a>=0;)(r=i[a])&&(o&&4^r.compareDocumentPosition(o)&&o.parentNode.insertBefore(r,o),o=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=xt);for(var n=this._groups,r=n.length,i=new Array(r),a=0;a<r;++a){for(var o,s=n[a],u=s.length,c=i[a]=new Array(u),l=0;l<u;++l)(o=s[l])&&(c[l]=o);c.sort(e)}return new be(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){var t=new Array(this.size()),e=-1;return this.each((function(){t[++e]=this})),t},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,a=r.length;i<a;++i){var o=r[i];if(o)return o}return null},size:function(){var t=0;return this.each((function(){++t})),t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i,a=e[n],o=0,s=a.length;o<s;++o)(i=a[o])&&t.call(i,i.__data__,o,a);return this},attr:function(t,e){var n=kt(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==e?n.local?At:Et:"function"==typeof e?n.local?Ot:Mt:n.local?St:Tt)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?Ct:"function"==typeof e?Lt:Dt)(t,e,null==n?"":n)):Ft(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?It:"function"==typeof e?Rt:Pt)(t,e)):this.node()[t]},classed:function(t,e){var n=Bt(t+"");if(arguments.length<2){for(var r=jt(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?Vt:e?$t:Gt)(n,e))},text:function(t){return arguments.length?this.each(null==t?Ht:("function"==typeof t?qt:Wt)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?Xt:("function"==typeof t?Jt:Zt)(t)):this.node().innerHTML},raise:function(){return this.each(Qt)},lower:function(){return this.each(Kt)},append:function(t){var e="function"==typeof t?t:ne(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:ne(t),r=null==e?re:"function"==typeof e?e:ht(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(ie)},clone:function(t){return this.select(t?oe:ae)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,i,a=fe(t+""),o=a.length;if(!(arguments.length<2)){for(s=e?de:he,null==n&&(n=!1),r=0;r<o;++r)this.each(s(a[r],e,n));return this}var s=this.node().__on;if(s)for(var u,c=0,l=s.length;c<l;++c)for(r=0,u=s[c];r<o;++r)if((i=a[r]).type===u.type&&i.name===u.name)return u.value},dispatch:function(t,e){return this.each(("function"==typeof e?me:ge)(t,e))}};var _e=xe,we=function(t){return"string"==typeof t?new be([[document.querySelector(t)]],[document.documentElement]):new be([[t]],ve)};function ke(){ue.stopImmediatePropagation()}var Ee=function(){ue.preventDefault(),ue.stopImmediatePropagation()},Ae=function(t){var e=t.document.documentElement,n=we(t).on("dragstart.drag",Ee,!0);"onselectstart"in e?n.on("selectstart.drag",Ee,!0):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")};function Te(t,e){var n=t.document.documentElement,r=we(t).on("dragstart.drag",null);e&&(r.on("click.drag",Ee,!0),setTimeout((function(){r.on("click.drag",null)}),0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}var Se=function(t,e,n){t.prototype=e.prototype=n,n.constructor=t};function Me(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Oe(){}var Ne="\\s*([+-]?\\d+)\\s*",Ce="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",De="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Le=/^#([0-9a-f]{3,8})$/,Fe=new RegExp("^rgb\\("+[Ne,Ne,Ne]+"\\)$"),Ie=new RegExp("^rgb\\("+[De,De,De]+"\\)$"),Pe=new RegExp("^rgba\\("+[Ne,Ne,Ne,Ce]+"\\)$"),Re=new RegExp("^rgba\\("+[De,De,De,Ce]+"\\)$"),Be=new RegExp("^hsl\\("+[Ce,De,De]+"\\)$"),je=new RegExp("^hsla\\("+[Ce,De,De,Ce]+"\\)$"),Ye={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 ze(){return this.rgb().formatHex()}function Ue(){return this.rgb().formatRgb()}function $e(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Le.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?Ge(e):3===n?new qe(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?new qe(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?new qe(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=Fe.exec(t))?new qe(e[1],e[2],e[3],1):(e=Ie.exec(t))?new qe(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Pe.exec(t))?Ve(e[1],e[2],e[3],e[4]):(e=Re.exec(t))?Ve(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Be.exec(t))?Qe(e[1],e[2]/100,e[3]/100,1):(e=je.exec(t))?Qe(e[1],e[2]/100,e[3]/100,e[4]):Ye.hasOwnProperty(t)?Ge(Ye[t]):"transparent"===t?new qe(NaN,NaN,NaN,0):null}function Ge(t){return new qe(t>>16&255,t>>8&255,255&t,1)}function Ve(t,e,n,r){return r<=0&&(t=e=n=NaN),new qe(t,e,n,r)}function He(t){return t instanceof Oe||(t=$e(t)),t?new qe((t=t.rgb()).r,t.g,t.b,t.opacity):new qe}function We(t,e,n,r){return 1===arguments.length?He(t):new qe(t,e,n,null==r?1:r)}function qe(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function Xe(){return"#"+Je(this.r)+Je(this.g)+Je(this.b)}function Ze(){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 Je(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function Qe(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new en(t,e,n,r)}function Ke(t){if(t instanceof en)return new en(t.h,t.s,t.l,t.opacity);if(t instanceof Oe||(t=$e(t)),!t)return new en;if(t instanceof en)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),a=Math.max(e,n,r),o=NaN,s=a-i,u=(a+i)/2;return s?(o=e===a?(n-r)/s+6*(n<r):n===a?(r-e)/s+2:(e-n)/s+4,s/=u<.5?a+i:2-a-i,o*=60):s=u>0&&u<1?0:o,new en(o,s,u,t.opacity)}function tn(t,e,n,r){return 1===arguments.length?Ke(t):new en(t,e,n,null==r?1:r)}function en(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function nn(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 rn(t,e,n,r,i){var a=t*t,o=a*t;return((1-3*t+3*a-o)*e+(4-6*a+3*o)*n+(1+3*t+3*a-3*o)*r+o*i)/6}Se(Oe,$e,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:ze,formatHex:ze,formatHsl:function(){return Ke(this).formatHsl()},formatRgb:Ue,toString:Ue}),Se(qe,We,Me(Oe,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new qe(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new qe(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:Xe,formatHex:Xe,formatRgb:Ze,toString:Ze})),Se(en,tn,Me(Oe,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new en(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new en(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 qe(nn(t>=240?t-240:t+120,i,r),nn(t,i,r),nn(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 an=function(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[r],a=t[r+1],o=r>0?t[r-1]:2*i-a,s=r<e-1?t[r+2]:2*a-i;return rn((n-r/e)*e,o,i,a,s)}},on=function(t){var e=t.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*e),i=t[(r+e-1)%e],a=t[r%e],o=t[(r+1)%e],s=t[(r+2)%e];return rn((n-r/e)*e,i,a,o,s)}},sn=function(t){return function(){return t}};function un(t,e){return function(n){return t+n*e}}function cn(t,e){var n=e-t;return n?un(t,n>180||n<-180?n-360*Math.round(n/360):n):sn(isNaN(t)?e:t)}function ln(t){return 1==(t=+t)?fn: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):sn(isNaN(e)?n:e)}}function fn(t,e){var n=e-t;return n?un(t,n):sn(isNaN(t)?e:t)}var hn=function t(e){var n=ln(e);function r(t,e){var r=n((t=We(t)).r,(e=We(e)).r),i=n(t.g,e.g),a=n(t.b,e.b),o=fn(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=a(e),t.opacity=o(e),t+""}}return r.gamma=t,r}(1);function dn(t){return function(e){var n,r,i=e.length,a=new Array(i),o=new Array(i),s=new Array(i);for(n=0;n<i;++n)r=We(e[n]),a[n]=r.r||0,o[n]=r.g||0,s[n]=r.b||0;return a=t(a),o=t(o),s=t(s),r.opacity=1,function(t){return r.r=a(t),r.g=o(t),r.b=s(t),r+""}}}var pn=dn(an),yn=dn(on),gn=function(t,e){e||(e=[]);var n,r=t?Math.min(e.length,t.length):0,i=e.slice();return function(a){for(n=0;n<r;++n)i[n]=t[n]*(1-a)+e[n]*a;return i}};function mn(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}var vn=function(t,e){return(mn(e)?gn:bn)(t,e)};function bn(t,e){var n,r=e?e.length:0,i=t?Math.min(r,t.length):0,a=new Array(i),o=new Array(r);for(n=0;n<i;++n)a[n]=Mn(t[n],e[n]);for(;n<r;++n)o[n]=e[n];return function(t){for(n=0;n<i;++n)o[n]=a[n](t);return o}}var xn=function(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}},_n=function(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}},wn=function(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]=Mn(t[n],e[n]):i[n]=e[n];return function(t){for(n in r)i[n]=r[n](t);return i}},kn=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,En=new RegExp(kn.source,"g");var An,Tn,Sn=function(t,e){var n,r,i,a=kn.lastIndex=En.lastIndex=0,o=-1,s=[],u=[];for(t+="",e+="";(n=kn.exec(t))&&(r=En.exec(e));)(i=r.index)>a&&(i=e.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(n=n[0])===(r=r[0])?s[o]?s[o]+=r:s[++o]=r:(s[++o]=null,u.push({i:o,x:_n(n,r)})),a=En.lastIndex;return a<e.length&&(i=e.slice(a),s[o]?s[o]+=i:s[++o]=i),s.length<2?u[0]?function(t){return function(e){return t(e)+""}}(u[0].x):function(t){return function(){return t}}(e):(e=u.length,function(t){for(var n,r=0;r<e;++r)s[(n=u[r]).i]=n.x(t);return s.join("")})},Mn=function(t,e){var n,r=typeof e;return null==e||"boolean"===r?sn(e):("number"===r?_n:"string"===r?(n=$e(e))?(e=n,hn):Sn:e instanceof $e?hn:e instanceof Date?xn:mn(e)?gn:Array.isArray(e)?bn:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?wn:_n)(t,e)},On=function(){for(var t,e=ue;t=e.sourceEvent;)e=t;return e},Nn=function(t,e){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,[(r=r.matrixTransform(t.getScreenCTM().inverse())).x,r.y]}var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]},Cn=function(t,e,n){arguments.length<3&&(n=e,e=On().changedTouches);for(var r,i=0,a=e?e.length:0;i<a;++i)if((r=e[i]).identifier===n)return Nn(t,r);return null},Dn=function(t){var e=On();return e.changedTouches&&(e=e.changedTouches[0]),Nn(t,e)},Ln=0,Fn=0,In=0,Pn=0,Rn=0,Bn=0,jn="object"==typeof performance&&performance.now?performance:Date,Yn="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function zn(){return Rn||(Yn(Un),Rn=jn.now()+Bn)}function Un(){Rn=0}function $n(){this._call=this._time=this._next=null}function Gn(t,e,n){var r=new $n;return r.restart(t,e,n),r}function Vn(){zn(),++Ln;for(var t,e=An;e;)(t=Rn-e._time)>=0&&e._call.call(null,t),e=e._next;--Ln}function Hn(){Rn=(Pn=jn.now())+Bn,Ln=Fn=0;try{Vn()}finally{Ln=0,function(){var t,e,n=An,r=1/0;for(;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:An=e);Tn=t,qn(r)}(),Rn=0}}function Wn(){var t=jn.now(),e=t-Pn;e>1e3&&(Bn-=e,Pn=t)}function qn(t){Ln||(Fn&&(Fn=clearTimeout(Fn)),t-Rn>24?(t<1/0&&(Fn=setTimeout(Hn,t-jn.now()-Bn)),In&&(In=clearInterval(In))):(In||(Pn=jn.now(),In=setInterval(Wn,1e3)),Ln=1,Yn(Hn)))}$n.prototype=Gn.prototype={constructor:$n,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?zn():+n)+(null==e?0:+e),this._next||Tn===this||(Tn?Tn._next=this:An=this,Tn=this),this._call=t,this._time=n,qn()},stop:function(){this._call&&(this._call=null,this._time=1/0,qn())}};var Xn=function(t,e,n){var r=new $n;return e=null==e?0:+e,r.restart((function(n){r.stop(),t(n+e)}),e,n),r},Zn=lt("start","end","cancel","interrupt"),Jn=[],Qn=function(t,e,n,r,i,a){var o=t.__transition;if(o){if(n in o)return}else t.__transition={};!function(t,e,n){var r,i=t.__transition;function a(u){var c,l,f,h;if(1!==n.state)return s();for(c in i)if((h=i[c]).name===n.name){if(3===h.state)return Xn(a);4===h.state?(h.state=6,h.timer.stop(),h.on.call("interrupt",t,t.__data__,h.index,h.group),delete i[c]):+c<e&&(h.state=6,h.timer.stop(),h.on.call("cancel",t,t.__data__,h.index,h.group),delete i[c])}if(Xn((function(){3===n.state&&(n.state=4,n.timer.restart(o,n.delay,n.time),o(u))})),n.state=2,n.on.call("start",t,t.__data__,n.index,n.group),2===n.state){for(n.state=3,r=new Array(f=n.tween.length),c=0,l=-1;c<f;++c)(h=n.tween[c].value.call(t,t.__data__,n.index,n.group))&&(r[++l]=h);r.length=l+1}}function o(e){for(var i=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(s),n.state=5,1),a=-1,o=r.length;++a<o;)r[a].call(t,i);5===n.state&&(n.on.call("end",t,t.__data__,n.index,n.group),s())}function s(){for(var r in n.state=6,n.timer.stop(),delete i[e],i)return;delete t.__transition}i[e]=n,n.timer=Gn((function(t){n.state=1,n.timer.restart(a,n.delay,n.time),n.delay<=t&&a(t-n.delay)}),0,n.time)}(t,n,{name:e,index:r,group:i,on:Zn,tween:Jn,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})};function Kn(t,e){var n=er(t,e);if(n.state>0)throw new Error("too late; already scheduled");return n}function tr(t,e){var n=er(t,e);if(n.state>3)throw new Error("too late; already running");return n}function er(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}var nr,rr,ir,ar,or=function(t,e){var n,r,i,a=t.__transition,o=!0;if(a){for(i in e=null==e?null:e+"",a)(n=a[i]).name===e?(r=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete a[i]):o=!1;o&&delete t.__transition}},sr=180/Math.PI,ur={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},cr=function(t,e,n,r,i,a){var o,s,u;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(u=t*n+e*r)&&(n-=t*u,r-=e*u),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,u/=s),t*r<e*n&&(t=-t,e=-e,u=-u,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(e,t)*sr,skewX:Math.atan(u)*sr,scaleX:o,scaleY:s}};function lr(t,e,n,r){function i(t){return t.length?t.pop()+" ":""}return function(a,o){var s=[],u=[];return a=t(a),o=t(o),function(t,r,i,a,o,s){if(t!==i||r!==a){var u=o.push("translate(",null,e,null,n);s.push({i:u-4,x:_n(t,i)},{i:u-2,x:_n(r,a)})}else(i||a)&&o.push("translate("+i+e+a+n)}(a.translateX,a.translateY,o.translateX,o.translateY,s,u),function(t,e,n,a){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),a.push({i:n.push(i(n)+"rotate(",null,r)-2,x:_n(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(a.rotate,o.rotate,s,u),function(t,e,n,a){t!==e?a.push({i:n.push(i(n)+"skewX(",null,r)-2,x:_n(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(a.skewX,o.skewX,s,u),function(t,e,n,r,a,o){if(t!==n||e!==r){var s=a.push(i(a)+"scale(",null,",",null,")");o.push({i:s-4,x:_n(t,n)},{i:s-2,x:_n(e,r)})}else 1===n&&1===r||a.push(i(a)+"scale("+n+","+r+")")}(a.scaleX,a.scaleY,o.scaleX,o.scaleY,s,u),a=o=null,function(t){for(var e,n=-1,r=u.length;++n<r;)s[(e=u[n]).i]=e.x(t);return s.join("")}}}var fr=lr((function(t){return"none"===t?ur:(nr||(nr=document.createElement("DIV"),rr=document.documentElement,ir=document.defaultView),nr.style.transform=t,t=ir.getComputedStyle(rr.appendChild(nr),null).getPropertyValue("transform"),rr.removeChild(nr),t=t.slice(7,-1).split(","),cr(+t[0],+t[1],+t[2],+t[3],+t[4],+t[5]))}),"px, ","px)","deg)"),hr=lr((function(t){return null==t?ur:(ar||(ar=document.createElementNS("http://www.w3.org/2000/svg","g")),ar.setAttribute("transform",t),(t=ar.transform.baseVal.consolidate())?(t=t.matrix,cr(t.a,t.b,t.c,t.d,t.e,t.f)):ur)}),", ",")",")");function dr(t,e){var n,r;return function(){var i=tr(this,t),a=i.tween;if(a!==n)for(var o=0,s=(r=n=a).length;o<s;++o)if(r[o].name===e){(r=r.slice()).splice(o,1);break}i.tween=r}}function pr(t,e,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var a=tr(this,t),o=a.tween;if(o!==r){i=(r=o).slice();for(var s={name:e,value:n},u=0,c=i.length;u<c;++u)if(i[u].name===e){i[u]=s;break}u===c&&i.push(s)}a.tween=i}}function yr(t,e,n){var r=t._id;return t.each((function(){var t=tr(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return er(t,r).value[e]}}var gr=function(t,e){var n;return("number"==typeof e?_n:e instanceof $e?hn:(n=$e(e))?(e=n,hn):Sn)(t,e)};function mr(t){return function(){this.removeAttribute(t)}}function vr(t){return function(){this.removeAttributeNS(t.space,t.local)}}function br(t,e,n){var r,i,a=n+"";return function(){var o=this.getAttribute(t);return o===a?null:o===r?i:i=e(r=o,n)}}function xr(t,e,n){var r,i,a=n+"";return function(){var o=this.getAttributeNS(t.space,t.local);return o===a?null:o===r?i:i=e(r=o,n)}}function _r(t,e,n){var r,i,a;return function(){var o,s,u=n(this);if(null!=u)return(o=this.getAttribute(t))===(s=u+"")?null:o===r&&s===i?a:(i=s,a=e(r=o,u));this.removeAttribute(t)}}function wr(t,e,n){var r,i,a;return function(){var o,s,u=n(this);if(null!=u)return(o=this.getAttributeNS(t.space,t.local))===(s=u+"")?null:o===r&&s===i?a:(i=s,a=e(r=o,u));this.removeAttributeNS(t.space,t.local)}}function kr(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function Er(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function Ar(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&Er(t,i)),n}return i._value=e,i}function Tr(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&kr(t,i)),n}return i._value=e,i}function Sr(t,e){return function(){Kn(this,t).delay=+e.apply(this,arguments)}}function Mr(t,e){return e=+e,function(){Kn(this,t).delay=e}}function Or(t,e){return function(){tr(this,t).duration=+e.apply(this,arguments)}}function Nr(t,e){return e=+e,function(){tr(this,t).duration=e}}function Cr(t,e){if("function"!=typeof e)throw new Error;return function(){tr(this,t).ease=e}}function Dr(t,e,n){var r,i,a=function(t){return(t+"").trim().split(/^|\s+/).every((function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?Kn:tr;return function(){var o=a(this,t),s=o.on;s!==r&&(i=(r=s).copy()).on(e,n),o.on=i}}var Lr=_e.prototype.constructor;function Fr(t){return function(){this.style.removeProperty(t)}}function Ir(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function Pr(t,e,n){var r,i;function a(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&Ir(t,a,n)),r}return a._value=e,a}function Rr(t){return function(e){this.textContent=t.call(this,e)}}function Br(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&Rr(r)),e}return r._value=t,r}var jr=0;function Yr(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function zr(t){return _e().transition(t)}function Ur(){return++jr}var $r=_e.prototype;function Gr(t){return t*t*t}function Vr(t){return--t*t*t+1}function Hr(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}Yr.prototype=zr.prototype={constructor:Yr,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=ht(t));for(var r=this._groups,i=r.length,a=new Array(i),o=0;o<i;++o)for(var s,u,c=r[o],l=c.length,f=a[o]=new Array(l),h=0;h<l;++h)(s=c[h])&&(u=t.call(s,s.__data__,h,c))&&("__data__"in s&&(u.__data__=s.__data__),f[h]=u,Qn(f[h],e,n,h,f,er(s,n)));return new Yr(a,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=pt(t));for(var r=this._groups,i=r.length,a=[],o=[],s=0;s<i;++s)for(var u,c=r[s],l=c.length,f=0;f<l;++f)if(u=c[f]){for(var h,d=t.call(u,u.__data__,f,c),p=er(u,n),y=0,g=d.length;y<g;++y)(h=d[y])&&Qn(h,e,n,y,d,p);a.push(d),o.push(u)}return new Yr(a,o,e,n)},filter:function(t){"function"!=typeof t&&(t=yt(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o=e[i],s=o.length,u=r[i]=[],c=0;c<s;++c)(a=o[c])&&t.call(a,a.__data__,c,o)&&u.push(a);return new Yr(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,a=Math.min(r,i),o=new Array(r),s=0;s<a;++s)for(var u,c=e[s],l=n[s],f=c.length,h=o[s]=new Array(f),d=0;d<f;++d)(u=c[d]||l[d])&&(h[d]=u);for(;s<r;++s)o[s]=e[s];return new Yr(o,this._parents,this._name,this._id)},selection:function(){return new Lr(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=Ur(),r=this._groups,i=r.length,a=0;a<i;++a)for(var o,s=r[a],u=s.length,c=0;c<u;++c)if(o=s[c]){var l=er(o,e);Qn(o,t,n,c,s,{time:l.time+l.delay+l.duration,delay:0,duration:l.duration,ease:l.ease})}return new Yr(r,this._parents,t,n)},call:$r.call,nodes:$r.nodes,node:$r.node,size:$r.size,empty:$r.empty,each:$r.each,on:function(t,e){var n=this._id;return arguments.length<2?er(this.node(),n).on.on(t):this.each(Dr(n,t,e))},attr:function(t,e){var n=kt(t),r="transform"===n?hr:gr;return this.attrTween(t,"function"==typeof e?(n.local?wr:_r)(n,r,yr(this,"attr."+t,e)):null==e?(n.local?vr:mr)(n):(n.local?xr:br)(n,r,e))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;var r=kt(t);return this.tween(n,(r.local?Ar:Tr)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?fr:gr;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var a=Ft(this,t),o=(this.style.removeProperty(t),Ft(this,t));return a===o?null:a===n&&o===r?i:i=e(n=a,r=o)}}(t,r)).on("end.style."+t,Fr(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,i,a;return function(){var o=Ft(this,t),s=n(this),u=s+"";return null==s&&(this.style.removeProperty(t),u=s=Ft(this,t)),o===u?null:o===r&&u===i?a:(i=u,a=e(r=o,s))}}(t,r,yr(this,"style."+t,e))).each(function(t,e){var n,r,i,a,o="style."+e,s="end."+o;return function(){var u=tr(this,t),c=u.on,l=null==u.value[o]?a||(a=Fr(e)):void 0;c===n&&i===l||(r=(n=c).copy()).on(s,i=l),u.on=r}}(this._id,t)):this.styleTween(t,function(t,e,n){var r,i,a=n+"";return function(){var o=Ft(this,t);return o===a?null:o===r?i:i=e(r=o,n)}}(t,r,e),n).on("end.style."+t,null)},styleTween:function(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;return this.tween(r,Pr(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(yr(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,Br(t))},remove:function(){return this.on("end.remove",(t=this._id,function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}));var t},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r,i=er(this.node(),n).tween,a=0,o=i.length;a<o;++a)if((r=i[a]).name===t)return r.value;return null}return this.each((null==e?dr:pr)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Sr:Mr)(e,t)):er(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Or:Nr)(e,t)):er(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(Cr(e,t)):er(this.node(),e).ease},end:function(){var t,e,n=this,r=n._id,i=n.size();return new Promise((function(a,o){var s={value:o},u={value:function(){0==--i&&a()}};n.each((function(){var n=tr(this,r),i=n.on;i!==t&&((e=(t=i).copy())._.cancel.push(s),e._.interrupt.push(s),e._.end.push(u)),n.on=e}))}))}};var Wr={time:null,delay:0,duration:250,ease:Hr};function qr(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))return Wr.time=zn(),Wr;return n}_e.prototype.interrupt=function(t){return this.each((function(){or(this,t)}))},_e.prototype.transition=function(t){var e,n;t instanceof Yr?(e=t._id,t=t._name):(e=Ur(),(n=Wr).time=zn(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var o,s=r[a],u=s.length,c=0;c<u;++c)(o=s[c])&&Qn(o,t,e,c,s,n||qr(o,e));return new Yr(r,this._parents,t,e)};var Xr=[null],Zr=function(t,e){var n,r,i=t.__transition;if(i)for(r in e=null==e?null:e+"",i)if((n=i[r]).state>1&&n.name===e)return new Yr([[t]],Xr,e,+r);return null},Jr=function(t){return function(){return t}},Qr=function(t,e,n){this.target=t,this.type=e,this.selection=n};function Kr(){ue.stopImmediatePropagation()}var ti=function(){ue.preventDefault(),ue.stopImmediatePropagation()},ei={name:"drag"},ni={name:"space"},ri={name:"handle"},ii={name:"center"};function ai(t){return[+t[0],+t[1]]}function oi(t){return[ai(t[0]),ai(t[1])]}function si(t){return function(e){return Cn(e,ue.touches,t)}}var ui={name:"x",handles:["w","e"].map(gi),input:function(t,e){return null==t?null:[[+t[0],e[0][1]],[+t[1],e[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},ci={name:"y",handles:["n","s"].map(gi),input:function(t,e){return null==t?null:[[e[0][0],+t[0]],[e[1][0],+t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},li={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(gi),input:function(t){return null==t?null:oi(t)},output:function(t){return t}},fi={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},hi={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},di={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},pi={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},yi={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function gi(t){return{type:t}}function mi(){return!ue.ctrlKey&&!ue.button}function vi(){var t=this.ownerSVGElement||this;return t.hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function bi(){return navigator.maxTouchPoints||"ontouchstart"in this}function xi(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function _i(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function wi(t){var e=t.__brush;return e?e.dim.output(e.selection):null}function ki(){return Ti(ui)}function Ei(){return Ti(ci)}var Ai=function(){return Ti(li)};function Ti(t){var e,n=vi,r=mi,i=bi,a=!0,o=lt("start","brush","end"),s=6;function u(e){var n=e.property("__brush",y).selectAll(".overlay").data([gi("overlay")]);n.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",fi.overlay).merge(n).each((function(){var t=xi(this).extent;we(this).attr("x",t[0][0]).attr("y",t[0][1]).attr("width",t[1][0]-t[0][0]).attr("height",t[1][1]-t[0][1])})),e.selectAll(".selection").data([gi("selection")]).enter().append("rect").attr("class","selection").attr("cursor",fi.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var r=e.selectAll(".handle").data(t.handles,(function(t){return t.type}));r.exit().remove(),r.enter().append("rect").attr("class",(function(t){return"handle handle--"+t.type})).attr("cursor",(function(t){return fi[t.type]})),e.each(c).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",h).filter(i).on("touchstart.brush",h).on("touchmove.brush",d).on("touchend.brush touchcancel.brush",p).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function c(){var t=we(this),e=xi(this).selection;e?(t.selectAll(".selection").style("display",null).attr("x",e[0][0]).attr("y",e[0][1]).attr("width",e[1][0]-e[0][0]).attr("height",e[1][1]-e[0][1]),t.selectAll(".handle").style("display",null).attr("x",(function(t){return"e"===t.type[t.type.length-1]?e[1][0]-s/2:e[0][0]-s/2})).attr("y",(function(t){return"s"===t.type[0]?e[1][1]-s/2:e[0][1]-s/2})).attr("width",(function(t){return"n"===t.type||"s"===t.type?e[1][0]-e[0][0]+s:s})).attr("height",(function(t){return"e"===t.type||"w"===t.type?e[1][1]-e[0][1]+s:s}))):t.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function l(t,e,n){return!n&&t.__brush.emitter||new f(t,e)}function f(t,e){this.that=t,this.args=e,this.state=t.__brush,this.active=0}function h(){if((!e||ue.touches)&&r.apply(this,arguments)){var n,i,o,s,u,f,h,d,p,y,g,m=this,v=ue.target.__data__.type,b="selection"===(a&&ue.metaKey?v="overlay":v)?ei:a&&ue.altKey?ii:ri,x=t===ci?null:pi[v],_=t===ui?null:yi[v],w=xi(m),k=w.extent,E=w.selection,A=k[0][0],T=k[0][1],S=k[1][0],M=k[1][1],O=0,N=0,C=x&&_&&a&&ue.shiftKey,D=ue.touches?si(ue.changedTouches[0].identifier):Dn,L=D(m),F=L,I=l(m,arguments,!0).beforestart();"overlay"===v?(E&&(p=!0),w.selection=E=[[n=t===ci?A:L[0],o=t===ui?T:L[1]],[u=t===ci?S:n,h=t===ui?M:o]]):(n=E[0][0],o=E[0][1],u=E[1][0],h=E[1][1]),i=n,s=o,f=u,d=h;var P=we(m).attr("pointer-events","none"),R=P.selectAll(".overlay").attr("cursor",fi[v]);if(ue.touches)I.moved=j,I.ended=z;else{var B=we(ue.view).on("mousemove.brush",j,!0).on("mouseup.brush",z,!0);a&&B.on("keydown.brush",U,!0).on("keyup.brush",$,!0),Ae(ue.view)}Kr(),or(m),c.call(m),I.start()}function j(){var t=D(m);!C||y||g||(Math.abs(t[0]-F[0])>Math.abs(t[1]-F[1])?g=!0:y=!0),F=t,p=!0,ti(),Y()}function Y(){var t;switch(O=F[0]-L[0],N=F[1]-L[1],b){case ni:case ei:x&&(O=Math.max(A-n,Math.min(S-u,O)),i=n+O,f=u+O),_&&(N=Math.max(T-o,Math.min(M-h,N)),s=o+N,d=h+N);break;case ri:x<0?(O=Math.max(A-n,Math.min(S-n,O)),i=n+O,f=u):x>0&&(O=Math.max(A-u,Math.min(S-u,O)),i=n,f=u+O),_<0?(N=Math.max(T-o,Math.min(M-o,N)),s=o+N,d=h):_>0&&(N=Math.max(T-h,Math.min(M-h,N)),s=o,d=h+N);break;case ii:x&&(i=Math.max(A,Math.min(S,n-O*x)),f=Math.max(A,Math.min(S,u+O*x))),_&&(s=Math.max(T,Math.min(M,o-N*_)),d=Math.max(T,Math.min(M,h+N*_)))}f<i&&(x*=-1,t=n,n=u,u=t,t=i,i=f,f=t,v in hi&&R.attr("cursor",fi[v=hi[v]])),d<s&&(_*=-1,t=o,o=h,h=t,t=s,s=d,d=t,v in di&&R.attr("cursor",fi[v=di[v]])),w.selection&&(E=w.selection),y&&(i=E[0][0],f=E[1][0]),g&&(s=E[0][1],d=E[1][1]),E[0][0]===i&&E[0][1]===s&&E[1][0]===f&&E[1][1]===d||(w.selection=[[i,s],[f,d]],c.call(m),I.brush())}function z(){if(Kr(),ue.touches){if(ue.touches.length)return;e&&clearTimeout(e),e=setTimeout((function(){e=null}),500)}else Te(ue.view,p),B.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);P.attr("pointer-events","all"),R.attr("cursor",fi.overlay),w.selection&&(E=w.selection),_i(E)&&(w.selection=null,c.call(m)),I.end()}function U(){switch(ue.keyCode){case 16:C=x&&_;break;case 18:b===ri&&(x&&(u=f-O*x,n=i+O*x),_&&(h=d-N*_,o=s+N*_),b=ii,Y());break;case 32:b!==ri&&b!==ii||(x<0?u=f-O:x>0&&(n=i-O),_<0?h=d-N:_>0&&(o=s-N),b=ni,R.attr("cursor",fi.selection),Y());break;default:return}ti()}function $(){switch(ue.keyCode){case 16:C&&(y=g=C=!1,Y());break;case 18:b===ii&&(x<0?u=f:x>0&&(n=i),_<0?h=d:_>0&&(o=s),b=ri,Y());break;case 32:b===ni&&(ue.altKey?(x&&(u=f-O*x,n=i+O*x),_&&(h=d-N*_,o=s+N*_),b=ii):(x<0?u=f:x>0&&(n=i),_<0?h=d:_>0&&(o=s),b=ri),R.attr("cursor",fi[v]),Y());break;default:return}ti()}}function d(){l(this,arguments).moved()}function p(){l(this,arguments).ended()}function y(){var e=this.__brush||{selection:null};return e.extent=oi(n.apply(this,arguments)),e.dim=t,e}return u.move=function(e,n){e.selection?e.on("start.brush",(function(){l(this,arguments).beforestart().start()})).on("interrupt.brush end.brush",(function(){l(this,arguments).end()})).tween("brush",(function(){var e=this,r=e.__brush,i=l(e,arguments),a=r.selection,o=t.input("function"==typeof n?n.apply(this,arguments):n,r.extent),s=Mn(a,o);function u(t){r.selection=1===t&&null===o?null:s(t),c.call(e),i.brush()}return null!==a&&null!==o?u:u(1)})):e.each((function(){var e=this,r=arguments,i=e.__brush,a=t.input("function"==typeof n?n.apply(e,r):n,i.extent),o=l(e,r).beforestart();or(e),i.selection=null===a?null:a,c.call(e),o.start().brush().end()}))},u.clear=function(t){u.move(t,null)},f.prototype={beforestart:function(){return 1==++this.active&&(this.state.emitter=this,this.starting=!0),this},start:function(){return this.starting?(this.starting=!1,this.emit("start")):this.emit("brush"),this},brush:function(){return this.emit("brush"),this},end:function(){return 0==--this.active&&(delete this.state.emitter,this.emit("end")),this},emit:function(e){pe(new Qr(u,e,t.output(this.state.selection)),o.apply,o,[e,this.that,this.args])}},u.extent=function(t){return arguments.length?(n="function"==typeof t?t:Jr(oi(t)),u):n},u.filter=function(t){return arguments.length?(r="function"==typeof t?t:Jr(!!t),u):r},u.touchable=function(t){return arguments.length?(i="function"==typeof t?t:Jr(!!t),u):i},u.handleSize=function(t){return arguments.length?(s=+t,u):s},u.keyModifiers=function(t){return arguments.length?(a=!!t,u):a},u.on=function(){var t=o.on.apply(o,arguments);return t===o?u:t},u}var Si=Math.cos,Mi=Math.sin,Oi=Math.PI,Ni=Oi/2,Ci=2*Oi,Di=Math.max;function Li(t){return function(e,n){return t(e.source.value+e.target.value,n.source.value+n.target.value)}}var Fi=function(){var t=0,e=null,n=null,r=null;function i(i){var a,o,s,u,c,l,f=i.length,h=[],d=w(f),p=[],y=[],g=y.groups=new Array(f),m=new Array(f*f);for(a=0,c=-1;++c<f;){for(o=0,l=-1;++l<f;)o+=i[c][l];h.push(o),p.push(w(f)),a+=o}for(e&&d.sort((function(t,n){return e(h[t],h[n])})),n&&p.forEach((function(t,e){t.sort((function(t,r){return n(i[e][t],i[e][r])}))})),u=(a=Di(0,Ci-t*f)/a)?t:Ci/f,o=0,c=-1;++c<f;){for(s=o,l=-1;++l<f;){var v=d[c],b=p[v][l],x=i[v][b],_=o,k=o+=x*a;m[b*f+v]={index:v,subindex:b,startAngle:_,endAngle:k,value:x}}g[v]={index:v,startAngle:s,endAngle:o,value:h[v]},o+=u}for(c=-1;++c<f;)for(l=c-1;++l<f;){var E=m[l*f+c],A=m[c*f+l];(E.value||A.value)&&y.push(E.value<A.value?{source:A,target:E}:{source:E,target:A})}return r?y.sort(r):y}return i.padAngle=function(e){return arguments.length?(t=Di(0,e),i):t},i.sortGroups=function(t){return arguments.length?(e=t,i):e},i.sortSubgroups=function(t){return arguments.length?(n=t,i):n},i.sortChords=function(t){return arguments.length?(null==t?r=null:(r=Li(t))._=t,i):r&&r._},i},Ii=Array.prototype.slice,Pi=function(t){return function(){return t}},Ri=Math.PI,Bi=2*Ri,ji=Bi-1e-6;function Yi(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function zi(){return new Yi}Yi.prototype=zi.prototype={constructor:Yi,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,a){this._+="C"+ +t+","+ +e+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+a)},arcTo:function(t,e,n,r,i){t=+t,e=+e,n=+n,r=+r,i=+i;var a=this._x1,o=this._y1,s=n-t,u=r-e,c=a-t,l=o-e,f=c*c+l*l;if(i<0)throw new Error("negative radius: "+i);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(f>1e-6)if(Math.abs(l*s-u*c)>1e-6&&i){var h=n-a,d=r-o,p=s*s+u*u,y=h*h+d*d,g=Math.sqrt(p),m=Math.sqrt(f),v=i*Math.tan((Ri-Math.acos((p+f-y)/(2*g*m)))/2),b=v/m,x=v/g;Math.abs(b-1)>1e-6&&(this._+="L"+(t+b*c)+","+(e+b*l)),this._+="A"+i+","+i+",0,0,"+ +(l*h>c*d)+","+(this._x1=t+x*s)+","+(this._y1=e+x*u)}else this._+="L"+(this._x1=t)+","+(this._y1=e);else;},arc:function(t,e,n,r,i,a){t=+t,e=+e,a=!!a;var o=(n=+n)*Math.cos(r),s=n*Math.sin(r),u=t+o,c=e+s,l=1^a,f=a?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+u+","+c:(Math.abs(this._x1-u)>1e-6||Math.abs(this._y1-c)>1e-6)&&(this._+="L"+u+","+c),n&&(f<0&&(f=f%Bi+Bi),f>ji?this._+="A"+n+","+n+",0,1,"+l+","+(t-o)+","+(e-s)+"A"+n+","+n+",0,1,"+l+","+(this._x1=u)+","+(this._y1=c):f>1e-6&&(this._+="A"+n+","+n+",0,"+ +(f>=Ri)+","+l+","+(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 Ui=zi;function $i(t){return t.source}function Gi(t){return t.target}function Vi(t){return t.radius}function Hi(t){return t.startAngle}function Wi(t){return t.endAngle}var qi=function(){var t=$i,e=Gi,n=Vi,r=Hi,i=Wi,a=null;function o(){var o,s=Ii.call(arguments),u=t.apply(this,s),c=e.apply(this,s),l=+n.apply(this,(s[0]=u,s)),f=r.apply(this,s)-Ni,h=i.apply(this,s)-Ni,d=l*Si(f),p=l*Mi(f),y=+n.apply(this,(s[0]=c,s)),g=r.apply(this,s)-Ni,m=i.apply(this,s)-Ni;if(a||(a=o=Ui()),a.moveTo(d,p),a.arc(0,0,l,f,h),f===g&&h===m||(a.quadraticCurveTo(0,0,y*Si(g),y*Mi(g)),a.arc(0,0,y,g,m)),a.quadraticCurveTo(0,0,d,p),a.closePath(),o)return a=null,o+""||null}return o.radius=function(t){return arguments.length?(n="function"==typeof t?t:Pi(+t),o):n},o.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:Pi(+t),o):r},o.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:Pi(+t),o):i},o.source=function(e){return arguments.length?(t=e,o):t},o.target=function(t){return arguments.length?(e=t,o):e},o.context=function(t){return arguments.length?(a=null==t?null:t,o):a},o};function Xi(){}function Zi(t,e){var n=new Xi;if(t instanceof Xi)t.each((function(t,e){n.set(e,t)}));else if(Array.isArray(t)){var r,i=-1,a=t.length;if(null==e)for(;++i<a;)n.set(i,t[i]);else for(;++i<a;)n.set(e(r=t[i],i,t),r)}else if(t)for(var o in t)n.set(o,t[o]);return n}Xi.prototype=Zi.prototype={constructor:Xi,has:function(t){return"$"+t in this},get:function(t){return this["$"+t]},set:function(t,e){return this["$"+t]=e,this},remove:function(t){var e="$"+t;return e in this&&delete this[e]},clear:function(){for(var t in this)"$"===t[0]&&delete this[t]},keys:function(){var t=[];for(var e in this)"$"===e[0]&&t.push(e.slice(1));return t},values:function(){var t=[];for(var e in this)"$"===e[0]&&t.push(this[e]);return t},entries:function(){var t=[];for(var e in this)"$"===e[0]&&t.push({key:e.slice(1),value:this[e]});return t},size:function(){var t=0;for(var e in this)"$"===e[0]&&++t;return t},empty:function(){for(var t in this)if("$"===t[0])return!1;return!0},each:function(t){for(var e in this)"$"===e[0]&&t(this[e],e.slice(1),this)}};var Ji=Zi,Qi=function(){var t,e,n,r=[],i=[];function a(n,i,o,s){if(i>=r.length)return null!=t&&n.sort(t),null!=e?e(n):n;for(var u,c,l,f=-1,h=n.length,d=r[i++],p=Ji(),y=o();++f<h;)(l=p.get(u=d(c=n[f])+""))?l.push(c):p.set(u,[c]);return p.each((function(t,e){s(y,e,a(t,i,o,s))})),y}return n={object:function(t){return a(t,0,Ki,ta)},map:function(t){return a(t,0,ea,na)},entries:function(t){return function t(n,a){if(++a>r.length)return n;var o,s=i[a-1];return null!=e&&a>=r.length?o=n.entries():(o=[],n.each((function(e,n){o.push({key:n,values:t(e,a)})}))),null!=s?o.sort((function(t,e){return s(t.key,e.key)})):o}(a(t,0,ea,na),0)},key:function(t){return r.push(t),n},sortKeys:function(t){return i[r.length-1]=t,n},sortValues:function(e){return t=e,n},rollup:function(t){return e=t,n}}};function Ki(){return{}}function ta(t,e,n){t[e]=n}function ea(){return Ji()}function na(t,e,n){t.set(e,n)}function ra(){}var ia=Ji.prototype;function aa(t,e){var n=new ra;if(t instanceof ra)t.each((function(t){n.add(t)}));else if(t){var r=-1,i=t.length;if(null==e)for(;++r<i;)n.add(t[r]);else for(;++r<i;)n.add(e(t[r],r,t))}return n}ra.prototype=aa.prototype={constructor:ra,has:ia.has,add:function(t){return this["$"+(t+="")]=t,this},remove:ia.remove,clear:ia.clear,values:ia.keys,size:ia.size,empty:ia.empty,each:ia.each};var oa=aa,sa=function(t){var e=[];for(var n in t)e.push(n);return e},ua=function(t){var e=[];for(var n in t)e.push(t[n]);return e},ca=function(t){var e=[];for(var n in t)e.push({key:n,value:t[n]});return e},la=Math.PI/180,fa=180/Math.PI;function ha(t){if(t instanceof ya)return new ya(t.l,t.a,t.b,t.opacity);if(t instanceof ka)return Ea(t);t instanceof qe||(t=He(t));var e,n,r=ba(t.r),i=ba(t.g),a=ba(t.b),o=ga((.2225045*r+.7168786*i+.0606169*a)/1);return r===i&&i===a?e=n=o:(e=ga((.4360747*r+.3850649*i+.1430804*a)/.96422),n=ga((.0139322*r+.0971045*i+.7141733*a)/.82521)),new ya(116*o-16,500*(e-o),200*(o-n),t.opacity)}function da(t,e){return new ya(t,0,0,null==e?1:e)}function pa(t,e,n,r){return 1===arguments.length?ha(t):new ya(t,e,n,null==r?1:r)}function ya(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}function ga(t){return t>6/29*(6/29)*(6/29)?Math.pow(t,1/3):t/(6/29*3*(6/29))+4/29}function ma(t){return t>6/29?t*t*t:6/29*3*(6/29)*(t-4/29)}function va(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function ba(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function xa(t){if(t instanceof ka)return new ka(t.h,t.c,t.l,t.opacity);if(t instanceof ya||(t=ha(t)),0===t.a&&0===t.b)return new ka(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*fa;return new ka(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function _a(t,e,n,r){return 1===arguments.length?xa(t):new ka(n,e,t,null==r?1:r)}function wa(t,e,n,r){return 1===arguments.length?xa(t):new ka(t,e,n,null==r?1:r)}function ka(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function Ea(t){if(isNaN(t.h))return new ya(t.l,0,0,t.opacity);var e=t.h*la;return new ya(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}Se(ya,pa,Me(Oe,{brighter:function(t){return new ya(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new ya(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return new qe(va(3.1338561*(e=.96422*ma(e))-1.6168667*(t=1*ma(t))-.4906146*(n=.82521*ma(n))),va(-.9787684*e+1.9161415*t+.033454*n),va(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}})),Se(ka,wa,Me(Oe,{brighter:function(t){return new ka(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new ka(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return Ea(this).rgb()}}));var Aa=-.29227,Ta=-1.7884503806,Sa=3.5172982438,Ma=-.6557636667999999;function Oa(t){if(t instanceof Ca)return new Ca(t.h,t.s,t.l,t.opacity);t instanceof qe||(t=He(t));var e=t.r/255,n=t.g/255,r=t.b/255,i=(Ma*r+Ta*e-Sa*n)/(Ma+Ta-Sa),a=r-i,o=(1.97294*(n-i)-Aa*a)/-.90649,s=Math.sqrt(o*o+a*a)/(1.97294*i*(1-i)),u=s?Math.atan2(o,a)*fa-120:NaN;return new Ca(u<0?u+360:u,s,i,t.opacity)}function Na(t,e,n,r){return 1===arguments.length?Oa(t):new Ca(t,e,n,null==r?1:r)}function Ca(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}Se(Ca,Na,Me(Oe,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Ca(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Ca(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*la,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),i=Math.sin(t);return new qe(255*(e+n*(-.14861*r+1.78277*i)),255*(e+n*(Aa*r+-.90649*i)),255*(e+n*(1.97294*r)),this.opacity)}}));var Da=Array.prototype.slice,La=function(t,e){return t-e},Fa=function(t){return function(){return t}},Ia=function(t,e){for(var n,r=-1,i=e.length;++r<i;)if(n=Pa(t,e[r]))return n;return 0};function Pa(t,e){for(var n=e[0],r=e[1],i=-1,a=0,o=t.length,s=o-1;a<o;s=a++){var u=t[a],c=u[0],l=u[1],f=t[s],h=f[0],d=f[1];if(Ra(u,f,e))return 0;l>r!=d>r&&n<(h-c)*(r-l)/(d-l)+c&&(i=-i)}return i}function Ra(t,e,n){var r,i,a,o;return function(t,e,n){return(e[0]-t[0])*(n[1]-t[1])==(n[0]-t[0])*(e[1]-t[1])}(t,e,n)&&(i=t[r=+(t[0]===e[0])],a=n[r],o=e[r],i<=a&&a<=o||o<=a&&a<=i)}var Ba=function(){},ja=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]],Ya=function(){var t=1,e=1,n=O,r=s;function i(t){var e=n(t);if(Array.isArray(e))e=e.slice().sort(La);else{var r=g(t),i=r[0],o=r[1];e=M(i,o,e),e=w(Math.floor(i/e)*e,Math.floor(o/e)*e,e)}return e.map((function(e){return a(t,e)}))}function a(n,i){var a=[],s=[];return function(n,r,i){var a,s,u,c,l,f,h=new Array,d=new Array;a=s=-1,c=n[0]>=r,ja[c<<1].forEach(p);for(;++a<t-1;)u=c,c=n[a+1]>=r,ja[u|c<<1].forEach(p);ja[c<<0].forEach(p);for(;++s<e-1;){for(a=-1,c=n[s*t+t]>=r,l=n[s*t]>=r,ja[c<<1|l<<2].forEach(p);++a<t-1;)u=c,c=n[s*t+t+a+1]>=r,f=l,l=n[s*t+a+1]>=r,ja[u|c<<1|l<<2|f<<3].forEach(p);ja[c|l<<3].forEach(p)}a=-1,l=n[s*t]>=r,ja[l<<2].forEach(p);for(;++a<t-1;)f=l,l=n[s*t+a+1]>=r,ja[l<<2|f<<3].forEach(p);function p(t){var e,n,r=[t[0][0]+a,t[0][1]+s],u=[t[1][0]+a,t[1][1]+s],c=o(r),l=o(u);(e=d[c])?(n=h[l])?(delete d[e.end],delete h[n.start],e===n?(e.ring.push(u),i(e.ring)):h[e.start]=d[n.end]={start:e.start,end:n.end,ring:e.ring.concat(n.ring)}):(delete d[e.end],e.ring.push(u),d[e.end=l]=e):(e=h[l])?(n=d[c])?(delete h[e.start],delete d[n.end],e===n?(e.ring.push(u),i(e.ring)):h[n.start]=d[e.end]={start:n.start,end:e.end,ring:n.ring.concat(e.ring)}):(delete h[e.start],e.ring.unshift(r),h[e.start=c]=e):h[c]=d[l]={start:c,end:l,ring:[r,u]}}ja[l<<3].forEach(p)}(n,i,(function(t){r(t,n,i),function(t){for(var e=0,n=t.length,r=t[n-1][1]*t[0][0]-t[n-1][0]*t[0][1];++e<n;)r+=t[e-1][1]*t[e][0]-t[e-1][0]*t[e][1];return r}(t)>0?a.push([t]):s.push(t)})),s.forEach((function(t){for(var e,n=0,r=a.length;n<r;++n)if(-1!==Ia((e=a[n])[0],t))return void e.push(t)})),{type:"MultiPolygon",value:i,coordinates:a}}function o(e){return 2*e[0]+e[1]*(t+1)*4}function s(n,r,i){n.forEach((function(n){var a,o=n[0],s=n[1],u=0|o,c=0|s,l=r[c*t+u];o>0&&o<t&&u===o&&(a=r[c*t+u-1],n[0]=o+(i-a)/(l-a)-.5),s>0&&s<e&&c===s&&(a=r[(c-1)*t+u],n[1]=s+(i-a)/(l-a)-.5)}))}return i.contour=a,i.size=function(n){if(!arguments.length)return[t,e];var r=Math.ceil(n[0]),a=Math.ceil(n[1]);if(!(r>0&&a>0))throw new Error("invalid size");return t=r,e=a,i},i.thresholds=function(t){return arguments.length?(n="function"==typeof t?t:Array.isArray(t)?Fa(Da.call(t)):Fa(t),i):n},i.smooth=function(t){return arguments.length?(r=t?s:Ba,i):r===s},i};function za(t,e,n){for(var r=t.width,i=t.height,a=1+(n<<1),o=0;o<i;++o)for(var s=0,u=0;s<r+n;++s)s<r&&(u+=t.data[s+o*r]),s>=n&&(s>=a&&(u-=t.data[s-a+o*r]),e.data[s-n+o*r]=u/Math.min(s+1,r-1+a-s,a))}function Ua(t,e,n){for(var r=t.width,i=t.height,a=1+(n<<1),o=0;o<r;++o)for(var s=0,u=0;s<i+n;++s)s<i&&(u+=t.data[o+s*r]),s>=n&&(s>=a&&(u-=t.data[o+(s-a)*r]),e.data[o+(s-n)*r]=u/Math.min(s+1,i-1+a-s,a))}function $a(t){return t[0]}function Ga(t){return t[1]}function Va(){return 1}var Ha=function(){var t=$a,e=Ga,n=Va,r=960,i=500,a=20,o=2,s=3*a,u=r+2*s>>o,c=i+2*s>>o,l=Fa(20);function f(r){var i=new Float32Array(u*c),f=new Float32Array(u*c);r.forEach((function(r,a,l){var f=+t(r,a,l)+s>>o,h=+e(r,a,l)+s>>o,d=+n(r,a,l);f>=0&&f<u&&h>=0&&h<c&&(i[f+h*u]+=d)})),za({width:u,height:c,data:i},{width:u,height:c,data:f},a>>o),Ua({width:u,height:c,data:f},{width:u,height:c,data:i},a>>o),za({width:u,height:c,data:i},{width:u,height:c,data:f},a>>o),Ua({width:u,height:c,data:f},{width:u,height:c,data:i},a>>o),za({width:u,height:c,data:i},{width:u,height:c,data:f},a>>o),Ua({width:u,height:c,data:f},{width:u,height:c,data:i},a>>o);var d=l(i);if(!Array.isArray(d)){var p=F(i);d=M(0,p,d),(d=w(0,Math.floor(p/d)*d,d)).shift()}return Ya().thresholds(d).size([u,c])(i).map(h)}function h(t){return t.value*=Math.pow(2,-2*o),t.coordinates.forEach(d),t}function d(t){t.forEach(p)}function p(t){t.forEach(y)}function y(t){t[0]=t[0]*Math.pow(2,o)-s,t[1]=t[1]*Math.pow(2,o)-s}function g(){return u=r+2*(s=3*a)>>o,c=i+2*s>>o,f}return f.x=function(e){return arguments.length?(t="function"==typeof e?e:Fa(+e),f):t},f.y=function(t){return arguments.length?(e="function"==typeof t?t:Fa(+t),f):e},f.weight=function(t){return arguments.length?(n="function"==typeof t?t:Fa(+t),f):n},f.size=function(t){if(!arguments.length)return[r,i];var e=Math.ceil(t[0]),n=Math.ceil(t[1]);if(!(e>=0||e>=0))throw new Error("invalid size");return r=e,i=n,g()},f.cellSize=function(t){if(!arguments.length)return 1<<o;if(!((t=+t)>=1))throw new Error("invalid cell size");return o=Math.floor(Math.log(t)/Math.LN2),g()},f.thresholds=function(t){return arguments.length?(l="function"==typeof t?t:Array.isArray(t)?Fa(Da.call(t)):Fa(t),f):l},f.bandwidth=function(t){if(!arguments.length)return Math.sqrt(a*(a+1));if(!((t=+t)>=0))throw new Error("invalid bandwidth");return a=Math.round((Math.sqrt(4*t*t+1)-1)/2),g()},f},Wa=function(t){return function(){return t}};function qa(t,e,n,r,i,a,o,s,u,c){this.target=t,this.type=e,this.subject=n,this.identifier=r,this.active=i,this.x=a,this.y=o,this.dx=s,this.dy=u,this._=c}function Xa(){return!ue.ctrlKey&&!ue.button}function Za(){return this.parentNode}function Ja(t){return null==t?{x:ue.x,y:ue.y}:t}function Qa(){return navigator.maxTouchPoints||"ontouchstart"in this}qa.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};var Ka=function(){var t,e,n,r,i=Xa,a=Za,o=Ja,s=Qa,u={},c=lt("start","drag","end"),l=0,f=0;function h(t){t.on("mousedown.drag",d).filter(s).on("touchstart.drag",g).on("touchmove.drag",m).on("touchend.drag touchcancel.drag",v).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function d(){if(!r&&i.apply(this,arguments)){var o=b("mouse",a.apply(this,arguments),Dn,this,arguments);o&&(we(ue.view).on("mousemove.drag",p,!0).on("mouseup.drag",y,!0),Ae(ue.view),ke(),n=!1,t=ue.clientX,e=ue.clientY,o("start"))}}function p(){if(Ee(),!n){var r=ue.clientX-t,i=ue.clientY-e;n=r*r+i*i>f}u.mouse("drag")}function y(){we(ue.view).on("mousemove.drag mouseup.drag",null),Te(ue.view,n),Ee(),u.mouse("end")}function g(){if(i.apply(this,arguments)){var t,e,n=ue.changedTouches,r=a.apply(this,arguments),o=n.length;for(t=0;t<o;++t)(e=b(n[t].identifier,r,Cn,this,arguments))&&(ke(),e("start"))}}function m(){var t,e,n=ue.changedTouches,r=n.length;for(t=0;t<r;++t)(e=u[n[t].identifier])&&(Ee(),e("drag"))}function v(){var t,e,n=ue.changedTouches,i=n.length;for(r&&clearTimeout(r),r=setTimeout((function(){r=null}),500),t=0;t<i;++t)(e=u[n[t].identifier])&&(ke(),e("end"))}function b(t,e,n,r,i){var a,s,f,d=n(e,t),p=c.copy();if(pe(new qa(h,"beforestart",a,t,l,d[0],d[1],0,0,p),(function(){return null!=(ue.subject=a=o.apply(r,i))&&(s=a.x-d[0]||0,f=a.y-d[1]||0,!0)})))return function o(c){var y,g=d;switch(c){case"start":u[t]=o,y=l++;break;case"end":delete u[t],--l;case"drag":d=n(e,t),y=l}pe(new qa(h,c,a,t,y,d[0]+s,d[1]+f,d[0]-g[0],d[1]-g[1],p),p.apply,p,[c,r,i])}}return h.filter=function(t){return arguments.length?(i="function"==typeof t?t:Wa(!!t),h):i},h.container=function(t){return arguments.length?(a="function"==typeof t?t:Wa(t),h):a},h.subject=function(t){return arguments.length?(o="function"==typeof t?t:Wa(t),h):o},h.touchable=function(t){return arguments.length?(s="function"==typeof t?t:Wa(!!t),h):s},h.on=function(){var t=c.on.apply(c,arguments);return t===c?h:t},h.clickDistance=function(t){return arguments.length?(f=(t=+t)*t,h):Math.sqrt(f)},h},to={},eo={};function no(t){return new Function("d","return {"+t.map((function(t,e){return JSON.stringify(t)+": d["+e+'] || ""'})).join(",")+"}")}function ro(t){var e=Object.create(null),n=[];return t.forEach((function(t){for(var r in t)r in e||n.push(e[r]=r)})),n}function io(t,e){var n=t+"",r=n.length;return r<e?new Array(e-r+1).join(0)+n:n}function ao(t){var e,n=t.getUTCHours(),r=t.getUTCMinutes(),i=t.getUTCSeconds(),a=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":((e=t.getUTCFullYear())<0?"-"+io(-e,6):e>9999?"+"+io(e,6):io(e,4))+"-"+io(t.getUTCMonth()+1,2)+"-"+io(t.getUTCDate(),2)+(a?"T"+io(n,2)+":"+io(r,2)+":"+io(i,2)+"."+io(a,3)+"Z":i?"T"+io(n,2)+":"+io(r,2)+":"+io(i,2)+"Z":r||n?"T"+io(n,2)+":"+io(r,2)+"Z":"")}var oo=function(t){var e=new RegExp('["'+t+"\n\r]"),n=t.charCodeAt(0);function r(t,e){var r,i=[],a=t.length,o=0,s=0,u=a<=0,c=!1;function l(){if(u)return eo;if(c)return c=!1,to;var e,r,i=o;if(34===t.charCodeAt(i)){for(;o++<a&&34!==t.charCodeAt(o)||34===t.charCodeAt(++o););return(e=o)>=a?u=!0:10===(r=t.charCodeAt(o++))?c=!0:13===r&&(c=!0,10===t.charCodeAt(o)&&++o),t.slice(i+1,e-1).replace(/""/g,'"')}for(;o<a;){if(10===(r=t.charCodeAt(e=o++)))c=!0;else if(13===r)c=!0,10===t.charCodeAt(o)&&++o;else if(r!==n)continue;return t.slice(i,e)}return u=!0,t.slice(i,a)}for(10===t.charCodeAt(a-1)&&--a,13===t.charCodeAt(a-1)&&--a;(r=l())!==eo;){for(var f=[];r!==to&&r!==eo;)f.push(r),r=l();e&&null==(f=e(f,s++))||i.push(f)}return i}function i(e,n){return e.map((function(e){return n.map((function(t){return o(e[t])})).join(t)}))}function a(e){return e.map(o).join(t)}function o(t){return null==t?"":t instanceof Date?ao(t):e.test(t+="")?'"'+t.replace(/"/g,'""')+'"':t}return{parse:function(t,e){var n,i,a=r(t,(function(t,r){if(n)return n(t,r-1);i=t,n=e?function(t,e){var n=no(t);return function(r,i){return e(n(r),i,t)}}(t,e):no(t)}));return a.columns=i||[],a},parseRows:r,format:function(e,n){return null==n&&(n=ro(e)),[n.map(o).join(t)].concat(i(e,n)).join("\n")},formatBody:function(t,e){return null==e&&(e=ro(t)),i(t,e).join("\n")},formatRows:function(t){return t.map(a).join("\n")},formatRow:a,formatValue:o}},so=oo(","),uo=so.parse,co=so.parseRows,lo=so.format,fo=so.formatBody,ho=so.formatRows,po=so.formatRow,yo=so.formatValue,go=oo("\t"),mo=go.parse,vo=go.parseRows,bo=go.format,xo=go.formatBody,_o=go.formatRows,wo=go.formatRow,ko=go.formatValue;function Eo(t){for(var e in t){var n,r,i=t[e].trim();if(i)if("true"===i)i=!0;else if("false"===i)i=!1;else if("NaN"===i)i=NaN;else if(isNaN(n=+i)){if(!(r=i.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/)))continue;Ao&&r[4]&&!r[7]&&(i=i.replace(/-/g,"/").replace(/T/," ")),i=new Date(i)}else i=n;else i=null;t[e]=i}return t}var Ao=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours();function To(t){return+t}function So(t){return t*t}function Mo(t){return t*(2-t)}function Oo(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}var No=function t(e){function n(t){return Math.pow(t,e)}return e=+e,n.exponent=t,n}(3),Co=function t(e){function n(t){return 1-Math.pow(1-t,e)}return e=+e,n.exponent=t,n}(3),Do=function t(e){function n(t){return((t*=2)<=1?Math.pow(t,e):2-Math.pow(2-t,e))/2}return e=+e,n.exponent=t,n}(3),Lo=Math.PI,Fo=Lo/2;function Io(t){return 1-Math.cos(t*Fo)}function Po(t){return Math.sin(t*Fo)}function Ro(t){return(1-Math.cos(Lo*t))/2}function Bo(t){return Math.pow(2,10*t-10)}function jo(t){return 1-Math.pow(2,-10*t)}function Yo(t){return((t*=2)<=1?Math.pow(2,10*t-10):2-Math.pow(2,10-10*t))/2}function zo(t){return 1-Math.sqrt(1-t*t)}function Uo(t){return Math.sqrt(1- --t*t)}function $o(t){return((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}function Go(t){return 1-Vo(1-t)}function Vo(t){return(t=+t)<4/11?7.5625*t*t:t<8/11?7.5625*(t-=6/11)*t+.75:t<10/11?7.5625*(t-=9/11)*t+.9375:7.5625*(t-=21/22)*t+63/64}function Ho(t){return((t*=2)<=1?1-Vo(1-t):Vo(t-1)+1)/2}var Wo=function t(e){function n(t){return t*t*((e+1)*t-e)}return e=+e,n.overshoot=t,n}(1.70158),qo=function t(e){function n(t){return--t*t*((e+1)*t+e)+1}return e=+e,n.overshoot=t,n}(1.70158),Xo=function t(e){function n(t){return((t*=2)<1?t*t*((e+1)*t-e):(t-=2)*t*((e+1)*t+e)+2)/2}return e=+e,n.overshoot=t,n}(1.70158),Zo=2*Math.PI,Jo=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Zo);function i(t){return e*Math.pow(2,10*--t)*Math.sin((r-t)/n)}return i.amplitude=function(e){return t(e,n*Zo)},i.period=function(n){return t(e,n)},i}(1,.3),Qo=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Zo);function i(t){return 1-e*Math.pow(2,-10*(t=+t))*Math.sin((t+r)/n)}return i.amplitude=function(e){return t(e,n*Zo)},i.period=function(n){return t(e,n)},i}(1,.3),Ko=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Zo);function i(t){return((t=2*t-1)<0?e*Math.pow(2,10*t)*Math.sin((r-t)/n):2-e*Math.pow(2,-10*t)*Math.sin((r+t)/n))/2}return i.amplitude=function(e){return t(e,n*Zo)},i.period=function(n){return t(e,n)},i}(1,.3);function ts(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.blob()}var es=function(t,e){return fetch(t,e).then(ts)};function ns(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.arrayBuffer()}var rs=function(t,e){return fetch(t,e).then(ns)};function is(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.text()}var as=function(t,e){return fetch(t,e).then(is)};function os(t){return function(e,n,r){return 2===arguments.length&&"function"==typeof n&&(r=n,n=void 0),as(e,n).then((function(e){return t(e,r)}))}}function ss(t,e,n,r){3===arguments.length&&"function"==typeof n&&(r=n,n=void 0);var i=oo(t);return as(e,n).then((function(t){return i.parse(t,r)}))}var us=os(uo),cs=os(mo),ls=function(t,e){return new Promise((function(n,r){var i=new Image;for(var a in e)i[a]=e[a];i.onerror=r,i.onload=function(){n(i)},i.src=t}))};function fs(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.json()}var hs=function(t,e){return fetch(t,e).then(fs)};function ds(t){return function(e,n){return as(e,n).then((function(e){return(new DOMParser).parseFromString(e,t)}))}}var ps=ds("application/xml"),ys=ds("text/html"),gs=ds("image/svg+xml"),ms=function(t,e){var n;function r(){var r,i,a=n.length,o=0,s=0;for(r=0;r<a;++r)o+=(i=n[r]).x,s+=i.y;for(o=o/a-t,s=s/a-e,r=0;r<a;++r)(i=n[r]).x-=o,i.y-=s}return null==t&&(t=0),null==e&&(e=0),r.initialize=function(t){n=t},r.x=function(e){return arguments.length?(t=+e,r):t},r.y=function(t){return arguments.length?(e=+t,r):e},r},vs=function(t){return function(){return t}},bs=function(){return 1e-6*(Math.random()-.5)};function xs(t,e,n,r){if(isNaN(e)||isNaN(n))return t;var i,a,o,s,u,c,l,f,h,d=t._root,p={data:r},y=t._x0,g=t._y0,m=t._x1,v=t._y1;if(!d)return t._root=p,t;for(;d.length;)if((c=e>=(a=(y+m)/2))?y=a:m=a,(l=n>=(o=(g+v)/2))?g=o:v=o,i=d,!(d=d[f=l<<1|c]))return i[f]=p,t;if(s=+t._x.call(null,d.data),u=+t._y.call(null,d.data),e===s&&n===u)return p.next=d,i?i[f]=p:t._root=p,t;do{i=i?i[f]=new Array(4):t._root=new Array(4),(c=e>=(a=(y+m)/2))?y=a:m=a,(l=n>=(o=(g+v)/2))?g=o:v=o}while((f=l<<1|c)==(h=(u>=o)<<1|s>=a));return i[h]=d,i[f]=p,t}var _s=function(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i};function ws(t){return t[0]}function ks(t){return t[1]}function Es(t,e,n){var r=new As(null==e?ws:e,null==n?ks:n,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function As(t,e,n,r,i,a){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=a,this._root=void 0}function Ts(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var Ss=Es.prototype=As.prototype;function Ms(t){return t.x+t.vx}function Os(t){return t.y+t.vy}Ss.copy=function(){var t,e,n=new As(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return n;if(!r.length)return n._root=Ts(r),n;for(t=[{source:r,target:n._root=new Array(4)}];r=t.pop();)for(var i=0;i<4;++i)(e=r.source[i])&&(e.length?t.push({source:e,target:r.target[i]=new Array(4)}):r.target[i]=Ts(e));return n},Ss.add=function(t){var e=+this._x.call(null,t),n=+this._y.call(null,t);return xs(this.cover(e,n),e,n,t)},Ss.addAll=function(t){var e,n,r,i,a=t.length,o=new Array(a),s=new Array(a),u=1/0,c=1/0,l=-1/0,f=-1/0;for(n=0;n<a;++n)isNaN(r=+this._x.call(null,e=t[n]))||isNaN(i=+this._y.call(null,e))||(o[n]=r,s[n]=i,r<u&&(u=r),r>l&&(l=r),i<c&&(c=i),i>f&&(f=i));if(u>l||c>f)return this;for(this.cover(u,c).cover(l,f),n=0;n<a;++n)xs(this,o[n],s[n],t[n]);return this},Ss.cover=function(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var n=this._x0,r=this._y0,i=this._x1,a=this._y1;if(isNaN(n))i=(n=Math.floor(t))+1,a=(r=Math.floor(e))+1;else{for(var o,s,u=i-n,c=this._root;n>t||t>=i||r>e||e>=a;)switch(s=(e<r)<<1|t<n,(o=new Array(4))[s]=c,c=o,u*=2,s){case 0:i=n+u,a=r+u;break;case 1:n=i-u,a=r+u;break;case 2:i=n+u,r=a-u;break;case 3:n=i-u,r=a-u}this._root&&this._root.length&&(this._root=c)}return this._x0=n,this._y0=r,this._x1=i,this._y1=a,this},Ss.data=function(){var t=[];return this.visit((function(e){if(!e.length)do{t.push(e.data)}while(e=e.next)})),t},Ss.extent=function(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},Ss.find=function(t,e,n){var r,i,a,o,s,u,c,l=this._x0,f=this._y0,h=this._x1,d=this._y1,p=[],y=this._root;for(y&&p.push(new _s(y,l,f,h,d)),null==n?n=1/0:(l=t-n,f=e-n,h=t+n,d=e+n,n*=n);u=p.pop();)if(!(!(y=u.node)||(i=u.x0)>h||(a=u.y0)>d||(o=u.x1)<l||(s=u.y1)<f))if(y.length){var g=(i+o)/2,m=(a+s)/2;p.push(new _s(y[3],g,m,o,s),new _s(y[2],i,m,g,s),new _s(y[1],g,a,o,m),new _s(y[0],i,a,g,m)),(c=(e>=m)<<1|t>=g)&&(u=p[p.length-1],p[p.length-1]=p[p.length-1-c],p[p.length-1-c]=u)}else{var v=t-+this._x.call(null,y.data),b=e-+this._y.call(null,y.data),x=v*v+b*b;if(x<n){var _=Math.sqrt(n=x);l=t-_,f=e-_,h=t+_,d=e+_,r=y.data}}return r},Ss.remove=function(t){if(isNaN(a=+this._x.call(null,t))||isNaN(o=+this._y.call(null,t)))return this;var e,n,r,i,a,o,s,u,c,l,f,h,d=this._root,p=this._x0,y=this._y0,g=this._x1,m=this._y1;if(!d)return this;if(d.length)for(;;){if((c=a>=(s=(p+g)/2))?p=s:g=s,(l=o>=(u=(y+m)/2))?y=u:m=u,e=d,!(d=d[f=l<<1|c]))return this;if(!d.length)break;(e[f+1&3]||e[f+2&3]||e[f+3&3])&&(n=e,h=f)}for(;d.data!==t;)if(r=d,!(d=d.next))return this;return(i=d.next)&&delete d.next,r?(i?r.next=i:delete r.next,this):e?(i?e[f]=i:delete e[f],(d=e[0]||e[1]||e[2]||e[3])&&d===(e[3]||e[2]||e[1]||e[0])&&!d.length&&(n?n[h]=d:this._root=d),this):(this._root=i,this)},Ss.removeAll=function(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this},Ss.root=function(){return this._root},Ss.size=function(){var t=0;return this.visit((function(e){if(!e.length)do{++t}while(e=e.next)})),t},Ss.visit=function(t){var e,n,r,i,a,o,s=[],u=this._root;for(u&&s.push(new _s(u,this._x0,this._y0,this._x1,this._y1));e=s.pop();)if(!t(u=e.node,r=e.x0,i=e.y0,a=e.x1,o=e.y1)&&u.length){var c=(r+a)/2,l=(i+o)/2;(n=u[3])&&s.push(new _s(n,c,l,a,o)),(n=u[2])&&s.push(new _s(n,r,l,c,o)),(n=u[1])&&s.push(new _s(n,c,i,a,l)),(n=u[0])&&s.push(new _s(n,r,i,c,l))}return this},Ss.visitAfter=function(t){var e,n=[],r=[];for(this._root&&n.push(new _s(this._root,this._x0,this._y0,this._x1,this._y1));e=n.pop();){var i=e.node;if(i.length){var a,o=e.x0,s=e.y0,u=e.x1,c=e.y1,l=(o+u)/2,f=(s+c)/2;(a=i[0])&&n.push(new _s(a,o,s,l,f)),(a=i[1])&&n.push(new _s(a,l,s,u,f)),(a=i[2])&&n.push(new _s(a,o,f,l,c)),(a=i[3])&&n.push(new _s(a,l,f,u,c))}r.push(e)}for(;e=r.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this},Ss.x=function(t){return arguments.length?(this._x=t,this):this._x},Ss.y=function(t){return arguments.length?(this._y=t,this):this._y};var Ns=function(t){var e,n,r=1,i=1;function a(){for(var t,a,s,u,c,l,f,h=e.length,d=0;d<i;++d)for(a=Es(e,Ms,Os).visitAfter(o),t=0;t<h;++t)s=e[t],l=n[s.index],f=l*l,u=s.x+s.vx,c=s.y+s.vy,a.visit(p);function p(t,e,n,i,a){var o=t.data,h=t.r,d=l+h;if(!o)return e>u+d||i<u-d||n>c+d||a<c-d;if(o.index>s.index){var p=u-o.x-o.vx,y=c-o.y-o.vy,g=p*p+y*y;g<d*d&&(0===p&&(g+=(p=bs())*p),0===y&&(g+=(y=bs())*y),g=(d-(g=Math.sqrt(g)))/g*r,s.vx+=(p*=g)*(d=(h*=h)/(f+h)),s.vy+=(y*=g)*d,o.vx-=p*(d=1-d),o.vy-=y*d)}}}function o(t){if(t.data)return t.r=n[t.data.index];for(var e=t.r=0;e<4;++e)t[e]&&t[e].r>t.r&&(t.r=t[e].r)}function s(){if(e){var r,i,a=e.length;for(n=new Array(a),r=0;r<a;++r)i=e[r],n[i.index]=+t(i,r,e)}}return"function"!=typeof t&&(t=vs(null==t?1:+t)),a.initialize=function(t){e=t,s()},a.iterations=function(t){return arguments.length?(i=+t,a):i},a.strength=function(t){return arguments.length?(r=+t,a):r},a.radius=function(e){return arguments.length?(t="function"==typeof e?e:vs(+e),s(),a):t},a};function Cs(t){return t.index}function Ds(t,e){var n=t.get(e);if(!n)throw new Error("missing: "+e);return n}var Ls=function(t){var e,n,r,i,a,o=Cs,s=function(t){return 1/Math.min(i[t.source.index],i[t.target.index])},u=vs(30),c=1;function l(r){for(var i=0,o=t.length;i<c;++i)for(var s,u,l,f,h,d,p,y=0;y<o;++y)u=(s=t[y]).source,f=(l=s.target).x+l.vx-u.x-u.vx||bs(),h=l.y+l.vy-u.y-u.vy||bs(),f*=d=((d=Math.sqrt(f*f+h*h))-n[y])/d*r*e[y],h*=d,l.vx-=f*(p=a[y]),l.vy-=h*p,u.vx+=f*(p=1-p),u.vy+=h*p}function f(){if(r){var s,u,c=r.length,l=t.length,f=Ji(r,o);for(s=0,i=new Array(c);s<l;++s)(u=t[s]).index=s,"object"!=typeof u.source&&(u.source=Ds(f,u.source)),"object"!=typeof u.target&&(u.target=Ds(f,u.target)),i[u.source.index]=(i[u.source.index]||0)+1,i[u.target.index]=(i[u.target.index]||0)+1;for(s=0,a=new Array(l);s<l;++s)u=t[s],a[s]=i[u.source.index]/(i[u.source.index]+i[u.target.index]);e=new Array(l),h(),n=new Array(l),d()}}function h(){if(r)for(var n=0,i=t.length;n<i;++n)e[n]=+s(t[n],n,t)}function d(){if(r)for(var e=0,i=t.length;e<i;++e)n[e]=+u(t[e],e,t)}return null==t&&(t=[]),l.initialize=function(t){r=t,f()},l.links=function(e){return arguments.length?(t=e,f(),l):t},l.id=function(t){return arguments.length?(o=t,l):o},l.iterations=function(t){return arguments.length?(c=+t,l):c},l.strength=function(t){return arguments.length?(s="function"==typeof t?t:vs(+t),h(),l):s},l.distance=function(t){return arguments.length?(u="function"==typeof t?t:vs(+t),d(),l):u},l};function Fs(t){return t.x}function Is(t){return t.y}var Ps=Math.PI*(3-Math.sqrt(5)),Rs=function(t){var e,n=1,r=.001,i=1-Math.pow(r,1/300),a=0,o=.6,s=Ji(),u=Gn(l),c=lt("tick","end");function l(){f(),c.call("tick",e),n<r&&(u.stop(),c.call("end",e))}function f(r){var u,c,l=t.length;void 0===r&&(r=1);for(var f=0;f<r;++f)for(n+=(a-n)*i,s.each((function(t){t(n)})),u=0;u<l;++u)null==(c=t[u]).fx?c.x+=c.vx*=o:(c.x=c.fx,c.vx=0),null==c.fy?c.y+=c.vy*=o:(c.y=c.fy,c.vy=0);return e}function h(){for(var e,n=0,r=t.length;n<r;++n){if((e=t[n]).index=n,null!=e.fx&&(e.x=e.fx),null!=e.fy&&(e.y=e.fy),isNaN(e.x)||isNaN(e.y)){var i=10*Math.sqrt(n),a=n*Ps;e.x=i*Math.cos(a),e.y=i*Math.sin(a)}(isNaN(e.vx)||isNaN(e.vy))&&(e.vx=e.vy=0)}}function d(e){return e.initialize&&e.initialize(t),e}return null==t&&(t=[]),h(),e={tick:f,restart:function(){return u.restart(l),e},stop:function(){return u.stop(),e},nodes:function(n){return arguments.length?(t=n,h(),s.each(d),e):t},alpha:function(t){return arguments.length?(n=+t,e):n},alphaMin:function(t){return arguments.length?(r=+t,e):r},alphaDecay:function(t){return arguments.length?(i=+t,e):+i},alphaTarget:function(t){return arguments.length?(a=+t,e):a},velocityDecay:function(t){return arguments.length?(o=1-t,e):1-o},force:function(t,n){return arguments.length>1?(null==n?s.remove(t):s.set(t,d(n)),e):s.get(t)},find:function(e,n,r){var i,a,o,s,u,c=0,l=t.length;for(null==r?r=1/0:r*=r,c=0;c<l;++c)(o=(i=e-(s=t[c]).x)*i+(a=n-s.y)*a)<r&&(u=s,r=o);return u},on:function(t,n){return arguments.length>1?(c.on(t,n),e):c.on(t)}}},Bs=function(){var t,e,n,r,i=vs(-30),a=1,o=1/0,s=.81;function u(r){var i,a=t.length,o=Es(t,Fs,Is).visitAfter(l);for(n=r,i=0;i<a;++i)e=t[i],o.visit(f)}function c(){if(t){var e,n,a=t.length;for(r=new Array(a),e=0;e<a;++e)n=t[e],r[n.index]=+i(n,e,t)}}function l(t){var e,n,i,a,o,s=0,u=0;if(t.length){for(i=a=o=0;o<4;++o)(e=t[o])&&(n=Math.abs(e.value))&&(s+=e.value,u+=n,i+=n*e.x,a+=n*e.y);t.x=i/u,t.y=a/u}else{(e=t).x=e.data.x,e.y=e.data.y;do{s+=r[e.data.index]}while(e=e.next)}t.value=s}function f(t,i,u,c){if(!t.value)return!0;var l=t.x-e.x,f=t.y-e.y,h=c-i,d=l*l+f*f;if(h*h/s<d)return d<o&&(0===l&&(d+=(l=bs())*l),0===f&&(d+=(f=bs())*f),d<a&&(d=Math.sqrt(a*d)),e.vx+=l*t.value*n/d,e.vy+=f*t.value*n/d),!0;if(!(t.length||d>=o)){(t.data!==e||t.next)&&(0===l&&(d+=(l=bs())*l),0===f&&(d+=(f=bs())*f),d<a&&(d=Math.sqrt(a*d)));do{t.data!==e&&(h=r[t.data.index]*n/d,e.vx+=l*h,e.vy+=f*h)}while(t=t.next)}}return u.initialize=function(e){t=e,c()},u.strength=function(t){return arguments.length?(i="function"==typeof t?t:vs(+t),c(),u):i},u.distanceMin=function(t){return arguments.length?(a=t*t,u):Math.sqrt(a)},u.distanceMax=function(t){return arguments.length?(o=t*t,u):Math.sqrt(o)},u.theta=function(t){return arguments.length?(s=t*t,u):Math.sqrt(s)},u},js=function(t,e,n){var r,i,a,o=vs(.1);function s(t){for(var o=0,s=r.length;o<s;++o){var u=r[o],c=u.x-e||1e-6,l=u.y-n||1e-6,f=Math.sqrt(c*c+l*l),h=(a[o]-f)*i[o]*t/f;u.vx+=c*h,u.vy+=l*h}}function u(){if(r){var e,n=r.length;for(i=new Array(n),a=new Array(n),e=0;e<n;++e)a[e]=+t(r[e],e,r),i[e]=isNaN(a[e])?0:+o(r[e],e,r)}}return"function"!=typeof t&&(t=vs(+t)),null==e&&(e=0),null==n&&(n=0),s.initialize=function(t){r=t,u()},s.strength=function(t){return arguments.length?(o="function"==typeof t?t:vs(+t),u(),s):o},s.radius=function(e){return arguments.length?(t="function"==typeof e?e:vs(+e),u(),s):t},s.x=function(t){return arguments.length?(e=+t,s):e},s.y=function(t){return arguments.length?(n=+t,s):n},s},Ys=function(t){var e,n,r,i=vs(.1);function a(t){for(var i,a=0,o=e.length;a<o;++a)(i=e[a]).vx+=(r[a]-i.x)*n[a]*t}function o(){if(e){var a,o=e.length;for(n=new Array(o),r=new Array(o),a=0;a<o;++a)n[a]=isNaN(r[a]=+t(e[a],a,e))?0:+i(e[a],a,e)}}return"function"!=typeof t&&(t=vs(null==t?0:+t)),a.initialize=function(t){e=t,o()},a.strength=function(t){return arguments.length?(i="function"==typeof t?t:vs(+t),o(),a):i},a.x=function(e){return arguments.length?(t="function"==typeof e?e:vs(+e),o(),a):t},a},zs=function(t){var e,n,r,i=vs(.1);function a(t){for(var i,a=0,o=e.length;a<o;++a)(i=e[a]).vy+=(r[a]-i.y)*n[a]*t}function o(){if(e){var a,o=e.length;for(n=new Array(o),r=new Array(o),a=0;a<o;++a)n[a]=isNaN(r[a]=+t(e[a],a,e))?0:+i(e[a],a,e)}}return"function"!=typeof t&&(t=vs(null==t?0:+t)),a.initialize=function(t){e=t,o()},a.strength=function(t){return arguments.length?(i="function"==typeof t?t:vs(+t),o(),a):i},a.y=function(e){return arguments.length?(t="function"==typeof e?e:vs(+e),o(),a):t},a},Us=function(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)]},$s=function(t){return(t=Us(Math.abs(t)))?t[1]:NaN},Gs=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Vs(t){if(!(e=Gs.exec(t)))throw new Error("invalid format: "+t);var e;return new Hs({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 Hs(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+""}Vs.prototype=Hs.prototype,Hs.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 Ws,qs,Xs,Zs,Js=function(t,e){var n=Us(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")},Qs={"%":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.round(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 Js(100*t,e)},r:Js,s:function(t,e){var n=Us(t,e);if(!n)return t+"";var r=n[0],i=n[1],a=i-(Ws=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,o=r.length;return a===o?r:a>o?r+new Array(a-o+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+Us(t,Math.max(0,e+a-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}},Ks=function(t){return t},tu=Array.prototype.map,eu=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"],nu=function(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?Ks:(e=tu.call(t.grouping,Number),n=t.thousands+"",function(t,r){for(var i=t.length,a=[],o=0,s=e[0],u=0;i>0&&s>0&&(u+s+1>r&&(s=Math.max(1,r-u)),a.push(t.substring(i-=s,i+s)),!((u+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(n)}),i=void 0===t.currency?"":t.currency[0]+"",a=void 0===t.currency?"":t.currency[1]+"",o=void 0===t.decimal?".":t.decimal+"",s=void 0===t.numerals?Ks:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(tu.call(t.numerals,String)),u=void 0===t.percent?"%":t.percent+"",c=void 0===t.minus?"-":t.minus+"",l=void 0===t.nan?"NaN":t.nan+"";function f(t){var e=(t=Vs(t)).fill,n=t.align,f=t.sign,h=t.symbol,d=t.zero,p=t.width,y=t.comma,g=t.precision,m=t.trim,v=t.type;"n"===v?(y=!0,v="g"):Qs[v]||(void 0===g&&(g=12),m=!0,v="g"),(d||"0"===e&&"="===n)&&(d=!0,e="0",n="=");var b="$"===h?i:"#"===h&&/[boxX]/.test(v)?"0"+v.toLowerCase():"",x="$"===h?a:/[%p]/.test(v)?u:"",_=Qs[v],w=/[defgprs%]/.test(v);function k(t){var i,a,u,h=b,k=x;if("c"===v)k=_(t)+k,t="";else{var E=(t=+t)<0;if(t=isNaN(t)?l:_(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)),E&&0==+t&&(E=!1),h=(E?"("===f?f:c:"-"===f||"("===f?"":f)+h,k=("s"===v?eu[8+Ws/3]:"")+k+(E&&"("===f?")":""),w)for(i=-1,a=t.length;++i<a;)if(48>(u=t.charCodeAt(i))||u>57){k=(46===u?o+t.slice(i+1):t.slice(i))+k,t=t.slice(0,i);break}}y&&!d&&(t=r(t,1/0));var A=h.length+t.length+k.length,T=A<p?new Array(p-A+1).join(e):"";switch(y&&d&&(t=r(T+t,T.length?p-k.length:1/0),T=""),n){case"<":t=h+t+k+T;break;case"=":t=h+T+t+k;break;case"^":t=T.slice(0,A=T.length>>1)+h+t+k+T.slice(A);break;default:t=T+h+t+k}return s(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:f,formatPrefix:function(t,e){var n=f(((t=Vs(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor($s(e)/3))),i=Math.pow(10,-r),a=eu[8+r/3];return function(t){return n(i*t)+a}}}};function ru(t){return qs=nu(t),Xs=qs.format,Zs=qs.formatPrefix,qs}ru({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});var iu=function(t){return Math.max(0,-$s(Math.abs(t)))},au=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor($s(e)/3)))-$s(Math.abs(t)))},ou=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,$s(e)-$s(t))+1},su=function(){return new uu};function uu(){this.reset()}uu.prototype={constructor:uu,reset:function(){this.s=this.t=0},add:function(t){lu(cu,t,this.t),lu(this,cu.s,this.s),this.s?this.t+=cu.t:this.s=cu.t},valueOf:function(){return this.s}};var cu=new uu;function lu(t,e,n){var r=t.s=e+n,i=r-e,a=r-i;t.t=e-a+(n-i)}var fu=Math.PI,hu=fu/2,du=fu/4,pu=2*fu,yu=180/fu,gu=fu/180,mu=Math.abs,vu=Math.atan,bu=Math.atan2,xu=Math.cos,_u=Math.ceil,wu=Math.exp,ku=(Math.floor,Math.log),Eu=Math.pow,Au=Math.sin,Tu=Math.sign||function(t){return t>0?1:t<0?-1:0},Su=Math.sqrt,Mu=Math.tan;function Ou(t){return t>1?0:t<-1?fu:Math.acos(t)}function Nu(t){return t>1?hu:t<-1?-hu:Math.asin(t)}function Cu(t){return(t=Au(t/2))*t}function Du(){}function Lu(t,e){t&&Iu.hasOwnProperty(t.type)&&Iu[t.type](t,e)}var Fu={Feature:function(t,e){Lu(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)Lu(n[r].geometry,e)}},Iu={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)t=n[r],e.point(t[0],t[1],t[2])},LineString:function(t,e){Pu(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)Pu(n[r],e,0)},Polygon:function(t,e){Ru(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)Ru(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)Lu(n[r],e)}};function Pu(t,e,n){var r,i=-1,a=t.length-n;for(e.lineStart();++i<a;)r=t[i],e.point(r[0],r[1],r[2]);e.lineEnd()}function Ru(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)Pu(t[n],e,1);e.polygonEnd()}var Bu,ju,Yu,zu,Uu,$u=function(t,e){t&&Fu.hasOwnProperty(t.type)?Fu[t.type](t,e):Lu(t,e)},Gu=su(),Vu=su(),Hu={point:Du,lineStart:Du,lineEnd:Du,polygonStart:function(){Gu.reset(),Hu.lineStart=Wu,Hu.lineEnd=qu},polygonEnd:function(){var t=+Gu;Vu.add(t<0?pu+t:t),this.lineStart=this.lineEnd=this.point=Du},sphere:function(){Vu.add(pu)}};function Wu(){Hu.point=Xu}function qu(){Zu(Bu,ju)}function Xu(t,e){Hu.point=Zu,Bu=t,ju=e,Yu=t*=gu,zu=xu(e=(e*=gu)/2+du),Uu=Au(e)}function Zu(t,e){var n=(t*=gu)-Yu,r=n>=0?1:-1,i=r*n,a=xu(e=(e*=gu)/2+du),o=Au(e),s=Uu*o,u=zu*a+s*xu(i),c=s*r*Au(i);Gu.add(bu(c,u)),Yu=t,zu=a,Uu=o}var Ju=function(t){return Vu.reset(),$u(t,Hu),2*Vu};function Qu(t){return[bu(t[1],t[0]),Nu(t[2])]}function Ku(t){var e=t[0],n=t[1],r=xu(n);return[r*xu(e),r*Au(e),Au(n)]}function tc(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function ec(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function nc(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function rc(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function ic(t){var e=Su(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}var ac,oc,sc,uc,cc,lc,fc,hc,dc,pc,yc=su(),gc={point:mc,lineStart:bc,lineEnd:xc,polygonStart:function(){gc.point=_c,gc.lineStart=wc,gc.lineEnd=kc,yc.reset(),Hu.polygonStart()},polygonEnd:function(){Hu.polygonEnd(),gc.point=mc,gc.lineStart=bc,gc.lineEnd=xc,Gu<0?(ac=-(sc=180),oc=-(uc=90)):yc>1e-6?uc=90:yc<-1e-6&&(oc=-90),pc[0]=ac,pc[1]=sc},sphere:function(){ac=-(sc=180),oc=-(uc=90)}};function mc(t,e){dc.push(pc=[ac=t,sc=t]),e<oc&&(oc=e),e>uc&&(uc=e)}function vc(t,e){var n=Ku([t*gu,e*gu]);if(hc){var r=ec(hc,n),i=ec([r[1],-r[0],0],r);ic(i),i=Qu(i);var a,o=t-cc,s=o>0?1:-1,u=i[0]*yu*s,c=mu(o)>180;c^(s*cc<u&&u<s*t)?(a=i[1]*yu)>uc&&(uc=a):c^(s*cc<(u=(u+360)%360-180)&&u<s*t)?(a=-i[1]*yu)<oc&&(oc=a):(e<oc&&(oc=e),e>uc&&(uc=e)),c?t<cc?Ec(ac,t)>Ec(ac,sc)&&(sc=t):Ec(t,sc)>Ec(ac,sc)&&(ac=t):sc>=ac?(t<ac&&(ac=t),t>sc&&(sc=t)):t>cc?Ec(ac,t)>Ec(ac,sc)&&(sc=t):Ec(t,sc)>Ec(ac,sc)&&(ac=t)}else dc.push(pc=[ac=t,sc=t]);e<oc&&(oc=e),e>uc&&(uc=e),hc=n,cc=t}function bc(){gc.point=vc}function xc(){pc[0]=ac,pc[1]=sc,gc.point=mc,hc=null}function _c(t,e){if(hc){var n=t-cc;yc.add(mu(n)>180?n+(n>0?360:-360):n)}else lc=t,fc=e;Hu.point(t,e),vc(t,e)}function wc(){Hu.lineStart()}function kc(){_c(lc,fc),Hu.lineEnd(),mu(yc)>1e-6&&(ac=-(sc=180)),pc[0]=ac,pc[1]=sc,hc=null}function Ec(t,e){return(e-=t)<0?e+360:e}function Ac(t,e){return t[0]-e[0]}function Tc(t,e){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:e<t[0]||t[1]<e}var Sc,Mc,Oc,Nc,Cc,Dc,Lc,Fc,Ic,Pc,Rc,Bc,jc,Yc,zc,Uc,$c=function(t){var e,n,r,i,a,o,s;if(uc=sc=-(ac=oc=1/0),dc=[],$u(t,gc),n=dc.length){for(dc.sort(Ac),e=1,a=[r=dc[0]];e<n;++e)Tc(r,(i=dc[e])[0])||Tc(r,i[1])?(Ec(r[0],i[1])>Ec(r[0],r[1])&&(r[1]=i[1]),Ec(i[0],r[1])>Ec(r[0],r[1])&&(r[0]=i[0])):a.push(r=i);for(o=-1/0,e=0,r=a[n=a.length-1];e<=n;r=i,++e)i=a[e],(s=Ec(r[1],i[0]))>o&&(o=s,ac=i[0],sc=r[1])}return dc=pc=null,ac===1/0||oc===1/0?[[NaN,NaN],[NaN,NaN]]:[[ac,oc],[sc,uc]]},Gc={sphere:Du,point:Vc,lineStart:Wc,lineEnd:Zc,polygonStart:function(){Gc.lineStart=Jc,Gc.lineEnd=Qc},polygonEnd:function(){Gc.lineStart=Wc,Gc.lineEnd=Zc}};function Vc(t,e){t*=gu;var n=xu(e*=gu);Hc(n*xu(t),n*Au(t),Au(e))}function Hc(t,e,n){++Sc,Oc+=(t-Oc)/Sc,Nc+=(e-Nc)/Sc,Cc+=(n-Cc)/Sc}function Wc(){Gc.point=qc}function qc(t,e){t*=gu;var n=xu(e*=gu);Yc=n*xu(t),zc=n*Au(t),Uc=Au(e),Gc.point=Xc,Hc(Yc,zc,Uc)}function Xc(t,e){t*=gu;var n=xu(e*=gu),r=n*xu(t),i=n*Au(t),a=Au(e),o=bu(Su((o=zc*a-Uc*i)*o+(o=Uc*r-Yc*a)*o+(o=Yc*i-zc*r)*o),Yc*r+zc*i+Uc*a);Mc+=o,Dc+=o*(Yc+(Yc=r)),Lc+=o*(zc+(zc=i)),Fc+=o*(Uc+(Uc=a)),Hc(Yc,zc,Uc)}function Zc(){Gc.point=Vc}function Jc(){Gc.point=Kc}function Qc(){tl(Bc,jc),Gc.point=Vc}function Kc(t,e){Bc=t,jc=e,t*=gu,e*=gu,Gc.point=tl;var n=xu(e);Yc=n*xu(t),zc=n*Au(t),Uc=Au(e),Hc(Yc,zc,Uc)}function tl(t,e){t*=gu;var n=xu(e*=gu),r=n*xu(t),i=n*Au(t),a=Au(e),o=zc*a-Uc*i,s=Uc*r-Yc*a,u=Yc*i-zc*r,c=Su(o*o+s*s+u*u),l=Nu(c),f=c&&-l/c;Ic+=f*o,Pc+=f*s,Rc+=f*u,Mc+=l,Dc+=l*(Yc+(Yc=r)),Lc+=l*(zc+(zc=i)),Fc+=l*(Uc+(Uc=a)),Hc(Yc,zc,Uc)}var el=function(t){Sc=Mc=Oc=Nc=Cc=Dc=Lc=Fc=Ic=Pc=Rc=0,$u(t,Gc);var e=Ic,n=Pc,r=Rc,i=e*e+n*n+r*r;return i<1e-12&&(e=Dc,n=Lc,r=Fc,Mc<1e-6&&(e=Oc,n=Nc,r=Cc),(i=e*e+n*n+r*r)<1e-12)?[NaN,NaN]:[bu(n,e)*yu,Nu(r/Su(i))*yu]},nl=function(t){return function(){return t}},rl=function(t,e){function n(n,r){return n=t(n,r),e(n[0],n[1])}return t.invert&&e.invert&&(n.invert=function(n,r){return(n=e.invert(n,r))&&t.invert(n[0],n[1])}),n};function il(t,e){return[mu(t)>fu?t+Math.round(-t/pu)*pu:t,e]}function al(t,e,n){return(t%=pu)?e||n?rl(sl(t),ul(e,n)):sl(t):e||n?ul(e,n):il}function ol(t){return function(e,n){return[(e+=t)>fu?e-pu:e<-fu?e+pu:e,n]}}function sl(t){var e=ol(t);return e.invert=ol(-t),e}function ul(t,e){var n=xu(t),r=Au(t),i=xu(e),a=Au(e);function o(t,e){var o=xu(e),s=xu(t)*o,u=Au(t)*o,c=Au(e),l=c*n+s*r;return[bu(u*i-l*a,s*n-c*r),Nu(l*i+u*a)]}return o.invert=function(t,e){var o=xu(e),s=xu(t)*o,u=Au(t)*o,c=Au(e),l=c*i-u*a;return[bu(u*i+c*a,s*n+l*r),Nu(l*n-s*r)]},o}il.invert=il;var cl=function(t){function e(e){return(e=t(e[0]*gu,e[1]*gu))[0]*=yu,e[1]*=yu,e}return t=al(t[0]*gu,t[1]*gu,t.length>2?t[2]*gu:0),e.invert=function(e){return(e=t.invert(e[0]*gu,e[1]*gu))[0]*=yu,e[1]*=yu,e},e};function ll(t,e,n,r,i,a){if(n){var o=xu(e),s=Au(e),u=r*n;null==i?(i=e+r*pu,a=e-u/2):(i=fl(o,i),a=fl(o,a),(r>0?i<a:i>a)&&(i+=r*pu));for(var c,l=i;r>0?l>a:l<a;l-=u)c=Qu([o,-s*xu(l),-s*Au(l)]),t.point(c[0],c[1])}}function fl(t,e){(e=Ku(e))[0]-=t,ic(e);var n=Ou(-e[1]);return((-e[2]<0?-n:n)+pu-1e-6)%pu}var hl=function(){var t,e,n=nl([0,0]),r=nl(90),i=nl(6),a={point:function(n,r){t.push(n=e(n,r)),n[0]*=yu,n[1]*=yu}};function o(){var o=n.apply(this,arguments),s=r.apply(this,arguments)*gu,u=i.apply(this,arguments)*gu;return t=[],e=al(-o[0]*gu,-o[1]*gu,0).invert,ll(a,s,u,1),o={type:"Polygon",coordinates:[t]},t=e=null,o}return o.center=function(t){return arguments.length?(n="function"==typeof t?t:nl([+t[0],+t[1]]),o):n},o.radius=function(t){return arguments.length?(r="function"==typeof t?t:nl(+t),o):r},o.precision=function(t){return arguments.length?(i="function"==typeof t?t:nl(+t),o):i},o},dl=function(){var t,e=[];return{point:function(e,n){t.push([e,n])},lineStart:function(){e.push(t=[])},lineEnd:Du,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}},pl=function(t,e){return mu(t[0]-e[0])<1e-6&&mu(t[1]-e[1])<1e-6};function yl(t,e,n,r){this.x=t,this.z=e,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}var gl=function(t,e,n,r,i){var a,o,s=[],u=[];if(t.forEach((function(t){if(!((e=t.length-1)<=0)){var e,n,r=t[0],o=t[e];if(pl(r,o)){for(i.lineStart(),a=0;a<e;++a)i.point((r=t[a])[0],r[1]);i.lineEnd()}else s.push(n=new yl(r,t,null,!0)),u.push(n.o=new yl(r,null,n,!1)),s.push(n=new yl(o,t,null,!1)),u.push(n.o=new yl(o,null,n,!0))}})),s.length){for(u.sort(e),ml(s),ml(u),a=0,o=u.length;a<o;++a)u[a].e=n=!n;for(var c,l,f=s[0];;){for(var h=f,d=!0;h.v;)if((h=h.n)===f)return;c=h.z,i.lineStart();do{if(h.v=h.o.v=!0,h.e){if(d)for(a=0,o=c.length;a<o;++a)i.point((l=c[a])[0],l[1]);else r(h.x,h.n.x,1,i);h=h.n}else{if(d)for(c=h.p.z,a=c.length-1;a>=0;--a)i.point((l=c[a])[0],l[1]);else r(h.x,h.p.x,-1,i);h=h.p}c=(h=h.o).z,d=!d}while(!h.v);i.lineEnd()}}};function ml(t){if(e=t.length){for(var e,n,r=0,i=t[0];++r<e;)i.n=n=t[r],n.p=i,i=n;i.n=n=t[0],n.p=i}}var vl=su();function bl(t){return mu(t[0])<=fu?t[0]:Tu(t[0])*((mu(t[0])+fu)%pu-fu)}var xl=function(t,e){var n=bl(e),r=e[1],i=Au(r),a=[Au(n),-xu(n),0],o=0,s=0;vl.reset(),1===i?r=hu+1e-6:-1===i&&(r=-hu-1e-6);for(var u=0,c=t.length;u<c;++u)if(f=(l=t[u]).length)for(var l,f,h=l[f-1],d=bl(h),p=h[1]/2+du,y=Au(p),g=xu(p),m=0;m<f;++m,d=b,y=_,g=w,h=v){var v=l[m],b=bl(v),x=v[1]/2+du,_=Au(x),w=xu(x),k=b-d,E=k>=0?1:-1,A=E*k,T=A>fu,S=y*_;if(vl.add(bu(S*E*Au(A),g*w+S*xu(A))),o+=T?k+E*pu:k,T^d>=n^b>=n){var M=ec(Ku(h),Ku(v));ic(M);var O=ec(a,M);ic(O);var N=(T^k>=0?-1:1)*Nu(O[2]);(r>N||r===N&&(M[0]||M[1]))&&(s+=T^k>=0?1:-1)}}return(o<-1e-6||o<1e-6&&vl<-1e-6)^1&s},_l=function(t,e,n,r){return function(i){var a,o,s,u=e(i),c=dl(),l=e(c),f=!1,h={point:d,lineStart:y,lineEnd:g,polygonStart:function(){h.point=m,h.lineStart=v,h.lineEnd=b,o=[],a=[]},polygonEnd:function(){h.point=d,h.lineStart=y,h.lineEnd=g,o=R(o);var t=xl(a,r);o.length?(f||(i.polygonStart(),f=!0),gl(o,kl,t,n,i)):t&&(f||(i.polygonStart(),f=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),f&&(i.polygonEnd(),f=!1),o=a=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function d(e,n){t(e,n)&&i.point(e,n)}function p(t,e){u.point(t,e)}function y(){h.point=p,u.lineStart()}function g(){h.point=d,u.lineEnd()}function m(t,e){s.push([t,e]),l.point(t,e)}function v(){l.lineStart(),s=[]}function b(){m(s[0][0],s[0][1]),l.lineEnd();var t,e,n,r,u=l.clean(),h=c.result(),d=h.length;if(s.pop(),a.push(s),s=null,d)if(1&u){if((e=(n=h[0]).length-1)>0){for(f||(i.polygonStart(),f=!0),i.lineStart(),t=0;t<e;++t)i.point((r=n[t])[0],r[1]);i.lineEnd()}}else d>1&&2&u&&h.push(h.pop().concat(h.shift())),o.push(h.filter(wl))}return h}};function wl(t){return t.length>1}function kl(t,e){return((t=t.x)[0]<0?t[1]-hu-1e-6:hu-t[1])-((e=e.x)[0]<0?e[1]-hu-1e-6:hu-e[1])}var El=_l((function(){return!0}),(function(t){var e,n=NaN,r=NaN,i=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(a,o){var s=a>0?fu:-fu,u=mu(a-n);mu(u-fu)<1e-6?(t.point(n,r=(r+o)/2>0?hu:-hu),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(s,r),t.point(a,r),e=0):i!==s&&u>=fu&&(mu(n-i)<1e-6&&(n-=1e-6*i),mu(a-s)<1e-6&&(a-=1e-6*s),r=function(t,e,n,r){var i,a,o=Au(t-n);return mu(o)>1e-6?vu((Au(e)*(a=xu(r))*Au(n)-Au(r)*(i=xu(e))*Au(t))/(i*a*o)):(e+r)/2}(n,r,a,o),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(s,r),e=0),t.point(n=a,r=o),i=s},lineEnd:function(){t.lineEnd(),n=r=NaN},clean:function(){return 2-e}}}),(function(t,e,n,r){var i;if(null==t)i=n*hu,r.point(-fu,i),r.point(0,i),r.point(fu,i),r.point(fu,0),r.point(fu,-i),r.point(0,-i),r.point(-fu,-i),r.point(-fu,0),r.point(-fu,i);else if(mu(t[0]-e[0])>1e-6){var a=t[0]<e[0]?fu:-fu;i=n*a/2,r.point(-a,i),r.point(0,i),r.point(a,i)}else r.point(e[0],e[1])}),[-fu,-hu]);var Al=function(t){var e=xu(t),n=6*gu,r=e>0,i=mu(e)>1e-6;function a(t,n){return xu(t)*xu(n)>e}function o(t,n,r){var i=[1,0,0],a=ec(Ku(t),Ku(n)),o=tc(a,a),s=a[0],u=o-s*s;if(!u)return!r&&t;var c=e*o/u,l=-e*s/u,f=ec(i,a),h=rc(i,c);nc(h,rc(a,l));var d=f,p=tc(h,d),y=tc(d,d),g=p*p-y*(tc(h,h)-1);if(!(g<0)){var m=Su(g),v=rc(d,(-p-m)/y);if(nc(v,h),v=Qu(v),!r)return v;var b,x=t[0],_=n[0],w=t[1],k=n[1];_<x&&(b=x,x=_,_=b);var E=_-x,A=mu(E-fu)<1e-6;if(!A&&k<w&&(b=w,w=k,k=b),A||E<1e-6?A?w+k>0^v[1]<(mu(v[0]-x)<1e-6?w:k):w<=v[1]&&v[1]<=k:E>fu^(x<=v[0]&&v[0]<=_)){var T=rc(d,(-p+m)/y);return nc(T,h),[v,Qu(T)]}}}function s(e,n){var i=r?t:fu-t,a=0;return e<-i?a|=1:e>i&&(a|=2),n<-i?a|=4:n>i&&(a|=8),a}return _l(a,(function(t){var e,n,u,c,l;return{lineStart:function(){c=u=!1,l=1},point:function(f,h){var d,p=[f,h],y=a(f,h),g=r?y?0:s(f,h):y?s(f+(f<0?fu:-fu),h):0;if(!e&&(c=u=y)&&t.lineStart(),y!==u&&(!(d=o(e,p))||pl(e,d)||pl(p,d))&&(p[0]+=1e-6,p[1]+=1e-6,y=a(p[0],p[1])),y!==u)l=0,y?(t.lineStart(),d=o(p,e),t.point(d[0],d[1])):(d=o(e,p),t.point(d[0],d[1]),t.lineEnd()),e=d;else if(i&&e&&r^y){var m;g&n||!(m=o(p,e,!0))||(l=0,r?(t.lineStart(),t.point(m[0][0],m[0][1]),t.point(m[1][0],m[1][1]),t.lineEnd()):(t.point(m[1][0],m[1][1]),t.lineEnd(),t.lineStart(),t.point(m[0][0],m[0][1])))}!y||e&&pl(e,p)||t.point(p[0],p[1]),e=p,u=y,n=g},lineEnd:function(){u&&t.lineEnd(),e=null},clean:function(){return l|(c&&u)<<1}}}),(function(e,r,i,a){ll(a,t,n,i,e,r)}),r?[0,-t]:[-fu,t-fu])};function Tl(t,e,n,r){function i(i,a){return t<=i&&i<=n&&e<=a&&a<=r}function a(i,a,s,c){var l=0,f=0;if(null==i||(l=o(i,s))!==(f=o(a,s))||u(i,a)<0^s>0)do{c.point(0===l||3===l?t:n,l>1?r:e)}while((l=(l+s+4)%4)!==f);else c.point(a[0],a[1])}function o(r,i){return mu(r[0]-t)<1e-6?i>0?0:3:mu(r[0]-n)<1e-6?i>0?2:1:mu(r[1]-e)<1e-6?i>0?1:0:i>0?3:2}function s(t,e){return u(t.x,e.x)}function u(t,e){var n=o(t,1),r=o(e,1);return n!==r?n-r:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(o){var u,c,l,f,h,d,p,y,g,m,v,b=o,x=dl(),_={point:w,lineStart:function(){_.point=k,c&&c.push(l=[]);m=!0,g=!1,p=y=NaN},lineEnd:function(){u&&(k(f,h),d&&g&&x.rejoin(),u.push(x.result()));_.point=w,g&&b.lineEnd()},polygonStart:function(){b=x,u=[],c=[],v=!0},polygonEnd:function(){var e=function(){for(var e=0,n=0,i=c.length;n<i;++n)for(var a,o,s=c[n],u=1,l=s.length,f=s[0],h=f[0],d=f[1];u<l;++u)a=h,o=d,f=s[u],h=f[0],d=f[1],o<=r?d>r&&(h-a)*(r-o)>(d-o)*(t-a)&&++e:d<=r&&(h-a)*(r-o)<(d-o)*(t-a)&&--e;return e}(),n=v&&e,i=(u=R(u)).length;(n||i)&&(o.polygonStart(),n&&(o.lineStart(),a(null,null,1,o),o.lineEnd()),i&&gl(u,s,e,a,o),o.polygonEnd());b=o,u=c=l=null}};function w(t,e){i(t,e)&&b.point(t,e)}function k(a,o){var s=i(a,o);if(c&&l.push([a,o]),m)f=a,h=o,d=s,m=!1,s&&(b.lineStart(),b.point(a,o));else if(s&&g)b.point(a,o);else{var u=[p=Math.max(-1e9,Math.min(1e9,p)),y=Math.max(-1e9,Math.min(1e9,y))],x=[a=Math.max(-1e9,Math.min(1e9,a)),o=Math.max(-1e9,Math.min(1e9,o))];!function(t,e,n,r,i,a){var o,s=t[0],u=t[1],c=0,l=1,f=e[0]-s,h=e[1]-u;if(o=n-s,f||!(o>0)){if(o/=f,f<0){if(o<c)return;o<l&&(l=o)}else if(f>0){if(o>l)return;o>c&&(c=o)}if(o=i-s,f||!(o<0)){if(o/=f,f<0){if(o>l)return;o>c&&(c=o)}else if(f>0){if(o<c)return;o<l&&(l=o)}if(o=r-u,h||!(o>0)){if(o/=h,h<0){if(o<c)return;o<l&&(l=o)}else if(h>0){if(o>l)return;o>c&&(c=o)}if(o=a-u,h||!(o<0)){if(o/=h,h<0){if(o>l)return;o>c&&(c=o)}else if(h>0){if(o<c)return;o<l&&(l=o)}return c>0&&(t[0]=s+c*f,t[1]=u+c*h),l<1&&(e[0]=s+l*f,e[1]=u+l*h),!0}}}}}(u,x,t,e,n,r)?s&&(b.lineStart(),b.point(a,o),v=!1):(g||(b.lineStart(),b.point(u[0],u[1])),b.point(x[0],x[1]),s||b.lineEnd(),v=!1)}p=a,y=o,g=s}return _}}var Sl,Ml,Ol,Nl=function(){var t,e,n,r=0,i=0,a=960,o=500;return n={stream:function(n){return t&&e===n?t:t=Tl(r,i,a,o)(e=n)},extent:function(s){return arguments.length?(r=+s[0][0],i=+s[0][1],a=+s[1][0],o=+s[1][1],t=e=null,n):[[r,i],[a,o]]}}},Cl=su(),Dl={sphere:Du,point:Du,lineStart:function(){Dl.point=Fl,Dl.lineEnd=Ll},lineEnd:Du,polygonStart:Du,polygonEnd:Du};function Ll(){Dl.point=Dl.lineEnd=Du}function Fl(t,e){Sl=t*=gu,Ml=Au(e*=gu),Ol=xu(e),Dl.point=Il}function Il(t,e){t*=gu;var n=Au(e*=gu),r=xu(e),i=mu(t-Sl),a=xu(i),o=r*Au(i),s=Ol*n-Ml*r*a,u=Ml*n+Ol*r*a;Cl.add(bu(Su(o*o+s*s),u)),Sl=t,Ml=n,Ol=r}var Pl=function(t){return Cl.reset(),$u(t,Dl),+Cl},Rl=[null,null],Bl={type:"LineString",coordinates:Rl},jl=function(t,e){return Rl[0]=t,Rl[1]=e,Pl(Bl)},Yl={Feature:function(t,e){return Ul(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)if(Ul(n[r].geometry,e))return!0;return!1}},zl={Sphere:function(){return!0},Point:function(t,e){return $l(t.coordinates,e)},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if($l(n[r],e))return!0;return!1},LineString:function(t,e){return Gl(t.coordinates,e)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(Gl(n[r],e))return!0;return!1},Polygon:function(t,e){return Vl(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(Vl(n[r],e))return!0;return!1},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)if(Ul(n[r],e))return!0;return!1}};function Ul(t,e){return!(!t||!zl.hasOwnProperty(t.type))&&zl[t.type](t,e)}function $l(t,e){return 0===jl(t,e)}function Gl(t,e){for(var n,r,i,a=0,o=t.length;a<o;a++){if(0===(r=jl(t[a],e)))return!0;if(a>0&&(i=jl(t[a],t[a-1]))>0&&n<=i&&r<=i&&(n+r-i)*(1-Math.pow((n-r)/i,2))<1e-12*i)return!0;n=r}return!1}function Vl(t,e){return!!xl(t.map(Hl),Wl(e))}function Hl(t){return(t=t.map(Wl)).pop(),t}function Wl(t){return[t[0]*gu,t[1]*gu]}var ql=function(t,e){return(t&&Yl.hasOwnProperty(t.type)?Yl[t.type]:Ul)(t,e)};function Xl(t,e,n){var r=w(t,e-1e-6,n).concat(e);return function(t){return r.map((function(e){return[t,e]}))}}function Zl(t,e,n){var r=w(t,e-1e-6,n).concat(e);return function(t){return r.map((function(e){return[e,t]}))}}function Jl(){var t,e,n,r,i,a,o,s,u,c,l,f,h=10,d=h,p=90,y=360,g=2.5;function m(){return{type:"MultiLineString",coordinates:v()}}function v(){return w(_u(r/p)*p,n,p).map(l).concat(w(_u(s/y)*y,o,y).map(f)).concat(w(_u(e/h)*h,t,h).filter((function(t){return mu(t%p)>1e-6})).map(u)).concat(w(_u(a/d)*d,i,d).filter((function(t){return mu(t%y)>1e-6})).map(c))}return m.lines=function(){return v().map((function(t){return{type:"LineString",coordinates:t}}))},m.outline=function(){return{type:"Polygon",coordinates:[l(r).concat(f(o).slice(1),l(n).reverse().slice(1),f(s).reverse().slice(1))]}},m.extent=function(t){return arguments.length?m.extentMajor(t).extentMinor(t):m.extentMinor()},m.extentMajor=function(t){return arguments.length?(r=+t[0][0],n=+t[1][0],s=+t[0][1],o=+t[1][1],r>n&&(t=r,r=n,n=t),s>o&&(t=s,s=o,o=t),m.precision(g)):[[r,s],[n,o]]},m.extentMinor=function(n){return arguments.length?(e=+n[0][0],t=+n[1][0],a=+n[0][1],i=+n[1][1],e>t&&(n=e,e=t,t=n),a>i&&(n=a,a=i,i=n),m.precision(g)):[[e,a],[t,i]]},m.step=function(t){return arguments.length?m.stepMajor(t).stepMinor(t):m.stepMinor()},m.stepMajor=function(t){return arguments.length?(p=+t[0],y=+t[1],m):[p,y]},m.stepMinor=function(t){return arguments.length?(h=+t[0],d=+t[1],m):[h,d]},m.precision=function(h){return arguments.length?(g=+h,u=Xl(a,i,90),c=Zl(e,t,g),l=Xl(s,o,90),f=Zl(r,n,g),m):g},m.extentMajor([[-180,1e-6-90],[180,90-1e-6]]).extentMinor([[-180,-80-1e-6],[180,80+1e-6]])}function Ql(){return Jl()()}var Kl,tf,ef,nf,rf=function(t,e){var n=t[0]*gu,r=t[1]*gu,i=e[0]*gu,a=e[1]*gu,o=xu(r),s=Au(r),u=xu(a),c=Au(a),l=o*xu(n),f=o*Au(n),h=u*xu(i),d=u*Au(i),p=2*Nu(Su(Cu(a-r)+o*u*Cu(i-n))),y=Au(p),g=p?function(t){var e=Au(t*=p)/y,n=Au(p-t)/y,r=n*l+e*h,i=n*f+e*d,a=n*s+e*c;return[bu(i,r)*yu,bu(a,Su(r*r+i*i))*yu]}:function(){return[n*yu,r*yu]};return g.distance=p,g},af=function(t){return t},of=su(),sf=su(),uf={point:Du,lineStart:Du,lineEnd:Du,polygonStart:function(){uf.lineStart=cf,uf.lineEnd=hf},polygonEnd:function(){uf.lineStart=uf.lineEnd=uf.point=Du,of.add(mu(sf)),sf.reset()},result:function(){var t=of/2;return of.reset(),t}};function cf(){uf.point=lf}function lf(t,e){uf.point=ff,Kl=ef=t,tf=nf=e}function ff(t,e){sf.add(nf*t-ef*e),ef=t,nf=e}function hf(){ff(Kl,tf)}var df=uf,pf=1/0,yf=pf,gf=-pf,mf=gf;var vf,bf,xf,_f,wf={point:function(t,e){t<pf&&(pf=t);t>gf&&(gf=t);e<yf&&(yf=e);e>mf&&(mf=e)},lineStart:Du,lineEnd:Du,polygonStart:Du,polygonEnd:Du,result:function(){var t=[[pf,yf],[gf,mf]];return gf=mf=-(yf=pf=1/0),t}},kf=0,Ef=0,Af=0,Tf=0,Sf=0,Mf=0,Of=0,Nf=0,Cf=0,Df={point:Lf,lineStart:Ff,lineEnd:Rf,polygonStart:function(){Df.lineStart=Bf,Df.lineEnd=jf},polygonEnd:function(){Df.point=Lf,Df.lineStart=Ff,Df.lineEnd=Rf},result:function(){var t=Cf?[Of/Cf,Nf/Cf]:Mf?[Tf/Mf,Sf/Mf]:Af?[kf/Af,Ef/Af]:[NaN,NaN];return kf=Ef=Af=Tf=Sf=Mf=Of=Nf=Cf=0,t}};function Lf(t,e){kf+=t,Ef+=e,++Af}function Ff(){Df.point=If}function If(t,e){Df.point=Pf,Lf(xf=t,_f=e)}function Pf(t,e){var n=t-xf,r=e-_f,i=Su(n*n+r*r);Tf+=i*(xf+t)/2,Sf+=i*(_f+e)/2,Mf+=i,Lf(xf=t,_f=e)}function Rf(){Df.point=Lf}function Bf(){Df.point=Yf}function jf(){zf(vf,bf)}function Yf(t,e){Df.point=zf,Lf(vf=xf=t,bf=_f=e)}function zf(t,e){var n=t-xf,r=e-_f,i=Su(n*n+r*r);Tf+=i*(xf+t)/2,Sf+=i*(_f+e)/2,Mf+=i,Of+=(i=_f*t-xf*e)*(xf+t),Nf+=i*(_f+e),Cf+=3*i,Lf(xf=t,_f=e)}var Uf=Df;function $f(t){this._context=t}$f.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._context.moveTo(t,e),this._point=1;break;case 1:this._context.lineTo(t,e);break;default:this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,pu)}},result:Du};var Gf,Vf,Hf,Wf,qf,Xf=su(),Zf={point:Du,lineStart:function(){Zf.point=Jf},lineEnd:function(){Gf&&Qf(Vf,Hf),Zf.point=Du},polygonStart:function(){Gf=!0},polygonEnd:function(){Gf=null},result:function(){var t=+Xf;return Xf.reset(),t}};function Jf(t,e){Zf.point=Qf,Vf=Wf=t,Hf=qf=e}function Qf(t,e){Wf-=t,qf-=e,Xf.add(Su(Wf*Wf+qf*qf)),Wf=t,qf=e}var Kf=Zf;function th(){this._string=[]}function eh(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}th.prototype={_radius:4.5,_circle:eh(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._string.push("M",t,",",e),this._point=1;break;case 1:this._string.push("L",t,",",e);break;default:null==this._circle&&(this._circle=eh(this._radius)),this._string.push("M",t,",",e,this._circle)}},result:function(){if(this._string.length){var t=this._string.join("");return this._string=[],t}return null}};var nh=function(t,e){var n,r,i=4.5;function a(t){return t&&("function"==typeof i&&r.pointRadius(+i.apply(this,arguments)),$u(t,n(r))),r.result()}return a.area=function(t){return $u(t,n(df)),df.result()},a.measure=function(t){return $u(t,n(Kf)),Kf.result()},a.bounds=function(t){return $u(t,n(wf)),wf.result()},a.centroid=function(t){return $u(t,n(Uf)),Uf.result()},a.projection=function(e){return arguments.length?(n=null==e?(t=null,af):(t=e).stream,a):t},a.context=function(t){return arguments.length?(r=null==t?(e=null,new th):new $f(e=t),"function"!=typeof i&&r.pointRadius(i),a):e},a.pointRadius=function(t){return arguments.length?(i="function"==typeof t?t:(r.pointRadius(+t),+t),a):i},a.projection(t).context(e)},rh=function(t){return{stream:ih(t)}};function ih(t){return function(e){var n=new ah;for(var r in t)n[r]=t[r];return n.stream=e,n}}function ah(){}function oh(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),$u(n,t.stream(wf)),e(wf.result()),null!=r&&t.clipExtent(r),t}function sh(t,e,n){return oh(t,(function(n){var r=e[1][0]-e[0][0],i=e[1][1]-e[0][1],a=Math.min(r/(n[1][0]-n[0][0]),i/(n[1][1]-n[0][1])),o=+e[0][0]+(r-a*(n[1][0]+n[0][0]))/2,s=+e[0][1]+(i-a*(n[1][1]+n[0][1]))/2;t.scale(150*a).translate([o,s])}),n)}function uh(t,e,n){return sh(t,[[0,0],e],n)}function ch(t,e,n){return oh(t,(function(n){var r=+e,i=r/(n[1][0]-n[0][0]),a=(r-i*(n[1][0]+n[0][0]))/2,o=-i*n[0][1];t.scale(150*i).translate([a,o])}),n)}function lh(t,e,n){return oh(t,(function(n){var r=+e,i=r/(n[1][1]-n[0][1]),a=-i*n[0][0],o=(r-i*(n[1][1]+n[0][1]))/2;t.scale(150*i).translate([a,o])}),n)}ah.prototype={constructor:ah,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var fh=xu(30*gu),hh=function(t,e){return+e?function(t,e){function n(r,i,a,o,s,u,c,l,f,h,d,p,y,g){var m=c-r,v=l-i,b=m*m+v*v;if(b>4*e&&y--){var x=o+h,_=s+d,w=u+p,k=Su(x*x+_*_+w*w),E=Nu(w/=k),A=mu(mu(w)-1)<1e-6||mu(a-f)<1e-6?(a+f)/2:bu(_,x),T=t(A,E),S=T[0],M=T[1],O=S-r,N=M-i,C=v*O-m*N;(C*C/b>e||mu((m*O+v*N)/b-.5)>.3||o*h+s*d+u*p<fh)&&(n(r,i,a,o,s,u,S,M,A,x/=k,_/=k,w,y,g),g.point(S,M),n(S,M,A,x,_,w,c,l,f,h,d,p,y,g))}}return function(e){var r,i,a,o,s,u,c,l,f,h,d,p,y={point:g,lineStart:m,lineEnd:b,polygonStart:function(){e.polygonStart(),y.lineStart=x},polygonEnd:function(){e.polygonEnd(),y.lineStart=m}};function g(n,r){n=t(n,r),e.point(n[0],n[1])}function m(){l=NaN,y.point=v,e.lineStart()}function v(r,i){var a=Ku([r,i]),o=t(r,i);n(l,f,c,h,d,p,l=o[0],f=o[1],c=r,h=a[0],d=a[1],p=a[2],16,e),e.point(l,f)}function b(){y.point=g,e.lineEnd()}function x(){m(),y.point=_,y.lineEnd=w}function _(t,e){v(r=t,e),i=l,a=f,o=h,s=d,u=p,y.point=v}function w(){n(l,f,c,h,d,p,i,a,r,o,s,u,16,e),y.lineEnd=b,b()}return y}}(t,e):function(t){return ih({point:function(e,n){e=t(e,n),this.stream.point(e[0],e[1])}})}(t)};var dh=ih({point:function(t,e){this.stream.point(t*gu,e*gu)}});function ph(t,e,n){function r(r,i){return[e+t*r,n-t*i]}return r.invert=function(r,i){return[(r-e)/t,(n-i)/t]},r}function yh(t,e,n,r){var i=xu(r),a=Au(r),o=i*t,s=a*t,u=i/t,c=a/t,l=(a*n-i*e)/t,f=(a*e+i*n)/t;function h(t,r){return[o*t-s*r+e,n-s*t-o*r]}return h.invert=function(t,e){return[u*t-c*e+l,f-c*t-u*e]},h}function gh(t){return mh((function(){return t}))()}function mh(t){var e,n,r,i,a,o,s,u,c,l,f=150,h=480,d=250,p=0,y=0,g=0,m=0,v=0,b=0,x=null,_=El,w=null,k=af,E=.5;function A(t){return u(t[0]*gu,t[1]*gu)}function T(t){return(t=u.invert(t[0],t[1]))&&[t[0]*yu,t[1]*yu]}function S(){var t=yh(f,0,0,b).apply(null,e(p,y)),r=(b?yh:ph)(f,h-t[0],d-t[1],b);return n=al(g,m,v),s=rl(e,r),u=rl(n,s),o=hh(s,E),M()}function M(){return c=l=null,A}return A.stream=function(t){return c&&l===t?c:c=dh(function(t){return ih({point:function(e,n){var r=t(e,n);return this.stream.point(r[0],r[1])}})}(n)(_(o(k(l=t)))))},A.preclip=function(t){return arguments.length?(_=t,x=void 0,M()):_},A.postclip=function(t){return arguments.length?(k=t,w=r=i=a=null,M()):k},A.clipAngle=function(t){return arguments.length?(_=+t?Al(x=t*gu):(x=null,El),M()):x*yu},A.clipExtent=function(t){return arguments.length?(k=null==t?(w=r=i=a=null,af):Tl(w=+t[0][0],r=+t[0][1],i=+t[1][0],a=+t[1][1]),M()):null==w?null:[[w,r],[i,a]]},A.scale=function(t){return arguments.length?(f=+t,S()):f},A.translate=function(t){return arguments.length?(h=+t[0],d=+t[1],S()):[h,d]},A.center=function(t){return arguments.length?(p=t[0]%360*gu,y=t[1]%360*gu,S()):[p*yu,y*yu]},A.rotate=function(t){return arguments.length?(g=t[0]%360*gu,m=t[1]%360*gu,v=t.length>2?t[2]%360*gu:0,S()):[g*yu,m*yu,v*yu]},A.angle=function(t){return arguments.length?(b=t%360*gu,S()):b*yu},A.precision=function(t){return arguments.length?(o=hh(s,E=t*t),M()):Su(E)},A.fitExtent=function(t,e){return sh(A,t,e)},A.fitSize=function(t,e){return uh(A,t,e)},A.fitWidth=function(t,e){return ch(A,t,e)},A.fitHeight=function(t,e){return lh(A,t,e)},function(){return e=t.apply(this,arguments),A.invert=e.invert&&T,S()}}function vh(t){var e=0,n=fu/3,r=mh(t),i=r(e,n);return i.parallels=function(t){return arguments.length?r(e=t[0]*gu,n=t[1]*gu):[e*yu,n*yu]},i}function bh(t,e){var n=Au(t),r=(n+Au(e))/2;if(mu(r)<1e-6)return function(t){var e=xu(t);function n(t,n){return[t*e,Au(n)/e]}return n.invert=function(t,n){return[t/e,Nu(n*e)]},n}(t);var i=1+n*(2*r-n),a=Su(i)/r;function o(t,e){var n=Su(i-2*r*Au(e))/r;return[n*Au(t*=r),a-n*xu(t)]}return o.invert=function(t,e){var n=a-e;return[bu(t,mu(n))/r*Tu(n),Nu((i-(t*t+n*n)*r*r)/(2*r))]},o}var xh=function(){return vh(bh).scale(155.424).center([0,33.6442])},_h=function(){return xh().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])};var wh=function(){var t,e,n,r,i,a,o=_h(),s=xh().rotate([154,0]).center([-2,58.5]).parallels([55,65]),u=xh().rotate([157,0]).center([-3,19.9]).parallels([8,18]),c={point:function(t,e){a=[t,e]}};function l(t){var e=t[0],o=t[1];return a=null,n.point(e,o),a||(r.point(e,o),a)||(i.point(e,o),a)}function f(){return t=e=null,l}return l.invert=function(t){var e=o.scale(),n=o.translate(),r=(t[0]-n[0])/e,i=(t[1]-n[1])/e;return(i>=.12&&i<.234&&r>=-.425&&r<-.214?s:i>=.166&&i<.234&&r>=-.214&&r<-.115?u:o).invert(t)},l.stream=function(n){return t&&e===n?t:(r=[o.stream(e=n),s.stream(n),u.stream(n)],i=r.length,t={point:function(t,e){for(var n=-1;++n<i;)r[n].point(t,e)},sphere:function(){for(var t=-1;++t<i;)r[t].sphere()},lineStart:function(){for(var t=-1;++t<i;)r[t].lineStart()},lineEnd:function(){for(var t=-1;++t<i;)r[t].lineEnd()},polygonStart:function(){for(var t=-1;++t<i;)r[t].polygonStart()},polygonEnd:function(){for(var t=-1;++t<i;)r[t].polygonEnd()}});var r,i},l.precision=function(t){return arguments.length?(o.precision(t),s.precision(t),u.precision(t),f()):o.precision()},l.scale=function(t){return arguments.length?(o.scale(t),s.scale(.35*t),u.scale(t),l.translate(o.translate())):o.scale()},l.translate=function(t){if(!arguments.length)return o.translate();var e=o.scale(),a=+t[0],l=+t[1];return n=o.translate(t).clipExtent([[a-.455*e,l-.238*e],[a+.455*e,l+.238*e]]).stream(c),r=s.translate([a-.307*e,l+.201*e]).clipExtent([[a-.425*e+1e-6,l+.12*e+1e-6],[a-.214*e-1e-6,l+.234*e-1e-6]]).stream(c),i=u.translate([a-.205*e,l+.212*e]).clipExtent([[a-.214*e+1e-6,l+.166*e+1e-6],[a-.115*e-1e-6,l+.234*e-1e-6]]).stream(c),f()},l.fitExtent=function(t,e){return sh(l,t,e)},l.fitSize=function(t,e){return uh(l,t,e)},l.fitWidth=function(t,e){return ch(l,t,e)},l.fitHeight=function(t,e){return lh(l,t,e)},l.scale(1070)};function kh(t){return function(e,n){var r=xu(e),i=xu(n),a=t(r*i);return[a*i*Au(e),a*Au(n)]}}function Eh(t){return function(e,n){var r=Su(e*e+n*n),i=t(r),a=Au(i),o=xu(i);return[bu(e*a,r*o),Nu(r&&n*a/r)]}}var Ah=kh((function(t){return Su(2/(1+t))}));Ah.invert=Eh((function(t){return 2*Nu(t/2)}));var Th=function(){return gh(Ah).scale(124.75).clipAngle(179.999)},Sh=kh((function(t){return(t=Ou(t))&&t/Au(t)}));Sh.invert=Eh((function(t){return t}));var Mh=function(){return gh(Sh).scale(79.4188).clipAngle(179.999)};function Oh(t,e){return[t,ku(Mu((hu+e)/2))]}Oh.invert=function(t,e){return[t,2*vu(wu(e))-hu]};var Nh=function(){return Ch(Oh).scale(961/pu)};function Ch(t){var e,n,r,i=gh(t),a=i.center,o=i.scale,s=i.translate,u=i.clipExtent,c=null;function l(){var a=fu*o(),s=i(cl(i.rotate()).invert([0,0]));return u(null==c?[[s[0]-a,s[1]-a],[s[0]+a,s[1]+a]]:t===Oh?[[Math.max(s[0]-a,c),e],[Math.min(s[0]+a,n),r]]:[[c,Math.max(s[1]-a,e)],[n,Math.min(s[1]+a,r)]])}return i.scale=function(t){return arguments.length?(o(t),l()):o()},i.translate=function(t){return arguments.length?(s(t),l()):s()},i.center=function(t){return arguments.length?(a(t),l()):a()},i.clipExtent=function(t){return arguments.length?(null==t?c=e=n=r=null:(c=+t[0][0],e=+t[0][1],n=+t[1][0],r=+t[1][1]),l()):null==c?null:[[c,e],[n,r]]},l()}function Dh(t){return Mu((hu+t)/2)}function Lh(t,e){var n=xu(t),r=t===e?Au(t):ku(n/xu(e))/ku(Dh(e)/Dh(t)),i=n*Eu(Dh(t),r)/r;if(!r)return Oh;function a(t,e){i>0?e<1e-6-hu&&(e=1e-6-hu):e>hu-1e-6&&(e=hu-1e-6);var n=i/Eu(Dh(e),r);return[n*Au(r*t),i-n*xu(r*t)]}return a.invert=function(t,e){var n=i-e,a=Tu(r)*Su(t*t+n*n);return[bu(t,mu(n))/r*Tu(n),2*vu(Eu(i/a,1/r))-hu]},a}var Fh=function(){return vh(Lh).scale(109.5).parallels([30,30])};function Ih(t,e){return[t,e]}Ih.invert=Ih;var Ph=function(){return gh(Ih).scale(152.63)};function Rh(t,e){var n=xu(t),r=t===e?Au(t):(n-xu(e))/(e-t),i=n/r+t;if(mu(r)<1e-6)return Ih;function a(t,e){var n=i-e,a=r*t;return[n*Au(a),i-n*xu(a)]}return a.invert=function(t,e){var n=i-e;return[bu(t,mu(n))/r*Tu(n),i-Tu(r)*Su(t*t+n*n)]},a}var Bh=function(){return vh(Rh).scale(131.154).center([0,13.9389])},jh=1.340264,Yh=-.081106,zh=893e-6,Uh=.003796,$h=Su(3)/2;function Gh(t,e){var n=Nu($h*Au(e)),r=n*n,i=r*r*r;return[t*xu(n)/($h*(jh+3*Yh*r+i*(7*zh+9*Uh*r))),n*(jh+Yh*r+i*(zh+Uh*r))]}Gh.invert=function(t,e){for(var n,r=e,i=r*r,a=i*i*i,o=0;o<12&&(a=(i=(r-=n=(r*(jh+Yh*i+a*(zh+Uh*i))-e)/(jh+3*Yh*i+a*(7*zh+9*Uh*i)))*r)*i*i,!(mu(n)<1e-12));++o);return[$h*t*(jh+3*Yh*i+a*(7*zh+9*Uh*i))/xu(r),Nu(Au(r)/$h)]};var Vh=function(){return gh(Gh).scale(177.158)};function Hh(t,e){var n=xu(e),r=xu(t)*n;return[n*Au(t)/r,Au(e)/r]}Hh.invert=Eh(vu);var Wh=function(){return gh(Hh).scale(144.049).clipAngle(60)};function qh(t,e,n,r){return 1===t&&1===e&&0===n&&0===r?af:ih({point:function(i,a){this.stream.point(i*t+n,a*e+r)}})}var Xh=function(){var t,e,n,r,i,a,o=1,s=0,u=0,c=1,l=1,f=af,h=null,d=af;function p(){return r=i=null,a}return a={stream:function(t){return r&&i===t?r:r=f(d(i=t))},postclip:function(r){return arguments.length?(d=r,h=t=e=n=null,p()):d},clipExtent:function(r){return arguments.length?(d=null==r?(h=t=e=n=null,af):Tl(h=+r[0][0],t=+r[0][1],e=+r[1][0],n=+r[1][1]),p()):null==h?null:[[h,t],[e,n]]},scale:function(t){return arguments.length?(f=qh((o=+t)*c,o*l,s,u),p()):o},translate:function(t){return arguments.length?(f=qh(o*c,o*l,s=+t[0],u=+t[1]),p()):[s,u]},reflectX:function(t){return arguments.length?(f=qh(o*(c=t?-1:1),o*l,s,u),p()):c<0},reflectY:function(t){return arguments.length?(f=qh(o*c,o*(l=t?-1:1),s,u),p()):l<0},fitExtent:function(t,e){return sh(a,t,e)},fitSize:function(t,e){return uh(a,t,e)},fitWidth:function(t,e){return ch(a,t,e)},fitHeight:function(t,e){return lh(a,t,e)}}};function Zh(t,e){var n=e*e,r=n*n;return[t*(.8707-.131979*n+r*(r*(.003971*n-.001529*r)-.013791)),e*(1.007226+n*(.015085+r*(.028874*n-.044475-.005916*r)))]}Zh.invert=function(t,e){var n,r=e,i=25;do{var a=r*r,o=a*a;r-=n=(r*(1.007226+a*(.015085+o*(.028874*a-.044475-.005916*o)))-e)/(1.007226+a*(.045255+o*(.259866*a-.311325-.005916*11*o)))}while(mu(n)>1e-6&&--i>0);return[t/(.8707+(a=r*r)*(a*(a*a*a*(.003971-.001529*a)-.013791)-.131979)),r]};var Jh=function(){return gh(Zh).scale(175.295)};function Qh(t,e){return[xu(e)*Au(t),Au(e)]}Qh.invert=Eh(Nu);var Kh=function(){return gh(Qh).scale(249.5).clipAngle(90+1e-6)};function td(t,e){var n=xu(e),r=1+xu(t)*n;return[n*Au(t)/r,Au(e)/r]}td.invert=Eh((function(t){return 2*vu(t)}));var ed=function(){return gh(td).scale(250).clipAngle(142)};function nd(t,e){return[ku(Mu((hu+e)/2)),-t]}nd.invert=function(t,e){return[-e,2*vu(wu(t))-hu]};var rd=function(){var t=Ch(nd),e=t.center,n=t.rotate;return t.center=function(t){return arguments.length?e([-t[1],t[0]]):[(t=e())[1],-t[0]]},t.rotate=function(t){return arguments.length?n([t[0],t[1],t.length>2?t[2]+90:90]):[(t=n())[0],t[1],t[2]-90]},n([0,0,90]).scale(159.155)};function id(t,e){return t.parent===e.parent?1:2}function ad(t,e){return t+e.x}function od(t,e){return Math.max(t,e.y)}var sd=function(){var t=id,e=1,n=1,r=!1;function i(i){var a,o=0;i.eachAfter((function(e){var n=e.children;n?(e.x=function(t){return t.reduce(ad,0)/t.length}(n),e.y=function(t){return 1+t.reduce(od,0)}(n)):(e.x=a?o+=t(e,a):0,e.y=0,a=e)}));var s=function(t){for(var e;e=t.children;)t=e[0];return t}(i),u=function(t){for(var e;e=t.children;)t=e[e.length-1];return t}(i),c=s.x-t(s,u)/2,l=u.x+t(u,s)/2;return i.eachAfter(r?function(t){t.x=(t.x-i.x)*e,t.y=(i.y-t.y)*n}:function(t){t.x=(t.x-c)/(l-c)*e,t.y=(1-(i.y?t.y/i.y:1))*n})}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(t){return arguments.length?(r=!1,e=+t[0],n=+t[1],i):r?null:[e,n]},i.nodeSize=function(t){return arguments.length?(r=!0,e=+t[0],n=+t[1],i):r?[e,n]:null},i};function ud(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 cd(t,e){var n,r,i,a,o,s=new dd(t),u=+t.value&&(s.value=t.value),c=[s];for(null==e&&(e=ld);n=c.pop();)if(u&&(n.value=+n.data.value),(i=e(n.data))&&(o=i.length))for(n.children=new Array(o),a=o-1;a>=0;--a)c.push(r=n.children[a]=new dd(i[a])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(hd)}function ld(t){return t.children}function fd(t){t.data=t.data.data}function hd(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function dd(t){this.data=t,this.depth=this.height=0,this.parent=null}dd.prototype=cd.prototype={constructor:dd,count:function(){return this.eachAfter(ud)},each:function(t){var e,n,r,i,a=this,o=[a];do{for(e=o.reverse(),o=[];a=e.pop();)if(t(a),n=a.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,a=[i],o=[];i=a.pop();)if(o.push(i),e=i.children)for(n=0,r=e.length;n<r;++n)a.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;t=n.pop(),e=r.pop();for(;t===e;)i=t,t=n.pop(),e=r.pop();return i}(e,t),r=[e];e!==n;)e=e.parent,r.push(e);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 cd(this).eachBefore(fd)}};var pd=Array.prototype.slice;var yd=function(t){for(var e,n,r=0,i=(t=function(t){for(var e,n,r=t.length;r;)n=Math.random()*r--|0,e=t[r],t[r]=t[n],t[n]=e;return t}(pd.call(t))).length,a=[];r<i;)e=t[r],n&&vd(n,e)?++r:(n=xd(a=gd(a,e)),r=0);return n};function gd(t,e){var n,r;if(bd(e,t))return[e];for(n=0;n<t.length;++n)if(md(e,t[n])&&bd(_d(t[n],e),t))return[t[n],e];for(n=0;n<t.length-1;++n)for(r=n+1;r<t.length;++r)if(md(_d(t[n],t[r]),e)&&md(_d(t[n],e),t[r])&&md(_d(t[r],e),t[n])&&bd(wd(t[n],t[r],e),t))return[t[n],t[r],e];throw new Error}function md(t,e){var n=t.r-e.r,r=e.x-t.x,i=e.y-t.y;return n<0||n*n<r*r+i*i}function vd(t,e){var n=t.r-e.r+1e-6,r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function bd(t,e){for(var n=0;n<e.length;++n)if(!vd(t,e[n]))return!1;return!0}function xd(t){switch(t.length){case 1:return{x:(e=t[0]).x,y:e.y,r:e.r};case 2:return _d(t[0],t[1]);case 3:return wd(t[0],t[1],t[2])}var e}function _d(t,e){var n=t.x,r=t.y,i=t.r,a=e.x,o=e.y,s=e.r,u=a-n,c=o-r,l=s-i,f=Math.sqrt(u*u+c*c);return{x:(n+a+u/f*l)/2,y:(r+o+c/f*l)/2,r:(f+i+s)/2}}function wd(t,e,n){var r=t.x,i=t.y,a=t.r,o=e.x,s=e.y,u=e.r,c=n.x,l=n.y,f=n.r,h=r-o,d=r-c,p=i-s,y=i-l,g=u-a,m=f-a,v=r*r+i*i-a*a,b=v-o*o-s*s+u*u,x=v-c*c-l*l+f*f,_=d*p-h*y,w=(p*x-y*b)/(2*_)-r,k=(y*g-p*m)/_,E=(d*b-h*x)/(2*_)-i,A=(h*m-d*g)/_,T=k*k+A*A-1,S=2*(a+w*k+E*A),M=w*w+E*E-a*a,O=-(T?(S+Math.sqrt(S*S-4*T*M))/(2*T):M/S);return{x:r+w+k*O,y:i+E+A*O,r:O}}function kd(t,e,n){var r,i,a,o,s=t.x-e.x,u=t.y-e.y,c=s*s+u*u;c?(i=e.r+n.r,i*=i,o=t.r+n.r,i>(o*=o)?(r=(c+o-i)/(2*c),a=Math.sqrt(Math.max(0,o/c-r*r)),n.x=t.x-r*s-a*u,n.y=t.y-r*u+a*s):(r=(c+i-o)/(2*c),a=Math.sqrt(Math.max(0,i/c-r*r)),n.x=e.x+r*s-a*u,n.y=e.y+r*u+a*s)):(n.x=e.x+n.r,n.y=e.y)}function Ed(t,e){var n=t.r+e.r-1e-6,r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function Ad(t){var e=t._,n=t.next._,r=e.r+n.r,i=(e.x*n.r+n.x*e.r)/r,a=(e.y*n.r+n.y*e.r)/r;return i*i+a*a}function Td(t){this._=t,this.next=null,this.previous=null}function Sd(t){if(!(i=t.length))return 0;var e,n,r,i,a,o,s,u,c,l,f;if((e=t[0]).x=0,e.y=0,!(i>1))return e.r;if(n=t[1],e.x=-n.r,n.x=e.r,n.y=0,!(i>2))return e.r+n.r;kd(n,e,r=t[2]),e=new Td(e),n=new Td(n),r=new Td(r),e.next=r.previous=n,n.next=e.previous=r,r.next=n.previous=e;t:for(s=3;s<i;++s){kd(e._,n._,r=t[s]),r=new Td(r),u=n.next,c=e.previous,l=n._.r,f=e._.r;do{if(l<=f){if(Ed(u._,r._)){n=u,e.next=n,n.previous=e,--s;continue t}l+=u._.r,u=u.next}else{if(Ed(c._,r._)){(e=c).next=n,n.previous=e,--s;continue t}f+=c._.r,c=c.previous}}while(u!==c.next);for(r.previous=e,r.next=n,e.next=n.previous=n=r,a=Ad(e);(r=r.next)!==n;)(o=Ad(r))<a&&(e=r,a=o);n=e.next}for(e=[n._],r=n;(r=r.next)!==n;)e.push(r._);for(r=yd(e),s=0;s<i;++s)(e=t[s]).x-=r.x,e.y-=r.y;return r.r}var Md=function(t){return Sd(t),t};function Od(t){return null==t?null:Nd(t)}function Nd(t){if("function"!=typeof t)throw new Error;return t}function Cd(){return 0}var Dd=function(t){return function(){return t}};function Ld(t){return Math.sqrt(t.value)}var Fd=function(){var t=null,e=1,n=1,r=Cd;function i(i){return i.x=e/2,i.y=n/2,t?i.eachBefore(Id(t)).eachAfter(Pd(r,.5)).eachBefore(Rd(1)):i.eachBefore(Id(Ld)).eachAfter(Pd(Cd,1)).eachAfter(Pd(r,i.r/Math.min(e,n))).eachBefore(Rd(Math.min(e,n)/(2*i.r))),i}return i.radius=function(e){return arguments.length?(t=Od(e),i):t},i.size=function(t){return arguments.length?(e=+t[0],n=+t[1],i):[e,n]},i.padding=function(t){return arguments.length?(r="function"==typeof t?t:Dd(+t),i):r},i};function Id(t){return function(e){e.children||(e.r=Math.max(0,+t(e)||0))}}function Pd(t,e){return function(n){if(r=n.children){var r,i,a,o=r.length,s=t(n)*e||0;if(s)for(i=0;i<o;++i)r[i].r+=s;if(a=Sd(r),s)for(i=0;i<o;++i)r[i].r-=s;n.r=a+s}}}function Rd(t){return function(e){var n=e.parent;e.r*=t,n&&(e.x=n.x+t*e.x,e.y=n.y+t*e.y)}}var Bd=function(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)},jd=function(t,e,n,r,i){for(var a,o=t.children,s=-1,u=o.length,c=t.value&&(r-e)/t.value;++s<u;)(a=o[s]).y0=n,a.y1=i,a.x0=e,a.x1=e+=a.value*c},Yd=function(){var t=1,e=1,n=0,r=!1;function i(i){var a=i.height+1;return i.x0=i.y0=n,i.x1=t,i.y1=e/a,i.eachBefore(function(t,e){return function(r){r.children&&jd(r,r.x0,t*(r.depth+1)/e,r.x1,t*(r.depth+2)/e);var i=r.x0,a=r.y0,o=r.x1-n,s=r.y1-n;o<i&&(i=o=(i+o)/2),s<a&&(a=s=(a+s)/2),r.x0=i,r.y0=a,r.x1=o,r.y1=s}}(e,a)),r&&i.eachBefore(Bd),i}return i.round=function(t){return arguments.length?(r=!!t,i):r},i.size=function(n){return arguments.length?(t=+n[0],e=+n[1],i):[t,e]},i.padding=function(t){return arguments.length?(n=+t,i):n},i},zd={depth:-1},Ud={};function $d(t){return t.id}function Gd(t){return t.parentId}var Vd=function(){var t=$d,e=Gd;function n(n){var r,i,a,o,s,u,c,l=n.length,f=new Array(l),h={};for(i=0;i<l;++i)r=n[i],s=f[i]=new dd(r),null!=(u=t(r,i,n))&&(u+="")&&(h[c="$"+(s.id=u)]=c in h?Ud:s);for(i=0;i<l;++i)if(s=f[i],null!=(u=e(n[i],i,n))&&(u+="")){if(!(o=h["$"+u]))throw new Error("missing: "+u);if(o===Ud)throw new Error("ambiguous: "+u);o.children?o.children.push(s):o.children=[s],s.parent=o}else{if(a)throw new Error("multiple roots");a=s}if(!a)throw new Error("no root");if(a.parent=zd,a.eachBefore((function(t){t.depth=t.parent.depth+1,--l})).eachBefore(hd),a.parent=null,l>0)throw new Error("cycle");return a}return n.id=function(e){return arguments.length?(t=Nd(e),n):t},n.parentId=function(t){return arguments.length?(e=Nd(t),n):e},n};function Hd(t,e){return t.parent===e.parent?1:2}function Wd(t){var e=t.children;return e?e[0]:t.t}function qd(t){var e=t.children;return e?e[e.length-1]:t.t}function Xd(t,e,n){var r=n/(e.i-t.i);e.c-=r,e.s+=n,t.c+=r,e.z+=n,e.m+=n}function Zd(t,e,n){return t.a.parent===e.parent?t.a:n}function Jd(t,e){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=e}Jd.prototype=Object.create(dd.prototype);var Qd=function(){var t=Hd,e=1,n=1,r=null;function i(i){var u=function(t){for(var e,n,r,i,a,o=new Jd(t,0),s=[o];e=s.pop();)if(r=e._.children)for(e.children=new Array(a=r.length),i=a-1;i>=0;--i)s.push(n=e.children[i]=new Jd(r[i],i)),n.parent=e;return(o.parent=new Jd(null,0)).children=[o],o}(i);if(u.eachAfter(a),u.parent.m=-u.z,u.eachBefore(o),r)i.eachBefore(s);else{var c=i,l=i,f=i;i.eachBefore((function(t){t.x<c.x&&(c=t),t.x>l.x&&(l=t),t.depth>f.depth&&(f=t)}));var h=c===l?1:t(c,l)/2,d=h-c.x,p=e/(l.x+h+d),y=n/(f.depth||1);i.eachBefore((function(t){t.x=(t.x+d)*p,t.y=t.depth*y}))}return i}function a(e){var n=e.children,r=e.parent.children,i=e.i?r[e.i-1]:null;if(n){!function(t){for(var e,n=0,r=0,i=t.children,a=i.length;--a>=0;)(e=i[a]).z+=n,e.m+=n,n+=e.s+(r+=e.c)}(e);var a=(n[0].z+n[n.length-1].z)/2;i?(e.z=i.z+t(e._,i._),e.m=e.z-a):e.z=a}else i&&(e.z=i.z+t(e._,i._));e.parent.A=function(e,n,r){if(n){for(var i,a=e,o=e,s=n,u=a.parent.children[0],c=a.m,l=o.m,f=s.m,h=u.m;s=qd(s),a=Wd(a),s&&a;)u=Wd(u),(o=qd(o)).a=e,(i=s.z+f-a.z-c+t(s._,a._))>0&&(Xd(Zd(s,e,r),e,i),c+=i,l+=i),f+=s.m,c+=a.m,h+=u.m,l+=o.m;s&&!qd(o)&&(o.t=s,o.m+=f-l),a&&!Wd(u)&&(u.t=a,u.m+=c-h,r=e)}return r}(e,i,e.parent.A||r[0])}function o(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function s(t){t.x*=e,t.y=t.depth*n}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(t){return arguments.length?(r=!1,e=+t[0],n=+t[1],i):r?null:[e,n]},i.nodeSize=function(t){return arguments.length?(r=!0,e=+t[0],n=+t[1],i):r?[e,n]:null},i},Kd=function(t,e,n,r,i){for(var a,o=t.children,s=-1,u=o.length,c=t.value&&(i-n)/t.value;++s<u;)(a=o[s]).x0=e,a.x1=r,a.y0=n,a.y1=n+=a.value*c},tp=(1+Math.sqrt(5))/2;function ep(t,e,n,r,i,a){for(var o,s,u,c,l,f,h,d,p,y,g,m=[],v=e.children,b=0,x=0,_=v.length,w=e.value;b<_;){u=i-n,c=a-r;do{l=v[x++].value}while(!l&&x<_);for(f=h=l,g=l*l*(y=Math.max(c/u,u/c)/(w*t)),p=Math.max(h/g,g/f);x<_;++x){if(l+=s=v[x].value,s<f&&(f=s),s>h&&(h=s),g=l*l*y,(d=Math.max(h/g,g/f))>p){l-=s;break}p=d}m.push(o={value:l,dice:u<c,children:v.slice(b,x)}),o.dice?jd(o,n,r,i,w?r+=c*l/w:a):Kd(o,n,r,w?n+=u*l/w:i,a),w-=l,b=x}return m}var np=function t(e){function n(t,n,r,i,a){ep(e,t,n,r,i,a)}return n.ratio=function(e){return t((e=+e)>1?e:1)},n}(tp),rp=function(){var t=np,e=!1,n=1,r=1,i=[0],a=Cd,o=Cd,s=Cd,u=Cd,c=Cd;function l(t){return t.x0=t.y0=0,t.x1=n,t.y1=r,t.eachBefore(f),i=[0],e&&t.eachBefore(Bd),t}function f(e){var n=i[e.depth],r=e.x0+n,l=e.y0+n,f=e.x1-n,h=e.y1-n;f<r&&(r=f=(r+f)/2),h<l&&(l=h=(l+h)/2),e.x0=r,e.y0=l,e.x1=f,e.y1=h,e.children&&(n=i[e.depth+1]=a(e)/2,r+=c(e)-n,l+=o(e)-n,(f-=s(e)-n)<r&&(r=f=(r+f)/2),(h-=u(e)-n)<l&&(l=h=(l+h)/2),t(e,r,l,f,h))}return l.round=function(t){return arguments.length?(e=!!t,l):e},l.size=function(t){return arguments.length?(n=+t[0],r=+t[1],l):[n,r]},l.tile=function(e){return arguments.length?(t=Nd(e),l):t},l.padding=function(t){return arguments.length?l.paddingInner(t).paddingOuter(t):l.paddingInner()},l.paddingInner=function(t){return arguments.length?(a="function"==typeof t?t:Dd(+t),l):a},l.paddingOuter=function(t){return arguments.length?l.paddingTop(t).paddingRight(t).paddingBottom(t).paddingLeft(t):l.paddingTop()},l.paddingTop=function(t){return arguments.length?(o="function"==typeof t?t:Dd(+t),l):o},l.paddingRight=function(t){return arguments.length?(s="function"==typeof t?t:Dd(+t),l):s},l.paddingBottom=function(t){return arguments.length?(u="function"==typeof t?t:Dd(+t),l):u},l.paddingLeft=function(t){return arguments.length?(c="function"==typeof t?t:Dd(+t),l):c},l},ip=function(t,e,n,r,i){var a,o,s=t.children,u=s.length,c=new Array(u+1);for(c[0]=o=a=0;a<u;++a)c[a+1]=o+=s[a].value;!function t(e,n,r,i,a,o,u){if(e>=n-1){var l=s[e];return l.x0=i,l.y0=a,l.x1=o,void(l.y1=u)}var f=c[e],h=r/2+f,d=e+1,p=n-1;for(;d<p;){var y=d+p>>>1;c[y]<h?d=y+1:p=y}h-c[d-1]<c[d]-h&&e+1<d&&--d;var g=c[d]-f,m=r-g;if(o-i>u-a){var v=(i*m+o*g)/r;t(e,d,g,i,a,v,u),t(d,n,m,v,a,o,u)}else{var b=(a*m+u*g)/r;t(e,d,g,i,a,o,b),t(d,n,m,i,b,o,u)}}(0,u,t.value,e,n,r,i)},ap=function(t,e,n,r,i){(1&t.depth?Kd:jd)(t,e,n,r,i)},op=function t(e){function n(t,n,r,i,a){if((o=t._squarify)&&o.ratio===e)for(var o,s,u,c,l,f=-1,h=o.length,d=t.value;++f<h;){for(u=(s=o[f]).children,c=s.value=0,l=u.length;c<l;++c)s.value+=u[c].value;s.dice?jd(s,n,r,i,r+=(a-r)*s.value/d):Kd(s,n,r,n+=(i-n)*s.value/d,a),d-=s.value}else t._squarify=o=ep(e,t,n,r,i,a),o.ratio=e}return n.ratio=function(e){return t((e=+e)>1?e:1)},n}(tp),sp=function(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}},up=function(t,e){var n=cn(+t,+e);return function(t){var e=n(t);return e-360*Math.floor(e/360)}},cp=function(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}},lp=Math.SQRT2;function fp(t){return((t=Math.exp(t))+1/t)/2}var hp=function(t,e){var n,r,i=t[0],a=t[1],o=t[2],s=e[0],u=e[1],c=e[2],l=s-i,f=u-a,h=l*l+f*f;if(h<1e-12)r=Math.log(c/o)/lp,n=function(t){return[i+t*l,a+t*f,o*Math.exp(lp*t*r)]};else{var d=Math.sqrt(h),p=(c*c-o*o+4*h)/(2*o*2*d),y=(c*c-o*o-4*h)/(2*c*2*d),g=Math.log(Math.sqrt(p*p+1)-p),m=Math.log(Math.sqrt(y*y+1)-y);r=(m-g)/lp,n=function(t){var e,n=t*r,s=fp(g),u=o/(2*d)*(s*(e=lp*n+g,((e=Math.exp(2*e))-1)/(e+1))-function(t){return((t=Math.exp(t))-1/t)/2}(g));return[i+u*l,a+u*f,o*s/fp(lp*n+g)]}}return n.duration=1e3*r,n};function dp(t){return function(e,n){var r=t((e=tn(e)).h,(n=tn(n)).h),i=fn(e.s,n.s),a=fn(e.l,n.l),o=fn(e.opacity,n.opacity);return function(t){return e.h=r(t),e.s=i(t),e.l=a(t),e.opacity=o(t),e+""}}}var pp=dp(cn),yp=dp(fn);function gp(t,e){var n=fn((t=pa(t)).l,(e=pa(e)).l),r=fn(t.a,e.a),i=fn(t.b,e.b),a=fn(t.opacity,e.opacity);return function(e){return t.l=n(e),t.a=r(e),t.b=i(e),t.opacity=a(e),t+""}}function mp(t){return function(e,n){var r=t((e=wa(e)).h,(n=wa(n)).h),i=fn(e.c,n.c),a=fn(e.l,n.l),o=fn(e.opacity,n.opacity);return function(t){return e.h=r(t),e.c=i(t),e.l=a(t),e.opacity=o(t),e+""}}}var vp=mp(cn),bp=mp(fn);function xp(t){return function e(n){function r(e,r){var i=t((e=Na(e)).h,(r=Na(r)).h),a=fn(e.s,r.s),o=fn(e.l,r.l),s=fn(e.opacity,r.opacity);return function(t){return e.h=i(t),e.s=a(t),e.l=o(Math.pow(t,n)),e.opacity=s(t),e+""}}return n=+n,r.gamma=e,r}(1)}var _p=xp(cn),wp=xp(fn);function kp(t,e){for(var n=0,r=e.length-1,i=e[0],a=new Array(r<0?0:r);n<r;)a[n]=t(i,i=e[++n]);return function(t){var e=Math.max(0,Math.min(r-1,Math.floor(t*=r)));return a[e](t-e)}}var Ep=function(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t(r/(e-1));return n},Ap=function(t){for(var e,n=-1,r=t.length,i=t[r-1],a=0;++n<r;)e=i,i=t[n],a+=e[1]*i[0]-e[0]*i[1];return a/2},Tp=function(t){for(var e,n,r=-1,i=t.length,a=0,o=0,s=t[i-1],u=0;++r<i;)e=s,s=t[r],u+=n=e[0]*s[1]-s[0]*e[1],a+=(e[0]+s[0])*n,o+=(e[1]+s[1])*n;return[a/(u*=3),o/u]};function Sp(t,e){return t[0]-e[0]||t[1]-e[1]}function Mp(t){for(var e,n,r,i=t.length,a=[0,1],o=2,s=2;s<i;++s){for(;o>1&&(e=t[a[o-2]],n=t[a[o-1]],r=t[s],(n[0]-e[0])*(r[1]-e[1])-(n[1]-e[1])*(r[0]-e[0])<=0);)--o;a[o++]=s}return a.slice(0,o)}var Op=function(t){if((n=t.length)<3)return null;var e,n,r=new Array(n),i=new Array(n);for(e=0;e<n;++e)r[e]=[+t[e][0],+t[e][1],e];for(r.sort(Sp),e=0;e<n;++e)i[e]=[r[e][0],-r[e][1]];var a=Mp(r),o=Mp(i),s=o[0]===a[0],u=o[o.length-1]===a[a.length-1],c=[];for(e=a.length-1;e>=0;--e)c.push(t[r[a[e]][2]]);for(e=+s;e<o.length-u;++e)c.push(t[r[o[e]][2]]);return c},Np=function(t,e){for(var n,r,i=t.length,a=t[i-1],o=e[0],s=e[1],u=a[0],c=a[1],l=!1,f=0;f<i;++f)n=(a=t[f])[0],(r=a[1])>s!=c>s&&o<(u-n)*(s-r)/(c-r)+n&&(l=!l),u=n,c=r;return l},Cp=function(t){for(var e,n,r=-1,i=t.length,a=t[i-1],o=a[0],s=a[1],u=0;++r<i;)e=o,n=s,e-=o=(a=t[r])[0],n-=s=a[1],u+=Math.sqrt(e*e+n*n);return u},Dp=function(){return Math.random()},Lp=function t(e){function n(t,n){return t=null==t?0:+t,n=null==n?1:+n,1===arguments.length?(n=t,t=0):n-=t,function(){return e()*n+t}}return n.source=t,n}(Dp),Fp=function t(e){function n(t,n){var r,i;return t=null==t?0:+t,n=null==n?1:+n,function(){var a;if(null!=r)a=r,r=null;else do{r=2*e()-1,a=2*e()-1,i=r*r+a*a}while(!i||i>1);return t+n*a*Math.sqrt(-2*Math.log(i)/i)}}return n.source=t,n}(Dp),Ip=function t(e){function n(){var t=Fp.source(e).apply(this,arguments);return function(){return Math.exp(t())}}return n.source=t,n}(Dp),Pp=function t(e){function n(t){return function(){for(var n=0,r=0;r<t;++r)n+=e();return n}}return n.source=t,n}(Dp),Rp=function t(e){function n(t){var n=Pp.source(e)(t);return function(){return n()/t}}return n.source=t,n}(Dp),Bp=function t(e){function n(t){return function(){return-Math.log(1-e())/t}}return n.source=t,n}(Dp);function jp(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}function Yp(t,e){switch(arguments.length){case 0:break;case 1:this.interpolator(t);break;default:this.interpolator(e).domain(t)}return this}var zp=Array.prototype,Up=zp.map,$p=zp.slice,Gp={name:"implicit"};function Vp(){var t=Ji(),e=[],n=[],r=Gp;function i(i){var a=i+"",o=t.get(a);if(!o){if(r!==Gp)return r;t.set(a,o=e.push(i))}return n[(o-1)%n.length]}return i.domain=function(n){if(!arguments.length)return e.slice();e=[],t=Ji();for(var r,a,o=-1,s=n.length;++o<s;)t.has(a=(r=n[o])+"")||t.set(a,e.push(r));return i},i.range=function(t){return arguments.length?(n=$p.call(t),i):n.slice()},i.unknown=function(t){return arguments.length?(r=t,i):r},i.copy=function(){return Vp(e,n).unknown(r)},jp.apply(i,arguments),i}function Hp(){var t,e,n=Vp().unknown(void 0),r=n.domain,i=n.range,a=[0,1],o=!1,s=0,u=0,c=.5;function l(){var n=r().length,l=a[1]<a[0],f=a[l-0],h=a[1-l];t=(h-f)/Math.max(1,n-s+2*u),o&&(t=Math.floor(t)),f+=(h-f-t*(n-s))*c,e=t*(1-s),o&&(f=Math.round(f),e=Math.round(e));var d=w(n).map((function(e){return f+t*e}));return i(l?d.reverse():d)}return delete n.unknown,n.domain=function(t){return arguments.length?(r(t),l()):r()},n.range=function(t){return arguments.length?(a=[+t[0],+t[1]],l()):a.slice()},n.rangeRound=function(t){return a=[+t[0],+t[1]],o=!0,l()},n.bandwidth=function(){return e},n.step=function(){return t},n.round=function(t){return arguments.length?(o=!!t,l()):o},n.padding=function(t){return arguments.length?(s=Math.min(1,u=+t),l()):s},n.paddingInner=function(t){return arguments.length?(s=Math.min(1,t),l()):s},n.paddingOuter=function(t){return arguments.length?(u=+t,l()):u},n.align=function(t){return arguments.length?(c=Math.max(0,Math.min(1,t)),l()):c},n.copy=function(){return Hp(r(),a).round(o).paddingInner(s).paddingOuter(u).align(c)},jp.apply(l(),arguments)}function Wp(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return Wp(e())},t}function qp(){return Wp(Hp.apply(null,arguments).paddingInner(1))}var Xp=function(t){return+t},Zp=[0,1];function Jp(t){return t}function Qp(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:(n=isNaN(e)?NaN:.5,function(){return n});var n}function Kp(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 ty(t,e,n){var r=t[0],i=t[1],a=e[0],o=e[1];return i<r?(r=Qp(i,r),a=n(o,a)):(r=Qp(r,i),a=n(a,o)),function(t){return a(r(t))}}function ey(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),a=new Array(r),o=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++o<r;)i[o]=Qp(t[o],t[o+1]),a[o]=n(e[o],e[o+1]);return function(e){var n=u(t,e,1,r)-1;return a[n](i[n](e))}}function ny(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function ry(){var t,e,n,r,i,a,o=Zp,s=Zp,u=Mn,c=Jp;function l(){return r=Math.min(o.length,s.length)>2?ey:ty,i=a=null,f}function f(e){return isNaN(e=+e)?n:(i||(i=r(o.map(t),s,u)))(t(c(e)))}return f.invert=function(n){return c(e((a||(a=r(s,o.map(t),_n)))(n)))},f.domain=function(t){return arguments.length?(o=Up.call(t,Xp),c===Jp||(c=Kp(o)),l()):o.slice()},f.range=function(t){return arguments.length?(s=$p.call(t),l()):s.slice()},f.rangeRound=function(t){return s=$p.call(t),u=cp,l()},f.clamp=function(t){return arguments.length?(c=t?Kp(o):Jp,f):c!==Jp},f.interpolate=function(t){return arguments.length?(u=t,l()):u},f.unknown=function(t){return arguments.length?(n=t,f):n},function(n,r){return t=n,e=r,l()}}function iy(t,e){return ry()(t,e)}var ay=function(t,e,n,r){var i,a=M(t,e,n);switch((r=Vs(null==r?",f":r)).type){case"s":var o=Math.max(Math.abs(t),Math.abs(e));return null!=r.precision||isNaN(i=au(a,o))||(r.precision=i),Zs(r,o);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=ou(a,Math.max(Math.abs(t),Math.abs(e))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=iu(a))||(r.precision=i-2*("%"===r.type))}return Xs(r)};function oy(t){var e=t.domain;return t.ticks=function(t){var n=e();return T(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var r=e();return ay(r[0],r[r.length-1],null==t?10:t,n)},t.nice=function(n){null==n&&(n=10);var r,i=e(),a=0,o=i.length-1,s=i[a],u=i[o];return u<s&&(r=s,s=u,u=r,r=a,a=o,o=r),(r=S(s,u,n))>0?r=S(s=Math.floor(s/r)*r,u=Math.ceil(u/r)*r,n):r<0&&(r=S(s=Math.ceil(s*r)/r,u=Math.floor(u*r)/r,n)),r>0?(i[a]=Math.floor(s/r)*r,i[o]=Math.ceil(u/r)*r,e(i)):r<0&&(i[a]=Math.ceil(s*r)/r,i[o]=Math.floor(u*r)/r,e(i)),t},t}function sy(){var t=iy(Jp,Jp);return t.copy=function(){return ny(t,sy())},jp.apply(t,arguments),oy(t)}function uy(t){var e;function n(t){return isNaN(t=+t)?e:t}return n.invert=n,n.domain=n.range=function(e){return arguments.length?(t=Up.call(e,Xp),n):t.slice()},n.unknown=function(t){return arguments.length?(e=t,n):e},n.copy=function(){return uy(t).unknown(e)},t=arguments.length?Up.call(t,Xp):[0,1],oy(n)}var cy=function(t,e){var n,r=0,i=(t=t.slice()).length-1,a=t[r],o=t[i];return o<a&&(n=r,r=i,i=n,n=a,a=o,o=n),t[r]=e.floor(a),t[i]=e.ceil(o),t};function ly(t){return Math.log(t)}function fy(t){return Math.exp(t)}function hy(t){return-Math.log(-t)}function dy(t){return-Math.exp(-t)}function py(t){return isFinite(t)?+("1e"+t):t<0?0:t}function yy(t){return function(e){return-t(-e)}}function gy(t){var e,n,r=t(ly,fy),i=r.domain,a=10;function o(){return e=function(t){return t===Math.E?Math.log:10===t&&Math.log10||2===t&&Math.log2||(t=Math.log(t),function(e){return Math.log(e)/t})}(a),n=function(t){return 10===t?py:t===Math.E?Math.exp:function(e){return Math.pow(t,e)}}(a),i()[0]<0?(e=yy(e),n=yy(n),t(hy,dy)):t(ly,fy),r}return r.base=function(t){return arguments.length?(a=+t,o()):a},r.domain=function(t){return arguments.length?(i(t),o()):i()},r.ticks=function(t){var r,o=i(),s=o[0],u=o[o.length-1];(r=u<s)&&(h=s,s=u,u=h);var c,l,f,h=e(s),d=e(u),p=null==t?10:+t,y=[];if(!(a%1)&&d-h<p){if(h=Math.round(h)-1,d=Math.round(d)+1,s>0){for(;h<d;++h)for(l=1,c=n(h);l<a;++l)if(!((f=c*l)<s)){if(f>u)break;y.push(f)}}else for(;h<d;++h)for(l=a-1,c=n(h);l>=1;--l)if(!((f=c*l)<s)){if(f>u)break;y.push(f)}}else y=T(h,d,Math.min(d-h,p)).map(n);return r?y.reverse():y},r.tickFormat=function(t,i){if(null==i&&(i=10===a?".0e":","),"function"!=typeof i&&(i=Xs(i)),t===1/0)return i;null==t&&(t=10);var o=Math.max(1,a*t/r.ticks().length);return function(t){var r=t/n(Math.round(e(t)));return r*a<a-.5&&(r*=a),r<=o?i(t):""}},r.nice=function(){return i(cy(i(),{floor:function(t){return n(Math.floor(e(t)))},ceil:function(t){return n(Math.ceil(e(t)))}}))},r}function my(){var t=gy(ry()).domain([1,10]);return t.copy=function(){return ny(t,my()).base(t.base())},jp.apply(t,arguments),t}function vy(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function by(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function xy(t){var e=1,n=t(vy(e),by(e));return n.constant=function(n){return arguments.length?t(vy(e=+n),by(e)):e},oy(n)}function _y(){var t=xy(ry());return t.copy=function(){return ny(t,_y()).constant(t.constant())},jp.apply(t,arguments)}function wy(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function ky(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function Ey(t){return t<0?-t*t:t*t}function Ay(t){var e=t(Jp,Jp),n=1;function r(){return 1===n?t(Jp,Jp):.5===n?t(ky,Ey):t(wy(n),wy(1/n))}return e.exponent=function(t){return arguments.length?(n=+t,r()):n},oy(e)}function Ty(){var t=Ay(ry());return t.copy=function(){return ny(t,Ty()).exponent(t.exponent())},jp.apply(t,arguments),t}function Sy(){return Ty.apply(null,arguments).exponent(.5)}function My(){var t,e=[],n=[],i=[];function a(){var t=0,r=Math.max(1,n.length);for(i=new Array(r-1);++t<r;)i[t-1]=C(e,t/r);return o}function o(e){return isNaN(e=+e)?t:n[u(i,e)]}return o.invertExtent=function(t){var r=n.indexOf(t);return r<0?[NaN,NaN]:[r>0?i[r-1]:e[0],r<i.length?i[r]:e[e.length-1]]},o.domain=function(t){if(!arguments.length)return e.slice();e=[];for(var n,i=0,o=t.length;i<o;++i)null==(n=t[i])||isNaN(n=+n)||e.push(n);return e.sort(r),a()},o.range=function(t){return arguments.length?(n=$p.call(t),a()):n.slice()},o.unknown=function(e){return arguments.length?(t=e,o):t},o.quantiles=function(){return i.slice()},o.copy=function(){return My().domain(e).range(n).unknown(t)},jp.apply(o,arguments)}function Oy(){var t,e=0,n=1,r=1,i=[.5],a=[0,1];function o(e){return e<=e?a[u(i,e,0,r)]:t}function s(){var t=-1;for(i=new Array(r);++t<r;)i[t]=((t+1)*n-(t-r)*e)/(r+1);return o}return o.domain=function(t){return arguments.length?(e=+t[0],n=+t[1],s()):[e,n]},o.range=function(t){return arguments.length?(r=(a=$p.call(t)).length-1,s()):a.slice()},o.invertExtent=function(t){var o=a.indexOf(t);return o<0?[NaN,NaN]:o<1?[e,i[0]]:o>=r?[i[r-1],n]:[i[o-1],i[o]]},o.unknown=function(e){return arguments.length?(t=e,o):o},o.thresholds=function(){return i.slice()},o.copy=function(){return Oy().domain([e,n]).range(a).unknown(t)},jp.apply(oy(o),arguments)}function Ny(){var t,e=[.5],n=[0,1],r=1;function i(i){return i<=i?n[u(e,i,0,r)]:t}return i.domain=function(t){return arguments.length?(e=$p.call(t),r=Math.min(e.length,n.length-1),i):e.slice()},i.range=function(t){return arguments.length?(n=$p.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 Ny().domain(e).range(n).unknown(t)},jp.apply(i,arguments)}var Cy=new Date,Dy=new Date;function Ly(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,a){var o,s=[];if(n=i.ceil(n),a=null==a?1:Math.floor(a),!(n<r&&a>0))return s;do{s.push(o=new Date(+n)),e(n,a),t(n)}while(o<n&&n<r);return s},i.filter=function(n){return Ly((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 Cy.setTime(+e),Dy.setTime(+r),t(Cy),t(Dy),Math.floor(n(Cy,Dy))},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 Fy=Ly((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()}));Fy.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Ly((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 Iy=Fy,Py=Fy.range,Ry=Ly((function(t){t.setDate(1),t.setHours(0,0,0,0)}),(function(t,e){t.setMonth(t.getMonth()+e)}),(function(t,e){return e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())}),(function(t){return t.getMonth()})),By=Ry,jy=Ry.range;function Yy(t){return Ly((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()))/6048e5}))}var zy=Yy(0),Uy=Yy(1),$y=Yy(2),Gy=Yy(3),Vy=Yy(4),Hy=Yy(5),Wy=Yy(6),qy=zy.range,Xy=Uy.range,Zy=$y.range,Jy=Gy.range,Qy=Vy.range,Ky=Hy.range,tg=Wy.range,eg=Ly((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()))/864e5}),(function(t){return t.getDate()-1})),ng=eg,rg=eg.range,ig=Ly((function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds()-6e4*t.getMinutes())}),(function(t,e){t.setTime(+t+36e5*e)}),(function(t,e){return(e-t)/36e5}),(function(t){return t.getHours()})),ag=ig,og=ig.range,sg=Ly((function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds())}),(function(t,e){t.setTime(+t+6e4*e)}),(function(t,e){return(e-t)/6e4}),(function(t){return t.getMinutes()})),ug=sg,cg=sg.range,lg=Ly((function(t){t.setTime(t-t.getMilliseconds())}),(function(t,e){t.setTime(+t+1e3*e)}),(function(t,e){return(e-t)/1e3}),(function(t){return t.getUTCSeconds()})),fg=lg,hg=lg.range,dg=Ly((function(){}),(function(t,e){t.setTime(+t+e)}),(function(t,e){return e-t}));dg.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?Ly((function(e){e.setTime(Math.floor(e/t)*t)}),(function(e,n){e.setTime(+e+n*t)}),(function(e,n){return(n-e)/t})):dg:null};var pg=dg,yg=dg.range;function gg(t){return Ly((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)/6048e5}))}var mg=gg(0),vg=gg(1),bg=gg(2),xg=gg(3),_g=gg(4),wg=gg(5),kg=gg(6),Eg=mg.range,Ag=vg.range,Tg=bg.range,Sg=xg.range,Mg=_g.range,Og=wg.range,Ng=kg.range,Cg=Ly((function(t){t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+e)}),(function(t,e){return(e-t)/864e5}),(function(t){return t.getUTCDate()-1})),Dg=Cg,Lg=Cg.range,Fg=Ly((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()}));Fg.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Ly((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 Ig=Fg,Pg=Fg.range;function Rg(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 Bg(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 jg(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function Yg(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,a=t.days,o=t.shortDays,s=t.months,u=t.shortMonths,c=Qg(i),l=Kg(i),f=Qg(a),h=Kg(a),d=Qg(o),p=Kg(o),y=Qg(s),g=Kg(s),m=Qg(u),v=Kg(u),b={a:function(t){return o[t.getDay()]},A:function(t){return a[t.getDay()]},b:function(t){return u[t.getMonth()]},B:function(t){return s[t.getMonth()]},c:null,d:xm,e:xm,f:Am,H:_m,I:wm,j:km,L:Em,m:Tm,M:Sm,p:function(t){return i[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:ev,s:nv,S:Mm,u:Om,U:Nm,V:Cm,w:Dm,W:Lm,x:null,X:null,y:Fm,Y:Im,Z:Pm,"%":tv},x={a:function(t){return o[t.getUTCDay()]},A:function(t){return a[t.getUTCDay()]},b:function(t){return u[t.getUTCMonth()]},B:function(t){return s[t.getUTCMonth()]},c:null,d:Rm,e:Rm,f:Um,H:Bm,I:jm,j:Ym,L:zm,m:$m,M:Gm,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:ev,s:nv,S:Vm,u:Hm,U:Wm,V:qm,w:Xm,W:Zm,x:null,X:null,y:Jm,Y:Qm,Z:Km,"%":tv},_={a:function(t,e,n){var r=d.exec(e.slice(n));return r?(t.w=p[r[0].toLowerCase()],n+r[0].length):-1},A:function(t,e,n){var r=f.exec(e.slice(n));return r?(t.w=h[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 E(t,e,n,r)},d:lm,e:lm,f:gm,H:hm,I:hm,j:fm,L:ym,m:cm,M:dm,p:function(t,e,n){var r=c.exec(e.slice(n));return r?(t.p=l[r[0].toLowerCase()],n+r[0].length):-1},q:um,Q:vm,s:bm,S:pm,u:em,U:nm,V:rm,w:tm,W:im,x:function(t,e,r){return E(t,n,e,r)},X:function(t,e,n){return E(t,r,e,n)},y:om,Y:am,Z:sm,"%":mm};function w(t,e){return function(n){var r,i,a,o=[],s=-1,u=0,c=t.length;for(n instanceof Date||(n=new Date(+n));++s<c;)37===t.charCodeAt(s)&&(o.push(t.slice(u,s)),null!=(i=Hg[r=t.charAt(++s)])?r=t.charAt(++s):i="e"===r?" ":"0",(a=e[r])&&(r=a(n,i)),o.push(r),u=s+1);return o.push(t.slice(u,s)),o.join("")}}function k(t,e){return function(n){var r,i,a=jg(1900,void 0,1);if(E(a,t,n+="",0)!=n.length)return null;if("Q"in a)return new Date(a.Q);if("s"in a)return new Date(1e3*a.s+("L"in a?a.L:0));if(!e||"Z"in a||(a.Z=0),"p"in a&&(a.H=a.H%12+12*a.p),void 0===a.m&&(a.m="q"in a?a.q:0),"V"in a){if(a.V<1||a.V>53)return null;"w"in a||(a.w=1),"Z"in a?(i=(r=Bg(jg(a.y,0,1))).getUTCDay(),r=i>4||0===i?vg.ceil(r):vg(r),r=Dg.offset(r,7*(a.V-1)),a.y=r.getUTCFullYear(),a.m=r.getUTCMonth(),a.d=r.getUTCDate()+(a.w+6)%7):(i=(r=Rg(jg(a.y,0,1))).getDay(),r=i>4||0===i?Uy.ceil(r):Uy(r),r=ng.offset(r,7*(a.V-1)),a.y=r.getFullYear(),a.m=r.getMonth(),a.d=r.getDate()+(a.w+6)%7)}else("W"in a||"U"in a)&&("w"in a||(a.w="u"in a?a.u%7:"W"in a?1:0),i="Z"in a?Bg(jg(a.y,0,1)).getUTCDay():Rg(jg(a.y,0,1)).getDay(),a.m=0,a.d="W"in a?(a.w+6)%7+7*a.W-(i+5)%7:a.w+7*a.U-(i+6)%7);return"Z"in a?(a.H+=a.Z/100|0,a.M+=a.Z%100,Bg(a)):Rg(a)}}function E(t,e,n,r){for(var i,a,o=0,s=e.length,u=n.length;o<s;){if(r>=u)return-1;if(37===(i=e.charCodeAt(o++))){if(i=e.charAt(o++),!(a=_[i in Hg?e.charAt(o++):i])||(r=a(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return(b.x=w(n,b),b.X=w(r,b),b.c=w(e,b),x.x=w(n,x),x.X=w(r,x),x.c=w(e,x),{format:function(t){var e=w(t+="",b);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+="",x);return e.toString=function(){return t},e},utcParse:function(t){var e=k(t+="",!0);return e.toString=function(){return t},e}})}var zg,Ug,$g,Gg,Vg,Hg={"-":"",_:" ",0:"0"},Wg=/^\s*\d+/,qg=/^%/,Xg=/[\\^$*+?|[\]().{}]/g;function Zg(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",a=i.length;return r+(a<n?new Array(n-a+1).join(e)+i:i)}function Jg(t){return t.replace(Xg,"\\$&")}function Qg(t){return new RegExp("^(?:"+t.map(Jg).join("|")+")","i")}function Kg(t){for(var e={},n=-1,r=t.length;++n<r;)e[t[n].toLowerCase()]=n;return e}function tm(t,e,n){var r=Wg.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function em(t,e,n){var r=Wg.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function nm(t,e,n){var r=Wg.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function rm(t,e,n){var r=Wg.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function im(t,e,n){var r=Wg.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function am(t,e,n){var r=Wg.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function om(t,e,n){var r=Wg.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function sm(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 um(t,e,n){var r=Wg.exec(e.slice(n,n+1));return r?(t.q=3*r[0]-3,n+r[0].length):-1}function cm(t,e,n){var r=Wg.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function lm(t,e,n){var r=Wg.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function fm(t,e,n){var r=Wg.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function hm(t,e,n){var r=Wg.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function dm(t,e,n){var r=Wg.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function pm(t,e,n){var r=Wg.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function ym(t,e,n){var r=Wg.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function gm(t,e,n){var r=Wg.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function mm(t,e,n){var r=qg.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function vm(t,e,n){var r=Wg.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function bm(t,e,n){var r=Wg.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function xm(t,e){return Zg(t.getDate(),e,2)}function _m(t,e){return Zg(t.getHours(),e,2)}function wm(t,e){return Zg(t.getHours()%12||12,e,2)}function km(t,e){return Zg(1+ng.count(Iy(t),t),e,3)}function Em(t,e){return Zg(t.getMilliseconds(),e,3)}function Am(t,e){return Em(t,e)+"000"}function Tm(t,e){return Zg(t.getMonth()+1,e,2)}function Sm(t,e){return Zg(t.getMinutes(),e,2)}function Mm(t,e){return Zg(t.getSeconds(),e,2)}function Om(t){var e=t.getDay();return 0===e?7:e}function Nm(t,e){return Zg(zy.count(Iy(t)-1,t),e,2)}function Cm(t,e){var n=t.getDay();return t=n>=4||0===n?Vy(t):Vy.ceil(t),Zg(Vy.count(Iy(t),t)+(4===Iy(t).getDay()),e,2)}function Dm(t){return t.getDay()}function Lm(t,e){return Zg(Uy.count(Iy(t)-1,t),e,2)}function Fm(t,e){return Zg(t.getFullYear()%100,e,2)}function Im(t,e){return Zg(t.getFullYear()%1e4,e,4)}function Pm(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+Zg(e/60|0,"0",2)+Zg(e%60,"0",2)}function Rm(t,e){return Zg(t.getUTCDate(),e,2)}function Bm(t,e){return Zg(t.getUTCHours(),e,2)}function jm(t,e){return Zg(t.getUTCHours()%12||12,e,2)}function Ym(t,e){return Zg(1+Dg.count(Ig(t),t),e,3)}function zm(t,e){return Zg(t.getUTCMilliseconds(),e,3)}function Um(t,e){return zm(t,e)+"000"}function $m(t,e){return Zg(t.getUTCMonth()+1,e,2)}function Gm(t,e){return Zg(t.getUTCMinutes(),e,2)}function Vm(t,e){return Zg(t.getUTCSeconds(),e,2)}function Hm(t){var e=t.getUTCDay();return 0===e?7:e}function Wm(t,e){return Zg(mg.count(Ig(t)-1,t),e,2)}function qm(t,e){var n=t.getUTCDay();return t=n>=4||0===n?_g(t):_g.ceil(t),Zg(_g.count(Ig(t),t)+(4===Ig(t).getUTCDay()),e,2)}function Xm(t){return t.getUTCDay()}function Zm(t,e){return Zg(vg.count(Ig(t)-1,t),e,2)}function Jm(t,e){return Zg(t.getUTCFullYear()%100,e,2)}function Qm(t,e){return Zg(t.getUTCFullYear()%1e4,e,4)}function Km(){return"+0000"}function tv(){return"%"}function ev(t){return+t}function nv(t){return Math.floor(+t/1e3)}function rv(t){return zg=Yg(t),Ug=zg.format,$g=zg.parse,Gg=zg.utcFormat,Vg=zg.utcParse,zg}rv({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"]});function iv(t){return new Date(t)}function av(t){return t instanceof Date?+t:+new Date(+t)}function ov(t,e,n,r,a,o,s,u,c){var l=iy(Jp,Jp),f=l.invert,h=l.domain,d=c(".%L"),p=c(":%S"),y=c("%I:%M"),g=c("%I %p"),m=c("%a %d"),v=c("%b %d"),b=c("%B"),x=c("%Y"),_=[[s,1,1e3],[s,5,5e3],[s,15,15e3],[s,30,3e4],[o,1,6e4],[o,5,3e5],[o,15,9e5],[o,30,18e5],[a,1,36e5],[a,3,108e5],[a,6,216e5],[a,12,432e5],[r,1,864e5],[r,2,1728e5],[n,1,6048e5],[e,1,2592e6],[e,3,7776e6],[t,1,31536e6]];function w(i){return(s(i)<i?d:o(i)<i?p:a(i)<i?y:r(i)<i?g:e(i)<i?n(i)<i?m:v:t(i)<i?b:x)(i)}function k(e,n,r,a){if(null==e&&(e=10),"number"==typeof e){var o=Math.abs(r-n)/e,s=i((function(t){return t[2]})).right(_,o);s===_.length?(a=M(n/31536e6,r/31536e6,e),e=t):s?(a=(s=_[o/_[s-1][2]<_[s][2]/o?s-1:s])[1],e=s[0]):(a=Math.max(M(n,r,e),1),e=u)}return null==a?e:e.every(a)}return l.invert=function(t){return new Date(f(t))},l.domain=function(t){return arguments.length?h(Up.call(t,av)):h().map(iv)},l.ticks=function(t,e){var n,r=h(),i=r[0],a=r[r.length-1],o=a<i;return o&&(n=i,i=a,a=n),n=(n=k(t,i,a,e))?n.range(i,a+1):[],o?n.reverse():n},l.tickFormat=function(t,e){return null==e?w:c(e)},l.nice=function(t,e){var n=h();return(t=k(t,n[0],n[n.length-1],e))?h(cy(n,t)):l},l.copy=function(){return ny(l,ov(t,e,n,r,a,o,s,u,c))},l}var sv=function(){return jp.apply(ov(Iy,By,zy,ng,ag,ug,fg,pg,Ug).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)},uv=Ly((function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCMonth(t.getUTCMonth()+e)}),(function(t,e){return e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear())}),(function(t){return t.getUTCMonth()})),cv=uv,lv=uv.range,fv=Ly((function(t){t.setUTCMinutes(0,0,0)}),(function(t,e){t.setTime(+t+36e5*e)}),(function(t,e){return(e-t)/36e5}),(function(t){return t.getUTCHours()})),hv=fv,dv=fv.range,pv=Ly((function(t){t.setUTCSeconds(0,0)}),(function(t,e){t.setTime(+t+6e4*e)}),(function(t,e){return(e-t)/6e4}),(function(t){return t.getUTCMinutes()})),yv=pv,gv=pv.range,mv=function(){return jp.apply(ov(Ig,cv,mg,Dg,hv,yv,fg,pg,Gg).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)};function vv(){var t,e,n,r,i,a=0,o=1,s=Jp,u=!1;function c(e){return isNaN(e=+e)?i:s(0===n?.5:(e=(r(e)-t)*n,u?Math.max(0,Math.min(1,e)):e))}return c.domain=function(i){return arguments.length?(t=r(a=+i[0]),e=r(o=+i[1]),n=t===e?0:1/(e-t),c):[a,o]},c.clamp=function(t){return arguments.length?(u=!!t,c):u},c.interpolator=function(t){return arguments.length?(s=t,c):s},c.unknown=function(t){return arguments.length?(i=t,c):i},function(i){return r=i,t=i(a),e=i(o),n=t===e?0:1/(e-t),c}}function bv(t,e){return e.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}function xv(){var t=oy(vv()(Jp));return t.copy=function(){return bv(t,xv())},Yp.apply(t,arguments)}function _v(){var t=gy(vv()).domain([1,10]);return t.copy=function(){return bv(t,_v()).base(t.base())},Yp.apply(t,arguments)}function wv(){var t=xy(vv());return t.copy=function(){return bv(t,wv()).constant(t.constant())},Yp.apply(t,arguments)}function kv(){var t=Ay(vv());return t.copy=function(){return bv(t,kv()).exponent(t.exponent())},Yp.apply(t,arguments)}function Ev(){return kv.apply(null,arguments).exponent(.5)}function Av(){var t=[],e=Jp;function n(n){if(!isNaN(n=+n))return e((u(t,n)-1)/(t.length-1))}return n.domain=function(e){if(!arguments.length)return t.slice();t=[];for(var i,a=0,o=e.length;a<o;++a)null==(i=e[a])||isNaN(i=+i)||t.push(i);return t.sort(r),n},n.interpolator=function(t){return arguments.length?(e=t,n):e},n.copy=function(){return Av(e).domain(t)},Yp.apply(n,arguments)}function Tv(){var t,e,n,r,i,a,o,s=0,u=.5,c=1,l=Jp,f=!1;function h(t){return isNaN(t=+t)?o:(t=.5+((t=+a(t))-e)*(t<e?r:i),l(f?Math.max(0,Math.min(1,t)):t))}return h.domain=function(o){return arguments.length?(t=a(s=+o[0]),e=a(u=+o[1]),n=a(c=+o[2]),r=t===e?0:.5/(e-t),i=e===n?0:.5/(n-e),h):[s,u,c]},h.clamp=function(t){return arguments.length?(f=!!t,h):f},h.interpolator=function(t){return arguments.length?(l=t,h):l},h.unknown=function(t){return arguments.length?(o=t,h):o},function(o){return a=o,t=o(s),e=o(u),n=o(c),r=t===e?0:.5/(e-t),i=e===n?0:.5/(n-e),h}}function Sv(){var t=oy(Tv()(Jp));return t.copy=function(){return bv(t,Sv())},Yp.apply(t,arguments)}function Mv(){var t=gy(Tv()).domain([.1,1,10]);return t.copy=function(){return bv(t,Mv()).base(t.base())},Yp.apply(t,arguments)}function Ov(){var t=xy(Tv());return t.copy=function(){return bv(t,Ov()).constant(t.constant())},Yp.apply(t,arguments)}function Nv(){var t=Ay(Tv());return t.copy=function(){return bv(t,Nv()).exponent(t.exponent())},Yp.apply(t,arguments)}function Cv(){return Nv.apply(null,arguments).exponent(.5)}var Dv=function(t){for(var e=t.length/6|0,n=new Array(e),r=0;r<e;)n[r]="#"+t.slice(6*r,6*++r);return n},Lv=Dv("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),Fv=Dv("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),Iv=Dv("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),Pv=Dv("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),Rv=Dv("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),Bv=Dv("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),jv=Dv("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),Yv=Dv("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),zv=Dv("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),Uv=Dv("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab"),$v=function(t){return pn(t[t.length-1])},Gv=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(Dv),Vv=$v(Gv),Hv=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(Dv),Wv=$v(Hv),qv=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(Dv),Xv=$v(qv),Zv=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(Dv),Jv=$v(Zv),Qv=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(Dv),Kv=$v(Qv),tb=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(Dv),eb=$v(tb),nb=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(Dv),rb=$v(nb),ib=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(Dv),ab=$v(ib),ob=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(Dv),sb=$v(ob),ub=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(Dv),cb=$v(ub),lb=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(Dv),fb=$v(lb),hb=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(Dv),db=$v(hb),pb=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(Dv),yb=$v(pb),gb=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(Dv),mb=$v(gb),vb=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(Dv),bb=$v(vb),xb=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(Dv),_b=$v(xb),wb=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(Dv),kb=$v(wb),Eb=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(Dv),Ab=$v(Eb),Tb=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(Dv),Sb=$v(Tb),Mb=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(Dv),Ob=$v(Mb),Nb=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(Dv),Cb=$v(Nb),Db=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(Dv),Lb=$v(Db),Fb=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(Dv),Ib=$v(Fb),Pb=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(Dv),Rb=$v(Pb),Bb=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(Dv),jb=$v(Bb),Yb=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(Dv),zb=$v(Yb),Ub=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(Dv),$b=$v(Ub),Gb=function(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-t*(35.34-t*(2381.73-t*(6402.7-t*(7024.72-2710.57*t)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+t*(170.73+t*(52.82-t*(131.46-t*(176.58-67.37*t)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+t*(442.36-t*(2482.43-t*(6167.24-t*(6614.94-2475.67*t)))))))+")"},Vb=wp(Na(300,.5,0),Na(-240,.5,1)),Hb=wp(Na(-100,.75,.35),Na(80,1.5,.8)),Wb=wp(Na(260,.75,.35),Na(80,1.5,.8)),qb=Na(),Xb=function(t){(t<0||t>1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return qb.h=360*t-100,qb.s=1.5-1.5*e,qb.l=.8-.9*e,qb+""},Zb=We(),Jb=Math.PI/3,Qb=2*Math.PI/3,Kb=function(t){var e;return t=(.5-t)*Math.PI,Zb.r=255*(e=Math.sin(t))*e,Zb.g=255*(e=Math.sin(t+Jb))*e,Zb.b=255*(e=Math.sin(t+Qb))*e,Zb+""},tx=function(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+t*(1172.33-t*(10793.56-t*(33300.12-t*(38394.49-14825.05*t)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+t*(557.33+t*(1225.33-t*(3574.96-t*(1073.77+707.56*t)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+t*(3211.1-t*(15327.97-t*(27814-t*(22569.18-6838.66*t)))))))+")"};function ex(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}var nx=ex(Dv("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),rx=ex(Dv("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),ix=ex(Dv("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),ax=ex(Dv("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921")),ox=function(t){return we(ne(t).call(document.documentElement))},sx=0;function ux(){return new cx}function cx(){this._="@"+(++sx).toString(36)}cx.prototype=ux.prototype={constructor:cx,get:function(t){for(var e=this._;!(e in t);)if(!(t=t.parentNode))return;return t[e]},set:function(t,e){return t[this._]=e},remove:function(t){return this._ in t&&delete t[this._]},toString:function(){return this._}};var lx=function(t){return"string"==typeof t?new be([document.querySelectorAll(t)],[document.documentElement]):new be([null==t?[]:t],ve)},fx=function(t,e){null==e&&(e=On().touches);for(var n=0,r=e?e.length:0,i=new Array(r);n<r;++n)i[n]=Nn(t,e[n]);return i},hx=function(t){return function(){return t}},dx=Math.abs,px=Math.atan2,yx=Math.cos,gx=Math.max,mx=Math.min,vx=Math.sin,bx=Math.sqrt,xx=Math.PI,_x=xx/2,wx=2*xx;function kx(t){return t>1?0:t<-1?xx:Math.acos(t)}function Ex(t){return t>=1?_x:t<=-1?-_x:Math.asin(t)}function Ax(t){return t.innerRadius}function Tx(t){return t.outerRadius}function Sx(t){return t.startAngle}function Mx(t){return t.endAngle}function Ox(t){return t&&t.padAngle}function Nx(t,e,n,r,i,a,o,s){var u=n-t,c=r-e,l=o-i,f=s-a,h=f*u-l*c;if(!(h*h<1e-12))return[t+(h=(l*(e-a)-f*(t-i))/h)*u,e+h*c]}function Cx(t,e,n,r,i,a,o){var s=t-n,u=e-r,c=(o?a:-a)/bx(s*s+u*u),l=c*u,f=-c*s,h=t+l,d=e+f,p=n+l,y=r+f,g=(h+p)/2,m=(d+y)/2,v=p-h,b=y-d,x=v*v+b*b,_=i-a,w=h*y-p*d,k=(b<0?-1:1)*bx(gx(0,_*_*x-w*w)),E=(w*b-v*k)/x,A=(-w*v-b*k)/x,T=(w*b+v*k)/x,S=(-w*v+b*k)/x,M=E-g,O=A-m,N=T-g,C=S-m;return M*M+O*O>N*N+C*C&&(E=T,A=S),{cx:E,cy:A,x01:-l,y01:-f,x11:E*(i/_-1),y11:A*(i/_-1)}}var Dx=function(){var t=Ax,e=Tx,n=hx(0),r=null,i=Sx,a=Mx,o=Ox,s=null;function u(){var u,c,l=+t.apply(this,arguments),f=+e.apply(this,arguments),h=i.apply(this,arguments)-_x,d=a.apply(this,arguments)-_x,p=dx(d-h),y=d>h;if(s||(s=u=Ui()),f<l&&(c=f,f=l,l=c),f>1e-12)if(p>wx-1e-12)s.moveTo(f*yx(h),f*vx(h)),s.arc(0,0,f,h,d,!y),l>1e-12&&(s.moveTo(l*yx(d),l*vx(d)),s.arc(0,0,l,d,h,y));else{var g,m,v=h,b=d,x=h,_=d,w=p,k=p,E=o.apply(this,arguments)/2,A=E>1e-12&&(r?+r.apply(this,arguments):bx(l*l+f*f)),T=mx(dx(f-l)/2,+n.apply(this,arguments)),S=T,M=T;if(A>1e-12){var O=Ex(A/l*vx(E)),N=Ex(A/f*vx(E));(w-=2*O)>1e-12?(x+=O*=y?1:-1,_-=O):(w=0,x=_=(h+d)/2),(k-=2*N)>1e-12?(v+=N*=y?1:-1,b-=N):(k=0,v=b=(h+d)/2)}var C=f*yx(v),D=f*vx(v),L=l*yx(_),F=l*vx(_);if(T>1e-12){var I,P=f*yx(b),R=f*vx(b),B=l*yx(x),j=l*vx(x);if(p<xx&&(I=Nx(C,D,B,j,P,R,L,F))){var Y=C-I[0],z=D-I[1],U=P-I[0],$=R-I[1],G=1/vx(kx((Y*U+z*$)/(bx(Y*Y+z*z)*bx(U*U+$*$)))/2),V=bx(I[0]*I[0]+I[1]*I[1]);S=mx(T,(l-V)/(G-1)),M=mx(T,(f-V)/(G+1))}}k>1e-12?M>1e-12?(g=Cx(B,j,C,D,f,M,y),m=Cx(P,R,L,F,f,M,y),s.moveTo(g.cx+g.x01,g.cy+g.y01),M<T?s.arc(g.cx,g.cy,M,px(g.y01,g.x01),px(m.y01,m.x01),!y):(s.arc(g.cx,g.cy,M,px(g.y01,g.x01),px(g.y11,g.x11),!y),s.arc(0,0,f,px(g.cy+g.y11,g.cx+g.x11),px(m.cy+m.y11,m.cx+m.x11),!y),s.arc(m.cx,m.cy,M,px(m.y11,m.x11),px(m.y01,m.x01),!y))):(s.moveTo(C,D),s.arc(0,0,f,v,b,!y)):s.moveTo(C,D),l>1e-12&&w>1e-12?S>1e-12?(g=Cx(L,F,P,R,l,-S,y),m=Cx(C,D,B,j,l,-S,y),s.lineTo(g.cx+g.x01,g.cy+g.y01),S<T?s.arc(g.cx,g.cy,S,px(g.y01,g.x01),px(m.y01,m.x01),!y):(s.arc(g.cx,g.cy,S,px(g.y01,g.x01),px(g.y11,g.x11),!y),s.arc(0,0,l,px(g.cy+g.y11,g.cx+g.x11),px(m.cy+m.y11,m.cx+m.x11),y),s.arc(m.cx,m.cy,S,px(m.y11,m.x11),px(m.y01,m.x01),!y))):s.arc(0,0,l,_,x,y):s.lineTo(L,F)}else s.moveTo(0,0);if(s.closePath(),u)return s=null,u+""||null}return u.centroid=function(){var n=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +a.apply(this,arguments))/2-xx/2;return[yx(r)*n,vx(r)*n]},u.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:hx(+e),u):t},u.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:hx(+t),u):e},u.cornerRadius=function(t){return arguments.length?(n="function"==typeof t?t:hx(+t),u):n},u.padRadius=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:hx(+t),u):r},u.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:hx(+t),u):i},u.endAngle=function(t){return arguments.length?(a="function"==typeof t?t:hx(+t),u):a},u.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:hx(+t),u):o},u.context=function(t){return arguments.length?(s=null==t?null:t,u):s},u};function Lx(t){this._context=t}Lx.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 Fx=function(t){return new Lx(t)};function Ix(t){return t[0]}function Px(t){return t[1]}var Rx=function(){var t=Ix,e=Px,n=hx(!0),r=null,i=Fx,a=null;function o(o){var s,u,c,l=o.length,f=!1;for(null==r&&(a=i(c=Ui())),s=0;s<=l;++s)!(s<l&&n(u=o[s],s,o))===f&&((f=!f)?a.lineStart():a.lineEnd()),f&&a.point(+t(u,s,o),+e(u,s,o));if(c)return a=null,c+""||null}return o.x=function(e){return arguments.length?(t="function"==typeof e?e:hx(+e),o):t},o.y=function(t){return arguments.length?(e="function"==typeof t?t:hx(+t),o):e},o.defined=function(t){return arguments.length?(n="function"==typeof t?t:hx(!!t),o):n},o.curve=function(t){return arguments.length?(i=t,null!=r&&(a=i(r)),o):i},o.context=function(t){return arguments.length?(null==t?r=a=null:a=i(r=t),o):r},o},Bx=function(){var t=Ix,e=null,n=hx(0),r=Px,i=hx(!0),a=null,o=Fx,s=null;function u(u){var c,l,f,h,d,p=u.length,y=!1,g=new Array(p),m=new Array(p);for(null==a&&(s=o(d=Ui())),c=0;c<=p;++c){if(!(c<p&&i(h=u[c],c,u))===y)if(y=!y)l=c,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),f=c-1;f>=l;--f)s.point(g[f],m[f]);s.lineEnd(),s.areaEnd()}y&&(g[c]=+t(h,c,u),m[c]=+n(h,c,u),s.point(e?+e(h,c,u):g[c],r?+r(h,c,u):m[c]))}if(d)return s=null,d+""||null}function c(){return Rx().defined(i).curve(o).context(a)}return u.x=function(n){return arguments.length?(t="function"==typeof n?n:hx(+n),e=null,u):t},u.x0=function(e){return arguments.length?(t="function"==typeof e?e:hx(+e),u):t},u.x1=function(t){return arguments.length?(e=null==t?null:"function"==typeof t?t:hx(+t),u):e},u.y=function(t){return arguments.length?(n="function"==typeof t?t:hx(+t),r=null,u):n},u.y0=function(t){return arguments.length?(n="function"==typeof t?t:hx(+t),u):n},u.y1=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:hx(+t),u):r},u.lineX0=u.lineY0=function(){return c().x(t).y(n)},u.lineY1=function(){return c().x(t).y(r)},u.lineX1=function(){return c().x(e).y(n)},u.defined=function(t){return arguments.length?(i="function"==typeof t?t:hx(!!t),u):i},u.curve=function(t){return arguments.length?(o=t,null!=a&&(s=o(a)),u):o},u.context=function(t){return arguments.length?(null==t?a=s=null:s=o(a=t),u):a},u},jx=function(t,e){return e<t?-1:e>t?1:e>=t?0:NaN},Yx=function(t){return t},zx=function(){var t=Yx,e=jx,n=null,r=hx(0),i=hx(wx),a=hx(0);function o(o){var s,u,c,l,f,h=o.length,d=0,p=new Array(h),y=new Array(h),g=+r.apply(this,arguments),m=Math.min(wx,Math.max(-wx,i.apply(this,arguments)-g)),v=Math.min(Math.abs(m)/h,a.apply(this,arguments)),b=v*(m<0?-1:1);for(s=0;s<h;++s)(f=y[p[s]=s]=+t(o[s],s,o))>0&&(d+=f);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])})),s=0,c=d?(m-h*b)/d:0;s<h;++s,g=l)u=p[s],l=g+((f=y[u])>0?f*c:0)+b,y[u]={data:o[u],index:s,value:f,startAngle:g,endAngle:l,padAngle:v};return y}return o.value=function(e){return arguments.length?(t="function"==typeof e?e:hx(+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:hx(+t),o):r},o.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:hx(+t),o):i},o.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:hx(+t),o):a},o},Ux=Gx(Fx);function $x(t){this._curve=t}function Gx(t){function e(e){return new $x(t(e))}return e._curve=t,e}function Vx(t){var e=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?e(Gx(t)):e()._curve},t}$x.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,e){this._curve.point(e*Math.sin(t),e*-Math.cos(t))}};var Hx=function(){return Vx(Rx().curve(Ux))},Wx=function(){var t=Bx().curve(Ux),e=t.curve,n=t.lineX0,r=t.lineX1,i=t.lineY0,a=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return Vx(n())},delete t.lineX0,t.lineEndAngle=function(){return Vx(r())},delete t.lineX1,t.lineInnerRadius=function(){return Vx(i())},delete t.lineY0,t.lineOuterRadius=function(){return Vx(a())},delete t.lineY1,t.curve=function(t){return arguments.length?e(Gx(t)):e()._curve},t},qx=function(t,e){return[(e=+e)*Math.cos(t-=Math.PI/2),e*Math.sin(t)]},Xx=Array.prototype.slice;function Zx(t){return t.source}function Jx(t){return t.target}function Qx(t){var e=Zx,n=Jx,r=Ix,i=Px,a=null;function o(){var o,s=Xx.call(arguments),u=e.apply(this,s),c=n.apply(this,s);if(a||(a=o=Ui()),t(a,+r.apply(this,(s[0]=u,s)),+i.apply(this,s),+r.apply(this,(s[0]=c,s)),+i.apply(this,s)),o)return a=null,o+""||null}return o.source=function(t){return arguments.length?(e=t,o):e},o.target=function(t){return arguments.length?(n=t,o):n},o.x=function(t){return arguments.length?(r="function"==typeof t?t:hx(+t),o):r},o.y=function(t){return arguments.length?(i="function"==typeof t?t:hx(+t),o):i},o.context=function(t){return arguments.length?(a=null==t?null:t,o):a},o}function Kx(t,e,n,r,i){t.moveTo(e,n),t.bezierCurveTo(e=(e+r)/2,n,e,i,r,i)}function t_(t,e,n,r,i){t.moveTo(e,n),t.bezierCurveTo(e,n=(n+i)/2,r,n,r,i)}function e_(t,e,n,r,i){var a=qx(e,n),o=qx(e,n=(n+i)/2),s=qx(r,n),u=qx(r,i);t.moveTo(a[0],a[1]),t.bezierCurveTo(o[0],o[1],s[0],s[1],u[0],u[1])}function n_(){return Qx(Kx)}function r_(){return Qx(t_)}function i_(){var t=Qx(e_);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t}var a_={draw:function(t,e){var n=Math.sqrt(e/xx);t.moveTo(n,0),t.arc(0,0,n,0,wx)}},o_={draw:function(t,e){var n=Math.sqrt(e/5)/2;t.moveTo(-3*n,-n),t.lineTo(-n,-n),t.lineTo(-n,-3*n),t.lineTo(n,-3*n),t.lineTo(n,-n),t.lineTo(3*n,-n),t.lineTo(3*n,n),t.lineTo(n,n),t.lineTo(n,3*n),t.lineTo(-n,3*n),t.lineTo(-n,n),t.lineTo(-3*n,n),t.closePath()}},s_=Math.sqrt(1/3),u_=2*s_,c_={draw:function(t,e){var n=Math.sqrt(e/u_),r=n*s_;t.moveTo(0,-n),t.lineTo(r,0),t.lineTo(0,n),t.lineTo(-r,0),t.closePath()}},l_=Math.sin(xx/10)/Math.sin(7*xx/10),f_=Math.sin(wx/10)*l_,h_=-Math.cos(wx/10)*l_,d_={draw:function(t,e){var n=Math.sqrt(.8908130915292852*e),r=f_*n,i=h_*n;t.moveTo(0,-n),t.lineTo(r,i);for(var a=1;a<5;++a){var o=wx*a/5,s=Math.cos(o),u=Math.sin(o);t.lineTo(u*n,-s*n),t.lineTo(s*r-u*i,u*r+s*i)}t.closePath()}},p_={draw:function(t,e){var n=Math.sqrt(e),r=-n/2;t.rect(r,r,n,n)}},y_=Math.sqrt(3),g_={draw:function(t,e){var n=-Math.sqrt(e/(3*y_));t.moveTo(0,2*n),t.lineTo(-y_*n,-n),t.lineTo(y_*n,-n),t.closePath()}},m_=Math.sqrt(3)/2,v_=1/Math.sqrt(12),b_=3*(v_/2+1),x_={draw:function(t,e){var n=Math.sqrt(e/b_),r=n/2,i=n*v_,a=r,o=n*v_+n,s=-a,u=o;t.moveTo(r,i),t.lineTo(a,o),t.lineTo(s,u),t.lineTo(-.5*r-m_*i,m_*r+-.5*i),t.lineTo(-.5*a-m_*o,m_*a+-.5*o),t.lineTo(-.5*s-m_*u,m_*s+-.5*u),t.lineTo(-.5*r+m_*i,-.5*i-m_*r),t.lineTo(-.5*a+m_*o,-.5*o-m_*a),t.lineTo(-.5*s+m_*u,-.5*u-m_*s),t.closePath()}},__=[a_,o_,c_,p_,d_,g_,x_],w_=function(){var t=hx(a_),e=hx(64),n=null;function r(){var r;if(n||(n=r=Ui()),t.apply(this,arguments).draw(n,+e.apply(this,arguments)),r)return n=null,r+""||null}return r.type=function(e){return arguments.length?(t="function"==typeof e?e:hx(e),r):t},r.size=function(t){return arguments.length?(e="function"==typeof t?t:hx(+t),r):e},r.context=function(t){return arguments.length?(n=null==t?null:t,r):n},r},k_=function(){};function E_(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 A_(t){this._context=t}A_.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:E_(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:E_(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};var T_=function(t){return new A_(t)};function S_(t){this._context=t}S_.prototype={areaStart:k_,areaEnd:k_,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:E_(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};var M_=function(t){return new S_(t)};function O_(t){this._context=t}O_.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(){(this._line||0!==this._line&&3===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;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:E_(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};var N_=function(t){return new O_(t)};function C_(t,e){this._basis=new A_(t),this._beta=e}C_.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,n=t.length-1;if(n>0)for(var r,i=t[0],a=e[0],o=t[n]-i,s=e[n]-a,u=-1;++u<=n;)r=u/n,this._basis.point(this._beta*t[u]+(1-this._beta)*(i+r*o),this._beta*e[u]+(1-this._beta)*(a+r*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};var D_=function t(e){function n(t){return 1===e?new A_(t):new C_(t,e)}return n.beta=function(e){return t(+e)},n}(.85);function L_(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 F_(t,e){this._context=t,this._k=(1-e)/6}F_.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:L_(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:L_(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 I_=function t(e){function n(t){return new F_(t,e)}return n.tension=function(e){return t(+e)},n}(0);function P_(t,e){this._context=t,this._k=(1-e)/6}P_.prototype={areaStart:k_,areaEnd:k_,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:L_(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 R_=function t(e){function n(t){return new P_(t,e)}return n.tension=function(e){return t(+e)},n}(0);function B_(t,e){this._context=t,this._k=(1-e)/6}B_.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(){(this._line||0!==this._line&&3===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;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:L_(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 j_=function t(e){function n(t){return new B_(t,e)}return n.tension=function(e){return t(+e)},n}(0);function Y_(t,e,n){var r=t._x1,i=t._y1,a=t._x2,o=t._y2;if(t._l01_a>1e-12){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,u=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/u,i=(i*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/u}if(t._l23_a>1e-12){var c=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,l=3*t._l23_a*(t._l23_a+t._l12_a);a=(a*c+t._x1*t._l23_2a-e*t._l12_2a)/l,o=(o*c+t._y1*t._l23_2a-n*t._l12_2a)/l}t._context.bezierCurveTo(r,i,a,o,t._x2,t._y2)}function z_(t,e){this._context=t,this._alpha=e}z_.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:Y_(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 U_=function t(e){function n(t){return e?new z_(t,e):new F_(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function $_(t,e){this._context=t,this._alpha=e}$_.prototype={areaStart:k_,areaEnd:k_,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=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 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},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._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Y_(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 G_=function t(e){function n(t){return e?new $_(t,e):new P_(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function V_(t,e){this._context=t,this._alpha=e}V_.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(){(this._line||0!==this._line&&3===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;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Y_(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 H_=function t(e){function n(t){return e?new V_(t,e):new B_(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function W_(t){this._context=t}W_.prototype={areaStart:k_,areaEnd:k_,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}};var q_=function(t){return new W_(t)};function X_(t){return t<0?-1:1}function Z_(t,e,n){var r=t._x1-t._x0,i=e-t._x1,a=(t._y1-t._y0)/(r||i<0&&-0),o=(n-t._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(X_(a)+X_(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function J_(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function Q_(t,e,n){var r=t._x0,i=t._y0,a=t._x1,o=t._y1,s=(a-r)/3;t._context.bezierCurveTo(r+s,i+s*e,a-s,o-s*n,a,o)}function K_(t){this._context=t}function tw(t){this._context=new ew(t)}function ew(t){this._context=t}function nw(t){return new K_(t)}function rw(t){return new tw(t)}function iw(t){this._context=t}function aw(t){var e,n,r=t.length-1,i=new Array(r),a=new Array(r),o=new Array(r);for(i[0]=0,a[0]=2,o[0]=t[0]+2*t[1],e=1;e<r-1;++e)i[e]=1,a[e]=4,o[e]=4*t[e]+2*t[e+1];for(i[r-1]=2,a[r-1]=7,o[r-1]=8*t[r-1]+t[r],e=1;e<r;++e)n=i[e]/a[e-1],a[e]-=n,o[e]-=n*o[e-1];for(i[r-1]=o[r-1]/a[r-1],e=r-2;e>=0;--e)i[e]=(o[e]-i[e+1])/a[e];for(a[r-1]=(t[r]+i[r-1])/2,e=0;e<r-1;++e)a[e]=2*t[e+1]-i[e+1];return[i,a]}K_.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:Q_(this,this._t0,J_(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,Q_(this,J_(this,n=Z_(this,t,e)),n);break;default:Q_(this,this._t0,n=Z_(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(tw.prototype=Object.create(K_.prototype)).point=function(t,e){K_.prototype.point.call(this,e,t)},ew.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,a){this._context.bezierCurveTo(e,t,r,n,a,i)}},iw.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=aw(t),i=aw(e),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],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)}};var ow=function(t){return new iw(t)};function sw(t,e){this._context=t,this._t=e}sw.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 uw=function(t){return new sw(t,.5)};function cw(t){return new sw(t,0)}function lw(t){return new sw(t,1)}var fw=function(t,e){if((i=t.length)>1)for(var n,r,i,a=1,o=t[e[0]],s=o.length;a<i;++a)for(r=o,o=t[e[a]],n=0;n<s;++n)o[n][1]+=o[n][0]=isNaN(r[n][1])?r[n][0]:r[n][1]},hw=function(t){for(var e=t.length,n=new Array(e);--e>=0;)n[e]=e;return n};function dw(t,e){return t[e]}var pw=function(){var t=hx([]),e=hw,n=fw,r=dw;function i(i){var a,o,s=t.apply(this,arguments),u=i.length,c=s.length,l=new Array(c);for(a=0;a<c;++a){for(var f,h=s[a],d=l[a]=new Array(u),p=0;p<u;++p)d[p]=f=[0,+r(i[p],h,p,i)],f.data=i[p];d.key=h}for(a=0,o=e(l);a<c;++a)l[o[a]].index=a;return n(l,o),l}return i.keys=function(e){return arguments.length?(t="function"==typeof e?e:hx(Xx.call(e)),i):t},i.value=function(t){return arguments.length?(r="function"==typeof t?t:hx(+t),i):r},i.order=function(t){return arguments.length?(e=null==t?hw:"function"==typeof t?t:hx(Xx.call(t)),i):e},i.offset=function(t){return arguments.length?(n=null==t?fw:t,i):n},i},yw=function(t,e){if((r=t.length)>0){for(var n,r,i,a=0,o=t[0].length;a<o;++a){for(i=n=0;n<r;++n)i+=t[n][a][1]||0;if(i)for(n=0;n<r;++n)t[n][a][1]/=i}fw(t,e)}},gw=function(t,e){if((s=t.length)>0)for(var n,r,i,a,o,s,u=0,c=t[e[0]].length;u<c;++u)for(a=o=0,n=0;n<s;++n)(i=(r=t[e[n]][u])[1]-r[0])>0?(r[0]=a,r[1]=a+=i):i<0?(r[1]=o,r[0]=o+=i):(r[0]=0,r[1]=i)},mw=function(t,e){if((n=t.length)>0){for(var n,r=0,i=t[e[0]],a=i.length;r<a;++r){for(var o=0,s=0;o<n;++o)s+=t[o][r][1]||0;i[r][1]+=i[r][0]=-s/2}fw(t,e)}},vw=function(t,e){if((i=t.length)>0&&(r=(n=t[e[0]]).length)>0){for(var n,r,i,a=0,o=1;o<r;++o){for(var s=0,u=0,c=0;s<i;++s){for(var l=t[e[s]],f=l[o][1]||0,h=(f-(l[o-1][1]||0))/2,d=0;d<s;++d){var p=t[e[d]];h+=(p[o][1]||0)-(p[o-1][1]||0)}u+=f,c+=h*f}n[o-1][1]+=n[o-1][0]=a,u&&(a-=c/u)}n[o-1][1]+=n[o-1][0]=a,fw(t,e)}},bw=function(t){var e=t.map(xw);return hw(t).sort((function(t,n){return e[t]-e[n]}))};function xw(t){for(var e,n=-1,r=0,i=t.length,a=-1/0;++n<i;)(e=+t[n][1])>a&&(a=e,r=n);return r}var _w=function(t){var e=t.map(ww);return hw(t).sort((function(t,n){return e[t]-e[n]}))};function ww(t){for(var e,n=0,r=-1,i=t.length;++r<i;)(e=+t[r][1])&&(n+=e);return n}var kw=function(t){return _w(t).reverse()},Ew=function(t){var e,n,r=t.length,i=t.map(ww),a=bw(t),o=0,s=0,u=[],c=[];for(e=0;e<r;++e)n=a[e],o<s?(o+=i[n],u.push(n)):(s+=i[n],c.push(n));return c.reverse().concat(u)},Aw=function(t){return hw(t).reverse()};var Tw=Date.prototype.toISOString?function(t){return t.toISOString()}:Gg("%Y-%m-%dT%H:%M:%S.%LZ");var Sw=+new Date("2000-01-01T00:00:00.000Z")?function(t){var e=new Date(t);return isNaN(e)?null:e}:Vg("%Y-%m-%dT%H:%M:%S.%LZ"),Mw=function(t,e,n){var r=new $n,i=e;return null==e?(r.restart(t,e,n),r):(e=+e,n=null==n?zn():+n,r.restart((function a(o){o+=i,r.restart(a,i+=e,n),t(o)}),e,n),r)},Ow=function(t){return function(){return t}};function Nw(t){return t[0]}function Cw(t){return t[1]}function Dw(){this._=null}function Lw(t){t.U=t.C=t.L=t.R=t.P=t.N=null}function Fw(t,e){var n=e,r=e.R,i=n.U;i?i.L===n?i.L=r:i.R=r:t._=r,r.U=i,n.U=r,n.R=r.L,n.R&&(n.R.U=n),r.L=n}function Iw(t,e){var n=e,r=e.L,i=n.U;i?i.L===n?i.L=r:i.R=r:t._=r,r.U=i,n.U=r,n.L=r.R,n.L&&(n.L.U=n),r.R=n}function Pw(t){for(;t.L;)t=t.L;return t}Dw.prototype={constructor:Dw,insert:function(t,e){var n,r,i;if(t){if(e.P=t,e.N=t.N,t.N&&(t.N.P=e),t.N=e,t.R){for(t=t.R;t.L;)t=t.L;t.L=e}else t.R=e;n=t}else this._?(t=Pw(this._),e.P=null,e.N=t,t.P=t.L=e,n=t):(e.P=e.N=null,this._=e,n=null);for(e.L=e.R=null,e.U=n,e.C=!0,t=e;n&&n.C;)n===(r=n.U).L?(i=r.R)&&i.C?(n.C=i.C=!1,r.C=!0,t=r):(t===n.R&&(Fw(this,n),n=(t=n).U),n.C=!1,r.C=!0,Iw(this,r)):(i=r.L)&&i.C?(n.C=i.C=!1,r.C=!0,t=r):(t===n.L&&(Iw(this,n),n=(t=n).U),n.C=!1,r.C=!0,Fw(this,r)),n=t.U;this._.C=!1},remove:function(t){t.N&&(t.N.P=t.P),t.P&&(t.P.N=t.N),t.N=t.P=null;var e,n,r,i=t.U,a=t.L,o=t.R;if(n=a?o?Pw(o):a:o,i?i.L===t?i.L=n:i.R=n:this._=n,a&&o?(r=n.C,n.C=t.C,n.L=a,a.U=n,n!==o?(i=n.U,n.U=t.U,t=n.R,i.L=t,n.R=o,o.U=n):(n.U=i,i=n,t=n.R)):(r=t.C,t=n),t&&(t.U=i),!r)if(t&&t.C)t.C=!1;else{do{if(t===this._)break;if(t===i.L){if((e=i.R).C&&(e.C=!1,i.C=!0,Fw(this,i),e=i.R),e.L&&e.L.C||e.R&&e.R.C){e.R&&e.R.C||(e.L.C=!1,e.C=!0,Iw(this,e),e=i.R),e.C=i.C,i.C=e.R.C=!1,Fw(this,i),t=this._;break}}else if((e=i.L).C&&(e.C=!1,i.C=!0,Iw(this,i),e=i.L),e.L&&e.L.C||e.R&&e.R.C){e.L&&e.L.C||(e.R.C=!1,e.C=!0,Fw(this,e),e=i.L),e.C=i.C,i.C=e.L.C=!1,Iw(this,i),t=this._;break}e.C=!0,t=i,i=i.U}while(!t.C);t&&(t.C=!1)}}};var Rw=Dw;function Bw(t,e,n,r){var i=[null,null],a=uk.push(i)-1;return i.left=t,i.right=e,n&&Yw(i,t,e,n),r&&Yw(i,e,t,r),ok[t.index].halfedges.push(a),ok[e.index].halfedges.push(a),i}function jw(t,e,n){var r=[e,n];return r.left=t,r}function Yw(t,e,n,r){t[0]||t[1]?t.left===n?t[1]=r:t[0]=r:(t[0]=r,t.left=e,t.right=n)}function zw(t,e,n,r,i){var a,o=t[0],s=t[1],u=o[0],c=o[1],l=0,f=1,h=s[0]-u,d=s[1]-c;if(a=e-u,h||!(a>0)){if(a/=h,h<0){if(a<l)return;a<f&&(f=a)}else if(h>0){if(a>f)return;a>l&&(l=a)}if(a=r-u,h||!(a<0)){if(a/=h,h<0){if(a>f)return;a>l&&(l=a)}else if(h>0){if(a<l)return;a<f&&(f=a)}if(a=n-c,d||!(a>0)){if(a/=d,d<0){if(a<l)return;a<f&&(f=a)}else if(d>0){if(a>f)return;a>l&&(l=a)}if(a=i-c,d||!(a<0)){if(a/=d,d<0){if(a>f)return;a>l&&(l=a)}else if(d>0){if(a<l)return;a<f&&(f=a)}return!(l>0||f<1)||(l>0&&(t[0]=[u+l*h,c+l*d]),f<1&&(t[1]=[u+f*h,c+f*d]),!0)}}}}}function Uw(t,e,n,r,i){var a=t[1];if(a)return!0;var o,s,u=t[0],c=t.left,l=t.right,f=c[0],h=c[1],d=l[0],p=l[1],y=(f+d)/2,g=(h+p)/2;if(p===h){if(y<e||y>=r)return;if(f>d){if(u){if(u[1]>=i)return}else u=[y,n];a=[y,i]}else{if(u){if(u[1]<n)return}else u=[y,i];a=[y,n]}}else if(s=g-(o=(f-d)/(p-h))*y,o<-1||o>1)if(f>d){if(u){if(u[1]>=i)return}else u=[(n-s)/o,n];a=[(i-s)/o,i]}else{if(u){if(u[1]<n)return}else u=[(i-s)/o,i];a=[(n-s)/o,n]}else if(h<p){if(u){if(u[0]>=r)return}else u=[e,o*e+s];a=[r,o*r+s]}else{if(u){if(u[0]<e)return}else u=[r,o*r+s];a=[e,o*e+s]}return t[0]=u,t[1]=a,!0}function $w(t,e){var n=t.site,r=e.left,i=e.right;return n===i&&(i=r,r=n),i?Math.atan2(i[1]-r[1],i[0]-r[0]):(n===r?(r=e[1],i=e[0]):(r=e[0],i=e[1]),Math.atan2(r[0]-i[0],i[1]-r[1]))}function Gw(t,e){return e[+(e.left!==t.site)]}function Vw(t,e){return e[+(e.left===t.site)]}var Hw,Ww=[];function qw(){Lw(this),this.x=this.y=this.arc=this.site=this.cy=null}function Xw(t){var e=t.P,n=t.N;if(e&&n){var r=e.site,i=t.site,a=n.site;if(r!==a){var o=i[0],s=i[1],u=r[0]-o,c=r[1]-s,l=a[0]-o,f=a[1]-s,h=2*(u*f-c*l);if(!(h>=-lk)){var d=u*u+c*c,p=l*l+f*f,y=(f*d-c*p)/h,g=(u*p-l*d)/h,m=Ww.pop()||new qw;m.arc=t,m.site=i,m.x=y+o,m.y=(m.cy=g+s)+Math.sqrt(y*y+g*g),t.circle=m;for(var v=null,b=sk._;b;)if(m.y<b.y||m.y===b.y&&m.x<=b.x){if(!b.L){v=b.P;break}b=b.L}else{if(!b.R){v=b;break}b=b.R}sk.insert(v,m),v||(Hw=m)}}}}function Zw(t){var e=t.circle;e&&(e.P||(Hw=e.N),sk.remove(e),Ww.push(e),Lw(e),t.circle=null)}var Jw=[];function Qw(){Lw(this),this.edge=this.site=this.circle=null}function Kw(t){var e=Jw.pop()||new Qw;return e.site=t,e}function tk(t){Zw(t),ak.remove(t),Jw.push(t),Lw(t)}function ek(t){var e=t.circle,n=e.x,r=e.cy,i=[n,r],a=t.P,o=t.N,s=[t];tk(t);for(var u=a;u.circle&&Math.abs(n-u.circle.x)<ck&&Math.abs(r-u.circle.cy)<ck;)a=u.P,s.unshift(u),tk(u),u=a;s.unshift(u),Zw(u);for(var c=o;c.circle&&Math.abs(n-c.circle.x)<ck&&Math.abs(r-c.circle.cy)<ck;)o=c.N,s.push(c),tk(c),c=o;s.push(c),Zw(c);var l,f=s.length;for(l=1;l<f;++l)c=s[l],u=s[l-1],Yw(c.edge,u.site,c.site,i);u=s[0],(c=s[f-1]).edge=Bw(u.site,c.site,null,i),Xw(u),Xw(c)}function nk(t){for(var e,n,r,i,a=t[0],o=t[1],s=ak._;s;)if((r=rk(s,o)-a)>ck)s=s.L;else{if(!((i=a-ik(s,o))>ck)){r>-ck?(e=s.P,n=s):i>-ck?(e=s,n=s.N):e=n=s;break}if(!s.R){e=s;break}s=s.R}!function(t){ok[t.index]={site:t,halfedges:[]}}(t);var u=Kw(t);if(ak.insert(e,u),e||n){if(e===n)return Zw(e),n=Kw(e.site),ak.insert(u,n),u.edge=n.edge=Bw(e.site,u.site),Xw(e),void Xw(n);if(n){Zw(e),Zw(n);var c=e.site,l=c[0],f=c[1],h=t[0]-l,d=t[1]-f,p=n.site,y=p[0]-l,g=p[1]-f,m=2*(h*g-d*y),v=h*h+d*d,b=y*y+g*g,x=[(g*v-d*b)/m+l,(h*b-y*v)/m+f];Yw(n.edge,c,p,x),u.edge=Bw(c,t,null,x),n.edge=Bw(t,p,null,x),Xw(e),Xw(n)}else u.edge=Bw(e.site,u.site)}}function rk(t,e){var n=t.site,r=n[0],i=n[1],a=i-e;if(!a)return r;var o=t.P;if(!o)return-1/0;var s=(n=o.site)[0],u=n[1],c=u-e;if(!c)return s;var l=s-r,f=1/a-1/c,h=l/c;return f?(-h+Math.sqrt(h*h-2*f*(l*l/(-2*c)-u+c/2+i-a/2)))/f+r:(r+s)/2}function ik(t,e){var n=t.N;if(n)return rk(n,e);var r=t.site;return r[1]===e?r[0]:1/0}var ak,ok,sk,uk,ck=1e-6,lk=1e-12;function fk(t,e){return e[1]-t[1]||e[0]-t[0]}function hk(t,e){var n,r,i,a=t.sort(fk).pop();for(uk=[],ok=new Array(t.length),ak=new Rw,sk=new Rw;;)if(i=Hw,a&&(!i||a[1]<i.y||a[1]===i.y&&a[0]<i.x))a[0]===n&&a[1]===r||(nk(a),n=a[0],r=a[1]),a=t.pop();else{if(!i)break;ek(i.arc)}if(function(){for(var t,e,n,r,i=0,a=ok.length;i<a;++i)if((t=ok[i])&&(r=(e=t.halfedges).length)){var o=new Array(r),s=new Array(r);for(n=0;n<r;++n)o[n]=n,s[n]=$w(t,uk[e[n]]);for(o.sort((function(t,e){return s[e]-s[t]})),n=0;n<r;++n)s[n]=e[o[n]];for(n=0;n<r;++n)e[n]=s[n]}}(),e){var o=+e[0][0],s=+e[0][1],u=+e[1][0],c=+e[1][1];!function(t,e,n,r){for(var i,a=uk.length;a--;)Uw(i=uk[a],t,e,n,r)&&zw(i,t,e,n,r)&&(Math.abs(i[0][0]-i[1][0])>ck||Math.abs(i[0][1]-i[1][1])>ck)||delete uk[a]}(o,s,u,c),function(t,e,n,r){var i,a,o,s,u,c,l,f,h,d,p,y,g=ok.length,m=!0;for(i=0;i<g;++i)if(a=ok[i]){for(o=a.site,s=(u=a.halfedges).length;s--;)uk[u[s]]||u.splice(s,1);for(s=0,c=u.length;s<c;)p=(d=Vw(a,uk[u[s]]))[0],y=d[1],f=(l=Gw(a,uk[u[++s%c]]))[0],h=l[1],(Math.abs(p-f)>ck||Math.abs(y-h)>ck)&&(u.splice(s,0,uk.push(jw(o,d,Math.abs(p-t)<ck&&r-y>ck?[t,Math.abs(f-t)<ck?h:r]:Math.abs(y-r)<ck&&n-p>ck?[Math.abs(h-r)<ck?f:n,r]:Math.abs(p-n)<ck&&y-e>ck?[n,Math.abs(f-n)<ck?h:e]:Math.abs(y-e)<ck&&p-t>ck?[Math.abs(h-e)<ck?f:t,e]:null))-1),++c);c&&(m=!1)}if(m){var v,b,x,_=1/0;for(i=0,m=null;i<g;++i)(a=ok[i])&&(x=(v=(o=a.site)[0]-t)*v+(b=o[1]-e)*b)<_&&(_=x,m=a);if(m){var w=[t,e],k=[t,r],E=[n,r],A=[n,e];m.halfedges.push(uk.push(jw(o=m.site,w,k))-1,uk.push(jw(o,k,E))-1,uk.push(jw(o,E,A))-1,uk.push(jw(o,A,w))-1)}}for(i=0;i<g;++i)(a=ok[i])&&(a.halfedges.length||delete ok[i])}(o,s,u,c)}this.edges=uk,this.cells=ok,ak=sk=uk=ok=null}hk.prototype={constructor:hk,polygons:function(){var t=this.edges;return this.cells.map((function(e){var n=e.halfedges.map((function(n){return Gw(e,t[n])}));return n.data=e.site.data,n}))},triangles:function(){var t=[],e=this.edges;return this.cells.forEach((function(n,r){if(a=(i=n.halfedges).length)for(var i,a,o,s,u,c,l=n.site,f=-1,h=e[i[a-1]],d=h.left===l?h.right:h.left;++f<a;)o=d,d=(h=e[i[f]]).left===l?h.right:h.left,o&&d&&r<o.index&&r<d.index&&(u=o,c=d,((s=l)[0]-c[0])*(u[1]-s[1])-(s[0]-u[0])*(c[1]-s[1])<0)&&t.push([l.data,o.data,d.data])})),t},links:function(){return this.edges.filter((function(t){return t.right})).map((function(t){return{source:t.left.data,target:t.right.data}}))},find:function(t,e,n){for(var r,i,a=this,o=a._found||0,s=a.cells.length;!(i=a.cells[o]);)if(++o>=s)return null;var u=t-i.site[0],c=e-i.site[1],l=u*u+c*c;do{i=a.cells[r=o],o=null,i.halfedges.forEach((function(n){var r=a.edges[n],s=r.left;if(s!==i.site&&s||(s=r.right)){var u=t-s[0],c=e-s[1],f=u*u+c*c;f<l&&(l=f,o=s.index)}}))}while(null!==o);return a._found=r,null==n||l<=n*n?i.site:null}};var dk=function(){var t=Nw,e=Cw,n=null;function r(r){return new hk(r.map((function(n,i){var a=[Math.round(t(n,i,r)/ck)*ck,Math.round(e(n,i,r)/ck)*ck];return a.index=i,a.data=n,a})),n)}return r.polygons=function(t){return r(t).polygons()},r.links=function(t){return r(t).links()},r.triangles=function(t){return r(t).triangles()},r.x=function(e){return arguments.length?(t="function"==typeof e?e:Ow(+e),r):t},r.y=function(t){return arguments.length?(e="function"==typeof t?t:Ow(+t),r):e},r.extent=function(t){return arguments.length?(n=null==t?null:[[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]],r):n&&[[n[0][0],n[0][1]],[n[1][0],n[1][1]]]},r.size=function(t){return arguments.length?(n=null==t?null:[[0,0],[+t[0],+t[1]]],r):n&&[n[1][0]-n[0][0],n[1][1]-n[0][1]]},r},pk=function(t){return function(){return t}};function yk(t,e,n){this.target=t,this.type=e,this.transform=n}function gk(t,e,n){this.k=t,this.x=e,this.y=n}gk.prototype={constructor:gk,scale:function(t){return 1===t?this:new gk(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new gk(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var mk=new gk(1,0,0);function vk(t){for(;!t.__zoom;)if(!(t=t.parentNode))return mk;return t.__zoom}function bk(){ue.stopImmediatePropagation()}vk.prototype=gk.prototype;var xk=function(){ue.preventDefault(),ue.stopImmediatePropagation()};function _k(){return!ue.ctrlKey&&!ue.button}function wk(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t).hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]:[[0,0],[t.clientWidth,t.clientHeight]]}function kk(){return this.__zoom||mk}function Ek(){return-ue.deltaY*(1===ue.deltaMode?.05:ue.deltaMode?1:.002)}function Ak(){return navigator.maxTouchPoints||"ontouchstart"in this}function Tk(t,e,n){var r=t.invertX(e[0][0])-n[0][0],i=t.invertX(e[1][0])-n[1][0],a=t.invertY(e[0][1])-n[0][1],o=t.invertY(e[1][1])-n[1][1];return t.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),o>a?(a+o)/2:Math.min(0,a)||Math.max(0,o))}var Sk=function(){var t,e,n=_k,r=wk,i=Tk,a=Ek,o=Ak,s=[0,1/0],u=[[-1/0,-1/0],[1/0,1/0]],c=250,l=hp,f=lt("start","zoom","end"),h=0;function d(t){t.property("__zoom",kk).on("wheel.zoom",x).on("mousedown.zoom",_).on("dblclick.zoom",w).filter(o).on("touchstart.zoom",k).on("touchmove.zoom",E).on("touchend.zoom touchcancel.zoom",A).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function p(t,e){return(e=Math.max(s[0],Math.min(s[1],e)))===t.k?t:new gk(e,t.x,t.y)}function y(t,e,n){var r=e[0]-n[0]*t.k,i=e[1]-n[1]*t.k;return r===t.x&&i===t.y?t:new gk(t.k,r,i)}function g(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function m(t,e,n){t.on("start.zoom",(function(){v(this,arguments).start()})).on("interrupt.zoom end.zoom",(function(){v(this,arguments).end()})).tween("zoom",(function(){var t=this,i=arguments,a=v(t,i),o=r.apply(t,i),s=null==n?g(o):"function"==typeof n?n.apply(t,i):n,u=Math.max(o[1][0]-o[0][0],o[1][1]-o[0][1]),c=t.__zoom,f="function"==typeof e?e.apply(t,i):e,h=l(c.invert(s).concat(u/c.k),f.invert(s).concat(u/f.k));return function(t){if(1===t)t=f;else{var e=h(t),n=u/e[2];t=new gk(n,s[0]-e[0]*n,s[1]-e[1]*n)}a.zoom(null,t)}}))}function v(t,e,n){return!n&&t.__zooming||new b(t,e)}function b(t,e){this.that=t,this.args=e,this.active=0,this.extent=r.apply(t,e),this.taps=0}function x(){if(n.apply(this,arguments)){var t=v(this,arguments),e=this.__zoom,r=Math.max(s[0],Math.min(s[1],e.k*Math.pow(2,a.apply(this,arguments)))),o=Dn(this);if(t.wheel)t.mouse[0][0]===o[0]&&t.mouse[0][1]===o[1]||(t.mouse[1]=e.invert(t.mouse[0]=o)),clearTimeout(t.wheel);else{if(e.k===r)return;t.mouse=[o,e.invert(o)],or(this),t.start()}xk(),t.wheel=setTimeout(c,150),t.zoom("mouse",i(y(p(e,r),t.mouse[0],t.mouse[1]),t.extent,u))}function c(){t.wheel=null,t.end()}}function _(){if(!e&&n.apply(this,arguments)){var t=v(this,arguments,!0),r=we(ue.view).on("mousemove.zoom",c,!0).on("mouseup.zoom",l,!0),a=Dn(this),o=ue.clientX,s=ue.clientY;Ae(ue.view),bk(),t.mouse=[a,this.__zoom.invert(a)],or(this),t.start()}function c(){if(xk(),!t.moved){var e=ue.clientX-o,n=ue.clientY-s;t.moved=e*e+n*n>h}t.zoom("mouse",i(y(t.that.__zoom,t.mouse[0]=Dn(t.that),t.mouse[1]),t.extent,u))}function l(){r.on("mousemove.zoom mouseup.zoom",null),Te(ue.view,t.moved),xk(),t.end()}}function w(){if(n.apply(this,arguments)){var t=this.__zoom,e=Dn(this),a=t.invert(e),o=t.k*(ue.shiftKey?.5:2),s=i(y(p(t,o),e,a),r.apply(this,arguments),u);xk(),c>0?we(this).transition().duration(c).call(m,s,e):we(this).call(d.transform,s)}}function k(){if(n.apply(this,arguments)){var e,r,i,a,o=ue.touches,s=o.length,u=v(this,arguments,ue.changedTouches.length===s);for(bk(),r=0;r<s;++r)i=o[r],a=[a=Cn(this,o,i.identifier),this.__zoom.invert(a),i.identifier],u.touch0?u.touch1||u.touch0[2]===a[2]||(u.touch1=a,u.taps=0):(u.touch0=a,e=!0,u.taps=1+!!t);t&&(t=clearTimeout(t)),e&&(u.taps<2&&(t=setTimeout((function(){t=null}),500)),or(this),u.start())}}function E(){if(this.__zooming){var e,n,r,a,o=v(this,arguments),s=ue.changedTouches,c=s.length;for(xk(),t&&(t=clearTimeout(t)),o.taps=0,e=0;e<c;++e)n=s[e],r=Cn(this,s,n.identifier),o.touch0&&o.touch0[2]===n.identifier?o.touch0[0]=r:o.touch1&&o.touch1[2]===n.identifier&&(o.touch1[0]=r);if(n=o.that.__zoom,o.touch1){var l=o.touch0[0],f=o.touch0[1],h=o.touch1[0],d=o.touch1[1],g=(g=h[0]-l[0])*g+(g=h[1]-l[1])*g,m=(m=d[0]-f[0])*m+(m=d[1]-f[1])*m;n=p(n,Math.sqrt(g/m)),r=[(l[0]+h[0])/2,(l[1]+h[1])/2],a=[(f[0]+d[0])/2,(f[1]+d[1])/2]}else{if(!o.touch0)return;r=o.touch0[0],a=o.touch0[1]}o.zoom("touch",i(y(n,r,a),o.extent,u))}}function A(){if(this.__zooming){var t,n,r=v(this,arguments),i=ue.changedTouches,a=i.length;for(bk(),e&&clearTimeout(e),e=setTimeout((function(){e=null}),500),t=0;t<a;++t)n=i[t],r.touch0&&r.touch0[2]===n.identifier?delete r.touch0:r.touch1&&r.touch1[2]===n.identifier&&delete r.touch1;if(r.touch1&&!r.touch0&&(r.touch0=r.touch1,delete r.touch1),r.touch0)r.touch0[1]=this.__zoom.invert(r.touch0[0]);else if(r.end(),2===r.taps){var o=we(this).on("dblclick.zoom");o&&o.apply(this,arguments)}}}return d.transform=function(t,e,n){var r=t.selection?t.selection():t;r.property("__zoom",kk),t!==r?m(t,e,n):r.interrupt().each((function(){v(this,arguments).start().zoom(null,"function"==typeof e?e.apply(this,arguments):e).end()}))},d.scaleBy=function(t,e,n){d.scaleTo(t,(function(){var t=this.__zoom.k,n="function"==typeof e?e.apply(this,arguments):e;return t*n}),n)},d.scaleTo=function(t,e,n){d.transform(t,(function(){var t=r.apply(this,arguments),a=this.__zoom,o=null==n?g(t):"function"==typeof n?n.apply(this,arguments):n,s=a.invert(o),c="function"==typeof e?e.apply(this,arguments):e;return i(y(p(a,c),o,s),t,u)}),n)},d.translateBy=function(t,e,n){d.transform(t,(function(){return i(this.__zoom.translate("function"==typeof e?e.apply(this,arguments):e,"function"==typeof n?n.apply(this,arguments):n),r.apply(this,arguments),u)}))},d.translateTo=function(t,e,n,a){d.transform(t,(function(){var t=r.apply(this,arguments),o=this.__zoom,s=null==a?g(t):"function"==typeof a?a.apply(this,arguments):a;return i(mk.translate(s[0],s[1]).scale(o.k).translate("function"==typeof e?-e.apply(this,arguments):-e,"function"==typeof n?-n.apply(this,arguments):-n),t,u)}),a)},b.prototype={start:function(){return 1==++this.active&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(t,e){return this.mouse&&"mouse"!==t&&(this.mouse[1]=e.invert(this.mouse[0])),this.touch0&&"touch"!==t&&(this.touch0[1]=e.invert(this.touch0[0])),this.touch1&&"touch"!==t&&(this.touch1[1]=e.invert(this.touch1[0])),this.that.__zoom=e,this.emit("zoom"),this},end:function(){return 0==--this.active&&(delete this.that.__zooming,this.emit("end")),this},emit:function(t){pe(new yk(d,t,this.that.__zoom),f.apply,f,[t,this.that,this.args])}},d.wheelDelta=function(t){return arguments.length?(a="function"==typeof t?t:pk(+t),d):a},d.filter=function(t){return arguments.length?(n="function"==typeof t?t:pk(!!t),d):n},d.touchable=function(t){return arguments.length?(o="function"==typeof t?t:pk(!!t),d):o},d.extent=function(t){return arguments.length?(r="function"==typeof t?t:pk([[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]]),d):r},d.scaleExtent=function(t){return arguments.length?(s[0]=+t[0],s[1]=+t[1],d):[s[0],s[1]]},d.translateExtent=function(t){return arguments.length?(u[0][0]=+t[0][0],u[1][0]=+t[1][0],u[0][1]=+t[0][1],u[1][1]=+t[1][1],d):[[u[0][0],u[0][1]],[u[1][0],u[1][1]]]},d.constrain=function(t){return arguments.length?(i=t,d):i},d.duration=function(t){return arguments.length?(c=+t,d):c},d.interpolate=function(t){return arguments.length?(l=t,d):l},d.on=function(){var t=f.on.apply(f,arguments);return t===f?d:t},d.clickDistance=function(t){return arguments.length?(h=(t=+t)*t,d):Math.sqrt(h)},d};n.d(e,"version",(function(){return"5.15.0"})),n.d(e,"bisect",(function(){return u})),n.d(e,"bisectRight",(function(){return o})),n.d(e,"bisectLeft",(function(){return s})),n.d(e,"ascending",(function(){return r})),n.d(e,"bisector",(function(){return i})),n.d(e,"cross",(function(){return f})),n.d(e,"descending",(function(){return h})),n.d(e,"deviation",(function(){return y})),n.d(e,"extent",(function(){return g})),n.d(e,"histogram",(function(){return N})),n.d(e,"thresholdFreedmanDiaconis",(function(){return D})),n.d(e,"thresholdScott",(function(){return L})),n.d(e,"thresholdSturges",(function(){return O})),n.d(e,"max",(function(){return F})),n.d(e,"mean",(function(){return I})),n.d(e,"median",(function(){return P})),n.d(e,"merge",(function(){return R})),n.d(e,"min",(function(){return B})),n.d(e,"pairs",(function(){return c})),n.d(e,"permute",(function(){return j})),n.d(e,"quantile",(function(){return C})),n.d(e,"range",(function(){return w})),n.d(e,"scan",(function(){return Y})),n.d(e,"shuffle",(function(){return z})),n.d(e,"sum",(function(){return U})),n.d(e,"ticks",(function(){return T})),n.d(e,"tickIncrement",(function(){return S})),n.d(e,"tickStep",(function(){return M})),n.d(e,"transpose",(function(){return $})),n.d(e,"variance",(function(){return p})),n.d(e,"zip",(function(){return V})),n.d(e,"axisTop",(function(){return tt})),n.d(e,"axisRight",(function(){return et})),n.d(e,"axisBottom",(function(){return nt})),n.d(e,"axisLeft",(function(){return rt})),n.d(e,"brush",(function(){return Ai})),n.d(e,"brushX",(function(){return ki})),n.d(e,"brushY",(function(){return Ei})),n.d(e,"brushSelection",(function(){return wi})),n.d(e,"chord",(function(){return Fi})),n.d(e,"ribbon",(function(){return qi})),n.d(e,"nest",(function(){return Qi})),n.d(e,"set",(function(){return oa})),n.d(e,"map",(function(){return Ji})),n.d(e,"keys",(function(){return sa})),n.d(e,"values",(function(){return ua})),n.d(e,"entries",(function(){return ca})),n.d(e,"color",(function(){return $e})),n.d(e,"rgb",(function(){return We})),n.d(e,"hsl",(function(){return tn})),n.d(e,"lab",(function(){return pa})),n.d(e,"hcl",(function(){return wa})),n.d(e,"lch",(function(){return _a})),n.d(e,"gray",(function(){return da})),n.d(e,"cubehelix",(function(){return Na})),n.d(e,"contours",(function(){return Ya})),n.d(e,"contourDensity",(function(){return Ha})),n.d(e,"dispatch",(function(){return lt})),n.d(e,"drag",(function(){return Ka})),n.d(e,"dragDisable",(function(){return Ae})),n.d(e,"dragEnable",(function(){return Te})),n.d(e,"dsvFormat",(function(){return oo})),n.d(e,"csvParse",(function(){return uo})),n.d(e,"csvParseRows",(function(){return co})),n.d(e,"csvFormat",(function(){return lo})),n.d(e,"csvFormatBody",(function(){return fo})),n.d(e,"csvFormatRows",(function(){return ho})),n.d(e,"csvFormatRow",(function(){return po})),n.d(e,"csvFormatValue",(function(){return yo})),n.d(e,"tsvParse",(function(){return mo})),n.d(e,"tsvParseRows",(function(){return vo})),n.d(e,"tsvFormat",(function(){return bo})),n.d(e,"tsvFormatBody",(function(){return xo})),n.d(e,"tsvFormatRows",(function(){return _o})),n.d(e,"tsvFormatRow",(function(){return wo})),n.d(e,"tsvFormatValue",(function(){return ko})),n.d(e,"autoType",(function(){return Eo})),n.d(e,"easeLinear",(function(){return To})),n.d(e,"easeQuad",(function(){return Oo})),n.d(e,"easeQuadIn",(function(){return So})),n.d(e,"easeQuadOut",(function(){return Mo})),n.d(e,"easeQuadInOut",(function(){return Oo})),n.d(e,"easeCubic",(function(){return Hr})),n.d(e,"easeCubicIn",(function(){return Gr})),n.d(e,"easeCubicOut",(function(){return Vr})),n.d(e,"easeCubicInOut",(function(){return Hr})),n.d(e,"easePoly",(function(){return Do})),n.d(e,"easePolyIn",(function(){return No})),n.d(e,"easePolyOut",(function(){return Co})),n.d(e,"easePolyInOut",(function(){return Do})),n.d(e,"easeSin",(function(){return Ro})),n.d(e,"easeSinIn",(function(){return Io})),n.d(e,"easeSinOut",(function(){return Po})),n.d(e,"easeSinInOut",(function(){return Ro})),n.d(e,"easeExp",(function(){return Yo})),n.d(e,"easeExpIn",(function(){return Bo})),n.d(e,"easeExpOut",(function(){return jo})),n.d(e,"easeExpInOut",(function(){return Yo})),n.d(e,"easeCircle",(function(){return $o})),n.d(e,"easeCircleIn",(function(){return zo})),n.d(e,"easeCircleOut",(function(){return Uo})),n.d(e,"easeCircleInOut",(function(){return $o})),n.d(e,"easeBounce",(function(){return Vo})),n.d(e,"easeBounceIn",(function(){return Go})),n.d(e,"easeBounceOut",(function(){return Vo})),n.d(e,"easeBounceInOut",(function(){return Ho})),n.d(e,"easeBack",(function(){return Xo})),n.d(e,"easeBackIn",(function(){return Wo})),n.d(e,"easeBackOut",(function(){return qo})),n.d(e,"easeBackInOut",(function(){return Xo})),n.d(e,"easeElastic",(function(){return Qo})),n.d(e,"easeElasticIn",(function(){return Jo})),n.d(e,"easeElasticOut",(function(){return Qo})),n.d(e,"easeElasticInOut",(function(){return Ko})),n.d(e,"blob",(function(){return es})),n.d(e,"buffer",(function(){return rs})),n.d(e,"dsv",(function(){return ss})),n.d(e,"csv",(function(){return us})),n.d(e,"tsv",(function(){return cs})),n.d(e,"image",(function(){return ls})),n.d(e,"json",(function(){return hs})),n.d(e,"text",(function(){return as})),n.d(e,"xml",(function(){return ps})),n.d(e,"html",(function(){return ys})),n.d(e,"svg",(function(){return gs})),n.d(e,"forceCenter",(function(){return ms})),n.d(e,"forceCollide",(function(){return Ns})),n.d(e,"forceLink",(function(){return Ls})),n.d(e,"forceManyBody",(function(){return Bs})),n.d(e,"forceRadial",(function(){return js})),n.d(e,"forceSimulation",(function(){return Rs})),n.d(e,"forceX",(function(){return Ys})),n.d(e,"forceY",(function(){return zs})),n.d(e,"formatDefaultLocale",(function(){return ru})),n.d(e,"format",(function(){return Xs})),n.d(e,"formatPrefix",(function(){return Zs})),n.d(e,"formatLocale",(function(){return nu})),n.d(e,"formatSpecifier",(function(){return Vs})),n.d(e,"FormatSpecifier",(function(){return Hs})),n.d(e,"precisionFixed",(function(){return iu})),n.d(e,"precisionPrefix",(function(){return au})),n.d(e,"precisionRound",(function(){return ou})),n.d(e,"geoArea",(function(){return Ju})),n.d(e,"geoBounds",(function(){return $c})),n.d(e,"geoCentroid",(function(){return el})),n.d(e,"geoCircle",(function(){return hl})),n.d(e,"geoClipAntimeridian",(function(){return El})),n.d(e,"geoClipCircle",(function(){return Al})),n.d(e,"geoClipExtent",(function(){return Nl})),n.d(e,"geoClipRectangle",(function(){return Tl})),n.d(e,"geoContains",(function(){return ql})),n.d(e,"geoDistance",(function(){return jl})),n.d(e,"geoGraticule",(function(){return Jl})),n.d(e,"geoGraticule10",(function(){return Ql})),n.d(e,"geoInterpolate",(function(){return rf})),n.d(e,"geoLength",(function(){return Pl})),n.d(e,"geoPath",(function(){return nh})),n.d(e,"geoAlbers",(function(){return _h})),n.d(e,"geoAlbersUsa",(function(){return wh})),n.d(e,"geoAzimuthalEqualArea",(function(){return Th})),n.d(e,"geoAzimuthalEqualAreaRaw",(function(){return Ah})),n.d(e,"geoAzimuthalEquidistant",(function(){return Mh})),n.d(e,"geoAzimuthalEquidistantRaw",(function(){return Sh})),n.d(e,"geoConicConformal",(function(){return Fh})),n.d(e,"geoConicConformalRaw",(function(){return Lh})),n.d(e,"geoConicEqualArea",(function(){return xh})),n.d(e,"geoConicEqualAreaRaw",(function(){return bh})),n.d(e,"geoConicEquidistant",(function(){return Bh})),n.d(e,"geoConicEquidistantRaw",(function(){return Rh})),n.d(e,"geoEqualEarth",(function(){return Vh})),n.d(e,"geoEqualEarthRaw",(function(){return Gh})),n.d(e,"geoEquirectangular",(function(){return Ph})),n.d(e,"geoEquirectangularRaw",(function(){return Ih})),n.d(e,"geoGnomonic",(function(){return Wh})),n.d(e,"geoGnomonicRaw",(function(){return Hh})),n.d(e,"geoIdentity",(function(){return Xh})),n.d(e,"geoProjection",(function(){return gh})),n.d(e,"geoProjectionMutator",(function(){return mh})),n.d(e,"geoMercator",(function(){return Nh})),n.d(e,"geoMercatorRaw",(function(){return Oh})),n.d(e,"geoNaturalEarth1",(function(){return Jh})),n.d(e,"geoNaturalEarth1Raw",(function(){return Zh})),n.d(e,"geoOrthographic",(function(){return Kh})),n.d(e,"geoOrthographicRaw",(function(){return Qh})),n.d(e,"geoStereographic",(function(){return ed})),n.d(e,"geoStereographicRaw",(function(){return td})),n.d(e,"geoTransverseMercator",(function(){return rd})),n.d(e,"geoTransverseMercatorRaw",(function(){return nd})),n.d(e,"geoRotation",(function(){return cl})),n.d(e,"geoStream",(function(){return $u})),n.d(e,"geoTransform",(function(){return rh})),n.d(e,"cluster",(function(){return sd})),n.d(e,"hierarchy",(function(){return cd})),n.d(e,"pack",(function(){return Fd})),n.d(e,"packSiblings",(function(){return Md})),n.d(e,"packEnclose",(function(){return yd})),n.d(e,"partition",(function(){return Yd})),n.d(e,"stratify",(function(){return Vd})),n.d(e,"tree",(function(){return Qd})),n.d(e,"treemap",(function(){return rp})),n.d(e,"treemapBinary",(function(){return ip})),n.d(e,"treemapDice",(function(){return jd})),n.d(e,"treemapSlice",(function(){return Kd})),n.d(e,"treemapSliceDice",(function(){return ap})),n.d(e,"treemapSquarify",(function(){return np})),n.d(e,"treemapResquarify",(function(){return op})),n.d(e,"interpolate",(function(){return Mn})),n.d(e,"interpolateArray",(function(){return vn})),n.d(e,"interpolateBasis",(function(){return an})),n.d(e,"interpolateBasisClosed",(function(){return on})),n.d(e,"interpolateDate",(function(){return xn})),n.d(e,"interpolateDiscrete",(function(){return sp})),n.d(e,"interpolateHue",(function(){return up})),n.d(e,"interpolateNumber",(function(){return _n})),n.d(e,"interpolateNumberArray",(function(){return gn})),n.d(e,"interpolateObject",(function(){return wn})),n.d(e,"interpolateRound",(function(){return cp})),n.d(e,"interpolateString",(function(){return Sn})),n.d(e,"interpolateTransformCss",(function(){return fr})),n.d(e,"interpolateTransformSvg",(function(){return hr})),n.d(e,"interpolateZoom",(function(){return hp})),n.d(e,"interpolateRgb",(function(){return hn})),n.d(e,"interpolateRgbBasis",(function(){return pn})),n.d(e,"interpolateRgbBasisClosed",(function(){return yn})),n.d(e,"interpolateHsl",(function(){return pp})),n.d(e,"interpolateHslLong",(function(){return yp})),n.d(e,"interpolateLab",(function(){return gp})),n.d(e,"interpolateHcl",(function(){return vp})),n.d(e,"interpolateHclLong",(function(){return bp})),n.d(e,"interpolateCubehelix",(function(){return _p})),n.d(e,"interpolateCubehelixLong",(function(){return wp})),n.d(e,"piecewise",(function(){return kp})),n.d(e,"quantize",(function(){return Ep})),n.d(e,"path",(function(){return Ui})),n.d(e,"polygonArea",(function(){return Ap})),n.d(e,"polygonCentroid",(function(){return Tp})),n.d(e,"polygonHull",(function(){return Op})),n.d(e,"polygonContains",(function(){return Np})),n.d(e,"polygonLength",(function(){return Cp})),n.d(e,"quadtree",(function(){return Es})),n.d(e,"randomUniform",(function(){return Lp})),n.d(e,"randomNormal",(function(){return Fp})),n.d(e,"randomLogNormal",(function(){return Ip})),n.d(e,"randomBates",(function(){return Rp})),n.d(e,"randomIrwinHall",(function(){return Pp})),n.d(e,"randomExponential",(function(){return Bp})),n.d(e,"scaleBand",(function(){return Hp})),n.d(e,"scalePoint",(function(){return qp})),n.d(e,"scaleIdentity",(function(){return uy})),n.d(e,"scaleLinear",(function(){return sy})),n.d(e,"scaleLog",(function(){return my})),n.d(e,"scaleSymlog",(function(){return _y})),n.d(e,"scaleOrdinal",(function(){return Vp})),n.d(e,"scaleImplicit",(function(){return Gp})),n.d(e,"scalePow",(function(){return Ty})),n.d(e,"scaleSqrt",(function(){return Sy})),n.d(e,"scaleQuantile",(function(){return My})),n.d(e,"scaleQuantize",(function(){return Oy})),n.d(e,"scaleThreshold",(function(){return Ny})),n.d(e,"scaleTime",(function(){return sv})),n.d(e,"scaleUtc",(function(){return mv})),n.d(e,"scaleSequential",(function(){return xv})),n.d(e,"scaleSequentialLog",(function(){return _v})),n.d(e,"scaleSequentialPow",(function(){return kv})),n.d(e,"scaleSequentialSqrt",(function(){return Ev})),n.d(e,"scaleSequentialSymlog",(function(){return wv})),n.d(e,"scaleSequentialQuantile",(function(){return Av})),n.d(e,"scaleDiverging",(function(){return Sv})),n.d(e,"scaleDivergingLog",(function(){return Mv})),n.d(e,"scaleDivergingPow",(function(){return Nv})),n.d(e,"scaleDivergingSqrt",(function(){return Cv})),n.d(e,"scaleDivergingSymlog",(function(){return Ov})),n.d(e,"tickFormat",(function(){return ay})),n.d(e,"schemeCategory10",(function(){return Lv})),n.d(e,"schemeAccent",(function(){return Fv})),n.d(e,"schemeDark2",(function(){return Iv})),n.d(e,"schemePaired",(function(){return Pv})),n.d(e,"schemePastel1",(function(){return Rv})),n.d(e,"schemePastel2",(function(){return Bv})),n.d(e,"schemeSet1",(function(){return jv})),n.d(e,"schemeSet2",(function(){return Yv})),n.d(e,"schemeSet3",(function(){return zv})),n.d(e,"schemeTableau10",(function(){return Uv})),n.d(e,"interpolateBrBG",(function(){return Vv})),n.d(e,"schemeBrBG",(function(){return Gv})),n.d(e,"interpolatePRGn",(function(){return Wv})),n.d(e,"schemePRGn",(function(){return Hv})),n.d(e,"interpolatePiYG",(function(){return Xv})),n.d(e,"schemePiYG",(function(){return qv})),n.d(e,"interpolatePuOr",(function(){return Jv})),n.d(e,"schemePuOr",(function(){return Zv})),n.d(e,"interpolateRdBu",(function(){return Kv})),n.d(e,"schemeRdBu",(function(){return Qv})),n.d(e,"interpolateRdGy",(function(){return eb})),n.d(e,"schemeRdGy",(function(){return tb})),n.d(e,"interpolateRdYlBu",(function(){return rb})),n.d(e,"schemeRdYlBu",(function(){return nb})),n.d(e,"interpolateRdYlGn",(function(){return ab})),n.d(e,"schemeRdYlGn",(function(){return ib})),n.d(e,"interpolateSpectral",(function(){return sb})),n.d(e,"schemeSpectral",(function(){return ob})),n.d(e,"interpolateBuGn",(function(){return cb})),n.d(e,"schemeBuGn",(function(){return ub})),n.d(e,"interpolateBuPu",(function(){return fb})),n.d(e,"schemeBuPu",(function(){return lb})),n.d(e,"interpolateGnBu",(function(){return db})),n.d(e,"schemeGnBu",(function(){return hb})),n.d(e,"interpolateOrRd",(function(){return yb})),n.d(e,"schemeOrRd",(function(){return pb})),n.d(e,"interpolatePuBuGn",(function(){return mb})),n.d(e,"schemePuBuGn",(function(){return gb})),n.d(e,"interpolatePuBu",(function(){return bb})),n.d(e,"schemePuBu",(function(){return vb})),n.d(e,"interpolatePuRd",(function(){return _b})),n.d(e,"schemePuRd",(function(){return xb})),n.d(e,"interpolateRdPu",(function(){return kb})),n.d(e,"schemeRdPu",(function(){return wb})),n.d(e,"interpolateYlGnBu",(function(){return Ab})),n.d(e,"schemeYlGnBu",(function(){return Eb})),n.d(e,"interpolateYlGn",(function(){return Sb})),n.d(e,"schemeYlGn",(function(){return Tb})),n.d(e,"interpolateYlOrBr",(function(){return Ob})),n.d(e,"schemeYlOrBr",(function(){return Mb})),n.d(e,"interpolateYlOrRd",(function(){return Cb})),n.d(e,"schemeYlOrRd",(function(){return Nb})),n.d(e,"interpolateBlues",(function(){return Lb})),n.d(e,"schemeBlues",(function(){return Db})),n.d(e,"interpolateGreens",(function(){return Ib})),n.d(e,"schemeGreens",(function(){return Fb})),n.d(e,"interpolateGreys",(function(){return Rb})),n.d(e,"schemeGreys",(function(){return Pb})),n.d(e,"interpolatePurples",(function(){return jb})),n.d(e,"schemePurples",(function(){return Bb})),n.d(e,"interpolateReds",(function(){return zb})),n.d(e,"schemeReds",(function(){return Yb})),n.d(e,"interpolateOranges",(function(){return $b})),n.d(e,"schemeOranges",(function(){return Ub})),n.d(e,"interpolateCividis",(function(){return Gb})),n.d(e,"interpolateCubehelixDefault",(function(){return Vb})),n.d(e,"interpolateRainbow",(function(){return Xb})),n.d(e,"interpolateWarm",(function(){return Hb})),n.d(e,"interpolateCool",(function(){return Wb})),n.d(e,"interpolateSinebow",(function(){return Kb})),n.d(e,"interpolateTurbo",(function(){return tx})),n.d(e,"interpolateViridis",(function(){return nx})),n.d(e,"interpolateMagma",(function(){return rx})),n.d(e,"interpolateInferno",(function(){return ix})),n.d(e,"interpolatePlasma",(function(){return ax})),n.d(e,"create",(function(){return ox})),n.d(e,"creator",(function(){return ne})),n.d(e,"local",(function(){return ux})),n.d(e,"matcher",(function(){return yt})),n.d(e,"mouse",(function(){return Dn})),n.d(e,"namespace",(function(){return kt})),n.d(e,"namespaces",(function(){return wt})),n.d(e,"clientPoint",(function(){return Nn})),n.d(e,"select",(function(){return we})),n.d(e,"selectAll",(function(){return lx})),n.d(e,"selection",(function(){return _e})),n.d(e,"selector",(function(){return ht})),n.d(e,"selectorAll",(function(){return pt})),n.d(e,"style",(function(){return Ft})),n.d(e,"touch",(function(){return Cn})),n.d(e,"touches",(function(){return fx})),n.d(e,"window",(function(){return Nt})),n.d(e,"event",(function(){return ue})),n.d(e,"customEvent",(function(){return pe})),n.d(e,"arc",(function(){return Dx})),n.d(e,"area",(function(){return Bx})),n.d(e,"line",(function(){return Rx})),n.d(e,"pie",(function(){return zx})),n.d(e,"areaRadial",(function(){return Wx})),n.d(e,"radialArea",(function(){return Wx})),n.d(e,"lineRadial",(function(){return Hx})),n.d(e,"radialLine",(function(){return Hx})),n.d(e,"pointRadial",(function(){return qx})),n.d(e,"linkHorizontal",(function(){return n_})),n.d(e,"linkVertical",(function(){return r_})),n.d(e,"linkRadial",(function(){return i_})),n.d(e,"symbol",(function(){return w_})),n.d(e,"symbols",(function(){return __})),n.d(e,"symbolCircle",(function(){return a_})),n.d(e,"symbolCross",(function(){return o_})),n.d(e,"symbolDiamond",(function(){return c_})),n.d(e,"symbolSquare",(function(){return p_})),n.d(e,"symbolStar",(function(){return d_})),n.d(e,"symbolTriangle",(function(){return g_})),n.d(e,"symbolWye",(function(){return x_})),n.d(e,"curveBasisClosed",(function(){return M_})),n.d(e,"curveBasisOpen",(function(){return N_})),n.d(e,"curveBasis",(function(){return T_})),n.d(e,"curveBundle",(function(){return D_})),n.d(e,"curveCardinalClosed",(function(){return R_})),n.d(e,"curveCardinalOpen",(function(){return j_})),n.d(e,"curveCardinal",(function(){return I_})),n.d(e,"curveCatmullRomClosed",(function(){return G_})),n.d(e,"curveCatmullRomOpen",(function(){return H_})),n.d(e,"curveCatmullRom",(function(){return U_})),n.d(e,"curveLinearClosed",(function(){return q_})),n.d(e,"curveLinear",(function(){return Fx})),n.d(e,"curveMonotoneX",(function(){return nw})),n.d(e,"curveMonotoneY",(function(){return rw})),n.d(e,"curveNatural",(function(){return ow})),n.d(e,"curveStep",(function(){return uw})),n.d(e,"curveStepAfter",(function(){return lw})),n.d(e,"curveStepBefore",(function(){return cw})),n.d(e,"stack",(function(){return pw})),n.d(e,"stackOffsetExpand",(function(){return yw})),n.d(e,"stackOffsetDiverging",(function(){return gw})),n.d(e,"stackOffsetNone",(function(){return fw})),n.d(e,"stackOffsetSilhouette",(function(){return mw})),n.d(e,"stackOffsetWiggle",(function(){return vw})),n.d(e,"stackOrderAppearance",(function(){return bw})),n.d(e,"stackOrderAscending",(function(){return _w})),n.d(e,"stackOrderDescending",(function(){return kw})),n.d(e,"stackOrderInsideOut",(function(){return Ew})),n.d(e,"stackOrderNone",(function(){return hw})),n.d(e,"stackOrderReverse",(function(){return Aw})),n.d(e,"timeInterval",(function(){return Ly})),n.d(e,"timeMillisecond",(function(){return pg})),n.d(e,"timeMilliseconds",(function(){return yg})),n.d(e,"utcMillisecond",(function(){return pg})),n.d(e,"utcMilliseconds",(function(){return yg})),n.d(e,"timeSecond",(function(){return fg})),n.d(e,"timeSeconds",(function(){return hg})),n.d(e,"utcSecond",(function(){return fg})),n.d(e,"utcSeconds",(function(){return hg})),n.d(e,"timeMinute",(function(){return ug})),n.d(e,"timeMinutes",(function(){return cg})),n.d(e,"timeHour",(function(){return ag})),n.d(e,"timeHours",(function(){return og})),n.d(e,"timeDay",(function(){return ng})),n.d(e,"timeDays",(function(){return rg})),n.d(e,"timeWeek",(function(){return zy})),n.d(e,"timeWeeks",(function(){return qy})),n.d(e,"timeSunday",(function(){return zy})),n.d(e,"timeSundays",(function(){return qy})),n.d(e,"timeMonday",(function(){return Uy})),n.d(e,"timeMondays",(function(){return Xy})),n.d(e,"timeTuesday",(function(){return $y})),n.d(e,"timeTuesdays",(function(){return Zy})),n.d(e,"timeWednesday",(function(){return Gy})),n.d(e,"timeWednesdays",(function(){return Jy})),n.d(e,"timeThursday",(function(){return Vy})),n.d(e,"timeThursdays",(function(){return Qy})),n.d(e,"timeFriday",(function(){return Hy})),n.d(e,"timeFridays",(function(){return Ky})),n.d(e,"timeSaturday",(function(){return Wy})),n.d(e,"timeSaturdays",(function(){return tg})),n.d(e,"timeMonth",(function(){return By})),n.d(e,"timeMonths",(function(){return jy})),n.d(e,"timeYear",(function(){return Iy})),n.d(e,"timeYears",(function(){return Py})),n.d(e,"utcMinute",(function(){return yv})),n.d(e,"utcMinutes",(function(){return gv})),n.d(e,"utcHour",(function(){return hv})),n.d(e,"utcHours",(function(){return dv})),n.d(e,"utcDay",(function(){return Dg})),n.d(e,"utcDays",(function(){return Lg})),n.d(e,"utcWeek",(function(){return mg})),n.d(e,"utcWeeks",(function(){return Eg})),n.d(e,"utcSunday",(function(){return mg})),n.d(e,"utcSundays",(function(){return Eg})),n.d(e,"utcMonday",(function(){return vg})),n.d(e,"utcMondays",(function(){return Ag})),n.d(e,"utcTuesday",(function(){return bg})),n.d(e,"utcTuesdays",(function(){return Tg})),n.d(e,"utcWednesday",(function(){return xg})),n.d(e,"utcWednesdays",(function(){return Sg})),n.d(e,"utcThursday",(function(){return _g})),n.d(e,"utcThursdays",(function(){return Mg})),n.d(e,"utcFriday",(function(){return wg})),n.d(e,"utcFridays",(function(){return Og})),n.d(e,"utcSaturday",(function(){return kg})),n.d(e,"utcSaturdays",(function(){return Ng})),n.d(e,"utcMonth",(function(){return cv})),n.d(e,"utcMonths",(function(){return lv})),n.d(e,"utcYear",(function(){return Ig})),n.d(e,"utcYears",(function(){return Pg})),n.d(e,"timeFormatDefaultLocale",(function(){return rv})),n.d(e,"timeFormat",(function(){return Ug})),n.d(e,"timeParse",(function(){return $g})),n.d(e,"utcFormat",(function(){return Gg})),n.d(e,"utcParse",(function(){return Vg})),n.d(e,"timeFormatLocale",(function(){return Yg})),n.d(e,"isoFormat",(function(){return Tw})),n.d(e,"isoParse",(function(){return Sw})),n.d(e,"now",(function(){return zn})),n.d(e,"timer",(function(){return Gn})),n.d(e,"timerFlush",(function(){return Vn})),n.d(e,"timeout",(function(){return Xn})),n.d(e,"interval",(function(){return Mw})),n.d(e,"transition",(function(){return zr})),n.d(e,"active",(function(){return Zr})),n.d(e,"interrupt",(function(){return or})),n.d(e,"voronoi",(function(){return dk})),n.d(e,"zoom",(function(){return Sk})),n.d(e,"zoomTransform",(function(){return vk})),n.d(e,"zoomIdentity",(function(){return mk}))},function(t,e,n){(function(t,r){var i=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,2],n=[1,3],r=[1,4],i=[2,4],a=[1,9],o=[1,11],s=[1,12],u=[1,14],c=[1,15],l=[1,16],f=[1,18],h=[1,19],d=[1,20],p=[1,21],y=[1,22],g=[1,23],m=[1,25],v=[1,26],b=[1,4,5,10,15,16,17,19,21,22,23,24,25,27,29,30,31,42],x=[1,34],_=[4,5,10,15,16,17,19,21,22,23,24,25,27,31,42],w=[4,5,10,15,16,17,19,21,22,23,24,25,27,30,31,42],k=[4,5,10,15,16,17,19,21,22,23,24,25,27,29,31,42],E=[40,41,42],A={trace:function(){},yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,participant:10,actor:11,AS:12,restOfLine:13,signal:14,autonumber:15,activate:16,deactivate:17,note_statement:18,title:19,text2:20,loop:21,end:22,rect:23,opt:24,alt:25,else_sections:26,par:27,par_sections:28,and:29,else:30,note:31,placement:32,over:33,actor_pair:34,spaceList:35,",":36,left_of:37,right_of:38,signaltype:39,"+":40,"-":41,ACTOR:42,SOLID_OPEN_ARROW:43,DOTTED_OPEN_ARROW:44,SOLID_ARROW:45,DOTTED_ARROW:46,SOLID_CROSS:47,DOTTED_CROSS:48,TXT:49,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",10:"participant",12:"AS",13:"restOfLine",15:"autonumber",16:"activate",17:"deactivate",19:"title",21:"loop",22:"end",23:"rect",24:"opt",25:"alt",27:"par",29:"and",30:"else",31:"note",33:"over",36:",",37:"left_of",38:"right_of",40:"+",41:"-",42:"ACTOR",43:"SOLID_OPEN_ARROW",44:"DOTTED_OPEN_ARROW",45:"SOLID_ARROW",46:"DOTTED_ARROW",47:"SOLID_CROSS",48:"DOTTED_CROSS",49:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,5],[9,3],[9,2],[9,1],[9,3],[9,3],[9,2],[9,3],[9,4],[9,4],[9,4],[9,4],[9,4],[28,1],[28,4],[26,1],[26,4],[18,4],[18,4],[35,2],[35,1],[34,3],[34,1],[32,1],[32,1],[14,5],[14,5],[14,4],[11,1],[39,1],[39,1],[39,1],[39,1],[39,1],[39,1],[20,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 3:return r.apply(a[s]),a[s];case 4:this.$=[];break;case 5:a[s-1].push(a[s]),this.$=a[s-1];break;case 6:case 7:this.$=a[s];break;case 8:this.$=[];break;case 9:a[s-3].description=a[s-1],this.$=a[s-3];break;case 10:this.$=a[s-1];break;case 12:r.enableSequenceNumbers();break;case 13:this.$={type:"activeStart",signalType:r.LINETYPE.ACTIVE_START,actor:a[s-1]};break;case 14:this.$={type:"activeEnd",signalType:r.LINETYPE.ACTIVE_END,actor:a[s-1]};break;case 16:this.$=[{type:"setTitle",text:a[s-1]}];break;case 17:a[s-1].unshift({type:"loopStart",loopText:a[s-2],signalType:r.LINETYPE.LOOP_START}),a[s-1].push({type:"loopEnd",loopText:a[s-2],signalType:r.LINETYPE.LOOP_END}),this.$=a[s-1];break;case 18:a[s-1].unshift({type:"rectStart",color:a[s-2],signalType:r.LINETYPE.RECT_START}),a[s-1].push({type:"rectEnd",color:a[s-2],signalType:r.LINETYPE.RECT_END}),this.$=a[s-1];break;case 19:a[s-1].unshift({type:"optStart",optText:a[s-2],signalType:r.LINETYPE.OPT_START}),a[s-1].push({type:"optEnd",optText:a[s-2],signalType:r.LINETYPE.OPT_END}),this.$=a[s-1];break;case 20:a[s-1].unshift({type:"altStart",altText:a[s-2],signalType:r.LINETYPE.ALT_START}),a[s-1].push({type:"altEnd",signalType:r.LINETYPE.ALT_END}),this.$=a[s-1];break;case 21:a[s-1].unshift({type:"parStart",parText:a[s-2],signalType:r.LINETYPE.PAR_START}),a[s-1].push({type:"parEnd",signalType:r.LINETYPE.PAR_END}),this.$=a[s-1];break;case 23:this.$=a[s-3].concat([{type:"and",parText:a[s-1],signalType:r.LINETYPE.PAR_AND},a[s]]);break;case 25:this.$=a[s-3].concat([{type:"else",altText:a[s-1],signalType:r.LINETYPE.ALT_ELSE},a[s]]);break;case 26:this.$=[a[s-1],{type:"addNote",placement:a[s-2],actor:a[s-1].actor,text:a[s]}];break;case 27:a[s-2]=[].concat(a[s-1],a[s-1]).slice(0,2),a[s-2][0]=a[s-2][0].actor,a[s-2][1]=a[s-2][1].actor,this.$=[a[s-1],{type:"addNote",placement:r.PLACEMENT.OVER,actor:a[s-2].slice(0,2),text:a[s]}];break;case 30:this.$=[a[s-2],a[s]];break;case 31:this.$=a[s];break;case 32:this.$=r.PLACEMENT.LEFTOF;break;case 33:this.$=r.PLACEMENT.RIGHTOF;break;case 34:this.$=[a[s-4],a[s-1],{type:"addMessage",from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s]},{type:"activeStart",signalType:r.LINETYPE.ACTIVE_START,actor:a[s-1]}];break;case 35:this.$=[a[s-4],a[s-1],{type:"addMessage",from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s]},{type:"activeEnd",signalType:r.LINETYPE.ACTIVE_END,actor:a[s-4]}];break;case 36:this.$=[a[s-3],a[s-1],{type:"addMessage",from:a[s-3].actor,to:a[s-1].actor,signalType:a[s-2],msg:a[s]}];break;case 37:this.$={type:"addActor",actor:a[s]};break;case 38:this.$=r.LINETYPE.SOLID_OPEN;break;case 39:this.$=r.LINETYPE.DOTTED_OPEN;break;case 40:this.$=r.LINETYPE.SOLID;break;case 41:this.$=r.LINETYPE.DOTTED;break;case 42:this.$=r.LINETYPE.SOLID_CROSS;break;case 43:this.$=r.LINETYPE.DOTTED_CROSS;break;case 44:this.$=a[s].substring(1).trim().replace(/\\n/gm,"\n")}},table:[{3:1,4:e,5:n,6:r},{1:[3]},{3:5,4:e,5:n,6:r},{3:6,4:e,5:n,6:r},t([1,4,5,10,15,16,17,19,21,23,24,25,27,31,42],i,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:a,5:o,8:8,9:10,10:s,11:24,14:13,15:u,16:c,17:l,18:17,19:f,21:h,23:d,24:p,25:y,27:g,31:m,42:v},t(b,[2,5]),{9:27,10:s,11:24,14:13,15:u,16:c,17:l,18:17,19:f,21:h,23:d,24:p,25:y,27:g,31:m,42:v},t(b,[2,7]),t(b,[2,8]),{11:28,42:v},{5:[1,29]},t(b,[2,12]),{11:30,42:v},{11:31,42:v},{5:[1,32]},{20:33,49:x},{13:[1,35]},{13:[1,36]},{13:[1,37]},{13:[1,38]},{13:[1,39]},{39:40,43:[1,41],44:[1,42],45:[1,43],46:[1,44],47:[1,45],48:[1,46]},{32:47,33:[1,48],37:[1,49],38:[1,50]},t([5,12,36,43,44,45,46,47,48,49],[2,37]),t(b,[2,6]),{5:[1,52],12:[1,51]},t(b,[2,11]),{5:[1,53]},{5:[1,54]},t(b,[2,15]),{5:[1,55]},{5:[2,44]},t(_,i,{7:56}),t(_,i,{7:57}),t(_,i,{7:58}),t(w,i,{26:59,7:60}),t(k,i,{28:61,7:62}),{11:65,40:[1,63],41:[1,64],42:v},t(E,[2,38]),t(E,[2,39]),t(E,[2,40]),t(E,[2,41]),t(E,[2,42]),t(E,[2,43]),{11:66,42:v},{11:68,34:67,42:v},{42:[2,32]},{42:[2,33]},{13:[1,69]},t(b,[2,10]),t(b,[2,13]),t(b,[2,14]),t(b,[2,16]),{4:a,5:o,8:8,9:10,10:s,11:24,14:13,15:u,16:c,17:l,18:17,19:f,21:h,22:[1,70],23:d,24:p,25:y,27:g,31:m,42:v},{4:a,5:o,8:8,9:10,10:s,11:24,14:13,15:u,16:c,17:l,18:17,19:f,21:h,22:[1,71],23:d,24:p,25:y,27:g,31:m,42:v},{4:a,5:o,8:8,9:10,10:s,11:24,14:13,15:u,16:c,17:l,18:17,19:f,21:h,22:[1,72],23:d,24:p,25:y,27:g,31:m,42:v},{22:[1,73]},{4:a,5:o,8:8,9:10,10:s,11:24,14:13,15:u,16:c,17:l,18:17,19:f,21:h,22:[2,24],23:d,24:p,25:y,27:g,30:[1,74],31:m,42:v},{22:[1,75]},{4:a,5:o,8:8,9:10,10:s,11:24,14:13,15:u,16:c,17:l,18:17,19:f,21:h,22:[2,22],23:d,24:p,25:y,27:g,29:[1,76],31:m,42:v},{11:77,42:v},{11:78,42:v},{20:79,49:x},{20:80,49:x},{20:81,49:x},{36:[1,82],49:[2,31]},{5:[1,83]},t(b,[2,17]),t(b,[2,18]),t(b,[2,19]),t(b,[2,20]),{13:[1,84]},t(b,[2,21]),{13:[1,85]},{20:86,49:x},{20:87,49:x},{5:[2,36]},{5:[2,26]},{5:[2,27]},{11:88,42:v},t(b,[2,9]),t(w,i,{7:60,26:89}),t(k,i,{7:62,28:90}),{5:[2,34]},{5:[2,35]},{49:[2,30]},{22:[2,25]},{22:[2,23]}],defaultActions:{5:[2,1],6:[2,2],34:[2,44],49:[2,32],50:[2,33],79:[2,36],80:[2,26],81:[2,27],86:[2,34],87:[2,35],88:[2,30],89:[2,25],90:[2,23]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",u=0,c=0,l=0,f=2,h=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),y={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(y.yy[g]=this.yy[g]);p.setInput(t,y.yy),y.yy.lexer=p,y.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||h)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var x,_,w,k,E,A,T,S,M,O={};;){if(w=n[n.length-1],this.defaultActions[w]?k=this.defaultActions[w]:(null==x&&(x=b()),k=o[w]&&o[w][x]),void 0===k||!k.length||!k[0]){var N="";for(A in M=[],o[w])this.terminals_[A]&&A>f&&M.push("'"+this.terminals_[A]+"'");N=p.showPosition?"Parse error on line "+(u+1)+":\n"+p.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(u+1)+": Unexpected "+(x==h?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(N,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:m,expected:M})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),i.push(p.yytext),a.push(p.yylloc),n.push(k[1]),x=null,_?(x=_,_=null):(c=p.yyleng,s=p.yytext,u=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(T=this.productions_[k[1]][1],O.$=i[i.length-T],O._$={first_line:a[a.length-(T||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(T||1)].first_column,last_column:a[a.length-1].last_column},v&&(O._$.range=[a[a.length-(T||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(O,[s,c,u,y.yy,k[1],i,a].concat(d))))return E;T&&(n=n.slice(0,-1*T*2),i=i.slice(0,-1*T),a=a.slice(0,-1*T)),n.push(this.productions_[k[1]][0]),i.push(O.$),a.push(O._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}},T={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return 5;case 1:case 2:case 3:case 4:break;case 5:return this.begin("ID"),10;case 6:return e.yytext=e.yytext.trim(),this.begin("ALIAS"),42;case 7:return this.popState(),this.popState(),this.begin("LINE"),12;case 8:return this.popState(),this.popState(),5;case 9:return this.begin("LINE"),21;case 10:return this.begin("LINE"),23;case 11:return this.begin("LINE"),24;case 12:return this.begin("LINE"),25;case 13:return this.begin("LINE"),30;case 14:return this.begin("LINE"),27;case 15:return this.begin("LINE"),29;case 16:return this.popState(),13;case 17:return 22;case 18:return 37;case 19:return 38;case 20:return 33;case 21:return 31;case 22:return this.begin("ID"),16;case 23:return this.begin("ID"),17;case 24:return 19;case 25:return 6;case 26:return 15;case 27:return 36;case 28:return 5;case 29:return e.yytext=e.yytext.trim(),42;case 30:return 45;case 31:return 46;case 32:return 43;case 33:return 44;case 34:return 47;case 35:return 48;case 36:return 49;case 37:return 40;case 38:return 41;case 39:return 5;case 40:return"INVALID"}},rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:participant\b)/i,/^(?:[^\->:\n,;]+?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:and\b)/i,/^(?:[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\b)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\+\->:\n,;]+)/i,/^(?:->>)/i,/^(?:-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?::[^#\n;]+)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[2,3,16],inclusive:!1},ALIAS:{rules:[2,3,7,8],inclusive:!1},ID:{rules:[2,3,6],inclusive:!1},INITIAL:{rules:[0,1,3,4,5,9,10,11,12,13,14,15,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40],inclusive:!0}}};function S(){this.yy={}}return A.lexer=T,S.prototype=A,A.Parser=S,new S}();e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(r){r[1]||(console.log("Usage: "+r[0]+" FILE"),t.exit(1));var i=n(14).readFileSync(n(15).normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n(11),n(6)(t))},function(t,e,n){var r=n(168);t.exports={Graph:r.Graph,json:n(271),alg:n(272),version:r.version}},function(t,e,n){var r;try{r={cloneDeep:n(283),constant:n(78),defaults:n(137),each:n(79),filter:n(111),find:n(284),flatten:n(139),forEach:n(109),forIn:n(289),has:n(85),isUndefined:n(122),last:n(290),map:n(123),mapValues:n(291),max:n(292),merge:n(294),min:n(299),minBy:n(300),now:n(301),pick:n(144),range:n(145),reduce:n(125),sortBy:n(308),uniqueId:n(146),values:n(130),zipObject:n(313)}}catch(t){}r||(r=window._),t.exports=r},function(t,e){var n=Array.isArray;t.exports=n},function(t,e,n){
/**
* @license
* Copyright (c) 2012-2013 Chris Pettitt
@@ -28,7 +21,7 @@ var r=n(813),i=n(814),o=n(408);function a(){return s.TYPED_ARRAY_SUPPORT?2147483
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-t.exports={graphlib:n(566),dagre:n(386),intersect:n(736),render:n(738),util:n(31),version:n(750)}},function(t,e,n){"use strict";var r=n(11);n.d(e,"a",(function(){return r.e})),n.d(e,"h",(function(){return r.g})),n.d(e,"e",(function(){return r.f}));var i=n(121);n.d(e,"f",(function(){return i.a})),n.d(e,"d",(function(){return i.c})),n.d(e,"g",(function(){return i.d})),n.d(e,"c",(function(){return i.b}));var o=n(211);n.d(e,"b",(function(){return o.a}))},function(t,e,n){"use strict";var r=n(7),i=n(37).Graph;function o(t,e,n,i){var o;do{o=r.uniqueId(i)}while(t.hasNode(o));return n.dummy=e,t.setNode(o,n),o}function a(t){return r.max(r.map(t.nodes(),(function(e){var n=t.node(e).rank;if(!r.isUndefined(n))return n})))}t.exports={addDummyNode:o,simplify:function(t){var e=(new i).setGraph(t.graph());return r.forEach(t.nodes(),(function(n){e.setNode(n,t.node(n))})),r.forEach(t.edges(),(function(n){var r=e.edge(n.v,n.w)||{weight:0,minlen:1},i=t.edge(n);e.setEdge(n.v,n.w,{weight:r.weight+i.weight,minlen:Math.max(r.minlen,i.minlen)})})),e},asNonCompoundGraph:function(t){var e=new i({multigraph:t.isMultigraph()}).setGraph(t.graph());return r.forEach(t.nodes(),(function(n){t.children(n).length||e.setNode(n,t.node(n))})),r.forEach(t.edges(),(function(n){e.setEdge(n,t.edge(n))})),e},successorWeights:function(t){var e=r.map(t.nodes(),(function(e){var n={};return r.forEach(t.outEdges(e),(function(e){n[e.w]=(n[e.w]||0)+t.edge(e).weight})),n}));return r.zipObject(t.nodes(),e)},predecessorWeights:function(t){var e=r.map(t.nodes(),(function(e){var n={};return r.forEach(t.inEdges(e),(function(e){n[e.v]=(n[e.v]||0)+t.edge(e).weight})),n}));return r.zipObject(t.nodes(),e)},intersectRect:function(t,e){var n,r,i=t.x,o=t.y,a=e.x-i,u=e.y-o,s=t.width/2,c=t.height/2;if(!a&&!u)throw new Error("Not possible to find intersection inside of the rectangle");Math.abs(u)*s>Math.abs(a)*c?(u<0&&(c=-c),n=c*a/u,r=c):(a<0&&(s=-s),n=s,r=s*u/a);return{x:i+n,y:o+r}},buildLayerMatrix:function(t){var e=r.map(r.range(a(t)+1),(function(){return[]}));return r.forEach(t.nodes(),(function(n){var i=t.node(n),o=i.rank;r.isUndefined(o)||(e[o][i.order]=n)})),e},normalizeRanks:function(t){var e=r.min(r.map(t.nodes(),(function(e){return t.node(e).rank})));r.forEach(t.nodes(),(function(n){var i=t.node(n);r.has(i,"rank")&&(i.rank-=e)}))},removeEmptyRanks:function(t){var e=r.min(r.map(t.nodes(),(function(e){return t.node(e).rank}))),n=[];r.forEach(t.nodes(),(function(r){var i=t.node(r).rank-e;n[i]||(n[i]=[]),n[i].push(r)}));var i=0,o=t.graph().nodeRankFactor;r.forEach(n,(function(e,n){r.isUndefined(e)&&n%o!=0?--i:i&&r.forEach(e,(function(e){t.node(e).rank+=i}))}))},addBorderNode:function(t,e,n,r){var i={width:0,height:0};arguments.length>=4&&(i.rank=n,i.order=r);return o(t,"border",i,e)},maxRank:a,partition:function(t,e){var n={lhs:[],rhs:[]};return r.forEach(t,(function(t){e(t)?n.lhs.push(t):n.rhs.push(t)})),n},time:function(t,e){var n=r.now();try{return e()}finally{console.log(t+" time: "+(r.now()-n)+"ms")}},notime:function(t,e){return e()}}},function(t,e,n){"use strict";var r=n(8),i=n(38).Graph;function o(t,e,n,i){var o;do{o=r.uniqueId(i)}while(t.hasNode(o));return n.dummy=e,t.setNode(o,n),o}function a(t){return r.max(r.map(t.nodes(),(function(e){var n=t.node(e).rank;if(!r.isUndefined(n))return n})))}t.exports={addDummyNode:o,simplify:function(t){var e=(new i).setGraph(t.graph());return r.forEach(t.nodes(),(function(n){e.setNode(n,t.node(n))})),r.forEach(t.edges(),(function(n){var r=e.edge(n.v,n.w)||{weight:0,minlen:1},i=t.edge(n);e.setEdge(n.v,n.w,{weight:r.weight+i.weight,minlen:Math.max(r.minlen,i.minlen)})})),e},asNonCompoundGraph:function(t){var e=new i({multigraph:t.isMultigraph()}).setGraph(t.graph());return r.forEach(t.nodes(),(function(n){t.children(n).length||e.setNode(n,t.node(n))})),r.forEach(t.edges(),(function(n){e.setEdge(n,t.edge(n))})),e},successorWeights:function(t){var e=r.map(t.nodes(),(function(e){var n={};return r.forEach(t.outEdges(e),(function(e){n[e.w]=(n[e.w]||0)+t.edge(e).weight})),n}));return r.zipObject(t.nodes(),e)},predecessorWeights:function(t){var e=r.map(t.nodes(),(function(e){var n={};return r.forEach(t.inEdges(e),(function(e){n[e.v]=(n[e.v]||0)+t.edge(e).weight})),n}));return r.zipObject(t.nodes(),e)},intersectRect:function(t,e){var n,r,i=t.x,o=t.y,a=e.x-i,u=e.y-o,s=t.width/2,c=t.height/2;if(!a&&!u)throw new Error("Not possible to find intersection inside of the rectangle");Math.abs(u)*s>Math.abs(a)*c?(u<0&&(c=-c),n=c*a/u,r=c):(a<0&&(s=-s),n=s,r=s*u/a);return{x:i+n,y:o+r}},buildLayerMatrix:function(t){var e=r.map(r.range(a(t)+1),(function(){return[]}));return r.forEach(t.nodes(),(function(n){var i=t.node(n),o=i.rank;r.isUndefined(o)||(e[o][i.order]=n)})),e},normalizeRanks:function(t){var e=r.min(r.map(t.nodes(),(function(e){return t.node(e).rank})));r.forEach(t.nodes(),(function(n){var i=t.node(n);r.has(i,"rank")&&(i.rank-=e)}))},removeEmptyRanks:function(t){var e=r.min(r.map(t.nodes(),(function(e){return t.node(e).rank}))),n=[];r.forEach(t.nodes(),(function(r){var i=t.node(r).rank-e;n[i]||(n[i]=[]),n[i].push(r)}));var i=0,o=t.graph().nodeRankFactor;r.forEach(n,(function(e,n){r.isUndefined(e)&&n%o!=0?--i:i&&r.forEach(e,(function(e){t.node(e).rank+=i}))}))},addBorderNode:function(t,e,n,r){var i={width:0,height:0};arguments.length>=4&&(i.rank=n,i.order=r);return o(t,"border",i,e)},maxRank:a,partition:function(t,e){var n={lhs:[],rhs:[]};return r.forEach(t,(function(t){e(t)?n.lhs.push(t):n.rhs.push(t)})),n},time:function(t,e){var n=r.now();try{return e()}finally{console.log(t+" time: "+(r.now()-n)+"ms")}},notime:function(t,e){return e()}}},function(t,e,n){"use strict";e.a=function(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}},function(t,e,n){"use strict";function r(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}n.d(e,"b",(function(){return r})),e.a=function(t,e,n){t.prototype=e.prototype=n,n.constructor=t}},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";var r=n(108),i=n(207),o=n(104),a=n(201),u=n(206),s=function(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}},c=n(6),f=function(t,e){var n=Object(c.c)(+t,+e);return function(t){var e=n(t);return e-360*Math.floor(e/360)}},l=n(23),h=n(69),d=n(208),p=n(290),g=n(202),y=n(281),b=n(291),v=n(82),m=n(11);function _(t){return function(e,n){var r=t((e=Object(m.f)(e)).h,(n=Object(m.f)(n)).h),i=Object(c.a)(e.s,n.s),o=Object(c.a)(e.l,n.l),a=Object(c.a)(e.opacity,n.opacity);return function(t){return e.h=r(t),e.s=i(t),e.l=o(t),e.opacity=a(t),e+""}}}var w=_(c.c),x=_(c.a),k=n(121);function E(t,e){var n=Object(c.a)((t=Object(k.a)(t)).l,(e=Object(k.a)(e)).l),r=Object(c.a)(t.a,e.a),i=Object(c.a)(t.b,e.b),o=Object(c.a)(t.opacity,e.opacity);return function(e){return t.l=n(e),t.a=r(e),t.b=i(e),t.opacity=o(e),t+""}}function A(t){return function(e,n){var r=t((e=Object(k.c)(e)).h,(n=Object(k.c)(n)).h),i=Object(c.a)(e.c,n.c),o=Object(c.a)(e.l,n.l),a=Object(c.a)(e.opacity,n.opacity);return function(t){return e.h=r(t),e.c=i(t),e.l=o(t),e.opacity=a(t),e+""}}}var S=A(c.c),M=A(c.a),T=n(217);function O(t,e){for(var n=0,r=e.length-1,i=e[0],o=new Array(r<0?0:r);n<r;)o[n]=t(i,i=e[++n]);return function(t){var e=Math.max(0,Math.min(r-1,Math.floor(t*=r)));return o[e](t-e)}}var D=function(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t(r/(e-1));return n};n.d(e,"a",(function(){return r.a})),n.d(e,"b",(function(){return i.a})),n.d(e,"c",(function(){return o.b})),n.d(e,"d",(function(){return a.a})),n.d(e,"g",(function(){return u.a})),n.d(e,"h",(function(){return s})),n.d(e,"m",(function(){return f})),n.d(e,"o",(function(){return l.a})),n.d(e,"p",(function(){return h.a})),n.d(e,"q",(function(){return d.a})),n.d(e,"u",(function(){return p.a})),n.d(e,"v",(function(){return g.a})),n.d(e,"w",(function(){return y.a})),n.d(e,"x",(function(){return y.b})),n.d(e,"y",(function(){return b.a})),n.d(e,"r",(function(){return v.a})),n.d(e,"s",(function(){return v.b})),n.d(e,"t",(function(){return v.c})),n.d(e,"k",(function(){return w})),n.d(e,"l",(function(){return x})),n.d(e,"n",(function(){return E})),n.d(e,"i",(function(){return S})),n.d(e,"j",(function(){return M})),n.d(e,"e",(function(){return T.b})),n.d(e,"f",(function(){return T.a})),n.d(e,"z",(function(){return O})),n.d(e,"A",(function(){return D}))},function(t,e,n){var r;try{r={clone:n(455),constant:n(234),each:n(311),filter:n(314),has:n(325),isArray:n(15),isEmpty:n(531),isFunction:n(124),isUndefined:n(326),keys:n(62),map:n(327),reduce:n(329),size:n(534),transform:n(540),union:n(541),values:n(334)}}catch(t){}r||(r=window._),t.exports=r},function(t,e){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},function(t,e,n){var r;try{r={clone:n(568),constant:n(251),each:n(252),filter:n(361),has:n(258),isArray:n(16),isEmpty:n(644),isFunction:n(93),isUndefined:n(372),keys:n(63),map:n(373),reduce:n(375),size:n(647),transform:n(653),union:n(654),values:n(380)}}catch(t){}r||(r=window._),t.exports=r},function(t,e){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},function(t,e,n){var r=n(99);t.exports={isSubgraph:function(t,e){return!!t.children(e).length},edgeToId:function(t){return o(t.v)+":"+o(t.w)+":"+o(t.name)},applyStyle:function(t,e){e&&t.attr("style",e)},applyClass:function(t,e,n){e&&t.attr("class",e).attr("class",n+" "+t.attr("class"))},applyTransition:function(t,e){var n=e.graph();if(r.isPlainObject(n)){var i=n.transition;if(r.isFunction(i))return i(t)}return t}};var i=/:/g;function o(t){return t?String(t).replace(i,"\\:"):""}},function(t,e){function n(t,e){if(!t)throw new Error(e||"Assertion failed")}t.exports=n,n.equal=function(t,e,n){if(t!=e)throw new Error(n||"Assertion failed: "+t+" != "+e)}},function(t,e,n){"use strict";var r=e,i=n(12),o=n(32),a=n(432);r.assert=o,r.toArray=a.toArray,r.zero2=a.zero2,r.toHex=a.toHex,r.encode=a.encode,r.getNAF=function(t,e,n){var r=new Array(Math.max(t.bitLength(),n)+1);r.fill(0);for(var i=1<<e+1,o=t.clone(),a=0;a<r.length;a++){var u,s=o.andln(i-1);o.isOdd()?(u=s>(i>>1)-1?(i>>1)-s:s,o.isubn(u)):u=0,r[a]=u,o.iushrn(1)}return r},r.getJSF=function(t,e){var n=[[],[]];t=t.clone(),e=e.clone();for(var r=0,i=0;t.cmpn(-r)>0||e.cmpn(-i)>0;){var o,a,u,s=t.andln(3)+r&3,c=e.andln(3)+i&3;if(3===s&&(s=-1),3===c&&(c=-1),0==(1&s))o=0;else o=3!==(u=t.andln(7)+r&7)&&5!==u||2!==c?s:-s;if(n[0].push(o),0==(1&c))a=0;else a=3!==(u=e.andln(7)+i&7)&&5!==u||2!==s?c:-c;n[1].push(a),2*r===o+1&&(r=1-r),2*i===a+1&&(i=1-i),t.iushrn(1),e.iushrn(1)}return n},r.cachedProperty=function(t,e,n){var r="_"+e;t.prototype[e]=function(){return void 0!==this[r]?this[r]:this[r]=n.call(this)}},r.parseBytes=function(t){return"string"==typeof t?r.toArray(t,"hex"):t},r.intFromLE=function(t){return new i(t,"hex","le")}},function(t,e,n){var r=n(454);t.exports={Graph:r.Graph,json:n(556),alg:n(557),version:r.version}},function(t,e,n){var r=n(294),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();t.exports=o},function(t,e,n){var r=n(342),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();t.exports=o},function(t,e,n){var r;try{r=n(340)}catch(t){}r||(r=window.graphlib),t.exports=r},function(t,e,n){var r;try{r=n(34)}catch(t){}r||(r=window.graphlib),t.exports=r},function(t,e,n){"use strict";function r(){}function i(t,e){var n=new r;if(t instanceof r)t.each((function(t,e){n.set(e,t)}));else if(Array.isArray(t)){var i,o=-1,a=t.length;if(null==e)for(;++o<a;)n.set(o,t[o]);else for(;++o<a;)n.set(e(i=t[o],o,t),i)}else if(t)for(var u in t)n.set(u,t[u]);return n}r.prototype=i.prototype={constructor:r,has:function(t){return"$"+t in this},get:function(t){return this["$"+t]},set:function(t,e){return this["$"+t]=e,this},remove:function(t){var e="$"+t;return e in this&&delete this[e]},clear:function(){for(var t in this)"$"===t[0]&&delete this[t]},keys:function(){var t=[];for(var e in this)"$"===e[0]&&t.push(e.slice(1));return t},values:function(){var t=[];for(var e in this)"$"===e[0]&&t.push(this[e]);return t},entries:function(){var t=[];for(var e in this)"$"===e[0]&&t.push({key:e.slice(1),value:this[e]});return t},size:function(){var t=0;for(var e in this)"$"===e[0]&&++t;return t},empty:function(){for(var t in this)if("$"===t[0])return!1;return!0},each:function(t){for(var e in this)"$"===e[0]&&t(this[e],e.slice(1),this)}};var o=i,a=function(){var t,e,n,r=[],i=[];function a(n,i,u,s){if(i>=r.length)return null!=t&&n.sort(t),null!=e?e(n):n;for(var c,f,l,h=-1,d=n.length,p=r[i++],g=o(),y=u();++h<d;)(l=g.get(c=p(f=n[h])+""))?l.push(f):g.set(c,[f]);return g.each((function(t,e){s(y,e,a(t,i,u,s))})),y}return n={object:function(t){return a(t,0,u,s)},map:function(t){return a(t,0,c,f)},entries:function(t){return function t(n,o){if(++o>r.length)return n;var a,u=i[o-1];return null!=e&&o>=r.length?a=n.entries():(a=[],n.each((function(e,n){a.push({key:n,values:t(e,o)})}))),null!=u?a.sort((function(t,e){return u(t.key,e.key)})):a}(a(t,0,c,f),0)},key:function(t){return r.push(t),n},sortKeys:function(t){return i[r.length-1]=t,n},sortValues:function(e){return t=e,n},rollup:function(t){return e=t,n}}};function u(){return{}}function s(t,e,n){t[e]=n}function c(){return o()}function f(t,e,n){t.set(e,n)}function l(){}var h=o.prototype;function d(t,e){var n=new l;if(t instanceof l)t.each((function(t){n.add(t)}));else if(t){var r=-1,i=t.length;if(null==e)for(;++r<i;)n.add(t[r]);else for(;++r<i;)n.add(e(t[r],r,t))}return n}l.prototype=d.prototype={constructor:l,has:h.has,add:function(t){return this["$"+(t+="")]=t,this},remove:h.remove,clear:h.clear,values:h.keys,size:h.size,empty:h.empty,each:h.each};var p=d,g=function(t){var e=[];for(var n in t)e.push(n);return e},y=function(t){var e=[];for(var n in t)e.push(t[n]);return e},b=function(t){var e=[];for(var n in t)e.push({key:n,value:t[n]});return e};n.d(e,"d",(function(){return a})),n.d(e,"e",(function(){return p})),n.d(e,"c",(function(){return o})),n.d(e,"b",(function(){return g})),n.d(e,"f",(function(){return y})),n.d(e,"a",(function(){return b}))},function(t,e,n){"use strict";var r=n(49),i=n(282),o=n(58),a=n(283),u=Object(i.a)("start","end","cancel","interrupt"),s=[],c=function(t,e,n,r,i,c){var f=t.__transition;if(f){if(n in f)return}else t.__transition={};!function(t,e,n){var r,i=t.__transition;function u(o){var f,l,h,d;if(1!==n.state)return c();for(f in i)if((d=i[f]).name===n.name){if(3===d.state)return Object(a.a)(u);4===d.state?(d.state=6,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete i[f]):+f<e&&(d.state=6,d.timer.stop(),d.on.call("cancel",t,t.__data__,d.index,d.group),delete i[f])}if(Object(a.a)((function(){3===n.state&&(n.state=4,n.timer.restart(s,n.delay,n.time),s(o))})),n.state=2,n.on.call("start",t,t.__data__,n.index,n.group),2===n.state){for(n.state=3,r=new Array(h=n.tween.length),f=0,l=-1;f<h;++f)(d=n.tween[f].value.call(t,t.__data__,n.index,n.group))&&(r[++l]=d);r.length=l+1}}function s(e){for(var i=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(c),n.state=5,1),o=-1,a=r.length;++o<a;)r[o].call(t,i);5===n.state&&(n.on.call("end",t,t.__data__,n.index,n.group),c())}function c(){for(var r in n.state=6,n.timer.stop(),delete i[e],i)return;delete t.__transition}i[e]=n,n.timer=Object(o.c)((function(t){n.state=1,n.timer.restart(u,n.delay,n.time),n.delay<=t&&u(t-n.delay)}),0,n.time)}(t,n,{name:e,index:r,group:i,on:u,tween:s,time:c.time,delay:c.delay,duration:c.duration,ease:c.ease,timer:null,state:0})};function f(t,e){var n=h(t,e);if(n.state>0)throw new Error("too late; already scheduled");return n}function l(t,e){var n=h(t,e);if(n.state>3)throw new Error("too late; already running");return n}function h(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}var d=function(t,e){var n,r,i,o=t.__transition,a=!0;if(o){for(i in e=null==e?null:e+"",o)(n=o[i]).name===e?(r=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete o[i]):a=!1;a&&delete t.__transition}},p=n(281),g=n(105);function y(t,e){var n,r;return function(){var i=l(this,t),o=i.tween;if(o!==n)for(var a=0,u=(r=n=o).length;a<u;++a)if(r[a].name===e){(r=r.slice()).splice(a,1);break}i.tween=r}}function b(t,e,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var o=l(this,t),a=o.tween;if(a!==r){i=(r=a).slice();for(var u={name:e,value:n},s=0,c=i.length;s<c;++s)if(i[s].name===e){i[s]=u;break}s===c&&i.push(u)}o.tween=i}}function v(t,e,n){var r=t._id;return t.each((function(){var t=l(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return h(t,r).value[e]}}var m=n(11),_=n(23),w=n(82),x=n(202),k=function(t,e){var n;return("number"==typeof e?_.a:e instanceof m.e?w.a:(n=Object(m.e)(e))?(e=n,w.a):x.a)(t,e)};function E(t){return function(){this.removeAttribute(t)}}function A(t){return function(){this.removeAttributeNS(t.space,t.local)}}function S(t,e,n){var r,i,o=n+"";return function(){var a=this.getAttribute(t);return a===o?null:a===r?i:i=e(r=a,n)}}function M(t,e,n){var r,i,o=n+"";return function(){var a=this.getAttributeNS(t.space,t.local);return a===o?null:a===r?i:i=e(r=a,n)}}function T(t,e,n){var r,i,o;return function(){var a,u,s=n(this);if(null!=s)return(a=this.getAttribute(t))===(u=s+"")?null:a===r&&u===i?o:(i=u,o=e(r=a,s));this.removeAttribute(t)}}function O(t,e,n){var r,i,o;return function(){var a,u,s=n(this);if(null!=s)return(a=this.getAttributeNS(t.space,t.local))===(u=s+"")?null:a===r&&u===i?o:(i=u,o=e(r=a,s));this.removeAttributeNS(t.space,t.local)}}function D(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function C(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function N(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&C(t,i)),n}return i._value=e,i}function I(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&D(t,i)),n}return i._value=e,i}function R(t,e){return function(){f(this,t).delay=+e.apply(this,arguments)}}function j(t,e){return e=+e,function(){f(this,t).delay=e}}function L(t,e){return function(){l(this,t).duration=+e.apply(this,arguments)}}function B(t,e){return e=+e,function(){l(this,t).duration=e}}function P(t,e){if("function"!=typeof e)throw new Error;return function(){l(this,t).ease=e}}var F=n(203);function q(t,e,n){var r,i,o=function(t){return(t+"").trim().split(/^|\s+/).every((function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?f:l;return function(){var a=o(this,t),u=a.on;u!==r&&(i=(r=u).copy()).on(e,n),a.on=i}}var U=n(106),z=n(204),Y=r.b.prototype.constructor,V=n(205);function G(t){return function(){this.style.removeProperty(t)}}function H(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function W(t,e,n){var r,i;function o(){var o=e.apply(this,arguments);return o!==i&&(r=(i=o)&&H(t,o,n)),r}return o._value=e,o}function $(t){return function(e){this.textContent=t.call(this,e)}}function K(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&$(r)),e}return r._value=t,r}var Z=0;function X(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function J(t){return Object(r.b)().transition(t)}function Q(){return++Z}var tt=r.b.prototype;X.prototype=J.prototype={constructor:X,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=Object(U.a)(t));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a)for(var u,s,f=r[a],l=f.length,d=o[a]=new Array(l),p=0;p<l;++p)(u=f[p])&&(s=t.call(u,u.__data__,p,f))&&("__data__"in u&&(s.__data__=u.__data__),d[p]=s,c(d[p],e,n,p,d,h(u,n)));return new X(o,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=Object(z.a)(t));for(var r=this._groups,i=r.length,o=[],a=[],u=0;u<i;++u)for(var s,f=r[u],l=f.length,d=0;d<l;++d)if(s=f[d]){for(var p,g=t.call(s,s.__data__,d,f),y=h(s,n),b=0,v=g.length;b<v;++b)(p=g[b])&&c(p,e,n,b,g,y);o.push(g),a.push(s)}return new X(o,a,e,n)},filter:function(t){"function"!=typeof t&&(t=Object(F.a)(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o,a=e[i],u=a.length,s=r[i]=[],c=0;c<u;++c)(o=a[c])&&t.call(o,o.__data__,c,a)&&s.push(o);return new X(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,o=Math.min(r,i),a=new Array(r),u=0;u<o;++u)for(var s,c=e[u],f=n[u],l=c.length,h=a[u]=new Array(l),d=0;d<l;++d)(s=c[d]||f[d])&&(h[d]=s);for(;u<r;++u)a[u]=e[u];return new X(a,this._parents,this._name,this._id)},selection:function(){return new Y(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=Q(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a,u=r[o],s=u.length,f=0;f<s;++f)if(a=u[f]){var l=h(a,e);c(a,t,n,f,u,{time:l.time+l.delay+l.duration,delay:0,duration:l.duration,ease:l.ease})}return new X(r,this._parents,t,n)},call:tt.call,nodes:tt.nodes,node:tt.node,size:tt.size,empty:tt.empty,each:tt.each,on:function(t,e){var n=this._id;return arguments.length<2?h(this.node(),n).on.on(t):this.each(q(n,t,e))},attr:function(t,e){var n=Object(g.a)(t),r="transform"===n?p.b:k;return this.attrTween(t,"function"==typeof e?(n.local?O:T)(n,r,v(this,"attr."+t,e)):null==e?(n.local?A:E)(n):(n.local?M:S)(n,r,e))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;var r=Object(g.a)(t);return this.tween(n,(r.local?N:I)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?p.a:k;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var o=Object(V.b)(this,t),a=(this.style.removeProperty(t),Object(V.b)(this,t));return o===a?null:o===n&&a===r?i:i=e(n=o,r=a)}}(t,r)).on("end.style."+t,G(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,i,o;return function(){var a=Object(V.b)(this,t),u=n(this),s=u+"";return null==u&&(this.style.removeProperty(t),s=u=Object(V.b)(this,t)),a===s?null:a===r&&s===i?o:(i=s,o=e(r=a,u))}}(t,r,v(this,"style."+t,e))).each(function(t,e){var n,r,i,o,a="style."+e,u="end."+a;return function(){var s=l(this,t),c=s.on,f=null==s.value[a]?o||(o=G(e)):void 0;c===n&&i===f||(r=(n=c).copy()).on(u,i=f),s.on=r}}(this._id,t)):this.styleTween(t,function(t,e,n){var r,i,o=n+"";return function(){var a=Object(V.b)(this,t);return a===o?null:a===r?i:i=e(r=a,n)}}(t,r,e),n).on("end.style."+t,null)},styleTween:function(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;return this.tween(r,W(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(v(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,K(t))},remove:function(){return this.on("end.remove",(t=this._id,function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}));var t},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r,i=h(this.node(),n).tween,o=0,a=i.length;o<a;++o)if((r=i[o]).name===t)return r.value;return null}return this.each((null==e?y:b)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?R:j)(e,t)):h(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?L:B)(e,t)):h(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(P(e,t)):h(this.node(),e).ease},end:function(){var t,e,n=this,r=n._id,i=n.size();return new Promise((function(o,a){var u={value:a},s={value:function(){0==--i&&o()}};n.each((function(){var n=l(this,r),i=n.on;i!==t&&((e=(t=i).copy())._.cancel.push(u),e._.interrupt.push(u),e._.end.push(s)),n.on=e}))}))}};var et={time:null,delay:0,duration:250,ease:n(120).b};function nt(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))return et.time=Object(o.b)(),et;return n}r.b.prototype.interrupt=function(t){return this.each((function(){d(this,t)}))},r.b.prototype.transition=function(t){var e,n;t instanceof X?(e=t._id,t=t._name):(e=Q(),(n=et).time=Object(o.b)(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var u,s=r[a],f=s.length,l=0;l<f;++l)(u=s[l])&&c(u,t,e,l,s,n||nt(u,e));return new X(r,this._parents,t,e)};var rt=[null],it=function(t,e){var n,r,i=t.__transition;if(i)for(r in e=null==e?null:e+"",i)if((n=i[r]).state>1&&n.name===e)return new X([[t]],rt,e,+r);return null};n.d(e,"c",(function(){return J})),n.d(e,"a",(function(){return it})),n.d(e,"b",(function(){return d}))},function(t,e,n){"use strict";n.d(e,"b",(function(){return i}));var r=n(47);function i(){r.c.stopImmediatePropagation()}e.a=function(){r.c.preventDefault(),r.c.stopImmediatePropagation()}},function(t,e,n){"use strict";var r=n(286);n.d(e,"a",(function(){return r.a}))},function(t,e){t.exports=function(t){return null!=t&&"object"==typeof t}},function(t,e){t.exports=function(t){return null!=t&&"object"==typeof t}},function(t,e,n){"use strict";var r=n(32),i=n(2);function o(t,e){return 55296==(64512&t.charCodeAt(e))&&(!(e<0||e+1>=t.length)&&56320==(64512&t.charCodeAt(e+1)))}function a(t){return(t>>>24|t>>>8&65280|t<<8&16711680|(255&t)<<24)>>>0}function u(t){return 1===t.length?"0"+t:t}function s(t){return 7===t.length?"0"+t:6===t.length?"00"+t:5===t.length?"000"+t:4===t.length?"0000"+t:3===t.length?"00000"+t:2===t.length?"000000"+t:1===t.length?"0000000"+t:t}e.inherits=i,e.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var n=[];if("string"==typeof t)if(e){if("hex"===e)for((t=t.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(t="0"+t),i=0;i<t.length;i+=2)n.push(parseInt(t[i]+t[i+1],16))}else for(var r=0,i=0;i<t.length;i++){var a=t.charCodeAt(i);a<128?n[r++]=a:a<2048?(n[r++]=a>>6|192,n[r++]=63&a|128):o(t,i)?(a=65536+((1023&a)<<10)+(1023&t.charCodeAt(++i)),n[r++]=a>>18|240,n[r++]=a>>12&63|128,n[r++]=a>>6&63|128,n[r++]=63&a|128):(n[r++]=a>>12|224,n[r++]=a>>6&63|128,n[r++]=63&a|128)}else for(i=0;i<t.length;i++)n[i]=0|t[i];return n},e.toHex=function(t){for(var e="",n=0;n<t.length;n++)e+=u(t[n].toString(16));return e},e.htonl=a,e.toHex32=function(t,e){for(var n="",r=0;r<t.length;r++){var i=t[r];"little"===e&&(i=a(i)),n+=s(i.toString(16))}return n},e.zero2=u,e.zero8=s,e.join32=function(t,e,n,i){var o=n-e;r(o%4==0);for(var a=new Array(o/4),u=0,s=e;u<a.length;u++,s+=4){var c;c="big"===i?t[s]<<24|t[s+1]<<16|t[s+2]<<8|t[s+3]:t[s+3]<<24|t[s+2]<<16|t[s+1]<<8|t[s],a[u]=c>>>0}return a},e.split32=function(t,e){for(var n=new Array(4*t.length),r=0,i=0;r<t.length;r++,i+=4){var o=t[r];"big"===e?(n[i]=o>>>24,n[i+1]=o>>>16&255,n[i+2]=o>>>8&255,n[i+3]=255&o):(n[i+3]=o>>>24,n[i+2]=o>>>16&255,n[i+1]=o>>>8&255,n[i]=255&o)}return n},e.rotr32=function(t,e){return t>>>e|t<<32-e},e.rotl32=function(t,e){return t<<e|t>>>32-e},e.sum32=function(t,e){return t+e>>>0},e.sum32_3=function(t,e,n){return t+e+n>>>0},e.sum32_4=function(t,e,n,r){return t+e+n+r>>>0},e.sum32_5=function(t,e,n,r,i){return t+e+n+r+i>>>0},e.sum64=function(t,e,n,r){var i=t[e],o=r+t[e+1]>>>0,a=(o<r?1:0)+n+i;t[e]=a>>>0,t[e+1]=o},e.sum64_hi=function(t,e,n,r){return(e+r>>>0<e?1:0)+t+n>>>0},e.sum64_lo=function(t,e,n,r){return e+r>>>0},e.sum64_4_hi=function(t,e,n,r,i,o,a,u){var s=0,c=e;return s+=(c=c+r>>>0)<e?1:0,s+=(c=c+o>>>0)<o?1:0,t+n+i+a+(s+=(c=c+u>>>0)<u?1:0)>>>0},e.sum64_4_lo=function(t,e,n,r,i,o,a,u){return e+r+o+u>>>0},e.sum64_5_hi=function(t,e,n,r,i,o,a,u,s,c){var f=0,l=e;return f+=(l=l+r>>>0)<e?1:0,f+=(l=l+o>>>0)<o?1:0,f+=(l=l+u>>>0)<u?1:0,t+n+i+a+s+(f+=(l=l+c>>>0)<c?1:0)>>>0},e.sum64_5_lo=function(t,e,n,r,i,o,a,u,s,c){return e+r+o+u+c>>>0},e.rotr64_hi=function(t,e,n){return(e<<32-n|t>>>n)>>>0},e.rotr64_lo=function(t,e,n){return(t<<32-n|e>>>n)>>>0},e.shr64_hi=function(t,e,n){return t>>>n},e.shr64_lo=function(t,e,n){return(t<<32-n|e>>>n)>>>0}},function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return o})),n.d(e,"d",(function(){return a})),n.d(e,"e",(function(){return u})),n.d(e,"a",(function(){return c}));var r,i,o,a,u,s=n(209);function c(t){return r=Object(s.a)(t),i=r.format,o=r.parse,a=r.utcFormat,u=r.utcParse,r}c({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"]})},function(t,e,n){"use strict";n.d(e,"c",(function(){return i})),n.d(e,"a",(function(){return f}));var r={},i=null;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(r={mouseenter:"mouseover",mouseleave:"mouseout"}));function o(t,e,n){return t=a(t,e,n),function(e){var n=e.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||t.call(this,e)}}function a(t,e,n){return function(r){var o=i;i=r;try{t.call(this,this.__data__,e,n)}finally{i=o}}}function u(t){return t.trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}function s(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,o=e.length;r<o;++r)n=e[r],t.type&&n.type!==t.type||n.name!==t.name?e[++i]=n:this.removeEventListener(n.type,n.listener,n.capture);++i?e.length=i:delete this.__on}}}function c(t,e,n){var i=r.hasOwnProperty(t.type)?o:a;return function(r,o,a){var u,s=this.__on,c=i(e,o,a);if(s)for(var f=0,l=s.length;f<l;++f)if((u=s[f]).type===t.type&&u.name===t.name)return this.removeEventListener(u.type,u.listener,u.capture),this.addEventListener(u.type,u.listener=c,u.capture=n),void(u.value=e);this.addEventListener(t.type,c,n),u={type:t.type,name:t.name,value:e,listener:c,capture:n},s?s.push(u):this.__on=[u]}}function f(t,e,n,r){var o=i;t.sourceEvent=i,i=t;try{return e.apply(n,r)}finally{i=o}}e.b=function(t,e,n){var r,i,o=u(t+""),a=o.length;if(!(arguments.length<2)){for(f=e?c:s,null==n&&(n=!1),r=0;r<a;++r)this.each(f(o[r],e,n));return this}var f=this.node().__on;if(f)for(var l,h=0,d=f.length;h<d;++h)for(r=0,l=f[h];r<a;++r)if((i=o[r]).type===l.type&&i.name===l.name)return l.value}},function(t,e,n){"use strict";var r=n(83);e.a=function(t){return(t=Object(r.a)(Math.abs(t)))?t[1]:NaN}},function(t,e,n){"use strict";var r=n(106),i=n(204),o=n(203),a=function(t){return new Array(t.length)};function u(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}u.prototype={constructor:u,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function s(t,e,n,r,i,o){for(var a,s=0,c=e.length,f=o.length;s<f;++s)(a=e[s])?(a.__data__=o[s],r[s]=a):n[s]=new u(t,o[s]);for(;s<c;++s)(a=e[s])&&(i[s]=a)}function c(t,e,n,r,i,o,a){var s,c,f,l={},h=e.length,d=o.length,p=new Array(h);for(s=0;s<h;++s)(c=e[s])&&(p[s]=f="$"+a.call(c,c.__data__,s,e),f in l?i[s]=c:l[f]=c);for(s=0;s<d;++s)(c=l[f="$"+a.call(t,o[s],s,o)])?(r[s]=c,c.__data__=o[s],l[f]=null):n[s]=new u(t,o[s]);for(s=0;s<h;++s)(c=e[s])&&l[p[s]]===c&&(i[s]=c)}function f(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}var l=n(105);function h(t){return function(){this.removeAttribute(t)}}function d(t){return function(){this.removeAttributeNS(t.space,t.local)}}function p(t,e){return function(){this.setAttribute(t,e)}}function g(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function y(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function b(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}var v=n(205);function m(t){return function(){delete this[t]}}function _(t,e){return function(){this[t]=e}}function w(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function x(t){return t.trim().split(/^|\s+/)}function k(t){return t.classList||new E(t)}function E(t){this._node=t,this._names=x(t.getAttribute("class")||"")}function A(t,e){for(var n=k(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function S(t,e){for(var n=k(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function M(t){return function(){A(this,t)}}function T(t){return function(){S(this,t)}}function O(t,e){return function(){(e.apply(this,arguments)?A:S)(this,t)}}E.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function D(){this.textContent=""}function C(t){return function(){this.textContent=t}}function N(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function I(){this.innerHTML=""}function R(t){return function(){this.innerHTML=t}}function j(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function L(){this.nextSibling&&this.parentNode.appendChild(this)}function B(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}var P=n(66);function F(){return null}function q(){var t=this.parentNode;t&&t.removeChild(this)}function U(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function z(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}var Y=n(47),V=n(107);function G(t,e,n){var r=Object(V.a)(t),i=r.CustomEvent;"function"==typeof i?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function H(t,e){return function(){return G(this,t,e)}}function W(t,e){return function(){return G(this,t,e.apply(this,arguments))}}n.d(e,"c",(function(){return $})),n.d(e,"a",(function(){return K}));var $=[null];function K(t,e){this._groups=t,this._parents=e}function Z(){return new K([[document.documentElement]],$)}K.prototype=Z.prototype={constructor:K,select:function(t){"function"!=typeof t&&(t=Object(r.a)(t));for(var e=this._groups,n=e.length,i=new Array(n),o=0;o<n;++o)for(var a,u,s=e[o],c=s.length,f=i[o]=new Array(c),l=0;l<c;++l)(a=s[l])&&(u=t.call(a,a.__data__,l,s))&&("__data__"in a&&(u.__data__=a.__data__),f[l]=u);return new K(i,this._parents)},selectAll:function(t){"function"!=typeof t&&(t=Object(i.a)(t));for(var e=this._groups,n=e.length,r=[],o=[],a=0;a<n;++a)for(var u,s=e[a],c=s.length,f=0;f<c;++f)(u=s[f])&&(r.push(t.call(u,u.__data__,f,s)),o.push(u));return new K(r,o)},filter:function(t){"function"!=typeof t&&(t=Object(o.a)(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,u=e[i],s=u.length,c=r[i]=[],f=0;f<s;++f)(a=u[f])&&t.call(a,a.__data__,f,u)&&c.push(a);return new K(r,this._parents)},data:function(t,e){if(!t)return y=new Array(this.size()),h=-1,this.each((function(t){y[++h]=t})),y;var n,r=e?c:s,i=this._parents,o=this._groups;"function"!=typeof t&&(n=t,t=function(){return n});for(var a=o.length,u=new Array(a),f=new Array(a),l=new Array(a),h=0;h<a;++h){var d=i[h],p=o[h],g=p.length,y=t.call(d,d&&d.__data__,h,i),b=y.length,v=f[h]=new Array(b),m=u[h]=new Array(b);r(d,p,v,m,l[h]=new Array(g),y,e);for(var _,w,x=0,k=0;x<b;++x)if(_=v[x]){for(x>=k&&(k=x+1);!(w=m[k])&&++k<b;);_._next=w||null}}return(u=new K(u,i))._enter=f,u._exit=l,u},enter:function(){return new K(this._enter||this._groups.map(a),this._parents)},exit:function(){return new K(this._exit||this._groups.map(a),this._parents)},join:function(t,e,n){var r=this.enter(),i=this,o=this.exit();return r="function"==typeof t?t(r):r.append(t+""),null!=e&&(i=e(i)),null==n?o.remove():n(o),r&&i?r.merge(i).order():i},merge:function(t){for(var e=this._groups,n=t._groups,r=e.length,i=n.length,o=Math.min(r,i),a=new Array(r),u=0;u<o;++u)for(var s,c=e[u],f=n[u],l=c.length,h=a[u]=new Array(l),d=0;d<l;++d)(s=c[d]||f[d])&&(h[d]=s);for(;u<r;++u)a[u]=e[u];return new K(a,this._parents)},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,i=t[e],o=i.length-1,a=i[o];--o>=0;)(r=i[o])&&(a&&4^r.compareDocumentPosition(a)&&a.parentNode.insertBefore(r,a),a=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=f);for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var a,u=n[o],s=u.length,c=i[o]=new Array(s),l=0;l<s;++l)(a=u[l])&&(c[l]=a);c.sort(e)}return new K(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){var t=new Array(this.size()),e=-1;return this.each((function(){t[++e]=this})),t},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null},size:function(){var t=0;return this.each((function(){++t})),t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i,o=e[n],a=0,u=o.length;a<u;++a)(i=o[a])&&t.call(i,i.__data__,a,o);return this},attr:function(t,e){var n=Object(l.a)(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==e?n.local?d:h:"function"==typeof e?n.local?b:y:n.local?g:p)(n,e))},style:v.a,property:function(t,e){return arguments.length>1?this.each((null==e?m:"function"==typeof e?w:_)(t,e)):this.node()[t]},classed:function(t,e){var n=x(t+"");if(arguments.length<2){for(var r=k(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?O:e?M:T)(n,e))},text:function(t){return arguments.length?this.each(null==t?D:("function"==typeof t?N:C)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?I:("function"==typeof t?j:R)(t)):this.node().innerHTML},raise:function(){return this.each(L)},lower:function(){return this.each(B)},append:function(t){var e="function"==typeof t?t:Object(P.a)(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:Object(P.a)(t),i=null==e?F:"function"==typeof e?e:Object(r.a)(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),i.apply(this,arguments)||null)}))},remove:function(){return this.each(q)},clone:function(t){return this.select(t?z:U)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:Y.b,dispatch:function(t,e){return this.each(("function"==typeof e?W:H)(t,e))}};e.b=Z},function(t,e,n){(function(t){t.exports=function(){"use strict";var e,r;function i(){return e.apply(null,arguments)}function o(t){return t instanceof Array||"[object Array]"===Object.prototype.toString.call(t)}function a(t){return null!=t&&"[object Object]"===Object.prototype.toString.call(t)}function u(t){return void 0===t}function s(t){return"number"==typeof t||"[object Number]"===Object.prototype.toString.call(t)}function c(t){return t instanceof Date||"[object Date]"===Object.prototype.toString.call(t)}function f(t,e){var n,r=[];for(n=0;n<t.length;++n)r.push(e(t[n],n));return r}function l(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function h(t,e){for(var n in e)l(e,n)&&(t[n]=e[n]);return l(e,"toString")&&(t.toString=e.toString),l(e,"valueOf")&&(t.valueOf=e.valueOf),t}function d(t,e,n,r){return me(t,e,n,r,!0).utc()}function p(t){return null==t._pf&&(t._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1}),t._pf}function g(t){if(null==t._isValid){var e=p(t),n=r.call(e.parsedDateParts,(function(t){return null!=t})),i=!isNaN(t._d.getTime())&&e.overflow<0&&!e.empty&&!e.invalidMonth&&!e.invalidWeekday&&!e.weekdayMismatch&&!e.nullInput&&!e.invalidFormat&&!e.userInvalidated&&(!e.meridiem||e.meridiem&&n);if(t._strict&&(i=i&&0===e.charsLeftOver&&0===e.unusedTokens.length&&void 0===e.bigHour),null!=Object.isFrozen&&Object.isFrozen(t))return i;t._isValid=i}return t._isValid}function y(t){var e=d(NaN);return null!=t?h(p(e),t):p(e).userInvalidated=!0,e}r=Array.prototype.some?Array.prototype.some:function(t){for(var e=Object(this),n=e.length>>>0,r=0;r<n;r++)if(r in e&&t.call(this,e[r],r,e))return!0;return!1};var b=i.momentProperties=[];function v(t,e){var n,r,i;if(u(e._isAMomentObject)||(t._isAMomentObject=e._isAMomentObject),u(e._i)||(t._i=e._i),u(e._f)||(t._f=e._f),u(e._l)||(t._l=e._l),u(e._strict)||(t._strict=e._strict),u(e._tzm)||(t._tzm=e._tzm),u(e._isUTC)||(t._isUTC=e._isUTC),u(e._offset)||(t._offset=e._offset),u(e._pf)||(t._pf=p(e)),u(e._locale)||(t._locale=e._locale),0<b.length)for(n=0;n<b.length;n++)u(i=e[r=b[n]])||(t[r]=i);return t}var m=!1;function _(t){v(this,t),this._d=new Date(null!=t._d?t._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===m&&(m=!0,i.updateOffset(this),m=!1)}function w(t){return t instanceof _||null!=t&&null!=t._isAMomentObject}function x(t){return t<0?Math.ceil(t)||0:Math.floor(t)}function k(t){var e=+t,n=0;return 0!==e&&isFinite(e)&&(n=x(e)),n}function E(t,e,n){var r,i=Math.min(t.length,e.length),o=Math.abs(t.length-e.length),a=0;for(r=0;r<i;r++)(n&&t[r]!==e[r]||!n&&k(t[r])!==k(e[r]))&&a++;return a+o}function A(t){!1===i.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+t)}function S(t,e){var n=!0;return h((function(){if(null!=i.deprecationHandler&&i.deprecationHandler(null,t),n){for(var r,o=[],a=0;a<arguments.length;a++){if(r="","object"==typeof arguments[a]){for(var u in r+="\n["+a+"] ",arguments[0])r+=u+": "+arguments[0][u]+", ";r=r.slice(0,-2)}else r=arguments[a];o.push(r)}A(t+"\nArguments: "+Array.prototype.slice.call(o).join("")+"\n"+(new Error).stack),n=!1}return e.apply(this,arguments)}),e)}var M,T={};function O(t,e){null!=i.deprecationHandler&&i.deprecationHandler(t,e),T[t]||(A(e),T[t]=!0)}function D(t){return t instanceof Function||"[object Function]"===Object.prototype.toString.call(t)}function C(t,e){var n,r=h({},t);for(n in e)l(e,n)&&(a(t[n])&&a(e[n])?(r[n]={},h(r[n],t[n]),h(r[n],e[n])):null!=e[n]?r[n]=e[n]:delete r[n]);for(n in t)l(t,n)&&!l(e,n)&&a(t[n])&&(r[n]=h({},r[n]));return r}function N(t){null!=t&&this.set(t)}i.suppressDeprecationWarnings=!1,i.deprecationHandler=null,M=Object.keys?Object.keys:function(t){var e,n=[];for(e in t)l(t,e)&&n.push(e);return n};var I={};function R(t,e){var n=t.toLowerCase();I[n]=I[n+"s"]=I[e]=t}function j(t){return"string"==typeof t?I[t]||I[t.toLowerCase()]:void 0}function L(t){var e,n,r={};for(n in t)l(t,n)&&(e=j(n))&&(r[e]=t[n]);return r}var B={};function P(t,e){B[t]=e}function F(t,e,n){var r=""+Math.abs(t),i=e-r.length;return(0<=t?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var q=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,U=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,z={},Y={};function V(t,e,n,r){var i=r;"string"==typeof r&&(i=function(){return this[r]()}),t&&(Y[t]=i),e&&(Y[e[0]]=function(){return F(i.apply(this,arguments),e[1],e[2])}),n&&(Y[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),t)})}function G(t,e){return t.isValid()?(e=H(e,t.localeData()),z[e]=z[e]||function(t){var e,n,r,i=t.match(q);for(e=0,n=i.length;e<n;e++)Y[i[e]]?i[e]=Y[i[e]]:i[e]=(r=i[e]).match(/\[[\s\S]/)?r.replace(/^\[|\]$/g,""):r.replace(/\\/g,"");return function(e){var r,o="";for(r=0;r<n;r++)o+=D(i[r])?i[r].call(e,t):i[r];return o}}(e),z[e](t)):t.localeData().invalidDate()}function H(t,e){var n=5;function r(t){return e.longDateFormat(t)||t}for(U.lastIndex=0;0<=n&&U.test(t);)t=t.replace(U,r),U.lastIndex=0,n-=1;return t}var W=/\d/,$=/\d\d/,K=/\d{3}/,Z=/\d{4}/,X=/[+-]?\d{6}/,J=/\d\d?/,Q=/\d\d\d\d?/,tt=/\d\d\d\d\d\d?/,et=/\d{1,3}/,nt=/\d{1,4}/,rt=/[+-]?\d{1,6}/,it=/\d+/,ot=/[+-]?\d+/,at=/Z|[+-]\d\d:?\d\d/gi,ut=/Z|[+-]\d\d(?::?\d\d)?/gi,st=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,ct={};function ft(t,e,n){ct[t]=D(e)?e:function(t,r){return t&&n?n:e}}function lt(t,e){return l(ct,t)?ct[t](e._strict,e._locale):new RegExp(ht(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(t,e,n,r,i){return e||n||r||i}))))}function ht(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var dt={};function pt(t,e){var n,r=e;for("string"==typeof t&&(t=[t]),s(e)&&(r=function(t,n){n[e]=k(t)}),n=0;n<t.length;n++)dt[t[n]]=r}function gt(t,e){pt(t,(function(t,n,r,i){r._w=r._w||{},e(t,r._w,r,i)}))}function yt(t){return bt(t)?366:365}function bt(t){return t%4==0&&t%100!=0||t%400==0}V("Y",0,0,(function(){var t=this.year();return t<=9999?""+t:"+"+t})),V(0,["YY",2],0,(function(){return this.year()%100})),V(0,["YYYY",4],0,"year"),V(0,["YYYYY",5],0,"year"),V(0,["YYYYYY",6,!0],0,"year"),R("year","y"),P("year",1),ft("Y",ot),ft("YY",J,$),ft("YYYY",nt,Z),ft("YYYYY",rt,X),ft("YYYYYY",rt,X),pt(["YYYYY","YYYYYY"],0),pt("YYYY",(function(t,e){e[0]=2===t.length?i.parseTwoDigitYear(t):k(t)})),pt("YY",(function(t,e){e[0]=i.parseTwoDigitYear(t)})),pt("Y",(function(t,e){e[0]=parseInt(t,10)})),i.parseTwoDigitYear=function(t){return k(t)+(68<k(t)?1900:2e3)};var vt,mt=_t("FullYear",!0);function _t(t,e){return function(n){return null!=n?(xt(this,t,n),i.updateOffset(this,e),this):wt(this,t)}}function wt(t,e){return t.isValid()?t._d["get"+(t._isUTC?"UTC":"")+e]():NaN}function xt(t,e,n){t.isValid()&&!isNaN(n)&&("FullYear"===e&&bt(t.year())&&1===t.month()&&29===t.date()?t._d["set"+(t._isUTC?"UTC":"")+e](n,t.month(),kt(n,t.month())):t._d["set"+(t._isUTC?"UTC":"")+e](n))}function kt(t,e){if(isNaN(t)||isNaN(e))return NaN;var n=(e%12+12)%12;return t+=(e-n)/12,1===n?bt(t)?29:28:31-n%7%2}vt=Array.prototype.indexOf?Array.prototype.indexOf:function(t){var e;for(e=0;e<this.length;++e)if(this[e]===t)return e;return-1},V("M",["MM",2],"Mo",(function(){return this.month()+1})),V("MMM",0,0,(function(t){return this.localeData().monthsShort(this,t)})),V("MMMM",0,0,(function(t){return this.localeData().months(this,t)})),R("month","M"),P("month",8),ft("M",J),ft("MM",J,$),ft("MMM",(function(t,e){return e.monthsShortRegex(t)})),ft("MMMM",(function(t,e){return e.monthsRegex(t)})),pt(["M","MM"],(function(t,e){e[1]=k(t)-1})),pt(["MMM","MMMM"],(function(t,e,n,r){var i=n._locale.monthsParse(t,r,n._strict);null!=i?e[1]=i:p(n).invalidMonth=t}));var Et=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,At="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),St="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_");function Mt(t,e){var n;if(!t.isValid())return t;if("string"==typeof e)if(/^\d+$/.test(e))e=k(e);else if(!s(e=t.localeData().monthsParse(e)))return t;return n=Math.min(t.date(),kt(t.year(),e)),t._d["set"+(t._isUTC?"UTC":"")+"Month"](e,n),t}function Tt(t){return null!=t?(Mt(this,t),i.updateOffset(this,!0),this):wt(this,"Month")}var Ot=st,Dt=st;function Ct(){function t(t,e){return e.length-t.length}var e,n,r=[],i=[],o=[];for(e=0;e<12;e++)n=d([2e3,e]),r.push(this.monthsShort(n,"")),i.push(this.months(n,"")),o.push(this.months(n,"")),o.push(this.monthsShort(n,""));for(r.sort(t),i.sort(t),o.sort(t),e=0;e<12;e++)r[e]=ht(r[e]),i[e]=ht(i[e]);for(e=0;e<24;e++)o[e]=ht(o[e]);this._monthsRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+r.join("|")+")","i")}function Nt(t){var e;if(t<100&&0<=t){var n=Array.prototype.slice.call(arguments);n[0]=t+400,e=new Date(Date.UTC.apply(null,n)),isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t)}else e=new Date(Date.UTC.apply(null,arguments));return e}function It(t,e,n){var r=7+e-n;return-(7+Nt(t,0,r).getUTCDay()-e)%7+r-1}function Rt(t,e,n,r,i){var o,a,u=1+7*(e-1)+(7+n-r)%7+It(t,r,i);return a=u<=0?yt(o=t-1)+u:u>yt(t)?(o=t+1,u-yt(t)):(o=t,u),{year:o,dayOfYear:a}}function jt(t,e,n){var r,i,o=It(t.year(),e,n),a=Math.floor((t.dayOfYear()-o-1)/7)+1;return a<1?r=a+Lt(i=t.year()-1,e,n):a>Lt(t.year(),e,n)?(r=a-Lt(t.year(),e,n),i=t.year()+1):(i=t.year(),r=a),{week:r,year:i}}function Lt(t,e,n){var r=It(t,e,n),i=It(t+1,e,n);return(yt(t)-r+i)/7}function Bt(t,e){return t.slice(e,7).concat(t.slice(0,e))}V("w",["ww",2],"wo","week"),V("W",["WW",2],"Wo","isoWeek"),R("week","w"),R("isoWeek","W"),P("week",5),P("isoWeek",5),ft("w",J),ft("ww",J,$),ft("W",J),ft("WW",J,$),gt(["w","ww","W","WW"],(function(t,e,n,r){e[r.substr(0,1)]=k(t)})),V("d",0,"do","day"),V("dd",0,0,(function(t){return this.localeData().weekdaysMin(this,t)})),V("ddd",0,0,(function(t){return this.localeData().weekdaysShort(this,t)})),V("dddd",0,0,(function(t){return this.localeData().weekdays(this,t)})),V("e",0,0,"weekday"),V("E",0,0,"isoWeekday"),R("day","d"),R("weekday","e"),R("isoWeekday","E"),P("day",11),P("weekday",11),P("isoWeekday",11),ft("d",J),ft("e",J),ft("E",J),ft("dd",(function(t,e){return e.weekdaysMinRegex(t)})),ft("ddd",(function(t,e){return e.weekdaysShortRegex(t)})),ft("dddd",(function(t,e){return e.weekdaysRegex(t)})),gt(["dd","ddd","dddd"],(function(t,e,n,r){var i=n._locale.weekdaysParse(t,r,n._strict);null!=i?e.d=i:p(n).invalidWeekday=t})),gt(["d","e","E"],(function(t,e,n,r){e[r]=k(t)}));var Pt="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Ft="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),qt="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Ut=st,zt=st,Yt=st;function Vt(){function t(t,e){return e.length-t.length}var e,n,r,i,o,a=[],u=[],s=[],c=[];for(e=0;e<7;e++)n=d([2e3,1]).day(e),r=this.weekdaysMin(n,""),i=this.weekdaysShort(n,""),o=this.weekdays(n,""),a.push(r),u.push(i),s.push(o),c.push(r),c.push(i),c.push(o);for(a.sort(t),u.sort(t),s.sort(t),c.sort(t),e=0;e<7;e++)u[e]=ht(u[e]),s[e]=ht(s[e]),c[e]=ht(c[e]);this._weekdaysRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function Gt(){return this.hours()%12||12}function Ht(t,e){V(t,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)}))}function Wt(t,e){return e._meridiemParse}V("H",["HH",2],0,"hour"),V("h",["hh",2],0,Gt),V("k",["kk",2],0,(function(){return this.hours()||24})),V("hmm",0,0,(function(){return""+Gt.apply(this)+F(this.minutes(),2)})),V("hmmss",0,0,(function(){return""+Gt.apply(this)+F(this.minutes(),2)+F(this.seconds(),2)})),V("Hmm",0,0,(function(){return""+this.hours()+F(this.minutes(),2)})),V("Hmmss",0,0,(function(){return""+this.hours()+F(this.minutes(),2)+F(this.seconds(),2)})),Ht("a",!0),Ht("A",!1),R("hour","h"),P("hour",13),ft("a",Wt),ft("A",Wt),ft("H",J),ft("h",J),ft("k",J),ft("HH",J,$),ft("hh",J,$),ft("kk",J,$),ft("hmm",Q),ft("hmmss",tt),ft("Hmm",Q),ft("Hmmss",tt),pt(["H","HH"],3),pt(["k","kk"],(function(t,e,n){var r=k(t);e[3]=24===r?0:r})),pt(["a","A"],(function(t,e,n){n._isPm=n._locale.isPM(t),n._meridiem=t})),pt(["h","hh"],(function(t,e,n){e[3]=k(t),p(n).bigHour=!0})),pt("hmm",(function(t,e,n){var r=t.length-2;e[3]=k(t.substr(0,r)),e[4]=k(t.substr(r)),p(n).bigHour=!0})),pt("hmmss",(function(t,e,n){var r=t.length-4,i=t.length-2;e[3]=k(t.substr(0,r)),e[4]=k(t.substr(r,2)),e[5]=k(t.substr(i)),p(n).bigHour=!0})),pt("Hmm",(function(t,e,n){var r=t.length-2;e[3]=k(t.substr(0,r)),e[4]=k(t.substr(r))})),pt("Hmmss",(function(t,e,n){var r=t.length-4,i=t.length-2;e[3]=k(t.substr(0,r)),e[4]=k(t.substr(r,2)),e[5]=k(t.substr(i))}));var $t,Kt=_t("Hours",!0),Zt={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:At,monthsShort:St,week:{dow:0,doy:6},weekdays:Pt,weekdaysMin:qt,weekdaysShort:Ft,meridiemParse:/[ap]\.?m?\.?/i},Xt={},Jt={};function Qt(t){return t?t.toLowerCase().replace("_","-"):t}function te(e){var r=null;if(!Xt[e]&&void 0!==t&&t&&t.exports)try{r=$t._abbr,n(453)("./"+e),ee(r)}catch(e){}return Xt[e]}function ee(t,e){var n;return t&&((n=u(e)?re(t):ne(t,e))?$t=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+t+" not found. Did you forget to load it?")),$t._abbr}function ne(t,e){if(null===e)return delete Xt[t],null;var n,r=Zt;if(e.abbr=t,null!=Xt[t])O("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=Xt[t]._config;else if(null!=e.parentLocale)if(null!=Xt[e.parentLocale])r=Xt[e.parentLocale]._config;else{if(null==(n=te(e.parentLocale)))return Jt[e.parentLocale]||(Jt[e.parentLocale]=[]),Jt[e.parentLocale].push({name:t,config:e}),null;r=n._config}return Xt[t]=new N(C(r,e)),Jt[t]&&Jt[t].forEach((function(t){ne(t.name,t.config)})),ee(t),Xt[t]}function re(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return $t;if(!o(t)){if(e=te(t))return e;t=[t]}return function(t){for(var e,n,r,i,o=0;o<t.length;){for(e=(i=Qt(t[o]).split("-")).length,n=(n=Qt(t[o+1]))?n.split("-"):null;0<e;){if(r=te(i.slice(0,e).join("-")))return r;if(n&&n.length>=e&&E(i,n,!0)>=e-1)break;e--}o++}return $t}(t)}function ie(t){var e,n=t._a;return n&&-2===p(t).overflow&&(e=n[1]<0||11<n[1]?1:n[2]<1||n[2]>kt(n[0],n[1])?2:n[3]<0||24<n[3]||24===n[3]&&(0!==n[4]||0!==n[5]||0!==n[6])?3:n[4]<0||59<n[4]?4:n[5]<0||59<n[5]?5:n[6]<0||999<n[6]?6:-1,p(t)._overflowDayOfYear&&(e<0||2<e)&&(e=2),p(t)._overflowWeeks&&-1===e&&(e=7),p(t)._overflowWeekday&&-1===e&&(e=8),p(t).overflow=e),t}function oe(t,e,n){return null!=t?t:null!=e?e:n}function ae(t){var e,n,r,o,a,u=[];if(!t._d){var s,c;for(s=t,c=new Date(i.now()),r=s._useUTC?[c.getUTCFullYear(),c.getUTCMonth(),c.getUTCDate()]:[c.getFullYear(),c.getMonth(),c.getDate()],t._w&&null==t._a[2]&&null==t._a[1]&&function(t){var e,n,r,i,o,a,u,s;if(null!=(e=t._w).GG||null!=e.W||null!=e.E)o=1,a=4,n=oe(e.GG,t._a[0],jt(_e(),1,4).year),r=oe(e.W,1),((i=oe(e.E,1))<1||7<i)&&(s=!0);else{o=t._locale._week.dow,a=t._locale._week.doy;var c=jt(_e(),o,a);n=oe(e.gg,t._a[0],c.year),r=oe(e.w,c.week),null!=e.d?((i=e.d)<0||6<i)&&(s=!0):null!=e.e?(i=e.e+o,(e.e<0||6<e.e)&&(s=!0)):i=o}r<1||r>Lt(n,o,a)?p(t)._overflowWeeks=!0:null!=s?p(t)._overflowWeekday=!0:(u=Rt(n,r,i,o,a),t._a[0]=u.year,t._dayOfYear=u.dayOfYear)}(t),null!=t._dayOfYear&&(a=oe(t._a[0],r[0]),(t._dayOfYear>yt(a)||0===t._dayOfYear)&&(p(t)._overflowDayOfYear=!0),n=Nt(a,0,t._dayOfYear),t._a[1]=n.getUTCMonth(),t._a[2]=n.getUTCDate()),e=0;e<3&&null==t._a[e];++e)t._a[e]=u[e]=r[e];for(;e<7;e++)t._a[e]=u[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[3]&&0===t._a[4]&&0===t._a[5]&&0===t._a[6]&&(t._nextDay=!0,t._a[3]=0),t._d=(t._useUTC?Nt:function(t,e,n,r,i,o,a){var u;return t<100&&0<=t?(u=new Date(t+400,e,n,r,i,o,a),isFinite(u.getFullYear())&&u.setFullYear(t)):u=new Date(t,e,n,r,i,o,a),u}).apply(null,u),o=t._useUTC?t._d.getUTCDay():t._d.getDay(),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[3]=24),t._w&&void 0!==t._w.d&&t._w.d!==o&&(p(t).weekdayMismatch=!0)}}var ue=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,se=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ce=/Z|[+-]\d\d(?::?\d\d)?/,fe=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],le=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],he=/^\/?Date\((\-?\d+)/i;function de(t){var e,n,r,i,o,a,u=t._i,s=ue.exec(u)||se.exec(u);if(s){for(p(t).iso=!0,e=0,n=fe.length;e<n;e++)if(fe[e][1].exec(s[1])){i=fe[e][0],r=!1!==fe[e][2];break}if(null==i)return void(t._isValid=!1);if(s[3]){for(e=0,n=le.length;e<n;e++)if(le[e][1].exec(s[3])){o=(s[2]||" ")+le[e][0];break}if(null==o)return void(t._isValid=!1)}if(!r&&null!=o)return void(t._isValid=!1);if(s[4]){if(!ce.exec(s[4]))return void(t._isValid=!1);a="Z"}t._f=i+(o||"")+(a||""),be(t)}else t._isValid=!1}var pe=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,ge={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function ye(t){var e,n,r,i=pe.exec(t._i.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));if(i){var o=function(t,e,n,r,i,o){var a=[function(t){var e=parseInt(t,10);return e<=49?2e3+e:e<=999?1900+e:e}(t),St.indexOf(e),parseInt(n,10),parseInt(r,10),parseInt(i,10)];return o&&a.push(parseInt(o,10)),a}(i[4],i[3],i[2],i[5],i[6],i[7]);if(n=o,r=t,(e=i[1])&&Ft.indexOf(e)!==new Date(n[0],n[1],n[2]).getDay()&&(p(r).weekdayMismatch=!0,!(r._isValid=!1)))return;t._a=o,t._tzm=function(t,e,n){if(t)return ge[t];if(e)return 0;var r=parseInt(n,10),i=r%100;return(r-i)/100*60+i}(i[8],i[9],i[10]),t._d=Nt.apply(null,t._a),t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),p(t).rfc2822=!0}else t._isValid=!1}function be(t){if(t._f!==i.ISO_8601)if(t._f!==i.RFC_2822){t._a=[],p(t).empty=!0;var e,n,r,o,a,u,s,c,f=""+t._i,h=f.length,d=0;for(r=H(t._f,t._locale).match(q)||[],e=0;e<r.length;e++)o=r[e],(n=(f.match(lt(o,t))||[])[0])&&(0<(a=f.substr(0,f.indexOf(n))).length&&p(t).unusedInput.push(a),f=f.slice(f.indexOf(n)+n.length),d+=n.length),Y[o]?(n?p(t).empty=!1:p(t).unusedTokens.push(o),u=o,c=t,null!=(s=n)&&l(dt,u)&&dt[u](s,c._a,c,u)):t._strict&&!n&&p(t).unusedTokens.push(o);p(t).charsLeftOver=h-d,0<f.length&&p(t).unusedInput.push(f),t._a[3]<=12&&!0===p(t).bigHour&&0<t._a[3]&&(p(t).bigHour=void 0),p(t).parsedDateParts=t._a.slice(0),p(t).meridiem=t._meridiem,t._a[3]=function(t,e,n){var r;return null==n?e:null!=t.meridiemHour?t.meridiemHour(e,n):(null!=t.isPM&&((r=t.isPM(n))&&e<12&&(e+=12),r||12!==e||(e=0)),e)}(t._locale,t._a[3],t._meridiem),ae(t),ie(t)}else ye(t);else de(t)}function ve(t){var e,n,r,l,d=t._i,b=t._f;return t._locale=t._locale||re(t._l),null===d||void 0===b&&""===d?y({nullInput:!0}):("string"==typeof d&&(t._i=d=t._locale.preparse(d)),w(d)?new _(ie(d)):(c(d)?t._d=d:o(b)?function(t){var e,n,r,i,o;if(0===t._f.length)return p(t).invalidFormat=!0,t._d=new Date(NaN);for(i=0;i<t._f.length;i++)o=0,e=v({},t),null!=t._useUTC&&(e._useUTC=t._useUTC),e._f=t._f[i],be(e),g(e)&&(o+=p(e).charsLeftOver,o+=10*p(e).unusedTokens.length,p(e).score=o,(null==r||o<r)&&(r=o,n=e));h(t,n||e)}(t):b?be(t):u(n=(e=t)._i)?e._d=new Date(i.now()):c(n)?e._d=new Date(n.valueOf()):"string"==typeof n?(r=e,null===(l=he.exec(r._i))?(de(r),!1===r._isValid&&(delete r._isValid,ye(r),!1===r._isValid&&(delete r._isValid,i.createFromInputFallback(r)))):r._d=new Date(+l[1])):o(n)?(e._a=f(n.slice(0),(function(t){return parseInt(t,10)})),ae(e)):a(n)?function(t){if(!t._d){var e=L(t._i);t._a=f([e.year,e.month,e.day||e.date,e.hour,e.minute,e.second,e.millisecond],(function(t){return t&&parseInt(t,10)})),ae(t)}}(e):s(n)?e._d=new Date(n):i.createFromInputFallback(e),g(t)||(t._d=null),t))}function me(t,e,n,r,i){var u,s={};return!0!==n&&!1!==n||(r=n,n=void 0),(a(t)&&function(t){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(t).length;var e;for(e in t)if(t.hasOwnProperty(e))return!1;return!0}(t)||o(t)&&0===t.length)&&(t=void 0),s._isAMomentObject=!0,s._useUTC=s._isUTC=i,s._l=n,s._i=t,s._f=e,s._strict=r,(u=new _(ie(ve(s))))._nextDay&&(u.add(1,"d"),u._nextDay=void 0),u}function _e(t,e,n,r){return me(t,e,n,r,!1)}i.createFromInputFallback=S("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",(function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))})),i.ISO_8601=function(){},i.RFC_2822=function(){};var we=S("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var t=_e.apply(null,arguments);return this.isValid()&&t.isValid()?t<this?this:t:y()})),xe=S("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var t=_e.apply(null,arguments);return this.isValid()&&t.isValid()?this<t?this:t:y()}));function ke(t,e){var n,r;if(1===e.length&&o(e[0])&&(e=e[0]),!e.length)return _e();for(n=e[0],r=1;r<e.length;++r)e[r].isValid()&&!e[r][t](n)||(n=e[r]);return n}var Ee=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Ae(t){var e=L(t),n=e.year||0,r=e.quarter||0,i=e.month||0,o=e.week||e.isoWeek||0,a=e.day||0,u=e.hour||0,s=e.minute||0,c=e.second||0,f=e.millisecond||0;this._isValid=function(t){for(var e in t)if(-1===vt.call(Ee,e)||null!=t[e]&&isNaN(t[e]))return!1;for(var n=!1,r=0;r<Ee.length;++r)if(t[Ee[r]]){if(n)return!1;parseFloat(t[Ee[r]])!==k(t[Ee[r]])&&(n=!0)}return!0}(e),this._milliseconds=+f+1e3*c+6e4*s+1e3*u*60*60,this._days=+a+7*o,this._months=+i+3*r+12*n,this._data={},this._locale=re(),this._bubble()}function Se(t){return t instanceof Ae}function Me(t){return t<0?-1*Math.round(-1*t):Math.round(t)}function Te(t,e){V(t,0,0,(function(){var t=this.utcOffset(),n="+";return t<0&&(t=-t,n="-"),n+F(~~(t/60),2)+e+F(~~t%60,2)}))}Te("Z",":"),Te("ZZ",""),ft("Z",ut),ft("ZZ",ut),pt(["Z","ZZ"],(function(t,e,n){n._useUTC=!0,n._tzm=De(ut,t)}));var Oe=/([\+\-]|\d\d)/gi;function De(t,e){var n=(e||"").match(t);if(null===n)return null;var r=((n[n.length-1]||[])+"").match(Oe)||["-",0,0],i=60*r[1]+k(r[2]);return 0===i?0:"+"===r[0]?i:-i}function Ce(t,e){var n,r;return e._isUTC?(n=e.clone(),r=(w(t)||c(t)?t.valueOf():_e(t).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),i.updateOffset(n,!1),n):_e(t).local()}function Ne(t){return 15*-Math.round(t._d.getTimezoneOffset()/15)}function Ie(){return!!this.isValid()&&this._isUTC&&0===this._offset}i.updateOffset=function(){};var Re=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,je=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Le(t,e){var n,r,i,o=t,a=null;return Se(t)?o={ms:t._milliseconds,d:t._days,M:t._months}:s(t)?(o={},e?o[e]=t:o.milliseconds=t):(a=Re.exec(t))?(n="-"===a[1]?-1:1,o={y:0,d:k(a[2])*n,h:k(a[3])*n,m:k(a[4])*n,s:k(a[5])*n,ms:k(Me(1e3*a[6]))*n}):(a=je.exec(t))?(n="-"===a[1]?-1:1,o={y:Be(a[2],n),M:Be(a[3],n),w:Be(a[4],n),d:Be(a[5],n),h:Be(a[6],n),m:Be(a[7],n),s:Be(a[8],n)}):null==o?o={}:"object"==typeof o&&("from"in o||"to"in o)&&(i=function(t,e){var n;return t.isValid()&&e.isValid()?(e=Ce(e,t),t.isBefore(e)?n=Pe(t,e):((n=Pe(e,t)).milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}(_e(o.from),_e(o.to)),(o={}).ms=i.milliseconds,o.M=i.months),r=new Ae(o),Se(t)&&l(t,"_locale")&&(r._locale=t._locale),r}function Be(t,e){var n=t&&parseFloat(t.replace(",","."));return(isNaN(n)?0:n)*e}function Pe(t,e){var n={};return n.months=e.month()-t.month()+12*(e.year()-t.year()),t.clone().add(n.months,"M").isAfter(e)&&--n.months,n.milliseconds=+e-+t.clone().add(n.months,"M"),n}function Fe(t,e){return function(n,r){var i;return null===r||isNaN(+r)||(O(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),i=n,n=r,r=i),qe(this,Le(n="string"==typeof n?+n:n,r),t),this}}function qe(t,e,n,r){var o=e._milliseconds,a=Me(e._days),u=Me(e._months);t.isValid()&&(r=null==r||r,u&&Mt(t,wt(t,"Month")+u*n),a&&xt(t,"Date",wt(t,"Date")+a*n),o&&t._d.setTime(t._d.valueOf()+o*n),r&&i.updateOffset(t,a||u))}Le.fn=Ae.prototype,Le.invalid=function(){return Le(NaN)};var Ue=Fe(1,"add"),ze=Fe(-1,"subtract");function Ye(t,e){var n=12*(e.year()-t.year())+(e.month()-t.month()),r=t.clone().add(n,"months");return-(n+(e-r<0?(e-r)/(r-t.clone().add(n-1,"months")):(e-r)/(t.clone().add(n+1,"months")-r)))||0}function Ve(t){var e;return void 0===t?this._locale._abbr:(null!=(e=re(t))&&(this._locale=e),this)}i.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",i.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var Ge=S("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(t){return void 0===t?this.localeData():this.locale(t)}));function He(){return this._locale}var We=126227808e5;function $e(t,e){return(t%e+e)%e}function Ke(t,e,n){return t<100&&0<=t?new Date(t+400,e,n)-We:new Date(t,e,n).valueOf()}function Ze(t,e,n){return t<100&&0<=t?Date.UTC(t+400,e,n)-We:Date.UTC(t,e,n)}function Xe(t,e){V(0,[t,t.length],0,e)}function Je(t,e,n,r,i){var o;return null==t?jt(this,r,i).year:((o=Lt(t,r,i))<e&&(e=o),function(t,e,n,r,i){var o=Rt(t,e,n,r,i),a=Nt(o.year,0,o.dayOfYear);return this.year(a.getUTCFullYear()),this.month(a.getUTCMonth()),this.date(a.getUTCDate()),this}.call(this,t,e,n,r,i))}V(0,["gg",2],0,(function(){return this.weekYear()%100})),V(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),Xe("gggg","weekYear"),Xe("ggggg","weekYear"),Xe("GGGG","isoWeekYear"),Xe("GGGGG","isoWeekYear"),R("weekYear","gg"),R("isoWeekYear","GG"),P("weekYear",1),P("isoWeekYear",1),ft("G",ot),ft("g",ot),ft("GG",J,$),ft("gg",J,$),ft("GGGG",nt,Z),ft("gggg",nt,Z),ft("GGGGG",rt,X),ft("ggggg",rt,X),gt(["gggg","ggggg","GGGG","GGGGG"],(function(t,e,n,r){e[r.substr(0,2)]=k(t)})),gt(["gg","GG"],(function(t,e,n,r){e[r]=i.parseTwoDigitYear(t)})),V("Q",0,"Qo","quarter"),R("quarter","Q"),P("quarter",7),ft("Q",W),pt("Q",(function(t,e){e[1]=3*(k(t)-1)})),V("D",["DD",2],"Do","date"),R("date","D"),P("date",9),ft("D",J),ft("DD",J,$),ft("Do",(function(t,e){return t?e._dayOfMonthOrdinalParse||e._ordinalParse:e._dayOfMonthOrdinalParseLenient})),pt(["D","DD"],2),pt("Do",(function(t,e){e[2]=k(t.match(J)[0])}));var Qe=_t("Date",!0);V("DDD",["DDDD",3],"DDDo","dayOfYear"),R("dayOfYear","DDD"),P("dayOfYear",4),ft("DDD",et),ft("DDDD",K),pt(["DDD","DDDD"],(function(t,e,n){n._dayOfYear=k(t)})),V("m",["mm",2],0,"minute"),R("minute","m"),P("minute",14),ft("m",J),ft("mm",J,$),pt(["m","mm"],4);var tn=_t("Minutes",!1);V("s",["ss",2],0,"second"),R("second","s"),P("second",15),ft("s",J),ft("ss",J,$),pt(["s","ss"],5);var en,nn=_t("Seconds",!1);for(V("S",0,0,(function(){return~~(this.millisecond()/100)})),V(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),V(0,["SSS",3],0,"millisecond"),V(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),V(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),V(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),V(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),V(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),V(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),R("millisecond","ms"),P("millisecond",16),ft("S",et,W),ft("SS",et,$),ft("SSS",et,K),en="SSSS";en.length<=9;en+="S")ft(en,it);function rn(t,e){e[6]=k(1e3*("0."+t))}for(en="S";en.length<=9;en+="S")pt(en,rn);var on=_t("Milliseconds",!1);V("z",0,0,"zoneAbbr"),V("zz",0,0,"zoneName");var an=_.prototype;function un(t){return t}an.add=Ue,an.calendar=function(t,e){var n=t||_e(),r=Ce(n,this).startOf("day"),o=i.calendarFormat(this,r)||"sameElse",a=e&&(D(e[o])?e[o].call(this,n):e[o]);return this.format(a||this.localeData().calendar(o,this,_e(n)))},an.clone=function(){return new _(this)},an.diff=function(t,e,n){var r,i,o;if(!this.isValid())return NaN;if(!(r=Ce(t,this)).isValid())return NaN;switch(i=6e4*(r.utcOffset()-this.utcOffset()),e=j(e)){case"year":o=Ye(this,r)/12;break;case"month":o=Ye(this,r);break;case"quarter":o=Ye(this,r)/3;break;case"second":o=(this-r)/1e3;break;case"minute":o=(this-r)/6e4;break;case"hour":o=(this-r)/36e5;break;case"day":o=(this-r-i)/864e5;break;case"week":o=(this-r-i)/6048e5;break;default:o=this-r}return n?o:x(o)},an.endOf=function(t){var e;if(void 0===(t=j(t))||"millisecond"===t||!this.isValid())return this;var n=this._isUTC?Ze:Ke;switch(t){case"year":e=n(this.year()+1,0,1)-1;break;case"quarter":e=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":e=n(this.year(),this.month()+1,1)-1;break;case"week":e=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":e=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":e=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":e=this._d.valueOf(),e+=36e5-$e(e+(this._isUTC?0:6e4*this.utcOffset()),36e5)-1;break;case"minute":e=this._d.valueOf(),e+=6e4-$e(e,6e4)-1;break;case"second":e=this._d.valueOf(),e+=1e3-$e(e,1e3)-1}return this._d.setTime(e),i.updateOffset(this,!0),this},an.format=function(t){t||(t=this.isUtc()?i.defaultFormatUtc:i.defaultFormat);var e=G(this,t);return this.localeData().postformat(e)},an.from=function(t,e){return this.isValid()&&(w(t)&&t.isValid()||_e(t).isValid())?Le({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},an.fromNow=function(t){return this.from(_e(),t)},an.to=function(t,e){return this.isValid()&&(w(t)&&t.isValid()||_e(t).isValid())?Le({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},an.toNow=function(t){return this.to(_e(),t)},an.get=function(t){return D(this[t=j(t)])?this[t]():this},an.invalidAt=function(){return p(this).overflow},an.isAfter=function(t,e){var n=w(t)?t:_e(t);return!(!this.isValid()||!n.isValid())&&("millisecond"===(e=j(e)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(e).valueOf())},an.isBefore=function(t,e){var n=w(t)?t:_e(t);return!(!this.isValid()||!n.isValid())&&("millisecond"===(e=j(e)||"millisecond")?this.valueOf()<n.valueOf():this.clone().endOf(e).valueOf()<n.valueOf())},an.isBetween=function(t,e,n,r){var i=w(t)?t:_e(t),o=w(e)?e:_e(e);return!!(this.isValid()&&i.isValid()&&o.isValid())&&("("===(r=r||"()")[0]?this.isAfter(i,n):!this.isBefore(i,n))&&(")"===r[1]?this.isBefore(o,n):!this.isAfter(o,n))},an.isSame=function(t,e){var n,r=w(t)?t:_e(t);return!(!this.isValid()||!r.isValid())&&("millisecond"===(e=j(e)||"millisecond")?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(e).valueOf()<=n&&n<=this.clone().endOf(e).valueOf()))},an.isSameOrAfter=function(t,e){return this.isSame(t,e)||this.isAfter(t,e)},an.isSameOrBefore=function(t,e){return this.isSame(t,e)||this.isBefore(t,e)},an.isValid=function(){return g(this)},an.lang=Ge,an.locale=Ve,an.localeData=He,an.max=xe,an.min=we,an.parsingFlags=function(){return h({},p(this))},an.set=function(t,e){if("object"==typeof t)for(var n=function(t){var e=[];for(var n in t)e.push({unit:n,priority:B[n]});return e.sort((function(t,e){return t.priority-e.priority})),e}(t=L(t)),r=0;r<n.length;r++)this[n[r].unit](t[n[r].unit]);else if(D(this[t=j(t)]))return this[t](e);return this},an.startOf=function(t){var e;if(void 0===(t=j(t))||"millisecond"===t||!this.isValid())return this;var n=this._isUTC?Ze:Ke;switch(t){case"year":e=n(this.year(),0,1);break;case"quarter":e=n(this.year(),this.month()-this.month()%3,1);break;case"month":e=n(this.year(),this.month(),1);break;case"week":e=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":e=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":e=n(this.year(),this.month(),this.date());break;case"hour":e=this._d.valueOf(),e-=$e(e+(this._isUTC?0:6e4*this.utcOffset()),36e5);break;case"minute":e=this._d.valueOf(),e-=$e(e,6e4);break;case"second":e=this._d.valueOf(),e-=$e(e,1e3)}return this._d.setTime(e),i.updateOffset(this,!0),this},an.subtract=ze,an.toArray=function(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]},an.toObject=function(){var t=this;return{years:t.year(),months:t.month(),date:t.date(),hours:t.hours(),minutes:t.minutes(),seconds:t.seconds(),milliseconds:t.milliseconds()}},an.toDate=function(){return new Date(this.valueOf())},an.toISOString=function(t){if(!this.isValid())return null;var e=!0!==t,n=e?this.clone().utc():this;return n.year()<0||9999<n.year()?G(n,e?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):D(Date.prototype.toISOString)?e?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",G(n,"Z")):G(n,e?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},an.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var t="moment",e="";this.isLocal()||(t=0===this.utcOffset()?"moment.utc":"moment.parseZone",e="Z");var n="["+t+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i=e+'[")]';return this.format(n+r+"-MM-DD[T]HH:mm:ss.SSS"+i)},an.toJSON=function(){return this.isValid()?this.toISOString():null},an.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},an.unix=function(){return Math.floor(this.valueOf()/1e3)},an.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},an.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},an.year=mt,an.isLeapYear=function(){return bt(this.year())},an.weekYear=function(t){return Je.call(this,t,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},an.isoWeekYear=function(t){return Je.call(this,t,this.isoWeek(),this.isoWeekday(),1,4)},an.quarter=an.quarters=function(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)},an.month=Tt,an.daysInMonth=function(){return kt(this.year(),this.month())},an.week=an.weeks=function(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")},an.isoWeek=an.isoWeeks=function(t){var e=jt(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")},an.weeksInYear=function(){var t=this.localeData()._week;return Lt(this.year(),t.dow,t.doy)},an.isoWeeksInYear=function(){return Lt(this.year(),1,4)},an.date=Qe,an.day=an.days=function(t){if(!this.isValid())return null!=t?this:NaN;var e,n,r=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(e=t,n=this.localeData(),t="string"!=typeof e?e:isNaN(e)?"number"==typeof(e=n.weekdaysParse(e))?e:null:parseInt(e,10),this.add(t-r,"d")):r},an.weekday=function(t){if(!this.isValid())return null!=t?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")},an.isoWeekday=function(t){if(!this.isValid())return null!=t?this:NaN;if(null==t)return this.day()||7;var e,n,r=(e=t,n=this.localeData(),"string"==typeof e?n.weekdaysParse(e)%7||7:isNaN(e)?null:e);return this.day(this.day()%7?r:r-7)},an.dayOfYear=function(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")},an.hour=an.hours=Kt,an.minute=an.minutes=tn,an.second=an.seconds=nn,an.millisecond=an.milliseconds=on,an.utcOffset=function(t,e,n){var r,o=this._offset||0;if(!this.isValid())return null!=t?this:NaN;if(null==t)return this._isUTC?o:Ne(this);if("string"==typeof t){if(null===(t=De(ut,t)))return this}else Math.abs(t)<16&&!n&&(t*=60);return!this._isUTC&&e&&(r=Ne(this)),this._offset=t,this._isUTC=!0,null!=r&&this.add(r,"m"),o!==t&&(!e||this._changeInProgress?qe(this,Le(t-o,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,i.updateOffset(this,!0),this._changeInProgress=null)),this},an.utc=function(t){return this.utcOffset(0,t)},an.local=function(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(Ne(this),"m")),this},an.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var t=De(at,this._i);null!=t?this.utcOffset(t):this.utcOffset(0,!0)}return this},an.hasAlignedHourOffset=function(t){return!!this.isValid()&&(t=t?_e(t).utcOffset():0,(this.utcOffset()-t)%60==0)},an.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},an.isLocal=function(){return!!this.isValid()&&!this._isUTC},an.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},an.isUtc=Ie,an.isUTC=Ie,an.zoneAbbr=function(){return this._isUTC?"UTC":""},an.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},an.dates=S("dates accessor is deprecated. Use date instead.",Qe),an.months=S("months accessor is deprecated. Use month instead",Tt),an.years=S("years accessor is deprecated. Use year instead",mt),an.zone=S("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",(function(t,e){return null!=t?("string"!=typeof t&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()})),an.isDSTShifted=S("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",(function(){if(!u(this._isDSTShifted))return this._isDSTShifted;var t={};if(v(t,this),(t=ve(t))._a){var e=t._isUTC?d(t._a):_e(t._a);this._isDSTShifted=this.isValid()&&0<E(t._a,e.toArray())}else this._isDSTShifted=!1;return this._isDSTShifted}));var sn=N.prototype;function cn(t,e,n,r){var i=re(),o=d().set(r,e);return i[n](o,t)}function fn(t,e,n){if(s(t)&&(e=t,t=void 0),t=t||"",null!=e)return cn(t,e,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=cn(t,r,n,"month");return i}function ln(t,e,n,r){"boolean"==typeof t?s(e)&&(n=e,e=void 0):(e=t,t=!1,s(n=e)&&(n=e,e=void 0)),e=e||"";var i,o=re(),a=t?o._week.dow:0;if(null!=n)return cn(e,(n+a)%7,r,"day");var u=[];for(i=0;i<7;i++)u[i]=cn(e,(i+a)%7,r,"day");return u}sn.calendar=function(t,e,n){var r=this._calendar[t]||this._calendar.sameElse;return D(r)?r.call(e,n):r},sn.longDateFormat=function(t){var e=this._longDateFormat[t],n=this._longDateFormat[t.toUpperCase()];return e||!n?e:(this._longDateFormat[t]=n.replace(/MMMM|MM|DD|dddd/g,(function(t){return t.slice(1)})),this._longDateFormat[t])},sn.invalidDate=function(){return this._invalidDate},sn.ordinal=function(t){return this._ordinal.replace("%d",t)},sn.preparse=un,sn.postformat=un,sn.relativeTime=function(t,e,n,r){var i=this._relativeTime[n];return D(i)?i(t,e,n,r):i.replace(/%d/i,t)},sn.pastFuture=function(t,e){var n=this._relativeTime[0<t?"future":"past"];return D(n)?n(e):n.replace(/%s/i,e)},sn.set=function(t){var e,n;for(n in t)D(e=t[n])?this[n]=e:this["_"+n]=e;this._config=t,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},sn.months=function(t,e){return t?o(this._months)?this._months[t.month()]:this._months[(this._months.isFormat||Et).test(e)?"format":"standalone"][t.month()]:o(this._months)?this._months:this._months.standalone},sn.monthsShort=function(t,e){return t?o(this._monthsShort)?this._monthsShort[t.month()]:this._monthsShort[Et.test(e)?"format":"standalone"][t.month()]:o(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},sn.monthsParse=function(t,e,n){var r,i,o;if(this._monthsParseExact)return function(t,e,n){var r,i,o,a=t.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)o=d([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(o,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(o,"").toLocaleLowerCase();return n?"MMM"===e?-1!==(i=vt.call(this._shortMonthsParse,a))?i:null:-1!==(i=vt.call(this._longMonthsParse,a))?i:null:"MMM"===e?-1!==(i=vt.call(this._shortMonthsParse,a))?i:-1!==(i=vt.call(this._longMonthsParse,a))?i:null:-1!==(i=vt.call(this._longMonthsParse,a))?i:-1!==(i=vt.call(this._shortMonthsParse,a))?i:null}.call(this,t,e,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(i=d([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(o="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[r]=new RegExp(o.replace(".",""),"i")),n&&"MMMM"===e&&this._longMonthsParse[r].test(t))return r;if(n&&"MMM"===e&&this._shortMonthsParse[r].test(t))return r;if(!n&&this._monthsParse[r].test(t))return r}},sn.monthsRegex=function(t){return this._monthsParseExact?(l(this,"_monthsRegex")||Ct.call(this),t?this._monthsStrictRegex:this._monthsRegex):(l(this,"_monthsRegex")||(this._monthsRegex=Dt),this._monthsStrictRegex&&t?this._monthsStrictRegex:this._monthsRegex)},sn.monthsShortRegex=function(t){return this._monthsParseExact?(l(this,"_monthsRegex")||Ct.call(this),t?this._monthsShortStrictRegex:this._monthsShortRegex):(l(this,"_monthsShortRegex")||(this._monthsShortRegex=Ot),this._monthsShortStrictRegex&&t?this._monthsShortStrictRegex:this._monthsShortRegex)},sn.week=function(t){return jt(t,this._week.dow,this._week.doy).week},sn.firstDayOfYear=function(){return this._week.doy},sn.firstDayOfWeek=function(){return this._week.dow},sn.weekdays=function(t,e){var n=o(this._weekdays)?this._weekdays:this._weekdays[t&&!0!==t&&this._weekdays.isFormat.test(e)?"format":"standalone"];return!0===t?Bt(n,this._week.dow):t?n[t.day()]:n},sn.weekdaysMin=function(t){return!0===t?Bt(this._weekdaysMin,this._week.dow):t?this._weekdaysMin[t.day()]:this._weekdaysMin},sn.weekdaysShort=function(t){return!0===t?Bt(this._weekdaysShort,this._week.dow):t?this._weekdaysShort[t.day()]:this._weekdaysShort},sn.weekdaysParse=function(t,e,n){var r,i,o;if(this._weekdaysParseExact)return function(t,e,n){var r,i,o,a=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)o=d([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(o,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(o,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(o,"").toLocaleLowerCase();return n?"dddd"===e?-1!==(i=vt.call(this._weekdaysParse,a))?i:null:"ddd"===e?-1!==(i=vt.call(this._shortWeekdaysParse,a))?i:null:-1!==(i=vt.call(this._minWeekdaysParse,a))?i:null:"dddd"===e?-1!==(i=vt.call(this._weekdaysParse,a))?i:-1!==(i=vt.call(this._shortWeekdaysParse,a))?i:-1!==(i=vt.call(this._minWeekdaysParse,a))?i:null:"ddd"===e?-1!==(i=vt.call(this._shortWeekdaysParse,a))?i:-1!==(i=vt.call(this._weekdaysParse,a))?i:-1!==(i=vt.call(this._minWeekdaysParse,a))?i:null:-1!==(i=vt.call(this._minWeekdaysParse,a))?i:-1!==(i=vt.call(this._weekdaysParse,a))?i:-1!==(i=vt.call(this._shortWeekdaysParse,a))?i:null}.call(this,t,e,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=d([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(o="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(o.replace(".",""),"i")),n&&"dddd"===e&&this._fullWeekdaysParse[r].test(t))return r;if(n&&"ddd"===e&&this._shortWeekdaysParse[r].test(t))return r;if(n&&"dd"===e&&this._minWeekdaysParse[r].test(t))return r;if(!n&&this._weekdaysParse[r].test(t))return r}},sn.weekdaysRegex=function(t){return this._weekdaysParseExact?(l(this,"_weekdaysRegex")||Vt.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(l(this,"_weekdaysRegex")||(this._weekdaysRegex=Ut),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)},sn.weekdaysShortRegex=function(t){return this._weekdaysParseExact?(l(this,"_weekdaysRegex")||Vt.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(l(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=zt),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},sn.weekdaysMinRegex=function(t){return this._weekdaysParseExact?(l(this,"_weekdaysRegex")||Vt.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(l(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Yt),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},sn.isPM=function(t){return"p"===(t+"").toLowerCase().charAt(0)},sn.meridiem=function(t,e,n){return 11<t?n?"pm":"PM":n?"am":"AM"},ee("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10;return t+(1===k(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th")}}),i.lang=S("moment.lang is deprecated. Use moment.locale instead.",ee),i.langData=S("moment.langData is deprecated. Use moment.localeData instead.",re);var hn=Math.abs;function dn(t,e,n,r){var i=Le(e,n);return t._milliseconds+=r*i._milliseconds,t._days+=r*i._days,t._months+=r*i._months,t._bubble()}function pn(t){return t<0?Math.floor(t):Math.ceil(t)}function gn(t){return 4800*t/146097}function yn(t){return 146097*t/4800}function bn(t){return function(){return this.as(t)}}var vn=bn("ms"),mn=bn("s"),_n=bn("m"),wn=bn("h"),xn=bn("d"),kn=bn("w"),En=bn("M"),An=bn("Q"),Sn=bn("y");function Mn(t){return function(){return this.isValid()?this._data[t]:NaN}}var Tn=Mn("milliseconds"),On=Mn("seconds"),Dn=Mn("minutes"),Cn=Mn("hours"),Nn=Mn("days"),In=Mn("months"),Rn=Mn("years"),jn=Math.round,Ln={ss:44,s:45,m:45,h:22,d:26,M:11},Bn=Math.abs;function Pn(t){return(0<t)-(t<0)||+t}function Fn(){if(!this.isValid())return this.localeData().invalidDate();var t,e,n=Bn(this._milliseconds)/1e3,r=Bn(this._days),i=Bn(this._months);e=x((t=x(n/60))/60),n%=60,t%=60;var o=x(i/12),a=i%=12,u=r,s=e,c=t,f=n?n.toFixed(3).replace(/\.?0+$/,""):"",l=this.asSeconds();if(!l)return"P0D";var h=l<0?"-":"",d=Pn(this._months)!==Pn(l)?"-":"",p=Pn(this._days)!==Pn(l)?"-":"",g=Pn(this._milliseconds)!==Pn(l)?"-":"";return h+"P"+(o?d+o+"Y":"")+(a?d+a+"M":"")+(u?p+u+"D":"")+(s||c||f?"T":"")+(s?g+s+"H":"")+(c?g+c+"M":"")+(f?g+f+"S":"")}var qn=Ae.prototype;return qn.isValid=function(){return this._isValid},qn.abs=function(){var t=this._data;return this._milliseconds=hn(this._milliseconds),this._days=hn(this._days),this._months=hn(this._months),t.milliseconds=hn(t.milliseconds),t.seconds=hn(t.seconds),t.minutes=hn(t.minutes),t.hours=hn(t.hours),t.months=hn(t.months),t.years=hn(t.years),this},qn.add=function(t,e){return dn(this,t,e,1)},qn.subtract=function(t,e){return dn(this,t,e,-1)},qn.as=function(t){if(!this.isValid())return NaN;var e,n,r=this._milliseconds;if("month"===(t=j(t))||"quarter"===t||"year"===t)switch(e=this._days+r/864e5,n=this._months+gn(e),t){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(e=this._days+Math.round(yn(this._months)),t){case"week":return e/7+r/6048e5;case"day":return e+r/864e5;case"hour":return 24*e+r/36e5;case"minute":return 1440*e+r/6e4;case"second":return 86400*e+r/1e3;case"millisecond":return Math.floor(864e5*e)+r;default:throw new Error("Unknown unit "+t)}},qn.asMilliseconds=vn,qn.asSeconds=mn,qn.asMinutes=_n,qn.asHours=wn,qn.asDays=xn,qn.asWeeks=kn,qn.asMonths=En,qn.asQuarters=An,qn.asYears=Sn,qn.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*k(this._months/12):NaN},qn._bubble=function(){var t,e,n,r,i,o=this._milliseconds,a=this._days,u=this._months,s=this._data;return 0<=o&&0<=a&&0<=u||o<=0&&a<=0&&u<=0||(o+=864e5*pn(yn(u)+a),u=a=0),s.milliseconds=o%1e3,t=x(o/1e3),s.seconds=t%60,e=x(t/60),s.minutes=e%60,n=x(e/60),s.hours=n%24,u+=i=x(gn(a+=x(n/24))),a-=pn(yn(i)),r=x(u/12),u%=12,s.days=a,s.months=u,s.years=r,this},qn.clone=function(){return Le(this)},qn.get=function(t){return t=j(t),this.isValid()?this[t+"s"]():NaN},qn.milliseconds=Tn,qn.seconds=On,qn.minutes=Dn,qn.hours=Cn,qn.days=Nn,qn.weeks=function(){return x(this.days()/7)},qn.months=In,qn.years=Rn,qn.humanize=function(t){if(!this.isValid())return this.localeData().invalidDate();var e,n,r,i,o,a,u,s,c,f,l=this.localeData(),h=(e=!t,n=l,r=Le(this).abs(),i=jn(r.as("s")),o=jn(r.as("m")),a=jn(r.as("h")),u=jn(r.as("d")),s=jn(r.as("M")),c=jn(r.as("y")),(f=i<=Ln.ss&&["s",i]||i<Ln.s&&["ss",i]||o<=1&&["m"]||o<Ln.m&&["mm",o]||a<=1&&["h"]||a<Ln.h&&["hh",a]||u<=1&&["d"]||u<Ln.d&&["dd",u]||s<=1&&["M"]||s<Ln.M&&["MM",s]||c<=1&&["y"]||["yy",c])[2]=e,f[3]=0<+this,f[4]=n,function(t,e,n,r,i){return i.relativeTime(e||1,!!n,t,r)}.apply(null,f));return t&&(h=l.pastFuture(+this,h)),l.postformat(h)},qn.toISOString=Fn,qn.toString=Fn,qn.toJSON=Fn,qn.locale=Ve,qn.localeData=He,qn.toIsoString=S("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Fn),qn.lang=Ge,V("X",0,0,"unix"),V("x",0,0,"valueOf"),ft("x",ot),ft("X",/[+-]?\d+(\.\d{1,3})?/),pt("X",(function(t,e,n){n._d=new Date(1e3*parseFloat(t,10))})),pt("x",(function(t,e,n){n._d=new Date(k(t))})),i.version="2.24.0",e=_e,i.fn=an,i.min=function(){return ke("isBefore",[].slice.call(arguments,0))},i.max=function(){return ke("isAfter",[].slice.call(arguments,0))},i.now=function(){return Date.now?Date.now():+new Date},i.utc=d,i.unix=function(t){return _e(1e3*t)},i.months=function(t,e){return fn(t,e,"months")},i.isDate=c,i.locale=ee,i.invalid=y,i.duration=Le,i.isMoment=w,i.weekdays=function(t,e,n){return ln(t,e,n,"weekdays")},i.parseZone=function(){return _e.apply(null,arguments).parseZone()},i.localeData=re,i.isDuration=Se,i.monthsShort=function(t,e){return fn(t,e,"monthsShort")},i.weekdaysMin=function(t,e,n){return ln(t,e,n,"weekdaysMin")},i.defineLocale=ne,i.updateLocale=function(t,e){if(null!=e){var n,r,i=Zt;null!=(r=te(t))&&(i=r._config),(n=new N(e=C(i,e))).parentLocale=Xt[t],Xt[t]=n,ee(t)}else null!=Xt[t]&&(null!=Xt[t].parentLocale?Xt[t]=Xt[t].parentLocale:null!=Xt[t]&&delete Xt[t]);return Xt[t]},i.locales=function(){return M(Xt)},i.weekdaysShort=function(t,e,n){return ln(t,e,n,"weekdaysShort")},i.normalizeUnits=j,i.relativeTimeRounding=function(t){return void 0===t?jn:"function"==typeof t&&(jn=t,!0)},i.relativeTimeThreshold=function(t,e){return void 0!==Ln[t]&&(void 0===e?Ln[t]:(Ln[t]=e,"s"===t&&(Ln.ss=e-1),!0))},i.calendarFormat=function(t,e){var n=t.diff(e,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},i.prototype=an,i.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},i}()}).call(this,n(14)(t))},function(t,e,n){"use strict";var r=n(282);n.d(e,"a",(function(){return r.a}))},function(t,e,n){var r=n(124),i=n(228);t.exports=function(t){return null!=t&&i(t.length)&&!r(t)}},function(t,e,n){var r=n(511),i=n(521),o=n(76),a=n(15),u=n(528);t.exports=function(t){return"function"==typeof t?t:null==t?o:"object"==typeof t?a(t)?i(t[0],t[1]):r(t):u(t)}},function(t,e){},function(t,e,n){(function(t){function n(t,e){for(var n=0,r=t.length-1;r>=0;r--){var i=t[r];"."===i?t.splice(r,1):".."===i?(t.splice(r,1),n++):n&&(t.splice(r,1),n--)}if(e)for(;n--;n)t.unshift("..");return t}function r(t,e){if(t.filter)return t.filter(e);for(var n=[],r=0;r<t.length;r++)e(t[r],r,t)&&n.push(t[r]);return n}e.resolve=function(){for(var e="",i=!1,o=arguments.length-1;o>=-1&&!i;o--){var a=o>=0?arguments[o]:t.cwd();if("string"!=typeof a)throw new TypeError("Arguments to path.resolve must be strings");a&&(e=a+"/"+e,i="/"===a.charAt(0))}return(i?"/":"")+(e=n(r(e.split("/"),(function(t){return!!t})),!i).join("/"))||"."},e.normalize=function(t){var o=e.isAbsolute(t),a="/"===i(t,-1);return(t=n(r(t.split("/"),(function(t){return!!t})),!o).join("/"))||o||(t="."),t&&a&&(t+="/"),(o?"/":"")+t},e.isAbsolute=function(t){return"/"===t.charAt(0)},e.join=function(){var t=Array.prototype.slice.call(arguments,0);return e.normalize(r(t,(function(t,e){if("string"!=typeof t)throw new TypeError("Arguments to path.join must be strings");return t})).join("/"))},e.relative=function(t,n){function r(t){for(var e=0;e<t.length&&""===t[e];e++);for(var n=t.length-1;n>=0&&""===t[n];n--);return e>n?[]:t.slice(e,n-e+1)}t=e.resolve(t).substr(1),n=e.resolve(n).substr(1);for(var i=r(t.split("/")),o=r(n.split("/")),a=Math.min(i.length,o.length),u=a,s=0;s<a;s++)if(i[s]!==o[s]){u=s;break}var c=[];for(s=u;s<i.length;s++)c.push("..");return(c=c.concat(o.slice(u))).join("/")},e.sep="/",e.delimiter=":",e.dirname=function(t){if("string"!=typeof t&&(t+=""),0===t.length)return".";for(var e=t.charCodeAt(0),n=47===e,r=-1,i=!0,o=t.length-1;o>=1;--o)if(47===(e=t.charCodeAt(o))){if(!i){r=o;break}}else i=!1;return-1===r?n?"/":".":n&&1===r?"/":t.slice(0,r)},e.basename=function(t,e){var n=function(t){"string"!=typeof t&&(t+="");var e,n=0,r=-1,i=!0;for(e=t.length-1;e>=0;--e)if(47===t.charCodeAt(e)){if(!i){n=e+1;break}}else-1===r&&(i=!1,r=e+1);return-1===r?"":t.slice(n,r)}(t);return e&&n.substr(-1*e.length)===e&&(n=n.substr(0,n.length-e.length)),n},e.extname=function(t){"string"!=typeof t&&(t+="");for(var e=-1,n=0,r=-1,i=!0,o=0,a=t.length-1;a>=0;--a){var u=t.charCodeAt(a);if(47!==u)-1===r&&(i=!1,r=a+1),46===u?-1===e?e=a:1!==o&&(o=1):-1!==e&&(o=-1);else if(!i){n=a+1;break}}return-1===e||-1===r||0===o||1===o&&e===r-1&&e===n+1?"":t.slice(e,r)};var i="b"==="ab".substr(-1)?function(t,e,n){return t.substr(e,n)}:function(t,e,n){return e<0&&(e=t.length+e),t.substr(e,n)}}).call(this,n(17))},function(t,e,n){var r=n(93),i=n(245);t.exports=function(t){return null!=t&&i(t.length)&&!r(t)}},function(t,e,n){var r=n(624),i=n(634),o=n(79),a=n(16),u=n(641);t.exports=function(t){return"function"==typeof t?t:null==t?o:"object"==typeof t?a(t)?i(t[0],t[1]):r(t):u(t)}},function(t,e,n){"use strict";n.d(e,"b",(function(){return d})),n.d(e,"a",(function(){return g})),n.d(e,"c",(function(){return y})),n.d(e,"d",(function(){return b}));var r,i,o=0,a=0,u=0,s=0,c=0,f=0,l="object"==typeof performance&&performance.now?performance:Date,h="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function d(){return c||(h(p),c=l.now()+f)}function p(){c=0}function g(){this._call=this._time=this._next=null}function y(t,e,n){var r=new g;return r.restart(t,e,n),r}function b(){d(),++o;for(var t,e=r;e;)(t=c-e._time)>=0&&e._call.call(null,t),e=e._next;--o}function v(){c=(s=l.now())+f,o=a=0;try{b()}finally{o=0,function(){var t,e,n=r,o=1/0;for(;n;)n._call?(o>n._time&&(o=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:r=e);i=t,_(o)}(),c=0}}function m(){var t=l.now(),e=t-s;e>1e3&&(f-=e,s=t)}function _(t){o||(a&&(a=clearTimeout(a)),t-c>24?(t<1/0&&(a=setTimeout(v,t-l.now()-f)),u&&(u=clearInterval(u))):(u||(s=l.now(),u=setInterval(m,1e3)),o=1,h(v)))}g.prototype=y.prototype={constructor:g,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?d():+n)+(null==e?0:+e),this._next||i===this||(i?i._next=this:r=this,i=this),this._call=t,this._time=n,_()},stop:function(){this._call&&(this._call=null,this._time=1/0,_())}}},function(t,e,n){(function(t,r){var i=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[6,8,10,11,12,13,14,15,16,18,20],n=[1,9],r=[1,10],i=[1,11],o=[1,12],a=[1,13],u=[1,14],s=[1,16],c=[1,17],f={trace:function(){},yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,dateFormat:11,inclusiveEndDates:12,axisFormat:13,excludes:14,title:15,section:16,clickStatement:17,taskTxt:18,taskData:19,click:20,callbackname:21,callbackargs:22,href:23,clickStatementDebug:24,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",11:"dateFormat",12:"inclusiveEndDates",13:"axisFormat",14:"excludes",15:"title",16:"section",18:"taskTxt",19:"taskData",20:"click",21:"callbackname",22:"callbackargs",23:"href"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[17,2],[17,3],[17,3],[17,4],[17,3],[17,4],[17,2],[24,2],[24,3],[24,3],[24,4],[24,3],[24,4],[24,2]],performAction:function(t,e,n,r,i,o,a){var u=o.length-1;switch(i){case 1:return o[u-1];case 2:this.$=[];break;case 3:o[u-1].push(o[u]),this.$=o[u-1];break;case 4:case 5:this.$=o[u];break;case 6:case 7:this.$=[];break;case 8:r.setDateFormat(o[u].substr(11)),this.$=o[u].substr(11);break;case 9:r.enableInclusiveEndDates(),this.$=o[u].substr(18);break;case 10:r.setAxisFormat(o[u].substr(11)),this.$=o[u].substr(11);break;case 11:r.setExcludes(o[u].substr(9)),this.$=o[u].substr(9);break;case 12:r.setTitle(o[u].substr(6)),this.$=o[u].substr(6);break;case 13:r.addSection(o[u].substr(8)),this.$=o[u].substr(8);break;case 15:r.addTask(o[u-1],o[u]),this.$="task";break;case 16:this.$=o[u-1],r.setClickEvent(o[u-1],o[u],null);break;case 17:this.$=o[u-2],r.setClickEvent(o[u-2],o[u-1],o[u]);break;case 18:this.$=o[u-2],r.setClickEvent(o[u-2],o[u-1],null),r.setLink(o[u-2],o[u]);break;case 19:this.$=o[u-3],r.setClickEvent(o[u-3],o[u-2],o[u-1]),r.setLink(o[u-3],o[u]);break;case 20:this.$=o[u-2],r.setClickEvent(o[u-2],o[u],null),r.setLink(o[u-2],o[u-1]);break;case 21:this.$=o[u-3],r.setClickEvent(o[u-3],o[u-1],o[u]),r.setLink(o[u-3],o[u-2]);break;case 22:this.$=o[u-1],r.setLink(o[u-1],o[u]);break;case 23:case 29:this.$=o[u-1]+" "+o[u];break;case 24:case 25:case 27:this.$=o[u-2]+" "+o[u-1]+" "+o[u];break;case 26:case 28:this.$=o[u-3]+" "+o[u-2]+" "+o[u-1]+" "+o[u]}},table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:n,12:r,13:i,14:o,15:a,16:u,17:15,18:s,20:c},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:18,11:n,12:r,13:i,14:o,15:a,16:u,17:15,18:s,20:c},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),t(e,[2,9]),t(e,[2,10]),t(e,[2,11]),t(e,[2,12]),t(e,[2,13]),t(e,[2,14]),{19:[1,19]},{21:[1,20],23:[1,21]},t(e,[2,4]),t(e,[2,15]),t(e,[2,16],{22:[1,22],23:[1,23]}),t(e,[2,22],{21:[1,24]}),t(e,[2,17],{23:[1,25]}),t(e,[2,18]),t(e,[2,20],{22:[1,26]}),t(e,[2,19]),t(e,[2,21])],defaultActions:{},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],o=[],a=this.table,u="",s=0,c=0,f=0,l=2,h=1,d=o.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var b=p.yylloc;o.push(b);var v=p.options&&p.options.ranges;function m(){var t;return"number"!=typeof(t=r.pop()||p.lex()||h)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var _,w,x,k,E,A,S,M,T,O={};;){if(x=n[n.length-1],this.defaultActions[x]?k=this.defaultActions[x]:(null==_&&(_=m()),k=a[x]&&a[x][_]),void 0===k||!k.length||!k[0]){var D="";for(A in T=[],a[x])this.terminals_[A]&&A>l&&T.push("'"+this.terminals_[A]+"'");D=p.showPosition?"Parse error on line "+(s+1)+":\n"+p.showPosition()+"\nExpecting "+T.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(s+1)+": Unexpected "+(_==h?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(D,{text:p.match,token:this.terminals_[_]||_,line:p.yylineno,loc:b,expected:T})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+x+", token: "+_);switch(k[0]){case 1:n.push(_),i.push(p.yytext),o.push(p.yylloc),n.push(k[1]),_=null,w?(_=w,w=null):(c=p.yyleng,u=p.yytext,s=p.yylineno,b=p.yylloc,f>0&&f--);break;case 2:if(S=this.productions_[k[1]][1],O.$=i[i.length-S],O._$={first_line:o[o.length-(S||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(S||1)].first_column,last_column:o[o.length-1].last_column},v&&(O._$.range=[o[o.length-(S||1)].range[0],o[o.length-1].range[1]]),void 0!==(E=this.performAction.apply(O,[u,c,s,g.yy,k[1],i,o].concat(d))))return E;S&&(n=n.slice(0,-1*S*2),i=i.slice(0,-1*S),o=o.slice(0,-1*S)),n.push(this.productions_[k[1]][0]),i.push(O.$),o.push(O._$),M=a[n[n.length-2]][n[n.length-1]],n.push(M);break;case 3:return!0}}return!0}},l={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var o in i)this[o]=i[o];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),o=0;o<i.length;o++)if((n=this._input.match(this.rules[i[o]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=o,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[o])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return 10;case 1:case 2:case 3:break;case 4:this.begin("href");break;case 5:this.popState();break;case 6:return 23;case 7:this.begin("callbackname");break;case 8:this.popState();break;case 9:this.popState(),this.begin("callbackargs");break;case 10:return 21;case 11:this.popState();break;case 12:return 22;case 13:this.begin("click");break;case 14:this.popState();break;case 15:return 20;case 16:return 4;case 17:return 11;case 18:return 12;case 19:return 13;case 20:return 14;case 21:return"date";case 22:return 15;case 23:return 16;case 24:return 18;case 25:return 19;case 26:return":";case 27:return 6;case 28:return"INVALID"}},rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:href[\s]+["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:call[\s]+)/i,/^(?:\([\s]*\))/i,/^(?:\()/i,/^(?:[^(]*)/i,/^(?:\))/i,/^(?:[^)]*)/i,/^(?:click[\s]+)/i,/^(?:[\s\n])/i,/^(?:[^\s\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:inclusiveEndDates\b)/i,/^(?:axisFormat\s[^#\n;]+)/i,/^(?:excludes\s[^#\n;]+)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{callbackargs:{rules:[11,12],inclusive:!1},callbackname:{rules:[8,9,10],inclusive:!1},href:{rules:[5,6],inclusive:!1},click:{rules:[14,15],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,7,13,16,17,18,19,20,21,22,23,24,25,26,27,28],inclusive:!0}}};function h(){this.yy={}}return f.lexer=l,h.prototype=f,f.Parser=h,new h}();e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(r){r[1]||(console.log("Usage: "+r[0]+" FILE"),t.exit(1));var i=n(54).readFileSync(n(55).normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n(17),n(14)(t))},function(t,e,n){"use strict";n.d(e,"f",(function(){return o})),n.d(e,"g",(function(){return a})),n.d(e,"a",(function(){return u})),n.d(e,"b",(function(){return s})),n.d(e,"d",(function(){return c})),n.d(e,"c",(function(){return f})),n.d(e,"e",(function(){return l}));var r=n(110),i=Object(r.a)(","),o=i.parse,a=i.parseRows,u=i.format,s=i.formatBody,c=i.formatRows,f=i.formatRow,l=i.formatValue},function(t,e,n){"use strict";n.d(e,"f",(function(){return o})),n.d(e,"g",(function(){return a})),n.d(e,"a",(function(){return u})),n.d(e,"b",(function(){return s})),n.d(e,"d",(function(){return c})),n.d(e,"c",(function(){return f})),n.d(e,"e",(function(){return l}));var r=n(110),i=Object(r.a)("\t"),o=i.parse,a=i.parseRows,u=i.format,s=i.formatBody,c=i.formatRows,f=i.formatRow,l=i.formatValue},function(t,e,n){var r=n(297),i=n(230),o=n(52);t.exports=function(t){return o(t)?r(t):i(t)}},function(t,e,n){var r=n(345),i=n(247),o=n(56);t.exports=function(t){return o(t)?r(t):i(t)}},function(t,e,n){var r;if(!r)try{r=n(902)}catch(t){}r||(r=window.d3),t.exports=r},function(t,e,n){var r=n(3).Buffer,i=n(265).Transform,o=n(270).StringDecoder;function a(t){i.call(this),this.hashMode="string"==typeof t,this.hashMode?this[t]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}n(2)(a,i),a.prototype.update=function(t,e,n){"string"==typeof t&&(t=r.from(t,e));var i=this._update(t);return this.hashMode?this:(n&&(i=this._toString(i,n)),i)},a.prototype.setAutoPadding=function(){},a.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},a.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},a.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},a.prototype._transform=function(t,e,n){var r;try{this.hashMode?this._update(t):this.push(this._update(t))}catch(t){r=t}finally{n(r)}},a.prototype._flush=function(t){var e;try{this.push(this.__final())}catch(t){e=t}t(e)},a.prototype._finalOrDigest=function(t){var e=this.__final()||r.alloc(0);return t&&(e=this._toString(e,t,!0)),e},a.prototype._toString=function(t,e,n){if(this._decoder||(this._decoder=new o(e),this._encoding=e),this._encoding!==e)throw new Error("can't switch encodings");var r=this._decoder.write(t);return n&&(r+=this._decoder.end()),r},t.exports=a},function(t,e,n){"use strict";var r=n(105),i=n(68);function o(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===i.b&&e.documentElement.namespaceURI===i.b?e.createElement(t):e.createElementNS(n,t)}}function a(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}e.a=function(t){var e=Object(r.a)(t);return(e.local?a:o)(e)}},function(t,e,n){"use strict";e.a=function(t,e){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,[(r=r.matrixTransform(t.getScreenCTM().inverse())).x,r.y]}var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}},function(t,e,n){"use strict";n.d(e,"b",(function(){return r}));var r="http://www.w3.org/1999/xhtml";e.a={svg:"http://www.w3.org/2000/svg",xhtml:r,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"}},function(t,e,n){"use strict";function r(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}n.d(e,"b",(function(){return r})),e.a=function(t,e){e||(e=[]);var n,r=t?Math.min(e.length,t.length):0,i=e.slice();return function(o){for(n=0;n<r;++n)i[n]=t[n]*(1-o)+e[n]*o;return i}}},function(t,e,n){"use strict";n.d(e,"b",(function(){return o}));var r=n(4),i=Object(r.a)((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()}));i.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Object(r.a)((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},e.a=i;var o=i.range},function(t,e,n){"use strict";n.d(e,"b",(function(){return o}));var r=n(4),i=Object(r.a)((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()}));i.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Object(r.a)((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},e.a=i;var o=i.range},function(t,e,n){(function(t,r){var i=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,4],n=[1,3],r=[1,5],i=[1,8,9,10,11,26,34,61,62,63,64,65,66,76,77,80,81,82,84,85,91,92,93,94,95,96],o=[2,2],a=[1,12],u=[1,13],s=[1,14],c=[1,15],f=[1,22],l=[1,46],h=[1,24],d=[1,25],p=[1,26],g=[1,27],y=[1,28],b=[1,40],v=[1,35],m=[1,37],_=[1,32],w=[1,36],x=[1,39],k=[1,43],E=[1,44],A=[1,45],S=[1,34],M=[1,38],T=[1,41],O=[1,42],D=[1,33],C=[1,51],N=[1,8,9,10,11,26,30,34,61,62,63,64,65,66,76,77,80,81,82,84,85,91,92,93,94,95,96],I=[1,55],R=[1,54],j=[1,56],L=[8,9,11,55,56],B=[8,9,10,11,55,56],P=[8,9,10,11,35,55,56],F=[8,9,10,11,28,34,35,37,39,41,43,45,47,48,50,55,56,66,76,77,80,81,82,84,85,91,92,93,94,95,96],q=[8,9,11,34,55,56,66,76,77,80,81,82,84,85,91,92,93,94,95,96],U=[34,66,76,77,80,81,82,84,85,91,92,93,94,95,96],z=[1,100],Y=[1,121],V=[1,122],G=[1,123],H=[1,124],W=[1,104],$=[1,95],K=[1,96],Z=[1,92],X=[1,116],J=[1,117],Q=[1,118],tt=[1,119],et=[1,120],nt=[1,125],rt=[1,126],it=[1,98],ot=[1,106],at=[1,109],ut=[1,107],st=[1,108],ct=[1,101],ft=[1,114],lt=[1,113],ht=[1,97],dt=[1,94],pt=[1,103],gt=[1,105],yt=[1,110],bt=[1,111],vt=[1,112],mt=[1,115],_t=[8,9,10,11,26,30,34,61,62,63,64,65,66,76,77,80,81,82,84,85,91,92,93,94,95,96],wt=[1,129],xt=[1,133],kt=[1,135],Et=[1,136],At=[8,9,10,11,12,13,26,28,29,30,34,38,40,42,44,46,47,49,51,55,56,57,61,62,63,64,65,66,67,70,76,77,80,81,82,84,85,86,87,91,92,93,94,95,96],St=[8,9,10,11,13,34,66,76,77,80,81,82,84,85,91,92,93,94,95,96],Mt=[10,77],Tt=[1,201],Ot=[1,205],Dt=[1,202],Ct=[1,199],Nt=[1,196],It=[1,197],Rt=[1,198],jt=[1,200],Lt=[1,203],Bt=[1,204],Pt=[1,206],Ft=[8,9,11],qt=[1,222],Ut=[8,9,11,77],zt=[8,9,10,11,61,73,76,77,80,81,82,83,84,85,86],Yt={trace:function(){},yy:{},symbols_:{error:2,mermaidDoc:3,graphConfig:4,document:5,line:6,statement:7,SEMI:8,NEWLINE:9,SPACE:10,EOF:11,GRAPH:12,DIR:13,FirstStmtSeperator:14,ending:15,endToken:16,spaceList:17,spaceListNewline:18,verticeStatement:19,separator:20,styleStatement:21,linkStyleStatement:22,classDefStatement:23,classStatement:24,clickStatement:25,subgraph:26,text:27,SQS:28,SQE:29,end:30,link:31,node:32,vertex:33,AMP:34,STYLE_SEPARATOR:35,idString:36,PS:37,PE:38,"(-":39,"-)":40,STADIUMSTART:41,STADIUMEND:42,CYLINDERSTART:43,CYLINDEREND:44,DIAMOND_START:45,DIAMOND_STOP:46,TAGEND:47,TRAPSTART:48,TRAPEND:49,INVTRAPSTART:50,INVTRAPEND:51,linkStatement:52,arrowText:53,TESTSTR:54,START_LINK:55,LINK:56,PIPE:57,textToken:58,STR:59,keywords:60,STYLE:61,LINKSTYLE:62,CLASSDEF:63,CLASS:64,CLICK:65,DOWN:66,UP:67,textNoTags:68,textNoTagsToken:69,DEFAULT:70,stylesOpt:71,alphaNum:72,HEX:73,numList:74,INTERPOLATE:75,NUM:76,COMMA:77,style:78,styleComponent:79,ALPHA:80,COLON:81,MINUS:82,UNIT:83,BRKT:84,DOT:85,PCT:86,TAGSTART:87,alphaNumToken:88,idStringToken:89,alphaNumStatement:90,PUNCTUATION:91,UNICODE_TEXT:92,PLUS:93,EQUALS:94,MULT:95,UNDERSCORE:96,graphCodeTokens:97,ARROW_CROSS:98,ARROW_POINT:99,ARROW_CIRCLE:100,ARROW_OPEN:101,QUOTE:102,$accept:0,$end:1},terminals_:{2:"error",8:"SEMI",9:"NEWLINE",10:"SPACE",11:"EOF",12:"GRAPH",13:"DIR",26:"subgraph",28:"SQS",29:"SQE",30:"end",34:"AMP",35:"STYLE_SEPARATOR",37:"PS",38:"PE",39:"(-",40:"-)",41:"STADIUMSTART",42:"STADIUMEND",43:"CYLINDERSTART",44:"CYLINDEREND",45:"DIAMOND_START",46:"DIAMOND_STOP",47:"TAGEND",48:"TRAPSTART",49:"TRAPEND",50:"INVTRAPSTART",51:"INVTRAPEND",54:"TESTSTR",55:"START_LINK",56:"LINK",57:"PIPE",59:"STR",61:"STYLE",62:"LINKSTYLE",63:"CLASSDEF",64:"CLASS",65:"CLICK",66:"DOWN",67:"UP",70:"DEFAULT",73:"HEX",75:"INTERPOLATE",76:"NUM",77:"COMMA",80:"ALPHA",81:"COLON",82:"MINUS",83:"UNIT",84:"BRKT",85:"DOT",86:"PCT",87:"TAGSTART",91:"PUNCTUATION",92:"UNICODE_TEXT",93:"PLUS",94:"EQUALS",95:"MULT",96:"UNDERSCORE",98:"ARROW_CROSS",99:"ARROW_POINT",100:"ARROW_CIRCLE",101:"ARROW_OPEN",102:"QUOTE"},productions_:[0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,3],[15,2],[15,1],[16,1],[16,1],[16,1],[14,1],[14,1],[14,2],[18,2],[18,2],[18,1],[18,1],[17,2],[17,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,9],[7,6],[7,4],[20,1],[20,1],[20,1],[19,3],[19,4],[19,2],[19,1],[32,1],[32,5],[32,3],[33,4],[33,6],[33,4],[33,4],[33,4],[33,4],[33,4],[33,6],[33,4],[33,4],[33,4],[33,4],[33,4],[33,1],[31,2],[31,3],[31,3],[31,1],[31,3],[52,1],[53,3],[27,1],[27,2],[27,1],[60,1],[60,1],[60,1],[60,1],[60,1],[60,1],[60,1],[60,1],[60,1],[60,1],[60,1],[68,1],[68,2],[23,5],[23,5],[24,5],[25,5],[25,7],[25,5],[25,7],[21,5],[21,5],[22,5],[22,5],[22,9],[22,9],[22,7],[22,7],[74,1],[74,3],[71,1],[71,3],[78,1],[78,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[69,1],[69,1],[69,1],[69,1],[36,1],[36,2],[72,1],[72,2],[90,1],[90,1],[90,1],[90,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[89,1],[89,1],[89,1],[89,1],[89,1],[89,1],[89,1],[89,1],[89,1],[89,1],[89,1],[89,1],[89,1],[89,1],[89,1],[97,1],[97,1],[97,1],[97,1],[97,1],[97,1],[97,1],[97,1],[97,1],[97,1],[97,1],[97,1],[97,1],[97,1],[97,1],[97,1],[97,1],[97,1],[97,1],[97,1],[97,1],[97,1],[97,1]],performAction:function(t,e,n,r,i,o,a){var u=o.length-1;switch(i){case 2:this.$=[];break;case 3:o[u]!==[]&&o[u-1].push(o[u]),this.$=o[u-1];break;case 4:case 66:case 68:case 80:case 126:case 128:case 129:this.$=o[u];break;case 11:r.setDirection(o[u-1]),this.$=o[u-1];break;case 26:this.$=o[u-1].nodes;break;case 27:case 28:case 29:case 30:case 31:this.$=[];break;case 32:this.$=r.addSubGraph(o[u-6],o[u-1],o[u-4]);break;case 33:this.$=r.addSubGraph(o[u-3],o[u-1],o[u-3]);break;case 34:this.$=r.addSubGraph(void 0,o[u-1],void 0);break;case 38:r.addLink(o[u-2].stmt,o[u],o[u-1]),this.$={stmt:o[u],nodes:o[u].concat(o[u-2].nodes)};break;case 39:r.addLink(o[u-3].stmt,o[u-1],o[u-2]),this.$={stmt:o[u-1],nodes:o[u-1].concat(o[u-3].nodes)};break;case 40:this.$={stmt:o[u-1],nodes:o[u-1]};break;case 41:this.$={stmt:o[u],nodes:o[u]};break;case 42:this.$=[o[u]];break;case 43:this.$=o[u-4].concat(o[u]);break;case 44:this.$=[o[u-2]],r.setClass(o[u-2],o[u]);break;case 45:this.$=o[u-3],r.addVertex(o[u-3],o[u-1],"square");break;case 46:this.$=o[u-5],r.addVertex(o[u-5],o[u-2],"circle");break;case 47:this.$=o[u-3],r.addVertex(o[u-3],o[u-1],"ellipse");break;case 48:this.$=o[u-3],r.addVertex(o[u-3],o[u-1],"stadium");break;case 49:this.$=o[u-3],r.addVertex(o[u-3],o[u-1],"cylinder");break;case 50:this.$=o[u-3],r.addVertex(o[u-3],o[u-1],"round");break;case 51:this.$=o[u-3],r.addVertex(o[u-3],o[u-1],"diamond");break;case 52:this.$=o[u-5],r.addVertex(o[u-5],o[u-2],"hexagon");break;case 53:this.$=o[u-3],r.addVertex(o[u-3],o[u-1],"odd");break;case 54:this.$=o[u-3],r.addVertex(o[u-3],o[u-1],"trapezoid");break;case 55:this.$=o[u-3],r.addVertex(o[u-3],o[u-1],"inv_trapezoid");break;case 56:this.$=o[u-3],r.addVertex(o[u-3],o[u-1],"lean_right");break;case 57:this.$=o[u-3],r.addVertex(o[u-3],o[u-1],"lean_left");break;case 58:this.$=o[u],r.addVertex(o[u]);break;case 59:o[u-1].text=o[u],this.$=o[u-1];break;case 60:case 61:o[u-2].text=o[u-1],this.$=o[u-2];break;case 62:this.$=o[u];break;case 63:var s=r.destructLink(o[u],o[u-2]);this.$={type:s.type,stroke:s.stroke,text:o[u-1]};break;case 64:s=r.destructLink(o[u]);this.$={type:s.type,stroke:s.stroke};break;case 65:this.$=o[u-1];break;case 67:case 81:case 127:this.$=o[u-1]+""+o[u];break;case 82:case 83:this.$=o[u-4],r.addClass(o[u-2],o[u]);break;case 84:this.$=o[u-4],r.setClass(o[u-2],o[u]);break;case 85:this.$=o[u-4],r.setClickEvent(o[u-2],o[u],void 0);break;case 86:this.$=o[u-6],r.setClickEvent(o[u-4],o[u-2],o[u]);break;case 87:this.$=o[u-4],r.setLink(o[u-2],o[u],void 0);break;case 88:this.$=o[u-6],r.setLink(o[u-4],o[u-2],o[u]);break;case 89:this.$=o[u-4],r.addVertex(o[u-2],void 0,void 0,o[u]);break;case 90:case 92:this.$=o[u-4],r.updateLink(o[u-2],o[u]);break;case 91:this.$=o[u-4],r.updateLink([o[u-2]],o[u]);break;case 93:this.$=o[u-8],r.updateLinkInterpolate([o[u-6]],o[u-2]),r.updateLink([o[u-6]],o[u]);break;case 94:this.$=o[u-8],r.updateLinkInterpolate(o[u-6],o[u-2]),r.updateLink(o[u-6],o[u]);break;case 95:this.$=o[u-6],r.updateLinkInterpolate([o[u-4]],o[u]);break;case 96:this.$=o[u-6],r.updateLinkInterpolate(o[u-4],o[u]);break;case 97:case 99:this.$=[o[u]];break;case 98:case 100:o[u-2].push(o[u]),this.$=o[u-2];break;case 102:this.$=o[u-1]+o[u];break;case 124:this.$=o[u];break;case 125:this.$=o[u-1]+""+o[u];break;case 130:this.$="v";break;case 131:this.$="-"}},table:[{3:1,4:2,9:e,10:n,12:r},{1:[3]},t(i,o,{5:6}),{4:7,9:e,10:n,12:r},{4:8,9:e,10:n,12:r},{13:[1,9]},{1:[2,1],6:10,7:11,8:a,9:u,10:s,11:c,19:16,21:17,22:18,23:19,24:20,25:21,26:f,32:23,33:29,34:l,36:30,61:h,62:d,63:p,64:g,65:y,66:b,76:v,77:m,80:_,81:w,82:x,84:k,85:E,89:31,91:A,92:S,93:M,94:T,95:O,96:D},t(i,[2,9]),t(i,[2,10]),{8:[1,48],9:[1,49],10:C,14:47,17:50},t(N,[2,3]),t(N,[2,4]),t(N,[2,5]),t(N,[2,6]),t(N,[2,7]),t(N,[2,8]),{8:I,9:R,11:j,20:52,31:53,52:57,55:[1,58],56:[1,59]},{8:I,9:R,11:j,20:60},{8:I,9:R,11:j,20:61},{8:I,9:R,11:j,20:62},{8:I,9:R,11:j,20:63},{8:I,9:R,11:j,20:64},{8:I,9:R,10:[1,65],11:j,20:66},t(L,[2,41],{17:67,10:C}),{10:[1,68]},{10:[1,69]},{10:[1,70]},{10:[1,71]},{10:[1,72]},t(B,[2,42],{35:[1,73]}),t(P,[2,58],{89:83,28:[1,74],34:l,37:[1,75],39:[1,76],41:[1,77],43:[1,78],45:[1,79],47:[1,80],48:[1,81],50:[1,82],66:b,76:v,77:m,80:_,81:w,82:x,84:k,85:E,91:A,92:S,93:M,94:T,95:O,96:D}),t(F,[2,124]),t(F,[2,145]),t(F,[2,146]),t(F,[2,147]),t(F,[2,148]),t(F,[2,149]),t(F,[2,150]),t(F,[2,151]),t(F,[2,152]),t(F,[2,153]),t(F,[2,154]),t(F,[2,155]),t(F,[2,156]),t(F,[2,157]),t(F,[2,158]),t(F,[2,159]),t(i,[2,11]),t(i,[2,17]),t(i,[2,18]),{9:[1,84]},t(q,[2,25],{17:85,10:C}),t(N,[2,26]),{32:86,33:29,34:l,36:30,66:b,76:v,77:m,80:_,81:w,82:x,84:k,85:E,89:31,91:A,92:S,93:M,94:T,95:O,96:D},t(N,[2,35]),t(N,[2,36]),t(N,[2,37]),t(U,[2,62],{53:87,54:[1,88],57:[1,89]}),{10:z,12:Y,13:V,26:G,27:90,30:H,34:W,47:$,55:K,58:91,59:Z,60:102,61:X,62:J,63:Q,64:tt,65:et,66:nt,67:rt,69:93,70:it,76:ot,77:at,80:ut,81:st,82:ct,84:ft,85:lt,86:ht,87:dt,88:99,91:pt,92:gt,93:yt,94:bt,95:vt,96:mt},t([34,54,57,66,76,77,80,81,82,84,85,91,92,93,94,95,96],[2,64]),t(N,[2,27]),t(N,[2,28]),t(N,[2,29]),t(N,[2,30]),t(N,[2,31]),{10:z,12:Y,13:V,26:G,27:127,30:H,34:W,47:$,55:K,58:91,59:Z,60:102,61:X,62:J,63:Q,64:tt,65:et,66:nt,67:rt,69:93,70:it,76:ot,77:at,80:ut,81:st,82:ct,84:ft,85:lt,86:ht,87:dt,88:99,91:pt,92:gt,93:yt,94:bt,95:vt,96:mt},t(_t,o,{5:128}),t(L,[2,40],{34:wt}),{13:xt,34:W,66:kt,72:130,73:[1,131],76:ot,77:at,80:ut,81:st,82:Et,84:ft,85:lt,88:134,90:132,91:pt,92:gt,93:yt,94:bt,95:vt,96:mt},{70:[1,137],74:138,76:[1,139]},{13:xt,34:W,66:kt,70:[1,140],72:141,76:ot,77:at,80:ut,81:st,82:Et,84:ft,85:lt,88:134,90:132,91:pt,92:gt,93:yt,94:bt,95:vt,96:mt},{13:xt,34:W,66:kt,72:142,76:ot,77:at,80:ut,81:st,82:Et,84:ft,85:lt,88:134,90:132,91:pt,92:gt,93:yt,94:bt,95:vt,96:mt},{13:xt,34:W,66:kt,72:143,76:ot,77:at,80:ut,81:st,82:Et,84:ft,85:lt,88:134,90:132,91:pt,92:gt,93:yt,94:bt,95:vt,96:mt},{34:l,36:144,66:b,76:v,77:m,80:_,81:w,82:x,84:k,85:E,89:31,91:A,92:S,93:M,94:T,95:O,96:D},{10:z,12:Y,13:V,26:G,27:145,30:H,34:W,47:$,55:K,58:91,59:Z,60:102,61:X,62:J,63:Q,64:tt,65:et,66:nt,67:rt,69:93,70:it,76:ot,77:at,80:ut,81:st,82:ct,84:ft,85:lt,86:ht,87:dt,88:99,91:pt,92:gt,93:yt,94:bt,95:vt,96:mt},{10:z,12:Y,13:V,26:G,27:147,30:H,34:W,37:[1,146],47:$,55:K,58:91,59:Z,60:102,61:X,62:J,63:Q,64:tt,65:et,66:nt,67:rt,69:93,70:it,76:ot,77:at,80:ut,81:st,82:ct,84:ft,85:lt,86:ht,87:dt,88:99,91:pt,92:gt,93:yt,94:bt,95:vt,96:mt},{10:z,12:Y,13:V,26:G,27:148,30:H,34:W,47:$,55:K,58:91,59:Z,60:102,61:X,62:J,63:Q,64:tt,65:et,66:nt,67:rt,69:93,70:it,76:ot,77:at,80:ut,81:st,82:ct,84:ft,85:lt,86:ht,87:dt,88:99,91:pt,92:gt,93:yt,94:bt,95:vt,96:mt},{10:z,12:Y,13:V,26:G,27:149,30:H,34:W,47:$,55:K,58:91,59:Z,60:102,61:X,62:J,63:Q,64:tt,65:et,66:nt,67:rt,69:93,70:it,76:ot,77:at,80:ut,81:st,82:ct,84:ft,85:lt,86:ht,87:dt,88:99,91:pt,92:gt,93:yt,94:bt,95:vt,96:mt},{10:z,12:Y,13:V,26:G,27:150,30:H,34:W,47:$,55:K,58:91,59:Z,60:102,61:X,62:J,63:Q,64:tt,65:et,66:nt,67:rt,69:93,70:it,76:ot,77:at,80:ut,81:st,82:ct,84:ft,85:lt,86:ht,87:dt,88:99,91:pt,92:gt,93:yt,94:bt,95:vt,96:mt},{10:z,12:Y,13:V,26:G,27:151,30:H,34:W,45:[1,152],47:$,55:K,58:91,59:Z,60:102,61:X,62:J,63:Q,64:tt,65:et,66:nt,67:rt,69:93,70:it,76:ot,77:at,80:ut,81:st,82:ct,84:ft,85:lt,86:ht,87:dt,88:99,91:pt,92:gt,93:yt,94:bt,95:vt,96:mt},{10:z,12:Y,13:V,26:G,27:153,30:H,34:W,47:$,55:K,58:91,59:Z,60:102,61:X,62:J,63:Q,64:tt,65:et,66:nt,67:rt,69:93,70:it,76:ot,77:at,80:ut,81:st,82:ct,84:ft,85:lt,86:ht,87:dt,88:99,91:pt,92:gt,93:yt,94:bt,95:vt,96:mt},{10:z,12:Y,13:V,26:G,27:154,30:H,34:W,47:$,55:K,58:91,59:Z,60:102,61:X,62:J,63:Q,64:tt,65:et,66:nt,67:rt,69:93,70:it,76:ot,77:at,80:ut,81:st,82:ct,84:ft,85:lt,86:ht,87:dt,88:99,91:pt,92:gt,93:yt,94:bt,95:vt,96:mt},{10:z,12:Y,13:V,26:G,27:155,30:H,34:W,47:$,55:K,58:91,59:Z,60:102,61:X,62:J,63:Q,64:tt,65:et,66:nt,67:rt,69:93,70:it,76:ot,77:at,80:ut,81:st,82:ct,84:ft,85:lt,86:ht,87:dt,88:99,91:pt,92:gt,93:yt,94:bt,95:vt,96:mt},t(F,[2,125]),t(i,[2,19]),t(q,[2,24]),t(L,[2,38],{17:156,10:C}),t(U,[2,59],{10:[1,157]}),{10:[1,158]},{10:z,12:Y,13:V,26:G,27:159,30:H,34:W,47:$,55:K,58:91,59:Z,60:102,61:X,62:J,63:Q,64:tt,65:et,66:nt,67:rt,69:93,70:it,76:ot,77:at,80:ut,81:st,82:ct,84:ft,85:lt,86:ht,87:dt,88:99,91:pt,92:gt,93:yt,94:bt,95:vt,96:mt},{10:z,12:Y,13:V,26:G,30:H,34:W,47:$,55:K,56:[1,160],58:161,60:102,61:X,62:J,63:Q,64:tt,65:et,66:nt,67:rt,69:93,70:it,76:ot,77:at,80:ut,81:st,82:ct,84:ft,85:lt,86:ht,87:dt,88:99,91:pt,92:gt,93:yt,94:bt,95:vt,96:mt},t(At,[2,66]),t(At,[2,68]),t(At,[2,114]),t(At,[2,115]),t(At,[2,116]),t(At,[2,117]),t(At,[2,118]),t(At,[2,119]),t(At,[2,120]),t(At,[2,121]),t(At,[2,122]),t(At,[2,123]),t(At,[2,132]),t(At,[2,133]),t(At,[2,134]),t(At,[2,135]),t(At,[2,136]),t(At,[2,137]),t(At,[2,138]),t(At,[2,139]),t(At,[2,140]),t(At,[2,141]),t(At,[2,142]),t(At,[2,143]),t(At,[2,144]),t(At,[2,69]),t(At,[2,70]),t(At,[2,71]),t(At,[2,72]),t(At,[2,73]),t(At,[2,74]),t(At,[2,75]),t(At,[2,76]),t(At,[2,77]),t(At,[2,78]),t(At,[2,79]),{8:I,9:R,10:z,11:j,12:Y,13:V,20:163,26:G,28:[1,162],30:H,34:W,47:$,55:K,58:161,60:102,61:X,62:J,63:Q,64:tt,65:et,66:nt,67:rt,69:93,70:it,76:ot,77:at,80:ut,81:st,82:ct,84:ft,85:lt,86:ht,87:dt,88:99,91:pt,92:gt,93:yt,94:bt,95:vt,96:mt},{6:10,7:11,8:a,9:u,10:s,11:c,19:16,21:17,22:18,23:19,24:20,25:21,26:f,30:[1,164],32:23,33:29,34:l,36:30,61:h,62:d,63:p,64:g,65:y,66:b,76:v,77:m,80:_,81:w,82:x,84:k,85:E,89:31,91:A,92:S,93:M,94:T,95:O,96:D},{10:C,17:165},{10:[1,166],13:xt,34:W,66:kt,76:ot,77:at,80:ut,81:st,82:Et,84:ft,85:lt,88:134,90:167,91:pt,92:gt,93:yt,94:bt,95:vt,96:mt},{10:[1,168]},t(St,[2,126]),t(St,[2,128]),t(St,[2,129]),t(St,[2,130]),t(St,[2,131]),{10:[1,169]},{10:[1,170],77:[1,171]},t(Mt,[2,97]),{10:[1,172]},{10:[1,173],13:xt,34:W,66:kt,76:ot,77:at,80:ut,81:st,82:Et,84:ft,85:lt,88:134,90:167,91:pt,92:gt,93:yt,94:bt,95:vt,96:mt},{10:[1,174],13:xt,34:W,66:kt,76:ot,77:at,80:ut,81:st,82:Et,84:ft,85:lt,88:134,90:167,91:pt,92:gt,93:yt,94:bt,95:vt,96:mt},{10:[1,175],13:xt,34:W,66:kt,76:ot,77:at,80:ut,81:st,82:Et,84:ft,85:lt,88:134,90:167,91:pt,92:gt,93:yt,94:bt,95:vt,96:mt},t(B,[2,44],{89:83,34:l,66:b,76:v,77:m,80:_,81:w,82:x,84:k,85:E,91:A,92:S,93:M,94:T,95:O,96:D}),{10:z,12:Y,13:V,26:G,29:[1,176],30:H,34:W,47:$,55:K,58:161,60:102,61:X,62:J,63:Q,64:tt,65:et,66:nt,67:rt,69:93,70:it,76:ot,77:at,80:ut,81:st,82:ct,84:ft,85:lt,86:ht,87:dt,88:99,91:pt,92:gt,93:yt,94:bt,95:vt,96:mt},{10:z,12:Y,13:V,26:G,27:177,30:H,34:W,47:$,55:K,58:91,59:Z,60:102,61:X,62:J,63:Q,64:tt,65:et,66:nt,67:rt,69:93,70:it,76:ot,77:at,80:ut,81:st,82:ct,84:ft,85:lt,86:ht,87:dt,88:99,91:pt,92:gt,93:yt,94:bt,95:vt,96:mt},{10:z,12:Y,13:V,26:G,30:H,34:W,38:[1,178],47:$,55:K,58:161,60:102,61:X,62:J,63:Q,64:tt,65:et,66:nt,67:rt,69:93,70:it,76:ot,77:at,80:ut,81:st,82:ct,84:ft,85:lt,86:ht,87:dt,88:99,91:pt,92:gt,93:yt,94:bt,95:vt,96:mt},{10:z,12:Y,13:V,26:G,30:H,34:W,40:[1,179],47:$,55:K,58:161,60:102,61:X,62:J,63:Q,64:tt,65:et,66:nt,67:rt,69:93,70:it,76:ot,77:at,80:ut,81:st,82:ct,84:ft,85:lt,86:ht,87:dt,88:99,91:pt,92:gt,93:yt,94:bt,95:vt,96:mt},{10:z,12:Y,13:V,26:G,30:H,34:W,42:[1,180],47:$,55:K,58:161,60:102,61:X,62:J,63:Q,64:tt,65:et,66:nt,67:rt,69:93,70:it,76:ot,77:at,80:ut,81:st,82:ct,84:ft,85:lt,86:ht,87:dt,88:99,91:pt,92:gt,93:yt,94:bt,95:vt,96:mt},{10:z,12:Y,13:V,26:G,30:H,34:W,44:[1,181],47:$,55:K,58:161,60:102,61:X,62:J,63:Q,64:tt,65:et,66:nt,67:rt,69:93,70:it,76:ot,77:at,80:ut,81:st,82:ct,84:ft,85:lt,86:ht,87:dt,88:99,91:pt,92:gt,93:yt,94:bt,95:vt,96:mt},{10:z,12:Y,13:V,26:G,30:H,34:W,46:[1,182],47:$,55:K,58:161,60:102,61:X,62:J,63:Q,64:tt,65:et,66:nt,67:rt,69:93,70:it,76:ot,77:at,80:ut,81:st,82:ct,84:ft,85:lt,86:ht,87:dt,88:99,91:pt,92:gt,93:yt,94:bt,95:vt,96:mt},{10:z,12:Y,13:V,26:G,27:183,30:H,34:W,47:$,55:K,58:91,59:Z,60:102,61:X,62:J,63:Q,64:tt,65:et,66:nt,67:rt,69:93,70:it,76:ot,77:at,80:ut,81:st,82:ct,84:ft,85:lt,86:ht,87:dt,88:99,91:pt,92:gt,93:yt,94:bt,95:vt,96:mt},{10:z,12:Y,13:V,26:G,29:[1,184],30:H,34:W,47:$,55:K,58:161,60:102,61:X,62:J,63:Q,64:tt,65:et,66:nt,67:rt,69:93,70:it,76:ot,77:at,80:ut,81:st,82:ct,84:ft,85:lt,86:ht,87:dt,88:99,91:pt,92:gt,93:yt,94:bt,95:vt,96:mt},{10:z,12:Y,13:V,26:G,30:H,34:W,47:$,49:[1,185],51:[1,186],55:K,58:161,60:102,61:X,62:J,63:Q,64:tt,65:et,66:nt,67:rt,69:93,70:it,76:ot,77:at,80:ut,81:st,82:ct,84:ft,85:lt,86:ht,87:dt,88:99,91:pt,92:gt,93:yt,94:bt,95:vt,96:mt},{10:z,12:Y,13:V,26:G,30:H,34:W,47:$,49:[1,188],51:[1,187],55:K,58:161,60:102,61:X,62:J,63:Q,64:tt,65:et,66:nt,67:rt,69:93,70:it,76:ot,77:at,80:ut,81:st,82:ct,84:ft,85:lt,86:ht,87:dt,88:99,91:pt,92:gt,93:yt,94:bt,95:vt,96:mt},t(L,[2,39],{34:wt}),t(U,[2,61]),t(U,[2,60]),{10:z,12:Y,13:V,26:G,30:H,34:W,47:$,55:K,57:[1,189],58:161,60:102,61:X,62:J,63:Q,64:tt,65:et,66:nt,67:rt,69:93,70:it,76:ot,77:at,80:ut,81:st,82:ct,84:ft,85:lt,86:ht,87:dt,88:99,91:pt,92:gt,93:yt,94:bt,95:vt,96:mt},t(U,[2,63]),t(At,[2,67]),{10:z,12:Y,13:V,26:G,27:190,30:H,34:W,47:$,55:K,58:91,59:Z,60:102,61:X,62:J,63:Q,64:tt,65:et,66:nt,67:rt,69:93,70:it,76:ot,77:at,80:ut,81:st,82:ct,84:ft,85:lt,86:ht,87:dt,88:99,91:pt,92:gt,93:yt,94:bt,95:vt,96:mt},t(_t,o,{5:191}),t(N,[2,34]),{33:192,34:l,36:30,66:b,76:v,77:m,80:_,81:w,82:x,84:k,85:E,89:31,91:A,92:S,93:M,94:T,95:O,96:D},{10:Tt,61:Ot,71:193,73:Dt,76:Ct,78:194,79:195,80:Nt,81:It,82:Rt,83:jt,84:Lt,85:Bt,86:Pt},t(St,[2,127]),{10:Tt,61:Ot,71:207,73:Dt,76:Ct,78:194,79:195,80:Nt,81:It,82:Rt,83:jt,84:Lt,85:Bt,86:Pt},{10:Tt,61:Ot,71:208,73:Dt,75:[1,209],76:Ct,78:194,79:195,80:Nt,81:It,82:Rt,83:jt,84:Lt,85:Bt,86:Pt},{10:Tt,61:Ot,71:210,73:Dt,75:[1,211],76:Ct,78:194,79:195,80:Nt,81:It,82:Rt,83:jt,84:Lt,85:Bt,86:Pt},{76:[1,212]},{10:Tt,61:Ot,71:213,73:Dt,76:Ct,78:194,79:195,80:Nt,81:It,82:Rt,83:jt,84:Lt,85:Bt,86:Pt},{10:Tt,61:Ot,71:214,73:Dt,76:Ct,78:194,79:195,80:Nt,81:It,82:Rt,83:jt,84:Lt,85:Bt,86:Pt},{13:xt,34:W,66:kt,72:215,76:ot,77:at,80:ut,81:st,82:Et,84:ft,85:lt,88:134,90:132,91:pt,92:gt,93:yt,94:bt,95:vt,96:mt},{13:xt,34:W,59:[1,217],66:kt,72:216,76:ot,77:at,80:ut,81:st,82:Et,84:ft,85:lt,88:134,90:132,91:pt,92:gt,93:yt,94:bt,95:vt,96:mt},t(P,[2,45]),{10:z,12:Y,13:V,26:G,30:H,34:W,38:[1,218],47:$,55:K,58:161,60:102,61:X,62:J,63:Q,64:tt,65:et,66:nt,67:rt,69:93,70:it,76:ot,77:at,80:ut,81:st,82:ct,84:ft,85:lt,86:ht,87:dt,88:99,91:pt,92:gt,93:yt,94:bt,95:vt,96:mt},t(P,[2,50]),t(P,[2,47]),t(P,[2,48]),t(P,[2,49]),t(P,[2,51]),{10:z,12:Y,13:V,26:G,30:H,34:W,46:[1,219],47:$,55:K,58:161,60:102,61:X,62:J,63:Q,64:tt,65:et,66:nt,67:rt,69:93,70:it,76:ot,77:at,80:ut,81:st,82:ct,84:ft,85:lt,86:ht,87:dt,88:99,91:pt,92:gt,93:yt,94:bt,95:vt,96:mt},t(P,[2,53]),t(P,[2,54]),t(P,[2,56]),t(P,[2,55]),t(P,[2,57]),t([10,34,66,76,77,80,81,82,84,85,91,92,93,94,95,96],[2,65]),{10:z,12:Y,13:V,26:G,29:[1,220],30:H,34:W,47:$,55:K,58:161,60:102,61:X,62:J,63:Q,64:tt,65:et,66:nt,67:rt,69:93,70:it,76:ot,77:at,80:ut,81:st,82:ct,84:ft,85:lt,86:ht,87:dt,88:99,91:pt,92:gt,93:yt,94:bt,95:vt,96:mt},{6:10,7:11,8:a,9:u,10:s,11:c,19:16,21:17,22:18,23:19,24:20,25:21,26:f,30:[1,221],32:23,33:29,34:l,36:30,61:h,62:d,63:p,64:g,65:y,66:b,76:v,77:m,80:_,81:w,82:x,84:k,85:E,89:31,91:A,92:S,93:M,94:T,95:O,96:D},t(B,[2,43]),t(Ft,[2,89],{77:qt}),t(Ut,[2,99],{79:223,10:Tt,61:Ot,73:Dt,76:Ct,80:Nt,81:It,82:Rt,83:jt,84:Lt,85:Bt,86:Pt}),t(zt,[2,101]),t(zt,[2,103]),t(zt,[2,104]),t(zt,[2,105]),t(zt,[2,106]),t(zt,[2,107]),t(zt,[2,108]),t(zt,[2,109]),t(zt,[2,110]),t(zt,[2,111]),t(zt,[2,112]),t(zt,[2,113]),t(Ft,[2,90],{77:qt}),t(Ft,[2,91],{77:qt}),{10:[1,224]},t(Ft,[2,92],{77:qt}),{10:[1,225]},t(Mt,[2,98]),t(Ft,[2,82],{77:qt}),t(Ft,[2,83],{77:qt}),t(Ft,[2,84],{88:134,90:167,13:xt,34:W,66:kt,76:ot,77:at,80:ut,81:st,82:Et,84:ft,85:lt,91:pt,92:gt,93:yt,94:bt,95:vt,96:mt}),t(Ft,[2,85],{88:134,90:167,10:[1,226],13:xt,34:W,66:kt,76:ot,77:at,80:ut,81:st,82:Et,84:ft,85:lt,91:pt,92:gt,93:yt,94:bt,95:vt,96:mt}),t(Ft,[2,87],{10:[1,227]}),{38:[1,228]},{46:[1,229]},{8:I,9:R,11:j,20:230},t(N,[2,33]),{10:Tt,61:Ot,73:Dt,76:Ct,78:231,79:195,80:Nt,81:It,82:Rt,83:jt,84:Lt,85:Bt,86:Pt},t(zt,[2,102]),{13:xt,34:W,66:kt,72:232,76:ot,77:at,80:ut,81:st,82:Et,84:ft,85:lt,88:134,90:132,91:pt,92:gt,93:yt,94:bt,95:vt,96:mt},{13:xt,34:W,66:kt,72:233,76:ot,77:at,80:ut,81:st,82:Et,84:ft,85:lt,88:134,90:132,91:pt,92:gt,93:yt,94:bt,95:vt,96:mt},{59:[1,234]},{59:[1,235]},t(P,[2,46]),t(P,[2,52]),t(_t,o,{5:236}),t(Ut,[2,100],{79:223,10:Tt,61:Ot,73:Dt,76:Ct,80:Nt,81:It,82:Rt,83:jt,84:Lt,85:Bt,86:Pt}),t(Ft,[2,95],{88:134,90:167,10:[1,237],13:xt,34:W,66:kt,76:ot,77:at,80:ut,81:st,82:Et,84:ft,85:lt,91:pt,92:gt,93:yt,94:bt,95:vt,96:mt}),t(Ft,[2,96],{88:134,90:167,10:[1,238],13:xt,34:W,66:kt,76:ot,77:at,80:ut,81:st,82:Et,84:ft,85:lt,91:pt,92:gt,93:yt,94:bt,95:vt,96:mt}),t(Ft,[2,86]),t(Ft,[2,88]),{6:10,7:11,8:a,9:u,10:s,11:c,19:16,21:17,22:18,23:19,24:20,25:21,26:f,30:[1,239],32:23,33:29,34:l,36:30,61:h,62:d,63:p,64:g,65:y,66:b,76:v,77:m,80:_,81:w,82:x,84:k,85:E,89:31,91:A,92:S,93:M,94:T,95:O,96:D},{10:Tt,61:Ot,71:240,73:Dt,76:Ct,78:194,79:195,80:Nt,81:It,82:Rt,83:jt,84:Lt,85:Bt,86:Pt},{10:Tt,61:Ot,71:241,73:Dt,76:Ct,78:194,79:195,80:Nt,81:It,82:Rt,83:jt,84:Lt,85:Bt,86:Pt},t(N,[2,32]),t(Ft,[2,93],{77:qt}),t(Ft,[2,94],{77:qt})],defaultActions:{},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],o=[],a=this.table,u="",s=0,c=0,f=0,l=2,h=1,d=o.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var b=p.yylloc;o.push(b);var v=p.options&&p.options.ranges;function m(){var t;return"number"!=typeof(t=r.pop()||p.lex()||h)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var _,w,x,k,E,A,S,M,T,O={};;){if(x=n[n.length-1],this.defaultActions[x]?k=this.defaultActions[x]:(null==_&&(_=m()),k=a[x]&&a[x][_]),void 0===k||!k.length||!k[0]){var D="";for(A in T=[],a[x])this.terminals_[A]&&A>l&&T.push("'"+this.terminals_[A]+"'");D=p.showPosition?"Parse error on line "+(s+1)+":\n"+p.showPosition()+"\nExpecting "+T.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(s+1)+": Unexpected "+(_==h?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(D,{text:p.match,token:this.terminals_[_]||_,line:p.yylineno,loc:b,expected:T})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+x+", token: "+_);switch(k[0]){case 1:n.push(_),i.push(p.yytext),o.push(p.yylloc),n.push(k[1]),_=null,w?(_=w,w=null):(c=p.yyleng,u=p.yytext,s=p.yylineno,b=p.yylloc,f>0&&f--);break;case 2:if(S=this.productions_[k[1]][1],O.$=i[i.length-S],O._$={first_line:o[o.length-(S||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(S||1)].first_column,last_column:o[o.length-1].last_column},v&&(O._$.range=[o[o.length-(S||1)].range[0],o[o.length-1].range[1]]),void 0!==(E=this.performAction.apply(O,[u,c,s,g.yy,k[1],i,o].concat(d))))return E;S&&(n=n.slice(0,-1*S*2),i=i.slice(0,-1*S),o=o.slice(0,-1*S)),n.push(this.productions_[k[1]][0]),i.push(O.$),o.push(O._$),M=a[n[n.length-2]][n[n.length-1]],n.push(M);break;case 3:return!0}}return!0}},Vt={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var o in i)this[o]=i[o];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),o=0;o<i.length;o++)if((n=this._input.match(this.rules[i[o]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=o,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[o])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,e,n,r){switch(n){case 0:break;case 1:this.begin("string");break;case 2:this.popState();break;case 3:return"STR";case 4:return 61;case 5:return 70;case 6:return 62;case 7:return 75;case 8:return 63;case 9:return 64;case 10:return 65;case 11:case 12:return t.lex.firstGraph()&&this.begin("dir"),12;case 13:return 26;case 14:return 30;case 15:case 16:case 17:case 18:case 19:case 20:case 21:case 22:case 23:case 24:return this.popState(),13;case 25:return 76;case 26:return 84;case 27:return 35;case 28:return 81;case 29:return 34;case 30:return 8;case 31:return 77;case 32:return 95;case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:case 58:case 59:case 60:return 56;case 61:case 62:case 63:case 64:case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:return 55;case 73:return 39;case 74:return 40;case 75:return 41;case 76:return 42;case 77:return 43;case 78:return 44;case 79:return 82;case 80:return 85;case 81:return 96;case 82:return 93;case 83:return 86;case 84:case 85:return 94;case 86:return 87;case 87:return 47;case 88:return 67;case 89:return"SEP";case 90:return 66;case 91:return 80;case 92:return 49;case 93:return 48;case 94:return 51;case 95:return 50;case 96:return 91;case 97:return 92;case 98:return 57;case 99:return 37;case 100:return 38;case 101:return 28;case 102:return 29;case 103:return 45;case 104:return 46;case 105:return 102;case 106:return 9;case 107:return 10;case 108:return 11}},rules:[/^(?:%%[^\n]*\n*)/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:click\b)/,/^(?:graph\b)/,/^(?:flowchart\b)/,/^(?:subgraph\b)/,/^(?:end\b\s*)/,/^(?:\s*LR\b)/,/^(?:\s*RL\b)/,/^(?:\s*TB\b)/,/^(?:\s*BT\b)/,/^(?:\s*TD\b)/,/^(?:\s*BR\b)/,/^(?:\s*<)/,/^(?:\s*>)/,/^(?:\s*\^)/,/^(?:\s*v\b)/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::::)/,/^(?::)/,/^(?:&)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:\s*--[x]\s*)/,/^(?:\s*-->\s*)/,/^(?:\s*<-->\s*)/,/^(?:\s*[x]--[x]\s*)/,/^(?:\s*[o]--[o]\s*)/,/^(?:\s*[o]\.-[o]\s*)/,/^(?:\s*<==>\s*)/,/^(?:\s*[o]==[o]\s*)/,/^(?:\s*[x]==[x]\s*)/,/^(?:\s*[x].-[x]\s*)/,/^(?:\s*[x]-\.-[x]\s*)/,/^(?:\s*<\.->\s*)/,/^(?:\s*<-\.->\s*)/,/^(?:\s*[o]-\.-[o]\s*)/,/^(?:\s*--[o]\s*)/,/^(?:\s*---\s*)/,/^(?:\s*-\.-[x]\s*)/,/^(?:\s*-\.->\s*)/,/^(?:\s*-\.-[o]\s*)/,/^(?:\s*-\.-\s*)/,/^(?:\s*.-[x]\s*)/,/^(?:\s*\.->\s*)/,/^(?:\s*\.-[o]\s*)/,/^(?:\s*\.-\s*)/,/^(?:\s*==[x]\s*)/,/^(?:\s*==>\s*)/,/^(?:\s*==[o]\s*)/,/^(?:\s*==[\=]\s*)/,/^(?:\s*<--\s*)/,/^(?:\s*[x]--\s*)/,/^(?:\s*[o]--\s*)/,/^(?:\s*<-\.\s*)/,/^(?:\s*[x]-\.\s*)/,/^(?:\s*[o]-\.\s*)/,/^(?:\s*<==\s*)/,/^(?:\s*[x]==\s*)/,/^(?:\s*[o]==\s*)/,/^(?:\s*--\s*)/,/^(?:\s*-\.\s*)/,/^(?:\s*==\s*)/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\[)/,/^(?:\]\))/,/^(?:\[\()/,/^(?:\)\])/,/^(?:-)/,/^(?:\.)/,/^(?:[\_])/,/^(?:\+)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:\\\|)/,/^(?:v\b)/,/^(?:[A-Za-z]+)/,/^(?:\\\])/,/^(?:\[\/)/,/^(?:\/\])/,/^(?:\[\\)/,/^(?:[!"#$%&'*+,-.`?\\_/])/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\|)/,/^(?:\()/,/^(?:\))/,/^(?:\[)/,/^(?:\])/,/^(?:\{)/,/^(?:\})/,/^(?:")/,/^(?:(\r|\n|\r\n)+)/,/^(?:\s)/,/^(?:$)/],conditions:{vertex:{rules:[],inclusive:!1},dir:{rules:[15,16,17,18,19,20,21,22,23,24],inclusive:!1},string:{rules:[2,3],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,8,9,10,11,12,13,14,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108],inclusive:!0}}};function Gt(){this.yy={}}return Yt.lexer=Vt,Gt.prototype=Yt,Yt.Parser=Gt,new Gt}();e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(r){r[1]||(console.log("Usage: "+r[0]+" FILE"),t.exit(1));var i=n(54).readFileSync(n(55).normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n(17),n(14)(t))},function(t,e,n){"use strict";var r=n(4);n.d(e,"g",(function(){return r.a}));var i=n(123);n.d(e,"h",(function(){return i.a})),n.d(e,"i",(function(){return i.b})),n.d(e,"L",(function(){return i.a})),n.d(e,"M",(function(){return i.b}));var o=n(122);n.d(e,"r",(function(){return o.a})),n.d(e,"s",(function(){return o.b})),n.d(e,"V",(function(){return o.a})),n.d(e,"W",(function(){return o.b}));var a=n(220);n.d(e,"j",(function(){return a.a})),n.d(e,"k",(function(){return a.b}));var u=n(219);n.d(e,"e",(function(){return u.a})),n.d(e,"f",(function(){return u.b}));var s=n(141);n.d(e,"a",(function(){return s.b})),n.d(e,"b",(function(){return s.a}));var c=n(9);n.d(e,"B",(function(){return c.g})),n.d(e,"C",(function(){return c.h})),n.d(e,"t",(function(){return c.g})),n.d(e,"u",(function(){return c.h})),n.d(e,"l",(function(){return c.c})),n.d(e,"m",(function(){return c.d})),n.d(e,"x",(function(){return c.k})),n.d(e,"y",(function(){return c.l})),n.d(e,"z",(function(){return c.m})),n.d(e,"A",(function(){return c.n})),n.d(e,"v",(function(){return c.i})),n.d(e,"w",(function(){return c.j})),n.d(e,"c",(function(){return c.a})),n.d(e,"d",(function(){return c.b})),n.d(e,"p",(function(){return c.e})),n.d(e,"q",(function(){return c.f}));var f=n(218);n.d(e,"n",(function(){return f.a})),n.d(e,"o",(function(){return f.b}));var l=n(70);n.d(e,"D",(function(){return l.a})),n.d(e,"E",(function(){return l.b}));var h=n(223);n.d(e,"N",(function(){return h.a})),n.d(e,"O",(function(){return h.b}));var d=n(222);n.d(e,"J",(function(){return d.a})),n.d(e,"K",(function(){return d.b}));var p=n(142);n.d(e,"F",(function(){return p.a})),n.d(e,"G",(function(){return p.b}));var g=n(10);n.d(e,"fb",(function(){return g.g})),n.d(e,"gb",(function(){return g.h})),n.d(e,"X",(function(){return g.g})),n.d(e,"Y",(function(){return g.h})),n.d(e,"P",(function(){return g.c})),n.d(e,"Q",(function(){return g.d})),n.d(e,"bb",(function(){return g.k})),n.d(e,"cb",(function(){return g.l})),n.d(e,"db",(function(){return g.m})),n.d(e,"eb",(function(){return g.n})),n.d(e,"Z",(function(){return g.i})),n.d(e,"ab",(function(){return g.j})),n.d(e,"H",(function(){return g.a})),n.d(e,"I",(function(){return g.b})),n.d(e,"T",(function(){return g.e})),n.d(e,"U",(function(){return g.f}));var y=n(221);n.d(e,"R",(function(){return y.a})),n.d(e,"S",(function(){return y.b}));var b=n(71);n.d(e,"hb",(function(){return b.a})),n.d(e,"ib",(function(){return b.b}))},function(t,e,n){var r=n(466),i=n(471);t.exports=function(t,e){var n=i(t,e);return r(n)?n:void 0}},function(t,e,n){var r=n(87),i=n(467),o=n(468),a=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":a&&a in Object(t)?i(t):o(t)}},function(t,e){t.exports=function(t){return t}},function(t,e,n){var r=n(579),i=n(584);t.exports=function(t,e){var n=i(t,e);return r(n)?n:void 0}},function(t,e,n){var r=n(94),i=n(580),o=n(581),a=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":a&&a in Object(t)?i(t):o(t)}},function(t,e){t.exports=function(t){return t}},function(t,e,n){"use strict";var r=n(180),i=Object.keys||function(t){var e=[];for(var n in t)e.push(n);return e};t.exports=l;var o=Object.create(n(134));o.inherits=n(2);var a=n(410),u=n(269);o.inherits(l,a);for(var s=i(u.prototype),c=0;c<s.length;c++){var f=s[c];l.prototype[f]||(l.prototype[f]=u.prototype[f])}function l(t){if(!(this instanceof l))return new l(t);a.call(this,t),u.call(this,t),t&&!1===t.readable&&(this.readable=!1),t&&!1===t.writable&&(this.writable=!1),this.allowHalfOpen=!0,t&&!1===t.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",h)}function h(){this.allowHalfOpen||this._writableState.ended||r.nextTick(d,this)}function d(t){t.end()}Object.defineProperty(l.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(l.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}}),l.prototype._destroy=function(t,e){this.push(null),this.end(),r.nextTick(e,t)}},function(t,e,n){"use strict";var r=n(58),i=n(283),o=function(t,e,n){var i=new r.a,o=e;return null==e?(i.restart(t,e,n),i):(e=+e,n=null==n?Object(r.b)():+n,i.restart((function r(a){a+=o,i.restart(r,o+=e,n),t(a)}),e,n),i)};n.d(e,"b",(function(){return r.b})),n.d(e,"d",(function(){return r.c})),n.d(e,"e",(function(){return r.d})),n.d(e,"c",(function(){return i.a})),n.d(e,"a",(function(){return o}))},function(t,e,n){"use strict";n.d(e,"b",(function(){return s})),n.d(e,"c",(function(){return c}));var r=n(11),i=n(104),o=n(201),a=n(6);function u(t){return function(e){var n,i,o=e.length,a=new Array(o),u=new Array(o),s=new Array(o);for(n=0;n<o;++n)i=Object(r.g)(e[n]),a[n]=i.r||0,u[n]=i.g||0,s[n]=i.b||0;return a=t(a),u=t(u),s=t(s),i.opacity=1,function(t){return i.r=a(t),i.g=u(t),i.b=s(t),i+""}}}e.a=function t(e){var n=Object(a.b)(e);function i(t,e){var i=n((t=Object(r.g)(t)).r,(e=Object(r.g)(e)).r),o=n(t.g,e.g),u=n(t.b,e.b),s=Object(a.a)(t.opacity,e.opacity);return function(e){return t.r=i(e),t.g=o(e),t.b=u(e),t.opacity=s(e),t+""}}return i.gamma=t,i}(1);var s=u(i.b),c=u(o.a)},function(t,e,n){"use strict";e.a=function(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(t,e,n){"use strict";var r=n(145);n.d(e,"c",(function(){return r.a})),n.d(e,"b",(function(){return r.b})),n.d(e,"e",(function(){return r.c}));var i=n(210);n.d(e,"d",(function(){return i.a}));var o=n(111);n.d(e,"f",(function(){return o.b})),n.d(e,"a",(function(){return o.a}));var a=n(287);n.d(e,"g",(function(){return a.a}));var u=n(288);n.d(e,"h",(function(){return u.a}));var s=n(289);n.d(e,"i",(function(){return s.a}))},function(t,e,n){"use strict";var r=n(445);n.d(e,"a",(function(){return r.a}))},function(t,e){t.exports=function(t,e){return t===e||t!=t&&e!=e}},function(t,e,n){var r=n(35).Symbol;t.exports=r},function(t,e,n){(function(t){var r=n(35),i=n(487),o=e&&!e.nodeType&&e,a=o&&"object"==typeof t&&t&&!t.nodeType&&t,u=a&&a.exports===o?r.Buffer:void 0,s=(u?u.isBuffer:void 0)||i;t.exports=s}).call(this,n(14)(t))},function(t,e,n){var r=n(297),i=n(491),o=n(52);t.exports=function(t){return o(t)?r(t,!0):i(t)}},function(t,e,n){var r=n(496),i=n(225),o=n(497),a=n(306),u=n(498),s=n(75),c=n(295),f=c(r),l=c(i),h=c(o),d=c(a),p=c(u),g=s;(r&&"[object DataView]"!=g(new r(new ArrayBuffer(1)))||i&&"[object Map]"!=g(new i)||o&&"[object Promise]"!=g(o.resolve())||a&&"[object Set]"!=g(new a)||u&&"[object WeakMap]"!=g(new u))&&(g=function(t){var e=s(t),n="[object Object]"==e?t.constructor:void 0,r=n?c(n):"";if(r)switch(r){case f:return"[object DataView]";case l:return"[object Map]";case h:return"[object Promise]";case d:return"[object Set]";case p:return"[object WeakMap]"}return e}),t.exports=g},function(t,e,n){var r=n(75),i=n(43);t.exports=function(t){return"symbol"==typeof t||i(t)&&"[object Symbol]"==r(t)}},function(t,e){t.exports=function(t,e){return t===e||t!=t&&e!=e}},function(t,e,n){var r=n(78),i=n(30);t.exports=function(t){if(!i(t))return!1;var e=r(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},function(t,e,n){var r=n(36).Symbol;t.exports=r},function(t,e,n){(function(t){var r=n(36),i=n(600),o=e&&!e.nodeType&&e,a=o&&"object"==typeof t&&t&&!t.nodeType&&t,u=a&&a.exports===o?r.Buffer:void 0,s=(u?u.isBuffer:void 0)||i;t.exports=s}).call(this,n(14)(t))},function(t,e,n){var r=n(345),i=n(604),o=n(56);t.exports=function(t){return o(t)?r(t,!0):i(t)}},function(t,e,n){var r=n(609),i=n(242),o=n(610),a=n(354),u=n(611),s=n(78),c=n(343),f=c(r),l=c(i),h=c(o),d=c(a),p=c(u),g=s;(r&&"[object DataView]"!=g(new r(new ArrayBuffer(1)))||i&&"[object Map]"!=g(new i)||o&&"[object Promise]"!=g(o.resolve())||a&&"[object Set]"!=g(new a)||u&&"[object WeakMap]"!=g(new u))&&(g=function(t){var e=s(t),n="[object Object]"==e?t.constructor:void 0,r=n?c(n):"";if(r)switch(r){case f:return"[object DataView]";case l:return"[object Map]";case h:return"[object Promise]";case d:return"[object Set]";case p:return"[object WeakMap]"}return e}),t.exports=g},function(t,e,n){var r=n(78),i=n(44);t.exports=function(t){return"symbol"==typeof t||i(t)&&"[object Symbol]"==r(t)}},function(t,e,n){var r;try{r={defaults:n(387),each:n(252),isFunction:n(93),isPlainObject:n(391),pick:n(394),has:n(258),range:n(395),uniqueId:n(396)}}catch(t){}r||(r=window._),t.exports=r},function(t,e,n){"use strict";(function(e,r){var i=n(3).Buffer,o=e.crypto||e.msCrypto;o&&o.getRandomValues?t.exports=function(t,e){if(t>4294967295)throw new RangeError("requested too many random bytes");var n=i.allocUnsafe(t);if(t>0)if(t>65536)for(var a=0;a<t;a+=65536)o.getRandomValues(n.slice(a,a+65536));else o.getRandomValues(n);if("function"==typeof e)return r.nextTick((function(){e(null,n)}));return n}:t.exports=function(){throw new Error("Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11")}}).call(this,n(25),n(17))},function(t,e,n){var r=n(3).Buffer;function i(t,e){this._block=r.alloc(t),this._finalSize=e,this._blockSize=t,this._len=0}i.prototype.update=function(t,e){"string"==typeof t&&(e=e||"utf8",t=r.from(t,e));for(var n=this._block,i=this._blockSize,o=t.length,a=this._len,u=0;u<o;){for(var s=a%i,c=Math.min(o-u,i-s),f=0;f<c;f++)n[s+f]=t[u+f];u+=c,(a+=c)%i==0&&this._update(n)}return this._len+=o,this},i.prototype.digest=function(t){var e=this._len%this._blockSize;this._block[e]=128,this._block.fill(0,e+1),e>=this._finalSize&&(this._update(this._block),this._block.fill(0));var n=8*this._len;if(n<=4294967295)this._block.writeUInt32BE(n,this._blockSize-4);else{var r=(4294967295&n)>>>0,i=(n-r)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(r,this._blockSize-4)}this._update(this._block);var o=this._hash();return t?o.toString(t):o},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},t.exports=i},function(t,e,n){"use strict";var r=n(282),i=n(47),o=n(285),a=n(113),u=n(284),s=n(109),c=n(41),f=function(t){return function(){return t}};function l(t,e,n,r,i,o,a,u,s,c){this.target=t,this.type=e,this.subject=n,this.identifier=r,this.active=i,this.x=o,this.y=a,this.dx=u,this.dy=s,this._=c}function h(){return!i.c.ctrlKey&&!i.c.button}function d(){return this.parentNode}function p(t){return null==t?{x:i.c.x,y:i.c.y}:t}function g(){return navigator.maxTouchPoints||"ontouchstart"in this}l.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};var y=function(){var t,e,n,y,b=h,v=d,m=p,_=g,w={},x=Object(r.a)("start","drag","end"),k=0,E=0;function A(t){t.on("mousedown.drag",S).filter(_).on("touchstart.drag",O).on("touchmove.drag",D).on("touchend.drag touchcancel.drag",C).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function S(){if(!y&&b.apply(this,arguments)){var r=N("mouse",v.apply(this,arguments),o.a,this,arguments);r&&(Object(a.a)(i.c.view).on("mousemove.drag",M,!0).on("mouseup.drag",T,!0),Object(s.a)(i.c.view),Object(c.b)(),n=!1,t=i.c.clientX,e=i.c.clientY,r("start"))}}function M(){if(Object(c.a)(),!n){var r=i.c.clientX-t,o=i.c.clientY-e;n=r*r+o*o>E}w.mouse("drag")}function T(){Object(a.a)(i.c.view).on("mousemove.drag mouseup.drag",null),Object(s.b)(i.c.view,n),Object(c.a)(),w.mouse("end")}function O(){if(b.apply(this,arguments)){var t,e,n=i.c.changedTouches,r=v.apply(this,arguments),o=n.length;for(t=0;t<o;++t)(e=N(n[t].identifier,r,u.a,this,arguments))&&(Object(c.b)(),e("start"))}}function D(){var t,e,n=i.c.changedTouches,r=n.length;for(t=0;t<r;++t)(e=w[n[t].identifier])&&(Object(c.a)(),e("drag"))}function C(){var t,e,n=i.c.changedTouches,r=n.length;for(y&&clearTimeout(y),y=setTimeout((function(){y=null}),500),t=0;t<r;++t)(e=w[n[t].identifier])&&(Object(c.b)(),e("end"))}function N(t,e,n,r,o){var a,u,s,c=n(e,t),f=x.copy();if(Object(i.a)(new l(A,"beforestart",a,t,k,c[0],c[1],0,0,f),(function(){return null!=(i.c.subject=a=m.apply(r,o))&&(u=a.x-c[0]||0,s=a.y-c[1]||0,!0)})))return function h(d){var p,g=c;switch(d){case"start":w[t]=h,p=k++;break;case"end":delete w[t],--k;case"drag":c=n(e,t),p=k}Object(i.a)(new l(A,d,a,t,p,c[0]+u,c[1]+s,c[0]-g[0],c[1]-g[1],f),f.apply,f,[d,r,o])}}return A.filter=function(t){return arguments.length?(b="function"==typeof t?t:f(!!t),A):b},A.container=function(t){return arguments.length?(v="function"==typeof t?t:f(t),A):v},A.subject=function(t){return arguments.length?(m="function"==typeof t?t:f(t),A):m},A.touchable=function(t){return arguments.length?(_="function"==typeof t?t:f(!!t),A):_},A.on=function(){var t=x.on.apply(x,arguments);return t===x?A:t},A.clickDistance=function(t){return arguments.length?(E=(t=+t)*t,A):Math.sqrt(E)},A};n.d(e,"a",(function(){return y})),n.d(e,"b",(function(){return s.a})),n.d(e,"c",(function(){return s.b}))},function(t,e,n){"use strict";var r=n(46),i=n(209);var o=Date.prototype.toISOString?function(t){return t.toISOString()}:Object(r.d)("%Y-%m-%dT%H:%M:%S.%LZ");var a=+new Date("2000-01-01T00:00:00.000Z")?function(t){var e=new Date(t);return isNaN(e)?null:e}:Object(r.e)("%Y-%m-%dT%H:%M:%S.%LZ");n.d(e,"d",(function(){return r.a})),n.d(e,"c",(function(){return r.b})),n.d(e,"f",(function(){return r.c})),n.d(e,"g",(function(){return r.d})),n.d(e,"h",(function(){return r.e})),n.d(e,"e",(function(){return i.a})),n.d(e,"a",(function(){return o})),n.d(e,"b",(function(){return a}))},function(t,e,n){"use strict";function r(t,e,n,r,i){var o=t*t,a=o*t;return((1-3*t+3*o-a)*e+(4-6*o+3*a)*n+(1+3*t+3*o-3*a)*r+a*i)/6}n.d(e,"a",(function(){return r})),e.b=function(t){var e=t.length-1;return function(n){var i=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),o=t[i],a=t[i+1],u=i>0?t[i-1]:2*o-a,s=i<e-1?t[i+2]:2*a-o;return r((n-i/e)*e,u,o,a,s)}}},function(t,e,n){"use strict";var r=n(68);e.a=function(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),r.a.hasOwnProperty(e)?{space:r.a[e],local:t}:t}},function(t,e,n){"use strict";function r(){}e.a=function(t){return null==t?r:function(){return this.querySelector(t)}}},function(t,e,n){"use strict";e.a=function(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}},function(t,e,n){"use strict";var r=n(11),i=n(82),o=n(207),a=n(206),u=n(23),s=n(208),c=n(202),f=n(115),l=n(69);e.a=function(t,e){var n,h=typeof e;return null==e||"boolean"===h?Object(f.a)(e):("number"===h?u.a:"string"===h?(n=Object(r.e)(e))?(e=n,i.a):c.a:e instanceof r.e?i.a:e instanceof Date?a.a:Object(l.b)(e)?l.a:Array.isArray(e)?o.b:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?s.a:u.a)(t,e)}},function(t,e,n){"use strict";n.d(e,"b",(function(){return o}));var r=n(113),i=n(41);function o(t,e){var n=t.document.documentElement,o=Object(r.a)(t).on("dragstart.drag",null);e&&(o.on("click.drag",i.a,!0),setTimeout((function(){o.on("click.drag",null)}),0)),"onselectstart"in n?o.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}e.a=function(t){var e=t.document.documentElement,n=Object(r.a)(t).on("dragstart.drag",i.a,!0);"onselectstart"in e?n.on("selectstart.drag",i.a,!0):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}},function(t,e,n){"use strict";var r={},i={};function o(t){return new Function("d","return {"+t.map((function(t,e){return JSON.stringify(t)+": d["+e+'] || ""'})).join(",")+"}")}function a(t){var e=Object.create(null),n=[];return t.forEach((function(t){for(var r in t)r in e||n.push(e[r]=r)})),n}function u(t,e){var n=t+"",r=n.length;return r<e?new Array(e-r+1).join(0)+n:n}function s(t){var e,n=t.getUTCHours(),r=t.getUTCMinutes(),i=t.getUTCSeconds(),o=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":((e=t.getUTCFullYear())<0?"-"+u(-e,6):e>9999?"+"+u(e,6):u(e,4))+"-"+u(t.getUTCMonth()+1,2)+"-"+u(t.getUTCDate(),2)+(o?"T"+u(n,2)+":"+u(r,2)+":"+u(i,2)+"."+u(o,3)+"Z":i?"T"+u(n,2)+":"+u(r,2)+":"+u(i,2)+"Z":r||n?"T"+u(n,2)+":"+u(r,2)+"Z":"")}e.a=function(t){var e=new RegExp('["'+t+"\n\r]"),n=t.charCodeAt(0);function u(t,e){var o,a=[],u=t.length,s=0,c=0,f=u<=0,l=!1;function h(){if(f)return i;if(l)return l=!1,r;var e,o,a=s;if(34===t.charCodeAt(a)){for(;s++<u&&34!==t.charCodeAt(s)||34===t.charCodeAt(++s););return(e=s)>=u?f=!0:10===(o=t.charCodeAt(s++))?l=!0:13===o&&(l=!0,10===t.charCodeAt(s)&&++s),t.slice(a+1,e-1).replace(/""/g,'"')}for(;s<u;){if(10===(o=t.charCodeAt(e=s++)))l=!0;else if(13===o)l=!0,10===t.charCodeAt(s)&&++s;else if(o!==n)continue;return t.slice(a,e)}return f=!0,t.slice(a,u)}for(10===t.charCodeAt(u-1)&&--u,13===t.charCodeAt(u-1)&&--u;(o=h())!==i;){for(var d=[];o!==r&&o!==i;)d.push(o),o=h();e&&null==(d=e(d,c++))||a.push(d)}return a}function c(e,n){return e.map((function(e){return n.map((function(t){return l(e[t])})).join(t)}))}function f(e){return e.map(l).join(t)}function l(t){return null==t?"":t instanceof Date?s(t):e.test(t+="")?'"'+t.replace(/"/g,'""')+'"':t}return{parse:function(t,e){var n,r,i=u(t,(function(t,i){if(n)return n(t,i-1);r=t,n=e?function(t,e){var n=o(t);return function(r,i){return e(n(r),i,t)}}(t,e):o(t)}));return i.columns=r||[],i},parseRows:u,format:function(e,n){return null==n&&(n=a(e)),[n.map(l).join(t)].concat(c(e,n)).join("\n")},formatBody:function(t,e){return null==e&&(e=a(t)),c(t,e).join("\n")},formatRows:function(t){return t.map(f).join("\n")},formatRow:f,formatValue:l}}},function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"a",(function(){return o}));var r=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function i(t){if(!(e=r.exec(t)))throw new Error("invalid format: "+t);var e;return new o({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 o(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+""}i.prototype=o.prototype,o.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}},function(t,e,n){"use strict";var r=n(47);e.a=function(){for(var t,e=r.c;t=e.sourceEvent;)e=t;return e}},function(t,e,n){"use strict";var r=n(49);e.a=function(t){return"string"==typeof t?new r.a([[document.querySelector(t)]],[document.documentElement]):new r.a([[t]],r.c)}},function(t,e,n){t.exports={graphlib:n(38),layout:n(751),debug:n(810),util:{time:n(22).time,notime:n(22).notime},version:n(811)}},function(t,e,n){"use strict";e.a=function(t){return function(){return t}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r})),n.d(e,"b",(function(){return i}));var r=Math.PI/180,i=180/Math.PI},function(t,e,n){(function(t,r){var i=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,13],n=[1,16],r=[1,14],i=[1,15],o=[1,17],a=[1,18],u=[1,20],s=[1,21],c=[1,22],f=[6,8],l=[1,31],h=[1,32],d=[1,33],p=[1,34],g=[1,35],y=[1,36],b=[6,8,14,20,28,31,32,33,34,35,36],v=[6,8,12,14,20,24,28,31,32,33,34,35,36,52,53,54],m=[28,52,53,54],_=[28,35,36,52,53,54],w=[28,31,32,33,34,52,53,54],x=[6,8,14],k=[1,59],E={trace:function(){},yy:{},symbols_:{error:2,mermaidDoc:3,graphConfig:4,CLASS_DIAGRAM:5,NEWLINE:6,statements:7,EOF:8,statement:9,className:10,alphaNumToken:11,GENERICTYPE:12,relationStatement:13,LABEL:14,classStatement:15,methodStatement:16,annotationStatement:17,clickStatement:18,CLASS:19,STRUCT_START:20,members:21,STRUCT_STOP:22,ANNOTATION_START:23,ANNOTATION_END:24,MEMBER:25,SEPARATOR:26,relation:27,STR:28,relationType:29,lineType:30,AGGREGATION:31,EXTENSION:32,COMPOSITION:33,DEPENDENCY:34,LINE:35,DOTTED_LINE:36,CALLBACK:37,LINK:38,commentToken:39,textToken:40,graphCodeTokens:41,textNoTagsToken:42,TAGSTART:43,TAGEND:44,"==":45,"--":46,PCT:47,DEFAULT:48,SPACE:49,MINUS:50,keywords:51,UNICODE_TEXT:52,NUM:53,ALPHA:54,$accept:0,$end:1},terminals_:{2:"error",5:"CLASS_DIAGRAM",6:"NEWLINE",8:"EOF",12:"GENERICTYPE",14:"LABEL",19:"CLASS",20:"STRUCT_START",22:"STRUCT_STOP",23:"ANNOTATION_START",24:"ANNOTATION_END",25:"MEMBER",26:"SEPARATOR",28:"STR",31:"AGGREGATION",32:"EXTENSION",33:"COMPOSITION",34:"DEPENDENCY",35:"LINE",36:"DOTTED_LINE",37:"CALLBACK",38:"LINK",41:"graphCodeTokens",43:"TAGSTART",44:"TAGEND",45:"==",46:"--",47:"PCT",48:"DEFAULT",49:"SPACE",50:"MINUS",51:"keywords",52:"UNICODE_TEXT",53:"NUM",54:"ALPHA"},productions_:[0,[3,1],[4,4],[7,1],[7,2],[7,3],[10,2],[10,1],[10,3],[10,2],[9,1],[9,2],[9,1],[9,1],[9,1],[9,1],[15,2],[15,5],[17,4],[21,1],[21,2],[16,1],[16,2],[16,1],[16,1],[13,3],[13,4],[13,4],[13,5],[27,3],[27,2],[27,2],[27,1],[29,1],[29,1],[29,1],[29,1],[30,1],[30,1],[18,3],[18,4],[18,3],[18,4],[39,1],[39,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[42,1],[42,1],[42,1],[42,1],[11,1],[11,1],[11,1]],performAction:function(t,e,n,r,i,o,a){var u=o.length-1;switch(i){case 6:this.$=o[u-1]+o[u];break;case 7:this.$=o[u];break;case 8:this.$=o[u-2]+"~"+o[u-1]+o[u];break;case 9:this.$=o[u-1]+"~"+o[u];break;case 10:r.addRelation(o[u]);break;case 11:o[u-1].title=r.cleanupLabel(o[u]),r.addRelation(o[u-1]);break;case 16:r.addClass(o[u]);break;case 17:r.addClass(o[u-3]),r.addMembers(o[u-3],o[u-1]);break;case 18:r.addAnnotation(o[u],o[u-2]);break;case 19:this.$=[o[u]];break;case 20:o[u].push(o[u-1]),this.$=o[u];break;case 21:break;case 22:r.addMember(o[u-1],r.cleanupLabel(o[u]));break;case 23:case 24:break;case 25:this.$={id1:o[u-2],id2:o[u],relation:o[u-1],relationTitle1:"none",relationTitle2:"none"};break;case 26:this.$={id1:o[u-3],id2:o[u],relation:o[u-1],relationTitle1:o[u-2],relationTitle2:"none"};break;case 27:this.$={id1:o[u-3],id2:o[u],relation:o[u-2],relationTitle1:"none",relationTitle2:o[u-1]};break;case 28:this.$={id1:o[u-4],id2:o[u],relation:o[u-2],relationTitle1:o[u-3],relationTitle2:o[u-1]};break;case 29:this.$={type1:o[u-2],type2:o[u],lineType:o[u-1]};break;case 30:this.$={type1:"none",type2:o[u],lineType:o[u-1]};break;case 31:this.$={type1:o[u-1],type2:"none",lineType:o[u]};break;case 32:this.$={type1:"none",type2:"none",lineType:o[u]};break;case 33:this.$=r.relationType.AGGREGATION;break;case 34:this.$=r.relationType.EXTENSION;break;case 35:this.$=r.relationType.COMPOSITION;break;case 36:this.$=r.relationType.DEPENDENCY;break;case 37:this.$=r.lineType.LINE;break;case 38:this.$=r.lineType.DOTTED_LINE;break;case 39:this.$=o[u-2],r.setClickEvent(o[u-1],o[u],void 0);break;case 40:this.$=o[u-3],r.setClickEvent(o[u-2],o[u-1],o[u]);break;case 41:this.$=o[u-2],r.setLink(o[u-1],o[u],void 0);break;case 42:this.$=o[u-3],r.setLink(o[u-2],o[u-1],o[u])}},table:[{3:1,4:2,5:[1,3]},{1:[3]},{1:[2,1]},{6:[1,4]},{7:5,9:6,10:12,11:19,13:7,15:8,16:9,17:10,18:11,19:e,23:n,25:r,26:i,37:o,38:a,52:u,53:s,54:c},{8:[1,23]},{6:[1,24],8:[2,3]},t(f,[2,10],{14:[1,25]}),t(f,[2,12]),t(f,[2,13]),t(f,[2,14]),t(f,[2,15]),t(f,[2,21],{27:26,29:29,30:30,14:[1,28],28:[1,27],31:l,32:h,33:d,34:p,35:g,36:y}),{10:37,11:19,52:u,53:s,54:c},t(f,[2,23]),t(f,[2,24]),{11:38,52:u,53:s,54:c},{10:39,11:19,52:u,53:s,54:c},{10:40,11:19,52:u,53:s,54:c},t(b,[2,7],{11:19,10:41,12:[1,42],52:u,53:s,54:c}),t(v,[2,56]),t(v,[2,57]),t(v,[2,58]),{1:[2,2]},{7:43,8:[2,4],9:6,10:12,11:19,13:7,15:8,16:9,17:10,18:11,19:e,23:n,25:r,26:i,37:o,38:a,52:u,53:s,54:c},t(f,[2,11]),{10:44,11:19,28:[1,45],52:u,53:s,54:c},{27:46,29:29,30:30,31:l,32:h,33:d,34:p,35:g,36:y},t(f,[2,22]),{30:47,35:g,36:y},t(m,[2,32],{29:48,31:l,32:h,33:d,34:p}),t(_,[2,33]),t(_,[2,34]),t(_,[2,35]),t(_,[2,36]),t(w,[2,37]),t(w,[2,38]),t(f,[2,16],{20:[1,49]}),{24:[1,50]},{28:[1,51]},{28:[1,52]},t(b,[2,6]),t(b,[2,9],{11:19,10:53,52:u,53:s,54:c}),{8:[2,5]},t(x,[2,25]),{10:54,11:19,52:u,53:s,54:c},{10:55,11:19,28:[1,56],52:u,53:s,54:c},t(m,[2,31],{29:57,31:l,32:h,33:d,34:p}),t(m,[2,30]),{21:58,25:k},{10:60,11:19,52:u,53:s,54:c},t(f,[2,39],{28:[1,61]}),t(f,[2,41],{28:[1,62]}),t(b,[2,8]),t(x,[2,27]),t(x,[2,26]),{10:63,11:19,52:u,53:s,54:c},t(m,[2,29]),{22:[1,64]},{21:65,22:[2,19],25:k},t(f,[2,18]),t(f,[2,40]),t(f,[2,42]),t(x,[2,28]),t(f,[2,17]),{22:[2,20]}],defaultActions:{2:[2,1],23:[2,2],43:[2,5],65:[2,20]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],o=[],a=this.table,u="",s=0,c=0,f=0,l=2,h=1,d=o.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var b=p.yylloc;o.push(b);var v=p.options&&p.options.ranges;function m(){var t;return"number"!=typeof(t=r.pop()||p.lex()||h)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var _,w,x,k,E,A,S,M,T,O={};;){if(x=n[n.length-1],this.defaultActions[x]?k=this.defaultActions[x]:(null==_&&(_=m()),k=a[x]&&a[x][_]),void 0===k||!k.length||!k[0]){var D="";for(A in T=[],a[x])this.terminals_[A]&&A>l&&T.push("'"+this.terminals_[A]+"'");D=p.showPosition?"Parse error on line "+(s+1)+":\n"+p.showPosition()+"\nExpecting "+T.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(s+1)+": Unexpected "+(_==h?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(D,{text:p.match,token:this.terminals_[_]||_,line:p.yylineno,loc:b,expected:T})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+x+", token: "+_);switch(k[0]){case 1:n.push(_),i.push(p.yytext),o.push(p.yylloc),n.push(k[1]),_=null,w?(_=w,w=null):(c=p.yyleng,u=p.yytext,s=p.yylineno,b=p.yylloc,f>0&&f--);break;case 2:if(S=this.productions_[k[1]][1],O.$=i[i.length-S],O._$={first_line:o[o.length-(S||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(S||1)].first_column,last_column:o[o.length-1].last_column},v&&(O._$.range=[o[o.length-(S||1)].range[0],o[o.length-1].range[1]]),void 0!==(E=this.performAction.apply(O,[u,c,s,g.yy,k[1],i,o].concat(d))))return E;S&&(n=n.slice(0,-1*S*2),i=i.slice(0,-1*S),o=o.slice(0,-1*S)),n.push(this.productions_[k[1]][0]),i.push(O.$),o.push(O._$),M=a[n[n.length-2]][n[n.length-1]],n.push(M);break;case 3:return!0}}return!0}},A={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var o in i)this[o]=i[o];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),o=0;o<i.length;o++)if((n=this._input.match(this.rules[i[o]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=o,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[o])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,e,n,r){switch(n){case 0:break;case 1:return 6;case 2:break;case 3:return 5;case 4:return this.begin("struct"),20;case 5:return"EOF_IN_STRUCT";case 6:return"OPEN_IN_STRUCT";case 7:return this.popState(),22;case 8:break;case 9:return"MEMBER";case 10:return 19;case 11:return 37;case 12:return 38;case 13:return 23;case 14:return 24;case 15:this.begin("generic");break;case 16:this.popState();break;case 17:return"GENERICTYPE";case 18:this.begin("string");break;case 19:this.popState();break;case 20:return"STR";case 21:case 22:return 32;case 23:case 24:return 34;case 25:return 33;case 26:return 31;case 27:return 35;case 28:return 36;case 29:return 14;case 30:return 50;case 31:return"DOT";case 32:return"PLUS";case 33:return 47;case 34:case 35:return"EQUALS";case 36:return 54;case 37:return"PUNCTUATION";case 38:return 53;case 39:return 52;case 40:return 49;case 41:return 8}},rules:[/^(?:%%[^\n]*\n*)/,/^(?:\n+)/,/^(?:\s+)/,/^(?:classDiagram\b)/,/^(?:[\{])/,/^(?:$)/,/^(?:[\{])/,/^(?:\})/,/^(?:[\n])/,/^(?:[^\{\}\n]*)/,/^(?:class\b)/,/^(?:callback\b)/,/^(?:link\b)/,/^(?:<<)/,/^(?:>>)/,/^(?:[~])/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:\s*<\|)/,/^(?:\s*\|>)/,/^(?:\s*>)/,/^(?:\s*<)/,/^(?:\s*\*)/,/^(?:\s*o\b)/,/^(?:--)/,/^(?:\.\.)/,/^(?::[^\n;]+)/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:\w+)/,/^(?:[!"#$%&'*+,-.`?\\/])/,/^(?:[0-9]+)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\s)/,/^(?:$)/],conditions:{string:{rules:[19,20],inclusive:!1},generic:{rules:[16,17],inclusive:!1},struct:{rules:[5,6,7,8,9],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,10,11,12,13,14,15,18,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41],inclusive:!0}}};function S(){this.yy={}}return E.lexer=A,S.prototype=E,E.Parser=S,new S}();e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(r){r[1]||(console.log("Usage: "+r[0]+" FILE"),t.exit(1));var i=n(54).readFileSync(n(55).normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n(17),n(14)(t))},function(t,e,n){(function(t,r){var i=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,2],n=[1,3],r=[1,4],i=[2,4],o=[1,9],a=[1,11],u=[1,13],s=[1,14],c=[1,15],f=[1,16],l=[1,21],h=[1,17],d=[1,18],p=[1,19],g=[1,20],y=[1,22],b=[1,4,5,13,14,16,18,19,21,22,23,24,25,28],v=[1,4,5,11,12,13,14,16,18,19,21,22,23,24,25,28],m=[4,5,13,14,16,18,19,21,22,23,24,25,28],_={trace:function(){},yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,idStatement:10,DESCR:11,"--\x3e":12,HIDE_EMPTY:13,scale:14,WIDTH:15,COMPOSIT_STATE:16,STRUCT_START:17,STRUCT_STOP:18,STATE_DESCR:19,AS:20,ID:21,FORK:22,JOIN:23,CONCURRENT:24,note:25,notePosition:26,NOTE_TEXT:27,EDGE_STATE:28,left_of:29,right_of:30,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",11:"DESCR",12:"--\x3e",13:"HIDE_EMPTY",14:"scale",15:"WIDTH",16:"COMPOSIT_STATE",17:"STRUCT_START",18:"STRUCT_STOP",19:"STATE_DESCR",20:"AS",21:"ID",22:"FORK",23:"JOIN",24:"CONCURRENT",25:"note",27:"NOTE_TEXT",28:"EDGE_STATE",29:"left_of",30:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,4],[9,4],[10,1],[10,1],[26,1],[26,1]],performAction:function(t,e,n,r,i,o,a){var u=o.length-1;switch(i){case 3:return r.setRootDoc(o[u]),o[u];case 4:this.$=[];break;case 5:"nl"!=o[u]&&(o[u-1].push(o[u]),this.$=o[u-1]);break;case 6:case 7:this.$=o[u];break;case 8:this.$="nl";break;case 9:this.$={stmt:"state",id:o[u],type:"default",description:""};break;case 10:this.$={stmt:"state",id:o[u-1],type:"default",description:o[u].trim()};break;case 11:this.$={stmt:"relation",state1:{stmt:"state",id:o[u-2],type:"default",description:""},state2:{stmt:"state",id:o[u],type:"default",description:""}};break;case 12:this.$={stmt:"relation",state1:{stmt:"state",id:o[u-3],type:"default",description:""},state2:{stmt:"state",id:o[u-1],type:"default",description:""},description:o[u].substr(1).trim()};break;case 16:this.$={stmt:"state",id:o[u-3],type:"default",description:"",doc:o[u-1]};break;case 17:var s=o[u],c=o[u-2].trim();if(o[u].match(":")){var f=o[u].split(":");s=f[0],c=[c,f[1]]}this.$={stmt:"state",id:s,type:"default",description:c};break;case 18:this.$={stmt:"state",id:o[u-3],type:"default",description:o[u-5],doc:o[u-1]};break;case 19:this.$={stmt:"state",id:o[u],type:"fork"};break;case 20:this.$={stmt:"state",id:o[u],type:"join"};break;case 21:this.$={stmt:"state",id:r.getDividerId(),type:"divider"};break;case 22:this.$={stmt:"state",id:o[u-1].trim(),note:{position:o[u-2].trim(),text:o[u].trim()}};break;case 24:case 25:this.$=o[u]}},table:[{3:1,4:e,5:n,6:r},{1:[3]},{3:5,4:e,5:n,6:r},{3:6,4:e,5:n,6:r},t([1,4,5,13,14,16,19,21,22,23,24,25,28],i,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:o,5:a,8:8,9:10,10:12,13:u,14:s,16:c,19:f,21:l,22:h,23:d,24:p,25:g,28:y},t(b,[2,5]),{9:23,10:12,13:u,14:s,16:c,19:f,21:l,22:h,23:d,24:p,25:g,28:y},t(b,[2,7]),t(b,[2,8]),t(b,[2,9],{11:[1,24],12:[1,25]}),t(b,[2,13]),{15:[1,26]},t(b,[2,15],{17:[1,27]}),{20:[1,28]},t(b,[2,19]),t(b,[2,20]),t(b,[2,21]),{26:29,27:[1,30],29:[1,31],30:[1,32]},t(v,[2,24]),t(v,[2,25]),t(b,[2,6]),t(b,[2,10]),{10:33,21:l,28:y},t(b,[2,14]),t(m,i,{7:34}),{21:[1,35]},{21:[1,36]},{20:[1,37]},{21:[2,26]},{21:[2,27]},t(b,[2,11],{11:[1,38]}),{4:o,5:a,8:8,9:10,10:12,13:u,14:s,16:c,18:[1,39],19:f,21:l,22:h,23:d,24:p,25:g,28:y},t(b,[2,17],{17:[1,40]}),{27:[1,41]},{21:[1,42]},t(b,[2,12]),t(b,[2,16]),t(m,i,{7:43}),t(b,[2,22]),t(b,[2,23]),{4:o,5:a,8:8,9:10,10:12,13:u,14:s,16:c,18:[1,44],19:f,21:l,22:h,23:d,24:p,25:g,28:y},t(b,[2,18])],defaultActions:{5:[2,1],6:[2,2],31:[2,26],32:[2,27]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],o=[],a=this.table,u="",s=0,c=0,f=0,l=2,h=1,d=o.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var b=p.yylloc;o.push(b);var v=p.options&&p.options.ranges;function m(){var t;return"number"!=typeof(t=r.pop()||p.lex()||h)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var _,w,x,k,E,A,S,M,T,O={};;){if(x=n[n.length-1],this.defaultActions[x]?k=this.defaultActions[x]:(null==_&&(_=m()),k=a[x]&&a[x][_]),void 0===k||!k.length||!k[0]){var D="";for(A in T=[],a[x])this.terminals_[A]&&A>l&&T.push("'"+this.terminals_[A]+"'");D=p.showPosition?"Parse error on line "+(s+1)+":\n"+p.showPosition()+"\nExpecting "+T.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(s+1)+": Unexpected "+(_==h?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(D,{text:p.match,token:this.terminals_[_]||_,line:p.yylineno,loc:b,expected:T})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+x+", token: "+_);switch(k[0]){case 1:n.push(_),i.push(p.yytext),o.push(p.yylloc),n.push(k[1]),_=null,w?(_=w,w=null):(c=p.yyleng,u=p.yytext,s=p.yylineno,b=p.yylloc,f>0&&f--);break;case 2:if(S=this.productions_[k[1]][1],O.$=i[i.length-S],O._$={first_line:o[o.length-(S||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(S||1)].first_column,last_column:o[o.length-1].last_column},v&&(O._$.range=[o[o.length-(S||1)].range[0],o[o.length-1].range[1]]),void 0!==(E=this.performAction.apply(O,[u,c,s,g.yy,k[1],i,o].concat(d))))return E;S&&(n=n.slice(0,-1*S*2),i=i.slice(0,-1*S),o=o.slice(0,-1*S)),n.push(this.productions_[k[1]][0]),i.push(O.$),o.push(O._$),M=a[n[n.length-2]][n[n.length-1]],n.push(M);break;case 3:return!0}}return!0}},w={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var o in i)this[o]=i[o];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),o=0;o<i.length;o++)if((n=this._input.match(this.rules[i[o]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=o,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[o])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return 5;case 1:case 2:case 3:case 4:break;case 5:return this.pushState("SCALE"),14;case 6:return 15;case 7:this.popState();break;case 8:this.pushState("STATE");break;case 9:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),22;case 10:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),23;case 11:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),22;case 12:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),23;case 13:this.begin("STATE_STRING");break;case 14:return this.popState(),this.pushState("STATE_ID"),"AS";case 15:return this.popState(),"ID";case 16:this.popState();break;case 17:return"STATE_DESCR";case 18:return 16;case 19:this.popState();break;case 20:return this.popState(),this.pushState("struct"),17;case 21:return this.popState(),18;case 22:break;case 23:return this.begin("NOTE"),25;case 24:return this.popState(),this.pushState("NOTE_ID"),29;case 25:return this.popState(),this.pushState("NOTE_ID"),30;case 26:this.popState(),this.pushState("FLOATING_NOTE");break;case 27:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";case 28:break;case 29:return"NOTE_TEXT";case 30:return this.popState(),"ID";case 31:return this.popState(),this.pushState("NOTE_TEXT"),21;case 32:return this.popState(),e.yytext=e.yytext.substr(2).trim(),27;case 33:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),27;case 34:return 6;case 35:return 13;case 36:return 28;case 37:return 21;case 38:return e.yytext=e.yytext.trim(),11;case 39:return 12;case 40:return 24;case 41:return 5;case 42:return"INVALID"}},rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<<fork>>)/i,/^(?:.*<<join>>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:\s*[^:;]+end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[2,3],inclusive:!1},struct:{rules:[2,3,8,21,22,23,36,37,38,39,40],inclusive:!1},FLOATING_NOTE_ID:{rules:[30],inclusive:!1},FLOATING_NOTE:{rules:[27,28,29],inclusive:!1},NOTE_TEXT:{rules:[32,33],inclusive:!1},NOTE_ID:{rules:[31],inclusive:!1},NOTE:{rules:[24,25,26],inclusive:!1},SCALE:{rules:[6,7],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[15],inclusive:!1},STATE_STRING:{rules:[16,17],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[2,3,9,10,11,12,13,14,18,19,20],inclusive:!1},ID:{rules:[2,3],inclusive:!1},INITIAL:{rules:[0,1,3,4,5,8,20,23,34,35,36,37,38,39,41,42],inclusive:!0}}};function x(){this.yy={}}return _.lexer=w,x.prototype=_,_.Parser=x,new x}();e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(r){r[1]||(console.log("Usage: "+r[0]+" FILE"),t.exit(1));var i=n(54).readFileSync(n(55).normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n(17),n(14)(t))},function(t,e,n){(function(t,n){(function(){var r="Expected a function",i="__lodash_placeholder__",o=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],a="[object Arguments]",u="[object Array]",s="[object Boolean]",c="[object Date]",f="[object Error]",l="[object Function]",h="[object GeneratorFunction]",d="[object Map]",p="[object Number]",g="[object Object]",y="[object RegExp]",b="[object Set]",v="[object String]",m="[object Symbol]",_="[object WeakMap]",w="[object ArrayBuffer]",x="[object DataView]",k="[object Float32Array]",E="[object Float64Array]",A="[object Int8Array]",S="[object Int16Array]",M="[object Int32Array]",T="[object Uint8Array]",O="[object Uint16Array]",D="[object Uint32Array]",C=/\b__p \+= '';/g,N=/\b(__p \+=) '' \+/g,I=/(__e\(.*?\)|\b__t\)) \+\n'';/g,R=/&(?:amp|lt|gt|quot|#39);/g,j=/[&<>"']/g,L=RegExp(R.source),B=RegExp(j.source),P=/<%-([\s\S]+?)%>/g,F=/<%([\s\S]+?)%>/g,q=/<%=([\s\S]+?)%>/g,U=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,z=/^\w*$/,Y=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,V=/[\\^$.*+?()[\]{}|]/g,G=RegExp(V.source),H=/^\s+|\s+$/g,W=/^\s+/,$=/\s+$/,K=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Z=/\{\n\/\* \[wrapped with (.+)\] \*/,X=/,? & /,J=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Q=/\\(\\)?/g,tt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,et=/\w*$/,nt=/^[-+]0x[0-9a-f]+$/i,rt=/^0b[01]+$/i,it=/^\[object .+?Constructor\]$/,ot=/^0o[0-7]+$/i,at=/^(?:0|[1-9]\d*)$/,ut=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,st=/($^)/,ct=/['\n\r\u2028\u2029\\]/g,ft="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",lt="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",ht="[\\ud800-\\udfff]",dt="["+lt+"]",pt="["+ft+"]",gt="\\d+",yt="[\\u2700-\\u27bf]",bt="[a-z\\xdf-\\xf6\\xf8-\\xff]",vt="[^\\ud800-\\udfff"+lt+gt+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",mt="\\ud83c[\\udffb-\\udfff]",_t="[^\\ud800-\\udfff]",wt="(?:\\ud83c[\\udde6-\\uddff]){2}",xt="[\\ud800-\\udbff][\\udc00-\\udfff]",kt="[A-Z\\xc0-\\xd6\\xd8-\\xde]",Et="(?:"+bt+"|"+vt+")",At="(?:"+kt+"|"+vt+")",St="(?:"+pt+"|"+mt+")"+"?",Mt="[\\ufe0e\\ufe0f]?"+St+("(?:\\u200d(?:"+[_t,wt,xt].join("|")+")[\\ufe0e\\ufe0f]?"+St+")*"),Tt="(?:"+[yt,wt,xt].join("|")+")"+Mt,Ot="(?:"+[_t+pt+"?",pt,wt,xt,ht].join("|")+")",Dt=RegExp("['’]","g"),Ct=RegExp(pt,"g"),Nt=RegExp(mt+"(?="+mt+")|"+Ot+Mt,"g"),It=RegExp([kt+"?"+bt+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[dt,kt,"$"].join("|")+")",At+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[dt,kt+Et,"$"].join("|")+")",kt+"?"+Et+"+(?:['’](?:d|ll|m|re|s|t|ve))?",kt+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",gt,Tt].join("|"),"g"),Rt=RegExp("[\\u200d\\ud800-\\udfff"+ft+"\\ufe0e\\ufe0f]"),jt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Lt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Bt=-1,Pt={};Pt[k]=Pt[E]=Pt[A]=Pt[S]=Pt[M]=Pt[T]=Pt["[object Uint8ClampedArray]"]=Pt[O]=Pt[D]=!0,Pt[a]=Pt[u]=Pt[w]=Pt[s]=Pt[x]=Pt[c]=Pt[f]=Pt[l]=Pt[d]=Pt[p]=Pt[g]=Pt[y]=Pt[b]=Pt[v]=Pt[_]=!1;var Ft={};Ft[a]=Ft[u]=Ft[w]=Ft[x]=Ft[s]=Ft[c]=Ft[k]=Ft[E]=Ft[A]=Ft[S]=Ft[M]=Ft[d]=Ft[p]=Ft[g]=Ft[y]=Ft[b]=Ft[v]=Ft[m]=Ft[T]=Ft["[object Uint8ClampedArray]"]=Ft[O]=Ft[D]=!0,Ft[f]=Ft[l]=Ft[_]=!1;var qt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Ut=parseFloat,zt=parseInt,Yt="object"==typeof t&&t&&t.Object===Object&&t,Vt="object"==typeof self&&self&&self.Object===Object&&self,Gt=Yt||Vt||Function("return this")(),Ht=e&&!e.nodeType&&e,Wt=Ht&&"object"==typeof n&&n&&!n.nodeType&&n,$t=Wt&&Wt.exports===Ht,Kt=$t&&Yt.process,Zt=function(){try{var t=Wt&&Wt.require&&Wt.require("util").types;return t||Kt&&Kt.binding&&Kt.binding("util")}catch(t){}}(),Xt=Zt&&Zt.isArrayBuffer,Jt=Zt&&Zt.isDate,Qt=Zt&&Zt.isMap,te=Zt&&Zt.isRegExp,ee=Zt&&Zt.isSet,ne=Zt&&Zt.isTypedArray;function re(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function ie(t,e,n,r){for(var i=-1,o=null==t?0:t.length;++i<o;){var a=t[i];e(r,a,n(a),t)}return r}function oe(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}function ae(t,e){for(var n=null==t?0:t.length;n--&&!1!==e(t[n],n,t););return t}function ue(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function se(t,e){for(var n=-1,r=null==t?0:t.length,i=0,o=[];++n<r;){var a=t[n];e(a,n,t)&&(o[i++]=a)}return o}function ce(t,e){return!!(null==t?0:t.length)&&me(t,e,0)>-1}function fe(t,e,n){for(var r=-1,i=null==t?0:t.length;++r<i;)if(n(e,t[r]))return!0;return!1}function le(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}function he(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}function de(t,e,n,r){var i=-1,o=null==t?0:t.length;for(r&&o&&(n=t[++i]);++i<o;)n=e(n,t[i],i,t);return n}function pe(t,e,n,r){var i=null==t?0:t.length;for(r&&i&&(n=t[--i]);i--;)n=e(n,t[i],i,t);return n}function ge(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}var ye=ke("length");function be(t,e,n){var r;return n(t,(function(t,n,i){if(e(t,n,i))return r=n,!1})),r}function ve(t,e,n,r){for(var i=t.length,o=n+(r?1:-1);r?o--:++o<i;)if(e(t[o],o,t))return o;return-1}function me(t,e,n){return e==e?function(t,e,n){var r=n-1,i=t.length;for(;++r<i;)if(t[r]===e)return r;return-1}(t,e,n):ve(t,we,n)}function _e(t,e,n,r){for(var i=n-1,o=t.length;++i<o;)if(r(t[i],e))return i;return-1}function we(t){return t!=t}function xe(t,e){var n=null==t?0:t.length;return n?Se(t,e)/n:NaN}function ke(t){return function(e){return null==e?void 0:e[t]}}function Ee(t){return function(e){return null==t?void 0:t[e]}}function Ae(t,e,n,r,i){return i(t,(function(t,i,o){n=r?(r=!1,t):e(n,t,i,o)})),n}function Se(t,e){for(var n,r=-1,i=t.length;++r<i;){var o=e(t[r]);void 0!==o&&(n=void 0===n?o:n+o)}return n}function Me(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function Te(t){return function(e){return t(e)}}function Oe(t,e){return le(e,(function(e){return t[e]}))}function De(t,e){return t.has(e)}function Ce(t,e){for(var n=-1,r=t.length;++n<r&&me(e,t[n],0)>-1;);return n}function Ne(t,e){for(var n=t.length;n--&&me(e,t[n],0)>-1;);return n}function Ie(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r}var Re=Ee({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),je=Ee({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function Le(t){return"\\"+qt[t]}function Be(t){return Rt.test(t)}function Pe(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function Fe(t,e){return function(n){return t(e(n))}}function qe(t,e){for(var n=-1,r=t.length,o=0,a=[];++n<r;){var u=t[n];u!==e&&u!==i||(t[n]=i,a[o++]=n)}return a}function Ue(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}function ze(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=[t,t]})),n}function Ye(t){return Be(t)?function(t){var e=Nt.lastIndex=0;for(;Nt.test(t);)++e;return e}(t):ye(t)}function Ve(t){return Be(t)?function(t){return t.match(Nt)||[]}(t):function(t){return t.split("")}(t)}var Ge=Ee({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"});var He=function t(e){var n,ft=(e=null==e?Gt:He.defaults(Gt.Object(),e,He.pick(Gt,Lt))).Array,lt=e.Date,ht=e.Error,dt=e.Function,pt=e.Math,gt=e.Object,yt=e.RegExp,bt=e.String,vt=e.TypeError,mt=ft.prototype,_t=dt.prototype,wt=gt.prototype,xt=e["__core-js_shared__"],kt=_t.toString,Et=wt.hasOwnProperty,At=0,St=(n=/[^.]+$/.exec(xt&&xt.keys&&xt.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",Mt=wt.toString,Tt=kt.call(gt),Ot=Gt._,Nt=yt("^"+kt.call(Et).replace(V,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Rt=$t?e.Buffer:void 0,qt=e.Symbol,Yt=e.Uint8Array,Vt=Rt?Rt.allocUnsafe:void 0,Ht=Fe(gt.getPrototypeOf,gt),Wt=gt.create,Kt=wt.propertyIsEnumerable,Zt=mt.splice,ye=qt?qt.isConcatSpreadable:void 0,Ee=qt?qt.iterator:void 0,We=qt?qt.toStringTag:void 0,$e=function(){try{var t=Qi(gt,"defineProperty");return t({},"",{}),t}catch(t){}}(),Ke=e.clearTimeout!==Gt.clearTimeout&&e.clearTimeout,Ze=lt&&lt.now!==Gt.Date.now&&lt.now,Xe=e.setTimeout!==Gt.setTimeout&&e.setTimeout,Je=pt.ceil,Qe=pt.floor,tn=gt.getOwnPropertySymbols,en=Rt?Rt.isBuffer:void 0,nn=e.isFinite,rn=mt.join,on=Fe(gt.keys,gt),an=pt.max,un=pt.min,sn=lt.now,cn=e.parseInt,fn=pt.random,ln=mt.reverse,hn=Qi(e,"DataView"),dn=Qi(e,"Map"),pn=Qi(e,"Promise"),gn=Qi(e,"Set"),yn=Qi(e,"WeakMap"),bn=Qi(gt,"create"),vn=yn&&new yn,mn={},_n=Mo(hn),wn=Mo(dn),xn=Mo(pn),kn=Mo(gn),En=Mo(yn),An=qt?qt.prototype:void 0,Sn=An?An.valueOf:void 0,Mn=An?An.toString:void 0;function Tn(t){if(Va(t)&&!Ia(t)&&!(t instanceof Nn)){if(t instanceof Cn)return t;if(Et.call(t,"__wrapped__"))return To(t)}return new Cn(t)}var On=function(){function t(){}return function(e){if(!Ya(e))return{};if(Wt)return Wt(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();function Dn(){}function Cn(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=void 0}function Nn(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function In(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Rn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function jn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Ln(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new jn;++e<n;)this.add(t[e])}function Bn(t){var e=this.__data__=new Rn(t);this.size=e.size}function Pn(t,e){var n=Ia(t),r=!n&&Na(t),i=!n&&!r&&Ba(t),o=!n&&!r&&!i&&Ja(t),a=n||r||i||o,u=a?Me(t.length,bt):[],s=u.length;for(var c in t)!e&&!Et.call(t,c)||a&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||ao(c,s))||u.push(c);return u}function Fn(t){var e=t.length;return e?t[Lr(0,e-1)]:void 0}function qn(t,e){return Eo(bi(t),Kn(e,0,t.length))}function Un(t){return Eo(bi(t))}function zn(t,e,n){(void 0===n||Oa(t[e],n))&&(void 0!==n||e in t)||Wn(t,e,n)}function Yn(t,e,n){var r=t[e];Et.call(t,e)&&Oa(r,n)&&(void 0!==n||e in t)||Wn(t,e,n)}function Vn(t,e){for(var n=t.length;n--;)if(Oa(t[n][0],e))return n;return-1}function Gn(t,e,n,r){return tr(t,(function(t,i,o){e(r,t,n(t),o)})),r}function Hn(t,e){return t&&vi(e,_u(e),t)}function Wn(t,e,n){"__proto__"==e&&$e?$e(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function $n(t,e){for(var n=-1,r=e.length,i=ft(r),o=null==t;++n<r;)i[n]=o?void 0:gu(t,e[n]);return i}function Kn(t,e,n){return t==t&&(void 0!==n&&(t=t<=n?t:n),void 0!==e&&(t=t>=e?t:e)),t}function Zn(t,e,n,r,i,o){var u,f=1&e,_=2&e,C=4&e;if(n&&(u=i?n(t,r,i,o):n(t)),void 0!==u)return u;if(!Ya(t))return t;var N=Ia(t);if(N){if(u=function(t){var e=t.length,n=new t.constructor(e);e&&"string"==typeof t[0]&&Et.call(t,"index")&&(n.index=t.index,n.input=t.input);return n}(t),!f)return bi(t,u)}else{var I=no(t),R=I==l||I==h;if(Ba(t))return li(t,f);if(I==g||I==a||R&&!i){if(u=_||R?{}:io(t),!f)return _?function(t,e){return vi(t,eo(t),e)}(t,function(t,e){return t&&vi(e,wu(e),t)}(u,t)):function(t,e){return vi(t,to(t),e)}(t,Hn(u,t))}else{if(!Ft[I])return i?t:{};u=function(t,e,n){var r=t.constructor;switch(e){case w:return hi(t);case s:case c:return new r(+t);case x:return function(t,e){var n=e?hi(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case k:case E:case A:case S:case M:case T:case"[object Uint8ClampedArray]":case O:case D:return di(t,n);case d:return new r;case p:case v:return new r(t);case y:return function(t){var e=new t.constructor(t.source,et.exec(t));return e.lastIndex=t.lastIndex,e}(t);case b:return new r;case m:return i=t,Sn?gt(Sn.call(i)):{}}var i}(t,I,f)}}o||(o=new Bn);var j=o.get(t);if(j)return j;o.set(t,u),Ka(t)?t.forEach((function(r){u.add(Zn(r,e,n,r,t,o))})):Ga(t)&&t.forEach((function(r,i){u.set(i,Zn(r,e,n,i,t,o))}));var L=N?void 0:(C?_?Hi:Gi:_?wu:_u)(t);return oe(L||t,(function(r,i){L&&(r=t[i=r]),Yn(u,i,Zn(r,e,n,i,t,o))})),u}function Xn(t,e,n){var r=n.length;if(null==t)return!r;for(t=gt(t);r--;){var i=n[r],o=e[i],a=t[i];if(void 0===a&&!(i in t)||!o(a))return!1}return!0}function Jn(t,e,n){if("function"!=typeof t)throw new vt(r);return _o((function(){t.apply(void 0,n)}),e)}function Qn(t,e,n,r){var i=-1,o=ce,a=!0,u=t.length,s=[],c=e.length;if(!u)return s;n&&(e=le(e,Te(n))),r?(o=fe,a=!1):e.length>=200&&(o=De,a=!1,e=new Ln(e));t:for(;++i<u;){var f=t[i],l=null==n?f:n(f);if(f=r||0!==f?f:0,a&&l==l){for(var h=c;h--;)if(e[h]===l)continue t;s.push(f)}else o(e,l,r)||s.push(f)}return s}Tn.templateSettings={escape:P,evaluate:F,interpolate:q,variable:"",imports:{_:Tn}},Tn.prototype=Dn.prototype,Tn.prototype.constructor=Tn,Cn.prototype=On(Dn.prototype),Cn.prototype.constructor=Cn,Nn.prototype=On(Dn.prototype),Nn.prototype.constructor=Nn,In.prototype.clear=function(){this.__data__=bn?bn(null):{},this.size=0},In.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},In.prototype.get=function(t){var e=this.__data__;if(bn){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return Et.call(e,t)?e[t]:void 0},In.prototype.has=function(t){var e=this.__data__;return bn?void 0!==e[t]:Et.call(e,t)},In.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=bn&&void 0===e?"__lodash_hash_undefined__":e,this},Rn.prototype.clear=function(){this.__data__=[],this.size=0},Rn.prototype.delete=function(t){var e=this.__data__,n=Vn(e,t);return!(n<0)&&(n==e.length-1?e.pop():Zt.call(e,n,1),--this.size,!0)},Rn.prototype.get=function(t){var e=this.__data__,n=Vn(e,t);return n<0?void 0:e[n][1]},Rn.prototype.has=function(t){return Vn(this.__data__,t)>-1},Rn.prototype.set=function(t,e){var n=this.__data__,r=Vn(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},jn.prototype.clear=function(){this.size=0,this.__data__={hash:new In,map:new(dn||Rn),string:new In}},jn.prototype.delete=function(t){var e=Xi(this,t).delete(t);return this.size-=e?1:0,e},jn.prototype.get=function(t){return Xi(this,t).get(t)},jn.prototype.has=function(t){return Xi(this,t).has(t)},jn.prototype.set=function(t,e){var n=Xi(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},Ln.prototype.add=Ln.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},Ln.prototype.has=function(t){return this.__data__.has(t)},Bn.prototype.clear=function(){this.__data__=new Rn,this.size=0},Bn.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Bn.prototype.get=function(t){return this.__data__.get(t)},Bn.prototype.has=function(t){return this.__data__.has(t)},Bn.prototype.set=function(t,e){var n=this.__data__;if(n instanceof Rn){var r=n.__data__;if(!dn||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new jn(r)}return n.set(t,e),this.size=n.size,this};var tr=wi(sr),er=wi(cr,!0);function nr(t,e){var n=!0;return tr(t,(function(t,r,i){return n=!!e(t,r,i)})),n}function rr(t,e,n){for(var r=-1,i=t.length;++r<i;){var o=t[r],a=e(o);if(null!=a&&(void 0===u?a==a&&!Xa(a):n(a,u)))var u=a,s=o}return s}function ir(t,e){var n=[];return tr(t,(function(t,r,i){e(t,r,i)&&n.push(t)})),n}function or(t,e,n,r,i){var o=-1,a=t.length;for(n||(n=oo),i||(i=[]);++o<a;){var u=t[o];e>0&&n(u)?e>1?or(u,e-1,n,r,i):he(i,u):r||(i[i.length]=u)}return i}var ar=xi(),ur=xi(!0);function sr(t,e){return t&&ar(t,e,_u)}function cr(t,e){return t&&ur(t,e,_u)}function fr(t,e){return se(e,(function(e){return qa(t[e])}))}function lr(t,e){for(var n=0,r=(e=ui(e,t)).length;null!=t&&n<r;)t=t[So(e[n++])];return n&&n==r?t:void 0}function hr(t,e,n){var r=e(t);return Ia(t)?r:he(r,n(t))}function dr(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":We&&We in gt(t)?function(t){var e=Et.call(t,We),n=t[We];try{t[We]=void 0;var r=!0}catch(t){}var i=Mt.call(t);r&&(e?t[We]=n:delete t[We]);return i}(t):function(t){return Mt.call(t)}(t)}function pr(t,e){return t>e}function gr(t,e){return null!=t&&Et.call(t,e)}function yr(t,e){return null!=t&&e in gt(t)}function br(t,e,n){for(var r=n?fe:ce,i=t[0].length,o=t.length,a=o,u=ft(o),s=1/0,c=[];a--;){var f=t[a];a&&e&&(f=le(f,Te(e))),s=un(f.length,s),u[a]=!n&&(e||i>=120&&f.length>=120)?new Ln(a&&f):void 0}f=t[0];var l=-1,h=u[0];t:for(;++l<i&&c.length<s;){var d=f[l],p=e?e(d):d;if(d=n||0!==d?d:0,!(h?De(h,p):r(c,p,n))){for(a=o;--a;){var g=u[a];if(!(g?De(g,p):r(t[a],p,n)))continue t}h&&h.push(p),c.push(d)}}return c}function vr(t,e,n){var r=null==(t=yo(t,e=ui(e,t)))?t:t[So(Fo(e))];return null==r?void 0:re(r,t,n)}function mr(t){return Va(t)&&dr(t)==a}function _r(t,e,n,r,i){return t===e||(null==t||null==e||!Va(t)&&!Va(e)?t!=t&&e!=e:function(t,e,n,r,i,o){var l=Ia(t),h=Ia(e),_=l?u:no(t),k=h?u:no(e),E=(_=_==a?g:_)==g,A=(k=k==a?g:k)==g,S=_==k;if(S&&Ba(t)){if(!Ba(e))return!1;l=!0,E=!1}if(S&&!E)return o||(o=new Bn),l||Ja(t)?Yi(t,e,n,r,i,o):function(t,e,n,r,i,o,a){switch(n){case x:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case w:return!(t.byteLength!=e.byteLength||!o(new Yt(t),new Yt(e)));case s:case c:case p:return Oa(+t,+e);case f:return t.name==e.name&&t.message==e.message;case y:case v:return t==e+"";case d:var u=Pe;case b:var l=1&r;if(u||(u=Ue),t.size!=e.size&&!l)return!1;var h=a.get(t);if(h)return h==e;r|=2,a.set(t,e);var g=Yi(u(t),u(e),r,i,o,a);return a.delete(t),g;case m:if(Sn)return Sn.call(t)==Sn.call(e)}return!1}(t,e,_,n,r,i,o);if(!(1&n)){var M=E&&Et.call(t,"__wrapped__"),T=A&&Et.call(e,"__wrapped__");if(M||T){var O=M?t.value():t,D=T?e.value():e;return o||(o=new Bn),i(O,D,n,r,o)}}if(!S)return!1;return o||(o=new Bn),function(t,e,n,r,i,o){var a=1&n,u=Gi(t),s=u.length,c=Gi(e).length;if(s!=c&&!a)return!1;var f=s;for(;f--;){var l=u[f];if(!(a?l in e:Et.call(e,l)))return!1}var h=o.get(t);if(h&&o.get(e))return h==e;var d=!0;o.set(t,e),o.set(e,t);var p=a;for(;++f<s;){l=u[f];var g=t[l],y=e[l];if(r)var b=a?r(y,g,l,e,t,o):r(g,y,l,t,e,o);if(!(void 0===b?g===y||i(g,y,n,r,o):b)){d=!1;break}p||(p="constructor"==l)}if(d&&!p){var v=t.constructor,m=e.constructor;v!=m&&"constructor"in t&&"constructor"in e&&!("function"==typeof v&&v instanceof v&&"function"==typeof m&&m instanceof m)&&(d=!1)}return o.delete(t),o.delete(e),d}(t,e,n,r,i,o)}(t,e,n,r,_r,i))}function wr(t,e,n,r){var i=n.length,o=i,a=!r;if(null==t)return!o;for(t=gt(t);i--;){var u=n[i];if(a&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++i<o;){var s=(u=n[i])[0],c=t[s],f=u[1];if(a&&u[2]){if(void 0===c&&!(s in t))return!1}else{var l=new Bn;if(r)var h=r(c,f,s,t,e,l);if(!(void 0===h?_r(f,c,3,r,l):h))return!1}}return!0}function xr(t){return!(!Ya(t)||(e=t,St&&St in e))&&(qa(t)?Nt:it).test(Mo(t));var e}function kr(t){return"function"==typeof t?t:null==t?Hu:"object"==typeof t?Ia(t)?Or(t[0],t[1]):Tr(t):es(t)}function Er(t){if(!lo(t))return on(t);var e=[];for(var n in gt(t))Et.call(t,n)&&"constructor"!=n&&e.push(n);return e}function Ar(t){if(!Ya(t))return function(t){var e=[];if(null!=t)for(var n in gt(t))e.push(n);return e}(t);var e=lo(t),n=[];for(var r in t)("constructor"!=r||!e&&Et.call(t,r))&&n.push(r);return n}function Sr(t,e){return t<e}function Mr(t,e){var n=-1,r=ja(t)?ft(t.length):[];return tr(t,(function(t,i,o){r[++n]=e(t,i,o)})),r}function Tr(t){var e=Ji(t);return 1==e.length&&e[0][2]?po(e[0][0],e[0][1]):function(n){return n===t||wr(n,t,e)}}function Or(t,e){return so(t)&&ho(e)?po(So(t),e):function(n){var r=gu(n,t);return void 0===r&&r===e?yu(n,t):_r(e,r,3)}}function Dr(t,e,n,r,i){t!==e&&ar(e,(function(o,a){if(i||(i=new Bn),Ya(o))!function(t,e,n,r,i,o,a){var u=vo(t,n),s=vo(e,n),c=a.get(s);if(c)return void zn(t,n,c);var f=o?o(u,s,n+"",t,e,a):void 0,l=void 0===f;if(l){var h=Ia(s),d=!h&&Ba(s),p=!h&&!d&&Ja(s);f=s,h||d||p?Ia(u)?f=u:La(u)?f=bi(u):d?(l=!1,f=li(s,!0)):p?(l=!1,f=di(s,!0)):f=[]:Wa(s)||Na(s)?(f=u,Na(u)?f=au(u):Ya(u)&&!qa(u)||(f=io(s))):l=!1}l&&(a.set(s,f),i(f,s,r,o,a),a.delete(s));zn(t,n,f)}(t,e,a,n,Dr,r,i);else{var u=r?r(vo(t,a),o,a+"",t,e,i):void 0;void 0===u&&(u=o),zn(t,a,u)}}),wu)}function Cr(t,e){var n=t.length;if(n)return ao(e+=e<0?n:0,n)?t[e]:void 0}function Nr(t,e,n){var r=-1;return e=le(e.length?e:[Hu],Te(Zi())),function(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}(Mr(t,(function(t,n,i){return{criteria:le(e,(function(e){return e(t)})),index:++r,value:t}})),(function(t,e){return function(t,e,n){var r=-1,i=t.criteria,o=e.criteria,a=i.length,u=n.length;for(;++r<a;){var s=pi(i[r],o[r]);if(s){if(r>=u)return s;var c=n[r];return s*("desc"==c?-1:1)}}return t.index-e.index}(t,e,n)}))}function Ir(t,e,n){for(var r=-1,i=e.length,o={};++r<i;){var a=e[r],u=lr(t,a);n(u,a)&&Ur(o,ui(a,t),u)}return o}function Rr(t,e,n,r){var i=r?_e:me,o=-1,a=e.length,u=t;for(t===e&&(e=bi(e)),n&&(u=le(t,Te(n)));++o<a;)for(var s=0,c=e[o],f=n?n(c):c;(s=i(u,f,s,r))>-1;)u!==t&&Zt.call(u,s,1),Zt.call(t,s,1);return t}function jr(t,e){for(var n=t?e.length:0,r=n-1;n--;){var i=e[n];if(n==r||i!==o){var o=i;ao(i)?Zt.call(t,i,1):Qr(t,i)}}return t}function Lr(t,e){return t+Qe(fn()*(e-t+1))}function Br(t,e){var n="";if(!t||e<1||e>9007199254740991)return n;do{e%2&&(n+=t),(e=Qe(e/2))&&(t+=t)}while(e);return n}function Pr(t,e){return wo(go(t,e,Hu),t+"")}function Fr(t){return Fn(Ou(t))}function qr(t,e){var n=Ou(t);return Eo(n,Kn(e,0,n.length))}function Ur(t,e,n,r){if(!Ya(t))return t;for(var i=-1,o=(e=ui(e,t)).length,a=o-1,u=t;null!=u&&++i<o;){var s=So(e[i]),c=n;if(i!=a){var f=u[s];void 0===(c=r?r(f,s,u):void 0)&&(c=Ya(f)?f:ao(e[i+1])?[]:{})}Yn(u,s,c),u=u[s]}return t}var zr=vn?function(t,e){return vn.set(t,e),t}:Hu,Yr=$e?function(t,e){return $e(t,"toString",{configurable:!0,enumerable:!1,value:Yu(e),writable:!0})}:Hu;function Vr(t){return Eo(Ou(t))}function Gr(t,e,n){var r=-1,i=t.length;e<0&&(e=-e>i?0:i+e),(n=n>i?i:n)<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var o=ft(i);++r<i;)o[r]=t[r+e];return o}function Hr(t,e){var n;return tr(t,(function(t,r,i){return!(n=e(t,r,i))})),!!n}function Wr(t,e,n){var r=0,i=null==t?r:t.length;if("number"==typeof e&&e==e&&i<=2147483647){for(;r<i;){var o=r+i>>>1,a=t[o];null!==a&&!Xa(a)&&(n?a<=e:a<e)?r=o+1:i=o}return i}return $r(t,e,Hu,n)}function $r(t,e,n,r){e=n(e);for(var i=0,o=null==t?0:t.length,a=e!=e,u=null===e,s=Xa(e),c=void 0===e;i<o;){var f=Qe((i+o)/2),l=n(t[f]),h=void 0!==l,d=null===l,p=l==l,g=Xa(l);if(a)var y=r||p;else y=c?p&&(r||h):u?p&&h&&(r||!d):s?p&&h&&!d&&(r||!g):!d&&!g&&(r?l<=e:l<e);y?i=f+1:o=f}return un(o,4294967294)}function Kr(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var a=t[n],u=e?e(a):a;if(!n||!Oa(u,s)){var s=u;o[i++]=0===a?0:a}}return o}function Zr(t){return"number"==typeof t?t:Xa(t)?NaN:+t}function Xr(t){if("string"==typeof t)return t;if(Ia(t))return le(t,Xr)+"";if(Xa(t))return Mn?Mn.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function Jr(t,e,n){var r=-1,i=ce,o=t.length,a=!0,u=[],s=u;if(n)a=!1,i=fe;else if(o>=200){var c=e?null:Bi(t);if(c)return Ue(c);a=!1,i=De,s=new Ln}else s=e?[]:u;t:for(;++r<o;){var f=t[r],l=e?e(f):f;if(f=n||0!==f?f:0,a&&l==l){for(var h=s.length;h--;)if(s[h]===l)continue t;e&&s.push(l),u.push(f)}else i(s,l,n)||(s!==u&&s.push(l),u.push(f))}return u}function Qr(t,e){return null==(t=yo(t,e=ui(e,t)))||delete t[So(Fo(e))]}function ti(t,e,n,r){return Ur(t,e,n(lr(t,e)),r)}function ei(t,e,n,r){for(var i=t.length,o=r?i:-1;(r?o--:++o<i)&&e(t[o],o,t););return n?Gr(t,r?0:o,r?o+1:i):Gr(t,r?o+1:0,r?i:o)}function ni(t,e){var n=t;return n instanceof Nn&&(n=n.value()),de(e,(function(t,e){return e.func.apply(e.thisArg,he([t],e.args))}),n)}function ri(t,e,n){var r=t.length;if(r<2)return r?Jr(t[0]):[];for(var i=-1,o=ft(r);++i<r;)for(var a=t[i],u=-1;++u<r;)u!=i&&(o[i]=Qn(o[i]||a,t[u],e,n));return Jr(or(o,1),e,n)}function ii(t,e,n){for(var r=-1,i=t.length,o=e.length,a={};++r<i;){var u=r<o?e[r]:void 0;n(a,t[r],u)}return a}function oi(t){return La(t)?t:[]}function ai(t){return"function"==typeof t?t:Hu}function ui(t,e){return Ia(t)?t:so(t,e)?[t]:Ao(uu(t))}var si=Pr;function ci(t,e,n){var r=t.length;return n=void 0===n?r:n,!e&&n>=r?t:Gr(t,e,n)}var fi=Ke||function(t){return Gt.clearTimeout(t)};function li(t,e){if(e)return t.slice();var n=t.length,r=Vt?Vt(n):new t.constructor(n);return t.copy(r),r}function hi(t){var e=new t.constructor(t.byteLength);return new Yt(e).set(new Yt(t)),e}function di(t,e){var n=e?hi(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function pi(t,e){if(t!==e){var n=void 0!==t,r=null===t,i=t==t,o=Xa(t),a=void 0!==e,u=null===e,s=e==e,c=Xa(e);if(!u&&!c&&!o&&t>e||o&&a&&s&&!u&&!c||r&&a&&s||!n&&s||!i)return 1;if(!r&&!o&&!c&&t<e||c&&n&&i&&!r&&!o||u&&n&&i||!a&&i||!s)return-1}return 0}function gi(t,e,n,r){for(var i=-1,o=t.length,a=n.length,u=-1,s=e.length,c=an(o-a,0),f=ft(s+c),l=!r;++u<s;)f[u]=e[u];for(;++i<a;)(l||i<o)&&(f[n[i]]=t[i]);for(;c--;)f[u++]=t[i++];return f}function yi(t,e,n,r){for(var i=-1,o=t.length,a=-1,u=n.length,s=-1,c=e.length,f=an(o-u,0),l=ft(f+c),h=!r;++i<f;)l[i]=t[i];for(var d=i;++s<c;)l[d+s]=e[s];for(;++a<u;)(h||i<o)&&(l[d+n[a]]=t[i++]);return l}function bi(t,e){var n=-1,r=t.length;for(e||(e=ft(r));++n<r;)e[n]=t[n];return e}function vi(t,e,n,r){var i=!n;n||(n={});for(var o=-1,a=e.length;++o<a;){var u=e[o],s=r?r(n[u],t[u],u,n,t):void 0;void 0===s&&(s=t[u]),i?Wn(n,u,s):Yn(n,u,s)}return n}function mi(t,e){return function(n,r){var i=Ia(n)?ie:Gn,o=e?e():{};return i(n,t,Zi(r,2),o)}}function _i(t){return Pr((function(e,n){var r=-1,i=n.length,o=i>1?n[i-1]:void 0,a=i>2?n[2]:void 0;for(o=t.length>3&&"function"==typeof o?(i--,o):void 0,a&&uo(n[0],n[1],a)&&(o=i<3?void 0:o,i=1),e=gt(e);++r<i;){var u=n[r];u&&t(e,u,r,o)}return e}))}function wi(t,e){return function(n,r){if(null==n)return n;if(!ja(n))return t(n,r);for(var i=n.length,o=e?i:-1,a=gt(n);(e?o--:++o<i)&&!1!==r(a[o],o,a););return n}}function xi(t){return function(e,n,r){for(var i=-1,o=gt(e),a=r(e),u=a.length;u--;){var s=a[t?u:++i];if(!1===n(o[s],s,o))break}return e}}function ki(t){return function(e){var n=Be(e=uu(e))?Ve(e):void 0,r=n?n[0]:e.charAt(0),i=n?ci(n,1).join(""):e.slice(1);return r[t]()+i}}function Ei(t){return function(e){return de(qu(Nu(e).replace(Dt,"")),t,"")}}function Ai(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=On(t.prototype),r=t.apply(n,e);return Ya(r)?r:n}}function Si(t){return function(e,n,r){var i=gt(e);if(!ja(e)){var o=Zi(n,3);e=_u(e),n=function(t){return o(i[t],t,i)}}var a=t(e,n,r);return a>-1?i[o?e[a]:a]:void 0}}function Mi(t){return Vi((function(e){var n=e.length,i=n,o=Cn.prototype.thru;for(t&&e.reverse();i--;){var a=e[i];if("function"!=typeof a)throw new vt(r);if(o&&!u&&"wrapper"==$i(a))var u=new Cn([],!0)}for(i=u?i:n;++i<n;){var s=$i(a=e[i]),c="wrapper"==s?Wi(a):void 0;u=c&&co(c[0])&&424==c[1]&&!c[4].length&&1==c[9]?u[$i(c[0])].apply(u,c[3]):1==a.length&&co(a)?u[s]():u.thru(a)}return function(){var t=arguments,r=t[0];if(u&&1==t.length&&Ia(r))return u.plant(r).value();for(var i=0,o=n?e[i].apply(this,t):r;++i<n;)o=e[i].call(this,o);return o}}))}function Ti(t,e,n,r,i,o,a,u,s,c){var f=128&e,l=1&e,h=2&e,d=24&e,p=512&e,g=h?void 0:Ai(t);return function y(){for(var b=arguments.length,v=ft(b),m=b;m--;)v[m]=arguments[m];if(d)var _=Ki(y),w=Ie(v,_);if(r&&(v=gi(v,r,i,d)),o&&(v=yi(v,o,a,d)),b-=w,d&&b<c){var x=qe(v,_);return ji(t,e,Ti,y.placeholder,n,v,x,u,s,c-b)}var k=l?n:this,E=h?k[t]:t;return b=v.length,u?v=bo(v,u):p&&b>1&&v.reverse(),f&&s<b&&(v.length=s),this&&this!==Gt&&this instanceof y&&(E=g||Ai(E)),E.apply(k,v)}}function Oi(t,e){return function(n,r){return function(t,e,n,r){return sr(t,(function(t,i,o){e(r,n(t),i,o)})),r}(n,t,e(r),{})}}function Di(t,e){return function(n,r){var i;if(void 0===n&&void 0===r)return e;if(void 0!==n&&(i=n),void 0!==r){if(void 0===i)return r;"string"==typeof n||"string"==typeof r?(n=Xr(n),r=Xr(r)):(n=Zr(n),r=Zr(r)),i=t(n,r)}return i}}function Ci(t){return Vi((function(e){return e=le(e,Te(Zi())),Pr((function(n){var r=this;return t(e,(function(t){return re(t,r,n)}))}))}))}function Ni(t,e){var n=(e=void 0===e?" ":Xr(e)).length;if(n<2)return n?Br(e,t):e;var r=Br(e,Je(t/Ye(e)));return Be(e)?ci(Ve(r),0,t).join(""):r.slice(0,t)}function Ii(t){return function(e,n,r){return r&&"number"!=typeof r&&uo(e,n,r)&&(n=r=void 0),e=nu(e),void 0===n?(n=e,e=0):n=nu(n),function(t,e,n,r){for(var i=-1,o=an(Je((e-t)/(n||1)),0),a=ft(o);o--;)a[r?o:++i]=t,t+=n;return a}(e,n,r=void 0===r?e<n?1:-1:nu(r),t)}}function Ri(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=ou(e),n=ou(n)),t(e,n)}}function ji(t,e,n,r,i,o,a,u,s,c){var f=8&e;e|=f?32:64,4&(e&=~(f?64:32))||(e&=-4);var l=[t,e,i,f?o:void 0,f?a:void 0,f?void 0:o,f?void 0:a,u,s,c],h=n.apply(void 0,l);return co(t)&&mo(h,l),h.placeholder=r,xo(h,t,e)}function Li(t){var e=pt[t];return function(t,n){if(t=ou(t),(n=null==n?0:un(ru(n),292))&&nn(t)){var r=(uu(t)+"e").split("e");return+((r=(uu(e(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return e(t)}}var Bi=gn&&1/Ue(new gn([,-0]))[1]==1/0?function(t){return new gn(t)}:Xu;function Pi(t){return function(e){var n=no(e);return n==d?Pe(e):n==b?ze(e):function(t,e){return le(e,(function(e){return[e,t[e]]}))}(e,t(e))}}function Fi(t,e,n,o,a,u,s,c){var f=2&e;if(!f&&"function"!=typeof t)throw new vt(r);var l=o?o.length:0;if(l||(e&=-97,o=a=void 0),s=void 0===s?s:an(ru(s),0),c=void 0===c?c:ru(c),l-=a?a.length:0,64&e){var h=o,d=a;o=a=void 0}var p=f?void 0:Wi(t),g=[t,e,n,o,a,h,d,u,s,c];if(p&&function(t,e){var n=t[1],r=e[1],o=n|r,a=o<131,u=128==r&&8==n||128==r&&256==n&&t[7].length<=e[8]||384==r&&e[7].length<=e[8]&&8==n;if(!a&&!u)return t;1&r&&(t[2]=e[2],o|=1&n?0:4);var s=e[3];if(s){var c=t[3];t[3]=c?gi(c,s,e[4]):s,t[4]=c?qe(t[3],i):e[4]}(s=e[5])&&(c=t[5],t[5]=c?yi(c,s,e[6]):s,t[6]=c?qe(t[5],i):e[6]);(s=e[7])&&(t[7]=s);128&r&&(t[8]=null==t[8]?e[8]:un(t[8],e[8]));null==t[9]&&(t[9]=e[9]);t[0]=e[0],t[1]=o}(g,p),t=g[0],e=g[1],n=g[2],o=g[3],a=g[4],!(c=g[9]=void 0===g[9]?f?0:t.length:an(g[9]-l,0))&&24&e&&(e&=-25),e&&1!=e)y=8==e||16==e?function(t,e,n){var r=Ai(t);return function i(){for(var o=arguments.length,a=ft(o),u=o,s=Ki(i);u--;)a[u]=arguments[u];var c=o<3&&a[0]!==s&&a[o-1]!==s?[]:qe(a,s);if((o-=c.length)<n)return ji(t,e,Ti,i.placeholder,void 0,a,c,void 0,void 0,n-o);var f=this&&this!==Gt&&this instanceof i?r:t;return re(f,this,a)}}(t,e,c):32!=e&&33!=e||a.length?Ti.apply(void 0,g):function(t,e,n,r){var i=1&e,o=Ai(t);return function e(){for(var a=-1,u=arguments.length,s=-1,c=r.length,f=ft(c+u),l=this&&this!==Gt&&this instanceof e?o:t;++s<c;)f[s]=r[s];for(;u--;)f[s++]=arguments[++a];return re(l,i?n:this,f)}}(t,e,n,o);else var y=function(t,e,n){var r=1&e,i=Ai(t);return function e(){var o=this&&this!==Gt&&this instanceof e?i:t;return o.apply(r?n:this,arguments)}}(t,e,n);return xo((p?zr:mo)(y,g),t,e)}function qi(t,e,n,r){return void 0===t||Oa(t,wt[n])&&!Et.call(r,n)?e:t}function Ui(t,e,n,r,i,o){return Ya(t)&&Ya(e)&&(o.set(e,t),Dr(t,e,void 0,Ui,o),o.delete(e)),t}function zi(t){return Wa(t)?void 0:t}function Yi(t,e,n,r,i,o){var a=1&n,u=t.length,s=e.length;if(u!=s&&!(a&&s>u))return!1;var c=o.get(t);if(c&&o.get(e))return c==e;var f=-1,l=!0,h=2&n?new Ln:void 0;for(o.set(t,e),o.set(e,t);++f<u;){var d=t[f],p=e[f];if(r)var g=a?r(p,d,f,e,t,o):r(d,p,f,t,e,o);if(void 0!==g){if(g)continue;l=!1;break}if(h){if(!ge(e,(function(t,e){if(!De(h,e)&&(d===t||i(d,t,n,r,o)))return h.push(e)}))){l=!1;break}}else if(d!==p&&!i(d,p,n,r,o)){l=!1;break}}return o.delete(t),o.delete(e),l}function Vi(t){return wo(go(t,void 0,Ro),t+"")}function Gi(t){return hr(t,_u,to)}function Hi(t){return hr(t,wu,eo)}var Wi=vn?function(t){return vn.get(t)}:Xu;function $i(t){for(var e=t.name+"",n=mn[e],r=Et.call(mn,e)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==t)return i.name}return e}function Ki(t){return(Et.call(Tn,"placeholder")?Tn:t).placeholder}function Zi(){var t=Tn.iteratee||Wu;return t=t===Wu?kr:t,arguments.length?t(arguments[0],arguments[1]):t}function Xi(t,e){var n,r,i=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof e?"string":"hash"]:i.map}function Ji(t){for(var e=_u(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,ho(i)]}return e}function Qi(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return xr(n)?n:void 0}var to=tn?function(t){return null==t?[]:(t=gt(t),se(tn(t),(function(e){return Kt.call(t,e)})))}:is,eo=tn?function(t){for(var e=[];t;)he(e,to(t)),t=Ht(t);return e}:is,no=dr;function ro(t,e,n){for(var r=-1,i=(e=ui(e,t)).length,o=!1;++r<i;){var a=So(e[r]);if(!(o=null!=t&&n(t,a)))break;t=t[a]}return o||++r!=i?o:!!(i=null==t?0:t.length)&&za(i)&&ao(a,i)&&(Ia(t)||Na(t))}function io(t){return"function"!=typeof t.constructor||lo(t)?{}:On(Ht(t))}function oo(t){return Ia(t)||Na(t)||!!(ye&&t&&t[ye])}function ao(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&at.test(t))&&t>-1&&t%1==0&&t<e}function uo(t,e,n){if(!Ya(n))return!1;var r=typeof e;return!!("number"==r?ja(n)&&ao(e,n.length):"string"==r&&e in n)&&Oa(n[e],t)}function so(t,e){if(Ia(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!Xa(t))||(z.test(t)||!U.test(t)||null!=e&&t in gt(e))}function co(t){var e=$i(t),n=Tn[e];if("function"!=typeof n||!(e in Nn.prototype))return!1;if(t===n)return!0;var r=Wi(n);return!!r&&t===r[0]}(hn&&no(new hn(new ArrayBuffer(1)))!=x||dn&&no(new dn)!=d||pn&&"[object Promise]"!=no(pn.resolve())||gn&&no(new gn)!=b||yn&&no(new yn)!=_)&&(no=function(t){var e=dr(t),n=e==g?t.constructor:void 0,r=n?Mo(n):"";if(r)switch(r){case _n:return x;case wn:return d;case xn:return"[object Promise]";case kn:return b;case En:return _}return e});var fo=xt?qa:os;function lo(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||wt)}function ho(t){return t==t&&!Ya(t)}function po(t,e){return function(n){return null!=n&&(n[t]===e&&(void 0!==e||t in gt(n)))}}function go(t,e,n){return e=an(void 0===e?t.length-1:e,0),function(){for(var r=arguments,i=-1,o=an(r.length-e,0),a=ft(o);++i<o;)a[i]=r[e+i];i=-1;for(var u=ft(e+1);++i<e;)u[i]=r[i];return u[e]=n(a),re(t,this,u)}}function yo(t,e){return e.length<2?t:lr(t,Gr(e,0,-1))}function bo(t,e){for(var n=t.length,r=un(e.length,n),i=bi(t);r--;){var o=e[r];t[r]=ao(o,n)?i[o]:void 0}return t}function vo(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var mo=ko(zr),_o=Xe||function(t,e){return Gt.setTimeout(t,e)},wo=ko(Yr);function xo(t,e,n){var r=e+"";return wo(t,function(t,e){var n=e.length;if(!n)return t;var r=n-1;return e[r]=(n>1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(K,"{\n/* [wrapped with "+e+"] */\n")}(r,function(t,e){return oe(o,(function(n){var r="_."+n[0];e&n[1]&&!ce(t,r)&&t.push(r)})),t.sort()}(function(t){var e=t.match(Z);return e?e[1].split(X):[]}(r),n)))}function ko(t){var e=0,n=0;return function(){var r=sn(),i=16-(r-n);if(n=r,i>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function Eo(t,e){var n=-1,r=t.length,i=r-1;for(e=void 0===e?r:e;++n<e;){var o=Lr(n,i),a=t[o];t[o]=t[n],t[n]=a}return t.length=e,t}var Ao=function(t){var e=ka(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(Y,(function(t,n,r,i){e.push(r?i.replace(Q,"$1"):n||t)})),e}));function So(t){if("string"==typeof t||Xa(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function Mo(t){if(null!=t){try{return kt.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function To(t){if(t instanceof Nn)return t.clone();var e=new Cn(t.__wrapped__,t.__chain__);return e.__actions__=bi(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var Oo=Pr((function(t,e){return La(t)?Qn(t,or(e,1,La,!0)):[]})),Do=Pr((function(t,e){var n=Fo(e);return La(n)&&(n=void 0),La(t)?Qn(t,or(e,1,La,!0),Zi(n,2)):[]})),Co=Pr((function(t,e){var n=Fo(e);return La(n)&&(n=void 0),La(t)?Qn(t,or(e,1,La,!0),void 0,n):[]}));function No(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:ru(n);return i<0&&(i=an(r+i,0)),ve(t,Zi(e,3),i)}function Io(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=r-1;return void 0!==n&&(i=ru(n),i=n<0?an(r+i,0):un(i,r-1)),ve(t,Zi(e,3),i,!0)}function Ro(t){return(null==t?0:t.length)?or(t,1):[]}function jo(t){return t&&t.length?t[0]:void 0}var Lo=Pr((function(t){var e=le(t,oi);return e.length&&e[0]===t[0]?br(e):[]})),Bo=Pr((function(t){var e=Fo(t),n=le(t,oi);return e===Fo(n)?e=void 0:n.pop(),n.length&&n[0]===t[0]?br(n,Zi(e,2)):[]})),Po=Pr((function(t){var e=Fo(t),n=le(t,oi);return(e="function"==typeof e?e:void 0)&&n.pop(),n.length&&n[0]===t[0]?br(n,void 0,e):[]}));function Fo(t){var e=null==t?0:t.length;return e?t[e-1]:void 0}var qo=Pr(Uo);function Uo(t,e){return t&&t.length&&e&&e.length?Rr(t,e):t}var zo=Vi((function(t,e){var n=null==t?0:t.length,r=$n(t,e);return jr(t,le(e,(function(t){return ao(t,n)?+t:t})).sort(pi)),r}));function Yo(t){return null==t?t:ln.call(t)}var Vo=Pr((function(t){return Jr(or(t,1,La,!0))})),Go=Pr((function(t){var e=Fo(t);return La(e)&&(e=void 0),Jr(or(t,1,La,!0),Zi(e,2))})),Ho=Pr((function(t){var e=Fo(t);return e="function"==typeof e?e:void 0,Jr(or(t,1,La,!0),void 0,e)}));function Wo(t){if(!t||!t.length)return[];var e=0;return t=se(t,(function(t){if(La(t))return e=an(t.length,e),!0})),Me(e,(function(e){return le(t,ke(e))}))}function $o(t,e){if(!t||!t.length)return[];var n=Wo(t);return null==e?n:le(n,(function(t){return re(e,void 0,t)}))}var Ko=Pr((function(t,e){return La(t)?Qn(t,e):[]})),Zo=Pr((function(t){return ri(se(t,La))})),Xo=Pr((function(t){var e=Fo(t);return La(e)&&(e=void 0),ri(se(t,La),Zi(e,2))})),Jo=Pr((function(t){var e=Fo(t);return e="function"==typeof e?e:void 0,ri(se(t,La),void 0,e)})),Qo=Pr(Wo);var ta=Pr((function(t){var e=t.length,n=e>1?t[e-1]:void 0;return n="function"==typeof n?(t.pop(),n):void 0,$o(t,n)}));function ea(t){var e=Tn(t);return e.__chain__=!0,e}function na(t,e){return e(t)}var ra=Vi((function(t){var e=t.length,n=e?t[0]:0,r=this.__wrapped__,i=function(e){return $n(e,t)};return!(e>1||this.__actions__.length)&&r instanceof Nn&&ao(n)?((r=r.slice(n,+n+(e?1:0))).__actions__.push({func:na,args:[i],thisArg:void 0}),new Cn(r,this.__chain__).thru((function(t){return e&&!t.length&&t.push(void 0),t}))):this.thru(i)}));var ia=mi((function(t,e,n){Et.call(t,n)?++t[n]:Wn(t,n,1)}));var oa=Si(No),aa=Si(Io);function ua(t,e){return(Ia(t)?oe:tr)(t,Zi(e,3))}function sa(t,e){return(Ia(t)?ae:er)(t,Zi(e,3))}var ca=mi((function(t,e,n){Et.call(t,n)?t[n].push(e):Wn(t,n,[e])}));var fa=Pr((function(t,e,n){var r=-1,i="function"==typeof e,o=ja(t)?ft(t.length):[];return tr(t,(function(t){o[++r]=i?re(e,t,n):vr(t,e,n)})),o})),la=mi((function(t,e,n){Wn(t,n,e)}));function ha(t,e){return(Ia(t)?le:Mr)(t,Zi(e,3))}var da=mi((function(t,e,n){t[n?0:1].push(e)}),(function(){return[[],[]]}));var pa=Pr((function(t,e){if(null==t)return[];var n=e.length;return n>1&&uo(t,e[0],e[1])?e=[]:n>2&&uo(e[0],e[1],e[2])&&(e=[e[0]]),Nr(t,or(e,1),[])})),ga=Ze||function(){return Gt.Date.now()};function ya(t,e,n){return e=n?void 0:e,Fi(t,128,void 0,void 0,void 0,void 0,e=t&&null==e?t.length:e)}function ba(t,e){var n;if("function"!=typeof e)throw new vt(r);return t=ru(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=void 0),n}}var va=Pr((function(t,e,n){var r=1;if(n.length){var i=qe(n,Ki(va));r|=32}return Fi(t,r,e,n,i)})),ma=Pr((function(t,e,n){var r=3;if(n.length){var i=qe(n,Ki(ma));r|=32}return Fi(e,r,t,n,i)}));function _a(t,e,n){var i,o,a,u,s,c,f=0,l=!1,h=!1,d=!0;if("function"!=typeof t)throw new vt(r);function p(e){var n=i,r=o;return i=o=void 0,f=e,u=t.apply(r,n)}function g(t){return f=t,s=_o(b,e),l?p(t):u}function y(t){var n=t-c;return void 0===c||n>=e||n<0||h&&t-f>=a}function b(){var t=ga();if(y(t))return v(t);s=_o(b,function(t){var n=e-(t-c);return h?un(n,a-(t-f)):n}(t))}function v(t){return s=void 0,d&&i?p(t):(i=o=void 0,u)}function m(){var t=ga(),n=y(t);if(i=arguments,o=this,c=t,n){if(void 0===s)return g(c);if(h)return fi(s),s=_o(b,e),p(c)}return void 0===s&&(s=_o(b,e)),u}return e=ou(e)||0,Ya(n)&&(l=!!n.leading,a=(h="maxWait"in n)?an(ou(n.maxWait)||0,e):a,d="trailing"in n?!!n.trailing:d),m.cancel=function(){void 0!==s&&fi(s),f=0,i=c=o=s=void 0},m.flush=function(){return void 0===s?u:v(ga())},m}var wa=Pr((function(t,e){return Jn(t,1,e)})),xa=Pr((function(t,e,n){return Jn(t,ou(e)||0,n)}));function ka(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new vt(r);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=t.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(ka.Cache||jn),n}function Ea(t){if("function"!=typeof t)throw new vt(r);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}ka.Cache=jn;var Aa=si((function(t,e){var n=(e=1==e.length&&Ia(e[0])?le(e[0],Te(Zi())):le(or(e,1),Te(Zi()))).length;return Pr((function(r){for(var i=-1,o=un(r.length,n);++i<o;)r[i]=e[i].call(this,r[i]);return re(t,this,r)}))})),Sa=Pr((function(t,e){return Fi(t,32,void 0,e,qe(e,Ki(Sa)))})),Ma=Pr((function(t,e){return Fi(t,64,void 0,e,qe(e,Ki(Ma)))})),Ta=Vi((function(t,e){return Fi(t,256,void 0,void 0,void 0,e)}));function Oa(t,e){return t===e||t!=t&&e!=e}var Da=Ri(pr),Ca=Ri((function(t,e){return t>=e})),Na=mr(function(){return arguments}())?mr:function(t){return Va(t)&&Et.call(t,"callee")&&!Kt.call(t,"callee")},Ia=ft.isArray,Ra=Xt?Te(Xt):function(t){return Va(t)&&dr(t)==w};function ja(t){return null!=t&&za(t.length)&&!qa(t)}function La(t){return Va(t)&&ja(t)}var Ba=en||os,Pa=Jt?Te(Jt):function(t){return Va(t)&&dr(t)==c};function Fa(t){if(!Va(t))return!1;var e=dr(t);return e==f||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!Wa(t)}function qa(t){if(!Ya(t))return!1;var e=dr(t);return e==l||e==h||"[object AsyncFunction]"==e||"[object Proxy]"==e}function Ua(t){return"number"==typeof t&&t==ru(t)}function za(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}function Ya(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function Va(t){return null!=t&&"object"==typeof t}var Ga=Qt?Te(Qt):function(t){return Va(t)&&no(t)==d};function Ha(t){return"number"==typeof t||Va(t)&&dr(t)==p}function Wa(t){if(!Va(t)||dr(t)!=g)return!1;var e=Ht(t);if(null===e)return!0;var n=Et.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&kt.call(n)==Tt}var $a=te?Te(te):function(t){return Va(t)&&dr(t)==y};var Ka=ee?Te(ee):function(t){return Va(t)&&no(t)==b};function Za(t){return"string"==typeof t||!Ia(t)&&Va(t)&&dr(t)==v}function Xa(t){return"symbol"==typeof t||Va(t)&&dr(t)==m}var Ja=ne?Te(ne):function(t){return Va(t)&&za(t.length)&&!!Pt[dr(t)]};var Qa=Ri(Sr),tu=Ri((function(t,e){return t<=e}));function eu(t){if(!t)return[];if(ja(t))return Za(t)?Ve(t):bi(t);if(Ee&&t[Ee])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[Ee]());var e=no(t);return(e==d?Pe:e==b?Ue:Ou)(t)}function nu(t){return t?(t=ou(t))===1/0||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function ru(t){var e=nu(t),n=e%1;return e==e?n?e-n:e:0}function iu(t){return t?Kn(ru(t),0,4294967295):0}function ou(t){if("number"==typeof t)return t;if(Xa(t))return NaN;if(Ya(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=Ya(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(H,"");var n=rt.test(t);return n||ot.test(t)?zt(t.slice(2),n?2:8):nt.test(t)?NaN:+t}function au(t){return vi(t,wu(t))}function uu(t){return null==t?"":Xr(t)}var su=_i((function(t,e){if(lo(e)||ja(e))vi(e,_u(e),t);else for(var n in e)Et.call(e,n)&&Yn(t,n,e[n])})),cu=_i((function(t,e){vi(e,wu(e),t)})),fu=_i((function(t,e,n,r){vi(e,wu(e),t,r)})),lu=_i((function(t,e,n,r){vi(e,_u(e),t,r)})),hu=Vi($n);var du=Pr((function(t,e){t=gt(t);var n=-1,r=e.length,i=r>2?e[2]:void 0;for(i&&uo(e[0],e[1],i)&&(r=1);++n<r;)for(var o=e[n],a=wu(o),u=-1,s=a.length;++u<s;){var c=a[u],f=t[c];(void 0===f||Oa(f,wt[c])&&!Et.call(t,c))&&(t[c]=o[c])}return t})),pu=Pr((function(t){return t.push(void 0,Ui),re(ku,void 0,t)}));function gu(t,e,n){var r=null==t?void 0:lr(t,e);return void 0===r?n:r}function yu(t,e){return null!=t&&ro(t,e,yr)}var bu=Oi((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=Mt.call(e)),t[e]=n}),Yu(Hu)),vu=Oi((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=Mt.call(e)),Et.call(t,e)?t[e].push(n):t[e]=[n]}),Zi),mu=Pr(vr);function _u(t){return ja(t)?Pn(t):Er(t)}function wu(t){return ja(t)?Pn(t,!0):Ar(t)}var xu=_i((function(t,e,n){Dr(t,e,n)})),ku=_i((function(t,e,n,r){Dr(t,e,n,r)})),Eu=Vi((function(t,e){var n={};if(null==t)return n;var r=!1;e=le(e,(function(e){return e=ui(e,t),r||(r=e.length>1),e})),vi(t,Hi(t),n),r&&(n=Zn(n,7,zi));for(var i=e.length;i--;)Qr(n,e[i]);return n}));var Au=Vi((function(t,e){return null==t?{}:function(t,e){return Ir(t,e,(function(e,n){return yu(t,n)}))}(t,e)}));function Su(t,e){if(null==t)return{};var n=le(Hi(t),(function(t){return[t]}));return e=Zi(e),Ir(t,n,(function(t,n){return e(t,n[0])}))}var Mu=Pi(_u),Tu=Pi(wu);function Ou(t){return null==t?[]:Oe(t,_u(t))}var Du=Ei((function(t,e,n){return e=e.toLowerCase(),t+(n?Cu(e):e)}));function Cu(t){return Fu(uu(t).toLowerCase())}function Nu(t){return(t=uu(t))&&t.replace(ut,Re).replace(Ct,"")}var Iu=Ei((function(t,e,n){return t+(n?"-":"")+e.toLowerCase()})),Ru=Ei((function(t,e,n){return t+(n?" ":"")+e.toLowerCase()})),ju=ki("toLowerCase");var Lu=Ei((function(t,e,n){return t+(n?"_":"")+e.toLowerCase()}));var Bu=Ei((function(t,e,n){return t+(n?" ":"")+Fu(e)}));var Pu=Ei((function(t,e,n){return t+(n?" ":"")+e.toUpperCase()})),Fu=ki("toUpperCase");function qu(t,e,n){return t=uu(t),void 0===(e=n?void 0:e)?function(t){return jt.test(t)}(t)?function(t){return t.match(It)||[]}(t):function(t){return t.match(J)||[]}(t):t.match(e)||[]}var Uu=Pr((function(t,e){try{return re(t,void 0,e)}catch(t){return Fa(t)?t:new ht(t)}})),zu=Vi((function(t,e){return oe(e,(function(e){e=So(e),Wn(t,e,va(t[e],t))})),t}));function Yu(t){return function(){return t}}var Vu=Mi(),Gu=Mi(!0);function Hu(t){return t}function Wu(t){return kr("function"==typeof t?t:Zn(t,1))}var $u=Pr((function(t,e){return function(n){return vr(n,t,e)}})),Ku=Pr((function(t,e){return function(n){return vr(t,n,e)}}));function Zu(t,e,n){var r=_u(e),i=fr(e,r);null!=n||Ya(e)&&(i.length||!r.length)||(n=e,e=t,t=this,i=fr(e,_u(e)));var o=!(Ya(n)&&"chain"in n&&!n.chain),a=qa(t);return oe(i,(function(n){var r=e[n];t[n]=r,a&&(t.prototype[n]=function(){var e=this.__chain__;if(o||e){var n=t(this.__wrapped__),i=n.__actions__=bi(this.__actions__);return i.push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,he([this.value()],arguments))})})),t}function Xu(){}var Ju=Ci(le),Qu=Ci(ue),ts=Ci(ge);function es(t){return so(t)?ke(So(t)):function(t){return function(e){return lr(e,t)}}(t)}var ns=Ii(),rs=Ii(!0);function is(){return[]}function os(){return!1}var as=Di((function(t,e){return t+e}),0),us=Li("ceil"),ss=Di((function(t,e){return t/e}),1),cs=Li("floor");var fs,ls=Di((function(t,e){return t*e}),1),hs=Li("round"),ds=Di((function(t,e){return t-e}),0);return Tn.after=function(t,e){if("function"!=typeof e)throw new vt(r);return t=ru(t),function(){if(--t<1)return e.apply(this,arguments)}},Tn.ary=ya,Tn.assign=su,Tn.assignIn=cu,Tn.assignInWith=fu,Tn.assignWith=lu,Tn.at=hu,Tn.before=ba,Tn.bind=va,Tn.bindAll=zu,Tn.bindKey=ma,Tn.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Ia(t)?t:[t]},Tn.chain=ea,Tn.chunk=function(t,e,n){e=(n?uo(t,e,n):void 0===e)?1:an(ru(e),0);var r=null==t?0:t.length;if(!r||e<1)return[];for(var i=0,o=0,a=ft(Je(r/e));i<r;)a[o++]=Gr(t,i,i+=e);return a},Tn.compact=function(t){for(var e=-1,n=null==t?0:t.length,r=0,i=[];++e<n;){var o=t[e];o&&(i[r++]=o)}return i},Tn.concat=function(){var t=arguments.length;if(!t)return[];for(var e=ft(t-1),n=arguments[0],r=t;r--;)e[r-1]=arguments[r];return he(Ia(n)?bi(n):[n],or(e,1))},Tn.cond=function(t){var e=null==t?0:t.length,n=Zi();return t=e?le(t,(function(t){if("function"!=typeof t[1])throw new vt(r);return[n(t[0]),t[1]]})):[],Pr((function(n){for(var r=-1;++r<e;){var i=t[r];if(re(i[0],this,n))return re(i[1],this,n)}}))},Tn.conforms=function(t){return function(t){var e=_u(t);return function(n){return Xn(n,t,e)}}(Zn(t,1))},Tn.constant=Yu,Tn.countBy=ia,Tn.create=function(t,e){var n=On(t);return null==e?n:Hn(n,e)},Tn.curry=function t(e,n,r){var i=Fi(e,8,void 0,void 0,void 0,void 0,void 0,n=r?void 0:n);return i.placeholder=t.placeholder,i},Tn.curryRight=function t(e,n,r){var i=Fi(e,16,void 0,void 0,void 0,void 0,void 0,n=r?void 0:n);return i.placeholder=t.placeholder,i},Tn.debounce=_a,Tn.defaults=du,Tn.defaultsDeep=pu,Tn.defer=wa,Tn.delay=xa,Tn.difference=Oo,Tn.differenceBy=Do,Tn.differenceWith=Co,Tn.drop=function(t,e,n){var r=null==t?0:t.length;return r?Gr(t,(e=n||void 0===e?1:ru(e))<0?0:e,r):[]},Tn.dropRight=function(t,e,n){var r=null==t?0:t.length;return r?Gr(t,0,(e=r-(e=n||void 0===e?1:ru(e)))<0?0:e):[]},Tn.dropRightWhile=function(t,e){return t&&t.length?ei(t,Zi(e,3),!0,!0):[]},Tn.dropWhile=function(t,e){return t&&t.length?ei(t,Zi(e,3),!0):[]},Tn.fill=function(t,e,n,r){var i=null==t?0:t.length;return i?(n&&"number"!=typeof n&&uo(t,e,n)&&(n=0,r=i),function(t,e,n,r){var i=t.length;for((n=ru(n))<0&&(n=-n>i?0:i+n),(r=void 0===r||r>i?i:ru(r))<0&&(r+=i),r=n>r?0:iu(r);n<r;)t[n++]=e;return t}(t,e,n,r)):[]},Tn.filter=function(t,e){return(Ia(t)?se:ir)(t,Zi(e,3))},Tn.flatMap=function(t,e){return or(ha(t,e),1)},Tn.flatMapDeep=function(t,e){return or(ha(t,e),1/0)},Tn.flatMapDepth=function(t,e,n){return n=void 0===n?1:ru(n),or(ha(t,e),n)},Tn.flatten=Ro,Tn.flattenDeep=function(t){return(null==t?0:t.length)?or(t,1/0):[]},Tn.flattenDepth=function(t,e){return(null==t?0:t.length)?or(t,e=void 0===e?1:ru(e)):[]},Tn.flip=function(t){return Fi(t,512)},Tn.flow=Vu,Tn.flowRight=Gu,Tn.fromPairs=function(t){for(var e=-1,n=null==t?0:t.length,r={};++e<n;){var i=t[e];r[i[0]]=i[1]}return r},Tn.functions=function(t){return null==t?[]:fr(t,_u(t))},Tn.functionsIn=function(t){return null==t?[]:fr(t,wu(t))},Tn.groupBy=ca,Tn.initial=function(t){return(null==t?0:t.length)?Gr(t,0,-1):[]},Tn.intersection=Lo,Tn.intersectionBy=Bo,Tn.intersectionWith=Po,Tn.invert=bu,Tn.invertBy=vu,Tn.invokeMap=fa,Tn.iteratee=Wu,Tn.keyBy=la,Tn.keys=_u,Tn.keysIn=wu,Tn.map=ha,Tn.mapKeys=function(t,e){var n={};return e=Zi(e,3),sr(t,(function(t,r,i){Wn(n,e(t,r,i),t)})),n},Tn.mapValues=function(t,e){var n={};return e=Zi(e,3),sr(t,(function(t,r,i){Wn(n,r,e(t,r,i))})),n},Tn.matches=function(t){return Tr(Zn(t,1))},Tn.matchesProperty=function(t,e){return Or(t,Zn(e,1))},Tn.memoize=ka,Tn.merge=xu,Tn.mergeWith=ku,Tn.method=$u,Tn.methodOf=Ku,Tn.mixin=Zu,Tn.negate=Ea,Tn.nthArg=function(t){return t=ru(t),Pr((function(e){return Cr(e,t)}))},Tn.omit=Eu,Tn.omitBy=function(t,e){return Su(t,Ea(Zi(e)))},Tn.once=function(t){return ba(2,t)},Tn.orderBy=function(t,e,n,r){return null==t?[]:(Ia(e)||(e=null==e?[]:[e]),Ia(n=r?void 0:n)||(n=null==n?[]:[n]),Nr(t,e,n))},Tn.over=Ju,Tn.overArgs=Aa,Tn.overEvery=Qu,Tn.overSome=ts,Tn.partial=Sa,Tn.partialRight=Ma,Tn.partition=da,Tn.pick=Au,Tn.pickBy=Su,Tn.property=es,Tn.propertyOf=function(t){return function(e){return null==t?void 0:lr(t,e)}},Tn.pull=qo,Tn.pullAll=Uo,Tn.pullAllBy=function(t,e,n){return t&&t.length&&e&&e.length?Rr(t,e,Zi(n,2)):t},Tn.pullAllWith=function(t,e,n){return t&&t.length&&e&&e.length?Rr(t,e,void 0,n):t},Tn.pullAt=zo,Tn.range=ns,Tn.rangeRight=rs,Tn.rearg=Ta,Tn.reject=function(t,e){return(Ia(t)?se:ir)(t,Ea(Zi(e,3)))},Tn.remove=function(t,e){var n=[];if(!t||!t.length)return n;var r=-1,i=[],o=t.length;for(e=Zi(e,3);++r<o;){var a=t[r];e(a,r,t)&&(n.push(a),i.push(r))}return jr(t,i),n},Tn.rest=function(t,e){if("function"!=typeof t)throw new vt(r);return Pr(t,e=void 0===e?e:ru(e))},Tn.reverse=Yo,Tn.sampleSize=function(t,e,n){return e=(n?uo(t,e,n):void 0===e)?1:ru(e),(Ia(t)?qn:qr)(t,e)},Tn.set=function(t,e,n){return null==t?t:Ur(t,e,n)},Tn.setWith=function(t,e,n,r){return r="function"==typeof r?r:void 0,null==t?t:Ur(t,e,n,r)},Tn.shuffle=function(t){return(Ia(t)?Un:Vr)(t)},Tn.slice=function(t,e,n){var r=null==t?0:t.length;return r?(n&&"number"!=typeof n&&uo(t,e,n)?(e=0,n=r):(e=null==e?0:ru(e),n=void 0===n?r:ru(n)),Gr(t,e,n)):[]},Tn.sortBy=pa,Tn.sortedUniq=function(t){return t&&t.length?Kr(t):[]},Tn.sortedUniqBy=function(t,e){return t&&t.length?Kr(t,Zi(e,2)):[]},Tn.split=function(t,e,n){return n&&"number"!=typeof n&&uo(t,e,n)&&(e=n=void 0),(n=void 0===n?4294967295:n>>>0)?(t=uu(t))&&("string"==typeof e||null!=e&&!$a(e))&&!(e=Xr(e))&&Be(t)?ci(Ve(t),0,n):t.split(e,n):[]},Tn.spread=function(t,e){if("function"!=typeof t)throw new vt(r);return e=null==e?0:an(ru(e),0),Pr((function(n){var r=n[e],i=ci(n,0,e);return r&&he(i,r),re(t,this,i)}))},Tn.tail=function(t){var e=null==t?0:t.length;return e?Gr(t,1,e):[]},Tn.take=function(t,e,n){return t&&t.length?Gr(t,0,(e=n||void 0===e?1:ru(e))<0?0:e):[]},Tn.takeRight=function(t,e,n){var r=null==t?0:t.length;return r?Gr(t,(e=r-(e=n||void 0===e?1:ru(e)))<0?0:e,r):[]},Tn.takeRightWhile=function(t,e){return t&&t.length?ei(t,Zi(e,3),!1,!0):[]},Tn.takeWhile=function(t,e){return t&&t.length?ei(t,Zi(e,3)):[]},Tn.tap=function(t,e){return e(t),t},Tn.throttle=function(t,e,n){var i=!0,o=!0;if("function"!=typeof t)throw new vt(r);return Ya(n)&&(i="leading"in n?!!n.leading:i,o="trailing"in n?!!n.trailing:o),_a(t,e,{leading:i,maxWait:e,trailing:o})},Tn.thru=na,Tn.toArray=eu,Tn.toPairs=Mu,Tn.toPairsIn=Tu,Tn.toPath=function(t){return Ia(t)?le(t,So):Xa(t)?[t]:bi(Ao(uu(t)))},Tn.toPlainObject=au,Tn.transform=function(t,e,n){var r=Ia(t),i=r||Ba(t)||Ja(t);if(e=Zi(e,4),null==n){var o=t&&t.constructor;n=i?r?new o:[]:Ya(t)&&qa(o)?On(Ht(t)):{}}return(i?oe:sr)(t,(function(t,r,i){return e(n,t,r,i)})),n},Tn.unary=function(t){return ya(t,1)},Tn.union=Vo,Tn.unionBy=Go,Tn.unionWith=Ho,Tn.uniq=function(t){return t&&t.length?Jr(t):[]},Tn.uniqBy=function(t,e){return t&&t.length?Jr(t,Zi(e,2)):[]},Tn.uniqWith=function(t,e){return e="function"==typeof e?e:void 0,t&&t.length?Jr(t,void 0,e):[]},Tn.unset=function(t,e){return null==t||Qr(t,e)},Tn.unzip=Wo,Tn.unzipWith=$o,Tn.update=function(t,e,n){return null==t?t:ti(t,e,ai(n))},Tn.updateWith=function(t,e,n,r){return r="function"==typeof r?r:void 0,null==t?t:ti(t,e,ai(n),r)},Tn.values=Ou,Tn.valuesIn=function(t){return null==t?[]:Oe(t,wu(t))},Tn.without=Ko,Tn.words=qu,Tn.wrap=function(t,e){return Sa(ai(e),t)},Tn.xor=Zo,Tn.xorBy=Xo,Tn.xorWith=Jo,Tn.zip=Qo,Tn.zipObject=function(t,e){return ii(t||[],e||[],Yn)},Tn.zipObjectDeep=function(t,e){return ii(t||[],e||[],Ur)},Tn.zipWith=ta,Tn.entries=Mu,Tn.entriesIn=Tu,Tn.extend=cu,Tn.extendWith=fu,Zu(Tn,Tn),Tn.add=as,Tn.attempt=Uu,Tn.camelCase=Du,Tn.capitalize=Cu,Tn.ceil=us,Tn.clamp=function(t,e,n){return void 0===n&&(n=e,e=void 0),void 0!==n&&(n=(n=ou(n))==n?n:0),void 0!==e&&(e=(e=ou(e))==e?e:0),Kn(ou(t),e,n)},Tn.clone=function(t){return Zn(t,4)},Tn.cloneDeep=function(t){return Zn(t,5)},Tn.cloneDeepWith=function(t,e){return Zn(t,5,e="function"==typeof e?e:void 0)},Tn.cloneWith=function(t,e){return Zn(t,4,e="function"==typeof e?e:void 0)},Tn.conformsTo=function(t,e){return null==e||Xn(t,e,_u(e))},Tn.deburr=Nu,Tn.defaultTo=function(t,e){return null==t||t!=t?e:t},Tn.divide=ss,Tn.endsWith=function(t,e,n){t=uu(t),e=Xr(e);var r=t.length,i=n=void 0===n?r:Kn(ru(n),0,r);return(n-=e.length)>=0&&t.slice(n,i)==e},Tn.eq=Oa,Tn.escape=function(t){return(t=uu(t))&&B.test(t)?t.replace(j,je):t},Tn.escapeRegExp=function(t){return(t=uu(t))&&G.test(t)?t.replace(V,"\\$&"):t},Tn.every=function(t,e,n){var r=Ia(t)?ue:nr;return n&&uo(t,e,n)&&(e=void 0),r(t,Zi(e,3))},Tn.find=oa,Tn.findIndex=No,Tn.findKey=function(t,e){return be(t,Zi(e,3),sr)},Tn.findLast=aa,Tn.findLastIndex=Io,Tn.findLastKey=function(t,e){return be(t,Zi(e,3),cr)},Tn.floor=cs,Tn.forEach=ua,Tn.forEachRight=sa,Tn.forIn=function(t,e){return null==t?t:ar(t,Zi(e,3),wu)},Tn.forInRight=function(t,e){return null==t?t:ur(t,Zi(e,3),wu)},Tn.forOwn=function(t,e){return t&&sr(t,Zi(e,3))},Tn.forOwnRight=function(t,e){return t&&cr(t,Zi(e,3))},Tn.get=gu,Tn.gt=Da,Tn.gte=Ca,Tn.has=function(t,e){return null!=t&&ro(t,e,gr)},Tn.hasIn=yu,Tn.head=jo,Tn.identity=Hu,Tn.includes=function(t,e,n,r){t=ja(t)?t:Ou(t),n=n&&!r?ru(n):0;var i=t.length;return n<0&&(n=an(i+n,0)),Za(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&me(t,e,n)>-1},Tn.indexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:ru(n);return i<0&&(i=an(r+i,0)),me(t,e,i)},Tn.inRange=function(t,e,n){return e=nu(e),void 0===n?(n=e,e=0):n=nu(n),function(t,e,n){return t>=un(e,n)&&t<an(e,n)}(t=ou(t),e,n)},Tn.invoke=mu,Tn.isArguments=Na,Tn.isArray=Ia,Tn.isArrayBuffer=Ra,Tn.isArrayLike=ja,Tn.isArrayLikeObject=La,Tn.isBoolean=function(t){return!0===t||!1===t||Va(t)&&dr(t)==s},Tn.isBuffer=Ba,Tn.isDate=Pa,Tn.isElement=function(t){return Va(t)&&1===t.nodeType&&!Wa(t)},Tn.isEmpty=function(t){if(null==t)return!0;if(ja(t)&&(Ia(t)||"string"==typeof t||"function"==typeof t.splice||Ba(t)||Ja(t)||Na(t)))return!t.length;var e=no(t);if(e==d||e==b)return!t.size;if(lo(t))return!Er(t).length;for(var n in t)if(Et.call(t,n))return!1;return!0},Tn.isEqual=function(t,e){return _r(t,e)},Tn.isEqualWith=function(t,e,n){var r=(n="function"==typeof n?n:void 0)?n(t,e):void 0;return void 0===r?_r(t,e,void 0,n):!!r},Tn.isError=Fa,Tn.isFinite=function(t){return"number"==typeof t&&nn(t)},Tn.isFunction=qa,Tn.isInteger=Ua,Tn.isLength=za,Tn.isMap=Ga,Tn.isMatch=function(t,e){return t===e||wr(t,e,Ji(e))},Tn.isMatchWith=function(t,e,n){return n="function"==typeof n?n:void 0,wr(t,e,Ji(e),n)},Tn.isNaN=function(t){return Ha(t)&&t!=+t},Tn.isNative=function(t){if(fo(t))throw new ht("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return xr(t)},Tn.isNil=function(t){return null==t},Tn.isNull=function(t){return null===t},Tn.isNumber=Ha,Tn.isObject=Ya,Tn.isObjectLike=Va,Tn.isPlainObject=Wa,Tn.isRegExp=$a,Tn.isSafeInteger=function(t){return Ua(t)&&t>=-9007199254740991&&t<=9007199254740991},Tn.isSet=Ka,Tn.isString=Za,Tn.isSymbol=Xa,Tn.isTypedArray=Ja,Tn.isUndefined=function(t){return void 0===t},Tn.isWeakMap=function(t){return Va(t)&&no(t)==_},Tn.isWeakSet=function(t){return Va(t)&&"[object WeakSet]"==dr(t)},Tn.join=function(t,e){return null==t?"":rn.call(t,e)},Tn.kebabCase=Iu,Tn.last=Fo,Tn.lastIndexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=r;return void 0!==n&&(i=(i=ru(n))<0?an(r+i,0):un(i,r-1)),e==e?function(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}(t,e,i):ve(t,we,i,!0)},Tn.lowerCase=Ru,Tn.lowerFirst=ju,Tn.lt=Qa,Tn.lte=tu,Tn.max=function(t){return t&&t.length?rr(t,Hu,pr):void 0},Tn.maxBy=function(t,e){return t&&t.length?rr(t,Zi(e,2),pr):void 0},Tn.mean=function(t){return xe(t,Hu)},Tn.meanBy=function(t,e){return xe(t,Zi(e,2))},Tn.min=function(t){return t&&t.length?rr(t,Hu,Sr):void 0},Tn.minBy=function(t,e){return t&&t.length?rr(t,Zi(e,2),Sr):void 0},Tn.stubArray=is,Tn.stubFalse=os,Tn.stubObject=function(){return{}},Tn.stubString=function(){return""},Tn.stubTrue=function(){return!0},Tn.multiply=ls,Tn.nth=function(t,e){return t&&t.length?Cr(t,ru(e)):void 0},Tn.noConflict=function(){return Gt._===this&&(Gt._=Ot),this},Tn.noop=Xu,Tn.now=ga,Tn.pad=function(t,e,n){t=uu(t);var r=(e=ru(e))?Ye(t):0;if(!e||r>=e)return t;var i=(e-r)/2;return Ni(Qe(i),n)+t+Ni(Je(i),n)},Tn.padEnd=function(t,e,n){t=uu(t);var r=(e=ru(e))?Ye(t):0;return e&&r<e?t+Ni(e-r,n):t},Tn.padStart=function(t,e,n){t=uu(t);var r=(e=ru(e))?Ye(t):0;return e&&r<e?Ni(e-r,n)+t:t},Tn.parseInt=function(t,e,n){return n||null==e?e=0:e&&(e=+e),cn(uu(t).replace(W,""),e||0)},Tn.random=function(t,e,n){if(n&&"boolean"!=typeof n&&uo(t,e,n)&&(e=n=void 0),void 0===n&&("boolean"==typeof e?(n=e,e=void 0):"boolean"==typeof t&&(n=t,t=void 0)),void 0===t&&void 0===e?(t=0,e=1):(t=nu(t),void 0===e?(e=t,t=0):e=nu(e)),t>e){var r=t;t=e,e=r}if(n||t%1||e%1){var i=fn();return un(t+i*(e-t+Ut("1e-"+((i+"").length-1))),e)}return Lr(t,e)},Tn.reduce=function(t,e,n){var r=Ia(t)?de:Ae,i=arguments.length<3;return r(t,Zi(e,4),n,i,tr)},Tn.reduceRight=function(t,e,n){var r=Ia(t)?pe:Ae,i=arguments.length<3;return r(t,Zi(e,4),n,i,er)},Tn.repeat=function(t,e,n){return e=(n?uo(t,e,n):void 0===e)?1:ru(e),Br(uu(t),e)},Tn.replace=function(){var t=arguments,e=uu(t[0]);return t.length<3?e:e.replace(t[1],t[2])},Tn.result=function(t,e,n){var r=-1,i=(e=ui(e,t)).length;for(i||(i=1,t=void 0);++r<i;){var o=null==t?void 0:t[So(e[r])];void 0===o&&(r=i,o=n),t=qa(o)?o.call(t):o}return t},Tn.round=hs,Tn.runInContext=t,Tn.sample=function(t){return(Ia(t)?Fn:Fr)(t)},Tn.size=function(t){if(null==t)return 0;if(ja(t))return Za(t)?Ye(t):t.length;var e=no(t);return e==d||e==b?t.size:Er(t).length},Tn.snakeCase=Lu,Tn.some=function(t,e,n){var r=Ia(t)?ge:Hr;return n&&uo(t,e,n)&&(e=void 0),r(t,Zi(e,3))},Tn.sortedIndex=function(t,e){return Wr(t,e)},Tn.sortedIndexBy=function(t,e,n){return $r(t,e,Zi(n,2))},Tn.sortedIndexOf=function(t,e){var n=null==t?0:t.length;if(n){var r=Wr(t,e);if(r<n&&Oa(t[r],e))return r}return-1},Tn.sortedLastIndex=function(t,e){return Wr(t,e,!0)},Tn.sortedLastIndexBy=function(t,e,n){return $r(t,e,Zi(n,2),!0)},Tn.sortedLastIndexOf=function(t,e){if(null==t?0:t.length){var n=Wr(t,e,!0)-1;if(Oa(t[n],e))return n}return-1},Tn.startCase=Bu,Tn.startsWith=function(t,e,n){return t=uu(t),n=null==n?0:Kn(ru(n),0,t.length),e=Xr(e),t.slice(n,n+e.length)==e},Tn.subtract=ds,Tn.sum=function(t){return t&&t.length?Se(t,Hu):0},Tn.sumBy=function(t,e){return t&&t.length?Se(t,Zi(e,2)):0},Tn.template=function(t,e,n){var r=Tn.templateSettings;n&&uo(t,e,n)&&(e=void 0),t=uu(t),e=fu({},e,r,qi);var i,o,a=fu({},e.imports,r.imports,qi),u=_u(a),s=Oe(a,u),c=0,f=e.interpolate||st,l="__p += '",h=yt((e.escape||st).source+"|"+f.source+"|"+(f===q?tt:st).source+"|"+(e.evaluate||st).source+"|$","g"),d="//# sourceURL="+(Et.call(e,"sourceURL")?(e.sourceURL+"").replace(/[\r\n]/g," "):"lodash.templateSources["+ ++Bt+"]")+"\n";t.replace(h,(function(e,n,r,a,u,s){return r||(r=a),l+=t.slice(c,s).replace(ct,Le),n&&(i=!0,l+="' +\n__e("+n+") +\n'"),u&&(o=!0,l+="';\n"+u+";\n__p += '"),r&&(l+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),c=s+e.length,e})),l+="';\n";var p=Et.call(e,"variable")&&e.variable;p||(l="with (obj) {\n"+l+"\n}\n"),l=(o?l.replace(C,""):l).replace(N,"$1").replace(I,"$1;"),l="function("+(p||"obj")+") {\n"+(p?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+l+"return __p\n}";var g=Uu((function(){return dt(u,d+"return "+l).apply(void 0,s)}));if(g.source=l,Fa(g))throw g;return g},Tn.times=function(t,e){if((t=ru(t))<1||t>9007199254740991)return[];var n=4294967295,r=un(t,4294967295);t-=4294967295;for(var i=Me(r,e=Zi(e));++n<t;)e(n);return i},Tn.toFinite=nu,Tn.toInteger=ru,Tn.toLength=iu,Tn.toLower=function(t){return uu(t).toLowerCase()},Tn.toNumber=ou,Tn.toSafeInteger=function(t){return t?Kn(ru(t),-9007199254740991,9007199254740991):0===t?t:0},Tn.toString=uu,Tn.toUpper=function(t){return uu(t).toUpperCase()},Tn.trim=function(t,e,n){if((t=uu(t))&&(n||void 0===e))return t.replace(H,"");if(!t||!(e=Xr(e)))return t;var r=Ve(t),i=Ve(e);return ci(r,Ce(r,i),Ne(r,i)+1).join("")},Tn.trimEnd=function(t,e,n){if((t=uu(t))&&(n||void 0===e))return t.replace($,"");if(!t||!(e=Xr(e)))return t;var r=Ve(t);return ci(r,0,Ne(r,Ve(e))+1).join("")},Tn.trimStart=function(t,e,n){if((t=uu(t))&&(n||void 0===e))return t.replace(W,"");if(!t||!(e=Xr(e)))return t;var r=Ve(t);return ci(r,Ce(r,Ve(e))).join("")},Tn.truncate=function(t,e){var n=30,r="...";if(Ya(e)){var i="separator"in e?e.separator:i;n="length"in e?ru(e.length):n,r="omission"in e?Xr(e.omission):r}var o=(t=uu(t)).length;if(Be(t)){var a=Ve(t);o=a.length}if(n>=o)return t;var u=n-Ye(r);if(u<1)return r;var s=a?ci(a,0,u).join(""):t.slice(0,u);if(void 0===i)return s+r;if(a&&(u+=s.length-u),$a(i)){if(t.slice(u).search(i)){var c,f=s;for(i.global||(i=yt(i.source,uu(et.exec(i))+"g")),i.lastIndex=0;c=i.exec(f);)var l=c.index;s=s.slice(0,void 0===l?u:l)}}else if(t.indexOf(Xr(i),u)!=u){var h=s.lastIndexOf(i);h>-1&&(s=s.slice(0,h))}return s+r},Tn.unescape=function(t){return(t=uu(t))&&L.test(t)?t.replace(R,Ge):t},Tn.uniqueId=function(t){var e=++At;return uu(t)+e},Tn.upperCase=Pu,Tn.upperFirst=Fu,Tn.each=ua,Tn.eachRight=sa,Tn.first=jo,Zu(Tn,(fs={},sr(Tn,(function(t,e){Et.call(Tn.prototype,e)||(fs[e]=t)})),fs),{chain:!1}),Tn.VERSION="4.17.15",oe(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){Tn[t].placeholder=Tn})),oe(["drop","take"],(function(t,e){Nn.prototype[t]=function(n){n=void 0===n?1:an(ru(n),0);var r=this.__filtered__&&!e?new Nn(this):this.clone();return r.__filtered__?r.__takeCount__=un(n,r.__takeCount__):r.__views__.push({size:un(n,4294967295),type:t+(r.__dir__<0?"Right":"")}),r},Nn.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),oe(["filter","map","takeWhile"],(function(t,e){var n=e+1,r=1==n||3==n;Nn.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:Zi(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}})),oe(["head","last"],(function(t,e){var n="take"+(e?"Right":"");Nn.prototype[t]=function(){return this[n](1).value()[0]}})),oe(["initial","tail"],(function(t,e){var n="drop"+(e?"":"Right");Nn.prototype[t]=function(){return this.__filtered__?new Nn(this):this[n](1)}})),Nn.prototype.compact=function(){return this.filter(Hu)},Nn.prototype.find=function(t){return this.filter(t).head()},Nn.prototype.findLast=function(t){return this.reverse().find(t)},Nn.prototype.invokeMap=Pr((function(t,e){return"function"==typeof t?new Nn(this):this.map((function(n){return vr(n,t,e)}))})),Nn.prototype.reject=function(t){return this.filter(Ea(Zi(t)))},Nn.prototype.slice=function(t,e){t=ru(t);var n=this;return n.__filtered__&&(t>0||e<0)?new Nn(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),void 0!==e&&(n=(e=ru(e))<0?n.dropRight(-e):n.take(e-t)),n)},Nn.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Nn.prototype.toArray=function(){return this.take(4294967295)},sr(Nn.prototype,(function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),i=Tn[r?"take"+("last"==e?"Right":""):e],o=r||/^find/.test(e);i&&(Tn.prototype[e]=function(){var e=this.__wrapped__,a=r?[1]:arguments,u=e instanceof Nn,s=a[0],c=u||Ia(e),f=function(t){var e=i.apply(Tn,he([t],a));return r&&l?e[0]:e};c&&n&&"function"==typeof s&&1!=s.length&&(u=c=!1);var l=this.__chain__,h=!!this.__actions__.length,d=o&&!l,p=u&&!h;if(!o&&c){e=p?e:new Nn(this);var g=t.apply(e,a);return g.__actions__.push({func:na,args:[f],thisArg:void 0}),new Cn(g,l)}return d&&p?t.apply(this,a):(g=this.thru(f),d?r?g.value()[0]:g.value():g)})})),oe(["pop","push","shift","sort","splice","unshift"],(function(t){var e=mt[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);Tn.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var i=this.value();return e.apply(Ia(i)?i:[],t)}return this[n]((function(n){return e.apply(Ia(n)?n:[],t)}))}})),sr(Nn.prototype,(function(t,e){var n=Tn[e];if(n){var r=n.name+"";Et.call(mn,r)||(mn[r]=[]),mn[r].push({name:e,func:n})}})),mn[Ti(void 0,2).name]=[{name:"wrapper",func:void 0}],Nn.prototype.clone=function(){var t=new Nn(this.__wrapped__);return t.__actions__=bi(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=bi(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=bi(this.__views__),t},Nn.prototype.reverse=function(){if(this.__filtered__){var t=new Nn(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Nn.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=Ia(t),r=e<0,i=n?t.length:0,o=function(t,e,n){var r=-1,i=n.length;for(;++r<i;){var o=n[r],a=o.size;switch(o.type){case"drop":t+=a;break;case"dropRight":e-=a;break;case"take":e=un(e,t+a);break;case"takeRight":t=an(t,e-a)}}return{start:t,end:e}}(0,i,this.__views__),a=o.start,u=o.end,s=u-a,c=r?u:a-1,f=this.__iteratees__,l=f.length,h=0,d=un(s,this.__takeCount__);if(!n||!r&&i==s&&d==s)return ni(t,this.__actions__);var p=[];t:for(;s--&&h<d;){for(var g=-1,y=t[c+=e];++g<l;){var b=f[g],v=b.iteratee,m=b.type,_=v(y);if(2==m)y=_;else if(!_){if(1==m)continue t;break t}}p[h++]=y}return p},Tn.prototype.at=ra,Tn.prototype.chain=function(){return ea(this)},Tn.prototype.commit=function(){return new Cn(this.value(),this.__chain__)},Tn.prototype.next=function(){void 0===this.__values__&&(this.__values__=eu(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?void 0:this.__values__[this.__index__++]}},Tn.prototype.plant=function(t){for(var e,n=this;n instanceof Dn;){var r=To(n);r.__index__=0,r.__values__=void 0,e?i.__wrapped__=r:e=r;var i=r;n=n.__wrapped__}return i.__wrapped__=t,e},Tn.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof Nn){var e=t;return this.__actions__.length&&(e=new Nn(this)),(e=e.reverse()).__actions__.push({func:na,args:[Yo],thisArg:void 0}),new Cn(e,this.__chain__)}return this.thru(Yo)},Tn.prototype.toJSON=Tn.prototype.valueOf=Tn.prototype.value=function(){return ni(this.__wrapped__,this.__actions__)},Tn.prototype.first=Tn.prototype.head,Ee&&(Tn.prototype[Ee]=function(){return this}),Tn}();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(Gt._=He,define((function(){return He}))):Wt?((Wt.exports=He)._=He,Ht._=He):Gt._=He}).call(this)}).call(this,n(25),n(14)(t))},function(t,e,n){"use strict";function r(t){return t*t*t}function i(t){return--t*t*t+1}function o(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}n.d(e,"a",(function(){return r})),n.d(e,"c",(function(){return i})),n.d(e,"b",(function(){return o}))},function(t,e,n){"use strict";n.d(e,"b",(function(){return c})),n.d(e,"a",(function(){return f})),n.d(e,"d",(function(){return b})),n.d(e,"c",(function(){return v}));var r=n(24),i=n(11),o=n(116),a=6/29,u=3*a*a;function s(t){if(t instanceof l)return new l(t.l,t.a,t.b,t.opacity);if(t instanceof m)return _(t);t instanceof i.b||(t=Object(i.h)(t));var e,n,r=g(t.r),o=g(t.g),a=g(t.b),u=h((.2225045*r+.7168786*o+.0606169*a)/1);return r===o&&o===a?e=n=u:(e=h((.4360747*r+.3850649*o+.1430804*a)/.96422),n=h((.0139322*r+.0971045*o+.7141733*a)/.82521)),new l(116*u-16,500*(e-u),200*(u-n),t.opacity)}function c(t,e){return new l(t,0,0,null==e?1:e)}function f(t,e,n,r){return 1===arguments.length?s(t):new l(t,e,n,null==r?1:r)}function l(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}function h(t){return t>.008856451679035631?Math.pow(t,1/3):t/u+4/29}function d(t){return t>a?t*t*t:u*(t-4/29)}function p(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function g(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function y(t){if(t instanceof m)return new m(t.h,t.c,t.l,t.opacity);if(t instanceof l||(t=s(t)),0===t.a&&0===t.b)return new m(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*o.b;return new m(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function b(t,e,n,r){return 1===arguments.length?y(t):new m(n,e,t,null==r?1:r)}function v(t,e,n,r){return 1===arguments.length?y(t):new m(t,e,n,null==r?1:r)}function m(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function _(t){if(isNaN(t.h))return new l(t.l,0,0,t.opacity);var e=t.h*o.a;return new l(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}Object(r.a)(l,f,Object(r.b)(i.a,{brighter:function(t){return new l(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new l(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return e=.96422*d(e),t=1*d(t),n=.82521*d(n),new i.b(p(3.1338561*e-1.6168667*t-.4906146*n),p(-.9787684*e+1.9161415*t+.033454*n),p(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}})),Object(r.a)(m,v,Object(r.b)(i.a,{brighter:function(t){return new m(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new m(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return _(this).rgb()}}))},function(t,e,n){"use strict";n.d(e,"b",(function(){return a}));var r=n(4),i=n(5),o=Object(r.a)((function(t){t.setTime(t-t.getMilliseconds())}),(function(t,e){t.setTime(+t+e*i.d)}),(function(t,e){return(e-t)/i.d}),(function(t){return t.getUTCSeconds()}));e.a=o;var a=o.range},function(t,e,n){"use strict";n.d(e,"b",(function(){return o}));var r=n(4),i=Object(r.a)((function(){}),(function(t,e){t.setTime(+t+e)}),(function(t,e){return e-t}));i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?Object(r.a)((function(e){e.setTime(Math.floor(e/t)*t)}),(function(e,n){e.setTime(+e+n*t)}),(function(e,n){return(n-e)/t})):i:null},e.a=i;var o=i.range},function(t,e,n){var r=n(75),i=n(28);t.exports=function(t){if(!i(t))return!1;var e=r(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},function(t,e,n){var r=n(151),i=n(152);t.exports=function(t,e,n,o){var a=!n;n||(n={});for(var u=-1,s=e.length;++u<s;){var c=e[u],f=o?o(n[c],t[c],c,n,t):void 0;void 0===f&&(f=t[c]),a?i(n,c,f):r(n,c,f)}return n}},function(t,e,n){var r=n(486),i=n(43),o=Object.prototype,a=o.hasOwnProperty,u=o.propertyIsEnumerable,s=r(function(){return arguments}())?r:function(t){return i(t)&&a.call(t,"callee")&&!u.call(t,"callee")};t.exports=s},function(t,e,n){var r=n(488),i=n(154),o=n(229),a=o&&o.isTypedArray,u=a?i(a):r;t.exports=u},function(t,e,n){var r=n(91);t.exports=function(t){if("string"==typeof t||r(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}},function(t,e,n){var r=n(166),i=n(167);t.exports=function(t,e,n,o){var a=!n;n||(n={});for(var u=-1,s=e.length;++u<s;){var c=e[u],f=o?o(n[c],t[c],c,n,t):void 0;void 0===f&&(f=t[c]),a?i(n,c,f):r(n,c,f)}return n}},function(t,e,n){var r=n(599),i=n(44),o=Object.prototype,a=o.hasOwnProperty,u=o.propertyIsEnumerable,s=r(function(){return arguments}())?r:function(t){return i(t)&&a.call(t,"callee")&&!u.call(t,"callee")};t.exports=s},function(t,e,n){var r=n(601),i=n(169),o=n(246),a=o&&o.isTypedArray,u=a?i(a):r;t.exports=u},function(t,e,n){var r=n(98);t.exports=function(t){if("string"==typeof t||r(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}},function(t,e,n){"use strict";var r=n(2),i=n(264),o=n(271),a=n(272),u=n(65);function s(t){u.call(this,"digest"),this._hash=t}r(s,u),s.prototype._update=function(t){this._hash.update(t)},s.prototype._final=function(){return this._hash.digest()},t.exports=function(t){return"md5"===(t=t.toLowerCase())?new i:"rmd160"===t||"ripemd160"===t?new o:new s(a(t))}},function(t,e,n){(function(t){function n(t){return Object.prototype.toString.call(t)}e.isArray=function(t){return Array.isArray?Array.isArray(t):"[object Array]"===n(t)},e.isBoolean=function(t){return"boolean"==typeof t},e.isNull=function(t){return null===t},e.isNullOrUndefined=function(t){return null==t},e.isNumber=function(t){return"number"==typeof t},e.isString=function(t){return"string"==typeof t},e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=function(t){return void 0===t},e.isRegExp=function(t){return"[object RegExp]"===n(t)},e.isObject=function(t){return"object"==typeof t&&null!==t},e.isDate=function(t){return"[object Date]"===n(t)},e.isError=function(t){return"[object Error]"===n(t)||t instanceof Error},e.isFunction=function(t){return"function"==typeof t},e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=t.isBuffer}).call(this,n(18).Buffer)},function(t,e,n){(function(e){t.exports=function(t,n){for(var r=Math.min(t.length,n.length),i=new e(r),o=0;o<r;++o)i[o]=t[o]^n[o];return i}}).call(this,n(18).Buffer)},function(t,e,n){"use strict";var r=n(45),i=n(32);function o(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}e.BlockHash=o,o.prototype.update=function(t,e){if(t=r.toArray(t,e),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){var n=(t=this.pending).length%this._delta8;this.pending=t.slice(t.length-n,t.length),0===this.pending.length&&(this.pending=null),t=r.join32(t,0,t.length-n,this.endian);for(var i=0;i<t.length;i+=this._delta32)this._update(t,i,i+this._delta32)}return this},o.prototype.digest=function(t){return this.update(this._pad()),i(null===this.pending),this._digest(t)},o.prototype._pad=function(){var t=this.pendingTotal,e=this._delta8,n=e-(t+this.padLength)%e,r=new Array(n+this.padLength);r[0]=128;for(var i=1;i<n;i++)r[i]=0;if(t<<=3,"big"===this.endian){for(var o=8;o<this.padLength;o++)r[i++]=0;r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=t>>>24&255,r[i++]=t>>>16&255,r[i++]=t>>>8&255,r[i++]=255&t}else for(r[i++]=255&t,r[i++]=t>>>8&255,r[i++]=t>>>16&255,r[i++]=t>>>24&255,r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=0,o=8;o<this.padLength;o++)r[i++]=0;return r}},function(t,e,n){var r=e;r.bignum=n(12),r.define=n(874).define,r.base=n(138),r.constants=n(438),r.decoders=n(879),r.encoders=n(881)},function(t,e,n){var r=e;r.Reporter=n(876).Reporter,r.DecoderBuffer=n(437).DecoderBuffer,r.EncoderBuffer=n(437).EncoderBuffer,r.Node=n(877)},function(t,e,n){"use strict";function r(t){return+t}function i(t){return t*t}function o(t){return t*(2-t)}function a(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}var u=n(120),s=function t(e){function n(t){return Math.pow(t,e)}return e=+e,n.exponent=t,n}(3),c=function t(e){function n(t){return 1-Math.pow(1-t,e)}return e=+e,n.exponent=t,n}(3),f=function t(e){function n(t){return((t*=2)<=1?Math.pow(t,e):2-Math.pow(2-t,e))/2}return e=+e,n.exponent=t,n}(3),l=Math.PI,h=l/2;function d(t){return 1-Math.cos(t*h)}function p(t){return Math.sin(t*h)}function g(t){return(1-Math.cos(l*t))/2}function y(t){return Math.pow(2,10*t-10)}function b(t){return 1-Math.pow(2,-10*t)}function v(t){return((t*=2)<=1?Math.pow(2,10*t-10):2-Math.pow(2,10-10*t))/2}function m(t){return 1-Math.sqrt(1-t*t)}function _(t){return Math.sqrt(1- --t*t)}function w(t){return((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}var x=7.5625;function k(t){return 1-E(1-t)}function E(t){return(t=+t)<4/11?x*t*t:t<8/11?x*(t-=6/11)*t+.75:t<10/11?x*(t-=9/11)*t+.9375:x*(t-=21/22)*t+63/64}function A(t){return((t*=2)<=1?1-E(1-t):E(t-1)+1)/2}var S=function t(e){function n(t){return t*t*((e+1)*t-e)}return e=+e,n.overshoot=t,n}(1.70158),M=function t(e){function n(t){return--t*t*((e+1)*t+e)+1}return e=+e,n.overshoot=t,n}(1.70158),T=function t(e){function n(t){return((t*=2)<1?t*t*((e+1)*t-e):(t-=2)*t*((e+1)*t+e)+2)/2}return e=+e,n.overshoot=t,n}(1.70158),O=2*Math.PI,D=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=O);function i(t){return e*Math.pow(2,10*--t)*Math.sin((r-t)/n)}return i.amplitude=function(e){return t(e,n*O)},i.period=function(n){return t(e,n)},i}(1,.3),C=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=O);function i(t){return 1-e*Math.pow(2,-10*(t=+t))*Math.sin((t+r)/n)}return i.amplitude=function(e){return t(e,n*O)},i.period=function(n){return t(e,n)},i}(1,.3),N=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=O);function i(t){return((t=2*t-1)<0?e*Math.pow(2,10*t)*Math.sin((r-t)/n):2-e*Math.pow(2,-10*t)*Math.sin((r+t)/n))/2}return i.amplitude=function(e){return t(e,n*O)},i.period=function(n){return t(e,n)},i}(1,.3);n.d(e,"y",(function(){return r})),n.d(e,"D",(function(){return a})),n.d(e,"E",(function(){return i})),n.d(e,"G",(function(){return o})),n.d(e,"F",(function(){return a})),n.d(e,"m",(function(){return u.b})),n.d(e,"n",(function(){return u.a})),n.d(e,"p",(function(){return u.c})),n.d(e,"o",(function(){return u.b})),n.d(e,"z",(function(){return f})),n.d(e,"A",(function(){return s})),n.d(e,"C",(function(){return c})),n.d(e,"B",(function(){return f})),n.d(e,"H",(function(){return g})),n.d(e,"I",(function(){return d})),n.d(e,"K",(function(){return p})),n.d(e,"J",(function(){return g})),n.d(e,"u",(function(){return v})),n.d(e,"v",(function(){return y})),n.d(e,"x",(function(){return b})),n.d(e,"w",(function(){return v})),n.d(e,"i",(function(){return w})),n.d(e,"j",(function(){return m})),n.d(e,"l",(function(){return _})),n.d(e,"k",(function(){return w})),n.d(e,"e",(function(){return E})),n.d(e,"f",(function(){return k})),n.d(e,"h",(function(){return E})),n.d(e,"g",(function(){return A})),n.d(e,"a",(function(){return T})),n.d(e,"b",(function(){return S})),n.d(e,"d",(function(){return M})),n.d(e,"c",(function(){return T})),n.d(e,"q",(function(){return C})),n.d(e,"r",(function(){return D})),n.d(e,"t",(function(){return C})),n.d(e,"s",(function(){return N}))},function(t,e,n){"use strict";var r=n(110),i=n(60),o=n(61);function a(t){for(var e in t){var n,r,i=t[e].trim();if(i)if("true"===i)i=!0;else if("false"===i)i=!1;else if("NaN"===i)i=NaN;else if(isNaN(n=+i)){if(!(r=i.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/)))continue;u&&r[4]&&!r[7]&&(i=i.replace(/-/g,"/").replace(/T/," ")),i=new Date(i)}else i=n;else i=null;t[e]=i}return t}var u=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours();n.d(e,"i",(function(){return r.a})),n.d(e,"g",(function(){return i.f})),n.d(e,"h",(function(){return i.g})),n.d(e,"b",(function(){return i.a})),n.d(e,"c",(function(){return i.b})),n.d(e,"e",(function(){return i.d})),n.d(e,"d",(function(){return i.c})),n.d(e,"f",(function(){return i.e})),n.d(e,"o",(function(){return o.f})),n.d(e,"p",(function(){return o.g})),n.d(e,"j",(function(){return o.a})),n.d(e,"k",(function(){return o.b})),n.d(e,"m",(function(){return o.d})),n.d(e,"l",(function(){return o.c})),n.d(e,"n",(function(){return o.e})),n.d(e,"a",(function(){return a}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var r=n(4),i=n(5),o=Object(r.a)((function(t){t.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+e)}),(function(t,e){return(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*i.c)/i.a}),(function(t){return t.getDate()-1}));e.b=o;var a=o.range},function(t,e,n){"use strict";n.d(e,"b",(function(){return a}));var r=n(4),i=n(5),o=Object(r.a)((function(t){t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+e)}),(function(t,e){return(e-t)/i.a}),(function(t){return t.getUTCDate()-1}));e.a=o;var a=o.range},function(t,e,n){var r=n(31);t.exports=function(t,e){var n=t.append("foreignObject").attr("width","100000"),i=n.append("xhtml:div");i.attr("xmlns","http://www.w3.org/1999/xhtml");var o=e.label;switch(typeof o){case"function":i.insert(o);break;case"object":i.insert((function(){return o}));break;default:i.html(o)}r.applyStyle(i,e.labelStyle),i.style("display","inline-block"),i.style("white-space","nowrap");var a=i.node().getBoundingClientRect();return n.attr("width",a.width).attr("height",a.height),n}},function(t){t.exports=JSON.parse('{"name":"mermaid","version":"8.5.0","description":"Markdownish syntax for generating flowcharts, sequence diagrams, class diagrams, gantt charts and git graphs.","main":"dist/mermaid.core.js","keywords":["diagram","markdown","flowchart","sequence diagram","gantt","class diagram","git graph"],"scripts":{"build":"webpack --progress --colors -p","postbuild":"documentation build src/mermaidAPI.js --shallow -f md --markdown-toc false -o docs/mermaidAPI.md","build:watch":"yarn build --watch","minify":"minify ./dist/mermaid.js > ./dist/mermaid.min.js","release":"yarn build -p --config webpack.config.prod.babel.js","lint":"eslint src","e2e:depr":"yarn lint && jest e2e --config e2e/jest.config.js","cypress":"percy exec -- cypress run","e2e":"start-server-and-test dev http://localhost:9000/ cypress","e2e-upd":"yarn lint && jest e2e -u --config e2e/jest.config.js","dev":"webpack-dev-server --config webpack.config.e2e.js","test":"yarn lint && jest src/.*","test:watch":"jest --watch src","prepublishOnly":"yarn build && yarn release && yarn test && yarn e2e","prepush":"yarn test"},"repository":{"type":"git","url":"https://github.com/knsv/mermaid"},"author":"Knut Sveidqvist","license":"MIT","standard":{"ignore":["**/parser/*.js","dist/**/*.js","cypress/**/*.js"],"globals":["page"]},"dependencies":{"@braintree/sanitize-url":"^3.1.0","crypto-random-string":"^3.0.1","d3":"^5.7.0","dagre":"^0.8.4","dagre-d3":"^0.6.4","graphlib":"^2.1.7","he":"^1.2.0","lodash":"^4.17.11","minify":"^4.1.1","moment-mini":"^2.22.1","scope-css":"^1.2.1"},"devDependencies":{"@babel/core":"^7.2.2","@babel/preset-env":"^7.8.4","@babel/register":"^7.0.0","@percy/cypress":"*","babel-core":"7.0.0-bridge.0","babel-jest":"^24.9.0","babel-loader":"^8.0.4","coveralls":"^3.0.2","css-loader":"^2.0.1","css-to-string-loader":"^0.1.3","cypress":"4.0.1","documentation":"^12.0.1","eslint":"^6.3.0","eslint-config-prettier":"^6.3.0","eslint-plugin-prettier":"^3.1.0","husky":"^1.2.1","identity-obj-proxy":"^3.0.0","jest":"^24.9.0","jison":"^0.4.18","moment":"^2.23.0","node-sass":"^4.12.0","prettier":"^1.18.2","puppeteer":"^1.17.0","sass-loader":"^7.1.0","start-server-and-test":"^1.10.6","terser-webpack-plugin":"^2.2.2","webpack":"^4.41.2","webpack-cli":"^3.1.2","webpack-dev-server":"^3.4.1","webpack-node-externals":"^1.7.2","yarn-upgrade-all":"^0.5.0"},"files":["dist"],"yarn-upgrade-all":{"ignore":["babel-core"]}}')},function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return o})),n.d(e,"a",(function(){return u}));var r,i,o,a=n(210);function u(t){return r=Object(a.a)(t),i=r.format,o=r.formatPrefix,r}u({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"})},function(t,e,n){var r=n(147),i=n(461),o=n(462),a=n(463),u=n(464),s=n(465);function c(t){var e=this.__data__=new r(t);this.size=e.size}c.prototype.clear=i,c.prototype.delete=o,c.prototype.get=a,c.prototype.has=u,c.prototype.set=s,t.exports=c},function(t,e,n){var r=n(456),i=n(457),o=n(458),a=n(459),u=n(460);function s(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}s.prototype.clear=r,s.prototype.delete=i,s.prototype.get=o,s.prototype.has=a,s.prototype.set=u,t.exports=s},function(t,e,n){var r=n(86);t.exports=function(t,e){for(var n=t.length;n--;)if(r(t[n][0],e))return n;return-1}},function(t,e,n){var r=n(74)(Object,"create");t.exports=r},function(t,e,n){var r=n(480);t.exports=function(t,e){var n=t.__data__;return r(e)?n["string"==typeof e?"string":"hash"]:n.map}},function(t,e,n){var r=n(152),i=n(86),o=Object.prototype.hasOwnProperty;t.exports=function(t,e,n){var a=t[e];o.call(t,e)&&i(a,n)&&(void 0!==n||e in t)||r(t,e,n)}},function(t,e,n){var r=n(296);t.exports=function(t,e,n){"__proto__"==e&&r?r(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}},function(t,e){var n=/^(?:0|[1-9]\d*)$/;t.exports=function(t,e){var r=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==r||"symbol"!=r&&n.test(t))&&t>-1&&t%1==0&&t<e}},function(t,e){t.exports=function(t){return function(e){return t(e)}}},function(t,e){var n=Object.prototype;t.exports=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||n)}},function(t,e,n){var r=n(298)(Object.getPrototypeOf,Object);t.exports=r},function(t,e,n){var r=n(235),i=n(509)(r);t.exports=i},function(t,e,n){var r=n(15),i=n(239),o=n(523),a=n(321);t.exports=function(t,e){return r(t)?t:i(t,e)?[t]:o(a(t))}},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}},function(t,e,n){var r=n(76),i=n(330),o=n(331);t.exports=function(t,e){return o(i(t,e,r),t+"")}},function(t,e,n){var r=n(162),i=n(574),o=n(575),a=n(576),u=n(577),s=n(578);function c(t){var e=this.__data__=new r(t);this.size=e.size}c.prototype.clear=i,c.prototype.delete=o,c.prototype.get=a,c.prototype.has=u,c.prototype.set=s,t.exports=c},function(t,e,n){var r=n(569),i=n(570),o=n(571),a=n(572),u=n(573);function s(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}s.prototype.clear=r,s.prototype.delete=i,s.prototype.get=o,s.prototype.has=a,s.prototype.set=u,t.exports=s},function(t,e,n){var r=n(92);t.exports=function(t,e){for(var n=t.length;n--;)if(r(t[n][0],e))return n;return-1}},function(t,e,n){var r=n(77)(Object,"create");t.exports=r},function(t,e,n){var r=n(593);t.exports=function(t,e){var n=t.__data__;return r(e)?n["string"==typeof e?"string":"hash"]:n.map}},function(t,e,n){var r=n(167),i=n(92),o=Object.prototype.hasOwnProperty;t.exports=function(t,e,n){var a=t[e];o.call(t,e)&&i(a,n)&&(void 0!==n||e in t)||r(t,e,n)}},function(t,e,n){var r=n(344);t.exports=function(t,e,n){"__proto__"==e&&r?r(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}},function(t,e){var n=/^(?:0|[1-9]\d*)$/;t.exports=function(t,e){var r=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==r||"symbol"!=r&&n.test(t))&&t>-1&&t%1==0&&t<e}},function(t,e){t.exports=function(t){return function(e){return t(e)}}},function(t,e){var n=Object.prototype;t.exports=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||n)}},function(t,e,n){var r=n(346)(Object.getPrototypeOf,Object);t.exports=r},function(t,e,n){var r=n(253),i=n(622)(r);t.exports=i},function(t,e,n){var r=n(16),i=n(257),o=n(636),a=n(368);t.exports=function(t,e){return r(t)?t:i(t,e)?[t]:o(a(t))}},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}},function(t,e,n){var r=n(79),i=n(376),o=n(377);t.exports=function(t,e){return o(i(t,e,r),t+"")}},function(t,e,n){var r=n(92),i=n(56),o=n(168),a=n(30);t.exports=function(t,e,n){if(!a(n))return!1;var u=typeof e;return!!("number"==u?i(n)&&o(e,n.length):"string"==u&&e in n)&&r(n[e],t)}},function(t,e,n){"use strict";var r=n(7);t.exports={longestPath:function(t){var e={};r.forEach(t.sources(),(function n(i){var o=t.node(i);if(r.has(e,i))return o.rank;e[i]=!0;var a=r.min(r.map(t.outEdges(i),(function(e){return n(e.w)-t.edge(e).minlen})));return a!==Number.POSITIVE_INFINITY&&null!=a||(a=0),o.rank=a}))},slack:function(t,e){return t.node(e.w).rank-t.node(e.v).rank-t.edge(e).minlen}}},function(t,e,n){var r=n(86),i=n(52),o=n(153),a=n(28);t.exports=function(t,e,n){if(!a(n))return!1;var u=typeof e;return!!("number"==u?i(n)&&o(e,n.length):"string"==u&&e in n)&&r(n[e],t)}},function(t,e,n){"use strict";var r=n(8);t.exports={longestPath:function(t){var e={};r.forEach(t.sources(),(function n(i){var o=t.node(i);if(r.has(e,i))return o.rank;e[i]=!0;var a=r.min(r.map(t.outEdges(i),(function(e){return n(e.w)-t.edge(e).minlen})));return a!==Number.POSITIVE_INFINITY&&null!=a||(a=0),o.rank=a}))},slack:function(t,e){return t.node(e.w).rank-t.node(e.v).rank-t.edge(e).minlen}}},function(t,e,n){"use strict";(function(e){void 0===e||!e.version||0===e.version.indexOf("v0.")||0===e.version.indexOf("v1.")&&0!==e.version.indexOf("v1.8.")?t.exports={nextTick:function(t,n,r,i){if("function"!=typeof t)throw new TypeError('"callback" argument must be a function');var o,a,u=arguments.length;switch(u){case 0:case 1:return e.nextTick(t);case 2:return e.nextTick((function(){t.call(null,n)}));case 3:return e.nextTick((function(){t.call(null,n,r)}));case 4:return e.nextTick((function(){t.call(null,n,r,i)}));default:for(o=new Array(u-1),a=0;a<o.length;)o[a++]=arguments[a];return e.nextTick((function(){t.apply(null,o)}))}}}:t.exports=e}).call(this,n(17))},function(t,e,n){var r=n(3).Buffer;function i(t){r.isBuffer(t)||(t=r.from(t));for(var e=t.length/4|0,n=new Array(e),i=0;i<e;i++)n[i]=t.readUInt32BE(4*i);return n}function o(t){for(;0<t.length;t++)t[0]=0}function a(t,e,n,r,i){for(var o,a,u,s,c=n[0],f=n[1],l=n[2],h=n[3],d=t[0]^e[0],p=t[1]^e[1],g=t[2]^e[2],y=t[3]^e[3],b=4,v=1;v<i;v++)o=c[d>>>24]^f[p>>>16&255]^l[g>>>8&255]^h[255&y]^e[b++],a=c[p>>>24]^f[g>>>16&255]^l[y>>>8&255]^h[255&d]^e[b++],u=c[g>>>24]^f[y>>>16&255]^l[d>>>8&255]^h[255&p]^e[b++],s=c[y>>>24]^f[d>>>16&255]^l[p>>>8&255]^h[255&g]^e[b++],d=o,p=a,g=u,y=s;return o=(r[d>>>24]<<24|r[p>>>16&255]<<16|r[g>>>8&255]<<8|r[255&y])^e[b++],a=(r[p>>>24]<<24|r[g>>>16&255]<<16|r[y>>>8&255]<<8|r[255&d])^e[b++],u=(r[g>>>24]<<24|r[y>>>16&255]<<16|r[d>>>8&255]<<8|r[255&p])^e[b++],s=(r[y>>>24]<<24|r[d>>>16&255]<<16|r[p>>>8&255]<<8|r[255&g])^e[b++],[o>>>=0,a>>>=0,u>>>=0,s>>>=0]}var u=[0,1,2,4,8,16,32,64,128,27,54],s=function(){for(var t=new Array(256),e=0;e<256;e++)t[e]=e<128?e<<1:e<<1^283;for(var n=[],r=[],i=[[],[],[],[]],o=[[],[],[],[]],a=0,u=0,s=0;s<256;++s){var c=u^u<<1^u<<2^u<<3^u<<4;c=c>>>8^255&c^99,n[a]=c,r[c]=a;var f=t[a],l=t[f],h=t[l],d=257*t[c]^16843008*c;i[0][a]=d<<24|d>>>8,i[1][a]=d<<16|d>>>16,i[2][a]=d<<8|d>>>24,i[3][a]=d,d=16843009*h^65537*l^257*f^16843008*a,o[0][c]=d<<24|d>>>8,o[1][c]=d<<16|d>>>16,o[2][c]=d<<8|d>>>24,o[3][c]=d,0===a?a=u=1:(a=f^t[t[t[h^f]]],u^=t[t[u]])}return{SBOX:n,INV_SBOX:r,SUB_MIX:i,INV_SUB_MIX:o}}();function c(t){this._key=i(t),this._reset()}c.blockSize=16,c.keySize=32,c.prototype.blockSize=c.blockSize,c.prototype.keySize=c.keySize,c.prototype._reset=function(){for(var t=this._key,e=t.length,n=e+6,r=4*(n+1),i=[],o=0;o<e;o++)i[o]=t[o];for(o=e;o<r;o++){var a=i[o-1];o%e==0?(a=a<<8|a>>>24,a=s.SBOX[a>>>24]<<24|s.SBOX[a>>>16&255]<<16|s.SBOX[a>>>8&255]<<8|s.SBOX[255&a],a^=u[o/e|0]<<24):e>6&&o%e==4&&(a=s.SBOX[a>>>24]<<24|s.SBOX[a>>>16&255]<<16|s.SBOX[a>>>8&255]<<8|s.SBOX[255&a]),i[o]=i[o-e]^a}for(var c=[],f=0;f<r;f++){var l=r-f,h=i[l-(f%4?0:4)];c[f]=f<4||l<=4?h:s.INV_SUB_MIX[0][s.SBOX[h>>>24]]^s.INV_SUB_MIX[1][s.SBOX[h>>>16&255]]^s.INV_SUB_MIX[2][s.SBOX[h>>>8&255]]^s.INV_SUB_MIX[3][s.SBOX[255&h]]}this._nRounds=n,this._keySchedule=i,this._invKeySchedule=c},c.prototype.encryptBlockRaw=function(t){return a(t=i(t),this._keySchedule,s.SUB_MIX,s.SBOX,this._nRounds)},c.prototype.encryptBlock=function(t){var e=this.encryptBlockRaw(t),n=r.allocUnsafe(16);return n.writeUInt32BE(e[0],0),n.writeUInt32BE(e[1],4),n.writeUInt32BE(e[2],8),n.writeUInt32BE(e[3],12),n},c.prototype.decryptBlock=function(t){var e=(t=i(t))[1];t[1]=t[3],t[3]=e;var n=a(t,this._invKeySchedule,s.INV_SUB_MIX,s.INV_SBOX,this._nRounds),o=r.allocUnsafe(16);return o.writeUInt32BE(n[0],0),o.writeUInt32BE(n[3],4),o.writeUInt32BE(n[2],8),o.writeUInt32BE(n[1],12),o},c.prototype.scrub=function(){o(this._keySchedule),o(this._invKeySchedule),o(this._key)},t.exports.AES=c},function(t,e,n){var r=n(3).Buffer,i=n(264);t.exports=function(t,e,n,o){if(r.isBuffer(t)||(t=r.from(t,"binary")),e&&(r.isBuffer(e)||(e=r.from(e,"binary")),8!==e.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var a=n/8,u=r.alloc(a),s=r.alloc(o||0),c=r.alloc(0);a>0||o>0;){var f=new i;f.update(c),f.update(t),e&&f.update(e),c=f.digest();var l=0;if(a>0){var h=u.length-a;l=Math.min(a,c.length),c.copy(u,h,0,l),a-=l}if(l<c.length&&o>0){var d=s.length-o,p=Math.min(o,c.length-l);c.copy(s,d,l,l+p),o-=p}}return c.fill(0),{key:u,iv:s}}},function(t,e,n){"use strict";var r=n(12),i=n(33),o=i.getNAF,a=i.getJSF,u=i.assert;function s(t,e){this.type=t,this.p=new r(e.p,16),this.red=e.prime?r.red(e.prime):r.mont(this.p),this.zero=new r(0).toRed(this.red),this.one=new r(1).toRed(this.red),this.two=new r(2).toRed(this.red),this.n=e.n&&new r(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var n=this.n&&this.p.div(this.n);!n||n.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function c(t,e){this.curve=t,this.type=e,this.precomputed=null}t.exports=s,s.prototype.point=function(){throw new Error("Not implemented")},s.prototype.validate=function(){throw new Error("Not implemented")},s.prototype._fixedNafMul=function(t,e){u(t.precomputed);var n=t._getDoubles(),r=o(e,1,this._bitLength),i=(1<<n.step+1)-(n.step%2==0?2:1);i/=3;for(var a=[],s=0;s<r.length;s+=n.step){var c=0;for(e=s+n.step-1;e>=s;e--)c=(c<<1)+r[e];a.push(c)}for(var f=this.jpoint(null,null,null),l=this.jpoint(null,null,null),h=i;h>0;h--){for(s=0;s<a.length;s++){(c=a[s])===h?l=l.mixedAdd(n.points[s]):c===-h&&(l=l.mixedAdd(n.points[s].neg()))}f=f.add(l)}return f.toP()},s.prototype._wnafMul=function(t,e){var n=4,r=t._getNAFPoints(n);n=r.wnd;for(var i=r.points,a=o(e,n,this._bitLength),s=this.jpoint(null,null,null),c=a.length-1;c>=0;c--){for(e=0;c>=0&&0===a[c];c--)e++;if(c>=0&&e++,s=s.dblp(e),c<0)break;var f=a[c];u(0!==f),s="affine"===t.type?f>0?s.mixedAdd(i[f-1>>1]):s.mixedAdd(i[-f-1>>1].neg()):f>0?s.add(i[f-1>>1]):s.add(i[-f-1>>1].neg())}return"affine"===t.type?s.toP():s},s.prototype._wnafMulAdd=function(t,e,n,r,i){for(var u=this._wnafT1,s=this._wnafT2,c=this._wnafT3,f=0,l=0;l<r;l++){var h=(A=e[l])._getNAFPoints(t);u[l]=h.wnd,s[l]=h.points}for(l=r-1;l>=1;l-=2){var d=l-1,p=l;if(1===u[d]&&1===u[p]){var g=[e[d],null,null,e[p]];0===e[d].y.cmp(e[p].y)?(g[1]=e[d].add(e[p]),g[2]=e[d].toJ().mixedAdd(e[p].neg())):0===e[d].y.cmp(e[p].y.redNeg())?(g[1]=e[d].toJ().mixedAdd(e[p]),g[2]=e[d].add(e[p].neg())):(g[1]=e[d].toJ().mixedAdd(e[p]),g[2]=e[d].toJ().mixedAdd(e[p].neg()));var y=[-3,-1,-5,-7,0,7,5,1,3],b=a(n[d],n[p]);f=Math.max(b[0].length,f),c[d]=new Array(f),c[p]=new Array(f);for(var v=0;v<f;v++){var m=0|b[0][v],_=0|b[1][v];c[d][v]=y[3*(m+1)+(_+1)],c[p][v]=0,s[d]=g}}else c[d]=o(n[d],u[d],this._bitLength),c[p]=o(n[p],u[p],this._bitLength),f=Math.max(c[d].length,f),f=Math.max(c[p].length,f)}var w=this.jpoint(null,null,null),x=this._wnafT4;for(l=f;l>=0;l--){for(var k=0;l>=0;){var E=!0;for(v=0;v<r;v++)x[v]=0|c[v][l],0!==x[v]&&(E=!1);if(!E)break;k++,l--}if(l>=0&&k++,w=w.dblp(k),l<0)break;for(v=0;v<r;v++){var A,S=x[v];0!==S&&(S>0?A=s[v][S-1>>1]:S<0&&(A=s[v][-S-1>>1].neg()),w="affine"===A.type?w.mixedAdd(A):w.add(A))}}for(l=0;l<r;l++)s[l]=null;return i?w:w.toP()},s.BasePoint=c,c.prototype.eq=function(){throw new Error("Not implemented")},c.prototype.validate=function(){return this.curve.validate(this)},s.prototype.decodePoint=function(t,e){t=i.toArray(t,e);var n=this.p.byteLength();if((4===t[0]||6===t[0]||7===t[0])&&t.length-1==2*n)return 6===t[0]?u(t[t.length-1]%2==0):7===t[0]&&u(t[t.length-1]%2==1),this.point(t.slice(1,1+n),t.slice(1+n,1+2*n));if((2===t[0]||3===t[0])&&t.length-1===n)return this.pointFromX(t.slice(1,1+n),3===t[0]);throw new Error("Unknown point format")},c.prototype.encodeCompressed=function(t){return this.encode(t,!0)},c.prototype._encode=function(t){var e=this.curve.p.byteLength(),n=this.getX().toArray("be",e);return t?[this.getY().isEven()?2:3].concat(n):[4].concat(n,this.getY().toArray("be",e))},c.prototype.encode=function(t,e){return i.encode(this._encode(e),t)},c.prototype.precompute=function(t){if(this.precomputed)return this;var e={doubles:null,naf:null,beta:null};return e.naf=this._getNAFPoints(8),e.doubles=this._getDoubles(4,t),e.beta=this._getBeta(),this.precomputed=e,this},c.prototype._hasDoubles=function(t){if(!this.precomputed)return!1;var e=this.precomputed.doubles;return!!e&&e.points.length>=Math.ceil((t.bitLength()+1)/e.step)},c.prototype._getDoubles=function(t,e){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],r=this,i=0;i<e;i+=t){for(var o=0;o<t;o++)r=r.dbl();n.push(r)}return{step:t,points:n}},c.prototype._getNAFPoints=function(t){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var e=[this],n=(1<<t)-1,r=1===n?null:this.dbl(),i=1;i<n;i++)e[i]=e[i-1].add(r);return{wnd:t,points:e}},c.prototype._getBeta=function(){return null},c.prototype.dblp=function(t){for(var e=this,n=0;n<t;n++)e=e.dbl();return e}},function(t,e,n){var r=n(873),i=n(884),o=n(885),a=n(274),u=n(419),s=n(3).Buffer;function c(t){var e;"object"!=typeof t||s.isBuffer(t)||(e=t.passphrase,t=t.key),"string"==typeof t&&(t=s.from(t));var n,c,f=o(t,e),l=f.tag,h=f.data;switch(l){case"CERTIFICATE":c=r.certificate.decode(h,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(c||(c=r.PublicKey.decode(h,"der")),n=c.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return r.RSAPublicKey.decode(c.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return c.subjectPrivateKey=c.subjectPublicKey,{type:"ec",data:c};case"1.2.840.10040.4.1":return c.algorithm.params.pub_key=r.DSAparam.decode(c.subjectPublicKey.data,"der"),{type:"dsa",data:c.algorithm.params};default:throw new Error("unknown key id "+n)}throw new Error("unknown key type "+l);case"ENCRYPTED PRIVATE KEY":h=function(t,e){var n=t.algorithm.decrypt.kde.kdeparams.salt,r=parseInt(t.algorithm.decrypt.kde.kdeparams.iters.toString(),10),o=i[t.algorithm.decrypt.cipher.algo.join(".")],c=t.algorithm.decrypt.cipher.iv,f=t.subjectPrivateKey,l=parseInt(o.split("-")[1],10)/8,h=u.pbkdf2Sync(e,n,r,l,"sha1"),d=a.createDecipheriv(o,h,c),p=[];return p.push(d.update(f)),p.push(d.final()),s.concat(p)}(h=r.EncryptedPrivateKey.decode(h,"der"),e);case"PRIVATE KEY":switch(n=(c=r.PrivateKey.decode(h,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return r.RSAPrivateKey.decode(c.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:c.algorithm.curve,privateKey:r.ECPrivateKey.decode(c.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return c.algorithm.params.priv_key=r.DSAparam.decode(c.subjectPrivateKey,"der"),{type:"dsa",params:c.algorithm.params};default:throw new Error("unknown key id "+n)}throw new Error("unknown key type "+l);case"RSA PUBLIC KEY":return r.RSAPublicKey.decode(h,"der");case"RSA PRIVATE KEY":return r.RSAPrivateKey.decode(h,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:r.DSAPrivateKey.decode(h,"der")};case"EC PRIVATE KEY":return{curve:(h=r.ECPrivateKey.decode(h,"der")).parameters.value,privateKey:h.privateKey};default:throw new Error("unknown key type "+l)}}t.exports=c,c.signature=r.signature},function(t,e,n){"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n=function(t,e){var n=t[1]||"",r=t[3];if(!r)return n;if(e&&"function"==typeof btoa){var i=(a=r,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(a))))+" */"),o=r.sources.map((function(t){return"/*# sourceURL="+r.sourceRoot+t+" */"}));return[n].concat(o).concat([i]).join("\n")}var a;return[n].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+n+"}":n})).join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var r={},i=0;i<this.length;i++){var o=this[i][0];null!=o&&(r[o]=!0)}for(i=0;i<t.length;i++){var a=t[i];null!=a[0]&&r[a[0]]||(n&&!a[2]?a[2]=n:n&&(a[2]="("+a[2]+") and ("+n+")"),e.push(a))}},e}},function(t,e,n){"use strict";var r=function(){return new i};function i(){this.reset()}i.prototype={constructor:i,reset:function(){this.s=this.t=0},add:function(t){a(o,t,this.t),a(this,o.s,this.s),this.s?this.t+=o.t:this.s=o.t},valueOf:function(){return this.s}};var o=new i;function a(t,e,n){var r=t.s=e+n,i=r-e,o=r-i;t.t=e-o+(n-i)}var u=Math.PI,s=u/2,c=u/4,f=2*u,l=180/u,h=u/180,d=Math.abs,p=Math.atan,g=Math.atan2,y=Math.cos,b=Math.ceil,v=Math.exp,m=(Math.floor,Math.log),_=Math.pow,w=Math.sin,x=Math.sign||function(t){return t>0?1:t<0?-1:0},k=Math.sqrt,E=Math.tan;function A(t){return t>1?0:t<-1?u:Math.acos(t)}function S(t){return t>1?s:t<-1?-s:Math.asin(t)}function M(t){return(t=w(t/2))*t}function T(){}function O(t,e){t&&C.hasOwnProperty(t.type)&&C[t.type](t,e)}var D={Feature:function(t,e){O(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)O(n[r].geometry,e)}},C={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)t=n[r],e.point(t[0],t[1],t[2])},LineString:function(t,e){N(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)N(n[r],e,0)},Polygon:function(t,e){I(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)I(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)O(n[r],e)}};function N(t,e,n){var r,i=-1,o=t.length-n;for(e.lineStart();++i<o;)r=t[i],e.point(r[0],r[1],r[2]);e.lineEnd()}function I(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)N(t[n],e,1);e.polygonEnd()}var R,j,L,B,P,F=function(t,e){t&&D.hasOwnProperty(t.type)?D[t.type](t,e):O(t,e)},q=r(),U=r(),z={point:T,lineStart:T,lineEnd:T,polygonStart:function(){q.reset(),z.lineStart=Y,z.lineEnd=V},polygonEnd:function(){var t=+q;U.add(t<0?f+t:t),this.lineStart=this.lineEnd=this.point=T},sphere:function(){U.add(f)}};function Y(){z.point=G}function V(){H(R,j)}function G(t,e){z.point=H,R=t,j=e,L=t*=h,B=y(e=(e*=h)/2+c),P=w(e)}function H(t,e){var n=(t*=h)-L,r=n>=0?1:-1,i=r*n,o=y(e=(e*=h)/2+c),a=w(e),u=P*a,s=B*o+u*y(i),f=u*r*w(i);q.add(g(f,s)),L=t,B=o,P=a}var W=function(t){return U.reset(),F(t,z),2*U};function $(t){return[g(t[1],t[0]),S(t[2])]}function K(t){var e=t[0],n=t[1],r=y(n);return[r*y(e),r*w(e),w(n)]}function Z(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function X(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function J(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function Q(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function tt(t){var e=k(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}var et,nt,rt,it,ot,at,ut,st,ct,ft,lt=r(),ht={point:dt,lineStart:gt,lineEnd:yt,polygonStart:function(){ht.point=bt,ht.lineStart=vt,ht.lineEnd=mt,lt.reset(),z.polygonStart()},polygonEnd:function(){z.polygonEnd(),ht.point=dt,ht.lineStart=gt,ht.lineEnd=yt,q<0?(et=-(rt=180),nt=-(it=90)):lt>1e-6?it=90:lt<-1e-6&&(nt=-90),ft[0]=et,ft[1]=rt},sphere:function(){et=-(rt=180),nt=-(it=90)}};function dt(t,e){ct.push(ft=[et=t,rt=t]),e<nt&&(nt=e),e>it&&(it=e)}function pt(t,e){var n=K([t*h,e*h]);if(st){var r=X(st,n),i=X([r[1],-r[0],0],r);tt(i),i=$(i);var o,a=t-ot,u=a>0?1:-1,s=i[0]*l*u,c=d(a)>180;c^(u*ot<s&&s<u*t)?(o=i[1]*l)>it&&(it=o):c^(u*ot<(s=(s+360)%360-180)&&s<u*t)?(o=-i[1]*l)<nt&&(nt=o):(e<nt&&(nt=e),e>it&&(it=e)),c?t<ot?_t(et,t)>_t(et,rt)&&(rt=t):_t(t,rt)>_t(et,rt)&&(et=t):rt>=et?(t<et&&(et=t),t>rt&&(rt=t)):t>ot?_t(et,t)>_t(et,rt)&&(rt=t):_t(t,rt)>_t(et,rt)&&(et=t)}else ct.push(ft=[et=t,rt=t]);e<nt&&(nt=e),e>it&&(it=e),st=n,ot=t}function gt(){ht.point=pt}function yt(){ft[0]=et,ft[1]=rt,ht.point=dt,st=null}function bt(t,e){if(st){var n=t-ot;lt.add(d(n)>180?n+(n>0?360:-360):n)}else at=t,ut=e;z.point(t,e),pt(t,e)}function vt(){z.lineStart()}function mt(){bt(at,ut),z.lineEnd(),d(lt)>1e-6&&(et=-(rt=180)),ft[0]=et,ft[1]=rt,st=null}function _t(t,e){return(e-=t)<0?e+360:e}function wt(t,e){return t[0]-e[0]}function xt(t,e){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:e<t[0]||t[1]<e}var kt,Et,At,St,Mt,Tt,Ot,Dt,Ct,Nt,It,Rt,jt,Lt,Bt,Pt,Ft=function(t){var e,n,r,i,o,a,u;if(it=rt=-(et=nt=1/0),ct=[],F(t,ht),n=ct.length){for(ct.sort(wt),e=1,o=[r=ct[0]];e<n;++e)xt(r,(i=ct[e])[0])||xt(r,i[1])?(_t(r[0],i[1])>_t(r[0],r[1])&&(r[1]=i[1]),_t(i[0],r[1])>_t(r[0],r[1])&&(r[0]=i[0])):o.push(r=i);for(a=-1/0,e=0,r=o[n=o.length-1];e<=n;r=i,++e)i=o[e],(u=_t(r[1],i[0]))>a&&(a=u,et=i[0],rt=r[1])}return ct=ft=null,et===1/0||nt===1/0?[[NaN,NaN],[NaN,NaN]]:[[et,nt],[rt,it]]},qt={sphere:T,point:Ut,lineStart:Yt,lineEnd:Ht,polygonStart:function(){qt.lineStart=Wt,qt.lineEnd=$t},polygonEnd:function(){qt.lineStart=Yt,qt.lineEnd=Ht}};function Ut(t,e){t*=h;var n=y(e*=h);zt(n*y(t),n*w(t),w(e))}function zt(t,e,n){++kt,At+=(t-At)/kt,St+=(e-St)/kt,Mt+=(n-Mt)/kt}function Yt(){qt.point=Vt}function Vt(t,e){t*=h;var n=y(e*=h);Lt=n*y(t),Bt=n*w(t),Pt=w(e),qt.point=Gt,zt(Lt,Bt,Pt)}function Gt(t,e){t*=h;var n=y(e*=h),r=n*y(t),i=n*w(t),o=w(e),a=g(k((a=Bt*o-Pt*i)*a+(a=Pt*r-Lt*o)*a+(a=Lt*i-Bt*r)*a),Lt*r+Bt*i+Pt*o);Et+=a,Tt+=a*(Lt+(Lt=r)),Ot+=a*(Bt+(Bt=i)),Dt+=a*(Pt+(Pt=o)),zt(Lt,Bt,Pt)}function Ht(){qt.point=Ut}function Wt(){qt.point=Kt}function $t(){Zt(Rt,jt),qt.point=Ut}function Kt(t,e){Rt=t,jt=e,t*=h,e*=h,qt.point=Zt;var n=y(e);Lt=n*y(t),Bt=n*w(t),Pt=w(e),zt(Lt,Bt,Pt)}function Zt(t,e){t*=h;var n=y(e*=h),r=n*y(t),i=n*w(t),o=w(e),a=Bt*o-Pt*i,u=Pt*r-Lt*o,s=Lt*i-Bt*r,c=k(a*a+u*u+s*s),f=S(c),l=c&&-f/c;Ct+=l*a,Nt+=l*u,It+=l*s,Et+=f,Tt+=f*(Lt+(Lt=r)),Ot+=f*(Bt+(Bt=i)),Dt+=f*(Pt+(Pt=o)),zt(Lt,Bt,Pt)}var Xt=function(t){kt=Et=At=St=Mt=Tt=Ot=Dt=Ct=Nt=It=0,F(t,qt);var e=Ct,n=Nt,r=It,i=e*e+n*n+r*r;return i<1e-12&&(e=Tt,n=Ot,r=Dt,Et<1e-6&&(e=At,n=St,r=Mt),(i=e*e+n*n+r*r)<1e-12)?[NaN,NaN]:[g(n,e)*l,S(r/k(i))*l]},Jt=function(t){return function(){return t}},Qt=function(t,e){function n(n,r){return n=t(n,r),e(n[0],n[1])}return t.invert&&e.invert&&(n.invert=function(n,r){return(n=e.invert(n,r))&&t.invert(n[0],n[1])}),n};function te(t,e){return[d(t)>u?t+Math.round(-t/f)*f:t,e]}function ee(t,e,n){return(t%=f)?e||n?Qt(re(t),ie(e,n)):re(t):e||n?ie(e,n):te}function ne(t){return function(e,n){return[(e+=t)>u?e-f:e<-u?e+f:e,n]}}function re(t){var e=ne(t);return e.invert=ne(-t),e}function ie(t,e){var n=y(t),r=w(t),i=y(e),o=w(e);function a(t,e){var a=y(e),u=y(t)*a,s=w(t)*a,c=w(e),f=c*n+u*r;return[g(s*i-f*o,u*n-c*r),S(f*i+s*o)]}return a.invert=function(t,e){var a=y(e),u=y(t)*a,s=w(t)*a,c=w(e),f=c*i-s*o;return[g(s*i+c*o,u*n+f*r),S(f*n-u*r)]},a}te.invert=te;var oe=function(t){function e(e){return(e=t(e[0]*h,e[1]*h))[0]*=l,e[1]*=l,e}return t=ee(t[0]*h,t[1]*h,t.length>2?t[2]*h:0),e.invert=function(e){return(e=t.invert(e[0]*h,e[1]*h))[0]*=l,e[1]*=l,e},e};function ae(t,e,n,r,i,o){if(n){var a=y(e),u=w(e),s=r*n;null==i?(i=e+r*f,o=e-s/2):(i=ue(a,i),o=ue(a,o),(r>0?i<o:i>o)&&(i+=r*f));for(var c,l=i;r>0?l>o:l<o;l-=s)c=$([a,-u*y(l),-u*w(l)]),t.point(c[0],c[1])}}function ue(t,e){(e=K(e))[0]-=t,tt(e);var n=A(-e[1]);return((-e[2]<0?-n:n)+f-1e-6)%f}var se=function(){var t,e,n=Jt([0,0]),r=Jt(90),i=Jt(6),o={point:function(n,r){t.push(n=e(n,r)),n[0]*=l,n[1]*=l}};function a(){var a=n.apply(this,arguments),u=r.apply(this,arguments)*h,s=i.apply(this,arguments)*h;return t=[],e=ee(-a[0]*h,-a[1]*h,0).invert,ae(o,u,s,1),a={type:"Polygon",coordinates:[t]},t=e=null,a}return a.center=function(t){return arguments.length?(n="function"==typeof t?t:Jt([+t[0],+t[1]]),a):n},a.radius=function(t){return arguments.length?(r="function"==typeof t?t:Jt(+t),a):r},a.precision=function(t){return arguments.length?(i="function"==typeof t?t:Jt(+t),a):i},a},ce=function(){var t,e=[];return{point:function(e,n){t.push([e,n])},lineStart:function(){e.push(t=[])},lineEnd:T,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}},fe=function(t,e){return d(t[0]-e[0])<1e-6&&d(t[1]-e[1])<1e-6};function le(t,e,n,r){this.x=t,this.z=e,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}var he=function(t,e,n,r,i){var o,a,u=[],s=[];if(t.forEach((function(t){if(!((e=t.length-1)<=0)){var e,n,r=t[0],a=t[e];if(fe(r,a)){for(i.lineStart(),o=0;o<e;++o)i.point((r=t[o])[0],r[1]);i.lineEnd()}else u.push(n=new le(r,t,null,!0)),s.push(n.o=new le(r,null,n,!1)),u.push(n=new le(a,t,null,!1)),s.push(n.o=new le(a,null,n,!0))}})),u.length){for(s.sort(e),de(u),de(s),o=0,a=s.length;o<a;++o)s[o].e=n=!n;for(var c,f,l=u[0];;){for(var h=l,d=!0;h.v;)if((h=h.n)===l)return;c=h.z,i.lineStart();do{if(h.v=h.o.v=!0,h.e){if(d)for(o=0,a=c.length;o<a;++o)i.point((f=c[o])[0],f[1]);else r(h.x,h.n.x,1,i);h=h.n}else{if(d)for(c=h.p.z,o=c.length-1;o>=0;--o)i.point((f=c[o])[0],f[1]);else r(h.x,h.p.x,-1,i);h=h.p}c=(h=h.o).z,d=!d}while(!h.v);i.lineEnd()}}};function de(t){if(e=t.length){for(var e,n,r=0,i=t[0];++r<e;)i.n=n=t[r],n.p=i,i=n;i.n=n=t[0],n.p=i}}var pe=r();function ge(t){return d(t[0])<=u?t[0]:x(t[0])*((d(t[0])+u)%f-u)}var ye=function(t,e){var n=ge(e),r=e[1],i=w(r),o=[w(n),-y(n),0],a=0,l=0;pe.reset(),1===i?r=s+1e-6:-1===i&&(r=-s-1e-6);for(var h=0,d=t.length;h<d;++h)if(b=(p=t[h]).length)for(var p,b,v=p[b-1],m=ge(v),_=v[1]/2+c,x=w(_),k=y(_),E=0;E<b;++E,m=M,x=O,k=D,v=A){var A=p[E],M=ge(A),T=A[1]/2+c,O=w(T),D=y(T),C=M-m,N=C>=0?1:-1,I=N*C,R=I>u,j=x*O;if(pe.add(g(j*N*w(I),k*D+j*y(I))),a+=R?C+N*f:C,R^m>=n^M>=n){var L=X(K(v),K(A));tt(L);var B=X(o,L);tt(B);var P=(R^C>=0?-1:1)*S(B[2]);(r>P||r===P&&(L[0]||L[1]))&&(l+=R^C>=0?1:-1)}}return(a<-1e-6||a<1e-6&&pe<-1e-6)^1&l},be=n(0),ve=function(t,e,n,r){return function(i){var o,a,u,s=e(i),c=ce(),f=e(c),l=!1,h={point:d,lineStart:g,lineEnd:y,polygonStart:function(){h.point=b,h.lineStart=v,h.lineEnd=m,a=[],o=[]},polygonEnd:function(){h.point=d,h.lineStart=g,h.lineEnd=y,a=Object(be.n)(a);var t=ye(o,r);a.length?(l||(i.polygonStart(),l=!0),he(a,_e,t,n,i)):t&&(l||(i.polygonStart(),l=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),l&&(i.polygonEnd(),l=!1),a=o=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function d(e,n){t(e,n)&&i.point(e,n)}function p(t,e){s.point(t,e)}function g(){h.point=p,s.lineStart()}function y(){h.point=d,s.lineEnd()}function b(t,e){u.push([t,e]),f.point(t,e)}function v(){f.lineStart(),u=[]}function m(){b(u[0][0],u[0][1]),f.lineEnd();var t,e,n,r,s=f.clean(),h=c.result(),d=h.length;if(u.pop(),o.push(u),u=null,d)if(1&s){if((e=(n=h[0]).length-1)>0){for(l||(i.polygonStart(),l=!0),i.lineStart(),t=0;t<e;++t)i.point((r=n[t])[0],r[1]);i.lineEnd()}}else d>1&&2&s&&h.push(h.pop().concat(h.shift())),a.push(h.filter(me))}return h}};function me(t){return t.length>1}function _e(t,e){return((t=t.x)[0]<0?t[1]-s-1e-6:s-t[1])-((e=e.x)[0]<0?e[1]-s-1e-6:s-e[1])}var we=ve((function(){return!0}),(function(t){var e,n=NaN,r=NaN,i=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(o,a){var c=o>0?u:-u,f=d(o-n);d(f-u)<1e-6?(t.point(n,r=(r+a)/2>0?s:-s),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(c,r),t.point(o,r),e=0):i!==c&&f>=u&&(d(n-i)<1e-6&&(n-=1e-6*i),d(o-c)<1e-6&&(o-=1e-6*c),r=function(t,e,n,r){var i,o,a=w(t-n);return d(a)>1e-6?p((w(e)*(o=y(r))*w(n)-w(r)*(i=y(e))*w(t))/(i*o*a)):(e+r)/2}(n,r,o,a),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(c,r),e=0),t.point(n=o,r=a),i=c},lineEnd:function(){t.lineEnd(),n=r=NaN},clean:function(){return 2-e}}}),(function(t,e,n,r){var i;if(null==t)i=n*s,r.point(-u,i),r.point(0,i),r.point(u,i),r.point(u,0),r.point(u,-i),r.point(0,-i),r.point(-u,-i),r.point(-u,0),r.point(-u,i);else if(d(t[0]-e[0])>1e-6){var o=t[0]<e[0]?u:-u;i=n*o/2,r.point(-o,i),r.point(0,i),r.point(o,i)}else r.point(e[0],e[1])}),[-u,-s]);var xe=function(t){var e=y(t),n=6*h,r=e>0,i=d(e)>1e-6;function o(t,n){return y(t)*y(n)>e}function a(t,n,r){var i=[1,0,0],o=X(K(t),K(n)),a=Z(o,o),s=o[0],c=a-s*s;if(!c)return!r&&t;var f=e*a/c,l=-e*s/c,h=X(i,o),p=Q(i,f);J(p,Q(o,l));var g=h,y=Z(p,g),b=Z(g,g),v=y*y-b*(Z(p,p)-1);if(!(v<0)){var m=k(v),_=Q(g,(-y-m)/b);if(J(_,p),_=$(_),!r)return _;var w,x=t[0],E=n[0],A=t[1],S=n[1];E<x&&(w=x,x=E,E=w);var M=E-x,T=d(M-u)<1e-6;if(!T&&S<A&&(w=A,A=S,S=w),T||M<1e-6?T?A+S>0^_[1]<(d(_[0]-x)<1e-6?A:S):A<=_[1]&&_[1]<=S:M>u^(x<=_[0]&&_[0]<=E)){var O=Q(g,(-y+m)/b);return J(O,p),[_,$(O)]}}}function s(e,n){var i=r?t:u-t,o=0;return e<-i?o|=1:e>i&&(o|=2),n<-i?o|=4:n>i&&(o|=8),o}return ve(o,(function(t){var e,n,c,f,l;return{lineStart:function(){f=c=!1,l=1},point:function(h,d){var p,g=[h,d],y=o(h,d),b=r?y?0:s(h,d):y?s(h+(h<0?u:-u),d):0;if(!e&&(f=c=y)&&t.lineStart(),y!==c&&(!(p=a(e,g))||fe(e,p)||fe(g,p))&&(g[0]+=1e-6,g[1]+=1e-6,y=o(g[0],g[1])),y!==c)l=0,y?(t.lineStart(),p=a(g,e),t.point(p[0],p[1])):(p=a(e,g),t.point(p[0],p[1]),t.lineEnd()),e=p;else if(i&&e&&r^y){var v;b&n||!(v=a(g,e,!0))||(l=0,r?(t.lineStart(),t.point(v[0][0],v[0][1]),t.point(v[1][0],v[1][1]),t.lineEnd()):(t.point(v[1][0],v[1][1]),t.lineEnd(),t.lineStart(),t.point(v[0][0],v[0][1])))}!y||e&&fe(e,g)||t.point(g[0],g[1]),e=g,c=y,n=b},lineEnd:function(){c&&t.lineEnd(),e=null},clean:function(){return l|(f&&c)<<1}}}),(function(e,r,i,o){ae(o,t,n,i,e,r)}),r?[0,-t]:[-u,t-u])};function ke(t,e,n,r){function i(i,o){return t<=i&&i<=n&&e<=o&&o<=r}function o(i,o,u,c){var f=0,l=0;if(null==i||(f=a(i,u))!==(l=a(o,u))||s(i,o)<0^u>0)do{c.point(0===f||3===f?t:n,f>1?r:e)}while((f=(f+u+4)%4)!==l);else c.point(o[0],o[1])}function a(r,i){return d(r[0]-t)<1e-6?i>0?0:3:d(r[0]-n)<1e-6?i>0?2:1:d(r[1]-e)<1e-6?i>0?1:0:i>0?3:2}function u(t,e){return s(t.x,e.x)}function s(t,e){var n=a(t,1),r=a(e,1);return n!==r?n-r:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(a){var s,c,f,l,h,d,p,g,y,b,v,m=a,_=ce(),w={point:x,lineStart:function(){w.point=k,c&&c.push(f=[]);b=!0,y=!1,p=g=NaN},lineEnd:function(){s&&(k(l,h),d&&y&&_.rejoin(),s.push(_.result()));w.point=x,y&&m.lineEnd()},polygonStart:function(){m=_,s=[],c=[],v=!0},polygonEnd:function(){var e=function(){for(var e=0,n=0,i=c.length;n<i;++n)for(var o,a,u=c[n],s=1,f=u.length,l=u[0],h=l[0],d=l[1];s<f;++s)o=h,a=d,l=u[s],h=l[0],d=l[1],a<=r?d>r&&(h-o)*(r-a)>(d-a)*(t-o)&&++e:d<=r&&(h-o)*(r-a)<(d-a)*(t-o)&&--e;return e}(),n=v&&e,i=(s=Object(be.n)(s)).length;(n||i)&&(a.polygonStart(),n&&(a.lineStart(),o(null,null,1,a),a.lineEnd()),i&&he(s,u,e,o,a),a.polygonEnd());m=a,s=c=f=null}};function x(t,e){i(t,e)&&m.point(t,e)}function k(o,a){var u=i(o,a);if(c&&f.push([o,a]),b)l=o,h=a,d=u,b=!1,u&&(m.lineStart(),m.point(o,a));else if(u&&y)m.point(o,a);else{var s=[p=Math.max(-1e9,Math.min(1e9,p)),g=Math.max(-1e9,Math.min(1e9,g))],_=[o=Math.max(-1e9,Math.min(1e9,o)),a=Math.max(-1e9,Math.min(1e9,a))];!function(t,e,n,r,i,o){var a,u=t[0],s=t[1],c=0,f=1,l=e[0]-u,h=e[1]-s;if(a=n-u,l||!(a>0)){if(a/=l,l<0){if(a<c)return;a<f&&(f=a)}else if(l>0){if(a>f)return;a>c&&(c=a)}if(a=i-u,l||!(a<0)){if(a/=l,l<0){if(a>f)return;a>c&&(c=a)}else if(l>0){if(a<c)return;a<f&&(f=a)}if(a=r-s,h||!(a>0)){if(a/=h,h<0){if(a<c)return;a<f&&(f=a)}else if(h>0){if(a>f)return;a>c&&(c=a)}if(a=o-s,h||!(a<0)){if(a/=h,h<0){if(a>f)return;a>c&&(c=a)}else if(h>0){if(a<c)return;a<f&&(f=a)}return c>0&&(t[0]=u+c*l,t[1]=s+c*h),f<1&&(e[0]=u+f*l,e[1]=s+f*h),!0}}}}}(s,_,t,e,n,r)?u&&(m.lineStart(),m.point(o,a),v=!1):(y||(m.lineStart(),m.point(s[0],s[1])),m.point(_[0],_[1]),u||m.lineEnd(),v=!1)}p=o,g=a,y=u}return w}}var Ee,Ae,Se,Me=function(){var t,e,n,r=0,i=0,o=960,a=500;return n={stream:function(n){return t&&e===n?t:t=ke(r,i,o,a)(e=n)},extent:function(u){return arguments.length?(r=+u[0][0],i=+u[0][1],o=+u[1][0],a=+u[1][1],t=e=null,n):[[r,i],[o,a]]}}},Te=r(),Oe={sphere:T,point:T,lineStart:function(){Oe.point=Ce,Oe.lineEnd=De},lineEnd:T,polygonStart:T,polygonEnd:T};function De(){Oe.point=Oe.lineEnd=T}function Ce(t,e){Ee=t*=h,Ae=w(e*=h),Se=y(e),Oe.point=Ne}function Ne(t,e){t*=h;var n=w(e*=h),r=y(e),i=d(t-Ee),o=y(i),a=r*w(i),u=Se*n-Ae*r*o,s=Ae*n+Se*r*o;Te.add(g(k(a*a+u*u),s)),Ee=t,Ae=n,Se=r}var Ie=function(t){return Te.reset(),F(t,Oe),+Te},Re=[null,null],je={type:"LineString",coordinates:Re},Le=function(t,e){return Re[0]=t,Re[1]=e,Ie(je)},Be={Feature:function(t,e){return Fe(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)if(Fe(n[r].geometry,e))return!0;return!1}},Pe={Sphere:function(){return!0},Point:function(t,e){return qe(t.coordinates,e)},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(qe(n[r],e))return!0;return!1},LineString:function(t,e){return Ue(t.coordinates,e)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(Ue(n[r],e))return!0;return!1},Polygon:function(t,e){return ze(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(ze(n[r],e))return!0;return!1},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)if(Fe(n[r],e))return!0;return!1}};function Fe(t,e){return!(!t||!Pe.hasOwnProperty(t.type))&&Pe[t.type](t,e)}function qe(t,e){return 0===Le(t,e)}function Ue(t,e){for(var n,r,i,o=0,a=t.length;o<a;o++){if(0===(r=Le(t[o],e)))return!0;if(o>0&&(i=Le(t[o],t[o-1]))>0&&n<=i&&r<=i&&(n+r-i)*(1-Math.pow((n-r)/i,2))<1e-12*i)return!0;n=r}return!1}function ze(t,e){return!!ye(t.map(Ye),Ve(e))}function Ye(t){return(t=t.map(Ve)).pop(),t}function Ve(t){return[t[0]*h,t[1]*h]}var Ge=function(t,e){return(t&&Be.hasOwnProperty(t.type)?Be[t.type]:Fe)(t,e)};function He(t,e,n){var r=Object(be.s)(t,e-1e-6,n).concat(e);return function(t){return r.map((function(e){return[t,e]}))}}function We(t,e,n){var r=Object(be.s)(t,e-1e-6,n).concat(e);return function(t){return r.map((function(e){return[e,t]}))}}function $e(){var t,e,n,r,i,o,a,u,s,c,f,l,h=10,p=h,g=90,y=360,v=2.5;function m(){return{type:"MultiLineString",coordinates:_()}}function _(){return Object(be.s)(b(r/g)*g,n,g).map(f).concat(Object(be.s)(b(u/y)*y,a,y).map(l)).concat(Object(be.s)(b(e/h)*h,t,h).filter((function(t){return d(t%g)>1e-6})).map(s)).concat(Object(be.s)(b(o/p)*p,i,p).filter((function(t){return d(t%y)>1e-6})).map(c))}return m.lines=function(){return _().map((function(t){return{type:"LineString",coordinates:t}}))},m.outline=function(){return{type:"Polygon",coordinates:[f(r).concat(l(a).slice(1),f(n).reverse().slice(1),l(u).reverse().slice(1))]}},m.extent=function(t){return arguments.length?m.extentMajor(t).extentMinor(t):m.extentMinor()},m.extentMajor=function(t){return arguments.length?(r=+t[0][0],n=+t[1][0],u=+t[0][1],a=+t[1][1],r>n&&(t=r,r=n,n=t),u>a&&(t=u,u=a,a=t),m.precision(v)):[[r,u],[n,a]]},m.extentMinor=function(n){return arguments.length?(e=+n[0][0],t=+n[1][0],o=+n[0][1],i=+n[1][1],e>t&&(n=e,e=t,t=n),o>i&&(n=o,o=i,i=n),m.precision(v)):[[e,o],[t,i]]},m.step=function(t){return arguments.length?m.stepMajor(t).stepMinor(t):m.stepMinor()},m.stepMajor=function(t){return arguments.length?(g=+t[0],y=+t[1],m):[g,y]},m.stepMinor=function(t){return arguments.length?(h=+t[0],p=+t[1],m):[h,p]},m.precision=function(h){return arguments.length?(v=+h,s=He(o,i,90),c=We(e,t,v),f=He(u,a,90),l=We(r,n,v),m):v},m.extentMajor([[-180,1e-6-90],[180,90-1e-6]]).extentMinor([[-180,-80-1e-6],[180,80+1e-6]])}function Ke(){return $e()()}var Ze,Xe,Je,Qe,tn=function(t,e){var n=t[0]*h,r=t[1]*h,i=e[0]*h,o=e[1]*h,a=y(r),u=w(r),s=y(o),c=w(o),f=a*y(n),d=a*w(n),p=s*y(i),b=s*w(i),v=2*S(k(M(o-r)+a*s*M(i-n))),m=w(v),_=v?function(t){var e=w(t*=v)/m,n=w(v-t)/m,r=n*f+e*p,i=n*d+e*b,o=n*u+e*c;return[g(i,r)*l,g(o,k(r*r+i*i))*l]}:function(){return[n*l,r*l]};return _.distance=v,_},en=function(t){return t},nn=r(),rn=r(),on={point:T,lineStart:T,lineEnd:T,polygonStart:function(){on.lineStart=an,on.lineEnd=cn},polygonEnd:function(){on.lineStart=on.lineEnd=on.point=T,nn.add(d(rn)),rn.reset()},result:function(){var t=nn/2;return nn.reset(),t}};function an(){on.point=un}function un(t,e){on.point=sn,Ze=Je=t,Xe=Qe=e}function sn(t,e){rn.add(Qe*t-Je*e),Je=t,Qe=e}function cn(){sn(Ze,Xe)}var fn=on,ln=1/0,hn=ln,dn=-ln,pn=dn;var gn,yn,bn,vn,mn={point:function(t,e){t<ln&&(ln=t);t>dn&&(dn=t);e<hn&&(hn=e);e>pn&&(pn=e)},lineStart:T,lineEnd:T,polygonStart:T,polygonEnd:T,result:function(){var t=[[ln,hn],[dn,pn]];return dn=pn=-(hn=ln=1/0),t}},_n=0,wn=0,xn=0,kn=0,En=0,An=0,Sn=0,Mn=0,Tn=0,On={point:Dn,lineStart:Cn,lineEnd:Rn,polygonStart:function(){On.lineStart=jn,On.lineEnd=Ln},polygonEnd:function(){On.point=Dn,On.lineStart=Cn,On.lineEnd=Rn},result:function(){var t=Tn?[Sn/Tn,Mn/Tn]:An?[kn/An,En/An]:xn?[_n/xn,wn/xn]:[NaN,NaN];return _n=wn=xn=kn=En=An=Sn=Mn=Tn=0,t}};function Dn(t,e){_n+=t,wn+=e,++xn}function Cn(){On.point=Nn}function Nn(t,e){On.point=In,Dn(bn=t,vn=e)}function In(t,e){var n=t-bn,r=e-vn,i=k(n*n+r*r);kn+=i*(bn+t)/2,En+=i*(vn+e)/2,An+=i,Dn(bn=t,vn=e)}function Rn(){On.point=Dn}function jn(){On.point=Bn}function Ln(){Pn(gn,yn)}function Bn(t,e){On.point=Pn,Dn(gn=bn=t,yn=vn=e)}function Pn(t,e){var n=t-bn,r=e-vn,i=k(n*n+r*r);kn+=i*(bn+t)/2,En+=i*(vn+e)/2,An+=i,Sn+=(i=vn*t-bn*e)*(bn+t),Mn+=i*(vn+e),Tn+=3*i,Dn(bn=t,vn=e)}var Fn=On;function qn(t){this._context=t}qn.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._context.moveTo(t,e),this._point=1;break;case 1:this._context.lineTo(t,e);break;default:this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,f)}},result:T};var Un,zn,Yn,Vn,Gn,Hn=r(),Wn={point:T,lineStart:function(){Wn.point=$n},lineEnd:function(){Un&&Kn(zn,Yn),Wn.point=T},polygonStart:function(){Un=!0},polygonEnd:function(){Un=null},result:function(){var t=+Hn;return Hn.reset(),t}};function $n(t,e){Wn.point=Kn,zn=Vn=t,Yn=Gn=e}function Kn(t,e){Vn-=t,Gn-=e,Hn.add(k(Vn*Vn+Gn*Gn)),Vn=t,Gn=e}var Zn=Wn;function Xn(){this._string=[]}function Jn(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}Xn.prototype={_radius:4.5,_circle:Jn(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._string.push("M",t,",",e),this._point=1;break;case 1:this._string.push("L",t,",",e);break;default:null==this._circle&&(this._circle=Jn(this._radius)),this._string.push("M",t,",",e,this._circle)}},result:function(){if(this._string.length){var t=this._string.join("");return this._string=[],t}return null}};var Qn=function(t,e){var n,r,i=4.5;function o(t){return t&&("function"==typeof i&&r.pointRadius(+i.apply(this,arguments)),F(t,n(r))),r.result()}return o.area=function(t){return F(t,n(fn)),fn.result()},o.measure=function(t){return F(t,n(Zn)),Zn.result()},o.bounds=function(t){return F(t,n(mn)),mn.result()},o.centroid=function(t){return F(t,n(Fn)),Fn.result()},o.projection=function(e){return arguments.length?(n=null==e?(t=null,en):(t=e).stream,o):t},o.context=function(t){return arguments.length?(r=null==t?(e=null,new Xn):new qn(e=t),"function"!=typeof i&&r.pointRadius(i),o):e},o.pointRadius=function(t){return arguments.length?(i="function"==typeof t?t:(r.pointRadius(+t),+t),o):i},o.projection(t).context(e)},tr=function(t){return{stream:er(t)}};function er(t){return function(e){var n=new nr;for(var r in t)n[r]=t[r];return n.stream=e,n}}function nr(){}function rr(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),F(n,t.stream(mn)),e(mn.result()),null!=r&&t.clipExtent(r),t}function ir(t,e,n){return rr(t,(function(n){var r=e[1][0]-e[0][0],i=e[1][1]-e[0][1],o=Math.min(r/(n[1][0]-n[0][0]),i/(n[1][1]-n[0][1])),a=+e[0][0]+(r-o*(n[1][0]+n[0][0]))/2,u=+e[0][1]+(i-o*(n[1][1]+n[0][1]))/2;t.scale(150*o).translate([a,u])}),n)}function or(t,e,n){return ir(t,[[0,0],e],n)}function ar(t,e,n){return rr(t,(function(n){var r=+e,i=r/(n[1][0]-n[0][0]),o=(r-i*(n[1][0]+n[0][0]))/2,a=-i*n[0][1];t.scale(150*i).translate([o,a])}),n)}function ur(t,e,n){return rr(t,(function(n){var r=+e,i=r/(n[1][1]-n[0][1]),o=-i*n[0][0],a=(r-i*(n[1][1]+n[0][1]))/2;t.scale(150*i).translate([o,a])}),n)}nr.prototype={constructor:nr,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var sr=y(30*h),cr=function(t,e){return+e?function(t,e){function n(r,i,o,a,u,s,c,f,l,h,p,y,b,v){var m=c-r,_=f-i,w=m*m+_*_;if(w>4*e&&b--){var x=a+h,E=u+p,A=s+y,M=k(x*x+E*E+A*A),T=S(A/=M),O=d(d(A)-1)<1e-6||d(o-l)<1e-6?(o+l)/2:g(E,x),D=t(O,T),C=D[0],N=D[1],I=C-r,R=N-i,j=_*I-m*R;(j*j/w>e||d((m*I+_*R)/w-.5)>.3||a*h+u*p+s*y<sr)&&(n(r,i,o,a,u,s,C,N,O,x/=M,E/=M,A,b,v),v.point(C,N),n(C,N,O,x,E,A,c,f,l,h,p,y,b,v))}}return function(e){var r,i,o,a,u,s,c,f,l,h,d,p,g={point:y,lineStart:b,lineEnd:m,polygonStart:function(){e.polygonStart(),g.lineStart=_},polygonEnd:function(){e.polygonEnd(),g.lineStart=b}};function y(n,r){n=t(n,r),e.point(n[0],n[1])}function b(){f=NaN,g.point=v,e.lineStart()}function v(r,i){var o=K([r,i]),a=t(r,i);n(f,l,c,h,d,p,f=a[0],l=a[1],c=r,h=o[0],d=o[1],p=o[2],16,e),e.point(f,l)}function m(){g.point=y,e.lineEnd()}function _(){b(),g.point=w,g.lineEnd=x}function w(t,e){v(r=t,e),i=f,o=l,a=h,u=d,s=p,g.point=v}function x(){n(f,l,c,h,d,p,i,o,r,a,u,s,16,e),g.lineEnd=m,m()}return g}}(t,e):function(t){return er({point:function(e,n){e=t(e,n),this.stream.point(e[0],e[1])}})}(t)};var fr=er({point:function(t,e){this.stream.point(t*h,e*h)}});function lr(t,e,n){function r(r,i){return[e+t*r,n-t*i]}return r.invert=function(r,i){return[(r-e)/t,(n-i)/t]},r}function hr(t,e,n,r){var i=y(r),o=w(r),a=i*t,u=o*t,s=i/t,c=o/t,f=(o*n-i*e)/t,l=(o*e+i*n)/t;function h(t,r){return[a*t-u*r+e,n-u*t-a*r]}return h.invert=function(t,e){return[s*t-c*e+f,l-c*t-s*e]},h}function dr(t){return pr((function(){return t}))()}function pr(t){var e,n,r,i,o,a,u,s,c,f,d=150,p=480,g=250,y=0,b=0,v=0,m=0,_=0,w=0,x=null,E=we,A=null,S=en,M=.5;function T(t){return s(t[0]*h,t[1]*h)}function O(t){return(t=s.invert(t[0],t[1]))&&[t[0]*l,t[1]*l]}function D(){var t=hr(d,0,0,w).apply(null,e(y,b)),r=(w?hr:lr)(d,p-t[0],g-t[1],w);return n=ee(v,m,_),u=Qt(e,r),s=Qt(n,u),a=cr(u,M),C()}function C(){return c=f=null,T}return T.stream=function(t){return c&&f===t?c:c=fr(function(t){return er({point:function(e,n){var r=t(e,n);return this.stream.point(r[0],r[1])}})}(n)(E(a(S(f=t)))))},T.preclip=function(t){return arguments.length?(E=t,x=void 0,C()):E},T.postclip=function(t){return arguments.length?(S=t,A=r=i=o=null,C()):S},T.clipAngle=function(t){return arguments.length?(E=+t?xe(x=t*h):(x=null,we),C()):x*l},T.clipExtent=function(t){return arguments.length?(S=null==t?(A=r=i=o=null,en):ke(A=+t[0][0],r=+t[0][1],i=+t[1][0],o=+t[1][1]),C()):null==A?null:[[A,r],[i,o]]},T.scale=function(t){return arguments.length?(d=+t,D()):d},T.translate=function(t){return arguments.length?(p=+t[0],g=+t[1],D()):[p,g]},T.center=function(t){return arguments.length?(y=t[0]%360*h,b=t[1]%360*h,D()):[y*l,b*l]},T.rotate=function(t){return arguments.length?(v=t[0]%360*h,m=t[1]%360*h,_=t.length>2?t[2]%360*h:0,D()):[v*l,m*l,_*l]},T.angle=function(t){return arguments.length?(w=t%360*h,D()):w*l},T.precision=function(t){return arguments.length?(a=cr(u,M=t*t),C()):k(M)},T.fitExtent=function(t,e){return ir(T,t,e)},T.fitSize=function(t,e){return or(T,t,e)},T.fitWidth=function(t,e){return ar(T,t,e)},T.fitHeight=function(t,e){return ur(T,t,e)},function(){return e=t.apply(this,arguments),T.invert=e.invert&&O,D()}}function gr(t){var e=0,n=u/3,r=pr(t),i=r(e,n);return i.parallels=function(t){return arguments.length?r(e=t[0]*h,n=t[1]*h):[e*l,n*l]},i}function yr(t,e){var n=w(t),r=(n+w(e))/2;if(d(r)<1e-6)return function(t){var e=y(t);function n(t,n){return[t*e,w(n)/e]}return n.invert=function(t,n){return[t/e,S(n*e)]},n}(t);var i=1+n*(2*r-n),o=k(i)/r;function a(t,e){var n=k(i-2*r*w(e))/r;return[n*w(t*=r),o-n*y(t)]}return a.invert=function(t,e){var n=o-e;return[g(t,d(n))/r*x(n),S((i-(t*t+n*n)*r*r)/(2*r))]},a}var br=function(){return gr(yr).scale(155.424).center([0,33.6442])},vr=function(){return br().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])};var mr=function(){var t,e,n,r,i,o,a=vr(),u=br().rotate([154,0]).center([-2,58.5]).parallels([55,65]),s=br().rotate([157,0]).center([-3,19.9]).parallels([8,18]),c={point:function(t,e){o=[t,e]}};function f(t){var e=t[0],a=t[1];return o=null,n.point(e,a),o||(r.point(e,a),o)||(i.point(e,a),o)}function l(){return t=e=null,f}return f.invert=function(t){var e=a.scale(),n=a.translate(),r=(t[0]-n[0])/e,i=(t[1]-n[1])/e;return(i>=.12&&i<.234&&r>=-.425&&r<-.214?u:i>=.166&&i<.234&&r>=-.214&&r<-.115?s:a).invert(t)},f.stream=function(n){return t&&e===n?t:(r=[a.stream(e=n),u.stream(n),s.stream(n)],i=r.length,t={point:function(t,e){for(var n=-1;++n<i;)r[n].point(t,e)},sphere:function(){for(var t=-1;++t<i;)r[t].sphere()},lineStart:function(){for(var t=-1;++t<i;)r[t].lineStart()},lineEnd:function(){for(var t=-1;++t<i;)r[t].lineEnd()},polygonStart:function(){for(var t=-1;++t<i;)r[t].polygonStart()},polygonEnd:function(){for(var t=-1;++t<i;)r[t].polygonEnd()}});var r,i},f.precision=function(t){return arguments.length?(a.precision(t),u.precision(t),s.precision(t),l()):a.precision()},f.scale=function(t){return arguments.length?(a.scale(t),u.scale(.35*t),s.scale(t),f.translate(a.translate())):a.scale()},f.translate=function(t){if(!arguments.length)return a.translate();var e=a.scale(),o=+t[0],f=+t[1];return n=a.translate(t).clipExtent([[o-.455*e,f-.238*e],[o+.455*e,f+.238*e]]).stream(c),r=u.translate([o-.307*e,f+.201*e]).clipExtent([[o-.425*e+1e-6,f+.12*e+1e-6],[o-.214*e-1e-6,f+.234*e-1e-6]]).stream(c),i=s.translate([o-.205*e,f+.212*e]).clipExtent([[o-.214*e+1e-6,f+.166*e+1e-6],[o-.115*e-1e-6,f+.234*e-1e-6]]).stream(c),l()},f.fitExtent=function(t,e){return ir(f,t,e)},f.fitSize=function(t,e){return or(f,t,e)},f.fitWidth=function(t,e){return ar(f,t,e)},f.fitHeight=function(t,e){return ur(f,t,e)},f.scale(1070)};function _r(t){return function(e,n){var r=y(e),i=y(n),o=t(r*i);return[o*i*w(e),o*w(n)]}}function wr(t){return function(e,n){var r=k(e*e+n*n),i=t(r),o=w(i),a=y(i);return[g(e*o,r*a),S(r&&n*o/r)]}}var xr=_r((function(t){return k(2/(1+t))}));xr.invert=wr((function(t){return 2*S(t/2)}));var kr=function(){return dr(xr).scale(124.75).clipAngle(179.999)},Er=_r((function(t){return(t=A(t))&&t/w(t)}));Er.invert=wr((function(t){return t}));var Ar=function(){return dr(Er).scale(79.4188).clipAngle(179.999)};function Sr(t,e){return[t,m(E((s+e)/2))]}Sr.invert=function(t,e){return[t,2*p(v(e))-s]};var Mr=function(){return Tr(Sr).scale(961/f)};function Tr(t){var e,n,r,i=dr(t),o=i.center,a=i.scale,s=i.translate,c=i.clipExtent,f=null;function l(){var o=u*a(),s=i(oe(i.rotate()).invert([0,0]));return c(null==f?[[s[0]-o,s[1]-o],[s[0]+o,s[1]+o]]:t===Sr?[[Math.max(s[0]-o,f),e],[Math.min(s[0]+o,n),r]]:[[f,Math.max(s[1]-o,e)],[n,Math.min(s[1]+o,r)]])}return i.scale=function(t){return arguments.length?(a(t),l()):a()},i.translate=function(t){return arguments.length?(s(t),l()):s()},i.center=function(t){return arguments.length?(o(t),l()):o()},i.clipExtent=function(t){return arguments.length?(null==t?f=e=n=r=null:(f=+t[0][0],e=+t[0][1],n=+t[1][0],r=+t[1][1]),l()):null==f?null:[[f,e],[n,r]]},l()}function Or(t){return E((s+t)/2)}function Dr(t,e){var n=y(t),r=t===e?w(t):m(n/y(e))/m(Or(e)/Or(t)),i=n*_(Or(t),r)/r;if(!r)return Sr;function o(t,e){i>0?e<1e-6-s&&(e=1e-6-s):e>s-1e-6&&(e=s-1e-6);var n=i/_(Or(e),r);return[n*w(r*t),i-n*y(r*t)]}return o.invert=function(t,e){var n=i-e,o=x(r)*k(t*t+n*n);return[g(t,d(n))/r*x(n),2*p(_(i/o,1/r))-s]},o}var Cr=function(){return gr(Dr).scale(109.5).parallels([30,30])};function Nr(t,e){return[t,e]}Nr.invert=Nr;var Ir=function(){return dr(Nr).scale(152.63)};function Rr(t,e){var n=y(t),r=t===e?w(t):(n-y(e))/(e-t),i=n/r+t;if(d(r)<1e-6)return Nr;function o(t,e){var n=i-e,o=r*t;return[n*w(o),i-n*y(o)]}return o.invert=function(t,e){var n=i-e;return[g(t,d(n))/r*x(n),i-x(r)*k(t*t+n*n)]},o}var jr=function(){return gr(Rr).scale(131.154).center([0,13.9389])},Lr=1.340264,Br=-.081106,Pr=893e-6,Fr=.003796,qr=k(3)/2;function Ur(t,e){var n=S(qr*w(e)),r=n*n,i=r*r*r;return[t*y(n)/(qr*(Lr+3*Br*r+i*(7*Pr+9*Fr*r))),n*(Lr+Br*r+i*(Pr+Fr*r))]}Ur.invert=function(t,e){for(var n,r=e,i=r*r,o=i*i*i,a=0;a<12&&(o=(i=(r-=n=(r*(Lr+Br*i+o*(Pr+Fr*i))-e)/(Lr+3*Br*i+o*(7*Pr+9*Fr*i)))*r)*i*i,!(d(n)<1e-12));++a);return[qr*t*(Lr+3*Br*i+o*(7*Pr+9*Fr*i))/y(r),S(w(r)/qr)]};var zr=function(){return dr(Ur).scale(177.158)};function Yr(t,e){var n=y(e),r=y(t)*n;return[n*w(t)/r,w(e)/r]}Yr.invert=wr(p);var Vr=function(){return dr(Yr).scale(144.049).clipAngle(60)};function Gr(t,e,n,r){return 1===t&&1===e&&0===n&&0===r?en:er({point:function(i,o){this.stream.point(i*t+n,o*e+r)}})}var Hr=function(){var t,e,n,r,i,o,a=1,u=0,s=0,c=1,f=1,l=en,h=null,d=en;function p(){return r=i=null,o}return o={stream:function(t){return r&&i===t?r:r=l(d(i=t))},postclip:function(r){return arguments.length?(d=r,h=t=e=n=null,p()):d},clipExtent:function(r){return arguments.length?(d=null==r?(h=t=e=n=null,en):ke(h=+r[0][0],t=+r[0][1],e=+r[1][0],n=+r[1][1]),p()):null==h?null:[[h,t],[e,n]]},scale:function(t){return arguments.length?(l=Gr((a=+t)*c,a*f,u,s),p()):a},translate:function(t){return arguments.length?(l=Gr(a*c,a*f,u=+t[0],s=+t[1]),p()):[u,s]},reflectX:function(t){return arguments.length?(l=Gr(a*(c=t?-1:1),a*f,u,s),p()):c<0},reflectY:function(t){return arguments.length?(l=Gr(a*c,a*(f=t?-1:1),u,s),p()):f<0},fitExtent:function(t,e){return ir(o,t,e)},fitSize:function(t,e){return or(o,t,e)},fitWidth:function(t,e){return ar(o,t,e)},fitHeight:function(t,e){return ur(o,t,e)}}};function Wr(t,e){var n=e*e,r=n*n;return[t*(.8707-.131979*n+r*(r*(.003971*n-.001529*r)-.013791)),e*(1.007226+n*(.015085+r*(.028874*n-.044475-.005916*r)))]}Wr.invert=function(t,e){var n,r=e,i=25;do{var o=r*r,a=o*o;r-=n=(r*(1.007226+o*(.015085+a*(.028874*o-.044475-.005916*a)))-e)/(1.007226+o*(.045255+a*(.259866*o-.311325-.005916*11*a)))}while(d(n)>1e-6&&--i>0);return[t/(.8707+(o=r*r)*(o*(o*o*o*(.003971-.001529*o)-.013791)-.131979)),r]};var $r=function(){return dr(Wr).scale(175.295)};function Kr(t,e){return[y(e)*w(t),w(e)]}Kr.invert=wr(S);var Zr=function(){return dr(Kr).scale(249.5).clipAngle(90+1e-6)};function Xr(t,e){var n=y(e),r=1+y(t)*n;return[n*w(t)/r,w(e)/r]}Xr.invert=wr((function(t){return 2*p(t)}));var Jr=function(){return dr(Xr).scale(250).clipAngle(142)};function Qr(t,e){return[m(E((s+e)/2)),-t]}Qr.invert=function(t,e){return[-e,2*p(v(t))-s]};var ti=function(){var t=Tr(Qr),e=t.center,n=t.rotate;return t.center=function(t){return arguments.length?e([-t[1],t[0]]):[(t=e())[1],-t[0]]},t.rotate=function(t){return arguments.length?n([t[0],t[1],t.length>2?t[2]+90:90]):[(t=n())[0],t[1],t[2]-90]},n([0,0,90]).scale(159.155)};n.d(e,"c",(function(){return W})),n.d(e,"h",(function(){return Ft})),n.d(e,"i",(function(){return Xt})),n.d(e,"j",(function(){return se})),n.d(e,"k",(function(){return we})),n.d(e,"l",(function(){return xe})),n.d(e,"m",(function(){return Me})),n.d(e,"n",(function(){return ke})),n.d(e,"u",(function(){return Ge})),n.d(e,"v",(function(){return Le})),n.d(e,"C",(function(){return $e})),n.d(e,"D",(function(){return Ke})),n.d(e,"F",(function(){return tn})),n.d(e,"G",(function(){return Ie})),n.d(e,"N",(function(){return Qn})),n.d(e,"a",(function(){return vr})),n.d(e,"b",(function(){return mr})),n.d(e,"d",(function(){return kr})),n.d(e,"e",(function(){return xr})),n.d(e,"f",(function(){return Ar})),n.d(e,"g",(function(){return Er})),n.d(e,"o",(function(){return Cr})),n.d(e,"p",(function(){return Dr})),n.d(e,"q",(function(){return br})),n.d(e,"r",(function(){return yr})),n.d(e,"s",(function(){return jr})),n.d(e,"t",(function(){return Rr})),n.d(e,"w",(function(){return zr})),n.d(e,"x",(function(){return Ur})),n.d(e,"y",(function(){return Ir})),n.d(e,"z",(function(){return Nr})),n.d(e,"A",(function(){return Vr})),n.d(e,"B",(function(){return Yr})),n.d(e,"E",(function(){return Hr})),n.d(e,"O",(function(){return dr})),n.d(e,"P",(function(){return pr})),n.d(e,"H",(function(){return Mr})),n.d(e,"I",(function(){return Sr})),n.d(e,"J",(function(){return $r})),n.d(e,"K",(function(){return Wr})),n.d(e,"L",(function(){return Zr})),n.d(e,"M",(function(){return Kr})),n.d(e,"R",(function(){return Jr})),n.d(e,"S",(function(){return Xr})),n.d(e,"V",(function(){return ti})),n.d(e,"W",(function(){return Qr})),n.d(e,"Q",(function(){return oe})),n.d(e,"T",(function(){return F})),n.d(e,"U",(function(){return tr}))},function(t,e,n){"use strict";var r=n(286),i=function(t){return function(){return t}},o=Math.abs,a=Math.atan2,u=Math.cos,s=Math.max,c=Math.min,f=Math.sin,l=Math.sqrt,h=Math.PI,d=h/2,p=2*h;function g(t){return t>1?0:t<-1?h:Math.acos(t)}function y(t){return t>=1?d:t<=-1?-d:Math.asin(t)}function b(t){return t.innerRadius}function v(t){return t.outerRadius}function m(t){return t.startAngle}function _(t){return t.endAngle}function w(t){return t&&t.padAngle}function x(t,e,n,r,i,o,a,u){var s=n-t,c=r-e,f=a-i,l=u-o,h=l*s-f*c;if(!(h*h<1e-12))return[t+(h=(f*(e-o)-l*(t-i))/h)*s,e+h*c]}function k(t,e,n,r,i,o,a){var u=t-n,c=e-r,f=(a?o:-o)/l(u*u+c*c),h=f*c,d=-f*u,p=t+h,g=e+d,y=n+h,b=r+d,v=(p+y)/2,m=(g+b)/2,_=y-p,w=b-g,x=_*_+w*w,k=i-o,E=p*b-y*g,A=(w<0?-1:1)*l(s(0,k*k*x-E*E)),S=(E*w-_*A)/x,M=(-E*_-w*A)/x,T=(E*w+_*A)/x,O=(-E*_+w*A)/x,D=S-v,C=M-m,N=T-v,I=O-m;return D*D+C*C>N*N+I*I&&(S=T,M=O),{cx:S,cy:M,x01:-h,y01:-d,x11:S*(i/k-1),y11:M*(i/k-1)}}var E=function(){var t=b,e=v,n=i(0),s=null,E=m,A=_,S=w,M=null;function T(){var i,b,v=+t.apply(this,arguments),m=+e.apply(this,arguments),_=E.apply(this,arguments)-d,w=A.apply(this,arguments)-d,T=o(w-_),O=w>_;if(M||(M=i=Object(r.a)()),m<v&&(b=m,m=v,v=b),m>1e-12)if(T>p-1e-12)M.moveTo(m*u(_),m*f(_)),M.arc(0,0,m,_,w,!O),v>1e-12&&(M.moveTo(v*u(w),v*f(w)),M.arc(0,0,v,w,_,O));else{var D,C,N=_,I=w,R=_,j=w,L=T,B=T,P=S.apply(this,arguments)/2,F=P>1e-12&&(s?+s.apply(this,arguments):l(v*v+m*m)),q=c(o(m-v)/2,+n.apply(this,arguments)),U=q,z=q;if(F>1e-12){var Y=y(F/v*f(P)),V=y(F/m*f(P));(L-=2*Y)>1e-12?(R+=Y*=O?1:-1,j-=Y):(L=0,R=j=(_+w)/2),(B-=2*V)>1e-12?(N+=V*=O?1:-1,I-=V):(B=0,N=I=(_+w)/2)}var G=m*u(N),H=m*f(N),W=v*u(j),$=v*f(j);if(q>1e-12){var K,Z=m*u(I),X=m*f(I),J=v*u(R),Q=v*f(R);if(T<h&&(K=x(G,H,J,Q,Z,X,W,$))){var tt=G-K[0],et=H-K[1],nt=Z-K[0],rt=X-K[1],it=1/f(g((tt*nt+et*rt)/(l(tt*tt+et*et)*l(nt*nt+rt*rt)))/2),ot=l(K[0]*K[0]+K[1]*K[1]);U=c(q,(v-ot)/(it-1)),z=c(q,(m-ot)/(it+1))}}B>1e-12?z>1e-12?(D=k(J,Q,G,H,m,z,O),C=k(Z,X,W,$,m,z,O),M.moveTo(D.cx+D.x01,D.cy+D.y01),z<q?M.arc(D.cx,D.cy,z,a(D.y01,D.x01),a(C.y01,C.x01),!O):(M.arc(D.cx,D.cy,z,a(D.y01,D.x01),a(D.y11,D.x11),!O),M.arc(0,0,m,a(D.cy+D.y11,D.cx+D.x11),a(C.cy+C.y11,C.cx+C.x11),!O),M.arc(C.cx,C.cy,z,a(C.y11,C.x11),a(C.y01,C.x01),!O))):(M.moveTo(G,H),M.arc(0,0,m,N,I,!O)):M.moveTo(G,H),v>1e-12&&L>1e-12?U>1e-12?(D=k(W,$,Z,X,v,-U,O),C=k(G,H,J,Q,v,-U,O),M.lineTo(D.cx+D.x01,D.cy+D.y01),U<q?M.arc(D.cx,D.cy,U,a(D.y01,D.x01),a(C.y01,C.x01),!O):(M.arc(D.cx,D.cy,U,a(D.y01,D.x01),a(D.y11,D.x11),!O),M.arc(0,0,v,a(D.cy+D.y11,D.cx+D.x11),a(C.cy+C.y11,C.cx+C.x11),O),M.arc(C.cx,C.cy,U,a(C.y11,C.x11),a(C.y01,C.x01),!O))):M.arc(0,0,v,j,R,O):M.lineTo(W,$)}else M.moveTo(0,0);if(M.closePath(),i)return M=null,i+""||null}return T.centroid=function(){var n=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,r=(+E.apply(this,arguments)+ +A.apply(this,arguments))/2-h/2;return[u(r)*n,f(r)*n]},T.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:i(+e),T):t},T.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:i(+t),T):e},T.cornerRadius=function(t){return arguments.length?(n="function"==typeof t?t:i(+t),T):n},T.padRadius=function(t){return arguments.length?(s=null==t?null:"function"==typeof t?t:i(+t),T):s},T.startAngle=function(t){return arguments.length?(E="function"==typeof t?t:i(+t),T):E},T.endAngle=function(t){return arguments.length?(A="function"==typeof t?t:i(+t),T):A},T.padAngle=function(t){return arguments.length?(S="function"==typeof t?t:i(+t),T):S},T.context=function(t){return arguments.length?(M=null==t?null:t,T):M},T};function A(t){this._context=t}A.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 S=function(t){return new A(t)};function M(t){return t[0]}function T(t){return t[1]}var O=function(){var t=M,e=T,n=i(!0),o=null,a=S,u=null;function s(i){var s,c,f,l=i.length,h=!1;for(null==o&&(u=a(f=Object(r.a)())),s=0;s<=l;++s)!(s<l&&n(c=i[s],s,i))===h&&((h=!h)?u.lineStart():u.lineEnd()),h&&u.point(+t(c,s,i),+e(c,s,i));if(f)return u=null,f+""||null}return s.x=function(e){return arguments.length?(t="function"==typeof e?e:i(+e),s):t},s.y=function(t){return arguments.length?(e="function"==typeof t?t:i(+t),s):e},s.defined=function(t){return arguments.length?(n="function"==typeof t?t:i(!!t),s):n},s.curve=function(t){return arguments.length?(a=t,null!=o&&(u=a(o)),s):a},s.context=function(t){return arguments.length?(null==t?o=u=null:u=a(o=t),s):o},s},D=function(){var t=M,e=null,n=i(0),o=T,a=i(!0),u=null,s=S,c=null;function f(i){var f,l,h,d,p,g=i.length,y=!1,b=new Array(g),v=new Array(g);for(null==u&&(c=s(p=Object(r.a)())),f=0;f<=g;++f){if(!(f<g&&a(d=i[f],f,i))===y)if(y=!y)l=f,c.areaStart(),c.lineStart();else{for(c.lineEnd(),c.lineStart(),h=f-1;h>=l;--h)c.point(b[h],v[h]);c.lineEnd(),c.areaEnd()}y&&(b[f]=+t(d,f,i),v[f]=+n(d,f,i),c.point(e?+e(d,f,i):b[f],o?+o(d,f,i):v[f]))}if(p)return c=null,p+""||null}function l(){return O().defined(a).curve(s).context(u)}return f.x=function(n){return arguments.length?(t="function"==typeof n?n:i(+n),e=null,f):t},f.x0=function(e){return arguments.length?(t="function"==typeof e?e:i(+e),f):t},f.x1=function(t){return arguments.length?(e=null==t?null:"function"==typeof t?t:i(+t),f):e},f.y=function(t){return arguments.length?(n="function"==typeof t?t:i(+t),o=null,f):n},f.y0=function(t){return arguments.length?(n="function"==typeof t?t:i(+t),f):n},f.y1=function(t){return arguments.length?(o=null==t?null:"function"==typeof t?t:i(+t),f):o},f.lineX0=f.lineY0=function(){return l().x(t).y(n)},f.lineY1=function(){return l().x(t).y(o)},f.lineX1=function(){return l().x(e).y(n)},f.defined=function(t){return arguments.length?(a="function"==typeof t?t:i(!!t),f):a},f.curve=function(t){return arguments.length?(s=t,null!=u&&(c=s(u)),f):s},f.context=function(t){return arguments.length?(null==t?u=c=null:c=s(u=t),f):u},f},C=function(t,e){return e<t?-1:e>t?1:e>=t?0:NaN},N=function(t){return t},I=function(){var t=N,e=C,n=null,r=i(0),o=i(p),a=i(0);function u(i){var u,s,c,f,l,h=i.length,d=0,g=new Array(h),y=new Array(h),b=+r.apply(this,arguments),v=Math.min(p,Math.max(-p,o.apply(this,arguments)-b)),m=Math.min(Math.abs(v)/h,a.apply(this,arguments)),_=m*(v<0?-1:1);for(u=0;u<h;++u)(l=y[g[u]=u]=+t(i[u],u,i))>0&&(d+=l);for(null!=e?g.sort((function(t,n){return e(y[t],y[n])})):null!=n&&g.sort((function(t,e){return n(i[t],i[e])})),u=0,c=d?(v-h*_)/d:0;u<h;++u,b=f)s=g[u],f=b+((l=y[s])>0?l*c:0)+_,y[s]={data:i[s],index:u,value:l,startAngle:b,endAngle:f,padAngle:m};return y}return u.value=function(e){return arguments.length?(t="function"==typeof e?e:i(+e),u):t},u.sortValues=function(t){return arguments.length?(e=t,n=null,u):e},u.sort=function(t){return arguments.length?(n=t,e=null,u):n},u.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:i(+t),u):r},u.endAngle=function(t){return arguments.length?(o="function"==typeof t?t:i(+t),u):o},u.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:i(+t),u):a},u},R=L(S);function j(t){this._curve=t}function L(t){function e(e){return new j(t(e))}return e._curve=t,e}function B(t){var e=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?e(L(t)):e()._curve},t}j.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,e){this._curve.point(e*Math.sin(t),e*-Math.cos(t))}};var P=function(){return B(O().curve(R))},F=function(){var t=D().curve(R),e=t.curve,n=t.lineX0,r=t.lineX1,i=t.lineY0,o=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return B(n())},delete t.lineX0,t.lineEndAngle=function(){return B(r())},delete t.lineX1,t.lineInnerRadius=function(){return B(i())},delete t.lineY0,t.lineOuterRadius=function(){return B(o())},delete t.lineY1,t.curve=function(t){return arguments.length?e(L(t)):e()._curve},t},q=function(t,e){return[(e=+e)*Math.cos(t-=Math.PI/2),e*Math.sin(t)]},U=Array.prototype.slice;function z(t){return t.source}function Y(t){return t.target}function V(t){var e=z,n=Y,o=M,a=T,u=null;function s(){var i,s=U.call(arguments),c=e.apply(this,s),f=n.apply(this,s);if(u||(u=i=Object(r.a)()),t(u,+o.apply(this,(s[0]=c,s)),+a.apply(this,s),+o.apply(this,(s[0]=f,s)),+a.apply(this,s)),i)return u=null,i+""||null}return s.source=function(t){return arguments.length?(e=t,s):e},s.target=function(t){return arguments.length?(n=t,s):n},s.x=function(t){return arguments.length?(o="function"==typeof t?t:i(+t),s):o},s.y=function(t){return arguments.length?(a="function"==typeof t?t:i(+t),s):a},s.context=function(t){return arguments.length?(u=null==t?null:t,s):u},s}function G(t,e,n,r,i){t.moveTo(e,n),t.bezierCurveTo(e=(e+r)/2,n,e,i,r,i)}function H(t,e,n,r,i){t.moveTo(e,n),t.bezierCurveTo(e,n=(n+i)/2,r,n,r,i)}function W(t,e,n,r,i){var o=q(e,n),a=q(e,n=(n+i)/2),u=q(r,n),s=q(r,i);t.moveTo(o[0],o[1]),t.bezierCurveTo(a[0],a[1],u[0],u[1],s[0],s[1])}function $(){return V(G)}function K(){return V(H)}function Z(){var t=V(W);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t}var X={draw:function(t,e){var n=Math.sqrt(e/h);t.moveTo(n,0),t.arc(0,0,n,0,p)}},J={draw:function(t,e){var n=Math.sqrt(e/5)/2;t.moveTo(-3*n,-n),t.lineTo(-n,-n),t.lineTo(-n,-3*n),t.lineTo(n,-3*n),t.lineTo(n,-n),t.lineTo(3*n,-n),t.lineTo(3*n,n),t.lineTo(n,n),t.lineTo(n,3*n),t.lineTo(-n,3*n),t.lineTo(-n,n),t.lineTo(-3*n,n),t.closePath()}},Q=Math.sqrt(1/3),tt=2*Q,et={draw:function(t,e){var n=Math.sqrt(e/tt),r=n*Q;t.moveTo(0,-n),t.lineTo(r,0),t.lineTo(0,n),t.lineTo(-r,0),t.closePath()}},nt=Math.sin(h/10)/Math.sin(7*h/10),rt=Math.sin(p/10)*nt,it=-Math.cos(p/10)*nt,ot={draw:function(t,e){var n=Math.sqrt(.8908130915292852*e),r=rt*n,i=it*n;t.moveTo(0,-n),t.lineTo(r,i);for(var o=1;o<5;++o){var a=p*o/5,u=Math.cos(a),s=Math.sin(a);t.lineTo(s*n,-u*n),t.lineTo(u*r-s*i,s*r+u*i)}t.closePath()}},at={draw:function(t,e){var n=Math.sqrt(e),r=-n/2;t.rect(r,r,n,n)}},ut=Math.sqrt(3),st={draw:function(t,e){var n=-Math.sqrt(e/(3*ut));t.moveTo(0,2*n),t.lineTo(-ut*n,-n),t.lineTo(ut*n,-n),t.closePath()}},ct=Math.sqrt(3)/2,ft=1/Math.sqrt(12),lt=3*(ft/2+1),ht={draw:function(t,e){var n=Math.sqrt(e/lt),r=n/2,i=n*ft,o=r,a=n*ft+n,u=-o,s=a;t.moveTo(r,i),t.lineTo(o,a),t.lineTo(u,s),t.lineTo(-.5*r-ct*i,ct*r+-.5*i),t.lineTo(-.5*o-ct*a,ct*o+-.5*a),t.lineTo(-.5*u-ct*s,ct*u+-.5*s),t.lineTo(-.5*r+ct*i,-.5*i-ct*r),t.lineTo(-.5*o+ct*a,-.5*a-ct*o),t.lineTo(-.5*u+ct*s,-.5*s-ct*u),t.closePath()}},dt=[X,J,et,at,ot,st,ht],pt=function(){var t=i(X),e=i(64),n=null;function o(){var i;if(n||(n=i=Object(r.a)()),t.apply(this,arguments).draw(n,+e.apply(this,arguments)),i)return n=null,i+""||null}return o.type=function(e){return arguments.length?(t="function"==typeof e?e:i(e),o):t},o.size=function(t){return arguments.length?(e="function"==typeof t?t:i(+t),o):e},o.context=function(t){return arguments.length?(n=null==t?null:t,o):n},o},gt=function(){};function yt(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 bt(t){this._context=t}bt.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:yt(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:yt(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};var vt=function(t){return new bt(t)};function mt(t){this._context=t}mt.prototype={areaStart:gt,areaEnd:gt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:yt(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};var _t=function(t){return new mt(t)};function wt(t){this._context=t}wt.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(){(this._line||0!==this._line&&3===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;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:yt(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};var xt=function(t){return new wt(t)};function kt(t,e){this._basis=new bt(t),this._beta=e}kt.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,n=t.length-1;if(n>0)for(var r,i=t[0],o=e[0],a=t[n]-i,u=e[n]-o,s=-1;++s<=n;)r=s/n,this._basis.point(this._beta*t[s]+(1-this._beta)*(i+r*a),this._beta*e[s]+(1-this._beta)*(o+r*u));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};var Et=function t(e){function n(t){return 1===e?new bt(t):new kt(t,e)}return n.beta=function(e){return t(+e)},n}(.85);function At(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 St(t,e){this._context=t,this._k=(1-e)/6}St.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:At(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:At(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 Mt=function t(e){function n(t){return new St(t,e)}return n.tension=function(e){return t(+e)},n}(0);function Tt(t,e){this._context=t,this._k=(1-e)/6}Tt.prototype={areaStart:gt,areaEnd:gt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:At(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 Ot=function t(e){function n(t){return new Tt(t,e)}return n.tension=function(e){return t(+e)},n}(0);function Dt(t,e){this._context=t,this._k=(1-e)/6}Dt.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(){(this._line||0!==this._line&&3===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;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:At(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 Ct=function t(e){function n(t){return new Dt(t,e)}return n.tension=function(e){return t(+e)},n}(0);function Nt(t,e,n){var r=t._x1,i=t._y1,o=t._x2,a=t._y2;if(t._l01_a>1e-12){var u=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,s=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*u-t._x0*t._l12_2a+t._x2*t._l01_2a)/s,i=(i*u-t._y0*t._l12_2a+t._y2*t._l01_2a)/s}if(t._l23_a>1e-12){var c=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,f=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*c+t._x1*t._l23_2a-e*t._l12_2a)/f,a=(a*c+t._y1*t._l23_2a-n*t._l12_2a)/f}t._context.bezierCurveTo(r,i,o,a,t._x2,t._y2)}function It(t,e){this._context=t,this._alpha=e}It.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:Nt(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 Rt=function t(e){function n(t){return e?new It(t,e):new St(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function jt(t,e){this._context=t,this._alpha=e}jt.prototype={areaStart:gt,areaEnd:gt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=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 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},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._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Nt(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 Lt=function t(e){function n(t){return e?new jt(t,e):new Tt(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function Bt(t,e){this._context=t,this._alpha=e}Bt.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(){(this._line||0!==this._line&&3===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;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Nt(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 Pt=function t(e){function n(t){return e?new Bt(t,e):new Dt(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function Ft(t){this._context=t}Ft.prototype={areaStart:gt,areaEnd:gt,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}};var qt=function(t){return new Ft(t)};function Ut(t){return t<0?-1:1}function zt(t,e,n){var r=t._x1-t._x0,i=e-t._x1,o=(t._y1-t._y0)/(r||i<0&&-0),a=(n-t._y1)/(i||r<0&&-0),u=(o*i+a*r)/(r+i);return(Ut(o)+Ut(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(u))||0}function Yt(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function Vt(t,e,n){var r=t._x0,i=t._y0,o=t._x1,a=t._y1,u=(o-r)/3;t._context.bezierCurveTo(r+u,i+u*e,o-u,a-u*n,o,a)}function Gt(t){this._context=t}function Ht(t){this._context=new Wt(t)}function Wt(t){this._context=t}function $t(t){return new Gt(t)}function Kt(t){return new Ht(t)}function Zt(t){this._context=t}function Xt(t){var e,n,r=t.length-1,i=new Array(r),o=new Array(r),a=new Array(r);for(i[0]=0,o[0]=2,a[0]=t[0]+2*t[1],e=1;e<r-1;++e)i[e]=1,o[e]=4,a[e]=4*t[e]+2*t[e+1];for(i[r-1]=2,o[r-1]=7,a[r-1]=8*t[r-1]+t[r],e=1;e<r;++e)n=i[e]/o[e-1],o[e]-=n,a[e]-=n*a[e-1];for(i[r-1]=a[r-1]/o[r-1],e=r-2;e>=0;--e)i[e]=(a[e]-i[e+1])/o[e];for(o[r-1]=(t[r]+i[r-1])/2,e=0;e<r-1;++e)o[e]=2*t[e+1]-i[e+1];return[i,o]}Gt.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:Vt(this,this._t0,Yt(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,Vt(this,Yt(this,n=zt(this,t,e)),n);break;default:Vt(this,this._t0,n=zt(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(Ht.prototype=Object.create(Gt.prototype)).point=function(t,e){Gt.prototype.point.call(this,e,t)},Wt.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,o){this._context.bezierCurveTo(e,t,r,n,o,i)}},Zt.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=Xt(t),i=Xt(e),o=0,a=1;a<n;++o,++a)this._context.bezierCurveTo(r[0][o],i[0][o],r[1][o],i[1][o],t[a],e[a]);(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)}};var Jt=function(t){return new Zt(t)};function Qt(t,e){this._context=t,this._t=e}Qt.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 te=function(t){return new Qt(t,.5)};function ee(t){return new Qt(t,0)}function ne(t){return new Qt(t,1)}var re=function(t,e){if((i=t.length)>1)for(var n,r,i,o=1,a=t[e[0]],u=a.length;o<i;++o)for(r=a,a=t[e[o]],n=0;n<u;++n)a[n][1]+=a[n][0]=isNaN(r[n][1])?r[n][0]:r[n][1]},ie=function(t){for(var e=t.length,n=new Array(e);--e>=0;)n[e]=e;return n};function oe(t,e){return t[e]}var ae=function(){var t=i([]),e=ie,n=re,r=oe;function o(i){var o,a,u=t.apply(this,arguments),s=i.length,c=u.length,f=new Array(c);for(o=0;o<c;++o){for(var l,h=u[o],d=f[o]=new Array(s),p=0;p<s;++p)d[p]=l=[0,+r(i[p],h,p,i)],l.data=i[p];d.key=h}for(o=0,a=e(f);o<c;++o)f[a[o]].index=o;return n(f,a),f}return o.keys=function(e){return arguments.length?(t="function"==typeof e?e:i(U.call(e)),o):t},o.value=function(t){return arguments.length?(r="function"==typeof t?t:i(+t),o):r},o.order=function(t){return arguments.length?(e=null==t?ie:"function"==typeof t?t:i(U.call(t)),o):e},o.offset=function(t){return arguments.length?(n=null==t?re:t,o):n},o},ue=function(t,e){if((r=t.length)>0){for(var n,r,i,o=0,a=t[0].length;o<a;++o){for(i=n=0;n<r;++n)i+=t[n][o][1]||0;if(i)for(n=0;n<r;++n)t[n][o][1]/=i}re(t,e)}},se=function(t,e){if((u=t.length)>0)for(var n,r,i,o,a,u,s=0,c=t[e[0]].length;s<c;++s)for(o=a=0,n=0;n<u;++n)(i=(r=t[e[n]][s])[1]-r[0])>0?(r[0]=o,r[1]=o+=i):i<0?(r[1]=a,r[0]=a+=i):(r[0]=0,r[1]=i)},ce=function(t,e){if((n=t.length)>0){for(var n,r=0,i=t[e[0]],o=i.length;r<o;++r){for(var a=0,u=0;a<n;++a)u+=t[a][r][1]||0;i[r][1]+=i[r][0]=-u/2}re(t,e)}},fe=function(t,e){if((i=t.length)>0&&(r=(n=t[e[0]]).length)>0){for(var n,r,i,o=0,a=1;a<r;++a){for(var u=0,s=0,c=0;u<i;++u){for(var f=t[e[u]],l=f[a][1]||0,h=(l-(f[a-1][1]||0))/2,d=0;d<u;++d){var p=t[e[d]];h+=(p[a][1]||0)-(p[a-1][1]||0)}s+=l,c+=h*l}n[a-1][1]+=n[a-1][0]=o,s&&(o-=c/s)}n[a-1][1]+=n[a-1][0]=o,re(t,e)}},le=function(t){var e=t.map(he);return ie(t).sort((function(t,n){return e[t]-e[n]}))};function he(t){for(var e,n=-1,r=0,i=t.length,o=-1/0;++n<i;)(e=+t[n][1])>o&&(o=e,r=n);return r}var de=function(t){var e=t.map(pe);return ie(t).sort((function(t,n){return e[t]-e[n]}))};function pe(t){for(var e,n=0,r=-1,i=t.length;++r<i;)(e=+t[r][1])&&(n+=e);return n}var ge=function(t){return de(t).reverse()},ye=function(t){var e,n,r=t.length,i=t.map(pe),o=le(t),a=0,u=0,s=[],c=[];for(e=0;e<r;++e)n=o[e],a<u?(a+=i[n],s.push(n)):(u+=i[n],c.push(n));return c.reverse().concat(s)},be=function(t){return ie(t).reverse()};n.d(e,"a",(function(){return E})),n.d(e,"b",(function(){return D})),n.d(e,"v",(function(){return O})),n.d(e,"A",(function(){return I})),n.d(e,"c",(function(){return F})),n.d(e,"C",(function(){return F})),n.d(e,"w",(function(){return P})),n.d(e,"D",(function(){return P})),n.d(e,"B",(function(){return q})),n.d(e,"x",(function(){return $})),n.d(e,"z",(function(){return K})),n.d(e,"y",(function(){return Z})),n.d(e,"Q",(function(){return pt})),n.d(e,"Y",(function(){return dt})),n.d(e,"R",(function(){return X})),n.d(e,"S",(function(){return J})),n.d(e,"T",(function(){return et})),n.d(e,"U",(function(){return at})),n.d(e,"V",(function(){return ot})),n.d(e,"W",(function(){return st})),n.d(e,"X",(function(){return ht})),n.d(e,"e",(function(){return _t})),n.d(e,"f",(function(){return xt})),n.d(e,"d",(function(){return vt})),n.d(e,"g",(function(){return Et})),n.d(e,"i",(function(){return Ot})),n.d(e,"j",(function(){return Ct})),n.d(e,"h",(function(){return Mt})),n.d(e,"l",(function(){return Lt})),n.d(e,"m",(function(){return Pt})),n.d(e,"k",(function(){return Rt})),n.d(e,"o",(function(){return qt})),n.d(e,"n",(function(){return S})),n.d(e,"p",(function(){return $t})),n.d(e,"q",(function(){return Kt})),n.d(e,"r",(function(){return Jt})),n.d(e,"s",(function(){return te})),n.d(e,"t",(function(){return ne})),n.d(e,"u",(function(){return ee})),n.d(e,"E",(function(){return ae})),n.d(e,"G",(function(){return ue})),n.d(e,"F",(function(){return se})),n.d(e,"H",(function(){return re})),n.d(e,"I",(function(){return ce})),n.d(e,"J",(function(){return fe})),n.d(e,"K",(function(){return le})),n.d(e,"L",(function(){return de})),n.d(e,"M",(function(){return ge})),n.d(e,"N",(function(){return ye})),n.d(e,"O",(function(){return ie})),n.d(e,"P",(function(){return be}))},function(t,e,n){"use strict";var r=function(t){for(var e=t.length/6|0,n=new Array(e),r=0;r<e;)n[r]="#"+t.slice(6*r,6*++r);return n},i=r("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),o=r("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),a=r("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),u=r("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),s=r("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),c=r("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),f=r("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),l=r("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),h=r("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),d=r("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab"),p=n(82),g=function(t){return Object(p.b)(t[t.length-1])},y=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(r),b=g(y),v=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(r),m=g(v),_=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(r),w=g(_),x=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(r),k=g(x),E=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(r),A=g(E),S=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(r),M=g(S),T=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(r),O=g(T),D=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(r),C=g(D),N=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(r),I=g(N),R=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(r),j=g(R),L=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(r),B=g(L),P=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(r),F=g(P),q=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(r),U=g(q),z=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(r),Y=g(z),V=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(r),G=g(V),H=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(r),W=g(H),$=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(r),K=g($),Z=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(r),X=g(Z),J=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(r),Q=g(J),tt=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(r),et=g(tt),nt=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(r),rt=g(nt),it=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(r),ot=g(it),at=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(r),ut=g(at),st=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(r),ct=g(st),ft=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(r),lt=g(ft),ht=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(r),dt=g(ht),pt=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(r),gt=g(pt),yt=function(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-t*(35.34-t*(2381.73-t*(6402.7-t*(7024.72-2710.57*t)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+t*(170.73+t*(52.82-t*(131.46-t*(176.58-67.37*t)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+t*(442.36-t*(2482.43-t*(6167.24-t*(6614.94-2475.67*t)))))))+")"},bt=n(211),vt=n(217),mt=Object(vt.a)(Object(bt.a)(300,.5,0),Object(bt.a)(-240,.5,1)),_t=Object(vt.a)(Object(bt.a)(-100,.75,.35),Object(bt.a)(80,1.5,.8)),wt=Object(vt.a)(Object(bt.a)(260,.75,.35),Object(bt.a)(80,1.5,.8)),xt=Object(bt.a)(),kt=function(t){(t<0||t>1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return xt.h=360*t-100,xt.s=1.5-1.5*e,xt.l=.8-.9*e,xt+""},Et=n(11),At=Object(Et.g)(),St=Math.PI/3,Mt=2*Math.PI/3,Tt=function(t){var e;return t=(.5-t)*Math.PI,At.r=255*(e=Math.sin(t))*e,At.g=255*(e=Math.sin(t+St))*e,At.b=255*(e=Math.sin(t+Mt))*e,At+""},Ot=function(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+t*(1172.33-t*(10793.56-t*(33300.12-t*(38394.49-14825.05*t)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+t*(557.33+t*(1225.33-t*(3574.96-t*(1073.77+707.56*t)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+t*(3211.1-t*(15327.97-t*(27814-t*(22569.18-6838.66*t)))))))+")"};function Dt(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}var Ct=Dt(r("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),Nt=Dt(r("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),It=Dt(r("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),Rt=Dt(r("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));n.d(e,"R",(function(){return i})),n.d(e,"M",(function(){return o})),n.d(e,"S",(function(){return a})),n.d(e,"Z",(function(){return u})),n.d(e,"ab",(function(){return s})),n.d(e,"bb",(function(){return c})),n.d(e,"ob",(function(){return f})),n.d(e,"pb",(function(){return l})),n.d(e,"qb",(function(){return h})),n.d(e,"sb",(function(){return d})),n.d(e,"b",(function(){return b})),n.d(e,"O",(function(){return y})),n.d(e,"o",(function(){return m})),n.d(e,"Y",(function(){return v})),n.d(e,"p",(function(){return w})),n.d(e,"cb",(function(){return _})),n.d(e,"t",(function(){return k})),n.d(e,"fb",(function(){return x})),n.d(e,"x",(function(){return A})),n.d(e,"ib",(function(){return E})),n.d(e,"y",(function(){return M})),n.d(e,"jb",(function(){return S})),n.d(e,"A",(function(){return O})),n.d(e,"lb",(function(){return T})),n.d(e,"B",(function(){return C})),n.d(e,"mb",(function(){return D})),n.d(e,"E",(function(){return I})),n.d(e,"rb",(function(){return N})),n.d(e,"c",(function(){return j})),n.d(e,"P",(function(){return R})),n.d(e,"d",(function(){return B})),n.d(e,"Q",(function(){return L})),n.d(e,"h",(function(){return F})),n.d(e,"T",(function(){return P})),n.d(e,"m",(function(){return U})),n.d(e,"W",(function(){return q})),n.d(e,"s",(function(){return Y})),n.d(e,"eb",(function(){return z})),n.d(e,"r",(function(){return G})),n.d(e,"db",(function(){return V})),n.d(e,"u",(function(){return W})),n.d(e,"gb",(function(){return H})),n.d(e,"z",(function(){return K})),n.d(e,"kb",(function(){return $})),n.d(e,"J",(function(){return X})),n.d(e,"ub",(function(){return Z})),n.d(e,"I",(function(){return Q})),n.d(e,"tb",(function(){return J})),n.d(e,"K",(function(){return et})),n.d(e,"vb",(function(){return tt})),n.d(e,"L",(function(){return rt})),n.d(e,"wb",(function(){return nt})),n.d(e,"a",(function(){return ot})),n.d(e,"N",(function(){return it})),n.d(e,"i",(function(){return ut})),n.d(e,"U",(function(){return at})),n.d(e,"j",(function(){return ct})),n.d(e,"V",(function(){return st})),n.d(e,"v",(function(){return lt})),n.d(e,"hb",(function(){return ft})),n.d(e,"C",(function(){return dt})),n.d(e,"nb",(function(){return ht})),n.d(e,"n",(function(){return gt})),n.d(e,"X",(function(){return pt})),n.d(e,"e",(function(){return yt})),n.d(e,"g",(function(){return mt})),n.d(e,"w",(function(){return kt})),n.d(e,"H",(function(){return _t})),n.d(e,"f",(function(){return wt})),n.d(e,"D",(function(){return Tt})),n.d(e,"F",(function(){return Ot})),n.d(e,"G",(function(){return Ct})),n.d(e,"l",(function(){return Nt})),n.d(e,"k",(function(){return It})),n.d(e,"q",(function(){return Rt}))},function(t,e,n){"use strict";function r(t,e){return t.parent===e.parent?1:2}function i(t,e){return t+e.x}function o(t,e){return Math.max(t,e.y)}var a=function(){var t=r,e=1,n=1,a=!1;function u(r){var u,s=0;r.eachAfter((function(e){var n=e.children;n?(e.x=function(t){return t.reduce(i,0)/t.length}(n),e.y=function(t){return 1+t.reduce(o,0)}(n)):(e.x=u?s+=t(e,u):0,e.y=0,u=e)}));var c=function(t){for(var e;e=t.children;)t=e[0];return t}(r),f=function(t){for(var e;e=t.children;)t=e[e.length-1];return t}(r),l=c.x-t(c,f)/2,h=f.x+t(f,c)/2;return r.eachAfter(a?function(t){t.x=(t.x-r.x)*e,t.y=(r.y-t.y)*n}:function(t){t.x=(t.x-l)/(h-l)*e,t.y=(1-(r.y?t.y/r.y:1))*n})}return u.separation=function(e){return arguments.length?(t=e,u):t},u.size=function(t){return arguments.length?(a=!1,e=+t[0],n=+t[1],u):a?null:[e,n]},u.nodeSize=function(t){return arguments.length?(a=!0,e=+t[0],n=+t[1],u):a?[e,n]:null},u};function u(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 s(t,e){var n,r,i,o,a,u=new h(t),s=+t.value&&(u.value=t.value),f=[u];for(null==e&&(e=c);n=f.pop();)if(s&&(n.value=+n.data.value),(i=e(n.data))&&(a=i.length))for(n.children=new Array(a),o=a-1;o>=0;--o)f.push(r=n.children[o]=new h(i[o])),r.parent=n,r.depth=n.depth+1;return u.eachBefore(l)}function c(t){return t.children}function f(t){t.data=t.data.data}function l(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function h(t){this.data=t,this.depth=this.height=0,this.parent=null}h.prototype=s.prototype={constructor:h,count:function(){return this.eachAfter(u)},each:function(t){var e,n,r,i,o=this,a=[o];do{for(e=a.reverse(),a=[];o=e.pop();)if(t(o),n=o.children)for(r=0,i=n.length;r<i;++r)a.push(n[r])}while(a.length);return this},eachAfter:function(t){for(var e,n,r,i=this,o=[i],a=[];i=o.pop();)if(a.push(i),e=i.children)for(n=0,r=e.length;n<r;++n)o.push(e[n]);for(;i=a.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;t=n.pop(),e=r.pop();for(;t===e;)i=t,t=n.pop(),e=r.pop();return i}(e,t),r=[e];e!==n;)e=e.parent,r.push(e);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 s(this).eachBefore(f)}};var d=Array.prototype.slice;var p=function(t){for(var e,n,r=0,i=(t=function(t){for(var e,n,r=t.length;r;)n=Math.random()*r--|0,e=t[r],t[r]=t[n],t[n]=e;return t}(d.call(t))).length,o=[];r<i;)e=t[r],n&&b(n,e)?++r:(n=m(o=g(o,e)),r=0);return n};function g(t,e){var n,r;if(v(e,t))return[e];for(n=0;n<t.length;++n)if(y(e,t[n])&&v(_(t[n],e),t))return[t[n],e];for(n=0;n<t.length-1;++n)for(r=n+1;r<t.length;++r)if(y(_(t[n],t[r]),e)&&y(_(t[n],e),t[r])&&y(_(t[r],e),t[n])&&v(w(t[n],t[r],e),t))return[t[n],t[r],e];throw new Error}function y(t,e){var n=t.r-e.r,r=e.x-t.x,i=e.y-t.y;return n<0||n*n<r*r+i*i}function b(t,e){var n=t.r-e.r+1e-6,r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function v(t,e){for(var n=0;n<e.length;++n)if(!b(t,e[n]))return!1;return!0}function m(t){switch(t.length){case 1:return{x:(e=t[0]).x,y:e.y,r:e.r};case 2:return _(t[0],t[1]);case 3:return w(t[0],t[1],t[2])}var e}function _(t,e){var n=t.x,r=t.y,i=t.r,o=e.x,a=e.y,u=e.r,s=o-n,c=a-r,f=u-i,l=Math.sqrt(s*s+c*c);return{x:(n+o+s/l*f)/2,y:(r+a+c/l*f)/2,r:(l+i+u)/2}}function w(t,e,n){var r=t.x,i=t.y,o=t.r,a=e.x,u=e.y,s=e.r,c=n.x,f=n.y,l=n.r,h=r-a,d=r-c,p=i-u,g=i-f,y=s-o,b=l-o,v=r*r+i*i-o*o,m=v-a*a-u*u+s*s,_=v-c*c-f*f+l*l,w=d*p-h*g,x=(p*_-g*m)/(2*w)-r,k=(g*y-p*b)/w,E=(d*m-h*_)/(2*w)-i,A=(h*b-d*y)/w,S=k*k+A*A-1,M=2*(o+x*k+E*A),T=x*x+E*E-o*o,O=-(S?(M+Math.sqrt(M*M-4*S*T))/(2*S):T/M);return{x:r+x+k*O,y:i+E+A*O,r:O}}function x(t,e,n){var r,i,o,a,u=t.x-e.x,s=t.y-e.y,c=u*u+s*s;c?(i=e.r+n.r,i*=i,a=t.r+n.r,i>(a*=a)?(r=(c+a-i)/(2*c),o=Math.sqrt(Math.max(0,a/c-r*r)),n.x=t.x-r*u-o*s,n.y=t.y-r*s+o*u):(r=(c+i-a)/(2*c),o=Math.sqrt(Math.max(0,i/c-r*r)),n.x=e.x+r*u-o*s,n.y=e.y+r*s+o*u)):(n.x=e.x+n.r,n.y=e.y)}function k(t,e){var n=t.r+e.r-1e-6,r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function E(t){var e=t._,n=t.next._,r=e.r+n.r,i=(e.x*n.r+n.x*e.r)/r,o=(e.y*n.r+n.y*e.r)/r;return i*i+o*o}function A(t){this._=t,this.next=null,this.previous=null}function S(t){if(!(i=t.length))return 0;var e,n,r,i,o,a,u,s,c,f,l;if((e=t[0]).x=0,e.y=0,!(i>1))return e.r;if(n=t[1],e.x=-n.r,n.x=e.r,n.y=0,!(i>2))return e.r+n.r;x(n,e,r=t[2]),e=new A(e),n=new A(n),r=new A(r),e.next=r.previous=n,n.next=e.previous=r,r.next=n.previous=e;t:for(u=3;u<i;++u){x(e._,n._,r=t[u]),r=new A(r),s=n.next,c=e.previous,f=n._.r,l=e._.r;do{if(f<=l){if(k(s._,r._)){n=s,e.next=n,n.previous=e,--u;continue t}f+=s._.r,s=s.next}else{if(k(c._,r._)){(e=c).next=n,n.previous=e,--u;continue t}l+=c._.r,c=c.previous}}while(s!==c.next);for(r.previous=e,r.next=n,e.next=n.previous=n=r,o=E(e);(r=r.next)!==n;)(a=E(r))<o&&(e=r,o=a);n=e.next}for(e=[n._],r=n;(r=r.next)!==n;)e.push(r._);for(r=p(e),u=0;u<i;++u)(e=t[u]).x-=r.x,e.y-=r.y;return r.r}var M=function(t){return S(t),t};function T(t){return null==t?null:O(t)}function O(t){if("function"!=typeof t)throw new Error;return t}function D(){return 0}var C=function(t){return function(){return t}};function N(t){return Math.sqrt(t.value)}var I=function(){var t=null,e=1,n=1,r=D;function i(i){return i.x=e/2,i.y=n/2,t?i.eachBefore(R(t)).eachAfter(j(r,.5)).eachBefore(L(1)):i.eachBefore(R(N)).eachAfter(j(D,1)).eachAfter(j(r,i.r/Math.min(e,n))).eachBefore(L(Math.min(e,n)/(2*i.r))),i}return i.radius=function(e){return arguments.length?(t=T(e),i):t},i.size=function(t){return arguments.length?(e=+t[0],n=+t[1],i):[e,n]},i.padding=function(t){return arguments.length?(r="function"==typeof t?t:C(+t),i):r},i};function R(t){return function(e){e.children||(e.r=Math.max(0,+t(e)||0))}}function j(t,e){return function(n){if(r=n.children){var r,i,o,a=r.length,u=t(n)*e||0;if(u)for(i=0;i<a;++i)r[i].r+=u;if(o=S(r),u)for(i=0;i<a;++i)r[i].r-=u;n.r=o+u}}}function L(t){return function(e){var n=e.parent;e.r*=t,n&&(e.x=n.x+t*e.x,e.y=n.y+t*e.y)}}var B=function(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)},P=function(t,e,n,r,i){for(var o,a=t.children,u=-1,s=a.length,c=t.value&&(r-e)/t.value;++u<s;)(o=a[u]).y0=n,o.y1=i,o.x0=e,o.x1=e+=o.value*c},F=function(){var t=1,e=1,n=0,r=!1;function i(i){var o=i.height+1;return i.x0=i.y0=n,i.x1=t,i.y1=e/o,i.eachBefore(function(t,e){return function(r){r.children&&P(r,r.x0,t*(r.depth+1)/e,r.x1,t*(r.depth+2)/e);var i=r.x0,o=r.y0,a=r.x1-n,u=r.y1-n;a<i&&(i=a=(i+a)/2),u<o&&(o=u=(o+u)/2),r.x0=i,r.y0=o,r.x1=a,r.y1=u}}(e,o)),r&&i.eachBefore(B),i}return i.round=function(t){return arguments.length?(r=!!t,i):r},i.size=function(n){return arguments.length?(t=+n[0],e=+n[1],i):[t,e]},i.padding=function(t){return arguments.length?(n=+t,i):n},i},q={depth:-1},U={};function z(t){return t.id}function Y(t){return t.parentId}var V=function(){var t=z,e=Y;function n(n){var r,i,o,a,u,s,c,f=n.length,d=new Array(f),p={};for(i=0;i<f;++i)r=n[i],u=d[i]=new h(r),null!=(s=t(r,i,n))&&(s+="")&&(p[c="$"+(u.id=s)]=c in p?U:u);for(i=0;i<f;++i)if(u=d[i],null!=(s=e(n[i],i,n))&&(s+="")){if(!(a=p["$"+s]))throw new Error("missing: "+s);if(a===U)throw new Error("ambiguous: "+s);a.children?a.children.push(u):a.children=[u],u.parent=a}else{if(o)throw new Error("multiple roots");o=u}if(!o)throw new Error("no root");if(o.parent=q,o.eachBefore((function(t){t.depth=t.parent.depth+1,--f})).eachBefore(l),o.parent=null,f>0)throw new Error("cycle");return o}return n.id=function(e){return arguments.length?(t=O(e),n):t},n.parentId=function(t){return arguments.length?(e=O(t),n):e},n};function G(t,e){return t.parent===e.parent?1:2}function H(t){var e=t.children;return e?e[0]:t.t}function W(t){var e=t.children;return e?e[e.length-1]:t.t}function $(t,e,n){var r=n/(e.i-t.i);e.c-=r,e.s+=n,t.c+=r,e.z+=n,e.m+=n}function K(t,e,n){return t.a.parent===e.parent?t.a:n}function Z(t,e){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=e}Z.prototype=Object.create(h.prototype);var X=function(){var t=G,e=1,n=1,r=null;function i(i){var s=function(t){for(var e,n,r,i,o,a=new Z(t,0),u=[a];e=u.pop();)if(r=e._.children)for(e.children=new Array(o=r.length),i=o-1;i>=0;--i)u.push(n=e.children[i]=new Z(r[i],i)),n.parent=e;return(a.parent=new Z(null,0)).children=[a],a}(i);if(s.eachAfter(o),s.parent.m=-s.z,s.eachBefore(a),r)i.eachBefore(u);else{var c=i,f=i,l=i;i.eachBefore((function(t){t.x<c.x&&(c=t),t.x>f.x&&(f=t),t.depth>l.depth&&(l=t)}));var h=c===f?1:t(c,f)/2,d=h-c.x,p=e/(f.x+h+d),g=n/(l.depth||1);i.eachBefore((function(t){t.x=(t.x+d)*p,t.y=t.depth*g}))}return i}function o(e){var n=e.children,r=e.parent.children,i=e.i?r[e.i-1]:null;if(n){!function(t){for(var e,n=0,r=0,i=t.children,o=i.length;--o>=0;)(e=i[o]).z+=n,e.m+=n,n+=e.s+(r+=e.c)}(e);var o=(n[0].z+n[n.length-1].z)/2;i?(e.z=i.z+t(e._,i._),e.m=e.z-o):e.z=o}else i&&(e.z=i.z+t(e._,i._));e.parent.A=function(e,n,r){if(n){for(var i,o=e,a=e,u=n,s=o.parent.children[0],c=o.m,f=a.m,l=u.m,h=s.m;u=W(u),o=H(o),u&&o;)s=H(s),(a=W(a)).a=e,(i=u.z+l-o.z-c+t(u._,o._))>0&&($(K(u,e,r),e,i),c+=i,f+=i),l+=u.m,c+=o.m,h+=s.m,f+=a.m;u&&!W(a)&&(a.t=u,a.m+=l-f),o&&!H(s)&&(s.t=o,s.m+=c-h,r=e)}return r}(e,i,e.parent.A||r[0])}function a(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function u(t){t.x*=e,t.y=t.depth*n}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(t){return arguments.length?(r=!1,e=+t[0],n=+t[1],i):r?null:[e,n]},i.nodeSize=function(t){return arguments.length?(r=!0,e=+t[0],n=+t[1],i):r?[e,n]:null},i},J=function(t,e,n,r,i){for(var o,a=t.children,u=-1,s=a.length,c=t.value&&(i-n)/t.value;++u<s;)(o=a[u]).x0=e,o.x1=r,o.y0=n,o.y1=n+=o.value*c},Q=(1+Math.sqrt(5))/2;function tt(t,e,n,r,i,o){for(var a,u,s,c,f,l,h,d,p,g,y,b=[],v=e.children,m=0,_=0,w=v.length,x=e.value;m<w;){s=i-n,c=o-r;do{f=v[_++].value}while(!f&&_<w);for(l=h=f,y=f*f*(g=Math.max(c/s,s/c)/(x*t)),p=Math.max(h/y,y/l);_<w;++_){if(f+=u=v[_].value,u<l&&(l=u),u>h&&(h=u),y=f*f*g,(d=Math.max(h/y,y/l))>p){f-=u;break}p=d}b.push(a={value:f,dice:s<c,children:v.slice(m,_)}),a.dice?P(a,n,r,i,x?r+=c*f/x:o):J(a,n,r,x?n+=s*f/x:i,o),x-=f,m=_}return b}var et=function t(e){function n(t,n,r,i,o){tt(e,t,n,r,i,o)}return n.ratio=function(e){return t((e=+e)>1?e:1)},n}(Q),nt=function(){var t=et,e=!1,n=1,r=1,i=[0],o=D,a=D,u=D,s=D,c=D;function f(t){return t.x0=t.y0=0,t.x1=n,t.y1=r,t.eachBefore(l),i=[0],e&&t.eachBefore(B),t}function l(e){var n=i[e.depth],r=e.x0+n,f=e.y0+n,l=e.x1-n,h=e.y1-n;l<r&&(r=l=(r+l)/2),h<f&&(f=h=(f+h)/2),e.x0=r,e.y0=f,e.x1=l,e.y1=h,e.children&&(n=i[e.depth+1]=o(e)/2,r+=c(e)-n,f+=a(e)-n,(l-=u(e)-n)<r&&(r=l=(r+l)/2),(h-=s(e)-n)<f&&(f=h=(f+h)/2),t(e,r,f,l,h))}return f.round=function(t){return arguments.length?(e=!!t,f):e},f.size=function(t){return arguments.length?(n=+t[0],r=+t[1],f):[n,r]},f.tile=function(e){return arguments.length?(t=O(e),f):t},f.padding=function(t){return arguments.length?f.paddingInner(t).paddingOuter(t):f.paddingInner()},f.paddingInner=function(t){return arguments.length?(o="function"==typeof t?t:C(+t),f):o},f.paddingOuter=function(t){return arguments.length?f.paddingTop(t).paddingRight(t).paddingBottom(t).paddingLeft(t):f.paddingTop()},f.paddingTop=function(t){return arguments.length?(a="function"==typeof t?t:C(+t),f):a},f.paddingRight=function(t){return arguments.length?(u="function"==typeof t?t:C(+t),f):u},f.paddingBottom=function(t){return arguments.length?(s="function"==typeof t?t:C(+t),f):s},f.paddingLeft=function(t){return arguments.length?(c="function"==typeof t?t:C(+t),f):c},f},rt=function(t,e,n,r,i){var o,a,u=t.children,s=u.length,c=new Array(s+1);for(c[0]=a=o=0;o<s;++o)c[o+1]=a+=u[o].value;!function t(e,n,r,i,o,a,s){if(e>=n-1){var f=u[e];return f.x0=i,f.y0=o,f.x1=a,void(f.y1=s)}var l=c[e],h=r/2+l,d=e+1,p=n-1;for(;d<p;){var g=d+p>>>1;c[g]<h?d=g+1:p=g}h-c[d-1]<c[d]-h&&e+1<d&&--d;var y=c[d]-l,b=r-y;if(a-i>s-o){var v=(i*b+a*y)/r;t(e,d,y,i,o,v,s),t(d,n,b,v,o,a,s)}else{var m=(o*b+s*y)/r;t(e,d,y,i,o,a,m),t(d,n,b,i,m,a,s)}}(0,s,t.value,e,n,r,i)},it=function(t,e,n,r,i){(1&t.depth?J:P)(t,e,n,r,i)},ot=function t(e){function n(t,n,r,i,o){if((a=t._squarify)&&a.ratio===e)for(var a,u,s,c,f,l=-1,h=a.length,d=t.value;++l<h;){for(s=(u=a[l]).children,c=u.value=0,f=s.length;c<f;++c)u.value+=s[c].value;u.dice?P(u,n,r,i,r+=(o-r)*u.value/d):J(u,n,r,n+=(i-n)*u.value/d,o),d-=u.value}else t._squarify=a=tt(e,t,n,r,i,o),a.ratio=e}return n.ratio=function(e){return t((e=+e)>1?e:1)},n}(Q);n.d(e,"a",(function(){return a})),n.d(e,"b",(function(){return s})),n.d(e,"c",(function(){return I})),n.d(e,"e",(function(){return M})),n.d(e,"d",(function(){return p})),n.d(e,"f",(function(){return F})),n.d(e,"g",(function(){return V})),n.d(e,"h",(function(){return X})),n.d(e,"i",(function(){return nt})),n.d(e,"j",(function(){return rt})),n.d(e,"k",(function(){return P})),n.d(e,"m",(function(){return J})),n.d(e,"n",(function(){return it})),n.d(e,"o",(function(){return et})),n.d(e,"l",(function(){return ot}))},function(t,e,n){"use strict";var r=n(0);function i(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}function o(t,e){switch(arguments.length){case 0:break;case 1:this.interpolator(t);break;default:this.interpolator(e).domain(t)}return this}var a=n(39),u=Array.prototype,s=u.map,c=u.slice,f={name:"implicit"};function l(){var t=Object(a.c)(),e=[],n=[],r=f;function o(i){var o=i+"",a=t.get(o);if(!a){if(r!==f)return r;t.set(o,a=e.push(i))}return n[(a-1)%n.length]}return o.domain=function(n){if(!arguments.length)return e.slice();e=[],t=Object(a.c)();for(var r,i,u=-1,s=n.length;++u<s;)t.has(i=(r=n[u])+"")||t.set(i,e.push(r));return o},o.range=function(t){return arguments.length?(n=c.call(t),o):n.slice()},o.unknown=function(t){return arguments.length?(r=t,o):r},o.copy=function(){return l(e,n).unknown(r)},i.apply(o,arguments),o}function h(){var t,e,n=l().unknown(void 0),o=n.domain,a=n.range,u=[0,1],s=!1,c=0,f=0,d=.5;function p(){var n=o().length,i=u[1]<u[0],l=u[i-0],h=u[1-i];t=(h-l)/Math.max(1,n-c+2*f),s&&(t=Math.floor(t)),l+=(h-l-t*(n-c))*d,e=t*(1-c),s&&(l=Math.round(l),e=Math.round(e));var p=Object(r.s)(n).map((function(e){return l+t*e}));return a(i?p.reverse():p)}return delete n.unknown,n.domain=function(t){return arguments.length?(o(t),p()):o()},n.range=function(t){return arguments.length?(u=[+t[0],+t[1]],p()):u.slice()},n.rangeRound=function(t){return u=[+t[0],+t[1]],s=!0,p()},n.bandwidth=function(){return e},n.step=function(){return t},n.round=function(t){return arguments.length?(s=!!t,p()):s},n.padding=function(t){return arguments.length?(c=Math.min(1,f=+t),p()):c},n.paddingInner=function(t){return arguments.length?(c=Math.min(1,t),p()):c},n.paddingOuter=function(t){return arguments.length?(f=+t,p()):f},n.align=function(t){return arguments.length?(d=Math.max(0,Math.min(1,t)),p()):d},n.copy=function(){return h(o(),u).round(s).paddingInner(c).paddingOuter(f).align(d)},i.apply(p(),arguments)}function d(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return d(e())},t}function p(){return d(h.apply(null,arguments).paddingInner(1))}var g=n(108),y=n(23),b=n(290),v=function(t){return+t},m=[0,1];function _(t){return t}function w(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:(n=isNaN(e)?NaN:.5,function(){return n});var n}function x(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 k(t,e,n){var r=t[0],i=t[1],o=e[0],a=e[1];return i<r?(r=w(i,r),o=n(a,o)):(r=w(r,i),o=n(o,a)),function(t){return o(r(t))}}function E(t,e,n){var i=Math.min(t.length,e.length)-1,o=new Array(i),a=new Array(i),u=-1;for(t[i]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++u<i;)o[u]=w(t[u],t[u+1]),a[u]=n(e[u],e[u+1]);return function(e){var n=Object(r.b)(t,e,1,i)-1;return a[n](o[n](e))}}function A(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function S(){var t,e,n,r,i,o,a=m,u=m,f=g.a,l=_;function h(){return r=Math.min(a.length,u.length)>2?E:k,i=o=null,d}function d(e){return isNaN(e=+e)?n:(i||(i=r(a.map(t),u,f)))(t(l(e)))}return d.invert=function(n){return l(e((o||(o=r(u,a.map(t),y.a)))(n)))},d.domain=function(t){return arguments.length?(a=s.call(t,v),l===_||(l=x(a)),h()):a.slice()},d.range=function(t){return arguments.length?(u=c.call(t),h()):u.slice()},d.rangeRound=function(t){return u=c.call(t),f=b.a,h()},d.clamp=function(t){return arguments.length?(l=t?x(a):_,d):l!==_},d.interpolate=function(t){return arguments.length?(f=t,h()):f},d.unknown=function(t){return arguments.length?(n=t,d):n},function(n,r){return t=n,e=r,h()}}function M(t,e){return S()(t,e)}var T=n(111),O=n(288),D=n(145),C=n(289),N=n(287),I=function(t,e,n,i){var o,a=Object(r.A)(t,e,n);switch((i=Object(T.b)(null==i?",f":i)).type){case"s":var u=Math.max(Math.abs(t),Math.abs(e));return null!=i.precision||isNaN(o=Object(O.a)(a,u))||(i.precision=o),Object(D.c)(i,u);case"":case"e":case"g":case"p":case"r":null!=i.precision||isNaN(o=Object(C.a)(a,Math.max(Math.abs(t),Math.abs(e))))||(i.precision=o-("e"===i.type));break;case"f":case"%":null!=i.precision||isNaN(o=Object(N.a)(a))||(i.precision=o-2*("%"===i.type))}return Object(D.b)(i)};function R(t){var e=t.domain;return t.ticks=function(t){var n=e();return Object(r.B)(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var r=e();return I(r[0],r[r.length-1],null==t?10:t,n)},t.nice=function(n){null==n&&(n=10);var i,o=e(),a=0,u=o.length-1,s=o[a],c=o[u];return c<s&&(i=s,s=c,c=i,i=a,a=u,u=i),(i=Object(r.z)(s,c,n))>0?(s=Math.floor(s/i)*i,c=Math.ceil(c/i)*i,i=Object(r.z)(s,c,n)):i<0&&(s=Math.ceil(s*i)/i,c=Math.floor(c*i)/i,i=Object(r.z)(s,c,n)),i>0?(o[a]=Math.floor(s/i)*i,o[u]=Math.ceil(c/i)*i,e(o)):i<0&&(o[a]=Math.ceil(s*i)/i,o[u]=Math.floor(c*i)/i,e(o)),t},t}function j(){var t=M(_,_);return t.copy=function(){return A(t,j())},i.apply(t,arguments),R(t)}function L(t){var e;function n(t){return isNaN(t=+t)?e:t}return n.invert=n,n.domain=n.range=function(e){return arguments.length?(t=s.call(e,v),n):t.slice()},n.unknown=function(t){return arguments.length?(e=t,n):e},n.copy=function(){return L(t).unknown(e)},t=arguments.length?s.call(t,v):[0,1],R(n)}var B=function(t,e){var n,r=0,i=(t=t.slice()).length-1,o=t[r],a=t[i];return a<o&&(n=r,r=i,i=n,n=o,o=a,a=n),t[r]=e.floor(o),t[i]=e.ceil(a),t};function P(t){return Math.log(t)}function F(t){return Math.exp(t)}function q(t){return-Math.log(-t)}function U(t){return-Math.exp(-t)}function z(t){return isFinite(t)?+("1e"+t):t<0?0:t}function Y(t){return function(e){return-t(-e)}}function V(t){var e,n,i=t(P,F),o=i.domain,a=10;function u(){return e=function(t){return t===Math.E?Math.log:10===t&&Math.log10||2===t&&Math.log2||(t=Math.log(t),function(e){return Math.log(e)/t})}(a),n=function(t){return 10===t?z:t===Math.E?Math.exp:function(e){return Math.pow(t,e)}}(a),o()[0]<0?(e=Y(e),n=Y(n),t(q,U)):t(P,F),i}return i.base=function(t){return arguments.length?(a=+t,u()):a},i.domain=function(t){return arguments.length?(o(t),u()):o()},i.ticks=function(t){var i,u=o(),s=u[0],c=u[u.length-1];(i=c<s)&&(d=s,s=c,c=d);var f,l,h,d=e(s),p=e(c),g=null==t?10:+t,y=[];if(!(a%1)&&p-d<g){if(d=Math.round(d)-1,p=Math.round(p)+1,s>0){for(;d<p;++d)for(l=1,f=n(d);l<a;++l)if(!((h=f*l)<s)){if(h>c)break;y.push(h)}}else for(;d<p;++d)for(l=a-1,f=n(d);l>=1;--l)if(!((h=f*l)<s)){if(h>c)break;y.push(h)}}else y=Object(r.B)(d,p,Math.min(p-d,g)).map(n);return i?y.reverse():y},i.tickFormat=function(t,r){if(null==r&&(r=10===a?".0e":","),"function"!=typeof r&&(r=Object(D.b)(r)),t===1/0)return r;null==t&&(t=10);var o=Math.max(1,a*t/i.ticks().length);return function(t){var i=t/n(Math.round(e(t)));return i*a<a-.5&&(i*=a),i<=o?r(t):""}},i.nice=function(){return o(B(o(),{floor:function(t){return n(Math.floor(e(t)))},ceil:function(t){return n(Math.ceil(e(t)))}}))},i}function G(){var t=V(S()).domain([1,10]);return t.copy=function(){return A(t,G()).base(t.base())},i.apply(t,arguments),t}function H(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function W(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function $(t){var e=1,n=t(H(e),W(e));return n.constant=function(n){return arguments.length?t(H(e=+n),W(e)):e},R(n)}function K(){var t=$(S());return t.copy=function(){return A(t,K()).constant(t.constant())},i.apply(t,arguments)}function Z(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function X(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function J(t){return t<0?-t*t:t*t}function Q(t){var e=t(_,_),n=1;function r(){return 1===n?t(_,_):.5===n?t(X,J):t(Z(n),Z(1/n))}return e.exponent=function(t){return arguments.length?(n=+t,r()):n},R(e)}function tt(){var t=Q(S());return t.copy=function(){return A(t,tt()).exponent(t.exponent())},i.apply(t,arguments),t}function et(){return tt.apply(null,arguments).exponent(.5)}function nt(){var t,e=[],n=[],o=[];function a(){var t=0,i=Math.max(1,n.length);for(o=new Array(i-1);++t<i;)o[t-1]=Object(r.r)(e,t/i);return u}function u(e){return isNaN(e=+e)?t:n[Object(r.b)(o,e)]}return u.invertExtent=function(t){var r=n.indexOf(t);return r<0?[NaN,NaN]:[r>0?o[r-1]:e[0],r<o.length?o[r]:e[e.length-1]]},u.domain=function(t){if(!arguments.length)return e.slice();e=[];for(var n,i=0,o=t.length;i<o;++i)null==(n=t[i])||isNaN(n=+n)||e.push(n);return e.sort(r.a),a()},u.range=function(t){return arguments.length?(n=c.call(t),a()):n.slice()},u.unknown=function(e){return arguments.length?(t=e,u):t},u.quantiles=function(){return o.slice()},u.copy=function(){return nt().domain(e).range(n).unknown(t)},i.apply(u,arguments)}function rt(){var t,e=0,n=1,o=1,a=[.5],u=[0,1];function s(e){return e<=e?u[Object(r.b)(a,e,0,o)]:t}function f(){var t=-1;for(a=new Array(o);++t<o;)a[t]=((t+1)*n-(t-o)*e)/(o+1);return s}return s.domain=function(t){return arguments.length?(e=+t[0],n=+t[1],f()):[e,n]},s.range=function(t){return arguments.length?(o=(u=c.call(t)).length-1,f()):u.slice()},s.invertExtent=function(t){var r=u.indexOf(t);return r<0?[NaN,NaN]:r<1?[e,a[0]]:r>=o?[a[o-1],n]:[a[r-1],a[r]]},s.unknown=function(e){return arguments.length?(t=e,s):s},s.thresholds=function(){return a.slice()},s.copy=function(){return rt().domain([e,n]).range(u).unknown(t)},i.apply(R(s),arguments)}function it(){var t,e=[.5],n=[0,1],o=1;function a(i){return i<=i?n[Object(r.b)(e,i,0,o)]:t}return a.domain=function(t){return arguments.length?(e=c.call(t),o=Math.min(e.length,n.length-1),a):e.slice()},a.range=function(t){return arguments.length?(n=c.call(t),o=Math.min(e.length,n.length-1),a):n.slice()},a.invertExtent=function(t){var r=n.indexOf(t);return[e[r-1],e[r]]},a.unknown=function(e){return arguments.length?(t=e,a):t},a.copy=function(){return it().domain(e).range(n).unknown(t)},i.apply(a,arguments)}var ot=n(70),at=n(218),ut=n(9),st=n(141),ct=n(219),ft=n(220),lt=n(122),ht=n(123),dt=n(46);function pt(t){return new Date(t)}function gt(t){return t instanceof Date?+t:+new Date(+t)}function yt(t,e,n,i,o,a,u,c,f){var l=M(_,_),h=l.invert,d=l.domain,p=f(".%L"),g=f(":%S"),y=f("%I:%M"),b=f("%I %p"),v=f("%a %d"),m=f("%b %d"),w=f("%B"),x=f("%Y"),k=[[u,1,1e3],[u,5,5e3],[u,15,15e3],[u,30,3e4],[a,1,6e4],[a,5,3e5],[a,15,9e5],[a,30,18e5],[o,1,36e5],[o,3,108e5],[o,6,216e5],[o,12,432e5],[i,1,864e5],[i,2,1728e5],[n,1,6048e5],[e,1,2592e6],[e,3,7776e6],[t,1,31536e6]];function E(r){return(u(r)<r?p:a(r)<r?g:o(r)<r?y:i(r)<r?b:e(r)<r?n(r)<r?v:m:t(r)<r?w:x)(r)}function S(e,n,i,o){if(null==e&&(e=10),"number"==typeof e){var a=Math.abs(i-n)/e,u=Object(r.e)((function(t){return t[2]})).right(k,a);u===k.length?(o=Object(r.A)(n/31536e6,i/31536e6,e),e=t):u?(o=(u=k[a/k[u-1][2]<k[u][2]/a?u-1:u])[1],e=u[0]):(o=Math.max(Object(r.A)(n,i,e),1),e=c)}return null==o?e:e.every(o)}return l.invert=function(t){return new Date(h(t))},l.domain=function(t){return arguments.length?d(s.call(t,gt)):d().map(pt)},l.ticks=function(t,e){var n,r=d(),i=r[0],o=r[r.length-1],a=o<i;return a&&(n=i,i=o,o=n),n=(n=S(t,i,o,e))?n.range(i,o+1):[],a?n.reverse():n},l.tickFormat=function(t,e){return null==e?E:f(e)},l.nice=function(t,e){var n=d();return(t=S(t,n[0],n[n.length-1],e))?d(B(n,t)):l},l.copy=function(){return A(l,yt(t,e,n,i,o,a,u,c,f))},l}var bt=function(){return i.apply(yt(ot.a,at.a,ut.g,st.b,ct.a,ft.a,lt.a,ht.a,dt.b).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)},vt=n(71),mt=n(221),_t=n(10),wt=n(142),xt=n(222),kt=n(223),Et=function(){return i.apply(yt(vt.a,mt.a,_t.g,wt.a,xt.a,kt.a,lt.a,ht.a,dt.d).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)};function At(){var t,e,n,r,i,o=0,a=1,u=_,s=!1;function c(e){return isNaN(e=+e)?i:u(0===n?.5:(e=(r(e)-t)*n,s?Math.max(0,Math.min(1,e)):e))}return c.domain=function(i){return arguments.length?(t=r(o=+i[0]),e=r(a=+i[1]),n=t===e?0:1/(e-t),c):[o,a]},c.clamp=function(t){return arguments.length?(s=!!t,c):s},c.interpolator=function(t){return arguments.length?(u=t,c):u},c.unknown=function(t){return arguments.length?(i=t,c):i},function(i){return r=i,t=i(o),e=i(a),n=t===e?0:1/(e-t),c}}function St(t,e){return e.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}function Mt(){var t=R(At()(_));return t.copy=function(){return St(t,Mt())},o.apply(t,arguments)}function Tt(){var t=V(At()).domain([1,10]);return t.copy=function(){return St(t,Tt()).base(t.base())},o.apply(t,arguments)}function Ot(){var t=$(At());return t.copy=function(){return St(t,Ot()).constant(t.constant())},o.apply(t,arguments)}function Dt(){var t=Q(At());return t.copy=function(){return St(t,Dt()).exponent(t.exponent())},o.apply(t,arguments)}function Ct(){return Dt.apply(null,arguments).exponent(.5)}function Nt(){var t=[],e=_;function n(n){if(!isNaN(n=+n))return e((Object(r.b)(t,n)-1)/(t.length-1))}return n.domain=function(e){if(!arguments.length)return t.slice();t=[];for(var i,o=0,a=e.length;o<a;++o)null==(i=e[o])||isNaN(i=+i)||t.push(i);return t.sort(r.a),n},n.interpolator=function(t){return arguments.length?(e=t,n):e},n.copy=function(){return Nt(e).domain(t)},o.apply(n,arguments)}function It(){var t,e,n,r,i,o,a,u=0,s=.5,c=1,f=_,l=!1;function h(t){return isNaN(t=+t)?a:(t=.5+((t=+o(t))-e)*(t<e?r:i),f(l?Math.max(0,Math.min(1,t)):t))}return h.domain=function(a){return arguments.length?(t=o(u=+a[0]),e=o(s=+a[1]),n=o(c=+a[2]),r=t===e?0:.5/(e-t),i=e===n?0:.5/(n-e),h):[u,s,c]},h.clamp=function(t){return arguments.length?(l=!!t,h):l},h.interpolator=function(t){return arguments.length?(f=t,h):f},h.unknown=function(t){return arguments.length?(a=t,h):a},function(a){return o=a,t=a(u),e=a(s),n=a(c),r=t===e?0:.5/(e-t),i=e===n?0:.5/(n-e),h}}function Rt(){var t=R(It()(_));return t.copy=function(){return St(t,Rt())},o.apply(t,arguments)}function jt(){var t=V(It()).domain([.1,1,10]);return t.copy=function(){return St(t,jt()).base(t.base())},o.apply(t,arguments)}function Lt(){var t=$(It());return t.copy=function(){return St(t,Lt()).constant(t.constant())},o.apply(t,arguments)}function Bt(){var t=Q(It());return t.copy=function(){return St(t,Bt()).exponent(t.exponent())},o.apply(t,arguments)}function Pt(){return Bt.apply(null,arguments).exponent(.5)}n.d(e,"a",(function(){return h})),n.d(e,"l",(function(){return p})),n.d(e,"g",(function(){return L})),n.d(e,"i",(function(){return j})),n.d(e,"j",(function(){return G})),n.d(e,"w",(function(){return K})),n.d(e,"k",(function(){return l})),n.d(e,"h",(function(){return f})),n.d(e,"m",(function(){return tt})),n.d(e,"v",(function(){return et})),n.d(e,"n",(function(){return nt})),n.d(e,"o",(function(){return rt})),n.d(e,"x",(function(){return it})),n.d(e,"y",(function(){return bt})),n.d(e,"z",(function(){return Et})),n.d(e,"p",(function(){return Mt})),n.d(e,"q",(function(){return Tt})),n.d(e,"r",(function(){return Dt})),n.d(e,"t",(function(){return Ct})),n.d(e,"u",(function(){return Ot})),n.d(e,"s",(function(){return Nt})),n.d(e,"b",(function(){return Rt})),n.d(e,"c",(function(){return jt})),n.d(e,"d",(function(){return Bt})),n.d(e,"e",(function(){return Pt})),n.d(e,"f",(function(){return Lt})),n.d(e,"A",(function(){return I}))},function(t,e,n){"use strict";var r=function(t,e){var n;function r(){var r,i,o=n.length,a=0,u=0;for(r=0;r<o;++r)a+=(i=n[r]).x,u+=i.y;for(a=a/o-t,u=u/o-e,r=0;r<o;++r)(i=n[r]).x-=a,i.y-=u}return null==t&&(t=0),null==e&&(e=0),r.initialize=function(t){n=t},r.x=function(e){return arguments.length?(t=+e,r):t},r.y=function(t){return arguments.length?(e=+t,r):e},r},i=function(t){return function(){return t}},o=function(){return 1e-6*(Math.random()-.5)},a=n(445);function u(t){return t.x+t.vx}function s(t){return t.y+t.vy}var c=function(t){var e,n,r=1,c=1;function f(){for(var t,i,f,h,d,p,g,y=e.length,b=0;b<c;++b)for(i=Object(a.a)(e,u,s).visitAfter(l),t=0;t<y;++t)f=e[t],p=n[f.index],g=p*p,h=f.x+f.vx,d=f.y+f.vy,i.visit(v);function v(t,e,n,i,a){var u=t.data,s=t.r,c=p+s;if(!u)return e>h+c||i<h-c||n>d+c||a<d-c;if(u.index>f.index){var l=h-u.x-u.vx,y=d-u.y-u.vy,b=l*l+y*y;b<c*c&&(0===l&&(b+=(l=o())*l),0===y&&(b+=(y=o())*y),b=(c-(b=Math.sqrt(b)))/b*r,f.vx+=(l*=b)*(c=(s*=s)/(g+s)),f.vy+=(y*=b)*c,u.vx-=l*(c=1-c),u.vy-=y*c)}}}function l(t){if(t.data)return t.r=n[t.data.index];for(var e=t.r=0;e<4;++e)t[e]&&t[e].r>t.r&&(t.r=t[e].r)}function h(){if(e){var r,i,o=e.length;for(n=new Array(o),r=0;r<o;++r)i=e[r],n[i.index]=+t(i,r,e)}}return"function"!=typeof t&&(t=i(null==t?1:+t)),f.initialize=function(t){e=t,h()},f.iterations=function(t){return arguments.length?(c=+t,f):c},f.strength=function(t){return arguments.length?(r=+t,f):r},f.radius=function(e){return arguments.length?(t="function"==typeof e?e:i(+e),h(),f):t},f},f=n(39);function l(t){return t.index}function h(t,e){var n=t.get(e);if(!n)throw new Error("missing: "+e);return n}var d=function(t){var e,n,r,a,u,s=l,c=function(t){return 1/Math.min(a[t.source.index],a[t.target.index])},d=i(30),p=1;function g(r){for(var i=0,a=t.length;i<p;++i)for(var s,c,f,l,h,d,g,y=0;y<a;++y)c=(s=t[y]).source,l=(f=s.target).x+f.vx-c.x-c.vx||o(),h=f.y+f.vy-c.y-c.vy||o(),l*=d=((d=Math.sqrt(l*l+h*h))-n[y])/d*r*e[y],h*=d,f.vx-=l*(g=u[y]),f.vy-=h*g,c.vx+=l*(g=1-g),c.vy+=h*g}function y(){if(r){var i,o,c=r.length,l=t.length,d=Object(f.c)(r,s);for(i=0,a=new Array(c);i<l;++i)(o=t[i]).index=i,"object"!=typeof o.source&&(o.source=h(d,o.source)),"object"!=typeof o.target&&(o.target=h(d,o.target)),a[o.source.index]=(a[o.source.index]||0)+1,a[o.target.index]=(a[o.target.index]||0)+1;for(i=0,u=new Array(l);i<l;++i)o=t[i],u[i]=a[o.source.index]/(a[o.source.index]+a[o.target.index]);e=new Array(l),b(),n=new Array(l),v()}}function b(){if(r)for(var n=0,i=t.length;n<i;++n)e[n]=+c(t[n],n,t)}function v(){if(r)for(var e=0,i=t.length;e<i;++e)n[e]=+d(t[e],e,t)}return null==t&&(t=[]),g.initialize=function(t){r=t,y()},g.links=function(e){return arguments.length?(t=e,y(),g):t},g.id=function(t){return arguments.length?(s=t,g):s},g.iterations=function(t){return arguments.length?(p=+t,g):p},g.strength=function(t){return arguments.length?(c="function"==typeof t?t:i(+t),b(),g):c},g.distance=function(t){return arguments.length?(d="function"==typeof t?t:i(+t),v(),g):d},g},p=n(282),g=n(58);function y(t){return t.x}function b(t){return t.y}var v=Math.PI*(3-Math.sqrt(5)),m=function(t){var e,n=1,r=.001,i=1-Math.pow(r,1/300),o=0,a=.6,u=Object(f.c)(),s=Object(g.c)(l),c=Object(p.a)("tick","end");function l(){h(),c.call("tick",e),n<r&&(s.stop(),c.call("end",e))}function h(r){var s,c,f=t.length;void 0===r&&(r=1);for(var l=0;l<r;++l)for(n+=(o-n)*i,u.each((function(t){t(n)})),s=0;s<f;++s)null==(c=t[s]).fx?c.x+=c.vx*=a:(c.x=c.fx,c.vx=0),null==c.fy?c.y+=c.vy*=a:(c.y=c.fy,c.vy=0);return e}function d(){for(var e,n=0,r=t.length;n<r;++n){if((e=t[n]).index=n,null!=e.fx&&(e.x=e.fx),null!=e.fy&&(e.y=e.fy),isNaN(e.x)||isNaN(e.y)){var i=10*Math.sqrt(n),o=n*v;e.x=i*Math.cos(o),e.y=i*Math.sin(o)}(isNaN(e.vx)||isNaN(e.vy))&&(e.vx=e.vy=0)}}function y(e){return e.initialize&&e.initialize(t),e}return null==t&&(t=[]),d(),e={tick:h,restart:function(){return s.restart(l),e},stop:function(){return s.stop(),e},nodes:function(n){return arguments.length?(t=n,d(),u.each(y),e):t},alpha:function(t){return arguments.length?(n=+t,e):n},alphaMin:function(t){return arguments.length?(r=+t,e):r},alphaDecay:function(t){return arguments.length?(i=+t,e):+i},alphaTarget:function(t){return arguments.length?(o=+t,e):o},velocityDecay:function(t){return arguments.length?(a=1-t,e):1-a},force:function(t,n){return arguments.length>1?(null==n?u.remove(t):u.set(t,y(n)),e):u.get(t)},find:function(e,n,r){var i,o,a,u,s,c=0,f=t.length;for(null==r?r=1/0:r*=r,c=0;c<f;++c)(a=(i=e-(u=t[c]).x)*i+(o=n-u.y)*o)<r&&(s=u,r=a);return s},on:function(t,n){return arguments.length>1?(c.on(t,n),e):c.on(t)}}},_=function(){var t,e,n,r,u=i(-30),s=1,c=1/0,f=.81;function l(r){var i,o=t.length,u=Object(a.a)(t,y,b).visitAfter(d);for(n=r,i=0;i<o;++i)e=t[i],u.visit(p)}function h(){if(t){var e,n,i=t.length;for(r=new Array(i),e=0;e<i;++e)n=t[e],r[n.index]=+u(n,e,t)}}function d(t){var e,n,i,o,a,u=0,s=0;if(t.length){for(i=o=a=0;a<4;++a)(e=t[a])&&(n=Math.abs(e.value))&&(u+=e.value,s+=n,i+=n*e.x,o+=n*e.y);t.x=i/s,t.y=o/s}else{(e=t).x=e.data.x,e.y=e.data.y;do{u+=r[e.data.index]}while(e=e.next)}t.value=u}function p(t,i,a,u){if(!t.value)return!0;var l=t.x-e.x,h=t.y-e.y,d=u-i,p=l*l+h*h;if(d*d/f<p)return p<c&&(0===l&&(p+=(l=o())*l),0===h&&(p+=(h=o())*h),p<s&&(p=Math.sqrt(s*p)),e.vx+=l*t.value*n/p,e.vy+=h*t.value*n/p),!0;if(!(t.length||p>=c)){(t.data!==e||t.next)&&(0===l&&(p+=(l=o())*l),0===h&&(p+=(h=o())*h),p<s&&(p=Math.sqrt(s*p)));do{t.data!==e&&(d=r[t.data.index]*n/p,e.vx+=l*d,e.vy+=h*d)}while(t=t.next)}}return l.initialize=function(e){t=e,h()},l.strength=function(t){return arguments.length?(u="function"==typeof t?t:i(+t),h(),l):u},l.distanceMin=function(t){return arguments.length?(s=t*t,l):Math.sqrt(s)},l.distanceMax=function(t){return arguments.length?(c=t*t,l):Math.sqrt(c)},l.theta=function(t){return arguments.length?(f=t*t,l):Math.sqrt(f)},l},w=function(t,e,n){var r,o,a,u=i(.1);function s(t){for(var i=0,u=r.length;i<u;++i){var s=r[i],c=s.x-e||1e-6,f=s.y-n||1e-6,l=Math.sqrt(c*c+f*f),h=(a[i]-l)*o[i]*t/l;s.vx+=c*h,s.vy+=f*h}}function c(){if(r){var e,n=r.length;for(o=new Array(n),a=new Array(n),e=0;e<n;++e)a[e]=+t(r[e],e,r),o[e]=isNaN(a[e])?0:+u(r[e],e,r)}}return"function"!=typeof t&&(t=i(+t)),null==e&&(e=0),null==n&&(n=0),s.initialize=function(t){r=t,c()},s.strength=function(t){return arguments.length?(u="function"==typeof t?t:i(+t),c(),s):u},s.radius=function(e){return arguments.length?(t="function"==typeof e?e:i(+e),c(),s):t},s.x=function(t){return arguments.length?(e=+t,s):e},s.y=function(t){return arguments.length?(n=+t,s):n},s},x=function(t){var e,n,r,o=i(.1);function a(t){for(var i,o=0,a=e.length;o<a;++o)(i=e[o]).vx+=(r[o]-i.x)*n[o]*t}function u(){if(e){var i,a=e.length;for(n=new Array(a),r=new Array(a),i=0;i<a;++i)n[i]=isNaN(r[i]=+t(e[i],i,e))?0:+o(e[i],i,e)}}return"function"!=typeof t&&(t=i(null==t?0:+t)),a.initialize=function(t){e=t,u()},a.strength=function(t){return arguments.length?(o="function"==typeof t?t:i(+t),u(),a):o},a.x=function(e){return arguments.length?(t="function"==typeof e?e:i(+e),u(),a):t},a},k=function(t){var e,n,r,o=i(.1);function a(t){for(var i,o=0,a=e.length;o<a;++o)(i=e[o]).vy+=(r[o]-i.y)*n[o]*t}function u(){if(e){var i,a=e.length;for(n=new Array(a),r=new Array(a),i=0;i<a;++i)n[i]=isNaN(r[i]=+t(e[i],i,e))?0:+o(e[i],i,e)}}return"function"!=typeof t&&(t=i(null==t?0:+t)),a.initialize=function(t){e=t,u()},a.strength=function(t){return arguments.length?(o="function"==typeof t?t:i(+t),u(),a):o},a.y=function(e){return arguments.length?(t="function"==typeof e?e:i(+e),u(),a):t},a};n.d(e,"a",(function(){return r})),n.d(e,"b",(function(){return c})),n.d(e,"c",(function(){return d})),n.d(e,"d",(function(){return _})),n.d(e,"e",(function(){return w})),n.d(e,"f",(function(){return m})),n.d(e,"g",(function(){return x})),n.d(e,"h",(function(){return k}))},function(t,e,n){"use strict";var r=n(0),i=Array.prototype.slice,o=function(t,e){return t-e},a=function(t){return function(){return t}},u=function(t,e){for(var n,r=-1,i=e.length;++r<i;)if(n=s(t,e[r]))return n;return 0};function s(t,e){for(var n=e[0],r=e[1],i=-1,o=0,a=t.length,u=a-1;o<a;u=o++){var s=t[o],f=s[0],l=s[1],h=t[u],d=h[0],p=h[1];if(c(s,h,e))return 0;l>r!=p>r&&n<(d-f)*(r-l)/(p-l)+f&&(i=-i)}return i}function c(t,e,n){var r,i,o,a;return function(t,e,n){return(e[0]-t[0])*(n[1]-t[1])==(n[0]-t[0])*(e[1]-t[1])}(t,e,n)&&(i=t[r=+(t[0]===e[0])],o=n[r],a=e[r],i<=o&&o<=a||a<=o&&o<=i)}var f=function(){},l=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]],h=function(){var t=1,e=1,n=r.y,s=p;function c(t){var e=n(t);if(Array.isArray(e))e=e.slice().sort(o);else{var i=Object(r.i)(t),a=i[0],u=i[1];e=Object(r.A)(a,u,e),e=Object(r.s)(Math.floor(a/e)*e,Math.floor(u/e)*e,e)}return e.map((function(e){return h(t,e)}))}function h(n,r){var i=[],o=[];return function(n,r,i){var o,a,u,s,c,f,h=new Array,p=new Array;o=a=-1,s=n[0]>=r,l[s<<1].forEach(g);for(;++o<t-1;)u=s,s=n[o+1]>=r,l[u|s<<1].forEach(g);l[s<<0].forEach(g);for(;++a<e-1;){for(o=-1,s=n[a*t+t]>=r,c=n[a*t]>=r,l[s<<1|c<<2].forEach(g);++o<t-1;)u=s,s=n[a*t+t+o+1]>=r,f=c,c=n[a*t+o+1]>=r,l[u|s<<1|c<<2|f<<3].forEach(g);l[s|c<<3].forEach(g)}o=-1,c=n[a*t]>=r,l[c<<2].forEach(g);for(;++o<t-1;)f=c,c=n[a*t+o+1]>=r,l[c<<2|f<<3].forEach(g);function g(t){var e,n,r=[t[0][0]+o,t[0][1]+a],u=[t[1][0]+o,t[1][1]+a],s=d(r),c=d(u);(e=p[s])?(n=h[c])?(delete p[e.end],delete h[n.start],e===n?(e.ring.push(u),i(e.ring)):h[e.start]=p[n.end]={start:e.start,end:n.end,ring:e.ring.concat(n.ring)}):(delete p[e.end],e.ring.push(u),p[e.end=c]=e):(e=h[c])?(n=p[s])?(delete h[e.start],delete p[n.end],e===n?(e.ring.push(u),i(e.ring)):h[n.start]=p[e.end]={start:n.start,end:e.end,ring:n.ring.concat(e.ring)}):(delete h[e.start],e.ring.unshift(r),h[e.start=s]=e):h[s]=p[c]={start:s,end:c,ring:[r,u]}}l[c<<3].forEach(g)}(n,r,(function(t){s(t,n,r),function(t){for(var e=0,n=t.length,r=t[n-1][1]*t[0][0]-t[n-1][0]*t[0][1];++e<n;)r+=t[e-1][1]*t[e][0]-t[e-1][0]*t[e][1];return r}(t)>0?i.push([t]):o.push(t)})),o.forEach((function(t){for(var e,n=0,r=i.length;n<r;++n)if(-1!==u((e=i[n])[0],t))return void e.push(t)})),{type:"MultiPolygon",value:r,coordinates:i}}function d(e){return 2*e[0]+e[1]*(t+1)*4}function p(n,r,i){n.forEach((function(n){var o,a=n[0],u=n[1],s=0|a,c=0|u,f=r[c*t+s];a>0&&a<t&&s===a&&(o=r[c*t+s-1],n[0]=a+(i-o)/(f-o)-.5),u>0&&u<e&&c===u&&(o=r[(c-1)*t+s],n[1]=u+(i-o)/(f-o)-.5)}))}return c.contour=h,c.size=function(n){if(!arguments.length)return[t,e];var r=Math.ceil(n[0]),i=Math.ceil(n[1]);if(!(r>0&&i>0))throw new Error("invalid size");return t=r,e=i,c},c.thresholds=function(t){return arguments.length?(n="function"==typeof t?t:Array.isArray(t)?a(i.call(t)):a(t),c):n},c.smooth=function(t){return arguments.length?(s=t?p:f,c):s===p},c};function d(t,e,n){for(var r=t.width,i=t.height,o=1+(n<<1),a=0;a<i;++a)for(var u=0,s=0;u<r+n;++u)u<r&&(s+=t.data[u+a*r]),u>=n&&(u>=o&&(s-=t.data[u-o+a*r]),e.data[u-n+a*r]=s/Math.min(u+1,r-1+o-u,o))}function p(t,e,n){for(var r=t.width,i=t.height,o=1+(n<<1),a=0;a<r;++a)for(var u=0,s=0;u<i+n;++u)u<i&&(s+=t.data[a+u*r]),u>=n&&(u>=o&&(s-=t.data[a+(u-o)*r]),e.data[a+(u-n)*r]=s/Math.min(u+1,i-1+o-u,o))}function g(t){return t[0]}function y(t){return t[1]}function b(){return 1}var v=function(){var t=g,e=y,n=b,o=960,u=500,s=20,c=2,f=3*s,l=o+2*f>>c,v=u+2*f>>c,m=a(20);function _(i){var o=new Float32Array(l*v),a=new Float32Array(l*v);i.forEach((function(r,i,a){var u=+t(r,i,a)+f>>c,s=+e(r,i,a)+f>>c,h=+n(r,i,a);u>=0&&u<l&&s>=0&&s<v&&(o[u+s*l]+=h)})),d({width:l,height:v,data:o},{width:l,height:v,data:a},s>>c),p({width:l,height:v,data:a},{width:l,height:v,data:o},s>>c),d({width:l,height:v,data:o},{width:l,height:v,data:a},s>>c),p({width:l,height:v,data:a},{width:l,height:v,data:o},s>>c),d({width:l,height:v,data:o},{width:l,height:v,data:a},s>>c),p({width:l,height:v,data:a},{width:l,height:v,data:o},s>>c);var u=m(o);if(!Array.isArray(u)){var g=Object(r.k)(o);u=Object(r.A)(0,g,u),(u=Object(r.s)(0,Math.floor(g/u)*u,u)).shift()}return h().thresholds(u).size([l,v])(o).map(w)}function w(t){return t.value*=Math.pow(2,-2*c),t.coordinates.forEach(x),t}function x(t){t.forEach(k)}function k(t){t.forEach(E)}function E(t){t[0]=t[0]*Math.pow(2,c)-f,t[1]=t[1]*Math.pow(2,c)-f}function A(){return l=o+2*(f=3*s)>>c,v=u+2*f>>c,_}return _.x=function(e){return arguments.length?(t="function"==typeof e?e:a(+e),_):t},_.y=function(t){return arguments.length?(e="function"==typeof t?t:a(+t),_):e},_.weight=function(t){return arguments.length?(n="function"==typeof t?t:a(+t),_):n},_.size=function(t){if(!arguments.length)return[o,u];var e=Math.ceil(t[0]),n=Math.ceil(t[1]);if(!(e>=0||e>=0))throw new Error("invalid size");return o=e,u=n,A()},_.cellSize=function(t){if(!arguments.length)return 1<<c;if(!((t=+t)>=1))throw new Error("invalid cell size");return c=Math.floor(Math.log(t)/Math.LN2),A()},_.thresholds=function(t){return arguments.length?(m="function"==typeof t?t:Array.isArray(t)?a(i.call(t)):a(t),_):m},_.bandwidth=function(t){if(!arguments.length)return Math.sqrt(s*(s+1));if(!((t=+t)>=0))throw new Error("invalid bandwidth");return s=Math.round((Math.sqrt(4*t*t+1)-1)/2),A()},_};n.d(e,"b",(function(){return h})),n.d(e,"a",(function(){return v}))},function(t,e,n){"use strict";var r=function(t){return function(){return t}};function i(t){return t[0]}function o(t){return t[1]}function a(){this._=null}function u(t){t.U=t.C=t.L=t.R=t.P=t.N=null}function s(t,e){var n=e,r=e.R,i=n.U;i?i.L===n?i.L=r:i.R=r:t._=r,r.U=i,n.U=r,n.R=r.L,n.R&&(n.R.U=n),r.L=n}function c(t,e){var n=e,r=e.L,i=n.U;i?i.L===n?i.L=r:i.R=r:t._=r,r.U=i,n.U=r,n.L=r.R,n.L&&(n.L.U=n),r.R=n}function f(t){for(;t.L;)t=t.L;return t}a.prototype={constructor:a,insert:function(t,e){var n,r,i;if(t){if(e.P=t,e.N=t.N,t.N&&(t.N.P=e),t.N=e,t.R){for(t=t.R;t.L;)t=t.L;t.L=e}else t.R=e;n=t}else this._?(t=f(this._),e.P=null,e.N=t,t.P=t.L=e,n=t):(e.P=e.N=null,this._=e,n=null);for(e.L=e.R=null,e.U=n,e.C=!0,t=e;n&&n.C;)n===(r=n.U).L?(i=r.R)&&i.C?(n.C=i.C=!1,r.C=!0,t=r):(t===n.R&&(s(this,n),n=(t=n).U),n.C=!1,r.C=!0,c(this,r)):(i=r.L)&&i.C?(n.C=i.C=!1,r.C=!0,t=r):(t===n.L&&(c(this,n),n=(t=n).U),n.C=!1,r.C=!0,s(this,r)),n=t.U;this._.C=!1},remove:function(t){t.N&&(t.N.P=t.P),t.P&&(t.P.N=t.N),t.N=t.P=null;var e,n,r,i=t.U,o=t.L,a=t.R;if(n=o?a?f(a):o:a,i?i.L===t?i.L=n:i.R=n:this._=n,o&&a?(r=n.C,n.C=t.C,n.L=o,o.U=n,n!==a?(i=n.U,n.U=t.U,t=n.R,i.L=t,n.R=a,a.U=n):(n.U=i,i=n,t=n.R)):(r=t.C,t=n),t&&(t.U=i),!r)if(t&&t.C)t.C=!1;else{do{if(t===this._)break;if(t===i.L){if((e=i.R).C&&(e.C=!1,i.C=!0,s(this,i),e=i.R),e.L&&e.L.C||e.R&&e.R.C){e.R&&e.R.C||(e.L.C=!1,e.C=!0,c(this,e),e=i.R),e.C=i.C,i.C=e.R.C=!1,s(this,i),t=this._;break}}else if((e=i.L).C&&(e.C=!1,i.C=!0,c(this,i),e=i.L),e.L&&e.L.C||e.R&&e.R.C){e.L&&e.L.C||(e.R.C=!1,e.C=!0,s(this,e),e=i.L),e.C=i.C,i.C=e.L.C=!1,c(this,i),t=this._;break}e.C=!0,t=i,i=i.U}while(!t.C);t&&(t.C=!1)}}};var l=a;function h(t,e,n,r){var i=[null,null],o=L.push(i)-1;return i.left=t,i.right=e,n&&p(i,t,e,n),r&&p(i,e,t,r),R[t.index].halfedges.push(o),R[e.index].halfedges.push(o),i}function d(t,e,n){var r=[e,n];return r.left=t,r}function p(t,e,n,r){t[0]||t[1]?t.left===n?t[1]=r:t[0]=r:(t[0]=r,t.left=e,t.right=n)}function g(t,e,n,r,i){var o,a=t[0],u=t[1],s=a[0],c=a[1],f=0,l=1,h=u[0]-s,d=u[1]-c;if(o=e-s,h||!(o>0)){if(o/=h,h<0){if(o<f)return;o<l&&(l=o)}else if(h>0){if(o>l)return;o>f&&(f=o)}if(o=r-s,h||!(o<0)){if(o/=h,h<0){if(o>l)return;o>f&&(f=o)}else if(h>0){if(o<f)return;o<l&&(l=o)}if(o=n-c,d||!(o>0)){if(o/=d,d<0){if(o<f)return;o<l&&(l=o)}else if(d>0){if(o>l)return;o>f&&(f=o)}if(o=i-c,d||!(o<0)){if(o/=d,d<0){if(o>l)return;o>f&&(f=o)}else if(d>0){if(o<f)return;o<l&&(l=o)}return!(f>0||l<1)||(f>0&&(t[0]=[s+f*h,c+f*d]),l<1&&(t[1]=[s+l*h,c+l*d]),!0)}}}}}function y(t,e,n,r,i){var o=t[1];if(o)return!0;var a,u,s=t[0],c=t.left,f=t.right,l=c[0],h=c[1],d=f[0],p=f[1],g=(l+d)/2,y=(h+p)/2;if(p===h){if(g<e||g>=r)return;if(l>d){if(s){if(s[1]>=i)return}else s=[g,n];o=[g,i]}else{if(s){if(s[1]<n)return}else s=[g,i];o=[g,n]}}else if(u=y-(a=(l-d)/(p-h))*g,a<-1||a>1)if(l>d){if(s){if(s[1]>=i)return}else s=[(n-u)/a,n];o=[(i-u)/a,i]}else{if(s){if(s[1]<n)return}else s=[(i-u)/a,i];o=[(n-u)/a,n]}else if(h<p){if(s){if(s[0]>=r)return}else s=[e,a*e+u];o=[r,a*r+u]}else{if(s){if(s[0]<e)return}else s=[r,a*r+u];o=[e,a*e+u]}return t[0]=s,t[1]=o,!0}function b(t,e){var n=t.site,r=e.left,i=e.right;return n===i&&(i=r,r=n),i?Math.atan2(i[1]-r[1],i[0]-r[0]):(n===r?(r=e[1],i=e[0]):(r=e[0],i=e[1]),Math.atan2(r[0]-i[0],i[1]-r[1]))}function v(t,e){return e[+(e.left!==t.site)]}function m(t,e){return e[+(e.left===t.site)]}var _,w=[];function x(){u(this),this.x=this.y=this.arc=this.site=this.cy=null}function k(t){var e=t.P,n=t.N;if(e&&n){var r=e.site,i=t.site,o=n.site;if(r!==o){var a=i[0],u=i[1],s=r[0]-a,c=r[1]-u,f=o[0]-a,l=o[1]-u,h=2*(s*l-c*f);if(!(h>=-P)){var d=s*s+c*c,p=f*f+l*l,g=(l*d-c*p)/h,y=(s*p-f*d)/h,b=w.pop()||new x;b.arc=t,b.site=i,b.x=g+a,b.y=(b.cy=y+u)+Math.sqrt(g*g+y*y),t.circle=b;for(var v=null,m=j._;m;)if(b.y<m.y||b.y===m.y&&b.x<=m.x){if(!m.L){v=m.P;break}m=m.L}else{if(!m.R){v=m;break}m=m.R}j.insert(v,b),v||(_=b)}}}}function E(t){var e=t.circle;e&&(e.P||(_=e.N),j.remove(e),w.push(e),u(e),t.circle=null)}var A=[];function S(){u(this),this.edge=this.site=this.circle=null}function M(t){var e=A.pop()||new S;return e.site=t,e}function T(t){E(t),I.remove(t),A.push(t),u(t)}function O(t){var e=t.circle,n=e.x,r=e.cy,i=[n,r],o=t.P,a=t.N,u=[t];T(t);for(var s=o;s.circle&&Math.abs(n-s.circle.x)<B&&Math.abs(r-s.circle.cy)<B;)o=s.P,u.unshift(s),T(s),s=o;u.unshift(s),E(s);for(var c=a;c.circle&&Math.abs(n-c.circle.x)<B&&Math.abs(r-c.circle.cy)<B;)a=c.N,u.push(c),T(c),c=a;u.push(c),E(c);var f,l=u.length;for(f=1;f<l;++f)c=u[f],s=u[f-1],p(c.edge,s.site,c.site,i);s=u[0],(c=u[l-1]).edge=h(s.site,c.site,null,i),k(s),k(c)}function D(t){for(var e,n,r,i,o=t[0],a=t[1],u=I._;u;)if((r=C(u,a)-o)>B)u=u.L;else{if(!((i=o-N(u,a))>B)){r>-B?(e=u.P,n=u):i>-B?(e=u,n=u.N):e=n=u;break}if(!u.R){e=u;break}u=u.R}!function(t){R[t.index]={site:t,halfedges:[]}}(t);var s=M(t);if(I.insert(e,s),e||n){if(e===n)return E(e),n=M(e.site),I.insert(s,n),s.edge=n.edge=h(e.site,s.site),k(e),void k(n);if(n){E(e),E(n);var c=e.site,f=c[0],l=c[1],d=t[0]-f,g=t[1]-l,y=n.site,b=y[0]-f,v=y[1]-l,m=2*(d*v-g*b),_=d*d+g*g,w=b*b+v*v,x=[(v*_-g*w)/m+f,(d*w-b*_)/m+l];p(n.edge,c,y,x),s.edge=h(c,t,null,x),n.edge=h(t,y,null,x),k(e),k(n)}else s.edge=h(e.site,s.site)}}function C(t,e){var n=t.site,r=n[0],i=n[1],o=i-e;if(!o)return r;var a=t.P;if(!a)return-1/0;var u=(n=a.site)[0],s=n[1],c=s-e;if(!c)return u;var f=u-r,l=1/o-1/c,h=f/c;return l?(-h+Math.sqrt(h*h-2*l*(f*f/(-2*c)-s+c/2+i-o/2)))/l+r:(r+u)/2}function N(t,e){var n=t.N;if(n)return C(n,e);var r=t.site;return r[1]===e?r[0]:1/0}var I,R,j,L,B=1e-6,P=1e-12;function F(t,e){return e[1]-t[1]||e[0]-t[0]}function q(t,e){var n,r,i,o=t.sort(F).pop();for(L=[],R=new Array(t.length),I=new l,j=new l;;)if(i=_,o&&(!i||o[1]<i.y||o[1]===i.y&&o[0]<i.x))o[0]===n&&o[1]===r||(D(o),n=o[0],r=o[1]),o=t.pop();else{if(!i)break;O(i.arc)}if(function(){for(var t,e,n,r,i=0,o=R.length;i<o;++i)if((t=R[i])&&(r=(e=t.halfedges).length)){var a=new Array(r),u=new Array(r);for(n=0;n<r;++n)a[n]=n,u[n]=b(t,L[e[n]]);for(a.sort((function(t,e){return u[e]-u[t]})),n=0;n<r;++n)u[n]=e[a[n]];for(n=0;n<r;++n)e[n]=u[n]}}(),e){var a=+e[0][0],u=+e[0][1],s=+e[1][0],c=+e[1][1];!function(t,e,n,r){for(var i,o=L.length;o--;)y(i=L[o],t,e,n,r)&&g(i,t,e,n,r)&&(Math.abs(i[0][0]-i[1][0])>B||Math.abs(i[0][1]-i[1][1])>B)||delete L[o]}(a,u,s,c),function(t,e,n,r){var i,o,a,u,s,c,f,l,h,p,g,y,b=R.length,_=!0;for(i=0;i<b;++i)if(o=R[i]){for(a=o.site,u=(s=o.halfedges).length;u--;)L[s[u]]||s.splice(u,1);for(u=0,c=s.length;u<c;)g=(p=m(o,L[s[u]]))[0],y=p[1],l=(f=v(o,L[s[++u%c]]))[0],h=f[1],(Math.abs(g-l)>B||Math.abs(y-h)>B)&&(s.splice(u,0,L.push(d(a,p,Math.abs(g-t)<B&&r-y>B?[t,Math.abs(l-t)<B?h:r]:Math.abs(y-r)<B&&n-g>B?[Math.abs(h-r)<B?l:n,r]:Math.abs(g-n)<B&&y-e>B?[n,Math.abs(l-n)<B?h:e]:Math.abs(y-e)<B&&g-t>B?[Math.abs(h-e)<B?l:t,e]:null))-1),++c);c&&(_=!1)}if(_){var w,x,k,E=1/0;for(i=0,_=null;i<b;++i)(o=R[i])&&(k=(w=(a=o.site)[0]-t)*w+(x=a[1]-e)*x)<E&&(E=k,_=o);if(_){var A=[t,e],S=[t,r],M=[n,r],T=[n,e];_.halfedges.push(L.push(d(a=_.site,A,S))-1,L.push(d(a,S,M))-1,L.push(d(a,M,T))-1,L.push(d(a,T,A))-1)}}for(i=0;i<b;++i)(o=R[i])&&(o.halfedges.length||delete R[i])}(a,u,s,c)}this.edges=L,this.cells=R,I=j=L=R=null}q.prototype={constructor:q,polygons:function(){var t=this.edges;return this.cells.map((function(e){var n=e.halfedges.map((function(n){return v(e,t[n])}));return n.data=e.site.data,n}))},triangles:function(){var t=[],e=this.edges;return this.cells.forEach((function(n,r){if(o=(i=n.halfedges).length)for(var i,o,a,u,s,c,f=n.site,l=-1,h=e[i[o-1]],d=h.left===f?h.right:h.left;++l<o;)a=d,d=(h=e[i[l]]).left===f?h.right:h.left,a&&d&&r<a.index&&r<d.index&&(s=a,c=d,((u=f)[0]-c[0])*(s[1]-u[1])-(u[0]-s[0])*(c[1]-u[1])<0)&&t.push([f.data,a.data,d.data])})),t},links:function(){return this.edges.filter((function(t){return t.right})).map((function(t){return{source:t.left.data,target:t.right.data}}))},find:function(t,e,n){for(var r,i,o=this,a=o._found||0,u=o.cells.length;!(i=o.cells[a]);)if(++a>=u)return null;var s=t-i.site[0],c=e-i.site[1],f=s*s+c*c;do{i=o.cells[r=a],a=null,i.halfedges.forEach((function(n){var r=o.edges[n],u=r.left;if(u!==i.site&&u||(u=r.right)){var s=t-u[0],c=e-u[1],l=s*s+c*c;l<f&&(f=l,a=u.index)}}))}while(null!==a);return o._found=r,null==n||f<=n*n?i.site:null}};var U=function(){var t=i,e=o,n=null;function a(r){return new q(r.map((function(n,i){var o=[Math.round(t(n,i,r)/B)*B,Math.round(e(n,i,r)/B)*B];return o.index=i,o.data=n,o})),n)}return a.polygons=function(t){return a(t).polygons()},a.links=function(t){return a(t).links()},a.triangles=function(t){return a(t).triangles()},a.x=function(e){return arguments.length?(t="function"==typeof e?e:r(+e),a):t},a.y=function(t){return arguments.length?(e="function"==typeof t?t:r(+t),a):e},a.extent=function(t){return arguments.length?(n=null==t?null:[[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]],a):n&&[[n[0][0],n[0][1]],[n[1][0],n[1][1]]]},a.size=function(t){return arguments.length?(n=null==t?null:[[0,0],[+t[0],+t[1]]],a):n&&[n[1][0]-n[0][0],n[1][1]-n[0][1]]},a};n.d(e,"a",(function(){return U}))},function(t,e,n){"use strict";function r(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.blob()}var i=function(t,e){return fetch(t,e).then(r)};function o(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.arrayBuffer()}var a=function(t,e){return fetch(t,e).then(o)},u=n(110),s=n(60),c=n(61);function f(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.text()}var l=function(t,e){return fetch(t,e).then(f)};function h(t){return function(e,n,r){return 2===arguments.length&&"function"==typeof n&&(r=n,n=void 0),l(e,n).then((function(e){return t(e,r)}))}}function d(t,e,n,r){3===arguments.length&&"function"==typeof n&&(r=n,n=void 0);var i=Object(u.a)(t);return l(e,n).then((function(t){return i.parse(t,r)}))}var p=h(s.f),g=h(c.f),y=function(t,e){return new Promise((function(n,r){var i=new Image;for(var o in e)i[o]=e[o];i.onerror=r,i.onload=function(){n(i)},i.src=t}))};function b(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.json()}var v=function(t,e){return fetch(t,e).then(b)};function m(t){return function(e,n){return l(e,n).then((function(e){return(new DOMParser).parseFromString(e,t)}))}}var _=m("application/xml"),w=m("text/html"),x=m("image/svg+xml");n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return a})),n.d(e,"d",(function(){return d})),n.d(e,"c",(function(){return p})),n.d(e,"j",(function(){return g})),n.d(e,"f",(function(){return y})),n.d(e,"g",(function(){return v})),n.d(e,"i",(function(){return l})),n.d(e,"k",(function(){return _})),n.d(e,"e",(function(){return w})),n.d(e,"h",(function(){return x}))},function(t,e,n){"use strict";var r=function(){return Math.random()},i=function t(e){function n(t,n){return t=null==t?0:+t,n=null==n?1:+n,1===arguments.length?(n=t,t=0):n-=t,function(){return e()*n+t}}return n.source=t,n}(r),o=function t(e){function n(t,n){var r,i;return t=null==t?0:+t,n=null==n?1:+n,function(){var o;if(null!=r)o=r,r=null;else do{r=2*e()-1,o=2*e()-1,i=r*r+o*o}while(!i||i>1);return t+n*o*Math.sqrt(-2*Math.log(i)/i)}}return n.source=t,n}(r),a=function t(e){function n(){var t=o.source(e).apply(this,arguments);return function(){return Math.exp(t())}}return n.source=t,n}(r),u=function t(e){function n(t){return function(){for(var n=0,r=0;r<t;++r)n+=e();return n}}return n.source=t,n}(r),s=function t(e){function n(t){var n=u.source(e)(t);return function(){return n()/t}}return n.source=t,n}(r),c=function t(e){function n(t){return function(){return-Math.log(1-e())/t}}return n.source=t,n}(r);n.d(e,"f",(function(){return i})),n.d(e,"e",(function(){return o})),n.d(e,"d",(function(){return a})),n.d(e,"a",(function(){return s})),n.d(e,"c",(function(){return u})),n.d(e,"b",(function(){return c}))},function(t,e,n){"use strict";var r=function(t){for(var e,n=-1,r=t.length,i=t[r-1],o=0;++n<r;)e=i,i=t[n],o+=e[1]*i[0]-e[0]*i[1];return o/2},i=function(t){for(var e,n,r=-1,i=t.length,o=0,a=0,u=t[i-1],s=0;++r<i;)e=u,u=t[r],s+=n=e[0]*u[1]-u[0]*e[1],o+=(e[0]+u[0])*n,a+=(e[1]+u[1])*n;return[o/(s*=3),a/s]};function o(t,e){return t[0]-e[0]||t[1]-e[1]}function a(t){for(var e,n,r,i=t.length,o=[0,1],a=2,u=2;u<i;++u){for(;a>1&&(e=t[o[a-2]],n=t[o[a-1]],r=t[u],(n[0]-e[0])*(r[1]-e[1])-(n[1]-e[1])*(r[0]-e[0])<=0);)--a;o[a++]=u}return o.slice(0,a)}var u=function(t){if((n=t.length)<3)return null;var e,n,r=new Array(n),i=new Array(n);for(e=0;e<n;++e)r[e]=[+t[e][0],+t[e][1],e];for(r.sort(o),e=0;e<n;++e)i[e]=[r[e][0],-r[e][1]];var u=a(r),s=a(i),c=s[0]===u[0],f=s[s.length-1]===u[u.length-1],l=[];for(e=u.length-1;e>=0;--e)l.push(t[r[u[e]][2]]);for(e=+c;e<s.length-f;++e)l.push(t[r[s[e]][2]]);return l},s=function(t,e){for(var n,r,i=t.length,o=t[i-1],a=e[0],u=e[1],s=o[0],c=o[1],f=!1,l=0;l<i;++l)n=(o=t[l])[0],(r=o[1])>u!=c>u&&a<(s-n)*(u-r)/(c-r)+n&&(f=!f),s=n,c=r;return f},c=function(t){for(var e,n,r=-1,i=t.length,o=t[i-1],a=o[0],u=o[1],s=0;++r<i;)e=a,n=u,e-=a=(o=t[r])[0],n-=u=o[1],s+=Math.sqrt(e*e+n*n);return s};n.d(e,"a",(function(){return r})),n.d(e,"b",(function(){return i})),n.d(e,"d",(function(){return u})),n.d(e,"c",(function(){return s})),n.d(e,"e",(function(){return c}))},function(t,e,n){"use strict";var r=n(0),i=Math.cos,o=Math.sin,a=Math.PI,u=a/2,s=2*a,c=Math.max;function f(t){return function(e,n){return t(e.source.value+e.target.value,n.source.value+n.target.value)}}var l=function(){var t=0,e=null,n=null,i=null;function o(o){var a,u,f,l,h,d,p=o.length,g=[],y=Object(r.s)(p),b=[],v=[],m=v.groups=new Array(p),_=new Array(p*p);for(a=0,h=-1;++h<p;){for(u=0,d=-1;++d<p;)u+=o[h][d];g.push(u),b.push(Object(r.s)(p)),a+=u}for(e&&y.sort((function(t,n){return e(g[t],g[n])})),n&&b.forEach((function(t,e){t.sort((function(t,r){return n(o[e][t],o[e][r])}))})),l=(a=c(0,s-t*p)/a)?t:s/p,u=0,h=-1;++h<p;){for(f=u,d=-1;++d<p;){var w=y[h],x=b[w][d],k=o[w][x],E=u,A=u+=k*a;_[x*p+w]={index:w,subindex:x,startAngle:E,endAngle:A,value:k}}m[w]={index:w,startAngle:f,endAngle:u,value:g[w]},u+=l}for(h=-1;++h<p;)for(d=h-1;++d<p;){var S=_[d*p+h],M=_[h*p+d];(S.value||M.value)&&v.push(S.value<M.value?{source:M,target:S}:{source:S,target:M})}return i?v.sort(i):v}return o.padAngle=function(e){return arguments.length?(t=c(0,e),o):t},o.sortGroups=function(t){return arguments.length?(e=t,o):e},o.sortSubgroups=function(t){return arguments.length?(n=t,o):n},o.sortChords=function(t){return arguments.length?(null==t?i=null:(i=f(t))._=t,o):i&&i._},o},h=Array.prototype.slice,d=function(t){return function(){return t}},p=n(286);function g(t){return t.source}function y(t){return t.target}function b(t){return t.radius}function v(t){return t.startAngle}function m(t){return t.endAngle}var _=function(){var t=g,e=y,n=b,r=v,a=m,s=null;function c(){var c,f=h.call(arguments),l=t.apply(this,f),d=e.apply(this,f),g=+n.apply(this,(f[0]=l,f)),y=r.apply(this,f)-u,b=a.apply(this,f)-u,v=g*i(y),m=g*o(y),_=+n.apply(this,(f[0]=d,f)),w=r.apply(this,f)-u,x=a.apply(this,f)-u;if(s||(s=c=Object(p.a)()),s.moveTo(v,m),s.arc(0,0,g,y,b),y===w&&b===x||(s.quadraticCurveTo(0,0,_*i(w),_*o(w)),s.arc(0,0,_,w,x)),s.quadraticCurveTo(0,0,v,m),s.closePath(),c)return s=null,c+""||null}return c.radius=function(t){return arguments.length?(n="function"==typeof t?t:d(+t),c):n},c.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:d(+t),c):r},c.endAngle=function(t){return arguments.length?(a="function"==typeof t?t:d(+t),c):a},c.source=function(e){return arguments.length?(t=e,c):t},c.target=function(t){return arguments.length?(e=t,c):e},c.context=function(t){return arguments.length?(s=null==t?null:t,c):s},c};n.d(e,"a",(function(){return l})),n.d(e,"b",(function(){return _}))},function(t,e,n){"use strict";var r=n(282),i=n(109),o=n(291),a=n(47),u=n(285),s=n(113),c=n(284),f=n(40),l=function(t){return function(){return t}};function h(t,e,n){this.target=t,this.type=e,this.transform=n}function d(t,e,n){this.k=t,this.x=e,this.y=n}d.prototype={constructor:d,scale:function(t){return 1===t?this:new d(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new d(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var p=new d(1,0,0);function g(t){for(;!t.__zoom;)if(!(t=t.parentNode))return p;return t.__zoom}function y(){a.c.stopImmediatePropagation()}g.prototype=d.prototype;var b=function(){a.c.preventDefault(),a.c.stopImmediatePropagation()};function v(){return!a.c.ctrlKey&&!a.c.button}function m(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t).hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]:[[0,0],[t.clientWidth,t.clientHeight]]}function _(){return this.__zoom||p}function w(){return-a.c.deltaY*(1===a.c.deltaMode?.05:a.c.deltaMode?1:.002)}function x(){return navigator.maxTouchPoints||"ontouchstart"in this}function k(t,e,n){var r=t.invertX(e[0][0])-n[0][0],i=t.invertX(e[1][0])-n[1][0],o=t.invertY(e[0][1])-n[0][1],a=t.invertY(e[1][1])-n[1][1];return t.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),a>o?(o+a)/2:Math.min(0,o)||Math.max(0,a))}var E=function(){var t,e,n=v,g=m,E=k,A=w,S=x,M=[0,1/0],T=[[-1/0,-1/0],[1/0,1/0]],O=250,D=o.a,C=Object(r.a)("start","zoom","end"),N=0;function I(t){t.property("__zoom",_).on("wheel.zoom",q).on("mousedown.zoom",U).on("dblclick.zoom",z).filter(S).on("touchstart.zoom",Y).on("touchmove.zoom",V).on("touchend.zoom touchcancel.zoom",G).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function R(t,e){return(e=Math.max(M[0],Math.min(M[1],e)))===t.k?t:new d(e,t.x,t.y)}function j(t,e,n){var r=e[0]-n[0]*t.k,i=e[1]-n[1]*t.k;return r===t.x&&i===t.y?t:new d(t.k,r,i)}function L(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function B(t,e,n){t.on("start.zoom",(function(){P(this,arguments).start()})).on("interrupt.zoom end.zoom",(function(){P(this,arguments).end()})).tween("zoom",(function(){var t=this,r=arguments,i=P(t,r),o=g.apply(t,r),a=null==n?L(o):"function"==typeof n?n.apply(t,r):n,u=Math.max(o[1][0]-o[0][0],o[1][1]-o[0][1]),s=t.__zoom,c="function"==typeof e?e.apply(t,r):e,f=D(s.invert(a).concat(u/s.k),c.invert(a).concat(u/c.k));return function(t){if(1===t)t=c;else{var e=f(t),n=u/e[2];t=new d(n,a[0]-e[0]*n,a[1]-e[1]*n)}i.zoom(null,t)}}))}function P(t,e,n){return!n&&t.__zooming||new F(t,e)}function F(t,e){this.that=t,this.args=e,this.active=0,this.extent=g.apply(t,e),this.taps=0}function q(){if(n.apply(this,arguments)){var t=P(this,arguments),e=this.__zoom,r=Math.max(M[0],Math.min(M[1],e.k*Math.pow(2,A.apply(this,arguments)))),i=Object(u.a)(this);if(t.wheel)t.mouse[0][0]===i[0]&&t.mouse[0][1]===i[1]||(t.mouse[1]=e.invert(t.mouse[0]=i)),clearTimeout(t.wheel);else{if(e.k===r)return;t.mouse=[i,e.invert(i)],Object(f.b)(this),t.start()}b(),t.wheel=setTimeout(o,150),t.zoom("mouse",E(j(R(e,r),t.mouse[0],t.mouse[1]),t.extent,T))}function o(){t.wheel=null,t.end()}}function U(){if(!e&&n.apply(this,arguments)){var t=P(this,arguments,!0),r=Object(s.a)(a.c.view).on("mousemove.zoom",h,!0).on("mouseup.zoom",d,!0),o=Object(u.a)(this),c=a.c.clientX,l=a.c.clientY;Object(i.a)(a.c.view),y(),t.mouse=[o,this.__zoom.invert(o)],Object(f.b)(this),t.start()}function h(){if(b(),!t.moved){var e=a.c.clientX-c,n=a.c.clientY-l;t.moved=e*e+n*n>N}t.zoom("mouse",E(j(t.that.__zoom,t.mouse[0]=Object(u.a)(t.that),t.mouse[1]),t.extent,T))}function d(){r.on("mousemove.zoom mouseup.zoom",null),Object(i.b)(a.c.view,t.moved),b(),t.end()}}function z(){if(n.apply(this,arguments)){var t=this.__zoom,e=Object(u.a)(this),r=t.invert(e),i=t.k*(a.c.shiftKey?.5:2),o=E(j(R(t,i),e,r),g.apply(this,arguments),T);b(),O>0?Object(s.a)(this).transition().duration(O).call(B,o,e):Object(s.a)(this).call(I.transform,o)}}function Y(){if(n.apply(this,arguments)){var e,r,i,o,u=a.c.touches,s=u.length,l=P(this,arguments,a.c.changedTouches.length===s);for(y(),r=0;r<s;++r)i=u[r],o=[o=Object(c.a)(this,u,i.identifier),this.__zoom.invert(o),i.identifier],l.touch0?l.touch1||l.touch0[2]===o[2]||(l.touch1=o,l.taps=0):(l.touch0=o,e=!0,l.taps=1+!!t);t&&(t=clearTimeout(t)),e&&(l.taps<2&&(t=setTimeout((function(){t=null}),500)),Object(f.b)(this),l.start())}}function V(){if(this.__zooming){var e,n,r,i,o=P(this,arguments),u=a.c.changedTouches,s=u.length;for(b(),t&&(t=clearTimeout(t)),o.taps=0,e=0;e<s;++e)n=u[e],r=Object(c.a)(this,u,n.identifier),o.touch0&&o.touch0[2]===n.identifier?o.touch0[0]=r:o.touch1&&o.touch1[2]===n.identifier&&(o.touch1[0]=r);if(n=o.that.__zoom,o.touch1){var f=o.touch0[0],l=o.touch0[1],h=o.touch1[0],d=o.touch1[1],p=(p=h[0]-f[0])*p+(p=h[1]-f[1])*p,g=(g=d[0]-l[0])*g+(g=d[1]-l[1])*g;n=R(n,Math.sqrt(p/g)),r=[(f[0]+h[0])/2,(f[1]+h[1])/2],i=[(l[0]+d[0])/2,(l[1]+d[1])/2]}else{if(!o.touch0)return;r=o.touch0[0],i=o.touch0[1]}o.zoom("touch",E(j(n,r,i),o.extent,T))}}function G(){if(this.__zooming){var t,n,r=P(this,arguments),i=a.c.changedTouches,o=i.length;for(y(),e&&clearTimeout(e),e=setTimeout((function(){e=null}),500),t=0;t<o;++t)n=i[t],r.touch0&&r.touch0[2]===n.identifier?delete r.touch0:r.touch1&&r.touch1[2]===n.identifier&&delete r.touch1;if(r.touch1&&!r.touch0&&(r.touch0=r.touch1,delete r.touch1),r.touch0)r.touch0[1]=this.__zoom.invert(r.touch0[0]);else if(r.end(),2===r.taps){var u=Object(s.a)(this).on("dblclick.zoom");u&&u.apply(this,arguments)}}}return I.transform=function(t,e,n){var r=t.selection?t.selection():t;r.property("__zoom",_),t!==r?B(t,e,n):r.interrupt().each((function(){P(this,arguments).start().zoom(null,"function"==typeof e?e.apply(this,arguments):e).end()}))},I.scaleBy=function(t,e,n){I.scaleTo(t,(function(){var t=this.__zoom.k,n="function"==typeof e?e.apply(this,arguments):e;return t*n}),n)},I.scaleTo=function(t,e,n){I.transform(t,(function(){var t=g.apply(this,arguments),r=this.__zoom,i=null==n?L(t):"function"==typeof n?n.apply(this,arguments):n,o=r.invert(i),a="function"==typeof e?e.apply(this,arguments):e;return E(j(R(r,a),i,o),t,T)}),n)},I.translateBy=function(t,e,n){I.transform(t,(function(){return E(this.__zoom.translate("function"==typeof e?e.apply(this,arguments):e,"function"==typeof n?n.apply(this,arguments):n),g.apply(this,arguments),T)}))},I.translateTo=function(t,e,n,r){I.transform(t,(function(){var t=g.apply(this,arguments),i=this.__zoom,o=null==r?L(t):"function"==typeof r?r.apply(this,arguments):r;return E(p.translate(o[0],o[1]).scale(i.k).translate("function"==typeof e?-e.apply(this,arguments):-e,"function"==typeof n?-n.apply(this,arguments):-n),t,T)}),r)},F.prototype={start:function(){return 1==++this.active&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(t,e){return this.mouse&&"mouse"!==t&&(this.mouse[1]=e.invert(this.mouse[0])),this.touch0&&"touch"!==t&&(this.touch0[1]=e.invert(this.touch0[0])),this.touch1&&"touch"!==t&&(this.touch1[1]=e.invert(this.touch1[0])),this.that.__zoom=e,this.emit("zoom"),this},end:function(){return 0==--this.active&&(delete this.that.__zooming,this.emit("end")),this},emit:function(t){Object(a.a)(new h(I,t,this.that.__zoom),C.apply,C,[t,this.that,this.args])}},I.wheelDelta=function(t){return arguments.length?(A="function"==typeof t?t:l(+t),I):A},I.filter=function(t){return arguments.length?(n="function"==typeof t?t:l(!!t),I):n},I.touchable=function(t){return arguments.length?(S="function"==typeof t?t:l(!!t),I):S},I.extent=function(t){return arguments.length?(g="function"==typeof t?t:l([[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]]),I):g},I.scaleExtent=function(t){return arguments.length?(M[0]=+t[0],M[1]=+t[1],I):[M[0],M[1]]},I.translateExtent=function(t){return arguments.length?(T[0][0]=+t[0][0],T[1][0]=+t[1][0],T[0][1]=+t[0][1],T[1][1]=+t[1][1],I):[[T[0][0],T[0][1]],[T[1][0],T[1][1]]]},I.constrain=function(t){return arguments.length?(E=t,I):E},I.duration=function(t){return arguments.length?(O=+t,I):O},I.interpolate=function(t){return arguments.length?(D=t,I):D},I.on=function(){var t=C.on.apply(C,arguments);return t===C?I:t},I.clickDistance=function(t){return arguments.length?(N=(t=+t)*t,I):Math.sqrt(N)},I};n.d(e,"a",(function(){return E})),n.d(e,"c",(function(){return g})),n.d(e,"b",(function(){return p}))},function(t,e,n){"use strict";var r=n(282),i=n(109),o=n(108),a=n(284),u=n(47),s=n(113),c=n(285),f=n(40),l=function(t){return function(){return t}},h=function(t,e,n){this.target=t,this.type=e,this.selection=n};function d(){u.c.stopImmediatePropagation()}var p=function(){u.c.preventDefault(),u.c.stopImmediatePropagation()},g={name:"drag"},y={name:"space"},b={name:"handle"},v={name:"center"};function m(t){return[+t[0],+t[1]]}function _(t){return[m(t[0]),m(t[1])]}function w(t){return function(e){return Object(a.a)(e,u.c.touches,t)}}var x={name:"x",handles:["w","e"].map(D),input:function(t,e){return null==t?null:[[+t[0],e[0][1]],[+t[1],e[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},k={name:"y",handles:["n","s"].map(D),input:function(t,e){return null==t?null:[[e[0][0],+t[0]],[e[1][0],+t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},E={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(D),input:function(t){return null==t?null:_(t)},output:function(t){return t}},A={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},S={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},M={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},T={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},O={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function D(t){return{type:t}}function C(){return!u.c.ctrlKey&&!u.c.button}function N(){var t=this.ownerSVGElement||this;return t.hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function I(){return navigator.maxTouchPoints||"ontouchstart"in this}function R(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function j(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function L(t){var e=t.__brush;return e?e.dim.output(e.selection):null}function B(){return q(x)}function P(){return q(k)}var F=function(){return q(E)};function q(t){var e,n=N,a=C,m=I,E=!0,L=Object(r.a)("start","brush","end"),B=6;function P(e){var n=e.property("__brush",G).selectAll(".overlay").data([D("overlay")]);n.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",A.overlay).merge(n).each((function(){var t=R(this).extent;Object(s.a)(this).attr("x",t[0][0]).attr("y",t[0][1]).attr("width",t[1][0]-t[0][0]).attr("height",t[1][1]-t[0][1])})),e.selectAll(".selection").data([D("selection")]).enter().append("rect").attr("class","selection").attr("cursor",A.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var r=e.selectAll(".handle").data(t.handles,(function(t){return t.type}));r.exit().remove(),r.enter().append("rect").attr("class",(function(t){return"handle handle--"+t.type})).attr("cursor",(function(t){return A[t.type]})),e.each(F).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",z).filter(m).on("touchstart.brush",z).on("touchmove.brush",Y).on("touchend.brush touchcancel.brush",V).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function F(){var t=Object(s.a)(this),e=R(this).selection;e?(t.selectAll(".selection").style("display",null).attr("x",e[0][0]).attr("y",e[0][1]).attr("width",e[1][0]-e[0][0]).attr("height",e[1][1]-e[0][1]),t.selectAll(".handle").style("display",null).attr("x",(function(t){return"e"===t.type[t.type.length-1]?e[1][0]-B/2:e[0][0]-B/2})).attr("y",(function(t){return"s"===t.type[0]?e[1][1]-B/2:e[0][1]-B/2})).attr("width",(function(t){return"n"===t.type||"s"===t.type?e[1][0]-e[0][0]+B:B})).attr("height",(function(t){return"e"===t.type||"w"===t.type?e[1][1]-e[0][1]+B:B}))):t.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function q(t,e,n){return!n&&t.__brush.emitter||new U(t,e)}function U(t,e){this.that=t,this.args=e,this.state=t.__brush,this.active=0}function z(){if((!e||u.c.touches)&&a.apply(this,arguments)){var n,r,o,l,h,m,_,D,C,N,I,L=this,B=u.c.target.__data__.type,P="selection"===(E&&u.c.metaKey?B="overlay":B)?g:E&&u.c.altKey?v:b,U=t===k?null:T[B],z=t===x?null:O[B],Y=R(L),V=Y.extent,G=Y.selection,H=V[0][0],W=V[0][1],$=V[1][0],K=V[1][1],Z=0,X=0,J=U&&z&&E&&u.c.shiftKey,Q=u.c.touches?w(u.c.changedTouches[0].identifier):c.a,tt=Q(L),et=tt,nt=q(L,arguments,!0).beforestart();"overlay"===B?(G&&(C=!0),Y.selection=G=[[n=t===k?H:tt[0],o=t===x?W:tt[1]],[h=t===k?$:n,_=t===x?K:o]]):(n=G[0][0],o=G[0][1],h=G[1][0],_=G[1][1]),r=n,l=o,m=h,D=_;var rt=Object(s.a)(L).attr("pointer-events","none"),it=rt.selectAll(".overlay").attr("cursor",A[B]);if(u.c.touches)nt.moved=at,nt.ended=st;else{var ot=Object(s.a)(u.c.view).on("mousemove.brush",at,!0).on("mouseup.brush",st,!0);E&&ot.on("keydown.brush",ct,!0).on("keyup.brush",ft,!0),Object(i.a)(u.c.view)}d(),Object(f.b)(L),F.call(L),nt.start()}function at(){var t=Q(L);!J||N||I||(Math.abs(t[0]-et[0])>Math.abs(t[1]-et[1])?I=!0:N=!0),et=t,C=!0,p(),ut()}function ut(){var t;switch(Z=et[0]-tt[0],X=et[1]-tt[1],P){case y:case g:U&&(Z=Math.max(H-n,Math.min($-h,Z)),r=n+Z,m=h+Z),z&&(X=Math.max(W-o,Math.min(K-_,X)),l=o+X,D=_+X);break;case b:U<0?(Z=Math.max(H-n,Math.min($-n,Z)),r=n+Z,m=h):U>0&&(Z=Math.max(H-h,Math.min($-h,Z)),r=n,m=h+Z),z<0?(X=Math.max(W-o,Math.min(K-o,X)),l=o+X,D=_):z>0&&(X=Math.max(W-_,Math.min(K-_,X)),l=o,D=_+X);break;case v:U&&(r=Math.max(H,Math.min($,n-Z*U)),m=Math.max(H,Math.min($,h+Z*U))),z&&(l=Math.max(W,Math.min(K,o-X*z)),D=Math.max(W,Math.min(K,_+X*z)))}m<r&&(U*=-1,t=n,n=h,h=t,t=r,r=m,m=t,B in S&&it.attr("cursor",A[B=S[B]])),D<l&&(z*=-1,t=o,o=_,_=t,t=l,l=D,D=t,B in M&&it.attr("cursor",A[B=M[B]])),Y.selection&&(G=Y.selection),N&&(r=G[0][0],m=G[1][0]),I&&(l=G[0][1],D=G[1][1]),G[0][0]===r&&G[0][1]===l&&G[1][0]===m&&G[1][1]===D||(Y.selection=[[r,l],[m,D]],F.call(L),nt.brush())}function st(){if(d(),u.c.touches){if(u.c.touches.length)return;e&&clearTimeout(e),e=setTimeout((function(){e=null}),500)}else Object(i.b)(u.c.view,C),ot.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);rt.attr("pointer-events","all"),it.attr("cursor",A.overlay),Y.selection&&(G=Y.selection),j(G)&&(Y.selection=null,F.call(L)),nt.end()}function ct(){switch(u.c.keyCode){case 16:J=U&&z;break;case 18:P===b&&(U&&(h=m-Z*U,n=r+Z*U),z&&(_=D-X*z,o=l+X*z),P=v,ut());break;case 32:P!==b&&P!==v||(U<0?h=m-Z:U>0&&(n=r-Z),z<0?_=D-X:z>0&&(o=l-X),P=y,it.attr("cursor",A.selection),ut());break;default:return}p()}function ft(){switch(u.c.keyCode){case 16:J&&(N=I=J=!1,ut());break;case 18:P===v&&(U<0?h=m:U>0&&(n=r),z<0?_=D:z>0&&(o=l),P=b,ut());break;case 32:P===y&&(u.c.altKey?(U&&(h=m-Z*U,n=r+Z*U),z&&(_=D-X*z,o=l+X*z),P=v):(U<0?h=m:U>0&&(n=r),z<0?_=D:z>0&&(o=l),P=b),it.attr("cursor",A[B]),ut());break;default:return}p()}}function Y(){q(this,arguments).moved()}function V(){q(this,arguments).ended()}function G(){var e=this.__brush||{selection:null};return e.extent=_(n.apply(this,arguments)),e.dim=t,e}return P.move=function(e,n){e.selection?e.on("start.brush",(function(){q(this,arguments).beforestart().start()})).on("interrupt.brush end.brush",(function(){q(this,arguments).end()})).tween("brush",(function(){var e=this,r=e.__brush,i=q(e,arguments),a=r.selection,u=t.input("function"==typeof n?n.apply(this,arguments):n,r.extent),s=Object(o.a)(a,u);function c(t){r.selection=1===t&&null===u?null:s(t),F.call(e),i.brush()}return null!==a&&null!==u?c:c(1)})):e.each((function(){var e=this,r=arguments,i=e.__brush,o=t.input("function"==typeof n?n.apply(e,r):n,i.extent),a=q(e,r).beforestart();Object(f.b)(e),i.selection=null===o?null:o,F.call(e),a.start().brush().end()}))},P.clear=function(t){P.move(t,null)},U.prototype={beforestart:function(){return 1==++this.active&&(this.state.emitter=this,this.starting=!0),this},start:function(){return this.starting?(this.starting=!1,this.emit("start")):this.emit("brush"),this},brush:function(){return this.emit("brush"),this},end:function(){return 0==--this.active&&(delete this.state.emitter,this.emit("end")),this},emit:function(e){Object(u.a)(new h(P,e,t.output(this.state.selection)),L.apply,L,[e,this.that,this.args])}},P.extent=function(t){return arguments.length?(n="function"==typeof t?t:l(_(t)),P):n},P.filter=function(t){return arguments.length?(a="function"==typeof t?t:l(!!t),P):a},P.touchable=function(t){return arguments.length?(m="function"==typeof t?t:l(!!t),P):m},P.handleSize=function(t){return arguments.length?(B=+t,P):B},P.keyModifiers=function(t){return arguments.length?(E=!!t,P):E},P.on=function(){var t=L.on.apply(L,arguments);return t===L?P:t},P}n.d(e,"a",(function(){return F})),n.d(e,"c",(function(){return B})),n.d(e,"d",(function(){return P})),n.d(e,"b",(function(){return L}))},function(t,e,n){"use strict";var r=Array.prototype.slice,i=function(t){return t};function o(t){return"translate("+(t+.5)+",0)"}function a(t){return"translate(0,"+(t+.5)+")"}function u(t){return function(e){return+t(e)}}function s(t){var e=Math.max(0,t.bandwidth()-1)/2;return t.round()&&(e=Math.round(e)),function(n){return+t(n)+e}}function c(){return!this.__axis}function f(t,e){var n=[],f=null,l=null,h=6,d=6,p=3,g=1===t||4===t?-1:1,y=4===t||2===t?"x":"y",b=1===t||3===t?o:a;function v(r){var o=null==f?e.ticks?e.ticks.apply(e,n):e.domain():f,a=null==l?e.tickFormat?e.tickFormat.apply(e,n):i:l,v=Math.max(h,0)+p,m=e.range(),_=+m[0]+.5,w=+m[m.length-1]+.5,x=(e.bandwidth?s:u)(e.copy()),k=r.selection?r.selection():r,E=k.selectAll(".domain").data([null]),A=k.selectAll(".tick").data(o,e).order(),S=A.exit(),M=A.enter().append("g").attr("class","tick"),T=A.select("line"),O=A.select("text");E=E.merge(E.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),A=A.merge(M),T=T.merge(M.append("line").attr("stroke","currentColor").attr(y+"2",g*h)),O=O.merge(M.append("text").attr("fill","currentColor").attr(y,g*v).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),r!==k&&(E=E.transition(r),A=A.transition(r),T=T.transition(r),O=O.transition(r),S=S.transition(r).attr("opacity",1e-6).attr("transform",(function(t){return isFinite(t=x(t))?b(t):this.getAttribute("transform")})),M.attr("opacity",1e-6).attr("transform",(function(t){var e=this.parentNode.__axis;return b(e&&isFinite(e=e(t))?e:x(t))}))),S.remove(),E.attr("d",4===t||2==t?d?"M"+g*d+","+_+"H0.5V"+w+"H"+g*d:"M0.5,"+_+"V"+w:d?"M"+_+","+g*d+"V0.5H"+w+"V"+g*d:"M"+_+",0.5H"+w),A.attr("opacity",1).attr("transform",(function(t){return b(x(t))})),T.attr(y+"2",g*h),O.attr(y,g*v).text(a),k.filter(c).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===t?"start":4===t?"end":"middle"),k.each((function(){this.__axis=x}))}return v.scale=function(t){return arguments.length?(e=t,v):e},v.ticks=function(){return n=r.call(arguments),v},v.tickArguments=function(t){return arguments.length?(n=null==t?[]:r.call(t),v):n.slice()},v.tickValues=function(t){return arguments.length?(f=null==t?null:r.call(t),v):f&&f.slice()},v.tickFormat=function(t){return arguments.length?(l=t,v):l},v.tickSize=function(t){return arguments.length?(h=d=+t,v):h},v.tickSizeInner=function(t){return arguments.length?(h=+t,v):h},v.tickSizeOuter=function(t){return arguments.length?(d=+t,v):d},v.tickPadding=function(t){return arguments.length?(p=+t,v):p},v}function l(t){return f(1,t)}function h(t){return f(2,t)}function d(t){return f(3,t)}function p(t){return f(4,t)}n.d(e,"d",(function(){return l})),n.d(e,"c",(function(){return h})),n.d(e,"a",(function(){return d})),n.d(e,"b",(function(){return p}))},function(t,e,n){"use strict";var r=n(104);e.a=function(t){var e=t.length;return function(n){var i=Math.floor(((n%=1)<0?++n:n)*e),o=t[(i+e-1)%e],a=t[i%e],u=t[(i+1)%e],s=t[(i+2)%e];return Object(r.a)((n-i/e)*e,o,a,u,s)}}},function(t,e,n){"use strict";var r=n(23),i=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,o=new RegExp(i.source,"g");e.a=function(t,e){var n,a,u,s=i.lastIndex=o.lastIndex=0,c=-1,f=[],l=[];for(t+="",e+="";(n=i.exec(t))&&(a=o.exec(e));)(u=a.index)>s&&(u=e.slice(s,u),f[c]?f[c]+=u:f[++c]=u),(n=n[0])===(a=a[0])?f[c]?f[c]+=a:f[++c]=a:(f[++c]=null,l.push({i:c,x:Object(r.a)(n,a)})),s=o.lastIndex;return s<e.length&&(u=e.slice(s),f[c]?f[c]+=u:f[++c]=u),f.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)f[(n=l[r]).i]=n.x(t);return f.join("")})}},function(t,e,n){"use strict";e.a=function(t){return function(){return this.matches(t)}}},function(t,e,n){"use strict";function r(){return[]}e.a=function(t){return null==t?r:function(){return this.querySelectorAll(t)}}},function(t,e,n){"use strict";n.d(e,"b",(function(){return u}));var r=n(107);function i(t){return function(){this.style.removeProperty(t)}}function o(t,e,n){return function(){this.style.setProperty(t,e,n)}}function a(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function u(t,e){return t.style.getPropertyValue(e)||Object(r.a)(t).getComputedStyle(t,null).getPropertyValue(e)}e.a=function(t,e,n){return arguments.length>1?this.each((null==e?i:"function"==typeof e?a:o)(t,e,null==n?"":n)):u(this.node(),t)}},function(t,e,n){"use strict";e.a=function(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}},function(t,e,n){"use strict";n.d(e,"b",(function(){return o}));var r=n(108),i=n(69);function o(t,e){var n,i=e?e.length:0,o=t?Math.min(i,t.length):0,a=new Array(o),u=new Array(i);for(n=0;n<o;++n)a[n]=Object(r.a)(t[n],e[n]);for(;n<i;++n)u[n]=e[n];return function(t){for(n=0;n<o;++n)u[n]=a[n](t);return u}}e.a=function(t,e){return(Object(i.b)(e)?i.a:o)(t,e)}},function(t,e,n){"use strict";var r=n(108);e.a=function(t,e){var n,i={},o={};for(n in null!==t&&"object"==typeof t||(t={}),null!==e&&"object"==typeof e||(e={}),e)n in t?i[n]=Object(r.a)(t[n],e[n]):o[n]=e[n];return function(t){for(n in i)o[n]=i[n](t);return o}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return h}));var r=n(10),i=n(142),o=n(9),a=n(141),u=n(70),s=n(71);function c(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 f(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 l(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function h(t){var e=t.dateTime,n=t.date,u=t.time,s=t.periods,h=t.days,p=t.shortDays,g=t.months,y=t.shortMonths,b=m(s),v=_(s),Et=m(h),At=_(h),St=m(p),Mt=_(p),Tt=m(g),Ot=_(g),Dt=m(y),Ct=_(y),Nt={a:function(t){return p[t.getDay()]},A:function(t){return h[t.getDay()]},b:function(t){return y[t.getMonth()]},B:function(t){return g[t.getMonth()]},c:null,d:U,e:U,f:H,H:z,I:Y,j:V,L:G,m:W,M:$,p:function(t){return s[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:xt,s:kt,S:K,u:Z,U:X,V:J,w:Q,W:tt,x:null,X:null,y:et,Y:nt,Z:rt,"%":wt},It={a:function(t){return p[t.getUTCDay()]},A:function(t){return h[t.getUTCDay()]},b:function(t){return y[t.getUTCMonth()]},B:function(t){return g[t.getUTCMonth()]},c:null,d:it,e:it,f:ct,H:ot,I:at,j:ut,L:st,m:ft,M:lt,p:function(t){return s[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:xt,s:kt,S:ht,u:dt,U:pt,V:gt,w:yt,W:bt,x:null,X:null,y:vt,Y:mt,Z:_t,"%":wt},Rt={a:function(t,e,n){var r=St.exec(e.slice(n));return r?(t.w=Mt[r[0].toLowerCase()],n+r[0].length):-1},A:function(t,e,n){var r=Et.exec(e.slice(n));return r?(t.w=At[r[0].toLowerCase()],n+r[0].length):-1},b:function(t,e,n){var r=Dt.exec(e.slice(n));return r?(t.m=Ct[r[0].toLowerCase()],n+r[0].length):-1},B:function(t,e,n){var r=Tt.exec(e.slice(n));return r?(t.m=Ot[r[0].toLowerCase()],n+r[0].length):-1},c:function(t,n,r){return Bt(t,e,n,r)},d:C,e:C,f:B,H:I,I:I,j:N,L:L,m:D,M:R,p:function(t,e,n){var r=b.exec(e.slice(n));return r?(t.p=v[r[0].toLowerCase()],n+r[0].length):-1},q:O,Q:F,s:q,S:j,u:x,U:k,V:E,w:w,W:A,x:function(t,e,r){return Bt(t,n,e,r)},X:function(t,e,n){return Bt(t,u,e,n)},y:M,Y:S,Z:T,"%":P};function jt(t,e){return function(n){var r,i,o,a=[],u=-1,s=0,c=t.length;for(n instanceof Date||(n=new Date(+n));++u<c;)37===t.charCodeAt(u)&&(a.push(t.slice(s,u)),null!=(i=d[r=t.charAt(++u)])?r=t.charAt(++u):i="e"===r?" ":"0",(o=e[r])&&(r=o(n,i)),a.push(r),s=u+1);return a.push(t.slice(s,u)),a.join("")}}function Lt(t,e){return function(n){var u,s,h=l(1900,void 0,1);if(Bt(h,t,n+="",0)!=n.length)return null;if("Q"in h)return new Date(h.Q);if("s"in h)return new Date(1e3*h.s+("L"in h?h.L:0));if(!e||"Z"in h||(h.Z=0),"p"in h&&(h.H=h.H%12+12*h.p),void 0===h.m&&(h.m="q"in h?h.q:0),"V"in h){if(h.V<1||h.V>53)return null;"w"in h||(h.w=1),"Z"in h?(s=(u=f(l(h.y,0,1))).getUTCDay(),u=s>4||0===s?r.c.ceil(u):Object(r.c)(u),u=i.a.offset(u,7*(h.V-1)),h.y=u.getUTCFullYear(),h.m=u.getUTCMonth(),h.d=u.getUTCDate()+(h.w+6)%7):(s=(u=c(l(h.y,0,1))).getDay(),u=s>4||0===s?o.c.ceil(u):Object(o.c)(u),u=a.b.offset(u,7*(h.V-1)),h.y=u.getFullYear(),h.m=u.getMonth(),h.d=u.getDate()+(h.w+6)%7)}else("W"in h||"U"in h)&&("w"in h||(h.w="u"in h?h.u%7:"W"in h?1:0),s="Z"in h?f(l(h.y,0,1)).getUTCDay():c(l(h.y,0,1)).getDay(),h.m=0,h.d="W"in h?(h.w+6)%7+7*h.W-(s+5)%7:h.w+7*h.U-(s+6)%7);return"Z"in h?(h.H+=h.Z/100|0,h.M+=h.Z%100,f(h)):c(h)}}function Bt(t,e,n,r){for(var i,o,a=0,u=e.length,s=n.length;a<u;){if(r>=s)return-1;if(37===(i=e.charCodeAt(a++))){if(i=e.charAt(a++),!(o=Rt[i in d?e.charAt(a++):i])||(r=o(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return(Nt.x=jt(n,Nt),Nt.X=jt(u,Nt),Nt.c=jt(e,Nt),It.x=jt(n,It),It.X=jt(u,It),It.c=jt(e,It),{format:function(t){var e=jt(t+="",Nt);return e.toString=function(){return t},e},parse:function(t){var e=Lt(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=jt(t+="",It);return e.toString=function(){return t},e},utcParse:function(t){var e=Lt(t+="",!0);return e.toString=function(){return t},e}})}var d={"-":"",_:" ",0:"0"},p=/^\s*\d+/,g=/^%/,y=/[\\^$*+?|[\]().{}]/g;function b(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(e)+i:i)}function v(t){return t.replace(y,"\\$&")}function m(t){return new RegExp("^(?:"+t.map(v).join("|")+")","i")}function _(t){for(var e={},n=-1,r=t.length;++n<r;)e[t[n].toLowerCase()]=n;return e}function w(t,e,n){var r=p.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function x(t,e,n){var r=p.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function k(t,e,n){var r=p.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function E(t,e,n){var r=p.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function A(t,e,n){var r=p.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function S(t,e,n){var r=p.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function M(t,e,n){var r=p.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function T(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 O(t,e,n){var r=p.exec(e.slice(n,n+1));return r?(t.q=3*r[0]-3,n+r[0].length):-1}function D(t,e,n){var r=p.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function C(t,e,n){var r=p.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function N(t,e,n){var r=p.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function I(t,e,n){var r=p.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function R(t,e,n){var r=p.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function j(t,e,n){var r=p.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function L(t,e,n){var r=p.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function B(t,e,n){var r=p.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function P(t,e,n){var r=g.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function F(t,e,n){var r=p.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function q(t,e,n){var r=p.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function U(t,e){return b(t.getDate(),e,2)}function z(t,e){return b(t.getHours(),e,2)}function Y(t,e){return b(t.getHours()%12||12,e,2)}function V(t,e){return b(1+a.b.count(Object(u.a)(t),t),e,3)}function G(t,e){return b(t.getMilliseconds(),e,3)}function H(t,e){return G(t,e)+"000"}function W(t,e){return b(t.getMonth()+1,e,2)}function $(t,e){return b(t.getMinutes(),e,2)}function K(t,e){return b(t.getSeconds(),e,2)}function Z(t){var e=t.getDay();return 0===e?7:e}function X(t,e){return b(o.g.count(Object(u.a)(t)-1,t),e,2)}function J(t,e){var n=t.getDay();return t=n>=4||0===n?Object(o.i)(t):o.i.ceil(t),b(o.i.count(Object(u.a)(t),t)+(4===Object(u.a)(t).getDay()),e,2)}function Q(t){return t.getDay()}function tt(t,e){return b(o.c.count(Object(u.a)(t)-1,t),e,2)}function et(t,e){return b(t.getFullYear()%100,e,2)}function nt(t,e){return b(t.getFullYear()%1e4,e,4)}function rt(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+b(e/60|0,"0",2)+b(e%60,"0",2)}function it(t,e){return b(t.getUTCDate(),e,2)}function ot(t,e){return b(t.getUTCHours(),e,2)}function at(t,e){return b(t.getUTCHours()%12||12,e,2)}function ut(t,e){return b(1+i.a.count(Object(s.a)(t),t),e,3)}function st(t,e){return b(t.getUTCMilliseconds(),e,3)}function ct(t,e){return st(t,e)+"000"}function ft(t,e){return b(t.getUTCMonth()+1,e,2)}function lt(t,e){return b(t.getUTCMinutes(),e,2)}function ht(t,e){return b(t.getUTCSeconds(),e,2)}function dt(t){var e=t.getUTCDay();return 0===e?7:e}function pt(t,e){return b(r.g.count(Object(s.a)(t)-1,t),e,2)}function gt(t,e){var n=t.getUTCDay();return t=n>=4||0===n?Object(r.i)(t):r.i.ceil(t),b(r.i.count(Object(s.a)(t),t)+(4===Object(s.a)(t).getUTCDay()),e,2)}function yt(t){return t.getUTCDay()}function bt(t,e){return b(r.c.count(Object(s.a)(t)-1,t),e,2)}function vt(t,e){return b(t.getUTCFullYear()%100,e,2)}function mt(t,e){return b(t.getUTCFullYear()%1e4,e,4)}function _t(){return"+0000"}function wt(){return"%"}function xt(t){return+t}function kt(t){return Math.floor(+t/1e3)}},function(t,e,n){"use strict";var r,i=n(48),o=n(111),a=n(83),u=function(t,e){var n=Object(a.a)(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")},s={"%":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.round(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 u(100*t,e)},r:u,s:function(t,e){var n=Object(a.a)(t,e);if(!n)return t+"";var i=n[0],o=n[1],u=o-(r=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,s=i.length;return u===s?i:u>s?i+new Array(u-s+1).join("0"):u>0?i.slice(0,u)+"."+i.slice(u):"0."+new Array(1-u).join("0")+Object(a.a)(t,Math.max(0,e+u-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}},c=function(t){return t},f=Array.prototype.map,l=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];e.a=function(t){var e,n,a=void 0===t.grouping||void 0===t.thousands?c:(e=f.call(t.grouping,Number),n=t.thousands+"",function(t,r){for(var i=t.length,o=[],a=0,u=e[0],s=0;i>0&&u>0&&(s+u+1>r&&(u=Math.max(1,r-s)),o.push(t.substring(i-=u,i+u)),!((s+=u+1)>r));)u=e[a=(a+1)%e.length];return o.reverse().join(n)}),u=void 0===t.currency?"":t.currency[0]+"",h=void 0===t.currency?"":t.currency[1]+"",d=void 0===t.decimal?".":t.decimal+"",p=void 0===t.numerals?c:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(f.call(t.numerals,String)),g=void 0===t.percent?"%":t.percent+"",y=void 0===t.minus?"-":t.minus+"",b=void 0===t.nan?"NaN":t.nan+"";function v(t){var e=(t=Object(o.b)(t)).fill,n=t.align,i=t.sign,c=t.symbol,f=t.zero,v=t.width,m=t.comma,_=t.precision,w=t.trim,x=t.type;"n"===x?(m=!0,x="g"):s[x]||(void 0===_&&(_=12),w=!0,x="g"),(f||"0"===e&&"="===n)&&(f=!0,e="0",n="=");var k="$"===c?u:"#"===c&&/[boxX]/.test(x)?"0"+x.toLowerCase():"",E="$"===c?h:/[%p]/.test(x)?g:"",A=s[x],S=/[defgprs%]/.test(x);function M(t){var o,u,s,c=k,h=E;if("c"===x)h=A(t)+h,t="";else{var g=(t=+t)<0;if(t=isNaN(t)?b:A(Math.abs(t),_),w&&(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)),g&&0==+t&&(g=!1),c=(g?"("===i?i:y:"-"===i||"("===i?"":i)+c,h=("s"===x?l[8+r/3]:"")+h+(g&&"("===i?")":""),S)for(o=-1,u=t.length;++o<u;)if(48>(s=t.charCodeAt(o))||s>57){h=(46===s?d+t.slice(o+1):t.slice(o))+h,t=t.slice(0,o);break}}m&&!f&&(t=a(t,1/0));var M=c.length+t.length+h.length,T=M<v?new Array(v-M+1).join(e):"";switch(m&&f&&(t=a(T+t,T.length?v-h.length:1/0),T=""),n){case"<":t=c+t+h+T;break;case"=":t=c+T+t+h;break;case"^":t=T.slice(0,M=T.length>>1)+c+t+h+T.slice(M);break;default:t=T+c+t+h}return p(t)}return _=void 0===_?6:/[gprs]/.test(x)?Math.max(1,Math.min(21,_)):Math.max(0,Math.min(20,_)),M.toString=function(){return t+""},M}return{format:v,formatPrefix:function(t,e){var n=v(((t=Object(o.b)(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(Object(i.a)(e)/3))),a=Math.pow(10,-r),u=l[8+r/3];return function(t){return n(a*t)+u}}}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return g}));var r=n(24),i=n(11),o=n(116),a=-.14861,u=1.78277,s=-.29227,c=-.90649,f=1.97294,l=f*c,h=f*u,d=u*s-c*a;function p(t){if(t instanceof y)return new y(t.h,t.s,t.l,t.opacity);t instanceof i.b||(t=Object(i.h)(t));var e=t.r/255,n=t.g/255,r=t.b/255,a=(d*r+l*e-h*n)/(d+l-h),u=r-a,p=(f*(n-a)-s*u)/c,g=Math.sqrt(p*p+u*u)/(f*a*(1-a)),b=g?Math.atan2(p,u)*o.b-120:NaN;return new y(b<0?b+360:b,g,a,t.opacity)}function g(t,e,n,r){return 1===arguments.length?p(t):new y(t,e,n,null==r?1:r)}function y(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}Object(r.a)(y,g,Object(r.b)(i.a,{brighter:function(t){return t=null==t?i.c:Math.pow(i.c,t),new y(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?i.d:Math.pow(i.d,t),new y(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*o.a,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),l=Math.sin(t);return new i.b(255*(e+n*(a*r+u*l)),255*(e+n*(s*r+c*l)),255*(e+n*(f*r)),this.opacity)}}))},function(t,e,n){"use strict";var r=/^(%20|\s)*(javascript|data)/im,i=/[^\x20-\x7E]/gim,o=/^([^:]+):/gm,a=[".","/"];t.exports={sanitizeUrl:function(t){if(!t)return"about:blank";var e,n,u=t.replace(i,"").trim();return function(t){return a.indexOf(t[0])>-1}(u)?u:(n=u.match(o))?(e=n[0],r.test(e)?"about:blank":u):"about:blank"}}},function(t,e,n){(function(t,r){var i=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[2,3],n=[1,7],r=[7,12,15,17,19,20,21],i=[7,11,12,15,17,19,20,21],o=[2,20],a=[1,32],u={trace:function(){},yy:{},symbols_:{error:2,start:3,GG:4,":":5,document:6,EOF:7,DIR:8,options:9,body:10,OPT:11,NL:12,line:13,statement:14,COMMIT:15,commit_arg:16,BRANCH:17,ID:18,CHECKOUT:19,MERGE:20,RESET:21,reset_arg:22,STR:23,HEAD:24,reset_parents:25,CARET:26,$accept:0,$end:1},terminals_:{2:"error",4:"GG",5:":",7:"EOF",8:"DIR",11:"OPT",12:"NL",15:"COMMIT",17:"BRANCH",18:"ID",19:"CHECKOUT",20:"MERGE",21:"RESET",23:"STR",24:"HEAD",26:"CARET"},productions_:[0,[3,4],[3,5],[6,0],[6,2],[9,2],[9,1],[10,0],[10,2],[13,2],[13,1],[14,2],[14,2],[14,2],[14,2],[14,2],[16,0],[16,1],[22,2],[22,2],[25,0],[25,2]],performAction:function(t,e,n,r,i,o,a){var u=o.length-1;switch(i){case 1:return o[u-1];case 2:return r.setDirection(o[u-3]),o[u-1];case 4:r.setOptions(o[u-1]),this.$=o[u];break;case 5:o[u-1]+=o[u],this.$=o[u-1];break;case 7:this.$=[];break;case 8:o[u-1].push(o[u]),this.$=o[u-1];break;case 9:this.$=o[u-1];break;case 11:r.commit(o[u]);break;case 12:r.branch(o[u]);break;case 13:r.checkout(o[u]);break;case 14:r.merge(o[u]);break;case 15:r.reset(o[u]);break;case 16:this.$="";break;case 17:this.$=o[u];break;case 18:this.$=o[u-1]+":"+o[u];break;case 19:this.$=o[u-1]+":"+r.count,r.count=0;break;case 20:r.count=0;break;case 21:r.count+=1}},table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3],8:[1,4]},{6:5,7:e,9:6,12:n},{5:[1,8]},{7:[1,9]},t(r,[2,7],{10:10,11:[1,11]}),t(i,[2,6]),{6:12,7:e,9:6,12:n},{1:[2,1]},{7:[2,4],12:[1,15],13:13,14:14,15:[1,16],17:[1,17],19:[1,18],20:[1,19],21:[1,20]},t(i,[2,5]),{7:[1,21]},t(r,[2,8]),{12:[1,22]},t(r,[2,10]),{12:[2,16],16:23,23:[1,24]},{18:[1,25]},{18:[1,26]},{18:[1,27]},{18:[1,30],22:28,24:[1,29]},{1:[2,2]},t(r,[2,9]),{12:[2,11]},{12:[2,17]},{12:[2,12]},{12:[2,13]},{12:[2,14]},{12:[2,15]},{12:o,25:31,26:a},{12:o,25:33,26:a},{12:[2,18]},{12:o,25:34,26:a},{12:[2,19]},{12:[2,21]}],defaultActions:{9:[2,1],21:[2,2],23:[2,11],24:[2,17],25:[2,12],26:[2,13],27:[2,14],28:[2,15],31:[2,18],33:[2,19],34:[2,21]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],o=[],a=this.table,u="",s=0,c=0,f=0,l=2,h=1,d=o.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var b=p.yylloc;o.push(b);var v=p.options&&p.options.ranges;function m(){var t;return"number"!=typeof(t=r.pop()||p.lex()||h)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var _,w,x,k,E,A,S,M,T,O={};;){if(x=n[n.length-1],this.defaultActions[x]?k=this.defaultActions[x]:(null==_&&(_=m()),k=a[x]&&a[x][_]),void 0===k||!k.length||!k[0]){var D="";for(A in T=[],a[x])this.terminals_[A]&&A>l&&T.push("'"+this.terminals_[A]+"'");D=p.showPosition?"Parse error on line "+(s+1)+":\n"+p.showPosition()+"\nExpecting "+T.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(s+1)+": Unexpected "+(_==h?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(D,{text:p.match,token:this.terminals_[_]||_,line:p.yylineno,loc:b,expected:T})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+x+", token: "+_);switch(k[0]){case 1:n.push(_),i.push(p.yytext),o.push(p.yylloc),n.push(k[1]),_=null,w?(_=w,w=null):(c=p.yyleng,u=p.yytext,s=p.yylineno,b=p.yylloc,f>0&&f--);break;case 2:if(S=this.productions_[k[1]][1],O.$=i[i.length-S],O._$={first_line:o[o.length-(S||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(S||1)].first_column,last_column:o[o.length-1].last_column},v&&(O._$.range=[o[o.length-(S||1)].range[0],o[o.length-1].range[1]]),void 0!==(E=this.performAction.apply(O,[u,c,s,g.yy,k[1],i,o].concat(d))))return E;S&&(n=n.slice(0,-1*S*2),i=i.slice(0,-1*S),o=o.slice(0,-1*S)),n.push(this.productions_[k[1]][0]),i.push(O.$),o.push(O._$),M=a[n[n.length-2]][n[n.length-1]],n.push(M);break;case 3:return!0}}return!0}},s={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var o in i)this[o]=i[o];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),o=0;o<i.length;o++)if((n=this._input.match(this.rules[i[o]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=o,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[o])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return 12;case 1:case 2:case 3:break;case 4:return 4;case 5:return 15;case 6:return 17;case 7:return 20;case 8:return 21;case 9:return 19;case 10:case 11:return 8;case 12:return 5;case 13:return 26;case 14:this.begin("options");break;case 15:this.popState();break;case 16:return 11;case 17:this.begin("string");break;case 18:this.popState();break;case 19:return 23;case 20:return 18;case 21:return 7}},rules:[/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:gitGraph\b)/i,/^(?:commit\b)/i,/^(?:branch\b)/i,/^(?:merge\b)/i,/^(?:reset\b)/i,/^(?:checkout\b)/i,/^(?:LR\b)/i,/^(?:BT\b)/i,/^(?::)/i,/^(?:\^)/i,/^(?:options\r?\n)/i,/^(?:end\r?\n)/i,/^(?:[^\n]+\r?\n)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[a-zA-Z][a-zA-Z0-9_]+)/i,/^(?:$)/i],conditions:{options:{rules:[15,16],inclusive:!1},string:{rules:[18,19],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,17,20,21],inclusive:!0}}};function c(){this.yy={}}return u.lexer=s,c.prototype=u,u.Parser=c,new c}();e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(r){r[1]||(console.log("Usage: "+r[0]+" FILE"),t.exit(1));var i=n(54).readFileSync(n(55).normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n(17),n(14)(t))},function(t,e,n){(function(t,r){var i=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[6,9,10],n={trace:function(){},yy:{},symbols_:{error:2,start:3,info:4,document:5,EOF:6,line:7,statement:8,NL:9,showInfo:10,$accept:0,$end:1},terminals_:{2:"error",4:"info",6:"EOF",9:"NL",10:"showInfo"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[8,1]],performAction:function(t,e,n,r,i,o,a){o.length;switch(i){case 1:return r;case 4:break;case 6:r.setInfo(!0)}},table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:6,9:[1,7],10:[1,8]},{1:[2,1]},t(e,[2,3]),t(e,[2,4]),t(e,[2,5]),t(e,[2,6])],defaultActions:{4:[2,1]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],o=[],a=this.table,u="",s=0,c=0,f=0,l=2,h=1,d=o.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var b=p.yylloc;o.push(b);var v=p.options&&p.options.ranges;function m(){var t;return"number"!=typeof(t=r.pop()||p.lex()||h)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var _,w,x,k,E,A,S,M,T,O={};;){if(x=n[n.length-1],this.defaultActions[x]?k=this.defaultActions[x]:(null==_&&(_=m()),k=a[x]&&a[x][_]),void 0===k||!k.length||!k[0]){var D="";for(A in T=[],a[x])this.terminals_[A]&&A>l&&T.push("'"+this.terminals_[A]+"'");D=p.showPosition?"Parse error on line "+(s+1)+":\n"+p.showPosition()+"\nExpecting "+T.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(s+1)+": Unexpected "+(_==h?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(D,{text:p.match,token:this.terminals_[_]||_,line:p.yylineno,loc:b,expected:T})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+x+", token: "+_);switch(k[0]){case 1:n.push(_),i.push(p.yytext),o.push(p.yylloc),n.push(k[1]),_=null,w?(_=w,w=null):(c=p.yyleng,u=p.yytext,s=p.yylineno,b=p.yylloc,f>0&&f--);break;case 2:if(S=this.productions_[k[1]][1],O.$=i[i.length-S],O._$={first_line:o[o.length-(S||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(S||1)].first_column,last_column:o[o.length-1].last_column},v&&(O._$.range=[o[o.length-(S||1)].range[0],o[o.length-1].range[1]]),void 0!==(E=this.performAction.apply(O,[u,c,s,g.yy,k[1],i,o].concat(d))))return E;S&&(n=n.slice(0,-1*S*2),i=i.slice(0,-1*S),o=o.slice(0,-1*S)),n.push(this.productions_[k[1]][0]),i.push(O.$),o.push(O._$),M=a[n[n.length-2]][n[n.length-1]],n.push(M);break;case 3:return!0}}return!0}},r={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var o in i)this[o]=i[o];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),o=0;o<i.length;o++)if((n=this._input.match(this.rules[i[o]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=o,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[o])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return 4;case 1:return 9;case 2:return"space";case 3:return 10;case 4:return 6;case 5:return"TXT"}},rules:[/^(?:info\b)/i,/^(?:[\s\n\r]+)/i,/^(?:[\s]+)/i,/^(?:showInfo\b)/i,/^(?:$)/i,/^(?:.)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5],inclusive:!0}}};function i(){this.yy={}}return n.lexer=r,i.prototype=n,n.Parser=i,new i}();e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(r){r[1]||(console.log("Usage: "+r[0]+" FILE"),t.exit(1));var i=n(54).readFileSync(n(55).normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n(17),n(14)(t))},function(t,e,n){(function(t,r){var i=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[6,9,10,12],n={trace:function(){},yy:{},symbols_:{error:2,start:3,pie:4,document:5,EOF:6,line:7,statement:8,NL:9,STR:10,VALUE:11,title:12,$accept:0,$end:1},terminals_:{2:"error",4:"pie",6:"EOF",9:"NL",10:"STR",11:"VALUE",12:"title"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[8,2],[8,1]],performAction:function(t,e,n,r,i,o,a){var u=o.length-1;switch(i){case 4:break;case 6:r.addSection(o[u-1],r.cleanupValue(o[u]));break;case 7:r.setTitle(o[u].substr(6)),this.$=o[u].substr(6)}},table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:6,9:[1,7],10:[1,8],12:[1,9]},{1:[2,1]},t(e,[2,3]),t(e,[2,4]),t(e,[2,5]),{11:[1,10]},t(e,[2,7]),t(e,[2,6])],defaultActions:{4:[2,1]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],o=[],a=this.table,u="",s=0,c=0,f=0,l=2,h=1,d=o.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var b=p.yylloc;o.push(b);var v=p.options&&p.options.ranges;function m(){var t;return"number"!=typeof(t=r.pop()||p.lex()||h)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var _,w,x,k,E,A,S,M,T,O={};;){if(x=n[n.length-1],this.defaultActions[x]?k=this.defaultActions[x]:(null==_&&(_=m()),k=a[x]&&a[x][_]),void 0===k||!k.length||!k[0]){var D="";for(A in T=[],a[x])this.terminals_[A]&&A>l&&T.push("'"+this.terminals_[A]+"'");D=p.showPosition?"Parse error on line "+(s+1)+":\n"+p.showPosition()+"\nExpecting "+T.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(s+1)+": Unexpected "+(_==h?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(D,{text:p.match,token:this.terminals_[_]||_,line:p.yylineno,loc:b,expected:T})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+x+", token: "+_);switch(k[0]){case 1:n.push(_),i.push(p.yytext),o.push(p.yylloc),n.push(k[1]),_=null,w?(_=w,w=null):(c=p.yyleng,u=p.yytext,s=p.yylineno,b=p.yylloc,f>0&&f--);break;case 2:if(S=this.productions_[k[1]][1],O.$=i[i.length-S],O._$={first_line:o[o.length-(S||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(S||1)].first_column,last_column:o[o.length-1].last_column},v&&(O._$.range=[o[o.length-(S||1)].range[0],o[o.length-1].range[1]]),void 0!==(E=this.performAction.apply(O,[u,c,s,g.yy,k[1],i,o].concat(d))))return E;S&&(n=n.slice(0,-1*S*2),i=i.slice(0,-1*S),o=o.slice(0,-1*S)),n.push(this.productions_[k[1]][0]),i.push(O.$),o.push(O._$),M=a[n[n.length-2]][n[n.length-1]],n.push(M);break;case 3:return!0}}return!0}},r={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var o in i)this[o]=i[o];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),o=0;o<i.length;o++)if((n=this._input.match(this.rules[i[o]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=o,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[o])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:case 1:break;case 2:return 4;case 3:return 9;case 4:return"space";case 5:return 12;case 6:this.begin("string");break;case 7:this.popState();break;case 8:return"STR";case 9:return"VALUE";case 10:return 6}},rules:[/^(?:%%[^\n]*)/i,/^(?:\s+)/i,/^(?:pie\b)/i,/^(?:[\s\n\r]+)/i,/^(?:[\s]+)/i,/^(?:title\s[^#\n;]+)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?::[\s]*[\d]+(?:\.[\d]+)?)/i,/^(?:$)/i],conditions:{string:{rules:[7,8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,9,10],inclusive:!0}}};function i(){this.yy={}}return n.lexer=r,i.prototype=n,n.Parser=i,new i}();e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(r){r[1]||(console.log("Usage: "+r[0]+" FILE"),t.exit(1));var i=n(54).readFileSync(n(55).normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n(17),n(14)(t))},function(t,e,n){(function(t,r){var i=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[6,12],n=[1,7],r=[1,10],i=[1,11],o=[1,12],a=[1,13],u=[12,19,20],s=[15,16,17,18],c={trace:function(){},yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,statement:7,entityName:8,relSpec:9,":":10,role:11,ALPHANUM:12,cardinality:13,relType:14,ZERO_OR_ONE:15,ZERO_OR_MORE:16,ONE_OR_MORE:17,ONLY_ONE:18,NON_IDENTIFYING:19,IDENTIFYING:20,STR:21,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",10:":",12:"ALPHANUM",15:"ZERO_OR_ONE",16:"ZERO_OR_MORE",17:"ONE_OR_MORE",18:"ONLY_ONE",19:"NON_IDENTIFYING",20:"IDENTIFYING",21:"STR"},productions_:[0,[3,3],[5,0],[5,2],[7,5],[8,1],[9,3],[13,1],[13,1],[13,1],[13,1],[14,1],[14,1],[11,1],[11,1]],performAction:function(t,e,n,r,i,o,a){var u=o.length-1;switch(i){case 1:break;case 4:r.addEntity(o[u-4]),r.addEntity(o[u-2]),r.addRelationship(o[u-4],o[u],o[u-2],o[u-3]);break;case 5:this.$=o[u];break;case 6:this.$={cardA:o[u],relType:o[u-1],cardB:o[u-2]};break;case 7:this.$=r.Cardinality.ZERO_OR_ONE;break;case 8:this.$=r.Cardinality.ZERO_OR_MORE;break;case 9:this.$=r.Cardinality.ONE_OR_MORE;break;case 10:this.$=r.Cardinality.ONLY_ONE;break;case 11:this.$=r.Identification.NON_IDENTIFYING;break;case 12:this.$=r.Identification.IDENTIFYING;break;case 13:case 14:this.$=o[u]}},table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:6,12:n},{1:[2,1]},t(e,[2,3]),{9:8,13:9,15:r,16:i,17:o,18:a},t([10,15,16,17,18],[2,5]),{8:14,12:n},{14:15,19:[1,16],20:[1,17]},t(u,[2,7]),t(u,[2,8]),t(u,[2,9]),t(u,[2,10]),{10:[1,18]},{13:19,15:r,16:i,17:o,18:a},t(s,[2,11]),t(s,[2,12]),{11:20,12:[1,22],21:[1,21]},{12:[2,6]},t(e,[2,4]),t(e,[2,13]),t(e,[2,14])],defaultActions:{4:[2,1],19:[2,6]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],o=[],a=this.table,u="",s=0,c=0,f=0,l=2,h=1,d=o.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var b=p.yylloc;o.push(b);var v=p.options&&p.options.ranges;function m(){var t;return"number"!=typeof(t=r.pop()||p.lex()||h)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var _,w,x,k,E,A,S,M,T,O={};;){if(x=n[n.length-1],this.defaultActions[x]?k=this.defaultActions[x]:(null==_&&(_=m()),k=a[x]&&a[x][_]),void 0===k||!k.length||!k[0]){var D="";for(A in T=[],a[x])this.terminals_[A]&&A>l&&T.push("'"+this.terminals_[A]+"'");D=p.showPosition?"Parse error on line "+(s+1)+":\n"+p.showPosition()+"\nExpecting "+T.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(s+1)+": Unexpected "+(_==h?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(D,{text:p.match,token:this.terminals_[_]||_,line:p.yylineno,loc:b,expected:T})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+x+", token: "+_);switch(k[0]){case 1:n.push(_),i.push(p.yytext),o.push(p.yylloc),n.push(k[1]),_=null,w?(_=w,w=null):(c=p.yyleng,u=p.yytext,s=p.yylineno,b=p.yylloc,f>0&&f--);break;case 2:if(S=this.productions_[k[1]][1],O.$=i[i.length-S],O._$={first_line:o[o.length-(S||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(S||1)].first_column,last_column:o[o.length-1].last_column},v&&(O._$.range=[o[o.length-(S||1)].range[0],o[o.length-1].range[1]]),void 0!==(E=this.performAction.apply(O,[u,c,s,g.yy,k[1],i,o].concat(d))))return E;S&&(n=n.slice(0,-1*S*2),i=i.slice(0,-1*S),o=o.slice(0,-1*S)),n.push(this.productions_[k[1]][0]),i.push(O.$),o.push(O._$),M=a[n[n.length-2]][n[n.length-1]],n.push(M);break;case 3:return!0}}return!0}},f={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var o in i)this[o]=i[o];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),o=0;o<i.length;o++)if((n=this._input.match(this.rules[i[o]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=o,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[o])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:break;case 1:return"SPACE";case 2:this.begin("string");break;case 3:this.popState();break;case 4:return 21;case 5:return 4;case 6:return 15;case 7:return 16;case 8:return 17;case 9:return 18;case 10:return 15;case 11:return 16;case 12:return 17;case 13:return 19;case 14:return 20;case 15:case 16:return 19;case 17:return 12;case 18:return e.yytext[0];case 19:return 6}},rules:[/^(?:\s+)/i,/^(?:[\s]+)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:erDiagram\b)/i,/^(?:\|o\b)/i,/^(?:\}o\b)/i,/^(?:\}\|)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:[A-Za-z][A-Za-z0-9\-]*)/i,/^(?:.)/i,/^(?:$)/i],conditions:{string:{rules:[3,4],inclusive:!1},INITIAL:{rules:[0,1,2,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19],inclusive:!0}}};function l(){this.yy={}}return c.lexer=f,l.prototype=c,c.Parser=l,new l}();e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(r){r[1]||(console.log("Usage: "+r[0]+" FILE"),t.exit(1));var i=n(54).readFileSync(n(55).normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n(17),n(14)(t))},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));var r=n(211),i=n(6);function o(t){return function e(n){function o(e,o){var a=t((e=Object(r.a)(e)).h,(o=Object(r.a)(o)).h),u=Object(i.a)(e.s,o.s),s=Object(i.a)(e.l,o.l),c=Object(i.a)(e.opacity,o.opacity);return function(t){return e.h=a(t),e.s=u(t),e.l=s(Math.pow(t,n)),e.opacity=c(t),e+""}}return n=+n,o.gamma=e,o}(1)}e.b=o(i.c);var a=o(i.a)},function(t,e,n){"use strict";n.d(e,"b",(function(){return o}));var r=n(4),i=Object(r.a)((function(t){t.setDate(1),t.setHours(0,0,0,0)}),(function(t,e){t.setMonth(t.getMonth()+e)}),(function(t,e){return e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())}),(function(t){return t.getMonth()}));e.a=i;var o=i.range},function(t,e,n){"use strict";n.d(e,"b",(function(){return a}));var r=n(4),i=n(5),o=Object(r.a)((function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*i.d-t.getMinutes()*i.c)}),(function(t,e){t.setTime(+t+e*i.b)}),(function(t,e){return(e-t)/i.b}),(function(t){return t.getHours()}));e.a=o;var a=o.range},function(t,e,n){"use strict";n.d(e,"b",(function(){return a}));var r=n(4),i=n(5),o=Object(r.a)((function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*i.d)}),(function(t,e){t.setTime(+t+e*i.c)}),(function(t,e){return(e-t)/i.c}),(function(t){return t.getMinutes()}));e.a=o;var a=o.range},function(t,e,n){"use strict";n.d(e,"b",(function(){return o}));var r=n(4),i=Object(r.a)((function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCMonth(t.getUTCMonth()+e)}),(function(t,e){return e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear())}),(function(t){return t.getUTCMonth()}));e.a=i;var o=i.range},function(t,e,n){"use strict";n.d(e,"b",(function(){return a}));var r=n(4),i=n(5),o=Object(r.a)((function(t){t.setUTCMinutes(0,0,0)}),(function(t,e){t.setTime(+t+e*i.b)}),(function(t,e){return(e-t)/i.b}),(function(t){return t.getUTCHours()}));e.a=o;var a=o.range},function(t,e,n){"use strict";n.d(e,"b",(function(){return a}));var r=n(4),i=n(5),o=Object(r.a)((function(t){t.setUTCSeconds(0,0)}),(function(t,e){t.setTime(+t+e*i.c)}),(function(t,e){return(e-t)/i.c}),(function(t){return t.getUTCMinutes()}));e.a=o;var a=o.range},function(t,e,n){"use strict";var r=n(27);t.exports=i;function i(t){this._isDirected=!r.has(t,"directed")||t.directed,this._isMultigraph=!!r.has(t,"multigraph")&&t.multigraph,this._isCompound=!!r.has(t,"compound")&&t.compound,this._label=void 0,this._defaultNodeLabelFn=r.constant(void 0),this._defaultEdgeLabelFn=r.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children["\0"]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}function o(t,e){t[e]?t[e]++:t[e]=1}function a(t,e){--t[e]||delete t[e]}function u(t,e,n,i){var o=""+e,a=""+n;if(!t&&o>a){var u=o;o=a,a=u}return o+""+a+""+(r.isUndefined(i)?"\0":i)}function s(t,e,n,r){var i=""+e,o=""+n;if(!t&&i>o){var a=i;i=o,o=a}var u={v:i,w:o};return r&&(u.name=r),u}function c(t,e){return u(t,e.v,e.w,e.name)}i.prototype._nodeCount=0,i.prototype._edgeCount=0,i.prototype.isDirected=function(){return this._isDirected},i.prototype.isMultigraph=function(){return this._isMultigraph},i.prototype.isCompound=function(){return this._isCompound},i.prototype.setGraph=function(t){return this._label=t,this},i.prototype.graph=function(){return this._label},i.prototype.setDefaultNodeLabel=function(t){return r.isFunction(t)||(t=r.constant(t)),this._defaultNodeLabelFn=t,this},i.prototype.nodeCount=function(){return this._nodeCount},i.prototype.nodes=function(){return r.keys(this._nodes)},i.prototype.sources=function(){var t=this;return r.filter(this.nodes(),(function(e){return r.isEmpty(t._in[e])}))},i.prototype.sinks=function(){var t=this;return r.filter(this.nodes(),(function(e){return r.isEmpty(t._out[e])}))},i.prototype.setNodes=function(t,e){var n=arguments,i=this;return r.each(t,(function(t){n.length>1?i.setNode(t,e):i.setNode(t)})),this},i.prototype.setNode=function(t,e){return r.has(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=e),this):(this._nodes[t]=arguments.length>1?e:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]="\0",this._children[t]={},this._children["\0"][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)},i.prototype.node=function(t){return this._nodes[t]},i.prototype.hasNode=function(t){return r.has(this._nodes,t)},i.prototype.removeNode=function(t){var e=this;if(r.has(this._nodes,t)){var n=function(t){e.removeEdge(e._edgeObjs[t])};delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],r.each(this.children(t),(function(t){e.setParent(t)})),delete this._children[t]),r.each(r.keys(this._in[t]),n),delete this._in[t],delete this._preds[t],r.each(r.keys(this._out[t]),n),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this},i.prototype.setParent=function(t,e){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(r.isUndefined(e))e="\0";else{for(var n=e+="";!r.isUndefined(n);n=this.parent(n))if(n===t)throw new Error("Setting "+e+" as parent of "+t+" would create a cycle");this.setNode(e)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=e,this._children[e][t]=!0,this},i.prototype._removeFromParentsChildList=function(t){delete this._children[this._parent[t]][t]},i.prototype.parent=function(t){if(this._isCompound){var e=this._parent[t];if("\0"!==e)return e}},i.prototype.children=function(t){if(r.isUndefined(t)&&(t="\0"),this._isCompound){var e=this._children[t];if(e)return r.keys(e)}else{if("\0"===t)return this.nodes();if(this.hasNode(t))return[]}},i.prototype.predecessors=function(t){var e=this._preds[t];if(e)return r.keys(e)},i.prototype.successors=function(t){var e=this._sucs[t];if(e)return r.keys(e)},i.prototype.neighbors=function(t){var e=this.predecessors(t);if(e)return r.union(e,this.successors(t))},i.prototype.isLeaf=function(t){return 0===(this.isDirected()?this.successors(t):this.neighbors(t)).length},i.prototype.filterNodes=function(t){var e=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});e.setGraph(this.graph());var n=this;r.each(this._nodes,(function(n,r){t(r)&&e.setNode(r,n)})),r.each(this._edgeObjs,(function(t){e.hasNode(t.v)&&e.hasNode(t.w)&&e.setEdge(t,n.edge(t))}));var i={};return this._isCompound&&r.each(e.nodes(),(function(t){e.setParent(t,function t(r){var o=n.parent(r);return void 0===o||e.hasNode(o)?(i[r]=o,o):o in i?i[o]:t(o)}(t))})),e},i.prototype.setDefaultEdgeLabel=function(t){return r.isFunction(t)||(t=r.constant(t)),this._defaultEdgeLabelFn=t,this},i.prototype.edgeCount=function(){return this._edgeCount},i.prototype.edges=function(){return r.values(this._edgeObjs)},i.prototype.setPath=function(t,e){var n=this,i=arguments;return r.reduce(t,(function(t,r){return i.length>1?n.setEdge(t,r,e):n.setEdge(t,r),r})),this},i.prototype.setEdge=function(){var t,e,n,i,a=!1,c=arguments[0];"object"==typeof c&&null!==c&&"v"in c?(t=c.v,e=c.w,n=c.name,2===arguments.length&&(i=arguments[1],a=!0)):(t=c,e=arguments[1],n=arguments[3],arguments.length>2&&(i=arguments[2],a=!0)),t=""+t,e=""+e,r.isUndefined(n)||(n=""+n);var f=u(this._isDirected,t,e,n);if(r.has(this._edgeLabels,f))return a&&(this._edgeLabels[f]=i),this;if(!r.isUndefined(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(e),this._edgeLabels[f]=a?i:this._defaultEdgeLabelFn(t,e,n);var l=s(this._isDirected,t,e,n);return t=l.v,e=l.w,Object.freeze(l),this._edgeObjs[f]=l,o(this._preds[e],t),o(this._sucs[t],e),this._in[e][f]=l,this._out[t][f]=l,this._edgeCount++,this},i.prototype.edge=function(t,e,n){var r=1===arguments.length?c(this._isDirected,arguments[0]):u(this._isDirected,t,e,n);return this._edgeLabels[r]},i.prototype.hasEdge=function(t,e,n){var i=1===arguments.length?c(this._isDirected,arguments[0]):u(this._isDirected,t,e,n);return r.has(this._edgeLabels,i)},i.prototype.removeEdge=function(t,e,n){var r=1===arguments.length?c(this._isDirected,arguments[0]):u(this._isDirected,t,e,n),i=this._edgeObjs[r];return i&&(t=i.v,e=i.w,delete this._edgeLabels[r],delete this._edgeObjs[r],a(this._preds[e],t),a(this._sucs[t],e),delete this._in[e][r],delete this._out[t][r],this._edgeCount--),this},i.prototype.inEdges=function(t,e){var n=this._in[t];if(n){var i=r.values(n);return e?r.filter(i,(function(t){return t.v===e})):i}},i.prototype.outEdges=function(t,e){var n=this._out[t];if(n){var i=r.values(n);return e?r.filter(i,(function(t){return t.w===e})):i}},i.prototype.nodeEdges=function(t,e){var n=this.inEdges(t,e);if(n)return n.concat(this.outEdges(t,e))}},function(t,e,n){var r=n(74)(n(35),"Map");t.exports=r},function(t,e,n){var r=n(472),i=n(479),o=n(481),a=n(482),u=n(483);function s(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}s.prototype.clear=r,s.prototype.delete=i,s.prototype.get=o,s.prototype.has=a,s.prototype.set=u,t.exports=s},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}},function(t,e){t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},function(t,e,n){(function(t){var r=n(294),i=e&&!e.nodeType&&e,o=i&&"object"==typeof t&&t&&!t.nodeType&&t,a=o&&o.exports===i&&r.process,u=function(){try{var t=o&&o.require&&o.require("util").types;return t||a&&a.binding&&a.binding("util")}catch(t){}}();t.exports=u}).call(this,n(14)(t))},function(t,e,n){var r=n(155),i=n(489),o=Object.prototype.hasOwnProperty;t.exports=function(t){if(!r(t))return i(t);var e=[];for(var n in Object(t))o.call(t,n)&&"constructor"!=n&&e.push(n);return e}},function(t,e,n){var r=n(301),i=n(302),o=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,u=a?function(t){return null==t?[]:(t=Object(t),r(a(t),(function(e){return o.call(t,e)})))}:i;t.exports=u},function(t,e){t.exports=function(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}},function(t,e,n){var r=n(307);t.exports=function(t){var e=new t.constructor(t.byteLength);return new r(e).set(new r(t)),e}},function(t,e){t.exports=function(t){return function(){return t}}},function(t,e,n){var r=n(236),i=n(62);t.exports=function(t,e){return t&&r(t,e,i)}},function(t,e,n){var r=n(508)();t.exports=r},function(t,e){t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}},function(t,e,n){var r=n(158),i=n(128);t.exports=function(t,e){for(var n=0,o=(e=r(e,t)).length;null!=t&&n<o;)t=t[i(e[n++])];return n&&n==o?t:void 0}},function(t,e,n){var r=n(15),i=n(91),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;t.exports=function(t,e){if(r(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!i(t))||(a.test(t)||!o.test(t)||null!=e&&t in Object(e))}},function(t,e,n){var r=n(232),i=n(542);t.exports=function t(e,n,o,a,u){var s=-1,c=e.length;for(o||(o=i),u||(u=[]);++s<c;){var f=e[s];n>0&&o(f)?n>1?t(f,n-1,o,a,u):r(u,f):a||(u[u.length]=f)}return u}},function(t,e,n){"use strict";var r=n(29);t.exports=i;function i(t){this._isDirected=!r.has(t,"directed")||t.directed,this._isMultigraph=!!r.has(t,"multigraph")&&t.multigraph,this._isCompound=!!r.has(t,"compound")&&t.compound,this._label=void 0,this._defaultNodeLabelFn=r.constant(void 0),this._defaultEdgeLabelFn=r.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children["\0"]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}function o(t,e){t[e]?t[e]++:t[e]=1}function a(t,e){--t[e]||delete t[e]}function u(t,e,n,i){var o=""+e,a=""+n;if(!t&&o>a){var u=o;o=a,a=u}return o+""+a+""+(r.isUndefined(i)?"\0":i)}function s(t,e,n,r){var i=""+e,o=""+n;if(!t&&i>o){var a=i;i=o,o=a}var u={v:i,w:o};return r&&(u.name=r),u}function c(t,e){return u(t,e.v,e.w,e.name)}i.prototype._nodeCount=0,i.prototype._edgeCount=0,i.prototype.isDirected=function(){return this._isDirected},i.prototype.isMultigraph=function(){return this._isMultigraph},i.prototype.isCompound=function(){return this._isCompound},i.prototype.setGraph=function(t){return this._label=t,this},i.prototype.graph=function(){return this._label},i.prototype.setDefaultNodeLabel=function(t){return r.isFunction(t)||(t=r.constant(t)),this._defaultNodeLabelFn=t,this},i.prototype.nodeCount=function(){return this._nodeCount},i.prototype.nodes=function(){return r.keys(this._nodes)},i.prototype.sources=function(){var t=this;return r.filter(this.nodes(),(function(e){return r.isEmpty(t._in[e])}))},i.prototype.sinks=function(){var t=this;return r.filter(this.nodes(),(function(e){return r.isEmpty(t._out[e])}))},i.prototype.setNodes=function(t,e){var n=arguments,i=this;return r.each(t,(function(t){n.length>1?i.setNode(t,e):i.setNode(t)})),this},i.prototype.setNode=function(t,e){return r.has(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=e),this):(this._nodes[t]=arguments.length>1?e:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]="\0",this._children[t]={},this._children["\0"][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)},i.prototype.node=function(t){return this._nodes[t]},i.prototype.hasNode=function(t){return r.has(this._nodes,t)},i.prototype.removeNode=function(t){var e=this;if(r.has(this._nodes,t)){var n=function(t){e.removeEdge(e._edgeObjs[t])};delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],r.each(this.children(t),(function(t){e.setParent(t)})),delete this._children[t]),r.each(r.keys(this._in[t]),n),delete this._in[t],delete this._preds[t],r.each(r.keys(this._out[t]),n),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this},i.prototype.setParent=function(t,e){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(r.isUndefined(e))e="\0";else{for(var n=e+="";!r.isUndefined(n);n=this.parent(n))if(n===t)throw new Error("Setting "+e+" as parent of "+t+" would create a cycle");this.setNode(e)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=e,this._children[e][t]=!0,this},i.prototype._removeFromParentsChildList=function(t){delete this._children[this._parent[t]][t]},i.prototype.parent=function(t){if(this._isCompound){var e=this._parent[t];if("\0"!==e)return e}},i.prototype.children=function(t){if(r.isUndefined(t)&&(t="\0"),this._isCompound){var e=this._children[t];if(e)return r.keys(e)}else{if("\0"===t)return this.nodes();if(this.hasNode(t))return[]}},i.prototype.predecessors=function(t){var e=this._preds[t];if(e)return r.keys(e)},i.prototype.successors=function(t){var e=this._sucs[t];if(e)return r.keys(e)},i.prototype.neighbors=function(t){var e=this.predecessors(t);if(e)return r.union(e,this.successors(t))},i.prototype.isLeaf=function(t){return 0===(this.isDirected()?this.successors(t):this.neighbors(t)).length},i.prototype.filterNodes=function(t){var e=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});e.setGraph(this.graph());var n=this;r.each(this._nodes,(function(n,r){t(r)&&e.setNode(r,n)})),r.each(this._edgeObjs,(function(t){e.hasNode(t.v)&&e.hasNode(t.w)&&e.setEdge(t,n.edge(t))}));var i={};return this._isCompound&&r.each(e.nodes(),(function(t){e.setParent(t,function t(r){var o=n.parent(r);return void 0===o||e.hasNode(o)?(i[r]=o,o):o in i?i[o]:t(o)}(t))})),e},i.prototype.setDefaultEdgeLabel=function(t){return r.isFunction(t)||(t=r.constant(t)),this._defaultEdgeLabelFn=t,this},i.prototype.edgeCount=function(){return this._edgeCount},i.prototype.edges=function(){return r.values(this._edgeObjs)},i.prototype.setPath=function(t,e){var n=this,i=arguments;return r.reduce(t,(function(t,r){return i.length>1?n.setEdge(t,r,e):n.setEdge(t,r),r})),this},i.prototype.setEdge=function(){var t,e,n,i,a=!1,c=arguments[0];"object"==typeof c&&null!==c&&"v"in c?(t=c.v,e=c.w,n=c.name,2===arguments.length&&(i=arguments[1],a=!0)):(t=c,e=arguments[1],n=arguments[3],arguments.length>2&&(i=arguments[2],a=!0)),t=""+t,e=""+e,r.isUndefined(n)||(n=""+n);var f=u(this._isDirected,t,e,n);if(r.has(this._edgeLabels,f))return a&&(this._edgeLabels[f]=i),this;if(!r.isUndefined(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(e),this._edgeLabels[f]=a?i:this._defaultEdgeLabelFn(t,e,n);var l=s(this._isDirected,t,e,n);return t=l.v,e=l.w,Object.freeze(l),this._edgeObjs[f]=l,o(this._preds[e],t),o(this._sucs[t],e),this._in[e][f]=l,this._out[t][f]=l,this._edgeCount++,this},i.prototype.edge=function(t,e,n){var r=1===arguments.length?c(this._isDirected,arguments[0]):u(this._isDirected,t,e,n);return this._edgeLabels[r]},i.prototype.hasEdge=function(t,e,n){var i=1===arguments.length?c(this._isDirected,arguments[0]):u(this._isDirected,t,e,n);return r.has(this._edgeLabels,i)},i.prototype.removeEdge=function(t,e,n){var r=1===arguments.length?c(this._isDirected,arguments[0]):u(this._isDirected,t,e,n),i=this._edgeObjs[r];return i&&(t=i.v,e=i.w,delete this._edgeLabels[r],delete this._edgeObjs[r],a(this._preds[e],t),a(this._sucs[t],e),delete this._in[e][r],delete this._out[t][r],this._edgeCount--),this},i.prototype.inEdges=function(t,e){var n=this._in[t];if(n){var i=r.values(n);return e?r.filter(i,(function(t){return t.v===e})):i}},i.prototype.outEdges=function(t,e){var n=this._out[t];if(n){var i=r.values(n);return e?r.filter(i,(function(t){return t.w===e})):i}},i.prototype.nodeEdges=function(t,e){var n=this.inEdges(t,e);if(n)return n.concat(this.outEdges(t,e))}},function(t,e,n){var r=n(77)(n(36),"Map");t.exports=r},function(t,e,n){var r=n(585),i=n(592),o=n(594),a=n(595),u=n(596);function s(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}s.prototype.clear=r,s.prototype.delete=i,s.prototype.get=o,s.prototype.has=a,s.prototype.set=u,t.exports=s},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}},function(t,e){t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},function(t,e,n){(function(t){var r=n(342),i=e&&!e.nodeType&&e,o=i&&"object"==typeof t&&t&&!t.nodeType&&t,a=o&&o.exports===i&&r.process,u=function(){try{var t=o&&o.require&&o.require("util").types;return t||a&&a.binding&&a.binding("util")}catch(t){}}();t.exports=u}).call(this,n(14)(t))},function(t,e,n){var r=n(170),i=n(602),o=Object.prototype.hasOwnProperty;t.exports=function(t){if(!r(t))return i(t);var e=[];for(var n in Object(t))o.call(t,n)&&"constructor"!=n&&e.push(n);return e}},function(t,e,n){var r=n(349),i=n(350),o=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,u=a?function(t){return null==t?[]:(t=Object(t),r(a(t),(function(e){return o.call(t,e)})))}:i;t.exports=u},function(t,e){t.exports=function(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}},function(t,e,n){var r=n(355);t.exports=function(t){var e=new t.constructor(t.byteLength);return new r(e).set(new r(t)),e}},function(t,e){t.exports=function(t){return function(){return t}}},function(t,e,n){t.exports=n(359)},function(t,e,n){var r=n(254),i=n(63);t.exports=function(t,e){return t&&r(t,e,i)}},function(t,e,n){var r=n(621)();t.exports=r},function(t,e){t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}},function(t,e,n){var r=n(173),i=n(132);t.exports=function(t,e){for(var n=0,o=(e=r(e,t)).length;null!=t&&n<o;)t=t[i(e[n++])];return n&&n==o?t:void 0}},function(t,e,n){var r=n(16),i=n(98),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;t.exports=function(t,e){if(r(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!i(t))||(a.test(t)||!o.test(t)||null!=e&&t in Object(e))}},function(t,e,n){var r=n(643),i=n(370);t.exports=function(t,e){return null!=t&&i(t,e,r)}},function(t,e,n){var r=n(249),i=n(655);t.exports=function t(e,n,o,a,u){var s=-1,c=e.length;for(o||(o=i),u||(u=[]);++s<c;){var f=e[s];n>0&&o(f)?n>1?t(f,n-1,o,a,u):r(u,f):a||(u[u.length]=f)}return u}},function(t,e,n){var r=n(98);t.exports=function(t,e,n){for(var i=-1,o=t.length;++i<o;){var a=t[i],u=e(a);if(null!=u&&(void 0===s?u==u&&!r(u):n(u,s)))var s=u,c=a}return c}},function(t,e){t.exports=function(t,e,n,r){var i=t.x,o=t.y,a=i-r.x,u=o-r.y,s=Math.sqrt(e*e*u*u+n*n*a*a),c=Math.abs(e*n*a/s);r.x<i&&(c=-c);var f=Math.abs(e*n*u/s);r.y<o&&(f=-f);return{x:i+c,y:o+f}}},function(t,e,n){var r=n(740),i=n(143),o=n(741);t.exports=function(t,e,n){var a=e.label,u=t.append("g");"svg"===e.labelType?o(u,e):"string"!=typeof a||"html"===e.labelType?i(u,e):r(u,e);var s,c=u.node().getBBox();switch(n){case"top":s=-e.height/2;break;case"bottom":s=e.height/2-c.height;break;default:s=-c.height/2}return u.attr("transform","translate("+-c.width/2+","+s+")"),u}},function(t,e,n){var r=n(91);t.exports=function(t,e,n){for(var i=-1,o=t.length;++i<o;){var a=t[i],u=e(a);if(null!=u&&(void 0===s?u==u&&!r(u):n(u,s)))var s=u,c=a}return c}},function(t,e,n){"use strict";var r=n(2),i=n(409),o=n(3).Buffer,a=new Array(16);function u(){i.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function s(t,e){return t<<e|t>>>32-e}function c(t,e,n,r,i,o,a){return s(t+(e&n|~e&r)+i+o|0,a)+e|0}function f(t,e,n,r,i,o,a){return s(t+(e&r|n&~r)+i+o|0,a)+e|0}function l(t,e,n,r,i,o,a){return s(t+(e^n^r)+i+o|0,a)+e|0}function h(t,e,n,r,i,o,a){return s(t+(n^(e|~r))+i+o|0,a)+e|0}r(u,i),u.prototype._update=function(){for(var t=a,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);var n=this._a,r=this._b,i=this._c,o=this._d;n=c(n,r,i,o,t[0],3614090360,7),o=c(o,n,r,i,t[1],3905402710,12),i=c(i,o,n,r,t[2],606105819,17),r=c(r,i,o,n,t[3],3250441966,22),n=c(n,r,i,o,t[4],4118548399,7),o=c(o,n,r,i,t[5],1200080426,12),i=c(i,o,n,r,t[6],2821735955,17),r=c(r,i,o,n,t[7],4249261313,22),n=c(n,r,i,o,t[8],1770035416,7),o=c(o,n,r,i,t[9],2336552879,12),i=c(i,o,n,r,t[10],4294925233,17),r=c(r,i,o,n,t[11],2304563134,22),n=c(n,r,i,o,t[12],1804603682,7),o=c(o,n,r,i,t[13],4254626195,12),i=c(i,o,n,r,t[14],2792965006,17),n=f(n,r=c(r,i,o,n,t[15],1236535329,22),i,o,t[1],4129170786,5),o=f(o,n,r,i,t[6],3225465664,9),i=f(i,o,n,r,t[11],643717713,14),r=f(r,i,o,n,t[0],3921069994,20),n=f(n,r,i,o,t[5],3593408605,5),o=f(o,n,r,i,t[10],38016083,9),i=f(i,o,n,r,t[15],3634488961,14),r=f(r,i,o,n,t[4],3889429448,20),n=f(n,r,i,o,t[9],568446438,5),o=f(o,n,r,i,t[14],3275163606,9),i=f(i,o,n,r,t[3],4107603335,14),r=f(r,i,o,n,t[8],1163531501,20),n=f(n,r,i,o,t[13],2850285829,5),o=f(o,n,r,i,t[2],4243563512,9),i=f(i,o,n,r,t[7],1735328473,14),n=l(n,r=f(r,i,o,n,t[12],2368359562,20),i,o,t[5],4294588738,4),o=l(o,n,r,i,t[8],2272392833,11),i=l(i,o,n,r,t[11],1839030562,16),r=l(r,i,o,n,t[14],4259657740,23),n=l(n,r,i,o,t[1],2763975236,4),o=l(o,n,r,i,t[4],1272893353,11),i=l(i,o,n,r,t[7],4139469664,16),r=l(r,i,o,n,t[10],3200236656,23),n=l(n,r,i,o,t[13],681279174,4),o=l(o,n,r,i,t[0],3936430074,11),i=l(i,o,n,r,t[3],3572445317,16),r=l(r,i,o,n,t[6],76029189,23),n=l(n,r,i,o,t[9],3654602809,4),o=l(o,n,r,i,t[12],3873151461,11),i=l(i,o,n,r,t[15],530742520,16),n=h(n,r=l(r,i,o,n,t[2],3299628645,23),i,o,t[0],4096336452,6),o=h(o,n,r,i,t[7],1126891415,10),i=h(i,o,n,r,t[14],2878612391,15),r=h(r,i,o,n,t[5],4237533241,21),n=h(n,r,i,o,t[12],1700485571,6),o=h(o,n,r,i,t[3],2399980690,10),i=h(i,o,n,r,t[10],4293915773,15),r=h(r,i,o,n,t[1],2240044497,21),n=h(n,r,i,o,t[8],1873313359,6),o=h(o,n,r,i,t[15],4264355552,10),i=h(i,o,n,r,t[6],2734768916,15),r=h(r,i,o,n,t[13],1309151649,21),n=h(n,r,i,o,t[4],4149444226,6),o=h(o,n,r,i,t[11],3174756917,10),i=h(i,o,n,r,t[2],718787259,15),r=h(r,i,o,n,t[9],3951481745,21),this._a=this._a+n|0,this._b=this._b+r|0,this._c=this._c+i|0,this._d=this._d+o|0},u.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=o.allocUnsafe(16);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t},t.exports=u},function(t,e,n){t.exports=i;var r=n(266).EventEmitter;function i(){r.call(this)}n(2)(i,r),i.Readable=n(267),i.Writable=n(822),i.Duplex=n(823),i.Transform=n(824),i.PassThrough=n(825),i.Stream=i,i.prototype.pipe=function(t,e){var n=this;function i(e){t.writable&&!1===t.write(e)&&n.pause&&n.pause()}function o(){n.readable&&n.resume&&n.resume()}n.on("data",i),t.on("drain",o),t._isStdio||e&&!1===e.end||(n.on("end",u),n.on("close",s));var a=!1;function u(){a||(a=!0,t.end())}function s(){a||(a=!0,"function"==typeof t.destroy&&t.destroy())}function c(t){if(f(),0===r.listenerCount(this,"error"))throw t}function f(){n.removeListener("data",i),t.removeListener("drain",o),n.removeListener("end",u),n.removeListener("close",s),n.removeListener("error",c),t.removeListener("error",c),n.removeListener("end",f),n.removeListener("close",f),t.removeListener("close",f)}return n.on("error",c),t.on("error",c),n.on("end",f),n.on("close",f),t.on("close",f),t.emit("pipe",n),t}},function(t,e,n){"use strict";var r,i="object"==typeof Reflect?Reflect:null,o=i&&"function"==typeof i.apply?i.apply:function(t,e,n){return Function.prototype.apply.call(t,e,n)};r=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var a=Number.isNaN||function(t){return t!=t};function u(){u.init.call(this)}t.exports=u,u.EventEmitter=u,u.prototype._events=void 0,u.prototype._eventsCount=0,u.prototype._maxListeners=void 0;var s=10;function c(t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function f(t){return void 0===t._maxListeners?u.defaultMaxListeners:t._maxListeners}function l(t,e,n,r){var i,o,a,u;if(c(n),void 0===(o=t._events)?(o=t._events=Object.create(null),t._eventsCount=0):(void 0!==o.newListener&&(t.emit("newListener",e,n.listener?n.listener:n),o=t._events),a=o[e]),void 0===a)a=o[e]=n,++t._eventsCount;else if("function"==typeof a?a=o[e]=r?[n,a]:[a,n]:r?a.unshift(n):a.push(n),(i=f(t))>0&&a.length>i&&!a.warned){a.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=t,s.type=e,s.count=a.length,u=s,console&&console.warn&&console.warn(u)}return t}function h(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(t,e,n){var r={fired:!1,wrapFn:void 0,target:t,type:e,listener:n},i=h.bind(r);return i.listener=n,r.wrapFn=i,i}function p(t,e,n){var r=t._events;if(void 0===r)return[];var i=r[e];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(t){for(var e=new Array(t.length),n=0;n<e.length;++n)e[n]=t[n].listener||t[n];return e}(i):y(i,i.length)}function g(t){var e=this._events;if(void 0!==e){var n=e[t];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function y(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t[r];return n}Object.defineProperty(u,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(t){if("number"!=typeof t||t<0||a(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");s=t}}),u.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},u.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||a(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this},u.prototype.getMaxListeners=function(){return f(this)},u.prototype.emit=function(t){for(var e=[],n=1;n<arguments.length;n++)e.push(arguments[n]);var r="error"===t,i=this._events;if(void 0!==i)r=r&&void 0===i.error;else if(!r)return!1;if(r){var a;if(e.length>0&&(a=e[0]),a instanceof Error)throw a;var u=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw u.context=a,u}var s=i[t];if(void 0===s)return!1;if("function"==typeof s)o(s,this,e);else{var c=s.length,f=y(s,c);for(n=0;n<c;++n)o(f[n],this,e)}return!0},u.prototype.addListener=function(t,e){return l(this,t,e,!1)},u.prototype.on=u.prototype.addListener,u.prototype.prependListener=function(t,e){return l(this,t,e,!0)},u.prototype.once=function(t,e){return c(e),this.on(t,d(this,t,e)),this},u.prototype.prependOnceListener=function(t,e){return c(e),this.prependListener(t,d(this,t,e)),this},u.prototype.removeListener=function(t,e){var n,r,i,o,a;if(c(e),void 0===(r=this._events))return this;if(void 0===(n=r[t]))return this;if(n===e||n.listener===e)0==--this._eventsCount?this._events=Object.create(null):(delete r[t],r.removeListener&&this.emit("removeListener",t,n.listener||e));else if("function"!=typeof n){for(i=-1,o=n.length-1;o>=0;o--)if(n[o]===e||n[o].listener===e){a=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():function(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}(n,i),1===n.length&&(r[t]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",t,a||e)}return this},u.prototype.off=u.prototype.removeListener,u.prototype.removeAllListeners=function(t){var e,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[t]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[t]),this;if(0===arguments.length){var i,o=Object.keys(n);for(r=0;r<o.length;++r)"removeListener"!==(i=o[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(e=n[t]))this.removeListener(t,e);else if(void 0!==e)for(r=e.length-1;r>=0;r--)this.removeListener(t,e[r]);return this},u.prototype.listeners=function(t){return p(this,t,!0)},u.prototype.rawListeners=function(t){return p(this,t,!1)},u.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):g.call(t,e)},u.prototype.listenerCount=g,u.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(t,e,n){(e=t.exports=n(410)).Stream=e,e.Readable=e,e.Writable=n(269),e.Duplex=n(80),e.Transform=n(413),e.PassThrough=n(821)},function(t,e,n){var r=n(18),i=r.Buffer;function o(t,e){for(var n in t)e[n]=t[n]}function a(t,e,n){return i(t,e,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=r:(o(r,e),e.Buffer=a),o(i,a),a.from=function(t,e,n){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,n)},a.alloc=function(t,e,n){if("number"!=typeof t)throw new TypeError("Argument must be a number");var r=i(t);return void 0!==e?"string"==typeof n?r.fill(e,n):r.fill(e):r.fill(0),r},a.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},a.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return r.SlowBuffer(t)}},function(t,e,n){"use strict";(function(e,r,i){var o=n(180);function a(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,n){var r=t.entry;t.entry=null;for(;r;){var i=r.callback;e.pendingcb--,i(n),r=r.next}e.corkedRequestsFree?e.corkedRequestsFree.next=t:e.corkedRequestsFree=t}(e,t)}}t.exports=v;var u,s=!e.browser&&["v0.10","v0.9."].indexOf(e.version.slice(0,5))>-1?r:o.nextTick;v.WritableState=b;var c=Object.create(n(134));c.inherits=n(2);var f={deprecate:n(820)},l=n(411),h=n(268).Buffer,d=i.Uint8Array||function(){};var p,g=n(412);function y(){}function b(t,e){u=u||n(80),t=t||{};var r=e instanceof u;this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var i=t.highWaterMark,c=t.writableHighWaterMark,f=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(c||0===c)?c:f,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var l=!1===t.decodeStrings;this.decodeStrings=!l,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var n=t._writableState,r=n.sync,i=n.writecb;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(n),e)!function(t,e,n,r,i){--e.pendingcb,n?(o.nextTick(i,r),o.nextTick(E,t,e),t._writableState.errorEmitted=!0,t.emit("error",r)):(i(r),t._writableState.errorEmitted=!0,t.emit("error",r),E(t,e))}(t,n,r,e,i);else{var a=x(n);a||n.corked||n.bufferProcessing||!n.bufferedRequest||w(t,n),r?s(_,t,n,a,i):_(t,n,a,i)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new a(this)}function v(t){if(u=u||n(80),!(p.call(v,this)||this instanceof u))return new v(t);this._writableState=new b(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),l.call(this)}function m(t,e,n,r,i,o,a){e.writelen=r,e.writecb=a,e.writing=!0,e.sync=!0,n?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function _(t,e,n,r){n||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,r(),E(t,e)}function w(t,e){e.bufferProcessing=!0;var n=e.bufferedRequest;if(t._writev&&n&&n.next){var r=e.bufferedRequestCount,i=new Array(r),o=e.corkedRequestsFree;o.entry=n;for(var u=0,s=!0;n;)i[u]=n,n.isBuf||(s=!1),n=n.next,u+=1;i.allBuffers=s,m(t,e,!0,e.length,i,"",o.finish),e.pendingcb++,e.lastBufferedRequest=null,o.next?(e.corkedRequestsFree=o.next,o.next=null):e.corkedRequestsFree=new a(e),e.bufferedRequestCount=0}else{for(;n;){var c=n.chunk,f=n.encoding,l=n.callback;if(m(t,e,!1,e.objectMode?1:c.length,c,f,l),n=n.next,e.bufferedRequestCount--,e.writing)break}null===n&&(e.lastBufferedRequest=null)}e.bufferedRequest=n,e.bufferProcessing=!1}function x(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function k(t,e){t._final((function(n){e.pendingcb--,n&&t.emit("error",n),e.prefinished=!0,t.emit("prefinish"),E(t,e)}))}function E(t,e){var n=x(e);return n&&(!function(t,e){e.prefinished||e.finalCalled||("function"==typeof t._final?(e.pendingcb++,e.finalCalled=!0,o.nextTick(k,t,e)):(e.prefinished=!0,t.emit("prefinish")))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"))),n}c.inherits(v,l),b.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(b.prototype,"buffer",{get:f.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(p=Function.prototype[Symbol.hasInstance],Object.defineProperty(v,Symbol.hasInstance,{value:function(t){return!!p.call(this,t)||this===v&&(t&&t._writableState instanceof b)}})):p=function(t){return t instanceof this},v.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},v.prototype.write=function(t,e,n){var r,i=this._writableState,a=!1,u=!i.objectMode&&(r=t,h.isBuffer(r)||r instanceof d);return u&&!h.isBuffer(t)&&(t=function(t){return h.from(t)}(t)),"function"==typeof e&&(n=e,e=null),u?e="buffer":e||(e=i.defaultEncoding),"function"!=typeof n&&(n=y),i.ended?function(t,e){var n=new Error("write after end");t.emit("error",n),o.nextTick(e,n)}(this,n):(u||function(t,e,n,r){var i=!0,a=!1;return null===n?a=new TypeError("May not write null values to stream"):"string"==typeof n||void 0===n||e.objectMode||(a=new TypeError("Invalid non-string/buffer chunk")),a&&(t.emit("error",a),o.nextTick(r,a),i=!1),i}(this,i,t,n))&&(i.pendingcb++,a=function(t,e,n,r,i,o){if(!n){var a=function(t,e,n){t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=h.from(e,n));return e}(e,r,i);r!==a&&(n=!0,i="buffer",r=a)}var u=e.objectMode?1:r.length;e.length+=u;var s=e.length<e.highWaterMark;s||(e.needDrain=!0);if(e.writing||e.corked){var c=e.lastBufferedRequest;e.lastBufferedRequest={chunk:r,encoding:i,isBuf:n,callback:o,next:null},c?c.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else m(t,e,!1,u,r,i,o);return s}(this,i,u,t,e,n)),a},v.prototype.cork=function(){this._writableState.corked++},v.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.finished||t.bufferProcessing||!t.bufferedRequest||w(this,t))},v.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(v.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),v.prototype._write=function(t,e,n){n(new Error("_write() is not implemented"))},v.prototype._writev=null,v.prototype.end=function(t,e,n){var r=this._writableState;"function"==typeof t?(n=t,t=null,e=null):"function"==typeof e&&(n=e,e=null),null!=t&&this.write(t,e),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||function(t,e,n){e.ending=!0,E(t,e),n&&(e.finished?o.nextTick(n):t.once("finish",n));e.ended=!0,t.writable=!1}(this,r,n)},Object.defineProperty(v.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),v.prototype.destroy=g.destroy,v.prototype._undestroy=g.undestroy,v.prototype._destroy=function(t,e){this.end(),e(t)}}).call(this,n(17),n(818).setImmediate,n(25))},function(t,e,n){"use strict";var r=n(3).Buffer,i=r.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(t);if("string"!=typeof e&&(r.isEncoding===i||!i(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=s,this.end=c,e=4;break;case"utf8":this.fillLast=u,e=4;break;case"base64":this.text=f,this.end=l,e=3;break;default:return this.write=h,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(e)}function a(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function u(t){var e=this.lastTotal-this.lastNeed,n=function(t,e,n){if(128!=(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�"}}(this,t);return void 0!==n?n:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function s(t,e){if((t.length-e)%2==0){var n=t.toString("utf16le",e);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function c(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,n)}return e}function f(t,e){var n=(t.length-e)%3;return 0===n?t.toString("base64",e):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-n))}function l(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function h(t){return t.toString(this.encoding)}function d(t){return t&&t.length?this.write(t):""}e.StringDecoder=o,o.prototype.write=function(t){if(0===t.length)return"";var e,n;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n<t.length?e?e+this.text(t,n):this.text(t,n):e||""},o.prototype.end=function(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"�":e},o.prototype.text=function(t,e){var n=function(t,e,n){var r=e.length-1;if(r<n)return 0;var i=a(e[r]);if(i>=0)return i>0&&(t.lastNeed=i-1),i;if(--r<n||-2===i)return 0;if((i=a(e[r]))>=0)return i>0&&(t.lastNeed=i-2),i;if(--r<n||-2===i)return 0;if((i=a(e[r]))>=0)return i>0&&(2===i?i=0:t.lastNeed=i-3),i;return 0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=n;var r=t.length-(n-this.lastNeed);return t.copy(this.lastChar,0,r),t.toString("utf8",e,r)},o.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},function(t,e,n){"use strict";var r=n(18).Buffer,i=n(2),o=n(409),a=new Array(16),u=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],s=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],c=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],f=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],l=[0,1518500249,1859775393,2400959708,2840853838],h=[1352829926,1548603684,1836072691,2053994217,0];function d(){o.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function p(t,e){return t<<e|t>>>32-e}function g(t,e,n,r,i,o,a,u){return p(t+(e^n^r)+o+a|0,u)+i|0}function y(t,e,n,r,i,o,a,u){return p(t+(e&n|~e&r)+o+a|0,u)+i|0}function b(t,e,n,r,i,o,a,u){return p(t+((e|~n)^r)+o+a|0,u)+i|0}function v(t,e,n,r,i,o,a,u){return p(t+(e&r|n&~r)+o+a|0,u)+i|0}function m(t,e,n,r,i,o,a,u){return p(t+(e^(n|~r))+o+a|0,u)+i|0}i(d,o),d.prototype._update=function(){for(var t=a,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);for(var n=0|this._a,r=0|this._b,i=0|this._c,o=0|this._d,d=0|this._e,_=0|this._a,w=0|this._b,x=0|this._c,k=0|this._d,E=0|this._e,A=0;A<80;A+=1){var S,M;A<16?(S=g(n,r,i,o,d,t[u[A]],l[0],c[A]),M=m(_,w,x,k,E,t[s[A]],h[0],f[A])):A<32?(S=y(n,r,i,o,d,t[u[A]],l[1],c[A]),M=v(_,w,x,k,E,t[s[A]],h[1],f[A])):A<48?(S=b(n,r,i,o,d,t[u[A]],l[2],c[A]),M=b(_,w,x,k,E,t[s[A]],h[2],f[A])):A<64?(S=v(n,r,i,o,d,t[u[A]],l[3],c[A]),M=y(_,w,x,k,E,t[s[A]],h[3],f[A])):(S=m(n,r,i,o,d,t[u[A]],l[4],c[A]),M=g(_,w,x,k,E,t[s[A]],h[4],f[A])),n=d,d=o,o=p(i,10),i=r,r=S,_=E,E=k,k=p(x,10),x=w,w=M}var T=this._b+i+k|0;this._b=this._c+o+E|0,this._c=this._d+d+_|0,this._d=this._e+n+w|0,this._e=this._a+r+x|0,this._a=T},d.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=r.alloc?r.alloc(20):new r(20);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t.writeInt32LE(this._e,16),t},t.exports=d},function(t,e,n){(e=t.exports=function(t){t=t.toLowerCase();var n=e[t];if(!n)throw new Error(t+" is not supported (we accept pull requests)");return new n}).sha=n(826),e.sha1=n(827),e.sha224=n(828),e.sha256=n(414),e.sha384=n(829),e.sha512=n(415)},function(t,e,n){"use strict";var r=n(32);function i(t){this.options=t,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0}t.exports=i,i.prototype._init=function(){},i.prototype.update=function(t){return 0===t.length?[]:"decrypt"===this.type?this._updateDecrypt(t):this._updateEncrypt(t)},i.prototype._buffer=function(t,e){for(var n=Math.min(this.buffer.length-this.bufferOff,t.length-e),r=0;r<n;r++)this.buffer[this.bufferOff+r]=t[e+r];return this.bufferOff+=n,n},i.prototype._flushBuffer=function(t,e){return this._update(this.buffer,0,t,e),this.bufferOff=0,this.blockSize},i.prototype._updateEncrypt=function(t){var e=0,n=0,r=(this.bufferOff+t.length)/this.blockSize|0,i=new Array(r*this.blockSize);0!==this.bufferOff&&(e+=this._buffer(t,e),this.bufferOff===this.buffer.length&&(n+=this._flushBuffer(i,n)));for(var o=t.length-(t.length-e)%this.blockSize;e<o;e+=this.blockSize)this._update(t,e,i,n),n+=this.blockSize;for(;e<t.length;e++,this.bufferOff++)this.buffer[this.bufferOff]=t[e];return i},i.prototype._updateDecrypt=function(t){for(var e=0,n=0,r=Math.ceil((this.bufferOff+t.length)/this.blockSize)-1,i=new Array(r*this.blockSize);r>0;r--)e+=this._buffer(t,e),n+=this._flushBuffer(i,n);return e+=this._buffer(t,e),i},i.prototype.final=function(t){var e,n;return t&&(e=this.update(t)),n="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),e?e.concat(n):n},i.prototype._pad=function(t,e){if(0===e)return!1;for(;e<t.length;)t[e++]=0;return!0},i.prototype._finalEncrypt=function(){if(!this._pad(this.buffer,this.bufferOff))return[];var t=new Array(this.blockSize);return this._update(this.buffer,0,t,0),t},i.prototype._unpad=function(t){return t},i.prototype._finalDecrypt=function(){r.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var t=new Array(this.blockSize);return this._flushBuffer(t,0),this._unpad(t)}},function(t,e,n){var r=n(838),i=n(846),o=n(427);e.createCipher=e.Cipher=r.createCipher,e.createCipheriv=e.Cipheriv=r.createCipheriv,e.createDecipher=e.Decipher=i.createDecipher,e.createDecipheriv=e.Decipheriv=i.createDecipheriv,e.listCiphers=e.getCiphers=function(){return Object.keys(o)}},function(t,e,n){var r={ECB:n(839),CBC:n(840),CFB:n(841),CFB8:n(842),CFB1:n(843),OFB:n(844),CTR:n(425),GCM:n(425)},i=n(427);for(var o in i)i[o].module=r[i[o].mode];t.exports=i},function(t,e,n){var r;function i(t){this.rand=t}if(t.exports=function(t){return r||(r=new i(null)),r.generate(t)},t.exports.Rand=i,i.prototype.generate=function(t){return this._rand(t)},i.prototype._rand=function(t){if(this.rand.getBytes)return this.rand.getBytes(t);for(var e=new Uint8Array(t),n=0;n<e.length;n++)e[n]=this.rand.getByte();return e},"object"==typeof self)self.crypto&&self.crypto.getRandomValues?i.prototype._rand=function(t){var e=new Uint8Array(t);return self.crypto.getRandomValues(e),e}:self.msCrypto&&self.msCrypto.getRandomValues?i.prototype._rand=function(t){var e=new Uint8Array(t);return self.msCrypto.getRandomValues(e),e}:"object"==typeof window&&(i.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var o=n(850);if("function"!=typeof o.randomBytes)throw new Error("Not supported");i.prototype._rand=function(t){return o.randomBytes(t)}}catch(t){}},function(t,e,n){(function(e){var r=n(12),i=n(100);function o(t,n){var i=function(t){var e=a(t);return{blinder:e.toRed(r.mont(t.modulus)).redPow(new r(t.publicExponent)).fromRed(),unblinder:e.invm(t.modulus)}}(n),o=n.modulus.byteLength(),u=(r.mont(n.modulus),new r(t).mul(i.blinder).umod(n.modulus)),s=u.toRed(r.mont(n.prime1)),c=u.toRed(r.mont(n.prime2)),f=n.coefficient,l=n.prime1,h=n.prime2,d=s.redPow(n.exponent1),p=c.redPow(n.exponent2);d=d.fromRed(),p=p.fromRed();var g=d.isub(p).imul(f).umod(l);return g.imul(h),p.iadd(g),new e(p.imul(i.unblinder).umod(n.modulus).toArray(!1,o))}function a(t){for(var e=t.modulus.byteLength(),n=new r(i(e));n.cmp(t.modulus)>=0||!n.umod(t.prime1)||!n.umod(t.prime2);)n=new r(i(e));return n}t.exports=o,o.getr=a}).call(this,n(18).Buffer)},function(t,e,n){"use strict";var r=e;r.version=n(855).version,r.utils=n(33),r.rand=n(276),r.curve=n(433),r.curves=n(279),r.ec=n(866),r.eddsa=n(870)},function(t,e,n){"use strict";var r,i=e,o=n(280),a=n(433),u=n(33).assert;function s(t){"short"===t.type?this.curve=new a.short(t):"edwards"===t.type?this.curve=new a.edwards(t):this.curve=new a.mont(t),this.g=this.curve.g,this.n=this.curve.n,this.hash=t.hash,u(this.g.validate(),"Invalid curve"),u(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function c(t,e){Object.defineProperty(i,t,{configurable:!0,enumerable:!0,get:function(){var n=new s(e);return Object.defineProperty(i,t,{configurable:!0,enumerable:!0,value:n}),n}})}i.PresetCurve=s,c("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:o.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),c("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:o.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),c("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:o.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),c("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:o.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),c("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:o.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),c("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["9"]}),c("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{r=n(865)}catch(t){r=void 0}c("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:o.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",r]})},function(t,e,n){var r=e;r.utils=n(45),r.common=n(136),r.sha=n(859),r.ripemd=n(863),r.hmac=n(864),r.sha1=r.sha.sha1,r.sha256=r.sha.sha256,r.sha224=r.sha.sha224,r.sha384=r.sha.sha384,r.sha512=r.sha.sha512,r.ripemd160=r.ripemd.ripemd160},function(t,e,n){"use strict";var r,i,o,a,u=n(23),s=180/Math.PI,c={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},f=function(t,e,n,r,i,o){var a,u,c;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(c=t*n+e*r)&&(n-=t*c,r-=e*c),(u=Math.sqrt(n*n+r*r))&&(n/=u,r/=u,c/=u),t*r<e*n&&(t=-t,e=-e,c=-c,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(e,t)*s,skewX:Math.atan(c)*s,scaleX:a,scaleY:u}};function l(t,e,n,r){function i(t){return t.length?t.pop()+" ":""}return function(o,a){var s=[],c=[];return o=t(o),a=t(a),function(t,r,i,o,a,s){if(t!==i||r!==o){var c=a.push("translate(",null,e,null,n);s.push({i:c-4,x:Object(u.a)(t,i)},{i:c-2,x:Object(u.a)(r,o)})}else(i||o)&&a.push("translate("+i+e+o+n)}(o.translateX,o.translateY,a.translateX,a.translateY,s,c),function(t,e,n,o){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),o.push({i:n.push(i(n)+"rotate(",null,r)-2,x:Object(u.a)(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(o.rotate,a.rotate,s,c),function(t,e,n,o){t!==e?o.push({i:n.push(i(n)+"skewX(",null,r)-2,x:Object(u.a)(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(o.skewX,a.skewX,s,c),function(t,e,n,r,o,a){if(t!==n||e!==r){var s=o.push(i(o)+"scale(",null,",",null,")");a.push({i:s-4,x:Object(u.a)(t,n)},{i:s-2,x:Object(u.a)(e,r)})}else 1===n&&1===r||o.push(i(o)+"scale("+n+","+r+")")}(o.scaleX,o.scaleY,a.scaleX,a.scaleY,s,c),o=a=null,function(t){for(var e,n=-1,r=c.length;++n<r;)s[(e=c[n]).i]=e.x(t);return s.join("")}}}n.d(e,"a",(function(){return h})),n.d(e,"b",(function(){return d}));var h=l((function(t){return"none"===t?c:(r||(r=document.createElement("DIV"),i=document.documentElement,o=document.defaultView),r.style.transform=t,t=o.getComputedStyle(i.appendChild(r),null).getPropertyValue("transform"),i.removeChild(r),t=t.slice(7,-1).split(","),f(+t[0],+t[1],+t[2],+t[3],+t[4],+t[5]))}),"px, ","px)","deg)"),d=l((function(t){return null==t?c:(a||(a=document.createElementNS("http://www.w3.org/2000/svg","g")),a.setAttribute("transform",t),(t=a.transform.baseVal.consolidate())?(t=t.matrix,f(t.a,t.b,t.c,t.d,t.e,t.f)):c)}),", ",")",")")},function(t,e,n){"use strict";var r={value:function(){}};function i(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new o(r)}function o(t){this._=t}function a(t,e){return t.trim().split(/^|\s+/).map((function(t){var n="",r=t.indexOf(".");if(r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}}))}function u(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function s(t,e,n){for(var i=0,o=t.length;i<o;++i)if(t[i].name===e){t[i]=r,t=t.slice(0,i).concat(t.slice(i+1));break}return null!=n&&t.push({name:e,value:n}),t}o.prototype=i.prototype={constructor:o,on:function(t,e){var n,r=this._,i=a(t+"",r),o=-1,c=i.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++o<c;)if(n=(t=i[o]).type)r[n]=s(r[n],t.name,e);else if(null==e)for(n in r)r[n]=s(r[n],t.name,null);return this}for(;++o<c;)if((n=(t=i[o]).type)&&(n=u(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new o(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),o=0;o<n;++o)i[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=0,n=(r=this._[t]).length;o<n;++o)r[o].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(e,n)}},e.a=i},function(t,e,n){"use strict";var r=n(58);e.a=function(t,e,n){var i=new r.a;return e=null==e?0:+e,i.restart((function(n){i.stop(),t(n+e)}),e,n),i}},function(t,e,n){"use strict";var r=n(112),i=n(67);e.a=function(t,e,n){arguments.length<3&&(n=e,e=Object(r.a)().changedTouches);for(var o,a=0,u=e?e.length:0;a<u;++a)if((o=e[a]).identifier===n)return Object(i.a)(t,o);return null}},function(t,e,n){"use strict";var r=n(112),i=n(67);e.a=function(t){var e=Object(r.a)();return e.changedTouches&&(e=e.changedTouches[0]),Object(i.a)(t,e)}},function(t,e,n){"use strict";var r=Math.PI,i=2*r,o=i-1e-6;function a(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function u(){return new a}a.prototype=u.prototype={constructor:a,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,o){this._+="C"+ +t+","+ +e+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+o)},arcTo:function(t,e,n,i,o){t=+t,e=+e,n=+n,i=+i,o=+o;var a=this._x1,u=this._y1,s=n-t,c=i-e,f=a-t,l=u-e,h=f*f+l*l;if(o<0)throw new Error("negative radius: "+o);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(h>1e-6)if(Math.abs(l*s-c*f)>1e-6&&o){var d=n-a,p=i-u,g=s*s+c*c,y=d*d+p*p,b=Math.sqrt(g),v=Math.sqrt(h),m=o*Math.tan((r-Math.acos((g+h-y)/(2*b*v)))/2),_=m/v,w=m/b;Math.abs(_-1)>1e-6&&(this._+="L"+(t+_*f)+","+(e+_*l)),this._+="A"+o+","+o+",0,0,"+ +(l*d>f*p)+","+(this._x1=t+w*s)+","+(this._y1=e+w*c)}else this._+="L"+(this._x1=t)+","+(this._y1=e);else;},arc:function(t,e,n,a,u,s){t=+t,e=+e,s=!!s;var c=(n=+n)*Math.cos(a),f=n*Math.sin(a),l=t+c,h=e+f,d=1^s,p=s?a-u:u-a;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+l+","+h:(Math.abs(this._x1-l)>1e-6||Math.abs(this._y1-h)>1e-6)&&(this._+="L"+l+","+h),n&&(p<0&&(p=p%i+i),p>o?this._+="A"+n+","+n+",0,1,"+d+","+(t-c)+","+(e-f)+"A"+n+","+n+",0,1,"+d+","+(this._x1=l)+","+(this._y1=h):p>1e-6&&(this._+="A"+n+","+n+",0,"+ +(p>=r)+","+d+","+(this._x1=t+n*Math.cos(u))+","+(this._y1=e+n*Math.sin(u))))},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._}},e.a=u},function(t,e,n){"use strict";var r=n(48);e.a=function(t){return Math.max(0,-Object(r.a)(Math.abs(t)))}},function(t,e,n){"use strict";var r=n(48);e.a=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Object(r.a)(e)/3)))-Object(r.a)(Math.abs(t)))}},function(t,e,n){"use strict";var r=n(48);e.a=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Object(r.a)(e)-Object(r.a)(t))+1}},function(t,e,n){"use strict";e.a=function(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}},function(t,e,n){"use strict";var r=Math.SQRT2;function i(t){return((t=Math.exp(t))+1/t)/2}e.a=function(t,e){var n,o,a=t[0],u=t[1],s=t[2],c=e[0],f=e[1],l=e[2],h=c-a,d=f-u,p=h*h+d*d;if(p<1e-12)o=Math.log(l/s)/r,n=function(t){return[a+t*h,u+t*d,s*Math.exp(r*t*o)]};else{var g=Math.sqrt(p),y=(l*l-s*s+4*p)/(2*s*2*g),b=(l*l-s*s-4*p)/(2*l*2*g),v=Math.log(Math.sqrt(y*y+1)-y),m=Math.log(Math.sqrt(b*b+1)-b);o=(m-v)/r,n=function(t){var e,n=t*o,c=i(v),f=s/(2*g)*(c*(e=r*n+v,((e=Math.exp(2*e))-1)/(e+1))-function(t){return((t=Math.exp(t))-1/t)/2}(v));return[a+f*h,u+f*d,s*c/i(r*n+v)]}}return n.duration=1e3*o,n}},function(t,e){},function(t,e,n){var r=n(146),i=n(227),o=n(151),a=n(484),u=n(490),s=n(299),c=n(300),f=n(493),l=n(494),h=n(304),d=n(495),p=n(90),g=n(499),y=n(500),b=n(309),v=n(15),m=n(88),_=n(504),w=n(28),x=n(506),k=n(62),E={};E["[object Arguments]"]=E["[object Array]"]=E["[object ArrayBuffer]"]=E["[object DataView]"]=E["[object Boolean]"]=E["[object Date]"]=E["[object Float32Array]"]=E["[object Float64Array]"]=E["[object Int8Array]"]=E["[object Int16Array]"]=E["[object Int32Array]"]=E["[object Map]"]=E["[object Number]"]=E["[object Object]"]=E["[object RegExp]"]=E["[object Set]"]=E["[object String]"]=E["[object Symbol]"]=E["[object Uint8Array]"]=E["[object Uint8ClampedArray]"]=E["[object Uint16Array]"]=E["[object Uint32Array]"]=!0,E["[object Error]"]=E["[object Function]"]=E["[object WeakMap]"]=!1,t.exports=function t(e,n,A,S,M,T){var O,D=1&n,C=2&n,N=4&n;if(A&&(O=M?A(e,S,M,T):A(e)),void 0!==O)return O;if(!w(e))return e;var I=v(e);if(I){if(O=g(e),!D)return c(e,O)}else{var R=p(e),j="[object Function]"==R||"[object GeneratorFunction]"==R;if(m(e))return s(e,D);if("[object Object]"==R||"[object Arguments]"==R||j&&!M){if(O=C||j?{}:b(e),!D)return C?l(e,u(O,e)):f(e,a(O,e))}else{if(!E[R])return M?e:{};O=y(e,R,D)}}T||(T=new r);var L=T.get(e);if(L)return L;T.set(e,O),x(e)?e.forEach((function(r){O.add(t(r,n,A,r,e,T))})):_(e)&&e.forEach((function(r,i){O.set(i,t(r,n,A,i,e,T))}));var B=N?C?d:h:C?keysIn:k,P=I?void 0:B(e);return i(P||e,(function(r,i){P&&(r=e[i=r]),o(O,i,t(r,n,A,i,e,T))})),O}},function(t,e,n){(function(e){var n="object"==typeof e&&e&&e.Object===Object&&e;t.exports=n}).call(this,n(25))},function(t,e){var n=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return n.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},function(t,e,n){var r=n(74),i=function(){try{var t=r(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=i},function(t,e,n){var r=n(485),i=n(126),o=n(15),a=n(88),u=n(153),s=n(127),c=Object.prototype.hasOwnProperty;t.exports=function(t,e){var n=o(t),f=!n&&i(t),l=!n&&!f&&a(t),h=!n&&!f&&!l&&s(t),d=n||f||l||h,p=d?r(t.length,String):[],g=p.length;for(var y in t)!e&&!c.call(t,y)||d&&("length"==y||l&&("offset"==y||"parent"==y)||h&&("buffer"==y||"byteLength"==y||"byteOffset"==y)||u(y,g))||p.push(y);return p}},function(t,e){t.exports=function(t,e){return function(n){return t(e(n))}}},function(t,e,n){(function(t){var r=n(35),i=e&&!e.nodeType&&e,o=i&&"object"==typeof t&&t&&!t.nodeType&&t,a=o&&o.exports===i?r.Buffer:void 0,u=a?a.allocUnsafe:void 0;t.exports=function(t,e){if(e)return t.slice();var n=t.length,r=u?u(n):new t.constructor(n);return t.copy(r),r}}).call(this,n(14)(t))},function(t,e){t.exports=function(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,i=0,o=[];++n<r;){var a=t[n];e(a,n,t)&&(o[i++]=a)}return o}},function(t,e){t.exports=function(){return[]}},function(t,e,n){var r=n(232),i=n(156),o=n(231),a=n(302),u=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)r(e,o(t)),t=i(t);return e}:a;t.exports=u},function(t,e,n){var r=n(305),i=n(231),o=n(62);t.exports=function(t){return r(t,o,i)}},function(t,e,n){var r=n(232),i=n(15);t.exports=function(t,e,n){var o=e(t);return i(t)?o:r(o,n(t))}},function(t,e,n){var r=n(74)(n(35),"Set");t.exports=r},function(t,e,n){var r=n(35).Uint8Array;t.exports=r},function(t,e,n){var r=n(233);t.exports=function(t,e){var n=e?r(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}},function(t,e,n){var r=n(310),i=n(156),o=n(155);t.exports=function(t){return"function"!=typeof t.constructor||o(t)?{}:r(i(t))}},function(t,e,n){var r=n(28),i=Object.create,o=function(){function t(){}return function(e){if(!r(e))return{};if(i)return i(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();t.exports=o},function(t,e,n){t.exports=n(312)},function(t,e,n){var r=n(227),i=n(157),o=n(313),a=n(15);t.exports=function(t,e){return(a(t)?r:i)(t,o(e))}},function(t,e,n){var r=n(76);t.exports=function(t){return"function"==typeof t?t:r}},function(t,e,n){var r=n(301),i=n(510),o=n(53),a=n(15);t.exports=function(t,e){return(a(t)?r:i)(t,o(e,3))}},function(t,e,n){var r=n(513),i=n(43);t.exports=function t(e,n,o,a,u){return e===n||(null==e||null==n||!i(e)&&!i(n)?e!=e&&n!=n:r(e,n,o,a,t,u))}},function(t,e,n){var r=n(317),i=n(516),o=n(318);t.exports=function(t,e,n,a,u,s){var c=1&n,f=t.length,l=e.length;if(f!=l&&!(c&&l>f))return!1;var h=s.get(t);if(h&&s.get(e))return h==e;var d=-1,p=!0,g=2&n?new r:void 0;for(s.set(t,e),s.set(e,t);++d<f;){var y=t[d],b=e[d];if(a)var v=c?a(b,y,d,e,t,s):a(y,b,d,t,e,s);if(void 0!==v){if(v)continue;p=!1;break}if(g){if(!i(e,(function(t,e){if(!o(g,e)&&(y===t||u(y,t,n,a,s)))return g.push(e)}))){p=!1;break}}else if(y!==b&&!u(y,b,n,a,s)){p=!1;break}}return s.delete(t),s.delete(e),p}},function(t,e,n){var r=n(226),i=n(514),o=n(515);function a(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new r;++e<n;)this.add(t[e])}a.prototype.add=a.prototype.push=i,a.prototype.has=o,t.exports=a},function(t,e){t.exports=function(t,e){return t.has(e)}},function(t,e,n){var r=n(28);t.exports=function(t){return t==t&&!r(t)}},function(t,e){t.exports=function(t,e){return function(n){return null!=n&&(n[t]===e&&(void 0!==e||t in Object(n)))}}},function(t,e,n){var r=n(526);t.exports=function(t){return null==t?"":r(t)}},function(t,e,n){var r=n(527),i=n(323);t.exports=function(t,e){return null!=t&&i(t,e,r)}},function(t,e,n){var r=n(158),i=n(126),o=n(15),a=n(153),u=n(228),s=n(128);t.exports=function(t,e,n){for(var c=-1,f=(e=r(e,t)).length,l=!1;++c<f;){var h=s(e[c]);if(!(l=null!=t&&n(t,h)))break;t=t[h]}return l||++c!=f?l:!!(f=null==t?0:t.length)&&u(f)&&a(h,f)&&(o(t)||i(t))}},function(t,e){t.exports=function(t){return function(e){return null==e?void 0:e[t]}}},function(t,e,n){var r=n(530),i=n(323);t.exports=function(t,e){return null!=t&&i(t,e,r)}},function(t,e){t.exports=function(t){return void 0===t}},function(t,e,n){var r=n(159),i=n(53),o=n(328),a=n(15);t.exports=function(t,e){return(a(t)?r:o)(t,i(e,3))}},function(t,e,n){var r=n(157),i=n(52);t.exports=function(t,e){var n=-1,o=i(t)?Array(t.length):[];return r(t,(function(t,r,i){o[++n]=e(t,r,i)})),o}},function(t,e,n){var r=n(532),i=n(157),o=n(53),a=n(533),u=n(15);t.exports=function(t,e,n){var s=u(t)?r:a,c=arguments.length<3;return s(t,o(e,4),n,c,i)}},function(t,e,n){var r=n(543),i=Math.max;t.exports=function(t,e,n){return e=i(void 0===e?t.length-1:e,0),function(){for(var o=arguments,a=-1,u=i(o.length-e,0),s=Array(u);++a<u;)s[a]=o[e+a];a=-1;for(var c=Array(e+1);++a<e;)c[a]=o[a];return c[e]=n(s),r(t,this,c)}}},function(t,e,n){var r=n(544),i=n(545)(r);t.exports=i},function(t,e){t.exports=function(t,e,n,r){for(var i=t.length,o=n+(r?1:-1);r?o--:++o<i;)if(e(t[o],o,t))return o;return-1}},function(t,e,n){var r=n(52),i=n(43);t.exports=function(t){return i(t)&&r(t)}},function(t,e,n){var r=n(554),i=n(62);t.exports=function(t){return null==t?[]:r(t,i(t))}},function(t,e,n){var r=n(27),i=n(336);t.exports=function(t,e,n,r){return function(t,e,n,r){var o,a,u={},s=new i,c=function(t){var e=t.v!==o?t.v:t.w,r=u[e],i=n(t),c=a.distance+i;if(i<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+t+" Weight: "+i);c<r.distance&&(r.distance=c,r.predecessor=o,s.decrease(e,c))};t.nodes().forEach((function(t){var n=t===e?0:Number.POSITIVE_INFINITY;u[t]={distance:n},s.add(t,n)}));for(;s.size()>0&&(o=s.removeMin(),(a=u[o]).distance!==Number.POSITIVE_INFINITY);)r(o).forEach(c);return u}(t,String(e),n||o,r||function(e){return t.outEdges(e)})};var o=r.constant(1)},function(t,e,n){var r=n(27);function i(){this._arr=[],this._keyIndices={}}t.exports=i,i.prototype.size=function(){return this._arr.length},i.prototype.keys=function(){return this._arr.map((function(t){return t.key}))},i.prototype.has=function(t){return r.has(this._keyIndices,t)},i.prototype.priority=function(t){var e=this._keyIndices[t];if(void 0!==e)return this._arr[e].priority},i.prototype.min=function(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key},i.prototype.add=function(t,e){var n=this._keyIndices;if(t=String(t),!r.has(n,t)){var i=this._arr,o=i.length;return n[t]=o,i.push({key:t,priority:e}),this._decrease(o),!0}return!1},i.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var t=this._arr.pop();return delete this._keyIndices[t.key],this._heapify(0),t.key},i.prototype.decrease=function(t,e){var n=this._keyIndices[t];if(e>this._arr[n].priority)throw new Error("New priority is greater than current priority. Key: "+t+" Old: "+this._arr[n].priority+" New: "+e);this._arr[n].priority=e,this._decrease(n)},i.prototype._heapify=function(t){var e=this._arr,n=2*t,r=n+1,i=t;n<e.length&&(i=e[n].priority<e[i].priority?n:i,r<e.length&&(i=e[r].priority<e[i].priority?r:i),i!==t&&(this._swap(t,i),this._heapify(i)))},i.prototype._decrease=function(t){for(var e,n=this._arr,r=n[t].priority;0!==t&&!(n[e=t>>1].priority<r);)this._swap(t,e),t=e},i.prototype._swap=function(t,e){var n=this._arr,r=this._keyIndices,i=n[t],o=n[e];n[t]=o,n[e]=i,r[o.key]=t,r[i.key]=e}},function(t,e,n){var r=n(27);t.exports=function(t){var e=0,n=[],i={},o=[];return t.nodes().forEach((function(a){r.has(i,a)||function a(u){var s=i[u]={onStack:!0,lowlink:e,index:e++};if(n.push(u),t.successors(u).forEach((function(t){r.has(i,t)?i[t].onStack&&(s.lowlink=Math.min(s.lowlink,i[t].index)):(a(t),s.lowlink=Math.min(s.lowlink,i[t].lowlink))})),s.lowlink===s.index){var c,f=[];do{c=n.pop(),i[c].onStack=!1,f.push(c)}while(u!==c);o.push(f)}}(a)})),o}},function(t,e,n){var r=n(27);function i(t){var e={},n={},i=[];if(r.each(t.sinks(),(function a(u){if(r.has(n,u))throw new o;r.has(e,u)||(n[u]=!0,e[u]=!0,r.each(t.predecessors(u),a),delete n[u],i.push(u))})),r.size(e)!==t.nodeCount())throw new o;return i}function o(){}t.exports=i,i.CycleException=o,o.prototype=new Error},function(t,e,n){var r=n(27);t.exports=function(t,e,n){r.isArray(e)||(e=[e]);var i=(t.isDirected()?t.successors:t.neighbors).bind(t),o=[],a={};return r.each(e,(function(e){if(!t.hasNode(e))throw new Error("Graph does not have node: "+e);!function t(e,n,i,o,a,u){r.has(o,n)||(o[n]=!0,i||u.push(n),r.each(a(n),(function(n){t(e,n,i,o,a,u)})),i&&u.push(n))}(t,e,"post"===n,a,i,o)})),o}},function(t,e,n){var r=n(567);t.exports={Graph:r.Graph,json:n(669),alg:n(670),version:r.version}},function(t,e,n){var r=n(161),i=n(244),o=n(166),a=n(597),u=n(603),s=n(347),c=n(348),f=n(606),l=n(607),h=n(352),d=n(608),p=n(97),g=n(612),y=n(613),b=n(357),v=n(16),m=n(95),_=n(617),w=n(30),x=n(619),k=n(63),E={};E["[object Arguments]"]=E["[object Array]"]=E["[object ArrayBuffer]"]=E["[object DataView]"]=E["[object Boolean]"]=E["[object Date]"]=E["[object Float32Array]"]=E["[object Float64Array]"]=E["[object Int8Array]"]=E["[object Int16Array]"]=E["[object Int32Array]"]=E["[object Map]"]=E["[object Number]"]=E["[object Object]"]=E["[object RegExp]"]=E["[object Set]"]=E["[object String]"]=E["[object Symbol]"]=E["[object Uint8Array]"]=E["[object Uint8ClampedArray]"]=E["[object Uint16Array]"]=E["[object Uint32Array]"]=!0,E["[object Error]"]=E["[object Function]"]=E["[object WeakMap]"]=!1,t.exports=function t(e,n,A,S,M,T){var O,D=1&n,C=2&n,N=4&n;if(A&&(O=M?A(e,S,M,T):A(e)),void 0!==O)return O;if(!w(e))return e;var I=v(e);if(I){if(O=g(e),!D)return c(e,O)}else{var R=p(e),j="[object Function]"==R||"[object GeneratorFunction]"==R;if(m(e))return s(e,D);if("[object Object]"==R||"[object Arguments]"==R||j&&!M){if(O=C||j?{}:b(e),!D)return C?l(e,u(O,e)):f(e,a(O,e))}else{if(!E[R])return M?e:{};O=y(e,R,D)}}T||(T=new r);var L=T.get(e);if(L)return L;T.set(e,O),x(e)?e.forEach((function(r){O.add(t(r,n,A,r,e,T))})):_(e)&&e.forEach((function(r,i){O.set(i,t(r,n,A,i,e,T))}));var B=N?C?d:h:C?keysIn:k,P=I?void 0:B(e);return i(P||e,(function(r,i){P&&(r=e[i=r]),o(O,i,t(r,n,A,i,e,T))})),O}},function(t,e,n){(function(e){var n="object"==typeof e&&e&&e.Object===Object&&e;t.exports=n}).call(this,n(25))},function(t,e){var n=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return n.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},function(t,e,n){var r=n(77),i=function(){try{var t=r(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=i},function(t,e,n){var r=n(598),i=n(130),o=n(16),a=n(95),u=n(168),s=n(131),c=Object.prototype.hasOwnProperty;t.exports=function(t,e){var n=o(t),f=!n&&i(t),l=!n&&!f&&a(t),h=!n&&!f&&!l&&s(t),d=n||f||l||h,p=d?r(t.length,String):[],g=p.length;for(var y in t)!e&&!c.call(t,y)||d&&("length"==y||l&&("offset"==y||"parent"==y)||h&&("buffer"==y||"byteLength"==y||"byteOffset"==y)||u(y,g))||p.push(y);return p}},function(t,e){t.exports=function(t,e){return function(n){return t(e(n))}}},function(t,e,n){(function(t){var r=n(36),i=e&&!e.nodeType&&e,o=i&&"object"==typeof t&&t&&!t.nodeType&&t,a=o&&o.exports===i?r.Buffer:void 0,u=a?a.allocUnsafe:void 0;t.exports=function(t,e){if(e)return t.slice();var n=t.length,r=u?u(n):new t.constructor(n);return t.copy(r),r}}).call(this,n(14)(t))},function(t,e){t.exports=function(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,i=0,o=[];++n<r;){var a=t[n];e(a,n,t)&&(o[i++]=a)}return o}},function(t,e){t.exports=function(){return[]}},function(t,e,n){var r=n(249),i=n(171),o=n(248),a=n(350),u=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)r(e,o(t)),t=i(t);return e}:a;t.exports=u},function(t,e,n){var r=n(353),i=n(248),o=n(63);t.exports=function(t){return r(t,o,i)}},function(t,e,n){var r=n(249),i=n(16);t.exports=function(t,e,n){var o=e(t);return i(t)?o:r(o,n(t))}},function(t,e,n){var r=n(77)(n(36),"Set");t.exports=r},function(t,e,n){var r=n(36).Uint8Array;t.exports=r},function(t,e,n){var r=n(250);t.exports=function(t,e){var n=e?r(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}},function(t,e,n){var r=n(358),i=n(171),o=n(170);t.exports=function(t){return"function"!=typeof t.constructor||o(t)?{}:r(i(t))}},function(t,e,n){var r=n(30),i=Object.create,o=function(){function t(){}return function(e){if(!r(e))return{};if(i)return i(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();t.exports=o},function(t,e,n){var r=n(244),i=n(172),o=n(360),a=n(16);t.exports=function(t,e){return(a(t)?r:i)(t,o(e))}},function(t,e,n){var r=n(79);t.exports=function(t){return"function"==typeof t?t:r}},function(t,e,n){var r=n(349),i=n(623),o=n(57),a=n(16);t.exports=function(t,e){return(a(t)?r:i)(t,o(e,3))}},function(t,e,n){var r=n(626),i=n(44);t.exports=function t(e,n,o,a,u){return e===n||(null==e||null==n||!i(e)&&!i(n)?e!=e&&n!=n:r(e,n,o,a,t,u))}},function(t,e,n){var r=n(364),i=n(629),o=n(365);t.exports=function(t,e,n,a,u,s){var c=1&n,f=t.length,l=e.length;if(f!=l&&!(c&&l>f))return!1;var h=s.get(t);if(h&&s.get(e))return h==e;var d=-1,p=!0,g=2&n?new r:void 0;for(s.set(t,e),s.set(e,t);++d<f;){var y=t[d],b=e[d];if(a)var v=c?a(b,y,d,e,t,s):a(y,b,d,t,e,s);if(void 0!==v){if(v)continue;p=!1;break}if(g){if(!i(e,(function(t,e){if(!o(g,e)&&(y===t||u(y,t,n,a,s)))return g.push(e)}))){p=!1;break}}else if(y!==b&&!u(y,b,n,a,s)){p=!1;break}}return s.delete(t),s.delete(e),p}},function(t,e,n){var r=n(243),i=n(627),o=n(628);function a(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new r;++e<n;)this.add(t[e])}a.prototype.add=a.prototype.push=i,a.prototype.has=o,t.exports=a},function(t,e){t.exports=function(t,e){return t.has(e)}},function(t,e,n){var r=n(30);t.exports=function(t){return t==t&&!r(t)}},function(t,e){t.exports=function(t,e){return function(n){return null!=n&&(n[t]===e&&(void 0!==e||t in Object(n)))}}},function(t,e,n){var r=n(639);t.exports=function(t){return null==t?"":r(t)}},function(t,e,n){var r=n(640),i=n(370);t.exports=function(t,e){return null!=t&&i(t,e,r)}},function(t,e,n){var r=n(173),i=n(130),o=n(16),a=n(168),u=n(245),s=n(132);t.exports=function(t,e,n){for(var c=-1,f=(e=r(e,t)).length,l=!1;++c<f;){var h=s(e[c]);if(!(l=null!=t&&n(t,h)))break;t=t[h]}return l||++c!=f?l:!!(f=null==t?0:t.length)&&u(f)&&a(h,f)&&(o(t)||i(t))}},function(t,e){t.exports=function(t){return function(e){return null==e?void 0:e[t]}}},function(t,e){t.exports=function(t){return void 0===t}},function(t,e,n){var r=n(174),i=n(57),o=n(374),a=n(16);t.exports=function(t,e){return(a(t)?r:o)(t,i(e,3))}},function(t,e,n){var r=n(172),i=n(56);t.exports=function(t,e){var n=-1,o=i(t)?Array(t.length):[];return r(t,(function(t,r,i){o[++n]=e(t,r,i)})),o}},function(t,e,n){var r=n(645),i=n(172),o=n(57),a=n(646),u=n(16);t.exports=function(t,e,n){var s=u(t)?r:a,c=arguments.length<3;return s(t,o(e,4),n,c,i)}},function(t,e,n){var r=n(656),i=Math.max;t.exports=function(t,e,n){return e=i(void 0===e?t.length-1:e,0),function(){for(var o=arguments,a=-1,u=i(o.length-e,0),s=Array(u);++a<u;)s[a]=o[e+a];a=-1;for(var c=Array(e+1);++a<e;)c[a]=o[a];return c[e]=n(s),r(t,this,c)}}},function(t,e,n){var r=n(657),i=n(658)(r);t.exports=i},function(t,e){t.exports=function(t,e,n,r){for(var i=t.length,o=n+(r?1:-1);r?o--:++o<i;)if(e(t[o],o,t))return o;return-1}},function(t,e,n){var r=n(56),i=n(44);t.exports=function(t){return i(t)&&r(t)}},function(t,e,n){var r=n(667),i=n(63);t.exports=function(t){return null==t?[]:r(t,i(t))}},function(t,e,n){var r=n(29),i=n(382);t.exports=function(t,e,n,r){return function(t,e,n,r){var o,a,u={},s=new i,c=function(t){var e=t.v!==o?t.v:t.w,r=u[e],i=n(t),c=a.distance+i;if(i<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+t+" Weight: "+i);c<r.distance&&(r.distance=c,r.predecessor=o,s.decrease(e,c))};t.nodes().forEach((function(t){var n=t===e?0:Number.POSITIVE_INFINITY;u[t]={distance:n},s.add(t,n)}));for(;s.size()>0&&(o=s.removeMin(),(a=u[o]).distance!==Number.POSITIVE_INFINITY);)r(o).forEach(c);return u}(t,String(e),n||o,r||function(e){return t.outEdges(e)})};var o=r.constant(1)},function(t,e,n){var r=n(29);function i(){this._arr=[],this._keyIndices={}}t.exports=i,i.prototype.size=function(){return this._arr.length},i.prototype.keys=function(){return this._arr.map((function(t){return t.key}))},i.prototype.has=function(t){return r.has(this._keyIndices,t)},i.prototype.priority=function(t){var e=this._keyIndices[t];if(void 0!==e)return this._arr[e].priority},i.prototype.min=function(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key},i.prototype.add=function(t,e){var n=this._keyIndices;if(t=String(t),!r.has(n,t)){var i=this._arr,o=i.length;return n[t]=o,i.push({key:t,priority:e}),this._decrease(o),!0}return!1},i.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var t=this._arr.pop();return delete this._keyIndices[t.key],this._heapify(0),t.key},i.prototype.decrease=function(t,e){var n=this._keyIndices[t];if(e>this._arr[n].priority)throw new Error("New priority is greater than current priority. Key: "+t+" Old: "+this._arr[n].priority+" New: "+e);this._arr[n].priority=e,this._decrease(n)},i.prototype._heapify=function(t){var e=this._arr,n=2*t,r=n+1,i=t;n<e.length&&(i=e[n].priority<e[i].priority?n:i,r<e.length&&(i=e[r].priority<e[i].priority?r:i),i!==t&&(this._swap(t,i),this._heapify(i)))},i.prototype._decrease=function(t){for(var e,n=this._arr,r=n[t].priority;0!==t&&!(n[e=t>>1].priority<r);)this._swap(t,e),t=e},i.prototype._swap=function(t,e){var n=this._arr,r=this._keyIndices,i=n[t],o=n[e];n[t]=o,n[e]=i,r[o.key]=t,r[i.key]=e}},function(t,e,n){var r=n(29);t.exports=function(t){var e=0,n=[],i={},o=[];return t.nodes().forEach((function(a){r.has(i,a)||function a(u){var s=i[u]={onStack:!0,lowlink:e,index:e++};if(n.push(u),t.successors(u).forEach((function(t){r.has(i,t)?i[t].onStack&&(s.lowlink=Math.min(s.lowlink,i[t].index)):(a(t),s.lowlink=Math.min(s.lowlink,i[t].lowlink))})),s.lowlink===s.index){var c,f=[];do{c=n.pop(),i[c].onStack=!1,f.push(c)}while(u!==c);o.push(f)}}(a)})),o}},function(t,e,n){var r=n(29);function i(t){var e={},n={},i=[];if(r.each(t.sinks(),(function a(u){if(r.has(n,u))throw new o;r.has(e,u)||(n[u]=!0,e[u]=!0,r.each(t.predecessors(u),a),delete n[u],i.push(u))})),r.size(e)!==t.nodeCount())throw new o;return i}function o(){}t.exports=i,i.CycleException=o,o.prototype=new Error},function(t,e,n){var r=n(29);t.exports=function(t,e,n){r.isArray(e)||(e=[e]);var i=(t.isDirected()?t.successors:t.neighbors).bind(t),o=[],a={};return r.each(e,(function(e){if(!t.hasNode(e))throw new Error("Graph does not have node: "+e);!function t(e,n,i,o,a,u){r.has(o,n)||(o[n]=!0,i||u.push(n),r.each(a(n),(function(n){t(e,n,i,o,a,u)})),i&&u.push(n))}(t,e,"post"===n,a,i,o)})),o}},function(t,e,n){var r;try{r=n(679)}catch(t){}r||(r=window.dagre),t.exports=r},function(t,e,n){var r=n(175),i=n(92),o=n(176),a=n(96),u=Object.prototype,s=u.hasOwnProperty,c=r((function(t,e){t=Object(t);var n=-1,r=e.length,c=r>2?e[2]:void 0;for(c&&o(e[0],e[1],c)&&(r=1);++n<r;)for(var f=e[n],l=a(f),h=-1,d=l.length;++h<d;){var p=l[h],g=t[p];(void 0===g||i(g,u[p])&&!s.call(t,p))&&(t[p]=f[p])}return t}));t.exports=c},function(t,e,n){var r=n(686);t.exports=function(t){return t?(t=r(t))===1/0||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}},function(t,e,n){var r=n(259);t.exports=function(t){return(null==t?0:t.length)?r(t,1):[]}},function(t,e,n){var r=n(167),i=n(92);t.exports=function(t,e,n){(void 0===n||i(t[e],n))&&(void 0!==n||e in t)||r(t,e,n)}},function(t,e,n){var r=n(78),i=n(171),o=n(44),a=Function.prototype,u=Object.prototype,s=a.toString,c=u.hasOwnProperty,f=s.call(Object);t.exports=function(t){if(!o(t)||"[object Object]"!=r(t))return!1;var e=i(t);if(null===e)return!0;var n=c.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&s.call(n)==f}},function(t,e){t.exports=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}},function(t,e){t.exports=function(t,e){return t<e}},function(t,e,n){var r=n(700),i=n(703)((function(t,e){return null==t?{}:r(t,e)}));t.exports=i},function(t,e,n){var r=n(704)();t.exports=r},function(t,e,n){var r=n(368),i=0;t.exports=function(t){var e=++i;return r(t)+e}},function(t,e,n){"use strict";var r=n(7),i=n(37).Graph,o=n(177).slack;function a(t,e){return r.forEach(t.nodes(),(function n(i){r.forEach(e.nodeEdges(i),(function(r){var a=r.v,u=i===a?r.w:a;t.hasNode(u)||o(e,r)||(t.setNode(u,{}),t.setEdge(i,u,{}),n(u))}))})),t.nodeCount()}function u(t,e){return r.minBy(e.edges(),(function(n){if(t.hasNode(n.v)!==t.hasNode(n.w))return o(e,n)}))}function s(t,e,n){r.forEach(t.nodes(),(function(t){e.node(t).rank+=n}))}t.exports=function(t){var e,n,r=new i({directed:!1}),c=t.nodes()[0],f=t.nodeCount();r.setNode(c,{});for(;a(r,t)<f;)e=u(r,t),n=r.hasNode(e.v)?o(t,e):-o(t,e),s(r,t,n);return r}},function(t,e){t.exports=function(t,e){return t.intersect(e)}},function(t,e,n){var r=n(261);t.exports=function(t,e,n){return r(t,e,e,n)}},function(t,e,n){var r=n(737);t.exports=function(t,e,n){var i=t.x,o=t.y,a=[],u=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY;e.forEach((function(t){u=Math.min(u,t.x),s=Math.min(s,t.y)}));for(var c=i-t.width/2-u,f=o-t.height/2-s,l=0;l<e.length;l++){var h=e[l],d=e[l<e.length-1?l+1:0],p=r(t,n,{x:c+h.x,y:f+h.y},{x:c+d.x,y:f+d.y});p&&a.push(p)}if(!a.length)return console.log("NO INTERSECTION FOUND, RETURN NODE CENTER",t),t;a.length>1&&a.sort((function(t,e){var r=t.x-n.x,i=t.y-n.y,o=Math.sqrt(r*r+i*i),a=e.x-n.x,u=e.y-n.y,s=Math.sqrt(a*a+u*u);return o<s?-1:o===s?0:1}));return a[0]}},function(t,e){t.exports=function(t,e){var n,r,i=t.x,o=t.y,a=e.x-i,u=e.y-o,s=t.width/2,c=t.height/2;Math.abs(u)*s>Math.abs(a)*c?(u<0&&(c=-c),n=0===u?0:c*a/u,r=c):(a<0&&(s=-s),n=s,r=0===a?0:s*u/a);return{x:i+n,y:o+r}}},function(t,e,n){var r=n(758);t.exports=function(t){return t?(t=r(t))===1/0||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}},function(t,e,n){var r=n(240);t.exports=function(t){return(null==t?0:t.length)?r(t,1):[]}},function(t,e,n){var r=n(152),i=n(86);t.exports=function(t,e,n){(void 0===n||i(t[e],n))&&(void 0!==n||e in t)||r(t,e,n)}},function(t,e){t.exports=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}},function(t,e){t.exports=function(t,e){return t<e}},function(t,e,n){"use strict";var r=n(8),i=n(38).Graph,o=n(179).slack;function a(t,e){return r.forEach(t.nodes(),(function n(i){r.forEach(e.nodeEdges(i),(function(r){var a=r.v,u=i===a?r.w:a;t.hasNode(u)||o(e,r)||(t.setNode(u,{}),t.setEdge(i,u,{}),n(u))}))})),t.nodeCount()}function u(t,e){return r.minBy(e.edges(),(function(n){if(t.hasNode(n.v)!==t.hasNode(n.w))return o(e,n)}))}function s(t,e,n){r.forEach(t.nodes(),(function(t){e.node(t).rank+=n}))}t.exports=function(t){var e,n,r=new i({directed:!1}),c=t.nodes()[0],f=t.nodeCount();r.setNode(c,{});for(;a(r,t)<f;)e=u(r,t),n=r.hasNode(e.v)?o(t,e):-o(t,e),s(r,t,n);return r}},function(t,e){var n={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},function(t,e,n){"use strict";var r=n(3).Buffer,i=n(265).Transform;function o(t){i.call(this),this._block=r.allocUnsafe(t),this._blockSize=t,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}n(2)(o,i),o.prototype._transform=function(t,e,n){var r=null;try{this.update(t,e)}catch(t){r=t}n(r)},o.prototype._flush=function(t){var e=null;try{this.push(this.digest())}catch(t){e=t}t(e)},o.prototype.update=function(t,e){if(function(t,e){if(!r.isBuffer(t)&&"string"!=typeof t)throw new TypeError(e+" must be a string or a buffer")}(t,"Data"),this._finalized)throw new Error("Digest already called");r.isBuffer(t)||(t=r.from(t,e));for(var n=this._block,i=0;this._blockOffset+t.length-i>=this._blockSize;){for(var o=this._blockOffset;o<this._blockSize;)n[o++]=t[i++];this._update(),this._blockOffset=0}for(;i<t.length;)n[this._blockOffset++]=t[i++];for(var a=0,u=8*t.length;u>0;++a)this._length[a]+=u,(u=this._length[a]/4294967296|0)>0&&(this._length[a]-=4294967296*u);return this},o.prototype._update=function(){throw new Error("_update is not implemented")},o.prototype.digest=function(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var e=this._digest();void 0!==t&&(e=e.toString(t)),this._block.fill(0),this._blockOffset=0;for(var n=0;n<4;++n)this._length[n]=0;return e},o.prototype._digest=function(){throw new Error("_digest is not implemented")},t.exports=o},function(t,e,n){"use strict";(function(e,r){var i=n(180);t.exports=m;var o,a=n(408);m.ReadableState=v;n(266).EventEmitter;var u=function(t,e){return t.listeners(e).length},s=n(411),c=n(268).Buffer,f=e.Uint8Array||function(){};var l=Object.create(n(134));l.inherits=n(2);var h=n(815),d=void 0;d=h&&h.debuglog?h.debuglog("stream"):function(){};var p,g=n(816),y=n(412);l.inherits(m,s);var b=["error","close","destroy","pause","resume"];function v(t,e){t=t||{};var r=e instanceof(o=o||n(80));this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var i=t.highWaterMark,a=t.readableHighWaterMark,u=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(a||0===a)?a:u,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new g,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(p||(p=n(270).StringDecoder),this.decoder=new p(t.encoding),this.encoding=t.encoding)}function m(t){if(o=o||n(80),!(this instanceof m))return new m(t);this._readableState=new v(t,this),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),s.call(this)}function _(t,e,n,r,i){var o,a=t._readableState;null===e?(a.reading=!1,function(t,e){if(e.ended)return;if(e.decoder){var n=e.decoder.end();n&&n.length&&(e.buffer.push(n),e.length+=e.objectMode?1:n.length)}e.ended=!0,k(t)}(t,a)):(i||(o=function(t,e){var n;r=e,c.isBuffer(r)||r instanceof f||"string"==typeof e||void 0===e||t.objectMode||(n=new TypeError("Invalid non-string/buffer chunk"));var r;return n}(a,e)),o?t.emit("error",o):a.objectMode||e&&e.length>0?("string"==typeof e||a.objectMode||Object.getPrototypeOf(e)===c.prototype||(e=function(t){return c.from(t)}(e)),r?a.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):w(t,a,e,!0):a.ended?t.emit("error",new Error("stream.push() after EOF")):(a.reading=!1,a.decoder&&!n?(e=a.decoder.write(e),a.objectMode||0!==e.length?w(t,a,e,!1):A(t,a)):w(t,a,e,!1))):r||(a.reading=!1));return function(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||0===t.length)}(a)}function w(t,e,n,r){e.flowing&&0===e.length&&!e.sync?(t.emit("data",n),t.read(0)):(e.length+=e.objectMode?1:n.length,r?e.buffer.unshift(n):e.buffer.push(n),e.needReadable&&k(t)),A(t,e)}Object.defineProperty(m.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),m.prototype.destroy=y.destroy,m.prototype._undestroy=y.undestroy,m.prototype._destroy=function(t,e){this.push(null),e(t)},m.prototype.push=function(t,e){var n,r=this._readableState;return r.objectMode?n=!0:"string"==typeof t&&((e=e||r.defaultEncoding)!==r.encoding&&(t=c.from(t,e),e=""),n=!0),_(this,t,e,!1,n)},m.prototype.unshift=function(t){return _(this,t,null,!0,!1)},m.prototype.isPaused=function(){return!1===this._readableState.flowing},m.prototype.setEncoding=function(t){return p||(p=n(270).StringDecoder),this._readableState.decoder=new p(t),this._readableState.encoding=t,this};function x(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!=t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=function(t){return t>=8388608?t=8388608:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function k(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(d("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?i.nextTick(E,t):E(t))}function E(t){d("emit readable"),t.emit("readable"),O(t)}function A(t,e){e.readingMore||(e.readingMore=!0,i.nextTick(S,t,e))}function S(t,e){for(var n=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(d("maybeReadMore read 0"),t.read(0),n!==e.length);)n=e.length;e.readingMore=!1}function M(t){d("readable nexttick read 0"),t.read(0)}function T(t,e){e.reading||(d("resume read 0"),t.read(0)),e.resumeScheduled=!1,e.awaitDrain=0,t.emit("resume"),O(t),e.flowing&&!e.reading&&t.read(0)}function O(t){var e=t._readableState;for(d("flow",e.flowing);e.flowing&&null!==t.read(););}function D(t,e){return 0===e.length?null:(e.objectMode?n=e.buffer.shift():!t||t>=e.length?(n=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear()):n=function(t,e,n){var r;t<e.head.data.length?(r=e.head.data.slice(0,t),e.head.data=e.head.data.slice(t)):r=t===e.head.data.length?e.shift():n?function(t,e){var n=e.head,r=1,i=n.data;t-=i.length;for(;n=n.next;){var o=n.data,a=t>o.length?o.length:t;if(a===o.length?i+=o:i+=o.slice(0,t),0===(t-=a)){a===o.length?(++r,n.next?e.head=n.next:e.head=e.tail=null):(e.head=n,n.data=o.slice(a));break}++r}return e.length-=r,i}(t,e):function(t,e){var n=c.allocUnsafe(t),r=e.head,i=1;r.data.copy(n),t-=r.data.length;for(;r=r.next;){var o=r.data,a=t>o.length?o.length:t;if(o.copy(n,n.length-t,0,a),0===(t-=a)){a===o.length?(++i,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=o.slice(a));break}++i}return e.length-=i,n}(t,e);return r}(t,e.buffer,e.decoder),n);var n}function C(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,i.nextTick(N,e,t))}function N(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function I(t,e){for(var n=0,r=t.length;n<r;n++)if(t[n]===e)return n;return-1}m.prototype.read=function(t){d("read",t),t=parseInt(t,10);var e=this._readableState,n=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return d("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?C(this):k(this),null;if(0===(t=x(t,e))&&e.ended)return 0===e.length&&C(this),null;var r,i=e.needReadable;return d("need readable",i),(0===e.length||e.length-t<e.highWaterMark)&&d("length less than watermark",i=!0),e.ended||e.reading?d("reading or ended",i=!1):i&&(d("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=x(n,e))),null===(r=t>0?D(t,e):null)?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),n!==t&&e.ended&&C(this)),null!==r&&this.emit("data",r),r},m.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))},m.prototype.pipe=function(t,e){var n=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=t;break;case 1:o.pipes=[o.pipes,t];break;default:o.pipes.push(t)}o.pipesCount+=1,d("pipe count=%d opts=%j",o.pipesCount,e);var s=(!e||!1!==e.end)&&t!==r.stdout&&t!==r.stderr?f:m;function c(e,r){d("onunpipe"),e===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,d("cleanup"),t.removeListener("close",b),t.removeListener("finish",v),t.removeListener("drain",l),t.removeListener("error",y),t.removeListener("unpipe",c),n.removeListener("end",f),n.removeListener("end",m),n.removeListener("data",g),h=!0,!o.awaitDrain||t._writableState&&!t._writableState.needDrain||l())}function f(){d("onend"),t.end()}o.endEmitted?i.nextTick(s):n.once("end",s),t.on("unpipe",c);var l=function(t){return function(){var e=t._readableState;d("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&u(t,"data")&&(e.flowing=!0,O(t))}}(n);t.on("drain",l);var h=!1;var p=!1;function g(e){d("ondata"),p=!1,!1!==t.write(e)||p||((1===o.pipesCount&&o.pipes===t||o.pipesCount>1&&-1!==I(o.pipes,t))&&!h&&(d("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,p=!0),n.pause())}function y(e){d("onerror",e),m(),t.removeListener("error",y),0===u(t,"error")&&t.emit("error",e)}function b(){t.removeListener("finish",v),m()}function v(){d("onfinish"),t.removeListener("close",b),m()}function m(){d("unpipe"),n.unpipe(t)}return n.on("data",g),function(t,e,n){if("function"==typeof t.prependListener)return t.prependListener(e,n);t._events&&t._events[e]?a(t._events[e])?t._events[e].unshift(n):t._events[e]=[n,t._events[e]]:t.on(e,n)}(t,"error",y),t.once("close",b),t.once("finish",v),t.emit("pipe",n),o.flowing||(d("pipe resume"),n.resume()),t},m.prototype.unpipe=function(t){var e=this._readableState,n={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,n),this);if(!t){var r=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o<i;o++)r[o].emit("unpipe",this,n);return this}var a=I(e.pipes,t);return-1===a?this:(e.pipes.splice(a,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,n),this)},m.prototype.on=function(t,e){var n=s.prototype.on.call(this,t,e);if("data"===t)!1!==this._readableState.flowing&&this.resume();else if("readable"===t){var r=this._readableState;r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.emittedReadable=!1,r.reading?r.length&&k(this):i.nextTick(M,this))}return n},m.prototype.addListener=m.prototype.on,m.prototype.resume=function(){var t=this._readableState;return t.flowing||(d("resume"),t.flowing=!0,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,i.nextTick(T,t,e))}(this,t)),this},m.prototype.pause=function(){return d("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(d("pause"),this._readableState.flowing=!1,this.emit("pause")),this},m.prototype.wrap=function(t){var e=this,n=this._readableState,r=!1;for(var i in t.on("end",(function(){if(d("wrapped end"),n.decoder&&!n.ended){var t=n.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(i){(d("wrapped data"),n.decoder&&(i=n.decoder.write(i)),n.objectMode&&null==i)||(n.objectMode||i&&i.length)&&(e.push(i)||(r=!0,t.pause()))})),t)void 0===this[i]&&"function"==typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var o=0;o<b.length;o++)t.on(b[o],this.emit.bind(this,b[o]));return this._read=function(e){d("wrapped _read",e),r&&(r=!1,t.resume())},this},Object.defineProperty(m.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),m._fromList=D}).call(this,n(25),n(17))},function(t,e,n){t.exports=n(266).EventEmitter},function(t,e,n){"use strict";var r=n(180);function i(t,e){t.emit("error",e)}t.exports={destroy:function(t,e){var n=this,o=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return o||a?(e?e(t):!t||this._writableState&&this._writableState.errorEmitted||r.nextTick(i,this,t),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!e&&t?(r.nextTick(i,n,t),n._writableState&&(n._writableState.errorEmitted=!0)):e&&e(t)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},function(t,e,n){"use strict";t.exports=a;var r=n(80),i=Object.create(n(134));function o(t,e){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(!r)return this.emit("error",new Error("write callback called multiple times"));n.writechunk=null,n.writecb=null,null!=e&&this.push(e),r(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function a(t){if(!(this instanceof a))return new a(t);r.call(this,t),this._transformState={afterTransform:o.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",u)}function u(){var t=this;"function"==typeof this._flush?this._flush((function(e,n){s(t,e,n)})):s(this,null,null)}function s(t,e,n){if(e)return t.emit("error",e);if(null!=n&&t.push(n),t._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(t._transformState.transforming)throw new Error("Calling transform done when still transforming");return t.push(null)}i.inherits=n(2),i.inherits(a,r),a.prototype.push=function(t,e){return this._transformState.needTransform=!1,r.prototype.push.call(this,t,e)},a.prototype._transform=function(t,e,n){throw new Error("_transform() is not implemented")},a.prototype._write=function(t,e,n){var r=this._transformState;if(r.writecb=n,r.writechunk=t,r.writeencoding=e,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},a.prototype._read=function(t){var e=this._transformState;null!==e.writechunk&&e.writecb&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0},a.prototype._destroy=function(t,e){var n=this;r.prototype._destroy.call(this,t,(function(t){e(t),n.emit("close")}))}},function(t,e,n){var r=n(2),i=n(101),o=n(3).Buffer,a=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],u=new Array(64);function s(){this.init(),this._w=u,i.call(this,64,56)}function c(t,e,n){return n^t&(e^n)}function f(t,e,n){return t&e|n&(t|e)}function l(t){return(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10)}function h(t){return(t>>>6|t<<26)^(t>>>11|t<<21)^(t>>>25|t<<7)}function d(t){return(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3}r(s,i),s.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},s.prototype._update=function(t){for(var e,n=this._w,r=0|this._a,i=0|this._b,o=0|this._c,u=0|this._d,s=0|this._e,p=0|this._f,g=0|this._g,y=0|this._h,b=0;b<16;++b)n[b]=t.readInt32BE(4*b);for(;b<64;++b)n[b]=0|(((e=n[b-2])>>>17|e<<15)^(e>>>19|e<<13)^e>>>10)+n[b-7]+d(n[b-15])+n[b-16];for(var v=0;v<64;++v){var m=y+h(s)+c(s,p,g)+a[v]+n[v]|0,_=l(r)+f(r,i,o)|0;y=g,g=p,p=s,s=u+m|0,u=o,o=i,i=r,r=m+_|0}this._a=r+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=u+this._d|0,this._e=s+this._e|0,this._f=p+this._f|0,this._g=g+this._g|0,this._h=y+this._h|0},s.prototype._hash=function(){var t=o.allocUnsafe(32);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t.writeInt32BE(this._h,28),t},t.exports=s},function(t,e,n){var r=n(2),i=n(101),o=n(3).Buffer,a=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],u=new Array(160);function s(){this.init(),this._w=u,i.call(this,128,112)}function c(t,e,n){return n^t&(e^n)}function f(t,e,n){return t&e|n&(t|e)}function l(t,e){return(t>>>28|e<<4)^(e>>>2|t<<30)^(e>>>7|t<<25)}function h(t,e){return(t>>>14|e<<18)^(t>>>18|e<<14)^(e>>>9|t<<23)}function d(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^t>>>7}function p(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^(t>>>7|e<<25)}function g(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^t>>>6}function y(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^(t>>>6|e<<26)}function b(t,e){return t>>>0<e>>>0?1:0}r(s,i),s.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},s.prototype._update=function(t){for(var e=this._w,n=0|this._ah,r=0|this._bh,i=0|this._ch,o=0|this._dh,u=0|this._eh,s=0|this._fh,v=0|this._gh,m=0|this._hh,_=0|this._al,w=0|this._bl,x=0|this._cl,k=0|this._dl,E=0|this._el,A=0|this._fl,S=0|this._gl,M=0|this._hl,T=0;T<32;T+=2)e[T]=t.readInt32BE(4*T),e[T+1]=t.readInt32BE(4*T+4);for(;T<160;T+=2){var O=e[T-30],D=e[T-30+1],C=d(O,D),N=p(D,O),I=g(O=e[T-4],D=e[T-4+1]),R=y(D,O),j=e[T-14],L=e[T-14+1],B=e[T-32],P=e[T-32+1],F=N+L|0,q=C+j+b(F,N)|0;q=(q=q+I+b(F=F+R|0,R)|0)+B+b(F=F+P|0,P)|0,e[T]=q,e[T+1]=F}for(var U=0;U<160;U+=2){q=e[U],F=e[U+1];var z=f(n,r,i),Y=f(_,w,x),V=l(n,_),G=l(_,n),H=h(u,E),W=h(E,u),$=a[U],K=a[U+1],Z=c(u,s,v),X=c(E,A,S),J=M+W|0,Q=m+H+b(J,M)|0;Q=(Q=(Q=Q+Z+b(J=J+X|0,X)|0)+$+b(J=J+K|0,K)|0)+q+b(J=J+F|0,F)|0;var tt=G+Y|0,et=V+z+b(tt,G)|0;m=v,M=S,v=s,S=A,s=u,A=E,u=o+Q+b(E=k+J|0,k)|0,o=i,k=x,i=r,x=w,r=n,w=_,n=Q+et+b(_=J+tt|0,J)|0}this._al=this._al+_|0,this._bl=this._bl+w|0,this._cl=this._cl+x|0,this._dl=this._dl+k|0,this._el=this._el+E|0,this._fl=this._fl+A|0,this._gl=this._gl+S|0,this._hl=this._hl+M|0,this._ah=this._ah+n+b(this._al,_)|0,this._bh=this._bh+r+b(this._bl,w)|0,this._ch=this._ch+i+b(this._cl,x)|0,this._dh=this._dh+o+b(this._dl,k)|0,this._eh=this._eh+u+b(this._el,E)|0,this._fh=this._fh+s+b(this._fl,A)|0,this._gh=this._gh+v+b(this._gl,S)|0,this._hh=this._hh+m+b(this._hl,M)|0},s.prototype._hash=function(){var t=o.allocUnsafe(64);function e(e,n,r){t.writeInt32BE(e,r),t.writeInt32BE(n,r+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),e(this._gh,this._gl,48),e(this._hh,this._hl,56),t},t.exports=s},function(t,e,n){"use strict";var r=n(2),i=n(830),o=n(65),a=n(3).Buffer,u=n(417),s=n(271),c=n(272),f=a.alloc(128);function l(t,e){o.call(this,"digest"),"string"==typeof e&&(e=a.from(e));var n="sha512"===t||"sha384"===t?128:64;(this._alg=t,this._key=e,e.length>n)?e=("rmd160"===t?new s:c(t)).update(e).digest():e.length<n&&(e=a.concat([e,f],n));for(var r=this._ipad=a.allocUnsafe(n),i=this._opad=a.allocUnsafe(n),u=0;u<n;u++)r[u]=54^e[u],i[u]=92^e[u];this._hash="rmd160"===t?new s:c(t),this._hash.update(r)}r(l,o),l.prototype._update=function(t){this._hash.update(t)},l.prototype._final=function(){var t=this._hash.digest();return("rmd160"===this._alg?new s:c(this._alg)).update(this._opad).update(t).digest()},t.exports=function(t,e){return"rmd160"===(t=t.toLowerCase())||"ripemd160"===t?new l("rmd160",e):"md5"===t?new i(u,e):new l(t,e)}},function(t,e,n){var r=n(264);t.exports=function(t){return(new r).update(t).digest()}},function(t){t.exports=JSON.parse('{"sha224WithRSAEncryption":{"sign":"rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"RSA-SHA224":{"sign":"ecdsa/rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"sha256WithRSAEncryption":{"sign":"rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"RSA-SHA256":{"sign":"ecdsa/rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"sha384WithRSAEncryption":{"sign":"rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"RSA-SHA384":{"sign":"ecdsa/rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"sha512WithRSAEncryption":{"sign":"rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA512":{"sign":"ecdsa/rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA1":{"sign":"rsa","hash":"sha1","id":"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{"sign":"ecdsa","hash":"sha1","id":""},"sha256":{"sign":"ecdsa","hash":"sha256","id":""},"sha224":{"sign":"ecdsa","hash":"sha224","id":""},"sha384":{"sign":"ecdsa","hash":"sha384","id":""},"sha512":{"sign":"ecdsa","hash":"sha512","id":""},"DSA-SHA":{"sign":"dsa","hash":"sha1","id":""},"DSA-SHA1":{"sign":"dsa","hash":"sha1","id":""},"DSA":{"sign":"dsa","hash":"sha1","id":""},"DSA-WITH-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-WITH-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-WITH-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-WITH-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-RIPEMD160":{"sign":"dsa","hash":"rmd160","id":""},"ripemd160WithRSA":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"RSA-RIPEMD160":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"md5WithRSAEncryption":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"},"RSA-MD5":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"}}')},function(t,e,n){e.pbkdf2=n(832),e.pbkdf2Sync=n(422)},function(t,e,n){(function(e){var n=Math.pow(2,30)-1;function r(t,n){if("string"!=typeof t&&!e.isBuffer(t))throw new TypeError(n+" must be a buffer or string")}t.exports=function(t,e,i,o){if(r(t,"Password"),r(e,"Salt"),"number"!=typeof i)throw new TypeError("Iterations not a number");if(i<0)throw new TypeError("Bad iterations");if("number"!=typeof o)throw new TypeError("Key length not a number");if(o<0||o>n||o!=o)throw new TypeError("Bad key length")}}).call(this,n(18).Buffer)},function(t,e,n){(function(e){var n;e.browser?n="utf-8":n=parseInt(e.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary";t.exports=n}).call(this,n(17))},function(t,e,n){var r=n(417),i=n(271),o=n(272),a=n(420),u=n(421),s=n(3).Buffer,c=s.alloc(128),f={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function l(t,e,n){var a=function(t){function e(e){return o(t).update(e).digest()}return"rmd160"===t||"ripemd160"===t?function(t){return(new i).update(t).digest()}:"md5"===t?r:e}(t),u="sha512"===t||"sha384"===t?128:64;e.length>u?e=a(e):e.length<u&&(e=s.concat([e,c],u));for(var l=s.allocUnsafe(u+f[t]),h=s.allocUnsafe(u+f[t]),d=0;d<u;d++)l[d]=54^e[d],h[d]=92^e[d];var p=s.allocUnsafe(u+n+4);l.copy(p,0,0,u),this.ipad1=p,this.ipad2=l,this.opad=h,this.alg=t,this.blocksize=u,this.hash=a,this.size=f[t]}l.prototype.run=function(t,e){return t.copy(e,this.blocksize),this.hash(e).copy(this.opad,this.blocksize),this.hash(this.opad)},t.exports=function(t,e,n,r,i){a(t,e,n,r),s.isBuffer(t)||(t=s.from(t,u)),s.isBuffer(e)||(e=s.from(e,u));var o=new l(i=i||"sha1",t,e.length),c=s.allocUnsafe(r),h=s.allocUnsafe(e.length+4);e.copy(h,0,0,e.length);for(var d=0,p=f[i],g=Math.ceil(r/p),y=1;y<=g;y++){h.writeUInt32BE(y,e.length);for(var b=o.run(h,o.ipad1),v=b,m=1;m<n;m++){v=o.run(v,o.ipad2);for(var _=0;_<p;_++)b[_]^=v[_]}b.copy(c,d),d+=p}return c}},function(t,e,n){"use strict";e.readUInt32BE=function(t,e){return(t[0+e]<<24|t[1+e]<<16|t[2+e]<<8|t[3+e])>>>0},e.writeUInt32BE=function(t,e,n){t[0+n]=e>>>24,t[1+n]=e>>>16&255,t[2+n]=e>>>8&255,t[3+n]=255&e},e.ip=function(t,e,n,r){for(var i=0,o=0,a=6;a>=0;a-=2){for(var u=0;u<=24;u+=8)i<<=1,i|=e>>>u+a&1;for(u=0;u<=24;u+=8)i<<=1,i|=t>>>u+a&1}for(a=6;a>=0;a-=2){for(u=1;u<=25;u+=8)o<<=1,o|=e>>>u+a&1;for(u=1;u<=25;u+=8)o<<=1,o|=t>>>u+a&1}n[r+0]=i>>>0,n[r+1]=o>>>0},e.rip=function(t,e,n,r){for(var i=0,o=0,a=0;a<4;a++)for(var u=24;u>=0;u-=8)i<<=1,i|=e>>>u+a&1,i<<=1,i|=t>>>u+a&1;for(a=4;a<8;a++)for(u=24;u>=0;u-=8)o<<=1,o|=e>>>u+a&1,o<<=1,o|=t>>>u+a&1;n[r+0]=i>>>0,n[r+1]=o>>>0},e.pc1=function(t,e,n,r){for(var i=0,o=0,a=7;a>=5;a--){for(var u=0;u<=24;u+=8)i<<=1,i|=e>>u+a&1;for(u=0;u<=24;u+=8)i<<=1,i|=t>>u+a&1}for(u=0;u<=24;u+=8)i<<=1,i|=e>>u+a&1;for(a=1;a<=3;a++){for(u=0;u<=24;u+=8)o<<=1,o|=e>>u+a&1;for(u=0;u<=24;u+=8)o<<=1,o|=t>>u+a&1}for(u=0;u<=24;u+=8)o<<=1,o|=t>>u+a&1;n[r+0]=i>>>0,n[r+1]=o>>>0},e.r28shl=function(t,e){return t<<e&268435455|t>>>28-e};var r=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];e.pc2=function(t,e,n,i){for(var o=0,a=0,u=r.length>>>1,s=0;s<u;s++)o<<=1,o|=t>>>r[s]&1;for(s=u;s<r.length;s++)a<<=1,a|=e>>>r[s]&1;n[i+0]=o>>>0,n[i+1]=a>>>0},e.expand=function(t,e,n){var r=0,i=0;r=(1&t)<<5|t>>>27;for(var o=23;o>=15;o-=4)r<<=6,r|=t>>>o&63;for(o=11;o>=3;o-=4)i|=t>>>o&63,i<<=6;i|=(31&t)<<1|t>>>31,e[n+0]=r>>>0,e[n+1]=i>>>0};var i=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];e.substitute=function(t,e){for(var n=0,r=0;r<4;r++){n<<=4,n|=i[64*r+(t>>>18-6*r&63)]}for(r=0;r<4;r++){n<<=4,n|=i[256+64*r+(e>>>18-6*r&63)]}return n>>>0};var o=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];e.permute=function(t){for(var e=0,n=0;n<o.length;n++)e<<=1,e|=t>>>o[n]&1;return e>>>0},e.padSplit=function(t,e,n){for(var r=t.toString(2);r.length<e;)r="0"+r;for(var i=[],o=0;o<e;o+=n)i.push(r.slice(o,o+n));return i.join(" ")}},function(t,e,n){"use strict";var r=n(32),i=n(2),o=n(423),a=n(273);function u(){this.tmp=new Array(2),this.keys=null}function s(t){a.call(this,t);var e=new u;this._desState=e,this.deriveKeys(e,t.key)}i(s,a),t.exports=s,s.create=function(t){return new s(t)};var c=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];s.prototype.deriveKeys=function(t,e){t.keys=new Array(32),r.equal(e.length,this.blockSize,"Invalid key length");var n=o.readUInt32BE(e,0),i=o.readUInt32BE(e,4);o.pc1(n,i,t.tmp,0),n=t.tmp[0],i=t.tmp[1];for(var a=0;a<t.keys.length;a+=2){var u=c[a>>>1];n=o.r28shl(n,u),i=o.r28shl(i,u),o.pc2(n,i,t.keys,a)}},s.prototype._update=function(t,e,n,r){var i=this._desState,a=o.readUInt32BE(t,e),u=o.readUInt32BE(t,e+4);o.ip(a,u,i.tmp,0),a=i.tmp[0],u=i.tmp[1],"encrypt"===this.type?this._encrypt(i,a,u,i.tmp,0):this._decrypt(i,a,u,i.tmp,0),a=i.tmp[0],u=i.tmp[1],o.writeUInt32BE(n,a,r),o.writeUInt32BE(n,u,r+4)},s.prototype._pad=function(t,e){for(var n=t.length-e,r=e;r<t.length;r++)t[r]=n;return!0},s.prototype._unpad=function(t){for(var e=t[t.length-1],n=t.length-e;n<t.length;n++)r.equal(t[n],e);return t.slice(0,t.length-e)},s.prototype._encrypt=function(t,e,n,r,i){for(var a=e,u=n,s=0;s<t.keys.length;s+=2){var c=t.keys[s],f=t.keys[s+1];o.expand(u,t.tmp,0),c^=t.tmp[0],f^=t.tmp[1];var l=o.substitute(c,f),h=u;u=(a^o.permute(l))>>>0,a=h}o.rip(u,a,r,i)},s.prototype._decrypt=function(t,e,n,r,i){for(var a=n,u=e,s=t.keys.length-2;s>=0;s-=2){var c=t.keys[s],f=t.keys[s+1];o.expand(a,t.tmp,0),c^=t.tmp[0],f^=t.tmp[1];var l=o.substitute(c,f),h=a;a=(u^o.permute(l))>>>0,u=h}o.rip(a,u,r,i)}},function(t,e,n){var r=n(135),i=n(3).Buffer,o=n(426);function a(t){var e=t._cipher.encryptBlockRaw(t._prev);return o(t._prev),e}e.encrypt=function(t,e){var n=Math.ceil(e.length/16),o=t._cache.length;t._cache=i.concat([t._cache,i.allocUnsafe(16*n)]);for(var u=0;u<n;u++){var s=a(t),c=o+16*u;t._cache.writeUInt32BE(s[0],c+0),t._cache.writeUInt32BE(s[1],c+4),t._cache.writeUInt32BE(s[2],c+8),t._cache.writeUInt32BE(s[3],c+12)}var f=t._cache.slice(0,e.length);return t._cache=t._cache.slice(e.length),r(e,f)}},function(t,e){t.exports=function(t){for(var e,n=t.length;n--;){if(255!==(e=t.readUInt8(n))){e++,t.writeUInt8(e,n);break}t.writeUInt8(0,n)}}},function(t){t.exports=JSON.parse('{"aes-128-ecb":{"cipher":"AES","key":128,"iv":0,"mode":"ECB","type":"block"},"aes-192-ecb":{"cipher":"AES","key":192,"iv":0,"mode":"ECB","type":"block"},"aes-256-ecb":{"cipher":"AES","key":256,"iv":0,"mode":"ECB","type":"block"},"aes-128-cbc":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes-192-cbc":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes-256-cbc":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes128":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes192":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes256":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes-128-cfb":{"cipher":"AES","key":128,"iv":16,"mode":"CFB","type":"stream"},"aes-192-cfb":{"cipher":"AES","key":192,"iv":16,"mode":"CFB","type":"stream"},"aes-256-cfb":{"cipher":"AES","key":256,"iv":16,"mode":"CFB","type":"stream"},"aes-128-cfb8":{"cipher":"AES","key":128,"iv":16,"mode":"CFB8","type":"stream"},"aes-192-cfb8":{"cipher":"AES","key":192,"iv":16,"mode":"CFB8","type":"stream"},"aes-256-cfb8":{"cipher":"AES","key":256,"iv":16,"mode":"CFB8","type":"stream"},"aes-128-cfb1":{"cipher":"AES","key":128,"iv":16,"mode":"CFB1","type":"stream"},"aes-192-cfb1":{"cipher":"AES","key":192,"iv":16,"mode":"CFB1","type":"stream"},"aes-256-cfb1":{"cipher":"AES","key":256,"iv":16,"mode":"CFB1","type":"stream"},"aes-128-ofb":{"cipher":"AES","key":128,"iv":16,"mode":"OFB","type":"stream"},"aes-192-ofb":{"cipher":"AES","key":192,"iv":16,"mode":"OFB","type":"stream"},"aes-256-ofb":{"cipher":"AES","key":256,"iv":16,"mode":"OFB","type":"stream"},"aes-128-ctr":{"cipher":"AES","key":128,"iv":16,"mode":"CTR","type":"stream"},"aes-192-ctr":{"cipher":"AES","key":192,"iv":16,"mode":"CTR","type":"stream"},"aes-256-ctr":{"cipher":"AES","key":256,"iv":16,"mode":"CTR","type":"stream"},"aes-128-gcm":{"cipher":"AES","key":128,"iv":12,"mode":"GCM","type":"auth"},"aes-192-gcm":{"cipher":"AES","key":192,"iv":12,"mode":"GCM","type":"auth"},"aes-256-gcm":{"cipher":"AES","key":256,"iv":12,"mode":"GCM","type":"auth"}}')},function(t,e,n){var r=n(181),i=n(3).Buffer,o=n(65),a=n(2),u=n(845),s=n(135),c=n(426);function f(t,e,n,a){o.call(this);var s=i.alloc(4,0);this._cipher=new r.AES(e);var f=this._cipher.encryptBlock(s);this._ghash=new u(f),n=function(t,e,n){if(12===e.length)return t._finID=i.concat([e,i.from([0,0,0,1])]),i.concat([e,i.from([0,0,0,2])]);var r=new u(n),o=e.length,a=o%16;r.update(e),a&&(a=16-a,r.update(i.alloc(a,0))),r.update(i.alloc(8,0));var s=8*o,f=i.alloc(8);f.writeUIntBE(s,0,8),r.update(f),t._finID=r.state;var l=i.from(t._finID);return c(l),l}(this,n,f),this._prev=i.from(n),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=a,this._alen=0,this._len=0,this._mode=t,this._authTag=null,this._called=!1}a(f,o),f.prototype._update=function(t){if(!this._called&&this._alen){var e=16-this._alen%16;e<16&&(e=i.alloc(e,0),this._ghash.update(e))}this._called=!0;var n=this._mode.encrypt(this,t);return this._decrypt?this._ghash.update(t):this._ghash.update(n),this._len+=t.length,n},f.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var t=s(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(t,e){var n=0;t.length!==e.length&&n++;for(var r=Math.min(t.length,e.length),i=0;i<r;++i)n+=t[i]^e[i];return n}(t,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=t,this._cipher.scrub()},f.prototype.getAuthTag=function(){if(this._decrypt||!i.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag},f.prototype.setAuthTag=function(t){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=t},f.prototype.setAAD=function(t){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(t),this._alen+=t.length},t.exports=f},function(t,e,n){var r=n(181),i=n(3).Buffer,o=n(65);function a(t,e,n,a){o.call(this),this._cipher=new r.AES(e),this._prev=i.from(n),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=a,this._mode=t}n(2)(a,o),a.prototype._update=function(t){return this._mode.encrypt(this,t,this._decrypt)},a.prototype._final=function(){this._cipher.scrub()},t.exports=a},function(t,e,n){var r=n(100);t.exports=v,v.simpleSieve=y,v.fermatTest=b;var i=n(12),o=new i(24),a=new(n(431)),u=new i(1),s=new i(2),c=new i(5),f=(new i(16),new i(8),new i(10)),l=new i(3),h=(new i(7),new i(11)),d=new i(4),p=(new i(12),null);function g(){if(null!==p)return p;var t=[];t[0]=2;for(var e=1,n=3;n<1048576;n+=2){for(var r=Math.ceil(Math.sqrt(n)),i=0;i<e&&t[i]<=r&&n%t[i]!=0;i++);e!==i&&t[i]<=r||(t[e++]=n)}return p=t,t}function y(t){for(var e=g(),n=0;n<e.length;n++)if(0===t.modn(e[n]))return 0===t.cmpn(e[n]);return!0}function b(t){var e=i.mont(t);return 0===s.toRed(e).redPow(t.subn(1)).fromRed().cmpn(1)}function v(t,e){if(t<16)return new i(2===e||5===e?[140,123]:[140,39]);var n,p;for(e=new i(e);;){for(n=new i(r(Math.ceil(t/8)));n.bitLength()>t;)n.ishrn(1);if(n.isEven()&&n.iadd(u),n.testn(1)||n.iadd(s),e.cmp(s)){if(!e.cmp(c))for(;n.mod(f).cmp(l);)n.iadd(d)}else for(;n.mod(o).cmp(h);)n.iadd(d);if(y(p=n.shrn(1))&&y(n)&&b(p)&&b(n)&&a.test(p)&&a.test(n))return n}}},function(t,e,n){var r=n(12),i=n(276);function o(t){this.rand=t||new i.Rand}t.exports=o,o.create=function(t){return new o(t)},o.prototype._randbelow=function(t){var e=t.bitLength(),n=Math.ceil(e/8);do{var i=new r(this.rand.generate(n))}while(i.cmp(t)>=0);return i},o.prototype._randrange=function(t,e){var n=e.sub(t);return t.add(this._randbelow(n))},o.prototype.test=function(t,e,n){var i=t.bitLength(),o=r.mont(t),a=new r(1).toRed(o);e||(e=Math.max(1,i/48|0));for(var u=t.subn(1),s=0;!u.testn(s);s++);for(var c=t.shrn(s),f=u.toRed(o);e>0;e--){var l=this._randrange(new r(2),u);n&&n(l);var h=l.toRed(o).redPow(c);if(0!==h.cmp(a)&&0!==h.cmp(f)){for(var d=1;d<s;d++){if(0===(h=h.redSqr()).cmp(a))return!1;if(0===h.cmp(f))break}if(d===s)return!1}}return!0},o.prototype.getDivisor=function(t,e){var n=t.bitLength(),i=r.mont(t),o=new r(1).toRed(i);e||(e=Math.max(1,n/48|0));for(var a=t.subn(1),u=0;!a.testn(u);u++);for(var s=t.shrn(u),c=a.toRed(i);e>0;e--){var f=this._randrange(new r(2),a),l=t.gcd(f);if(0!==l.cmpn(1))return l;var h=f.toRed(i).redPow(s);if(0!==h.cmp(o)&&0!==h.cmp(c)){for(var d=1;d<u;d++){if(0===(h=h.redSqr()).cmp(o))return h.fromRed().subn(1).gcd(t);if(0===h.cmp(c))break}if(d===u)return(h=h.redSqr()).fromRed().subn(1).gcd(t)}}return!1}},function(t,e,n){"use strict";var r=e;function i(t){return 1===t.length?"0"+t:t}function o(t){for(var e="",n=0;n<t.length;n++)e+=i(t[n].toString(16));return e}r.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var n=[];if("string"!=typeof t){for(var r=0;r<t.length;r++)n[r]=0|t[r];return n}if("hex"===e){(t=t.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(t="0"+t);for(r=0;r<t.length;r+=2)n.push(parseInt(t[r]+t[r+1],16))}else for(r=0;r<t.length;r++){var i=t.charCodeAt(r),o=i>>8,a=255&i;o?n.push(o,a):n.push(a)}return n},r.zero2=i,r.toHex=o,r.encode=function(t,e){return"hex"===e?o(t):t}},function(t,e,n){"use strict";var r=e;r.base=n(183),r.short=n(856),r.mont=n(857),r.edwards=n(858)},function(t,e,n){"use strict";var r=n(45).rotr32;function i(t,e,n){return t&e^~t&n}function o(t,e,n){return t&e^t&n^e&n}function a(t,e,n){return t^e^n}e.ft_1=function(t,e,n,r){return 0===t?i(e,n,r):1===t||3===t?a(e,n,r):2===t?o(e,n,r):void 0},e.ch32=i,e.maj32=o,e.p32=a,e.s0_256=function(t){return r(t,2)^r(t,13)^r(t,22)},e.s1_256=function(t){return r(t,6)^r(t,11)^r(t,25)},e.g0_256=function(t){return r(t,7)^r(t,18)^t>>>3},e.g1_256=function(t){return r(t,17)^r(t,19)^t>>>10}},function(t,e,n){"use strict";var r=n(45),i=n(136),o=n(434),a=n(32),u=r.sum32,s=r.sum32_4,c=r.sum32_5,f=o.ch32,l=o.maj32,h=o.s0_256,d=o.s1_256,p=o.g0_256,g=o.g1_256,y=i.BlockHash,b=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function v(){if(!(this instanceof v))return new v;y.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=b,this.W=new Array(64)}r.inherits(v,y),t.exports=v,v.blockSize=512,v.outSize=256,v.hmacStrength=192,v.padLength=64,v.prototype._update=function(t,e){for(var n=this.W,r=0;r<16;r++)n[r]=t[e+r];for(;r<n.length;r++)n[r]=s(g(n[r-2]),n[r-7],p(n[r-15]),n[r-16]);var i=this.h[0],o=this.h[1],y=this.h[2],b=this.h[3],v=this.h[4],m=this.h[5],_=this.h[6],w=this.h[7];for(a(this.k.length===n.length),r=0;r<n.length;r++){var x=c(w,d(v),f(v,m,_),this.k[r],n[r]),k=u(h(i),l(i,o,y));w=_,_=m,m=v,v=u(b,x),b=y,y=o,o=i,i=u(x,k)}this.h[0]=u(this.h[0],i),this.h[1]=u(this.h[1],o),this.h[2]=u(this.h[2],y),this.h[3]=u(this.h[3],b),this.h[4]=u(this.h[4],v),this.h[5]=u(this.h[5],m),this.h[6]=u(this.h[6],_),this.h[7]=u(this.h[7],w)},v.prototype._digest=function(t){return"hex"===t?r.toHex32(this.h,"big"):r.split32(this.h,"big")}},function(t,e,n){"use strict";var r=n(45),i=n(136),o=n(32),a=r.rotr64_hi,u=r.rotr64_lo,s=r.shr64_hi,c=r.shr64_lo,f=r.sum64,l=r.sum64_hi,h=r.sum64_lo,d=r.sum64_4_hi,p=r.sum64_4_lo,g=r.sum64_5_hi,y=r.sum64_5_lo,b=i.BlockHash,v=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function m(){if(!(this instanceof m))return new m;b.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=v,this.W=new Array(160)}function _(t,e,n,r,i){var o=t&n^~t&i;return o<0&&(o+=4294967296),o}function w(t,e,n,r,i,o){var a=e&r^~e&o;return a<0&&(a+=4294967296),a}function x(t,e,n,r,i){var o=t&n^t&i^n&i;return o<0&&(o+=4294967296),o}function k(t,e,n,r,i,o){var a=e&r^e&o^r&o;return a<0&&(a+=4294967296),a}function E(t,e){var n=a(t,e,28)^a(e,t,2)^a(e,t,7);return n<0&&(n+=4294967296),n}function A(t,e){var n=u(t,e,28)^u(e,t,2)^u(e,t,7);return n<0&&(n+=4294967296),n}function S(t,e){var n=a(t,e,14)^a(t,e,18)^a(e,t,9);return n<0&&(n+=4294967296),n}function M(t,e){var n=u(t,e,14)^u(t,e,18)^u(e,t,9);return n<0&&(n+=4294967296),n}function T(t,e){var n=a(t,e,1)^a(t,e,8)^s(t,e,7);return n<0&&(n+=4294967296),n}function O(t,e){var n=u(t,e,1)^u(t,e,8)^c(t,e,7);return n<0&&(n+=4294967296),n}function D(t,e){var n=a(t,e,19)^a(e,t,29)^s(t,e,6);return n<0&&(n+=4294967296),n}function C(t,e){var n=u(t,e,19)^u(e,t,29)^c(t,e,6);return n<0&&(n+=4294967296),n}r.inherits(m,b),t.exports=m,m.blockSize=1024,m.outSize=512,m.hmacStrength=192,m.padLength=128,m.prototype._prepareBlock=function(t,e){for(var n=this.W,r=0;r<32;r++)n[r]=t[e+r];for(;r<n.length;r+=2){var i=D(n[r-4],n[r-3]),o=C(n[r-4],n[r-3]),a=n[r-14],u=n[r-13],s=T(n[r-30],n[r-29]),c=O(n[r-30],n[r-29]),f=n[r-32],l=n[r-31];n[r]=d(i,o,a,u,s,c,f,l),n[r+1]=p(i,o,a,u,s,c,f,l)}},m.prototype._update=function(t,e){this._prepareBlock(t,e);var n=this.W,r=this.h[0],i=this.h[1],a=this.h[2],u=this.h[3],s=this.h[4],c=this.h[5],d=this.h[6],p=this.h[7],b=this.h[8],v=this.h[9],m=this.h[10],T=this.h[11],O=this.h[12],D=this.h[13],C=this.h[14],N=this.h[15];o(this.k.length===n.length);for(var I=0;I<n.length;I+=2){var R=C,j=N,L=S(b,v),B=M(b,v),P=_(b,v,m,T,O),F=w(b,v,m,T,O,D),q=this.k[I],U=this.k[I+1],z=n[I],Y=n[I+1],V=g(R,j,L,B,P,F,q,U,z,Y),G=y(R,j,L,B,P,F,q,U,z,Y);R=E(r,i),j=A(r,i),L=x(r,i,a,u,s),B=k(r,i,a,u,s,c);var H=l(R,j,L,B),W=h(R,j,L,B);C=O,N=D,O=m,D=T,m=b,T=v,b=l(d,p,V,G),v=h(p,p,V,G),d=s,p=c,s=a,c=u,a=r,u=i,r=l(V,G,H,W),i=h(V,G,H,W)}f(this.h,0,r,i),f(this.h,2,a,u),f(this.h,4,s,c),f(this.h,6,d,p),f(this.h,8,b,v),f(this.h,10,m,T),f(this.h,12,O,D),f(this.h,14,C,N)},m.prototype._digest=function(t){return"hex"===t?r.toHex32(this.h,"big"):r.split32(this.h,"big")}},function(t,e,n){var r=n(2),i=n(138).Reporter,o=n(18).Buffer;function a(t,e){i.call(this,e),o.isBuffer(t)?(this.base=t,this.offset=0,this.length=t.length):this.error("Input not Buffer")}function u(t,e){if(Array.isArray(t))this.length=0,this.value=t.map((function(t){return t instanceof u||(t=new u(t,e)),this.length+=t.length,t}),this);else if("number"==typeof t){if(!(0<=t&&t<=255))return e.error("non-byte EncoderBuffer value");this.value=t,this.length=1}else if("string"==typeof t)this.value=t,this.length=o.byteLength(t);else{if(!o.isBuffer(t))return e.error("Unsupported type: "+typeof t);this.value=t,this.length=t.length}}r(a,i),e.DecoderBuffer=a,a.prototype.save=function(){return{offset:this.offset,reporter:i.prototype.save.call(this)}},a.prototype.restore=function(t){var e=new a(this.base);return e.offset=t.offset,e.length=this.offset,this.offset=t.offset,i.prototype.restore.call(this,t.reporter),e},a.prototype.isEmpty=function(){return this.offset===this.length},a.prototype.readUInt8=function(t){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(t||"DecoderBuffer overrun")},a.prototype.skip=function(t,e){if(!(this.offset+t<=this.length))return this.error(e||"DecoderBuffer overrun");var n=new a(this.base);return n._reporterState=this._reporterState,n.offset=this.offset,n.length=this.offset+t,this.offset+=t,n},a.prototype.raw=function(t){return this.base.slice(t?t.offset:this.offset,this.length)},e.EncoderBuffer=u,u.prototype.join=function(t,e){return t||(t=new o(this.length)),e||(e=0),0===this.length?t:(Array.isArray(this.value)?this.value.forEach((function(n){n.join(t,e),e+=n.length})):("number"==typeof this.value?t[e]=this.value:"string"==typeof this.value?t.write(this.value,e):o.isBuffer(this.value)&&this.value.copy(t,e),e+=this.length),t)}},function(t,e,n){var r=e;r._reverse=function(t){var e={};return Object.keys(t).forEach((function(n){(0|n)==n&&(n|=0);var r=t[n];e[r]=n})),e},r.der=n(878)},function(t,e,n){var r=n(2),i=n(137),o=i.base,a=i.bignum,u=i.constants.der;function s(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=new c,this.tree._init(t.body)}function c(t){o.Node.call(this,"der",t)}function f(t,e){var n=t.readUInt8(e);if(t.isError(n))return n;var r=u.tagClass[n>>6],i=0==(32&n);if(31==(31&n)){var o=n;for(n=0;128==(128&o);){if(o=t.readUInt8(e),t.isError(o))return o;n<<=7,n|=127&o}}else n&=31;return{cls:r,primitive:i,tag:n,tagStr:u.tag[n]}}function l(t,e,n){var r=t.readUInt8(n);if(t.isError(r))return r;if(!e&&128===r)return null;if(0==(128&r))return r;var i=127&r;if(i>4)return t.error("length octect is too long");r=0;for(var o=0;o<i;o++){r<<=8;var a=t.readUInt8(n);if(t.isError(a))return a;r|=a}return r}t.exports=s,s.prototype.decode=function(t,e){return t instanceof o.DecoderBuffer||(t=new o.DecoderBuffer(t,e)),this.tree._decode(t,e)},r(c,o.Node),c.prototype._peekTag=function(t,e,n){if(t.isEmpty())return!1;var r=t.save(),i=f(t,'Failed to peek tag: "'+e+'"');return t.isError(i)?i:(t.restore(r),i.tag===e||i.tagStr===e||i.tagStr+"of"===e||n)},c.prototype._decodeTag=function(t,e,n){var r=f(t,'Failed to decode tag of "'+e+'"');if(t.isError(r))return r;var i=l(t,r.primitive,'Failed to get length of "'+e+'"');if(t.isError(i))return i;if(!n&&r.tag!==e&&r.tagStr!==e&&r.tagStr+"of"!==e)return t.error('Failed to match tag: "'+e+'"');if(r.primitive||null!==i)return t.skip(i,'Failed to match body of: "'+e+'"');var o=t.save(),a=this._skipUntilEnd(t,'Failed to skip indefinite length body: "'+this.tag+'"');return t.isError(a)?a:(i=t.offset-o.offset,t.restore(o),t.skip(i,'Failed to match body of: "'+e+'"'))},c.prototype._skipUntilEnd=function(t,e){for(;;){var n=f(t,e);if(t.isError(n))return n;var r,i=l(t,n.primitive,e);if(t.isError(i))return i;if(r=n.primitive||null!==i?t.skip(i):this._skipUntilEnd(t,e),t.isError(r))return r;if("end"===n.tagStr)break}},c.prototype._decodeList=function(t,e,n,r){for(var i=[];!t.isEmpty();){var o=this._peekTag(t,"end");if(t.isError(o))return o;var a=n.decode(t,"der",r);if(t.isError(a)&&o)break;i.push(a)}return i},c.prototype._decodeStr=function(t,e){if("bitstr"===e){var n=t.readUInt8();return t.isError(n)?n:{unused:n,data:t.raw()}}if("bmpstr"===e){var r=t.raw();if(r.length%2==1)return t.error("Decoding of string type: bmpstr length mismatch");for(var i="",o=0;o<r.length/2;o++)i+=String.fromCharCode(r.readUInt16BE(2*o));return i}if("numstr"===e){var a=t.raw().toString("ascii");return this._isNumstr(a)?a:t.error("Decoding of string type: numstr unsupported characters")}if("octstr"===e)return t.raw();if("objDesc"===e)return t.raw();if("printstr"===e){var u=t.raw().toString("ascii");return this._isPrintstr(u)?u:t.error("Decoding of string type: printstr unsupported characters")}return/str$/.test(e)?t.raw().toString():t.error("Decoding of string type: "+e+" unsupported")},c.prototype._decodeObjid=function(t,e,n){for(var r,i=[],o=0;!t.isEmpty();){var a=t.readUInt8();o<<=7,o|=127&a,0==(128&a)&&(i.push(o),o=0)}128&a&&i.push(o);var u=i[0]/40|0,s=i[0]%40;if(r=n?i:[u,s].concat(i.slice(1)),e){var c=e[r.join(" ")];void 0===c&&(c=e[r.join(".")]),void 0!==c&&(r=c)}return r},c.prototype._decodeTime=function(t,e){var n=t.raw().toString();if("gentime"===e)var r=0|n.slice(0,4),i=0|n.slice(4,6),o=0|n.slice(6,8),a=0|n.slice(8,10),u=0|n.slice(10,12),s=0|n.slice(12,14);else{if("utctime"!==e)return t.error("Decoding "+e+" time is not supported yet");r=0|n.slice(0,2),i=0|n.slice(2,4),o=0|n.slice(4,6),a=0|n.slice(6,8),u=0|n.slice(8,10),s=0|n.slice(10,12);r=r<70?2e3+r:1900+r}return Date.UTC(r,i-1,o,a,u,s,0)},c.prototype._decodeNull=function(t){return null},c.prototype._decodeBool=function(t){var e=t.readUInt8();return t.isError(e)?e:0!==e},c.prototype._decodeInt=function(t,e){var n=t.raw(),r=new a(n);return e&&(r=e[r.toString(10)]||r),r},c.prototype._use=function(t,e){return"function"==typeof t&&(t=t(e)),t._getDecoder("der").tree}},function(t,e,n){var r=n(2),i=n(18).Buffer,o=n(137),a=o.base,u=o.constants.der;function s(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=new c,this.tree._init(t.body)}function c(t){a.Node.call(this,"der",t)}function f(t){return t<10?"0"+t:t}t.exports=s,s.prototype.encode=function(t,e){return this.tree._encode(t,e).join()},r(c,a.Node),c.prototype._encodeComposite=function(t,e,n,r){var o,a=function(t,e,n,r){var i;"seqof"===t?t="seq":"setof"===t&&(t="set");if(u.tagByName.hasOwnProperty(t))i=u.tagByName[t];else{if("number"!=typeof t||(0|t)!==t)return r.error("Unknown tag: "+t);i=t}if(i>=31)return r.error("Multi-octet tag encoding unsupported");e||(i|=32);return i|=u.tagClassByName[n||"universal"]<<6}(t,e,n,this.reporter);if(r.length<128)return(o=new i(2))[0]=a,o[1]=r.length,this._createEncoderBuffer([o,r]);for(var s=1,c=r.length;c>=256;c>>=8)s++;(o=new i(2+s))[0]=a,o[1]=128|s;c=1+s;for(var f=r.length;f>0;c--,f>>=8)o[c]=255&f;return this._createEncoderBuffer([o,r])},c.prototype._encodeStr=function(t,e){if("bitstr"===e)return this._createEncoderBuffer([0|t.unused,t.data]);if("bmpstr"===e){for(var n=new i(2*t.length),r=0;r<t.length;r++)n.writeUInt16BE(t.charCodeAt(r),2*r);return this._createEncoderBuffer(n)}return"numstr"===e?this._isNumstr(t)?this._createEncoderBuffer(t):this.reporter.error("Encoding of string type: numstr supports only digits and space"):"printstr"===e?this._isPrintstr(t)?this._createEncoderBuffer(t):this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark"):/str$/.test(e)?this._createEncoderBuffer(t):"objDesc"===e?this._createEncoderBuffer(t):this.reporter.error("Encoding of string type: "+e+" unsupported")},c.prototype._encodeObjid=function(t,e,n){if("string"==typeof t){if(!e)return this.reporter.error("string objid given, but no values map found");if(!e.hasOwnProperty(t))return this.reporter.error("objid not found in values map");t=e[t].split(/[\s\.]+/g);for(var r=0;r<t.length;r++)t[r]|=0}else if(Array.isArray(t)){t=t.slice();for(r=0;r<t.length;r++)t[r]|=0}if(!Array.isArray(t))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(t));if(!n){if(t[1]>=40)return this.reporter.error("Second objid identifier OOB");t.splice(0,2,40*t[0]+t[1])}var o=0;for(r=0;r<t.length;r++){var a=t[r];for(o++;a>=128;a>>=7)o++}var u=new i(o),s=u.length-1;for(r=t.length-1;r>=0;r--){a=t[r];for(u[s--]=127&a;(a>>=7)>0;)u[s--]=128|127&a}return this._createEncoderBuffer(u)},c.prototype._encodeTime=function(t,e){var n,r=new Date(t);return"gentime"===e?n=[f(r.getFullYear()),f(r.getUTCMonth()+1),f(r.getUTCDate()),f(r.getUTCHours()),f(r.getUTCMinutes()),f(r.getUTCSeconds()),"Z"].join(""):"utctime"===e?n=[f(r.getFullYear()%100),f(r.getUTCMonth()+1),f(r.getUTCDate()),f(r.getUTCHours()),f(r.getUTCMinutes()),f(r.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+e+" time is not supported yet"),this._encodeStr(n,"octstr")},c.prototype._encodeNull=function(){return this._createEncoderBuffer("")},c.prototype._encodeInt=function(t,e){if("string"==typeof t){if(!e)return this.reporter.error("String int or enum given, but no values map");if(!e.hasOwnProperty(t))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(t));t=e[t]}if("number"!=typeof t&&!i.isBuffer(t)){var n=t.toArray();!t.sign&&128&n[0]&&n.unshift(0),t=new i(n)}if(i.isBuffer(t)){var r=t.length;0===t.length&&r++;var o=new i(r);return t.copy(o),0===t.length&&(o[0]=0),this._createEncoderBuffer(o)}if(t<128)return this._createEncoderBuffer(t);if(t<256)return this._createEncoderBuffer([0,t]);r=1;for(var a=t;a>=256;a>>=8)r++;for(a=(o=new Array(r)).length-1;a>=0;a--)o[a]=255&t,t>>=8;return 128&o[0]&&o.unshift(0),this._createEncoderBuffer(new i(o))},c.prototype._encodeBool=function(t){return this._createEncoderBuffer(t?255:0)},c.prototype._use=function(t,e){return"function"==typeof t&&(t=t(e)),t._getEncoder("der").tree},c.prototype._skipDefault=function(t,e,n){var r,i=this._baseState;if(null===i.default)return!1;var o=t.join();if(void 0===i.defaultBuffer&&(i.defaultBuffer=this._encodeValue(i.default,e,n).join()),o.length!==i.defaultBuffer.length)return!1;for(r=0;r<o.length;r++)if(o[r]!==i.defaultBuffer[r])return!1;return!0}},function(t){t.exports=JSON.parse('{"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"}')},function(t,e,n){var r=n(133),i=n(3).Buffer;function o(t){var e=i.allocUnsafe(4);return e.writeUInt32BE(t,0),e}t.exports=function(t,e){for(var n,a=i.alloc(0),u=0;a.length<e;)n=o(u++),a=i.concat([a,r("sha1").update(t).update(n).digest()]);return a.slice(0,e)}},function(t,e){t.exports=function(t,e){for(var n=t.length,r=-1;++r<n;)t[r]^=e[r];return t}},function(t,e,n){var r=n(12),i=n(3).Buffer;t.exports=function(t,e){return i.from(t.toRed(r.mont(e.modulus)).redPow(new r(e.publicExponent)).fromRed().toArray())}},function(t,e,n){"use strict";function r(t,e,n,r){if(isNaN(e)||isNaN(n))return t;var i,o,a,u,s,c,f,l,h,d=t._root,p={data:r},g=t._x0,y=t._y0,b=t._x1,v=t._y1;if(!d)return t._root=p,t;for(;d.length;)if((c=e>=(o=(g+b)/2))?g=o:b=o,(f=n>=(a=(y+v)/2))?y=a:v=a,i=d,!(d=d[l=f<<1|c]))return i[l]=p,t;if(u=+t._x.call(null,d.data),s=+t._y.call(null,d.data),e===u&&n===s)return p.next=d,i?i[l]=p:t._root=p,t;do{i=i?i[l]=new Array(4):t._root=new Array(4),(c=e>=(o=(g+b)/2))?g=o:b=o,(f=n>=(a=(y+v)/2))?y=a:v=a}while((l=f<<1|c)==(h=(s>=a)<<1|u>=o));return i[h]=d,i[l]=p,t}var i=function(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i};function o(t){return t[0]}function a(t){return t[1]}function u(t,e,n){var r=new s(null==e?o:e,null==n?a:n,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function s(t,e,n,r,i,o){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function c(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}n.d(e,"a",(function(){return u}));var f=u.prototype=s.prototype;f.copy=function(){var t,e,n=new s(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return n;if(!r.length)return n._root=c(r),n;for(t=[{source:r,target:n._root=new Array(4)}];r=t.pop();)for(var i=0;i<4;++i)(e=r.source[i])&&(e.length?t.push({source:e,target:r.target[i]=new Array(4)}):r.target[i]=c(e));return n},f.add=function(t){var e=+this._x.call(null,t),n=+this._y.call(null,t);return r(this.cover(e,n),e,n,t)},f.addAll=function(t){var e,n,i,o,a=t.length,u=new Array(a),s=new Array(a),c=1/0,f=1/0,l=-1/0,h=-1/0;for(n=0;n<a;++n)isNaN(i=+this._x.call(null,e=t[n]))||isNaN(o=+this._y.call(null,e))||(u[n]=i,s[n]=o,i<c&&(c=i),i>l&&(l=i),o<f&&(f=o),o>h&&(h=o));if(c>l||f>h)return this;for(this.cover(c,f).cover(l,h),n=0;n<a;++n)r(this,u[n],s[n],t[n]);return this},f.cover=function(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var n=this._x0,r=this._y0,i=this._x1,o=this._y1;if(isNaN(n))i=(n=Math.floor(t))+1,o=(r=Math.floor(e))+1;else{for(var a,u,s=i-n,c=this._root;n>t||t>=i||r>e||e>=o;)switch(u=(e<r)<<1|t<n,(a=new Array(4))[u]=c,c=a,s*=2,u){case 0:i=n+s,o=r+s;break;case 1:n=i-s,o=r+s;break;case 2:i=n+s,r=o-s;break;case 3:n=i-s,r=o-s}this._root&&this._root.length&&(this._root=c)}return this._x0=n,this._y0=r,this._x1=i,this._y1=o,this},f.data=function(){var t=[];return this.visit((function(e){if(!e.length)do{t.push(e.data)}while(e=e.next)})),t},f.extent=function(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},f.find=function(t,e,n){var r,o,a,u,s,c,f,l=this._x0,h=this._y0,d=this._x1,p=this._y1,g=[],y=this._root;for(y&&g.push(new i(y,l,h,d,p)),null==n?n=1/0:(l=t-n,h=e-n,d=t+n,p=e+n,n*=n);c=g.pop();)if(!(!(y=c.node)||(o=c.x0)>d||(a=c.y0)>p||(u=c.x1)<l||(s=c.y1)<h))if(y.length){var b=(o+u)/2,v=(a+s)/2;g.push(new i(y[3],b,v,u,s),new i(y[2],o,v,b,s),new i(y[1],b,a,u,v),new i(y[0],o,a,b,v)),(f=(e>=v)<<1|t>=b)&&(c=g[g.length-1],g[g.length-1]=g[g.length-1-f],g[g.length-1-f]=c)}else{var m=t-+this._x.call(null,y.data),_=e-+this._y.call(null,y.data),w=m*m+_*_;if(w<n){var x=Math.sqrt(n=w);l=t-x,h=e-x,d=t+x,p=e+x,r=y.data}}return r},f.remove=function(t){if(isNaN(o=+this._x.call(null,t))||isNaN(a=+this._y.call(null,t)))return this;var e,n,r,i,o,a,u,s,c,f,l,h,d=this._root,p=this._x0,g=this._y0,y=this._x1,b=this._y1;if(!d)return this;if(d.length)for(;;){if((c=o>=(u=(p+y)/2))?p=u:y=u,(f=a>=(s=(g+b)/2))?g=s:b=s,e=d,!(d=d[l=f<<1|c]))return this;if(!d.length)break;(e[l+1&3]||e[l+2&3]||e[l+3&3])&&(n=e,h=l)}for(;d.data!==t;)if(r=d,!(d=d.next))return this;return(i=d.next)&&delete d.next,r?(i?r.next=i:delete r.next,this):e?(i?e[l]=i:delete e[l],(d=e[0]||e[1]||e[2]||e[3])&&d===(e[3]||e[2]||e[1]||e[0])&&!d.length&&(n?n[h]=d:this._root=d),this):(this._root=i,this)},f.removeAll=function(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this},f.root=function(){return this._root},f.size=function(){var t=0;return this.visit((function(e){if(!e.length)do{++t}while(e=e.next)})),t},f.visit=function(t){var e,n,r,o,a,u,s=[],c=this._root;for(c&&s.push(new i(c,this._x0,this._y0,this._x1,this._y1));e=s.pop();)if(!t(c=e.node,r=e.x0,o=e.y0,a=e.x1,u=e.y1)&&c.length){var f=(r+a)/2,l=(o+u)/2;(n=c[3])&&s.push(new i(n,f,l,a,u)),(n=c[2])&&s.push(new i(n,r,l,f,u)),(n=c[1])&&s.push(new i(n,f,o,a,l)),(n=c[0])&&s.push(new i(n,r,o,f,l))}return this},f.visitAfter=function(t){var e,n=[],r=[];for(this._root&&n.push(new i(this._root,this._x0,this._y0,this._x1,this._y1));e=n.pop();){var o=e.node;if(o.length){var a,u=e.x0,s=e.y0,c=e.x1,f=e.y1,l=(u+c)/2,h=(s+f)/2;(a=o[0])&&n.push(new i(a,u,s,l,h)),(a=o[1])&&n.push(new i(a,l,s,c,h)),(a=o[2])&&n.push(new i(a,u,h,l,f)),(a=o[3])&&n.push(new i(a,l,h,c,f))}r.push(e)}for(;e=r.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this},f.x=function(t){return arguments.length?(this._x=t,this):this._x},f.y=function(t){return arguments.length?(this._y=t,this):this._y}},function(t,e,n){(function(t,n){!function(r){var i=e,o=t&&t.exports==i&&t,a="object"==typeof n&&n;a.global!==a&&a.window!==a||(r=a);var u=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,s=/[\x01-\x7F]/g,c=/[\x01-\t\x0B\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,f=/<\u20D2|=\u20E5|>\u20D2|\u205F\u200A|\u219D\u0338|\u2202\u0338|\u2220\u20D2|\u2229\uFE00|\u222A\uFE00|\u223C\u20D2|\u223D\u0331|\u223E\u0333|\u2242\u0338|\u224B\u0338|\u224D\u20D2|\u224E\u0338|\u224F\u0338|\u2250\u0338|\u2261\u20E5|\u2264\u20D2|\u2265\u20D2|\u2266\u0338|\u2267\u0338|\u2268\uFE00|\u2269\uFE00|\u226A\u0338|\u226A\u20D2|\u226B\u0338|\u226B\u20D2|\u227F\u0338|\u2282\u20D2|\u2283\u20D2|\u228A\uFE00|\u228B\uFE00|\u228F\u0338|\u2290\u0338|\u2293\uFE00|\u2294\uFE00|\u22B4\u20D2|\u22B5\u20D2|\u22D8\u0338|\u22D9\u0338|\u22DA\uFE00|\u22DB\uFE00|\u22F5\u0338|\u22F9\u0338|\u2933\u0338|\u29CF\u0338|\u29D0\u0338|\u2A6D\u0338|\u2A70\u0338|\u2A7D\u0338|\u2A7E\u0338|\u2AA1\u0338|\u2AA2\u0338|\u2AAC\uFE00|\u2AAD\uFE00|\u2AAF\u0338|\u2AB0\u0338|\u2AC5\u0338|\u2AC6\u0338|\u2ACB\uFE00|\u2ACC\uFE00|\u2AFD\u20E5|[\xA0-\u0113\u0116-\u0122\u0124-\u012B\u012E-\u014D\u0150-\u017E\u0192\u01B5\u01F5\u0237\u02C6\u02C7\u02D8-\u02DD\u0311\u0391-\u03A1\u03A3-\u03A9\u03B1-\u03C9\u03D1\u03D2\u03D5\u03D6\u03DC\u03DD\u03F0\u03F1\u03F5\u03F6\u0401-\u040C\u040E-\u044F\u0451-\u045C\u045E\u045F\u2002-\u2005\u2007-\u2010\u2013-\u2016\u2018-\u201A\u201C-\u201E\u2020-\u2022\u2025\u2026\u2030-\u2035\u2039\u203A\u203E\u2041\u2043\u2044\u204F\u2057\u205F-\u2063\u20AC\u20DB\u20DC\u2102\u2105\u210A-\u2113\u2115-\u211E\u2122\u2124\u2127-\u2129\u212C\u212D\u212F-\u2131\u2133-\u2138\u2145-\u2148\u2153-\u215E\u2190-\u219B\u219D-\u21A7\u21A9-\u21AE\u21B0-\u21B3\u21B5-\u21B7\u21BA-\u21DB\u21DD\u21E4\u21E5\u21F5\u21FD-\u2205\u2207-\u2209\u220B\u220C\u220F-\u2214\u2216-\u2218\u221A\u221D-\u2238\u223A-\u2257\u2259\u225A\u225C\u225F-\u2262\u2264-\u228B\u228D-\u229B\u229D-\u22A5\u22A7-\u22B0\u22B2-\u22BB\u22BD-\u22DB\u22DE-\u22E3\u22E6-\u22F7\u22F9-\u22FE\u2305\u2306\u2308-\u2310\u2312\u2313\u2315\u2316\u231C-\u231F\u2322\u2323\u232D\u232E\u2336\u233D\u233F\u237C\u23B0\u23B1\u23B4-\u23B6\u23DC-\u23DF\u23E2\u23E7\u2423\u24C8\u2500\u2502\u250C\u2510\u2514\u2518\u251C\u2524\u252C\u2534\u253C\u2550-\u256C\u2580\u2584\u2588\u2591-\u2593\u25A1\u25AA\u25AB\u25AD\u25AE\u25B1\u25B3-\u25B5\u25B8\u25B9\u25BD-\u25BF\u25C2\u25C3\u25CA\u25CB\u25EC\u25EF\u25F8-\u25FC\u2605\u2606\u260E\u2640\u2642\u2660\u2663\u2665\u2666\u266A\u266D-\u266F\u2713\u2717\u2720\u2736\u2758\u2772\u2773\u27C8\u27C9\u27E6-\u27ED\u27F5-\u27FA\u27FC\u27FF\u2902-\u2905\u290C-\u2913\u2916\u2919-\u2920\u2923-\u292A\u2933\u2935-\u2939\u293C\u293D\u2945\u2948-\u294B\u294E-\u2976\u2978\u2979\u297B-\u297F\u2985\u2986\u298B-\u2996\u299A\u299C\u299D\u29A4-\u29B7\u29B9\u29BB\u29BC\u29BE-\u29C5\u29C9\u29CD-\u29D0\u29DC-\u29DE\u29E3-\u29E5\u29EB\u29F4\u29F6\u2A00-\u2A02\u2A04\u2A06\u2A0C\u2A0D\u2A10-\u2A17\u2A22-\u2A27\u2A29\u2A2A\u2A2D-\u2A31\u2A33-\u2A3C\u2A3F\u2A40\u2A42-\u2A4D\u2A50\u2A53-\u2A58\u2A5A-\u2A5D\u2A5F\u2A66\u2A6A\u2A6D-\u2A75\u2A77-\u2A9A\u2A9D-\u2AA2\u2AA4-\u2AB0\u2AB3-\u2AC8\u2ACB\u2ACC\u2ACF-\u2ADB\u2AE4\u2AE6-\u2AE9\u2AEB-\u2AF3\u2AFD\uFB00-\uFB04]|\uD835[\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDCCF\uDD04\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDD6B]/g,l={"­":"shy","‌":"zwnj","‍":"zwj","‎":"lrm","⁣":"ic","⁢":"it","⁡":"af","‏":"rlm","​":"ZeroWidthSpace","⁠":"NoBreak","̑":"DownBreve","⃛":"tdot","⃜":"DotDot","\t":"Tab","\n":"NewLine"," ":"puncsp"," ":"MediumSpace"," ":"thinsp"," ":"hairsp"," ":"emsp13"," ":"ensp"," ":"emsp14"," ":"emsp"," ":"numsp"," ":"nbsp","  ":"ThickSpace","‾":"oline",_:"lowbar","‐":"dash","–":"ndash","—":"mdash","―":"horbar",",":"comma",";":"semi","⁏":"bsemi",":":"colon","⩴":"Colone","!":"excl","¡":"iexcl","?":"quest","¿":"iquest",".":"period","‥":"nldr","…":"mldr","·":"middot","'":"apos","‘":"lsquo","’":"rsquo","‚":"sbquo","‹":"lsaquo","›":"rsaquo",'"':"quot","“":"ldquo","”":"rdquo","„":"bdquo","«":"laquo","»":"raquo","(":"lpar",")":"rpar","[":"lsqb","]":"rsqb","{":"lcub","}":"rcub","⌈":"lceil","⌉":"rceil","⌊":"lfloor","⌋":"rfloor","⦅":"lopar","⦆":"ropar","⦋":"lbrke","⦌":"rbrke","⦍":"lbrkslu","⦎":"rbrksld","⦏":"lbrksld","⦐":"rbrkslu","⦑":"langd","⦒":"rangd","⦓":"lparlt","⦔":"rpargt","⦕":"gtlPar","⦖":"ltrPar","⟦":"lobrk","⟧":"robrk","⟨":"lang","⟩":"rang","⟪":"Lang","⟫":"Rang","⟬":"loang","⟭":"roang","❲":"lbbrk","❳":"rbbrk","‖":"Vert","§":"sect","¶":"para","@":"commat","*":"ast","/":"sol",undefined:null,"&":"amp","#":"num","%":"percnt","‰":"permil","‱":"pertenk","†":"dagger","‡":"Dagger","•":"bull","⁃":"hybull","′":"prime","″":"Prime","‴":"tprime","⁗":"qprime","‵":"bprime","⁁":"caret","`":"grave","´":"acute","˜":"tilde","^":"Hat","¯":"macr","˘":"breve","˙":"dot","¨":"die","˚":"ring","˝":"dblac","¸":"cedil","˛":"ogon","ˆ":"circ","ˇ":"caron","°":"deg","©":"copy","®":"reg","℗":"copysr","℘":"wp","℞":"rx","℧":"mho","℩":"iiota","←":"larr","↚":"nlarr","→":"rarr","↛":"nrarr","↑":"uarr","↓":"darr","↔":"harr","↮":"nharr","↕":"varr","↖":"nwarr","↗":"nearr","↘":"searr","↙":"swarr","↝":"rarrw","↝̸":"nrarrw","↞":"Larr","↟":"Uarr","↠":"Rarr","↡":"Darr","↢":"larrtl","↣":"rarrtl","↤":"mapstoleft","↥":"mapstoup","↦":"map","↧":"mapstodown","↩":"larrhk","↪":"rarrhk","↫":"larrlp","↬":"rarrlp","↭":"harrw","↰":"lsh","↱":"rsh","↲":"ldsh","↳":"rdsh","↵":"crarr","↶":"cularr","↷":"curarr","↺":"olarr","↻":"orarr","↼":"lharu","↽":"lhard","↾":"uharr","↿":"uharl","⇀":"rharu","⇁":"rhard","⇂":"dharr","⇃":"dharl","⇄":"rlarr","⇅":"udarr","⇆":"lrarr","⇇":"llarr","⇈":"uuarr","⇉":"rrarr","⇊":"ddarr","⇋":"lrhar","⇌":"rlhar","⇐":"lArr","⇍":"nlArr","⇑":"uArr","⇒":"rArr","⇏":"nrArr","⇓":"dArr","⇔":"iff","⇎":"nhArr","⇕":"vArr","⇖":"nwArr","⇗":"neArr","⇘":"seArr","⇙":"swArr","⇚":"lAarr","⇛":"rAarr","⇝":"zigrarr","⇤":"larrb","⇥":"rarrb","⇵":"duarr","⇽":"loarr","⇾":"roarr","⇿":"hoarr","∀":"forall","∁":"comp","∂":"part","∂̸":"npart","∃":"exist","∄":"nexist","∅":"empty","∇":"Del","∈":"in","∉":"notin","∋":"ni","∌":"notni","϶":"bepsi","∏":"prod","∐":"coprod","∑":"sum","+":"plus","±":"pm","÷":"div","×":"times","<":"lt","≮":"nlt","<⃒":"nvlt","=":"equals","≠":"ne","=⃥":"bne","⩵":"Equal",">":"gt","≯":"ngt",">⃒":"nvgt","¬":"not","|":"vert","¦":"brvbar","−":"minus","∓":"mp","∔":"plusdo","⁄":"frasl","∖":"setmn","∗":"lowast","∘":"compfn","√":"Sqrt","∝":"prop","∞":"infin","∟":"angrt","∠":"ang","∠⃒":"nang","∡":"angmsd","∢":"angsph","∣":"mid","∤":"nmid","∥":"par","∦":"npar","∧":"and","∨":"or","∩":"cap","∩︀":"caps","∪":"cup","∪︀":"cups","∫":"int","∬":"Int","∭":"tint","⨌":"qint","∮":"oint","∯":"Conint","∰":"Cconint","∱":"cwint","∲":"cwconint","∳":"awconint","∴":"there4","∵":"becaus","∶":"ratio","∷":"Colon","∸":"minusd","∺":"mDDot","∻":"homtht","∼":"sim","≁":"nsim","∼⃒":"nvsim","∽":"bsim","∽̱":"race","∾":"ac","∾̳":"acE","∿":"acd","≀":"wr","≂":"esim","≂̸":"nesim","≃":"sime","≄":"nsime","≅":"cong","≇":"ncong","≆":"simne","≈":"ap","≉":"nap","≊":"ape","≋":"apid","≋̸":"napid","≌":"bcong","≍":"CupCap","≭":"NotCupCap","≍⃒":"nvap","≎":"bump","≎̸":"nbump","≏":"bumpe","≏̸":"nbumpe","≐":"doteq","≐̸":"nedot","≑":"eDot","≒":"efDot","≓":"erDot","≔":"colone","≕":"ecolon","≖":"ecir","≗":"cire","≙":"wedgeq","≚":"veeeq","≜":"trie","≟":"equest","≡":"equiv","≢":"nequiv","≡⃥":"bnequiv","≤":"le","≰":"nle","≤⃒":"nvle","≥":"ge","≱":"nge","≥⃒":"nvge","≦":"lE","≦̸":"nlE","≧":"gE","≧̸":"ngE","≨︀":"lvnE","≨":"lnE","≩":"gnE","≩︀":"gvnE","≪":"ll","≪̸":"nLtv","≪⃒":"nLt","≫":"gg","≫̸":"nGtv","≫⃒":"nGt","≬":"twixt","≲":"lsim","≴":"nlsim","≳":"gsim","≵":"ngsim","≶":"lg","≸":"ntlg","≷":"gl","≹":"ntgl","≺":"pr","⊀":"npr","≻":"sc","⊁":"nsc","≼":"prcue","⋠":"nprcue","≽":"sccue","⋡":"nsccue","≾":"prsim","≿":"scsim","≿̸":"NotSucceedsTilde","⊂":"sub","⊄":"nsub","⊂⃒":"vnsub","⊃":"sup","⊅":"nsup","⊃⃒":"vnsup","⊆":"sube","⊈":"nsube","⊇":"supe","⊉":"nsupe","⊊︀":"vsubne","⊊":"subne","⊋︀":"vsupne","⊋":"supne","⊍":"cupdot","⊎":"uplus","⊏":"sqsub","⊏̸":"NotSquareSubset","⊐":"sqsup","⊐̸":"NotSquareSuperset","⊑":"sqsube","⋢":"nsqsube","⊒":"sqsupe","⋣":"nsqsupe","⊓":"sqcap","⊓︀":"sqcaps","⊔":"sqcup","⊔︀":"sqcups","⊕":"oplus","⊖":"ominus","⊗":"otimes","⊘":"osol","⊙":"odot","⊚":"ocir","⊛":"oast","⊝":"odash","⊞":"plusb","⊟":"minusb","⊠":"timesb","⊡":"sdotb","⊢":"vdash","⊬":"nvdash","⊣":"dashv","⊤":"top","⊥":"bot","⊧":"models","⊨":"vDash","⊭":"nvDash","⊩":"Vdash","⊮":"nVdash","⊪":"Vvdash","⊫":"VDash","⊯":"nVDash","⊰":"prurel","⊲":"vltri","⋪":"nltri","⊳":"vrtri","⋫":"nrtri","⊴":"ltrie","⋬":"nltrie","⊴⃒":"nvltrie","⊵":"rtrie","⋭":"nrtrie","⊵⃒":"nvrtrie","⊶":"origof","⊷":"imof","⊸":"mumap","⊹":"hercon","⊺":"intcal","⊻":"veebar","⊽":"barvee","⊾":"angrtvb","⊿":"lrtri","⋀":"Wedge","⋁":"Vee","⋂":"xcap","⋃":"xcup","⋄":"diam","⋅":"sdot","⋆":"Star","⋇":"divonx","⋈":"bowtie","⋉":"ltimes","⋊":"rtimes","⋋":"lthree","⋌":"rthree","⋍":"bsime","⋎":"cuvee","⋏":"cuwed","⋐":"Sub","⋑":"Sup","⋒":"Cap","⋓":"Cup","⋔":"fork","⋕":"epar","⋖":"ltdot","⋗":"gtdot","⋘":"Ll","⋘̸":"nLl","⋙":"Gg","⋙̸":"nGg","⋚︀":"lesg","⋚":"leg","⋛":"gel","⋛︀":"gesl","⋞":"cuepr","⋟":"cuesc","⋦":"lnsim","⋧":"gnsim","⋨":"prnsim","⋩":"scnsim","⋮":"vellip","⋯":"ctdot","⋰":"utdot","⋱":"dtdot","⋲":"disin","⋳":"isinsv","⋴":"isins","⋵":"isindot","⋵̸":"notindot","⋶":"notinvc","⋷":"notinvb","⋹":"isinE","⋹̸":"notinE","⋺":"nisd","⋻":"xnis","⋼":"nis","⋽":"notnivc","⋾":"notnivb","⌅":"barwed","⌆":"Barwed","⌌":"drcrop","⌍":"dlcrop","⌎":"urcrop","⌏":"ulcrop","⌐":"bnot","⌒":"profline","⌓":"profsurf","⌕":"telrec","⌖":"target","⌜":"ulcorn","⌝":"urcorn","⌞":"dlcorn","⌟":"drcorn","⌢":"frown","⌣":"smile","⌭":"cylcty","⌮":"profalar","⌶":"topbot","⌽":"ovbar","⌿":"solbar","⍼":"angzarr","⎰":"lmoust","⎱":"rmoust","⎴":"tbrk","⎵":"bbrk","⎶":"bbrktbrk","⏜":"OverParenthesis","⏝":"UnderParenthesis","⏞":"OverBrace","⏟":"UnderBrace","⏢":"trpezium","⏧":"elinters","␣":"blank","─":"boxh","│":"boxv","┌":"boxdr","┐":"boxdl","└":"boxur","┘":"boxul","├":"boxvr","┤":"boxvl","┬":"boxhd","┴":"boxhu","┼":"boxvh","═":"boxH","║":"boxV","╒":"boxdR","╓":"boxDr","╔":"boxDR","╕":"boxdL","╖":"boxDl","╗":"boxDL","╘":"boxuR","╙":"boxUr","╚":"boxUR","╛":"boxuL","╜":"boxUl","╝":"boxUL","╞":"boxvR","╟":"boxVr","╠":"boxVR","╡":"boxvL","╢":"boxVl","╣":"boxVL","╤":"boxHd","╥":"boxhD","╦":"boxHD","╧":"boxHu","╨":"boxhU","╩":"boxHU","╪":"boxvH","╫":"boxVh","╬":"boxVH","▀":"uhblk","▄":"lhblk","█":"block","░":"blk14","▒":"blk12","▓":"blk34","□":"squ","▪":"squf","▫":"EmptyVerySmallSquare","▭":"rect","▮":"marker","▱":"fltns","△":"xutri","▴":"utrif","▵":"utri","▸":"rtrif","▹":"rtri","▽":"xdtri","▾":"dtrif","▿":"dtri","◂":"ltrif","◃":"ltri","◊":"loz","○":"cir","◬":"tridot","◯":"xcirc","◸":"ultri","◹":"urtri","◺":"lltri","◻":"EmptySmallSquare","◼":"FilledSmallSquare","★":"starf","☆":"star","☎":"phone","♀":"female","♂":"male","♠":"spades","♣":"clubs","♥":"hearts","♦":"diams","♪":"sung","✓":"check","✗":"cross","✠":"malt","✶":"sext","❘":"VerticalSeparator","⟈":"bsolhsub","⟉":"suphsol","⟵":"xlarr","⟶":"xrarr","⟷":"xharr","⟸":"xlArr","⟹":"xrArr","⟺":"xhArr","⟼":"xmap","⟿":"dzigrarr","⤂":"nvlArr","⤃":"nvrArr","⤄":"nvHarr","⤅":"Map","⤌":"lbarr","⤍":"rbarr","⤎":"lBarr","⤏":"rBarr","⤐":"RBarr","⤑":"DDotrahd","⤒":"UpArrowBar","⤓":"DownArrowBar","⤖":"Rarrtl","⤙":"latail","⤚":"ratail","⤛":"lAtail","⤜":"rAtail","⤝":"larrfs","⤞":"rarrfs","⤟":"larrbfs","⤠":"rarrbfs","⤣":"nwarhk","⤤":"nearhk","⤥":"searhk","⤦":"swarhk","⤧":"nwnear","⤨":"toea","⤩":"tosa","⤪":"swnwar","⤳":"rarrc","⤳̸":"nrarrc","⤵":"cudarrr","⤶":"ldca","⤷":"rdca","⤸":"cudarrl","⤹":"larrpl","⤼":"curarrm","⤽":"cularrp","⥅":"rarrpl","⥈":"harrcir","⥉":"Uarrocir","⥊":"lurdshar","⥋":"ldrushar","⥎":"LeftRightVector","⥏":"RightUpDownVector","⥐":"DownLeftRightVector","⥑":"LeftUpDownVector","⥒":"LeftVectorBar","⥓":"RightVectorBar","⥔":"RightUpVectorBar","⥕":"RightDownVectorBar","⥖":"DownLeftVectorBar","⥗":"DownRightVectorBar","⥘":"LeftUpVectorBar","⥙":"LeftDownVectorBar","⥚":"LeftTeeVector","⥛":"RightTeeVector","⥜":"RightUpTeeVector","⥝":"RightDownTeeVector","⥞":"DownLeftTeeVector","⥟":"DownRightTeeVector","⥠":"LeftUpTeeVector","⥡":"LeftDownTeeVector","⥢":"lHar","⥣":"uHar","⥤":"rHar","⥥":"dHar","⥦":"luruhar","⥧":"ldrdhar","⥨":"ruluhar","⥩":"rdldhar","⥪":"lharul","⥫":"llhard","⥬":"rharul","⥭":"lrhard","⥮":"udhar","⥯":"duhar","⥰":"RoundImplies","⥱":"erarr","⥲":"simrarr","⥳":"larrsim","⥴":"rarrsim","⥵":"rarrap","⥶":"ltlarr","⥸":"gtrarr","⥹":"subrarr","⥻":"suplarr","⥼":"lfisht","⥽":"rfisht","⥾":"ufisht","⥿":"dfisht","⦚":"vzigzag","⦜":"vangrt","⦝":"angrtvbd","⦤":"ange","⦥":"range","⦦":"dwangle","⦧":"uwangle","⦨":"angmsdaa","⦩":"angmsdab","⦪":"angmsdac","⦫":"angmsdad","⦬":"angmsdae","⦭":"angmsdaf","⦮":"angmsdag","⦯":"angmsdah","⦰":"bemptyv","⦱":"demptyv","⦲":"cemptyv","⦳":"raemptyv","⦴":"laemptyv","⦵":"ohbar","⦶":"omid","⦷":"opar","⦹":"operp","⦻":"olcross","⦼":"odsold","⦾":"olcir","⦿":"ofcir","⧀":"olt","⧁":"ogt","⧂":"cirscir","⧃":"cirE","⧄":"solb","⧅":"bsolb","⧉":"boxbox","⧍":"trisb","⧎":"rtriltri","⧏":"LeftTriangleBar","⧏̸":"NotLeftTriangleBar","⧐":"RightTriangleBar","⧐̸":"NotRightTriangleBar","⧜":"iinfin","⧝":"infintie","⧞":"nvinfin","⧣":"eparsl","⧤":"smeparsl","⧥":"eqvparsl","⧫":"lozf","⧴":"RuleDelayed","⧶":"dsol","⨀":"xodot","⨁":"xoplus","⨂":"xotime","⨄":"xuplus","⨆":"xsqcup","⨍":"fpartint","⨐":"cirfnint","⨑":"awint","⨒":"rppolint","⨓":"scpolint","⨔":"npolint","⨕":"pointint","⨖":"quatint","⨗":"intlarhk","⨢":"pluscir","⨣":"plusacir","⨤":"simplus","⨥":"plusdu","⨦":"plussim","⨧":"plustwo","⨩":"mcomma","⨪":"minusdu","⨭":"loplus","⨮":"roplus","⨯":"Cross","⨰":"timesd","⨱":"timesbar","⨳":"smashp","⨴":"lotimes","⨵":"rotimes","⨶":"otimesas","⨷":"Otimes","⨸":"odiv","⨹":"triplus","⨺":"triminus","⨻":"tritime","⨼":"iprod","⨿":"amalg","⩀":"capdot","⩂":"ncup","⩃":"ncap","⩄":"capand","⩅":"cupor","⩆":"cupcap","⩇":"capcup","⩈":"cupbrcap","⩉":"capbrcup","⩊":"cupcup","⩋":"capcap","⩌":"ccups","⩍":"ccaps","⩐":"ccupssm","⩓":"And","⩔":"Or","⩕":"andand","⩖":"oror","⩗":"orslope","⩘":"andslope","⩚":"andv","⩛":"orv","⩜":"andd","⩝":"ord","⩟":"wedbar","⩦":"sdote","⩪":"simdot","⩭":"congdot","⩭̸":"ncongdot","⩮":"easter","⩯":"apacir","⩰":"apE","⩰̸":"napE","⩱":"eplus","⩲":"pluse","⩳":"Esim","⩷":"eDDot","⩸":"equivDD","⩹":"ltcir","⩺":"gtcir","⩻":"ltquest","⩼":"gtquest","⩽":"les","⩽̸":"nles","⩾":"ges","⩾̸":"nges","⩿":"lesdot","⪀":"gesdot","⪁":"lesdoto","⪂":"gesdoto","⪃":"lesdotor","⪄":"gesdotol","⪅":"lap","⪆":"gap","⪇":"lne","⪈":"gne","⪉":"lnap","⪊":"gnap","⪋":"lEg","⪌":"gEl","⪍":"lsime","⪎":"gsime","⪏":"lsimg","⪐":"gsiml","⪑":"lgE","⪒":"glE","⪓":"lesges","⪔":"gesles","⪕":"els","⪖":"egs","⪗":"elsdot","⪘":"egsdot","⪙":"el","⪚":"eg","⪝":"siml","⪞":"simg","⪟":"simlE","⪠":"simgE","⪡":"LessLess","⪡̸":"NotNestedLessLess","⪢":"GreaterGreater","⪢̸":"NotNestedGreaterGreater","⪤":"glj","⪥":"gla","⪦":"ltcc","⪧":"gtcc","⪨":"lescc","⪩":"gescc","⪪":"smt","⪫":"lat","⪬":"smte","⪬︀":"smtes","⪭":"late","⪭︀":"lates","⪮":"bumpE","⪯":"pre","⪯̸":"npre","⪰":"sce","⪰̸":"nsce","⪳":"prE","⪴":"scE","⪵":"prnE","⪶":"scnE","⪷":"prap","⪸":"scap","⪹":"prnap","⪺":"scnap","⪻":"Pr","⪼":"Sc","⪽":"subdot","⪾":"supdot","⪿":"subplus","⫀":"supplus","⫁":"submult","⫂":"supmult","⫃":"subedot","⫄":"supedot","⫅":"subE","⫅̸":"nsubE","⫆":"supE","⫆̸":"nsupE","⫇":"subsim","⫈":"supsim","⫋︀":"vsubnE","⫋":"subnE","⫌︀":"vsupnE","⫌":"supnE","⫏":"csub","⫐":"csup","⫑":"csube","⫒":"csupe","⫓":"subsup","⫔":"supsub","⫕":"subsub","⫖":"supsup","⫗":"suphsub","⫘":"supdsub","⫙":"forkv","⫚":"topfork","⫛":"mlcp","⫤":"Dashv","⫦":"Vdashl","⫧":"Barv","⫨":"vBar","⫩":"vBarv","⫫":"Vbar","⫬":"Not","⫭":"bNot","⫮":"rnmid","⫯":"cirmid","⫰":"midcir","⫱":"topcir","⫲":"nhpar","⫳":"parsim","⫽":"parsl","⫽⃥":"nparsl","♭":"flat","♮":"natur","♯":"sharp","¤":"curren","¢":"cent",$:"dollar","£":"pound","¥":"yen","€":"euro","¹":"sup1","½":"half","⅓":"frac13","¼":"frac14","⅕":"frac15","⅙":"frac16","⅛":"frac18","²":"sup2","⅔":"frac23","⅖":"frac25","³":"sup3","¾":"frac34","⅗":"frac35","⅜":"frac38","⅘":"frac45","⅚":"frac56","⅝":"frac58","⅞":"frac78","𝒶":"ascr","𝕒":"aopf","𝔞":"afr","𝔸":"Aopf","𝔄":"Afr","𝒜":"Ascr","ª":"ordf","á":"aacute","Á":"Aacute","à":"agrave","À":"Agrave","ă":"abreve","Ă":"Abreve","â":"acirc","Â":"Acirc","å":"aring","Å":"angst","ä":"auml","Ä":"Auml","ã":"atilde","Ã":"Atilde","ą":"aogon","Ą":"Aogon","ā":"amacr","Ā":"Amacr","æ":"aelig","Æ":"AElig","𝒷":"bscr","𝕓":"bopf","𝔟":"bfr","𝔹":"Bopf","ℬ":"Bscr","𝔅":"Bfr","𝔠":"cfr","𝒸":"cscr","𝕔":"copf","ℭ":"Cfr","𝒞":"Cscr","ℂ":"Copf","ć":"cacute","Ć":"Cacute","ĉ":"ccirc","Ĉ":"Ccirc","č":"ccaron","Č":"Ccaron","ċ":"cdot","Ċ":"Cdot","ç":"ccedil","Ç":"Ccedil","℅":"incare","𝔡":"dfr","ⅆ":"dd","𝕕":"dopf","𝒹":"dscr","𝒟":"Dscr","𝔇":"Dfr","ⅅ":"DD","𝔻":"Dopf","ď":"dcaron","Ď":"Dcaron","đ":"dstrok","Đ":"Dstrok","ð":"eth","Ð":"ETH","ⅇ":"ee","ℯ":"escr","𝔢":"efr","𝕖":"eopf","ℰ":"Escr","𝔈":"Efr","𝔼":"Eopf","é":"eacute","É":"Eacute","è":"egrave","È":"Egrave","ê":"ecirc","Ê":"Ecirc","ě":"ecaron","Ě":"Ecaron","ë":"euml","Ë":"Euml","ė":"edot","Ė":"Edot","ę":"eogon","Ę":"Eogon","ē":"emacr","Ē":"Emacr","𝔣":"ffr","𝕗":"fopf","𝒻":"fscr","𝔉":"Ffr","𝔽":"Fopf","ℱ":"Fscr","ff":"fflig","ffi":"ffilig","ffl":"ffllig","fi":"filig",fj:"fjlig","fl":"fllig","ƒ":"fnof","ℊ":"gscr","𝕘":"gopf","𝔤":"gfr","𝒢":"Gscr","𝔾":"Gopf","𝔊":"Gfr","ǵ":"gacute","ğ":"gbreve","Ğ":"Gbreve","ĝ":"gcirc","Ĝ":"Gcirc","ġ":"gdot","Ġ":"Gdot","Ģ":"Gcedil","𝔥":"hfr","ℎ":"planckh","𝒽":"hscr","𝕙":"hopf","ℋ":"Hscr","ℌ":"Hfr","ℍ":"Hopf","ĥ":"hcirc","Ĥ":"Hcirc","ℏ":"hbar","ħ":"hstrok","Ħ":"Hstrok","𝕚":"iopf","𝔦":"ifr","𝒾":"iscr","ⅈ":"ii","𝕀":"Iopf","ℐ":"Iscr","ℑ":"Im","í":"iacute","Í":"Iacute","ì":"igrave","Ì":"Igrave","î":"icirc","Î":"Icirc","ï":"iuml","Ï":"Iuml","ĩ":"itilde","Ĩ":"Itilde","İ":"Idot","į":"iogon","Į":"Iogon","ī":"imacr","Ī":"Imacr","ij":"ijlig","IJ":"IJlig","ı":"imath","𝒿":"jscr","𝕛":"jopf","𝔧":"jfr","𝒥":"Jscr","𝔍":"Jfr","𝕁":"Jopf","ĵ":"jcirc","Ĵ":"Jcirc","ȷ":"jmath","𝕜":"kopf","𝓀":"kscr","𝔨":"kfr","𝒦":"Kscr","𝕂":"Kopf","𝔎":"Kfr","ķ":"kcedil","Ķ":"Kcedil","𝔩":"lfr","𝓁":"lscr","ℓ":"ell","𝕝":"lopf","ℒ":"Lscr","𝔏":"Lfr","𝕃":"Lopf","ĺ":"lacute","Ĺ":"Lacute","ľ":"lcaron","Ľ":"Lcaron","ļ":"lcedil","Ļ":"Lcedil","ł":"lstrok","Ł":"Lstrok","ŀ":"lmidot","Ŀ":"Lmidot","𝔪":"mfr","𝕞":"mopf","𝓂":"mscr","𝔐":"Mfr","𝕄":"Mopf","ℳ":"Mscr","𝔫":"nfr","𝕟":"nopf","𝓃":"nscr","ℕ":"Nopf","𝒩":"Nscr","𝔑":"Nfr","ń":"nacute","Ń":"Nacute","ň":"ncaron","Ň":"Ncaron","ñ":"ntilde","Ñ":"Ntilde","ņ":"ncedil","Ņ":"Ncedil","№":"numero","ŋ":"eng","Ŋ":"ENG","𝕠":"oopf","𝔬":"ofr","ℴ":"oscr","𝒪":"Oscr","𝔒":"Ofr","𝕆":"Oopf","º":"ordm","ó":"oacute","Ó":"Oacute","ò":"ograve","Ò":"Ograve","ô":"ocirc","Ô":"Ocirc","ö":"ouml","Ö":"Ouml","ő":"odblac","Ő":"Odblac","õ":"otilde","Õ":"Otilde","ø":"oslash","Ø":"Oslash","ō":"omacr","Ō":"Omacr","œ":"oelig","Œ":"OElig","𝔭":"pfr","𝓅":"pscr","𝕡":"popf","ℙ":"Popf","𝔓":"Pfr","𝒫":"Pscr","𝕢":"qopf","𝔮":"qfr","𝓆":"qscr","𝒬":"Qscr","𝔔":"Qfr","ℚ":"Qopf","ĸ":"kgreen","𝔯":"rfr","𝕣":"ropf","𝓇":"rscr","ℛ":"Rscr","ℜ":"Re","ℝ":"Ropf","ŕ":"racute","Ŕ":"Racute","ř":"rcaron","Ř":"Rcaron","ŗ":"rcedil","Ŗ":"Rcedil","𝕤":"sopf","𝓈":"sscr","𝔰":"sfr","𝕊":"Sopf","𝔖":"Sfr","𝒮":"Sscr","Ⓢ":"oS","ś":"sacute","Ś":"Sacute","ŝ":"scirc","Ŝ":"Scirc","š":"scaron","Š":"Scaron","ş":"scedil","Ş":"Scedil","ß":"szlig","𝔱":"tfr","𝓉":"tscr","𝕥":"topf","𝒯":"Tscr","𝔗":"Tfr","𝕋":"Topf","ť":"tcaron","Ť":"Tcaron","ţ":"tcedil","Ţ":"Tcedil","™":"trade","ŧ":"tstrok","Ŧ":"Tstrok","𝓊":"uscr","𝕦":"uopf","𝔲":"ufr","𝕌":"Uopf","𝔘":"Ufr","𝒰":"Uscr","ú":"uacute","Ú":"Uacute","ù":"ugrave","Ù":"Ugrave","ŭ":"ubreve","Ŭ":"Ubreve","û":"ucirc","Û":"Ucirc","ů":"uring","Ů":"Uring","ü":"uuml","Ü":"Uuml","ű":"udblac","Ű":"Udblac","ũ":"utilde","Ũ":"Utilde","ų":"uogon","Ų":"Uogon","ū":"umacr","Ū":"Umacr","𝔳":"vfr","𝕧":"vopf","𝓋":"vscr","𝔙":"Vfr","𝕍":"Vopf","𝒱":"Vscr","𝕨":"wopf","𝓌":"wscr","𝔴":"wfr","𝒲":"Wscr","𝕎":"Wopf","𝔚":"Wfr","ŵ":"wcirc","Ŵ":"Wcirc","𝔵":"xfr","𝓍":"xscr","𝕩":"xopf","𝕏":"Xopf","𝔛":"Xfr","𝒳":"Xscr","𝔶":"yfr","𝓎":"yscr","𝕪":"yopf","𝒴":"Yscr","𝔜":"Yfr","𝕐":"Yopf","ý":"yacute","Ý":"Yacute","ŷ":"ycirc","Ŷ":"Ycirc","ÿ":"yuml","Ÿ":"Yuml","𝓏":"zscr","𝔷":"zfr","𝕫":"zopf","ℨ":"Zfr","ℤ":"Zopf","𝒵":"Zscr","ź":"zacute","Ź":"Zacute","ž":"zcaron","Ž":"Zcaron","ż":"zdot","Ż":"Zdot","Ƶ":"imped","þ":"thorn","Þ":"THORN","ʼn":"napos","α":"alpha","Α":"Alpha","β":"beta","Β":"Beta","γ":"gamma","Γ":"Gamma","δ":"delta","Δ":"Delta","ε":"epsi","ϵ":"epsiv","Ε":"Epsilon","ϝ":"gammad","Ϝ":"Gammad","ζ":"zeta","Ζ":"Zeta","η":"eta","Η":"Eta","θ":"theta","ϑ":"thetav","Θ":"Theta","ι":"iota","Ι":"Iota","κ":"kappa","ϰ":"kappav","Κ":"Kappa","λ":"lambda","Λ":"Lambda","μ":"mu","µ":"micro","Μ":"Mu","ν":"nu","Ν":"Nu","ξ":"xi","Ξ":"Xi","ο":"omicron","Ο":"Omicron","π":"pi","ϖ":"piv","Π":"Pi","ρ":"rho","ϱ":"rhov","Ρ":"Rho","σ":"sigma","Σ":"Sigma","ς":"sigmaf","τ":"tau","Τ":"Tau","υ":"upsi","Υ":"Upsilon","ϒ":"Upsi","φ":"phi","ϕ":"phiv","Φ":"Phi","χ":"chi","Χ":"Chi","ψ":"psi","Ψ":"Psi","ω":"omega","Ω":"ohm","а":"acy","А":"Acy","б":"bcy","Б":"Bcy","в":"vcy","В":"Vcy","г":"gcy","Г":"Gcy","ѓ":"gjcy","Ѓ":"GJcy","д":"dcy","Д":"Dcy","ђ":"djcy","Ђ":"DJcy","е":"iecy","Е":"IEcy","ё":"iocy","Ё":"IOcy","є":"jukcy","Є":"Jukcy","ж":"zhcy","Ж":"ZHcy","з":"zcy","З":"Zcy","ѕ":"dscy","Ѕ":"DScy","и":"icy","И":"Icy","і":"iukcy","І":"Iukcy","ї":"yicy","Ї":"YIcy","й":"jcy","Й":"Jcy","ј":"jsercy","Ј":"Jsercy","к":"kcy","К":"Kcy","ќ":"kjcy","Ќ":"KJcy","л":"lcy","Л":"Lcy","љ":"ljcy","Љ":"LJcy","м":"mcy","М":"Mcy","н":"ncy","Н":"Ncy","њ":"njcy","Њ":"NJcy","о":"ocy","О":"Ocy","п":"pcy","П":"Pcy","р":"rcy","Р":"Rcy","с":"scy","С":"Scy","т":"tcy","Т":"Tcy","ћ":"tshcy","Ћ":"TSHcy","у":"ucy","У":"Ucy","ў":"ubrcy","Ў":"Ubrcy","ф":"fcy","Ф":"Fcy","х":"khcy","Х":"KHcy","ц":"tscy","Ц":"TScy","ч":"chcy","Ч":"CHcy","џ":"dzcy","Џ":"DZcy","ш":"shcy","Ш":"SHcy","щ":"shchcy","Щ":"SHCHcy","ъ":"hardcy","Ъ":"HARDcy","ы":"ycy","Ы":"Ycy","ь":"softcy","Ь":"SOFTcy","э":"ecy","Э":"Ecy","ю":"yucy","Ю":"YUcy","я":"yacy","Я":"YAcy","ℵ":"aleph","ℶ":"beth","ℷ":"gimel","ℸ":"daleth"},h=/["&'<>`]/g,d={'"':"&quot;","&":"&amp;","'":"&#x27;","<":"&lt;",">":"&gt;","`":"&#x60;"},p=/&#(?:[xX][^a-fA-F0-9]|[^0-9xX])/,g=/[\0-\x08\x0B\x0E-\x1F\x7F-\x9F\uFDD0-\uFDEF\uFFFE\uFFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F\uDBBF\uDBFF][\uDFFE\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,y=/&(CounterClockwiseContourIntegral|DoubleLongLeftRightArrow|ClockwiseContourIntegral|NotNestedGreaterGreater|NotSquareSupersetEqual|DiacriticalDoubleAcute|NotRightTriangleEqual|NotSucceedsSlantEqual|NotPrecedesSlantEqual|CloseCurlyDoubleQuote|NegativeVeryThinSpace|DoubleContourIntegral|FilledVerySmallSquare|CapitalDifferentialD|OpenCurlyDoubleQuote|EmptyVerySmallSquare|NestedGreaterGreater|DoubleLongRightArrow|NotLeftTriangleEqual|NotGreaterSlantEqual|ReverseUpEquilibrium|DoubleLeftRightArrow|NotSquareSubsetEqual|NotDoubleVerticalBar|RightArrowLeftArrow|NotGreaterFullEqual|NotRightTriangleBar|SquareSupersetEqual|DownLeftRightVector|DoubleLongLeftArrow|leftrightsquigarrow|LeftArrowRightArrow|NegativeMediumSpace|blacktriangleright|RightDownVectorBar|PrecedesSlantEqual|RightDoubleBracket|SucceedsSlantEqual|NotLeftTriangleBar|RightTriangleEqual|SquareIntersection|RightDownTeeVector|ReverseEquilibrium|NegativeThickSpace|longleftrightarrow|Longleftrightarrow|LongLeftRightArrow|DownRightTeeVector|DownRightVectorBar|GreaterSlantEqual|SquareSubsetEqual|LeftDownVectorBar|LeftDoubleBracket|VerticalSeparator|rightleftharpoons|NotGreaterGreater|NotSquareSuperset|blacktriangleleft|blacktriangledown|NegativeThinSpace|LeftDownTeeVector|NotLessSlantEqual|leftrightharpoons|DoubleUpDownArrow|DoubleVerticalBar|LeftTriangleEqual|FilledSmallSquare|twoheadrightarrow|NotNestedLessLess|DownLeftTeeVector|DownLeftVectorBar|RightAngleBracket|NotTildeFullEqual|NotReverseElement|RightUpDownVector|DiacriticalTilde|NotSucceedsTilde|circlearrowright|NotPrecedesEqual|rightharpoondown|DoubleRightArrow|NotSucceedsEqual|NonBreakingSpace|NotRightTriangle|LessEqualGreater|RightUpTeeVector|LeftAngleBracket|GreaterFullEqual|DownArrowUpArrow|RightUpVectorBar|twoheadleftarrow|GreaterEqualLess|downharpoonright|RightTriangleBar|ntrianglerighteq|NotSupersetEqual|LeftUpDownVector|DiacriticalAcute|rightrightarrows|vartriangleright|UpArrowDownArrow|DiacriticalGrave|UnderParenthesis|EmptySmallSquare|LeftUpVectorBar|leftrightarrows|DownRightVector|downharpoonleft|trianglerighteq|ShortRightArrow|OverParenthesis|DoubleLeftArrow|DoubleDownArrow|NotSquareSubset|bigtriangledown|ntrianglelefteq|UpperRightArrow|curvearrowright|vartriangleleft|NotLeftTriangle|nleftrightarrow|LowerRightArrow|NotHumpDownHump|NotGreaterTilde|rightthreetimes|LeftUpTeeVector|NotGreaterEqual|straightepsilon|LeftTriangleBar|rightsquigarrow|ContourIntegral|rightleftarrows|CloseCurlyQuote|RightDownVector|LeftRightVector|nLeftrightarrow|leftharpoondown|circlearrowleft|SquareSuperset|OpenCurlyQuote|hookrightarrow|HorizontalLine|DiacriticalDot|NotLessGreater|ntriangleright|DoubleRightTee|InvisibleComma|InvisibleTimes|LowerLeftArrow|DownLeftVector|NotSubsetEqual|curvearrowleft|trianglelefteq|NotVerticalBar|TildeFullEqual|downdownarrows|NotGreaterLess|RightTeeVector|ZeroWidthSpace|looparrowright|LongRightArrow|doublebarwedge|ShortLeftArrow|ShortDownArrow|RightVectorBar|GreaterGreater|ReverseElement|rightharpoonup|LessSlantEqual|leftthreetimes|upharpoonright|rightarrowtail|LeftDownVector|Longrightarrow|NestedLessLess|UpperLeftArrow|nshortparallel|leftleftarrows|leftrightarrow|Leftrightarrow|LeftRightArrow|longrightarrow|upharpoonleft|RightArrowBar|ApplyFunction|LeftTeeVector|leftarrowtail|NotEqualTilde|varsubsetneqq|varsupsetneqq|RightTeeArrow|SucceedsEqual|SucceedsTilde|LeftVectorBar|SupersetEqual|hookleftarrow|DifferentialD|VerticalTilde|VeryThinSpace|blacktriangle|bigtriangleup|LessFullEqual|divideontimes|leftharpoonup|UpEquilibrium|ntriangleleft|RightTriangle|measuredangle|shortparallel|longleftarrow|Longleftarrow|LongLeftArrow|DoubleLeftTee|Poincareplane|PrecedesEqual|triangleright|DoubleUpArrow|RightUpVector|fallingdotseq|looparrowleft|PrecedesTilde|NotTildeEqual|NotTildeTilde|smallsetminus|Proportional|triangleleft|triangledown|UnderBracket|NotHumpEqual|exponentiale|ExponentialE|NotLessTilde|HilbertSpace|RightCeiling|blacklozenge|varsupsetneq|HumpDownHump|GreaterEqual|VerticalLine|LeftTeeArrow|NotLessEqual|DownTeeArrow|LeftTriangle|varsubsetneq|Intersection|NotCongruent|DownArrowBar|LeftUpVector|LeftArrowBar|risingdotseq|GreaterTilde|RoundImplies|SquareSubset|ShortUpArrow|NotSuperset|quaternions|precnapprox|backepsilon|preccurlyeq|OverBracket|blacksquare|MediumSpace|VerticalBar|circledcirc|circleddash|CircleMinus|CircleTimes|LessGreater|curlyeqprec|curlyeqsucc|diamondsuit|UpDownArrow|Updownarrow|RuleDelayed|Rrightarrow|updownarrow|RightVector|nRightarrow|nrightarrow|eqslantless|LeftCeiling|Equilibrium|SmallCircle|expectation|NotSucceeds|thickapprox|GreaterLess|SquareUnion|NotPrecedes|NotLessLess|straightphi|succnapprox|succcurlyeq|SubsetEqual|sqsupseteq|Proportion|Laplacetrf|ImaginaryI|supsetneqq|NotGreater|gtreqqless|NotElement|ThickSpace|TildeEqual|TildeTilde|Fouriertrf|rmoustache|EqualTilde|eqslantgtr|UnderBrace|LeftVector|UpArrowBar|nLeftarrow|nsubseteqq|subsetneqq|nsupseteqq|nleftarrow|succapprox|lessapprox|UpTeeArrow|upuparrows|curlywedge|lesseqqgtr|varepsilon|varnothing|RightFloor|complement|CirclePlus|sqsubseteq|Lleftarrow|circledast|RightArrow|Rightarrow|rightarrow|lmoustache|Bernoullis|precapprox|mapstoleft|mapstodown|longmapsto|dotsquare|downarrow|DoubleDot|nsubseteq|supsetneq|leftarrow|nsupseteq|subsetneq|ThinSpace|ngeqslant|subseteqq|HumpEqual|NotSubset|triangleq|NotCupCap|lesseqgtr|heartsuit|TripleDot|Leftarrow|Coproduct|Congruent|varpropto|complexes|gvertneqq|LeftArrow|LessTilde|supseteqq|MinusPlus|CircleDot|nleqslant|NotExists|gtreqless|nparallel|UnionPlus|LeftFloor|checkmark|CenterDot|centerdot|Mellintrf|gtrapprox|bigotimes|OverBrace|spadesuit|therefore|pitchfork|rationals|PlusMinus|Backslash|Therefore|DownBreve|backsimeq|backprime|DownArrow|nshortmid|Downarrow|lvertneqq|eqvparsl|imagline|imagpart|infintie|integers|Integral|intercal|LessLess|Uarrocir|intlarhk|sqsupset|angmsdaf|sqsubset|llcorner|vartheta|cupbrcap|lnapprox|Superset|SuchThat|succnsim|succneqq|angmsdag|biguplus|curlyvee|trpezium|Succeeds|NotTilde|bigwedge|angmsdah|angrtvbd|triminus|cwconint|fpartint|lrcorner|smeparsl|subseteq|urcorner|lurdshar|laemptyv|DDotrahd|approxeq|ldrushar|awconint|mapstoup|backcong|shortmid|triangle|geqslant|gesdotol|timesbar|circledR|circledS|setminus|multimap|naturals|scpolint|ncongdot|RightTee|boxminus|gnapprox|boxtimes|andslope|thicksim|angmsdaa|varsigma|cirfnint|rtriltri|angmsdab|rppolint|angmsdac|barwedge|drbkarow|clubsuit|thetasym|bsolhsub|capbrcup|dzigrarr|doteqdot|DotEqual|dotminus|UnderBar|NotEqual|realpart|otimesas|ulcorner|hksearow|hkswarow|parallel|PartialD|elinters|emptyset|plusacir|bbrktbrk|angmsdad|pointint|bigoplus|angmsdae|Precedes|bigsqcup|varkappa|notindot|supseteq|precneqq|precnsim|profalar|profline|profsurf|leqslant|lesdotor|raemptyv|subplus|notnivb|notnivc|subrarr|zigrarr|vzigzag|submult|subedot|Element|between|cirscir|larrbfs|larrsim|lotimes|lbrksld|lbrkslu|lozenge|ldrdhar|dbkarow|bigcirc|epsilon|simrarr|simplus|ltquest|Epsilon|luruhar|gtquest|maltese|npolint|eqcolon|npreceq|bigodot|ddagger|gtrless|bnequiv|harrcir|ddotseq|equivDD|backsim|demptyv|nsqsube|nsqsupe|Upsilon|nsubset|upsilon|minusdu|nsucceq|swarrow|nsupset|coloneq|searrow|boxplus|napprox|natural|asympeq|alefsym|congdot|nearrow|bigstar|diamond|supplus|tritime|LeftTee|nvinfin|triplus|NewLine|nvltrie|nvrtrie|nwarrow|nexists|Diamond|ruluhar|Implies|supmult|angzarr|suplarr|suphsub|questeq|because|digamma|Because|olcross|bemptyv|omicron|Omicron|rotimes|NoBreak|intprod|angrtvb|orderof|uwangle|suphsol|lesdoto|orslope|DownTee|realine|cudarrl|rdldhar|OverBar|supedot|lessdot|supdsub|topfork|succsim|rbrkslu|rbrksld|pertenk|cudarrr|isindot|planckh|lessgtr|pluscir|gesdoto|plussim|plustwo|lesssim|cularrp|rarrsim|Cayleys|notinva|notinvb|notinvc|UpArrow|Uparrow|uparrow|NotLess|dwangle|precsim|Product|curarrm|Cconint|dotplus|rarrbfs|ccupssm|Cedilla|cemptyv|notniva|quatint|frac35|frac38|frac45|frac56|frac58|frac78|tridot|xoplus|gacute|gammad|Gammad|lfisht|lfloor|bigcup|sqsupe|gbreve|Gbreve|lharul|sqsube|sqcups|Gcedil|apacir|llhard|lmidot|Lmidot|lmoust|andand|sqcaps|approx|Abreve|spades|circeq|tprime|divide|topcir|Assign|topbot|gesdot|divonx|xuplus|timesd|gesles|atilde|solbar|SOFTcy|loplus|timesb|lowast|lowbar|dlcorn|dlcrop|softcy|dollar|lparlt|thksim|lrhard|Atilde|lsaquo|smashp|bigvee|thinsp|wreath|bkarow|lsquor|lstrok|Lstrok|lthree|ltimes|ltlarr|DotDot|simdot|ltrPar|weierp|xsqcup|angmsd|sigmav|sigmaf|zeetrf|Zcaron|zcaron|mapsto|vsupne|thetav|cirmid|marker|mcomma|Zacute|vsubnE|there4|gtlPar|vsubne|bottom|gtrarr|SHCHcy|shchcy|midast|midcir|middot|minusb|minusd|gtrdot|bowtie|sfrown|mnplus|models|colone|seswar|Colone|mstpos|searhk|gtrsim|nacute|Nacute|boxbox|telrec|hairsp|Tcedil|nbumpe|scnsim|ncaron|Ncaron|ncedil|Ncedil|hamilt|Scedil|nearhk|hardcy|HARDcy|tcedil|Tcaron|commat|nequiv|nesear|tcaron|target|hearts|nexist|varrho|scedil|Scaron|scaron|hellip|Sacute|sacute|hercon|swnwar|compfn|rtimes|rthree|rsquor|rsaquo|zacute|wedgeq|homtht|barvee|barwed|Barwed|rpargt|horbar|conint|swarhk|roplus|nltrie|hslash|hstrok|Hstrok|rmoust|Conint|bprime|hybull|hyphen|iacute|Iacute|supsup|supsub|supsim|varphi|coprod|brvbar|agrave|Supset|supset|igrave|Igrave|notinE|Agrave|iiiint|iinfin|copysr|wedbar|Verbar|vangrt|becaus|incare|verbar|inodot|bullet|drcorn|intcal|drcrop|cularr|vellip|Utilde|bumpeq|cupcap|dstrok|Dstrok|CupCap|cupcup|cupdot|eacute|Eacute|supdot|iquest|easter|ecaron|Ecaron|ecolon|isinsv|utilde|itilde|Itilde|curarr|succeq|Bumpeq|cacute|ulcrop|nparsl|Cacute|nprcue|egrave|Egrave|nrarrc|nrarrw|subsup|subsub|nrtrie|jsercy|nsccue|Jsercy|kappav|kcedil|Kcedil|subsim|ulcorn|nsimeq|egsdot|veebar|kgreen|capand|elsdot|Subset|subset|curren|aacute|lacute|Lacute|emptyv|ntilde|Ntilde|lagran|lambda|Lambda|capcap|Ugrave|langle|subdot|emsp13|numero|emsp14|nvdash|nvDash|nVdash|nVDash|ugrave|ufisht|nvHarr|larrfs|nvlArr|larrhk|larrlp|larrpl|nvrArr|Udblac|nwarhk|larrtl|nwnear|oacute|Oacute|latail|lAtail|sstarf|lbrace|odblac|Odblac|lbrack|udblac|odsold|eparsl|lcaron|Lcaron|ograve|Ograve|lcedil|Lcedil|Aacute|ssmile|ssetmn|squarf|ldquor|capcup|ominus|cylcty|rharul|eqcirc|dagger|rfloor|rfisht|Dagger|daleth|equals|origof|capdot|equest|dcaron|Dcaron|rdquor|oslash|Oslash|otilde|Otilde|otimes|Otimes|urcrop|Ubreve|ubreve|Yacute|Uacute|uacute|Rcedil|rcedil|urcorn|parsim|Rcaron|Vdashl|rcaron|Tstrok|percnt|period|permil|Exists|yacute|rbrack|rbrace|phmmat|ccaron|Ccaron|planck|ccedil|plankv|tstrok|female|plusdo|plusdu|ffilig|plusmn|ffllig|Ccedil|rAtail|dfisht|bernou|ratail|Rarrtl|rarrtl|angsph|rarrpl|rarrlp|rarrhk|xwedge|xotime|forall|ForAll|Vvdash|vsupnE|preceq|bigcap|frac12|frac13|frac14|primes|rarrfs|prnsim|frac15|Square|frac16|square|lesdot|frac18|frac23|propto|prurel|rarrap|rangle|puncsp|frac25|Racute|qprime|racute|lesges|frac34|abreve|AElig|eqsim|utdot|setmn|urtri|Equal|Uring|seArr|uring|searr|dashv|Dashv|mumap|nabla|iogon|Iogon|sdote|sdotb|scsim|napid|napos|equiv|natur|Acirc|dblac|erarr|nbump|iprod|erDot|ucirc|awint|esdot|angrt|ncong|isinE|scnap|Scirc|scirc|ndash|isins|Ubrcy|nearr|neArr|isinv|nedot|ubrcy|acute|Ycirc|iukcy|Iukcy|xutri|nesim|caret|jcirc|Jcirc|caron|twixt|ddarr|sccue|exist|jmath|sbquo|ngeqq|angst|ccaps|lceil|ngsim|UpTee|delta|Delta|rtrif|nharr|nhArr|nhpar|rtrie|jukcy|Jukcy|kappa|rsquo|Kappa|nlarr|nlArr|TSHcy|rrarr|aogon|Aogon|fflig|xrarr|tshcy|ccirc|nleqq|filig|upsih|nless|dharl|nlsim|fjlig|ropar|nltri|dharr|robrk|roarr|fllig|fltns|roang|rnmid|subnE|subne|lAarr|trisb|Ccirc|acirc|ccups|blank|VDash|forkv|Vdash|langd|cedil|blk12|blk14|laquo|strns|diams|notin|vDash|larrb|blk34|block|disin|uplus|vdash|vBarv|aelig|starf|Wedge|check|xrArr|lates|lbarr|lBarr|notni|lbbrk|bcong|frasl|lbrke|frown|vrtri|vprop|vnsup|gamma|Gamma|wedge|xodot|bdquo|srarr|doteq|ldquo|boxdl|boxdL|gcirc|Gcirc|boxDl|boxDL|boxdr|boxdR|boxDr|TRADE|trade|rlhar|boxDR|vnsub|npart|vltri|rlarr|boxhd|boxhD|nprec|gescc|nrarr|nrArr|boxHd|boxHD|boxhu|boxhU|nrtri|boxHu|clubs|boxHU|times|colon|Colon|gimel|xlArr|Tilde|nsime|tilde|nsmid|nspar|THORN|thorn|xlarr|nsube|nsubE|thkap|xhArr|comma|nsucc|boxul|boxuL|nsupe|nsupE|gneqq|gnsim|boxUl|boxUL|grave|boxur|boxuR|boxUr|boxUR|lescc|angle|bepsi|boxvh|varpi|boxvH|numsp|Theta|gsime|gsiml|theta|boxVh|boxVH|boxvl|gtcir|gtdot|boxvL|boxVl|boxVL|crarr|cross|Cross|nvsim|boxvr|nwarr|nwArr|sqsup|dtdot|Uogon|lhard|lharu|dtrif|ocirc|Ocirc|lhblk|duarr|odash|sqsub|Hacek|sqcup|llarr|duhar|oelig|OElig|ofcir|boxvR|uogon|lltri|boxVr|csube|uuarr|ohbar|csupe|ctdot|olarr|olcir|harrw|oline|sqcap|omacr|Omacr|omega|Omega|boxVR|aleph|lneqq|lnsim|loang|loarr|rharu|lobrk|hcirc|operp|oplus|rhard|Hcirc|orarr|Union|order|ecirc|Ecirc|cuepr|szlig|cuesc|breve|reals|eDDot|Breve|hoarr|lopar|utrif|rdquo|Umacr|umacr|efDot|swArr|ultri|alpha|rceil|ovbar|swarr|Wcirc|wcirc|smtes|smile|bsemi|lrarr|aring|parsl|lrhar|bsime|uhblk|lrtri|cupor|Aring|uharr|uharl|slarr|rbrke|bsolb|lsime|rbbrk|RBarr|lsimg|phone|rBarr|rbarr|icirc|lsquo|Icirc|emacr|Emacr|ratio|simne|plusb|simlE|simgE|simeq|pluse|ltcir|ltdot|empty|xharr|xdtri|iexcl|Alpha|ltrie|rarrw|pound|ltrif|xcirc|bumpe|prcue|bumpE|asymp|amacr|cuvee|Sigma|sigma|iiint|udhar|iiota|ijlig|IJlig|supnE|imacr|Imacr|prime|Prime|image|prnap|eogon|Eogon|rarrc|mdash|mDDot|cuwed|imath|supne|imped|Amacr|udarr|prsim|micro|rarrb|cwint|raquo|infin|eplus|range|rangd|Ucirc|radic|minus|amalg|veeeq|rAarr|epsiv|ycirc|quest|sharp|quot|zwnj|Qscr|race|qscr|Qopf|qopf|qint|rang|Rang|Zscr|zscr|Zopf|zopf|rarr|rArr|Rarr|Pscr|pscr|prop|prod|prnE|prec|ZHcy|zhcy|prap|Zeta|zeta|Popf|popf|Zdot|plus|zdot|Yuml|yuml|phiv|YUcy|yucy|Yscr|yscr|perp|Yopf|yopf|part|para|YIcy|Ouml|rcub|yicy|YAcy|rdca|ouml|osol|Oscr|rdsh|yacy|real|oscr|xvee|andd|rect|andv|Xscr|oror|ordm|ordf|xscr|ange|aopf|Aopf|rHar|Xopf|opar|Oopf|xopf|xnis|rhov|oopf|omid|xmap|oint|apid|apos|ogon|ascr|Ascr|odot|odiv|xcup|xcap|ocir|oast|nvlt|nvle|nvgt|nvge|nvap|Wscr|wscr|auml|ntlg|ntgl|nsup|nsub|nsim|Nscr|nscr|nsce|Wopf|ring|npre|wopf|npar|Auml|Barv|bbrk|Nopf|nopf|nmid|nLtv|beta|ropf|Ropf|Beta|beth|nles|rpar|nleq|bnot|bNot|nldr|NJcy|rscr|Rscr|Vscr|vscr|rsqb|njcy|bopf|nisd|Bopf|rtri|Vopf|nGtv|ngtr|vopf|boxh|boxH|boxv|nges|ngeq|boxV|bscr|scap|Bscr|bsim|Vert|vert|bsol|bull|bump|caps|cdot|ncup|scnE|ncap|nbsp|napE|Cdot|cent|sdot|Vbar|nang|vBar|chcy|Mscr|mscr|sect|semi|CHcy|Mopf|mopf|sext|circ|cire|mldr|mlcp|cirE|comp|shcy|SHcy|vArr|varr|cong|copf|Copf|copy|COPY|malt|male|macr|lvnE|cscr|ltri|sime|ltcc|simg|Cscr|siml|csub|Uuml|lsqb|lsim|uuml|csup|Lscr|lscr|utri|smid|lpar|cups|smte|lozf|darr|Lopf|Uscr|solb|lopf|sopf|Sopf|lneq|uscr|spar|dArr|lnap|Darr|dash|Sqrt|LJcy|ljcy|lHar|dHar|Upsi|upsi|diam|lesg|djcy|DJcy|leqq|dopf|Dopf|dscr|Dscr|dscy|ldsh|ldca|squf|DScy|sscr|Sscr|dsol|lcub|late|star|Star|Uopf|Larr|lArr|larr|uopf|dtri|dzcy|sube|subE|Lang|lang|Kscr|kscr|Kopf|kopf|KJcy|kjcy|KHcy|khcy|DZcy|ecir|edot|eDot|Jscr|jscr|succ|Jopf|jopf|Edot|uHar|emsp|ensp|Iuml|iuml|eopf|isin|Iscr|iscr|Eopf|epar|sung|epsi|escr|sup1|sup2|sup3|Iota|iota|supe|supE|Iopf|iopf|IOcy|iocy|Escr|esim|Esim|imof|Uarr|QUOT|uArr|uarr|euml|IEcy|iecy|Idot|Euml|euro|excl|Hscr|hscr|Hopf|hopf|TScy|tscy|Tscr|hbar|tscr|flat|tbrk|fnof|hArr|harr|half|fopf|Fopf|tdot|gvnE|fork|trie|gtcc|fscr|Fscr|gdot|gsim|Gscr|gscr|Gopf|gopf|gneq|Gdot|tosa|gnap|Topf|topf|geqq|toea|GJcy|gjcy|tint|gesl|mid|Sfr|ggg|top|ges|gla|glE|glj|geq|gne|gEl|gel|gnE|Gcy|gcy|gap|Tfr|tfr|Tcy|tcy|Hat|Tau|Ffr|tau|Tab|hfr|Hfr|ffr|Fcy|fcy|icy|Icy|iff|ETH|eth|ifr|Ifr|Eta|eta|int|Int|Sup|sup|ucy|Ucy|Sum|sum|jcy|ENG|ufr|Ufr|eng|Jcy|jfr|els|ell|egs|Efr|efr|Jfr|uml|kcy|Kcy|Ecy|ecy|kfr|Kfr|lap|Sub|sub|lat|lcy|Lcy|leg|Dot|dot|lEg|leq|les|squ|div|die|lfr|Lfr|lgE|Dfr|dfr|Del|deg|Dcy|dcy|lne|lnE|sol|loz|smt|Cup|lrm|cup|lsh|Lsh|sim|shy|map|Map|mcy|Mcy|mfr|Mfr|mho|gfr|Gfr|sfr|cir|Chi|chi|nap|Cfr|vcy|Vcy|cfr|Scy|scy|ncy|Ncy|vee|Vee|Cap|cap|nfr|scE|sce|Nfr|nge|ngE|nGg|vfr|Vfr|ngt|bot|nGt|nis|niv|Rsh|rsh|nle|nlE|bne|Bfr|bfr|nLl|nlt|nLt|Bcy|bcy|not|Not|rlm|wfr|Wfr|npr|nsc|num|ocy|ast|Ocy|ofr|xfr|Xfr|Ofr|ogt|ohm|apE|olt|Rho|ape|rho|Rfr|rfr|ord|REG|ang|reg|orv|And|and|AMP|Rcy|amp|Afr|ycy|Ycy|yen|yfr|Yfr|rcy|par|pcy|Pcy|pfr|Pfr|phi|Phi|afr|Acy|acy|zcy|Zcy|piv|acE|acd|zfr|Zfr|pre|prE|psi|Psi|qfr|Qfr|zwj|Or|ge|Gg|gt|gg|el|oS|lt|Lt|LT|Re|lg|gl|eg|ne|Im|it|le|DD|wp|wr|nu|Nu|dd|lE|Sc|sc|pi|Pi|ee|af|ll|Ll|rx|gE|xi|pm|Xi|ic|pr|Pr|in|ni|mp|mu|ac|Mu|or|ap|Gt|GT|ii);|&(Aacute|Agrave|Atilde|Ccedil|Eacute|Egrave|Iacute|Igrave|Ntilde|Oacute|Ograve|Oslash|Otilde|Uacute|Ugrave|Yacute|aacute|agrave|atilde|brvbar|ccedil|curren|divide|eacute|egrave|frac12|frac14|frac34|iacute|igrave|iquest|middot|ntilde|oacute|ograve|oslash|otilde|plusmn|uacute|ugrave|yacute|AElig|Acirc|Aring|Ecirc|Icirc|Ocirc|THORN|Ucirc|acirc|acute|aelig|aring|cedil|ecirc|icirc|iexcl|laquo|micro|ocirc|pound|raquo|szlig|thorn|times|ucirc|Auml|COPY|Euml|Iuml|Ouml|QUOT|Uuml|auml|cent|copy|euml|iuml|macr|nbsp|ordf|ordm|ouml|para|quot|sect|sup1|sup2|sup3|uuml|yuml|AMP|ETH|REG|amp|deg|eth|not|reg|shy|uml|yen|GT|LT|gt|lt)(?!;)([=a-zA-Z0-9]?)|&#([0-9]+)(;?)|&#[xX]([a-fA-F0-9]+)(;?)|&([0-9a-zA-Z]+)/g,b={aacute:"á",Aacute:"Á",abreve:"ă",Abreve:"Ă",ac:"∾",acd:"∿",acE:"∾̳",acirc:"â",Acirc:"Â",acute:"´",acy:"а",Acy:"А",aelig:"æ",AElig:"Æ",af:"⁡",afr:"𝔞",Afr:"𝔄",agrave:"à",Agrave:"À",alefsym:"ℵ",aleph:"ℵ",alpha:"α",Alpha:"Α",amacr:"ā",Amacr:"Ā",amalg:"⨿",amp:"&",AMP:"&",and:"∧",And:"⩓",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",aogon:"ą",Aogon:"Ą",aopf:"𝕒",Aopf:"𝔸",ap:"≈",apacir:"⩯",ape:"≊",apE:"⩰",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊",aring:"å",Aring:"Å",ascr:"𝒶",Ascr:"𝒜",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",atilde:"ã",Atilde:"Ã",auml:"ä",Auml:"Ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",barwed:"⌅",Barwed:"⌆",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",bcy:"б",Bcy:"Б",bdquo:"„",becaus:"∵",because:"∵",Because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",beta:"β",Beta:"Β",beth:"ℶ",between:"≬",bfr:"𝔟",Bfr:"𝔅",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bnot:"⌐",bNot:"⫭",bopf:"𝕓",Bopf:"𝔹",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxdl:"┐",boxdL:"╕",boxDl:"╖",boxDL:"╗",boxdr:"┌",boxdR:"╒",boxDr:"╓",boxDR:"╔",boxh:"─",boxH:"═",boxhd:"┬",boxhD:"╥",boxHd:"╤",boxHD:"╦",boxhu:"┴",boxhU:"╨",boxHu:"╧",boxHU:"╩",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxul:"┘",boxuL:"╛",boxUl:"╜",boxUL:"╝",boxur:"└",boxuR:"╘",boxUr:"╙",boxUR:"╚",boxv:"│",boxV:"║",boxvh:"┼",boxvH:"╪",boxVh:"╫",boxVH:"╬",boxvl:"┤",boxvL:"╡",boxVl:"╢",boxVL:"╣",boxvr:"├",boxvR:"╞",boxVr:"╟",boxVR:"╠",bprime:"‵",breve:"˘",Breve:"˘",brvbar:"¦",bscr:"𝒷",Bscr:"ℬ",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpe:"≏",bumpE:"⪮",bumpeq:"≏",Bumpeq:"≎",cacute:"ć",Cacute:"Ć",cap:"∩",Cap:"⋒",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",ccaron:"č",Ccaron:"Č",ccedil:"ç",Ccedil:"Ç",ccirc:"ĉ",Ccirc:"Ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",cdot:"ċ",Cdot:"Ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",CenterDot:"·",cfr:"𝔠",Cfr:"ℭ",chcy:"ч",CHcy:"Ч",check:"✓",checkmark:"✓",chi:"χ",Chi:"Χ",cir:"○",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cire:"≗",cirE:"⧃",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",colon:":",Colon:"∷",colone:"≔",Colone:"⩴",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",conint:"∮",Conint:"∯",ContourIntegral:"∮",copf:"𝕔",Copf:"ℂ",coprod:"∐",Coproduct:"∐",copy:"©",COPY:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",cross:"✗",Cross:"⨯",cscr:"𝒸",Cscr:"𝒞",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cup:"∪",Cup:"⋓",cupbrcap:"⩈",cupcap:"⩆",CupCap:"≍",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dagger:"†",Dagger:"‡",daleth:"ℸ",darr:"↓",dArr:"⇓",Darr:"↡",dash:"‐",dashv:"⊣",Dashv:"⫤",dbkarow:"⤏",dblac:"˝",dcaron:"ď",Dcaron:"Ď",dcy:"д",Dcy:"Д",dd:"ⅆ",DD:"ⅅ",ddagger:"‡",ddarr:"⇊",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",delta:"δ",Delta:"Δ",demptyv:"⦱",dfisht:"⥿",dfr:"𝔡",Dfr:"𝔇",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",diamond:"⋄",Diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",djcy:"ђ",DJcy:"Ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",dopf:"𝕕",Dopf:"𝔻",dot:"˙",Dot:"¨",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",downarrow:"↓",Downarrow:"⇓",DownArrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",dscr:"𝒹",Dscr:"𝒟",dscy:"ѕ",DScy:"Ѕ",dsol:"⧶",dstrok:"đ",Dstrok:"Đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",dzcy:"џ",DZcy:"Џ",dzigrarr:"⟿",eacute:"é",Eacute:"É",easter:"⩮",ecaron:"ě",Ecaron:"Ě",ecir:"≖",ecirc:"ê",Ecirc:"Ê",ecolon:"≕",ecy:"э",Ecy:"Э",eDDot:"⩷",edot:"ė",eDot:"≑",Edot:"Ė",ee:"ⅇ",efDot:"≒",efr:"𝔢",Efr:"𝔈",eg:"⪚",egrave:"è",Egrave:"È",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",emacr:"ē",Emacr:"Ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp:" ",emsp13:" ",emsp14:" ",eng:"ŋ",ENG:"Ŋ",ensp:" ",eogon:"ę",Eogon:"Ę",eopf:"𝕖",Eopf:"𝔼",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",epsilon:"ε",Epsilon:"Ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",escr:"ℯ",Escr:"ℰ",esdot:"≐",esim:"≂",Esim:"⩳",eta:"η",Eta:"Η",eth:"ð",ETH:"Ð",euml:"ë",Euml:"Ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",exponentiale:"ⅇ",ExponentialE:"ⅇ",fallingdotseq:"≒",fcy:"ф",Fcy:"Ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",ffr:"𝔣",Ffr:"𝔉",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",fopf:"𝕗",Fopf:"𝔽",forall:"∀",ForAll:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",Fscr:"ℱ",gacute:"ǵ",gamma:"γ",Gamma:"Γ",gammad:"ϝ",Gammad:"Ϝ",gap:"⪆",gbreve:"ğ",Gbreve:"Ğ",Gcedil:"Ģ",gcirc:"ĝ",Gcirc:"Ĝ",gcy:"г",Gcy:"Г",gdot:"ġ",Gdot:"Ġ",ge:"≥",gE:"≧",gel:"⋛",gEl:"⪌",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",gfr:"𝔤",Gfr:"𝔊",gg:"≫",Gg:"⋙",ggg:"⋙",gimel:"ℷ",gjcy:"ѓ",GJcy:"Ѓ",gl:"≷",gla:"⪥",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gnE:"≩",gneq:"⪈",gneqq:"≩",gnsim:"⋧",gopf:"𝕘",Gopf:"𝔾",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",gscr:"ℊ",Gscr:"𝒢",gsim:"≳",gsime:"⪎",gsiml:"⪐",gt:">",Gt:"≫",GT:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",hardcy:"ъ",HARDcy:"Ъ",harr:"↔",hArr:"⇔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",hcirc:"ĥ",Hcirc:"Ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",Hfr:"ℌ",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",Hopf:"ℍ",horbar:"―",HorizontalLine:"─",hscr:"𝒽",Hscr:"ℋ",hslash:"ℏ",hstrok:"ħ",Hstrok:"Ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",iacute:"í",Iacute:"Í",ic:"⁣",icirc:"î",Icirc:"Î",icy:"и",Icy:"И",Idot:"İ",iecy:"е",IEcy:"Е",iexcl:"¡",iff:"⇔",ifr:"𝔦",Ifr:"ℑ",igrave:"ì",Igrave:"Ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",ijlig:"ij",IJlig:"IJ",Im:"ℑ",imacr:"ī",Imacr:"Ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",int:"∫",Int:"∬",intcal:"⊺",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",iocy:"ё",IOcy:"Ё",iogon:"į",Iogon:"Į",iopf:"𝕚",Iopf:"𝕀",iota:"ι",Iota:"Ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",Iscr:"ℐ",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",itilde:"ĩ",Itilde:"Ĩ",iukcy:"і",Iukcy:"І",iuml:"ï",Iuml:"Ï",jcirc:"ĵ",Jcirc:"Ĵ",jcy:"й",Jcy:"Й",jfr:"𝔧",Jfr:"𝔍",jmath:"ȷ",jopf:"𝕛",Jopf:"𝕁",jscr:"𝒿",Jscr:"𝒥",jsercy:"ј",Jsercy:"Ј",jukcy:"є",Jukcy:"Є",kappa:"κ",Kappa:"Κ",kappav:"ϰ",kcedil:"ķ",Kcedil:"Ķ",kcy:"к",Kcy:"К",kfr:"𝔨",Kfr:"𝔎",kgreen:"ĸ",khcy:"х",KHcy:"Х",kjcy:"ќ",KJcy:"Ќ",kopf:"𝕜",Kopf:"𝕂",kscr:"𝓀",Kscr:"𝒦",lAarr:"⇚",lacute:"ĺ",Lacute:"Ĺ",laemptyv:"⦴",lagran:"ℒ",lambda:"λ",Lambda:"Λ",lang:"⟨",Lang:"⟪",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",larr:"←",lArr:"⇐",Larr:"↞",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",latail:"⤙",lAtail:"⤛",late:"⪭",lates:"⪭︀",lbarr:"⤌",lBarr:"⤎",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",lcaron:"ľ",Lcaron:"Ľ",lcedil:"ļ",Lcedil:"Ļ",lceil:"⌈",lcub:"{",lcy:"л",Lcy:"Л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",lE:"≦",LeftAngleBracket:"⟨",leftarrow:"←",Leftarrow:"⇐",LeftArrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",Leftrightarrow:"⇔",LeftRightArrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",leg:"⋚",lEg:"⪋",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",lfr:"𝔩",Lfr:"𝔏",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",ljcy:"љ",LJcy:"Љ",ll:"≪",Ll:"⋘",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",lmidot:"ŀ",Lmidot:"Ŀ",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lnE:"≨",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",Longleftarrow:"⟸",LongLeftArrow:"⟵",longleftrightarrow:"⟷",Longleftrightarrow:"⟺",LongLeftRightArrow:"⟷",longmapsto:"⟼",longrightarrow:"⟶",Longrightarrow:"⟹",LongRightArrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",lopf:"𝕝",Lopf:"𝕃",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",Lscr:"ℒ",lsh:"↰",Lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",lstrok:"ł",Lstrok:"Ł",lt:"<",Lt:"≪",LT:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",map:"↦",Map:"⤅",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",mcy:"м",Mcy:"М",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",mfr:"𝔪",Mfr:"𝔐",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",mopf:"𝕞",Mopf:"𝕄",mp:"∓",mscr:"𝓂",Mscr:"ℳ",mstpos:"∾",mu:"μ",Mu:"Μ",multimap:"⊸",mumap:"⊸",nabla:"∇",nacute:"ń",Nacute:"Ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",ncaron:"ň",Ncaron:"Ň",ncedil:"ņ",Ncedil:"Ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",ncy:"н",Ncy:"Н",ndash:"–",ne:"≠",nearhk:"⤤",nearr:"↗",neArr:"⇗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",nfr:"𝔫",Nfr:"𝔑",nge:"≱",ngE:"≧̸",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",ngt:"≯",nGt:"≫⃒",ngtr:"≯",nGtv:"≫̸",nharr:"↮",nhArr:"⇎",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",njcy:"њ",NJcy:"Њ",nlarr:"↚",nlArr:"⇍",nldr:"‥",nle:"≰",nlE:"≦̸",nleftarrow:"↚",nLeftarrow:"⇍",nleftrightarrow:"↮",nLeftrightarrow:"⇎",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nlt:"≮",nLt:"≪⃒",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",nopf:"𝕟",Nopf:"ℕ",not:"¬",Not:"⫬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrarr:"↛",nrArr:"⇏",nrarrc:"⤳̸",nrarrw:"↝̸",nrightarrow:"↛",nRightarrow:"⇏",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",nscr:"𝓃",Nscr:"𝒩",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsube:"⊈",nsubE:"⫅̸",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupe:"⊉",nsupE:"⫆̸",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",ntilde:"ñ",Ntilde:"Ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",nu:"ν",Nu:"Ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nvdash:"⊬",nvDash:"⊭",nVdash:"⊮",nVDash:"⊯",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwarr:"↖",nwArr:"⇖",nwarrow:"↖",nwnear:"⤧",oacute:"ó",Oacute:"Ó",oast:"⊛",ocir:"⊚",ocirc:"ô",Ocirc:"Ô",ocy:"о",Ocy:"О",odash:"⊝",odblac:"ő",Odblac:"Ő",odiv:"⨸",odot:"⊙",odsold:"⦼",oelig:"œ",OElig:"Œ",ofcir:"⦿",ofr:"𝔬",Ofr:"𝔒",ogon:"˛",ograve:"ò",Ograve:"Ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",omacr:"ō",Omacr:"Ō",omega:"ω",Omega:"Ω",omicron:"ο",Omicron:"Ο",omid:"⦶",ominus:"⊖",oopf:"𝕠",Oopf:"𝕆",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",or:"∨",Or:"⩔",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",oscr:"ℴ",Oscr:"𝒪",oslash:"ø",Oslash:"Ø",osol:"⊘",otilde:"õ",Otilde:"Õ",otimes:"⊗",Otimes:"⨷",otimesas:"⨶",ouml:"ö",Ouml:"Ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",pcy:"п",Pcy:"П",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",pfr:"𝔭",Pfr:"𝔓",phi:"φ",Phi:"Φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",pi:"π",Pi:"Π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",popf:"𝕡",Popf:"ℙ",pound:"£",pr:"≺",Pr:"⪻",prap:"⪷",prcue:"≼",pre:"⪯",prE:"⪳",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",prime:"′",Prime:"″",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportion:"∷",Proportional:"∝",propto:"∝",prsim:"≾",prurel:"⊰",pscr:"𝓅",Pscr:"𝒫",psi:"ψ",Psi:"Ψ",puncsp:" ",qfr:"𝔮",Qfr:"𝔔",qint:"⨌",qopf:"𝕢",Qopf:"ℚ",qprime:"⁗",qscr:"𝓆",Qscr:"𝒬",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',QUOT:'"',rAarr:"⇛",race:"∽̱",racute:"ŕ",Racute:"Ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",Rang:"⟫",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarr:"→",rArr:"⇒",Rarr:"↠",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",rarrtl:"↣",Rarrtl:"⤖",rarrw:"↝",ratail:"⤚",rAtail:"⤜",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rBarr:"⤏",RBarr:"⤐",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",rcaron:"ř",Rcaron:"Ř",rcedil:"ŗ",Rcedil:"Ŗ",rceil:"⌉",rcub:"}",rcy:"р",Rcy:"Р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",Re:"ℜ",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",reg:"®",REG:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",Rfr:"ℜ",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",rho:"ρ",Rho:"Ρ",rhov:"ϱ",RightAngleBracket:"⟩",rightarrow:"→",Rightarrow:"⇒",RightArrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",Ropf:"ℝ",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",rscr:"𝓇",Rscr:"ℛ",rsh:"↱",Rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",sacute:"ś",Sacute:"Ś",sbquo:"‚",sc:"≻",Sc:"⪼",scap:"⪸",scaron:"š",Scaron:"Š",sccue:"≽",sce:"⪰",scE:"⪴",scedil:"ş",Scedil:"Ş",scirc:"ŝ",Scirc:"Ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",scy:"с",Scy:"С",sdot:"⋅",sdotb:"⊡",sdote:"⩦",searhk:"⤥",searr:"↘",seArr:"⇘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",sfr:"𝔰",Sfr:"𝔖",sfrown:"⌢",sharp:"♯",shchcy:"щ",SHCHcy:"Щ",shcy:"ш",SHcy:"Ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",sigma:"σ",Sigma:"Σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",softcy:"ь",SOFTcy:"Ь",sol:"/",solb:"⧄",solbar:"⌿",sopf:"𝕤",Sopf:"𝕊",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",square:"□",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squf:"▪",srarr:"→",sscr:"𝓈",Sscr:"𝒮",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",star:"☆",Star:"⋆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",Sub:"⋐",subdot:"⪽",sube:"⊆",subE:"⫅",subedot:"⫃",submult:"⫁",subne:"⊊",subnE:"⫋",subplus:"⪿",subrarr:"⥹",subset:"⊂",Subset:"⋐",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",sum:"∑",Sum:"∑",sung:"♪",sup:"⊃",Sup:"⋑",sup1:"¹",sup2:"²",sup3:"³",supdot:"⪾",supdsub:"⫘",supe:"⊇",supE:"⫆",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supne:"⊋",supnE:"⫌",supplus:"⫀",supset:"⊃",Supset:"⋑",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swarr:"↙",swArr:"⇙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:"\t",target:"⌖",tau:"τ",Tau:"Τ",tbrk:"⎴",tcaron:"ť",Tcaron:"Ť",tcedil:"ţ",Tcedil:"Ţ",tcy:"т",Tcy:"Т",tdot:"⃛",telrec:"⌕",tfr:"𝔱",Tfr:"𝔗",there4:"∴",therefore:"∴",Therefore:"∴",theta:"θ",Theta:"Θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",thinsp:" ",ThinSpace:" ",thkap:"≈",thksim:"∼",thorn:"þ",THORN:"Þ",tilde:"˜",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",topf:"𝕥",Topf:"𝕋",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",TRADE:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",tscr:"𝓉",Tscr:"𝒯",tscy:"ц",TScy:"Ц",tshcy:"ћ",TSHcy:"Ћ",tstrok:"ŧ",Tstrok:"Ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",uacute:"ú",Uacute:"Ú",uarr:"↑",uArr:"⇑",Uarr:"↟",Uarrocir:"⥉",ubrcy:"ў",Ubrcy:"Ў",ubreve:"ŭ",Ubreve:"Ŭ",ucirc:"û",Ucirc:"Û",ucy:"у",Ucy:"У",udarr:"⇅",udblac:"ű",Udblac:"Ű",udhar:"⥮",ufisht:"⥾",ufr:"𝔲",Ufr:"𝔘",ugrave:"ù",Ugrave:"Ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",umacr:"ū",Umacr:"Ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",uogon:"ų",Uogon:"Ų",uopf:"𝕦",Uopf:"𝕌",uparrow:"↑",Uparrow:"⇑",UpArrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",updownarrow:"↕",Updownarrow:"⇕",UpDownArrow:"↕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",upsi:"υ",Upsi:"ϒ",upsih:"ϒ",upsilon:"υ",Upsilon:"Υ",UpTee:"⊥",UpTeeArrow:"↥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",uring:"ů",Uring:"Ů",urtri:"◹",uscr:"𝓊",Uscr:"𝒰",utdot:"⋰",utilde:"ũ",Utilde:"Ũ",utri:"▵",utrif:"▴",uuarr:"⇈",uuml:"ü",Uuml:"Ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",vArr:"⇕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vBar:"⫨",Vbar:"⫫",vBarv:"⫩",vcy:"в",Vcy:"В",vdash:"⊢",vDash:"⊨",Vdash:"⊩",VDash:"⊫",Vdashl:"⫦",vee:"∨",Vee:"⋁",veebar:"⊻",veeeq:"≚",vellip:"⋮",verbar:"|",Verbar:"‖",vert:"|",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",vfr:"𝔳",Vfr:"𝔙",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",vopf:"𝕧",Vopf:"𝕍",vprop:"∝",vrtri:"⊳",vscr:"𝓋",Vscr:"𝒱",vsubne:"⊊︀",vsubnE:"⫋︀",vsupne:"⊋︀",vsupnE:"⫌︀",Vvdash:"⊪",vzigzag:"⦚",wcirc:"ŵ",Wcirc:"Ŵ",wedbar:"⩟",wedge:"∧",Wedge:"⋀",wedgeq:"≙",weierp:"℘",wfr:"𝔴",Wfr:"𝔚",wopf:"𝕨",Wopf:"𝕎",wp:"℘",wr:"≀",wreath:"≀",wscr:"𝓌",Wscr:"𝒲",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",xfr:"𝔵",Xfr:"𝔛",xharr:"⟷",xhArr:"⟺",xi:"ξ",Xi:"Ξ",xlarr:"⟵",xlArr:"⟸",xmap:"⟼",xnis:"⋻",xodot:"⨀",xopf:"𝕩",Xopf:"𝕏",xoplus:"⨁",xotime:"⨂",xrarr:"⟶",xrArr:"⟹",xscr:"𝓍",Xscr:"𝒳",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",yacute:"ý",Yacute:"Ý",yacy:"я",YAcy:"Я",ycirc:"ŷ",Ycirc:"Ŷ",ycy:"ы",Ycy:"Ы",yen:"¥",yfr:"𝔶",Yfr:"𝔜",yicy:"ї",YIcy:"Ї",yopf:"𝕪",Yopf:"𝕐",yscr:"𝓎",Yscr:"𝒴",yucy:"ю",YUcy:"Ю",yuml:"ÿ",Yuml:"Ÿ",zacute:"ź",Zacute:"Ź",zcaron:"ž",Zcaron:"Ž",zcy:"з",Zcy:"З",zdot:"ż",Zdot:"Ż",zeetrf:"ℨ",ZeroWidthSpace:"​",zeta:"ζ",Zeta:"Ζ",zfr:"𝔷",Zfr:"ℨ",zhcy:"ж",ZHcy:"Ж",zigrarr:"⇝",zopf:"𝕫",Zopf:"ℤ",zscr:"𝓏",Zscr:"𝒵",zwj:"‍",zwnj:"‌"},v={aacute:"á",Aacute:"Á",acirc:"â",Acirc:"Â",acute:"´",aelig:"æ",AElig:"Æ",agrave:"à",Agrave:"À",amp:"&",AMP:"&",aring:"å",Aring:"Å",atilde:"ã",Atilde:"Ã",auml:"ä",Auml:"Ä",brvbar:"¦",ccedil:"ç",Ccedil:"Ç",cedil:"¸",cent:"¢",copy:"©",COPY:"©",curren:"¤",deg:"°",divide:"÷",eacute:"é",Eacute:"É",ecirc:"ê",Ecirc:"Ê",egrave:"è",Egrave:"È",eth:"ð",ETH:"Ð",euml:"ë",Euml:"Ë",frac12:"½",frac14:"¼",frac34:"¾",gt:">",GT:">",iacute:"í",Iacute:"Í",icirc:"î",Icirc:"Î",iexcl:"¡",igrave:"ì",Igrave:"Ì",iquest:"¿",iuml:"ï",Iuml:"Ï",laquo:"«",lt:"<",LT:"<",macr:"¯",micro:"µ",middot:"·",nbsp:" ",not:"¬",ntilde:"ñ",Ntilde:"Ñ",oacute:"ó",Oacute:"Ó",ocirc:"ô",Ocirc:"Ô",ograve:"ò",Ograve:"Ò",ordf:"ª",ordm:"º",oslash:"ø",Oslash:"Ø",otilde:"õ",Otilde:"Õ",ouml:"ö",Ouml:"Ö",para:"¶",plusmn:"±",pound:"£",quot:'"',QUOT:'"',raquo:"»",reg:"®",REG:"®",sect:"§",shy:"­",sup1:"¹",sup2:"²",sup3:"³",szlig:"ß",thorn:"þ",THORN:"Þ",times:"×",uacute:"ú",Uacute:"Ú",ucirc:"û",Ucirc:"Û",ugrave:"ù",Ugrave:"Ù",uml:"¨",uuml:"ü",Uuml:"Ü",yacute:"ý",Yacute:"Ý",yen:"¥",yuml:"ÿ"},m={0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"},_=[1,2,3,4,5,6,7,8,11,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,64976,64977,64978,64979,64980,64981,64982,64983,64984,64985,64986,64987,64988,64989,64990,64991,64992,64993,64994,64995,64996,64997,64998,64999,65e3,65001,65002,65003,65004,65005,65006,65007,65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111],w=String.fromCharCode,x={}.hasOwnProperty,k=function(t,e){return x.call(t,e)},E=function(t,e){if(!t)return e;var n,r={};for(n in e)r[n]=k(t,n)?t[n]:e[n];return r},A=function(t,e){var n="";return t>=55296&&t<=57343||t>1114111?(e&&T("character reference outside the permissible Unicode range"),"�"):k(m,t)?(e&&T("disallowed character reference"),m[t]):(e&&function(t,e){for(var n=-1,r=t.length;++n<r;)if(t[n]==e)return!0;return!1}(_,t)&&T("disallowed character reference"),t>65535&&(n+=w((t-=65536)>>>10&1023|55296),t=56320|1023&t),n+=w(t))},S=function(t){return"&#x"+t.toString(16).toUpperCase()+";"},M=function(t){return"&#"+t+";"},T=function(t){throw Error("Parse error: "+t)},O=function(t,e){(e=E(e,O.options)).strict&&g.test(t)&&T("forbidden code point");var n=e.encodeEverything,r=e.useNamedReferences,i=e.allowUnsafeSymbols,o=e.decimal?M:S,a=function(t){return o(t.charCodeAt(0))};return n?(t=t.replace(s,(function(t){return r&&k(l,t)?"&"+l[t]+";":a(t)})),r&&(t=t.replace(/&gt;\u20D2/g,"&nvgt;").replace(/&lt;\u20D2/g,"&nvlt;").replace(/&#x66;&#x6A;/g,"&fjlig;")),r&&(t=t.replace(f,(function(t){return"&"+l[t]+";"})))):r?(i||(t=t.replace(h,(function(t){return"&"+l[t]+";"}))),t=(t=t.replace(/&gt;\u20D2/g,"&nvgt;").replace(/&lt;\u20D2/g,"&nvlt;")).replace(f,(function(t){return"&"+l[t]+";"}))):i||(t=t.replace(h,a)),t.replace(u,(function(t){var e=t.charCodeAt(0),n=t.charCodeAt(1);return o(1024*(e-55296)+n-56320+65536)})).replace(c,a)};O.options={allowUnsafeSymbols:!1,encodeEverything:!1,strict:!1,useNamedReferences:!1,decimal:!1};var D=function(t,e){var n=(e=E(e,D.options)).strict;return n&&p.test(t)&&T("malformed character reference"),t.replace(y,(function(t,r,i,o,a,u,s,c,f){var l,h,d,p,g,y;return r?b[g=r]:i?(g=i,(y=o)&&e.isAttributeValue?(n&&"="==y&&T("`&` did not start a character reference"),t):(n&&T("named character reference was not terminated by a semicolon"),v[g]+(y||""))):a?(d=a,h=u,n&&!h&&T("character reference was not terminated by a semicolon"),l=parseInt(d,10),A(l,n)):s?(p=s,h=c,n&&!h&&T("character reference was not terminated by a semicolon"),l=parseInt(p,16),A(l,n)):(n&&T("named character reference was not terminated by a semicolon"),t)}))};D.options={isAttributeValue:!1,strict:!1};var C={version:"1.2.0",encode:O,decode:D,escape:function(t){return t.replace(h,(function(t){return d[t]}))},unescape:D};if("function"==typeof define&&"object"==typeof define.amd&&define.amd)define((function(){return C}));else if(i&&!i.nodeType)if(o)o.exports=C;else for(var N in C)k(C,N)&&(i[N]=C[N]);else r.he=C}(this)}).call(this,n(14)(t),n(25))},function(t,e,n){"use strict";var r=n(449),i=n(450),o=n(451);function a(t,e,n){if(!t)return t;if(!e)return t;"string"==typeof n&&(n={keyframes:n}),n||(n={keyframes:!1}),t=u(t,e+" $1$2");var i=e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&");t=(t=(t=(t=t.replace(new RegExp("("+i+")\\s*\\1(?=[\\s\\r\\n,{])","g"),"$1")).replace(new RegExp("("+i+")\\s*:host","g"),"$1")).replace(new RegExp("("+i+")\\s*@","g"),"@")).replace(new RegExp("("+i+")\\s*:root","g"),":root");for(var o,a=[],s=/@keyframes\s+([a-zA-Z0-9_-]+)\s*{/g;null!==(o=s.exec(t));)a.indexOf(o[1])<0&&a.push(o[1]);var c=r(e);return a.forEach((function(e){var r=(!0===n.keyframes?c+"-":"string"==typeof n.keyframes?n.keyframes:"")+e;t=(t=t.replace(new RegExp("(@keyframes\\s+)"+e+"(\\s*{)","g"),"$1"+r+"$2")).replace(new RegExp("(animation(?:-name)?\\s*:[^;]*\\s*)"+e+"([\\s;}])","g"),"$1"+r+"$2")})),t=t.replace(new RegExp("("+i+" )(\\s*(?:to|from|[+-]?(?:(?:\\.\\d+)|(?:\\d+(?:\\.\\d*)?))%))(?=[\\s\\r\\n,{])","g"),"$2")}function u(t,e){var n=[];return t=o(t),t=(t=i.replace(t,!0,n)).replace(/([^\r\n,{}]+)(,(?=[^}]*{)|\s*{)/g,e),t=i.paste(t,n)}t.exports=a,a.replace=u},function(t,e,n){"use strict";const r=n(812),i="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~".split(""),o="0123456789".split(""),a=(t,e)=>{const n=e.length,i=Math.floor(65536/n)*n-1,o=2*Math.ceil(1.1*t);let a="",u=0;for(;u<t;){const s=r.randomBytes(o);let c=0;for(;c<o&&u<t;){const t=s.readUInt16LE(c);c+=2,t>i||(a+=e[t%n],u++)}}return a},u=[void 0,"hex","base64","url-safe","numeric"];t.exports=({length:t,type:e,characters:n})=>{if(!(t>=0&&Number.isFinite(t)))throw new TypeError("Expected a `length` to be a non-negative finite number");if(void 0!==e&&void 0!==n)throw new TypeError("Expected either `type` or `characters`");if(void 0!==n&&"string"!=typeof n)throw new TypeError("Expected `characters` to be string");if(!u.includes(e))throw new TypeError(`Unknown type: ${e}`);if(void 0===e&&void 0===n&&(e="hex"),"hex"===e||void 0===e&&void 0===n)return r.randomBytes(Math.ceil(.5*t)).toString("hex").slice(0,t);if("base64"===e)return r.randomBytes(Math.ceil(.75*t)).toString("base64").slice(0,t);if("url-safe"===e)return a(t,i);if("numeric"===e)return a(t,o);if(0===n.length)throw new TypeError("Expected `characters` string length to be greater than or equal to 1");if(n.length>65536)throw new TypeError("Expected `characters` string length to be less or equal to 65536");return a(t,n.split(""))}},function(t,e,n){var r;r=function(){var t=JSON.parse('{"$":"dollar","%":"percent","&":"and","<":"less",">":"greater","|":"or","¢":"cent","£":"pound","¤":"currency","¥":"yen","©":"(c)","ª":"a","®":"(r)","º":"o","À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","Æ":"AE","Ç":"C","È":"E","É":"E","Ê":"E","Ë":"E","Ì":"I","Í":"I","Î":"I","Ï":"I","Ð":"D","Ñ":"N","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","Ù":"U","Ú":"U","Û":"U","Ü":"U","Ý":"Y","Þ":"TH","ß":"ss","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","æ":"ae","ç":"c","è":"e","é":"e","ê":"e","ë":"e","ì":"i","í":"i","î":"i","ï":"i","ð":"d","ñ":"n","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","ù":"u","ú":"u","û":"u","ü":"u","ý":"y","þ":"th","ÿ":"y","Ā":"A","ā":"a","Ă":"A","ă":"a","Ą":"A","ą":"a","Ć":"C","ć":"c","Č":"C","č":"c","Ď":"D","ď":"d","Đ":"DJ","đ":"dj","Ē":"E","ē":"e","Ė":"E","ė":"e","Ę":"e","ę":"e","Ě":"E","ě":"e","Ğ":"G","ğ":"g","Ģ":"G","ģ":"g","Ĩ":"I","ĩ":"i","Ī":"i","ī":"i","Į":"I","į":"i","İ":"I","ı":"i","Ķ":"k","ķ":"k","Ļ":"L","ļ":"l","Ľ":"L","ľ":"l","Ł":"L","ł":"l","Ń":"N","ń":"n","Ņ":"N","ņ":"n","Ň":"N","ň":"n","Ő":"O","ő":"o","Œ":"OE","œ":"oe","Ŕ":"R","ŕ":"r","Ř":"R","ř":"r","Ś":"S","ś":"s","Ş":"S","ş":"s","Š":"S","š":"s","Ţ":"T","ţ":"t","Ť":"T","ť":"t","Ũ":"U","ũ":"u","Ū":"u","ū":"u","Ů":"U","ů":"u","Ű":"U","ű":"u","Ų":"U","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","ź":"z","Ż":"Z","ż":"z","Ž":"Z","ž":"z","ƒ":"f","Ơ":"O","ơ":"o","Ư":"U","ư":"u","Lj":"LJ","lj":"lj","Nj":"NJ","nj":"nj","Ș":"S","ș":"s","Ț":"T","ț":"t","˚":"o","Ά":"A","Έ":"E","Ή":"H","Ί":"I","Ό":"O","Ύ":"Y","Ώ":"W","ΐ":"i","Α":"A","Β":"B","Γ":"G","Δ":"D","Ε":"E","Ζ":"Z","Η":"H","Θ":"8","Ι":"I","Κ":"K","Λ":"L","Μ":"M","Ν":"N","Ξ":"3","Ο":"O","Π":"P","Ρ":"R","Σ":"S","Τ":"T","Υ":"Y","Φ":"F","Χ":"X","Ψ":"PS","Ω":"W","Ϊ":"I","Ϋ":"Y","ά":"a","έ":"e","ή":"h","ί":"i","ΰ":"y","α":"a","β":"b","γ":"g","δ":"d","ε":"e","ζ":"z","η":"h","θ":"8","ι":"i","κ":"k","λ":"l","μ":"m","ν":"n","ξ":"3","ο":"o","π":"p","ρ":"r","ς":"s","σ":"s","τ":"t","υ":"y","φ":"f","χ":"x","ψ":"ps","ω":"w","ϊ":"i","ϋ":"y","ό":"o","ύ":"y","ώ":"w","Ё":"Yo","Ђ":"DJ","Є":"Ye","І":"I","Ї":"Yi","Ј":"J","Љ":"LJ","Њ":"NJ","Ћ":"C","Џ":"DZ","А":"A","Б":"B","В":"V","Г":"G","Д":"D","Е":"E","Ж":"Zh","З":"Z","И":"I","Й":"J","К":"K","Л":"L","М":"M","Н":"N","О":"O","П":"P","Р":"R","С":"S","Т":"T","У":"U","Ф":"F","Х":"H","Ц":"C","Ч":"Ch","Ш":"Sh","Щ":"Sh","Ъ":"U","Ы":"Y","Ь":"","Э":"E","Ю":"Yu","Я":"Ya","а":"a","б":"b","в":"v","г":"g","д":"d","е":"e","ж":"zh","з":"z","и":"i","й":"j","к":"k","л":"l","м":"m","н":"n","о":"o","п":"p","р":"r","с":"s","т":"t","у":"u","ф":"f","х":"h","ц":"c","ч":"ch","ш":"sh","щ":"sh","ъ":"u","ы":"y","ь":"","э":"e","ю":"yu","я":"ya","ё":"yo","ђ":"dj","є":"ye","і":"i","ї":"yi","ј":"j","љ":"lj","њ":"nj","ћ":"c","ѝ":"u","џ":"dz","Ґ":"G","ґ":"g","Ғ":"GH","ғ":"gh","Қ":"KH","қ":"kh","Ң":"NG","ң":"ng","Ү":"UE","ү":"ue","Ұ":"U","ұ":"u","Һ":"H","һ":"h","Ә":"AE","ә":"ae","Ө":"OE","ө":"oe","฿":"baht","ა":"a","ბ":"b","გ":"g","დ":"d","ე":"e","ვ":"v","ზ":"z","თ":"t","ი":"i","კ":"k","ლ":"l","მ":"m","ნ":"n","ო":"o","პ":"p","ჟ":"zh","რ":"r","ს":"s","ტ":"t","უ":"u","ფ":"f","ქ":"k","ღ":"gh","ყ":"q","შ":"sh","ჩ":"ch","ც":"ts","ძ":"dz","წ":"ts","ჭ":"ch","ხ":"kh","ჯ":"j","ჰ":"h","Ẁ":"W","ẁ":"w","Ẃ":"W","ẃ":"w","Ẅ":"W","ẅ":"w","ẞ":"SS","Ạ":"A","ạ":"a","Ả":"A","ả":"a","Ấ":"A","ấ":"a","Ầ":"A","ầ":"a","Ẩ":"A","ẩ":"a","Ẫ":"A","ẫ":"a","Ậ":"A","ậ":"a","Ắ":"A","ắ":"a","Ằ":"A","ằ":"a","Ẳ":"A","ẳ":"a","Ẵ":"A","ẵ":"a","Ặ":"A","ặ":"a","Ẹ":"E","ẹ":"e","Ẻ":"E","ẻ":"e","Ẽ":"E","ẽ":"e","Ế":"E","ế":"e","Ề":"E","ề":"e","Ể":"E","ể":"e","Ễ":"E","ễ":"e","Ệ":"E","ệ":"e","Ỉ":"I","ỉ":"i","Ị":"I","ị":"i","Ọ":"O","ọ":"o","Ỏ":"O","ỏ":"o","Ố":"O","ố":"o","Ồ":"O","ồ":"o","Ổ":"O","ổ":"o","Ỗ":"O","ỗ":"o","Ộ":"O","ộ":"o","Ớ":"O","ớ":"o","Ờ":"O","ờ":"o","Ở":"O","ở":"o","Ỡ":"O","ỡ":"o","Ợ":"O","ợ":"o","Ụ":"U","ụ":"u","Ủ":"U","ủ":"u","Ứ":"U","ứ":"u","Ừ":"U","ừ":"u","Ử":"U","ử":"u","Ữ":"U","ữ":"u","Ự":"U","ự":"u","Ỳ":"Y","ỳ":"y","Ỵ":"Y","ỵ":"y","Ỷ":"Y","ỷ":"y","Ỹ":"Y","ỹ":"y","‘":"\'","’":"\'","“":"\\"","”":"\\"","†":"+","•":"*","…":"...","₠":"ecu","₢":"cruzeiro","₣":"french franc","₤":"lira","₥":"mill","₦":"naira","₧":"peseta","₨":"rupee","₩":"won","₪":"new shequel","₫":"dong","€":"euro","₭":"kip","₮":"tugrik","₯":"drachma","₰":"penny","₱":"peso","₲":"guarani","₳":"austral","₴":"hryvnia","₵":"cedi","₸":"kazakhstani tenge","₹":"indian rupee","₽":"russian ruble","₿":"bitcoin","℠":"sm","™":"tm","∂":"d","∆":"delta","∑":"sum","∞":"infinity","♥":"love","元":"yuan","円":"yen","﷼":"rial"}'),e=JSON.parse('{"vi":{"Đ":"D","đ":"d"}}');function n(n,r){if("string"!=typeof n)throw new Error("slugify: string argument expected");var i=e[(r="string"==typeof r?{replacement:r}:r||{}).locale]||{},o=n.split("").reduce((function(e,n){return e+(i[n]||t[n]||n).replace(r.remove||/[^\w\s$*_+~.()'"!\-:@]/g,"")}),"").trim().replace(/[-\s]+/g,r.replacement||"-");return r.lower?o.toLowerCase():o}return n.extend=function(e){for(var n in e)t[n]=e[n]},n},t.exports=r(),t.exports.default=r()},function(t,e,n){
+t.exports={graphlib:n(281),dagre:n(136),intersect:n(338),render:n(340),util:n(10),version:n(352)}},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,n){"use strict";var r=n(3),i=n(13).Graph;function a(t,e,n,i){var a;do{a=r.uniqueId(i)}while(t.hasNode(a));return n.dummy=e,t.setNode(a,n),a}function o(t){return r.max(r.map(t.nodes(),(function(e){var n=t.node(e).rank;if(!r.isUndefined(n))return n})))}t.exports={addDummyNode:a,simplify:function(t){var e=(new i).setGraph(t.graph());return r.forEach(t.nodes(),(function(n){e.setNode(n,t.node(n))})),r.forEach(t.edges(),(function(n){var r=e.edge(n.v,n.w)||{weight:0,minlen:1},i=t.edge(n);e.setEdge(n.v,n.w,{weight:r.weight+i.weight,minlen:Math.max(r.minlen,i.minlen)})})),e},asNonCompoundGraph:function(t){var e=new i({multigraph:t.isMultigraph()}).setGraph(t.graph());return r.forEach(t.nodes(),(function(n){t.children(n).length||e.setNode(n,t.node(n))})),r.forEach(t.edges(),(function(n){e.setEdge(n,t.edge(n))})),e},successorWeights:function(t){var e=r.map(t.nodes(),(function(e){var n={};return r.forEach(t.outEdges(e),(function(e){n[e.w]=(n[e.w]||0)+t.edge(e).weight})),n}));return r.zipObject(t.nodes(),e)},predecessorWeights:function(t){var e=r.map(t.nodes(),(function(e){var n={};return r.forEach(t.inEdges(e),(function(e){n[e.v]=(n[e.v]||0)+t.edge(e).weight})),n}));return r.zipObject(t.nodes(),e)},intersectRect:function(t,e){var n,r,i=t.x,a=t.y,o=e.x-i,s=e.y-a,u=t.width/2,c=t.height/2;if(!o&&!s)throw new Error("Not possible to find intersection inside of the rectangle");Math.abs(s)*u>Math.abs(o)*c?(s<0&&(c=-c),n=c*o/s,r=c):(o<0&&(u=-u),n=u,r=u*s/o);return{x:i+n,y:a+r}},buildLayerMatrix:function(t){var e=r.map(r.range(o(t)+1),(function(){return[]}));return r.forEach(t.nodes(),(function(n){var i=t.node(n),a=i.rank;r.isUndefined(a)||(e[a][i.order]=n)})),e},normalizeRanks:function(t){var e=r.min(r.map(t.nodes(),(function(e){return t.node(e).rank})));r.forEach(t.nodes(),(function(n){var i=t.node(n);r.has(i,"rank")&&(i.rank-=e)}))},removeEmptyRanks:function(t){var e=r.min(r.map(t.nodes(),(function(e){return t.node(e).rank}))),n=[];r.forEach(t.nodes(),(function(r){var i=t.node(r).rank-e;n[i]||(n[i]=[]),n[i].push(r)}));var i=0,a=t.graph().nodeRankFactor;r.forEach(n,(function(e,n){r.isUndefined(e)&&n%a!=0?--i:i&&r.forEach(e,(function(e){t.node(e).rank+=i}))}))},addBorderNode:function(t,e,n,r){var i={width:0,height:0};arguments.length>=4&&(i.rank=n,i.order=r);return a(t,"border",i,e)},maxRank:o,partition:function(t,e){var n={lhs:[],rhs:[]};return r.forEach(t,(function(t){e(t)?n.lhs.push(t):n.rhs.push(t)})),n},time:function(t,e){var n=r.now();try{return e()}finally{console.log(t+" time: "+(r.now()-n)+"ms")}},notime:function(t,e){return e()}}},function(t,e,n){var r;try{r={clone:n(169),constant:n(78),each:n(79),filter:n(111),has:n(85),isArray:n(4),isEmpty:n(246),isFunction:n(31),isUndefined:n(122),keys:n(25),map:n(123),reduce:n(125),size:n(249),transform:n(255),union:n(256),values:n(130)}}catch(t){}r||(r=window._),t.exports=r},function(t,e){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},function(t,e,n){var r=n(37);t.exports={isSubgraph:function(t,e){return!!t.children(e).length},edgeToId:function(t){return a(t.v)+":"+a(t.w)+":"+a(t.name)},applyStyle:function(t,e){e&&t.attr("style",e)},applyClass:function(t,e,n){e&&t.attr("class",e).attr("class",n+" "+t.attr("class"))},applyTransition:function(t,e){var n=e.graph();if(r.isPlainObject(n)){var i=n.transition;if(r.isFunction(i))return i(t)}return t}};var i=/:/g;function a(t){return t?String(t).replace(i,"\\:"):""}},function(t,e){var n,r,i=t.exports={};function a(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(t){if(n===setTimeout)return setTimeout(t,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:a}catch(t){n=a}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(t){r=o}}();var u,c=[],l=!1,f=-1;function h(){l&&u&&(l=!1,u.length?c=u.concat(c):f=-1,c.length&&d())}function d(){if(!l){var t=s(h);l=!0;for(var e=c.length;e;){for(u=c,c=[];++f<e;)u&&u[f].run();f=-1,e=c.length}u=null,l=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===o||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function p(t,e){this.fun=t,this.array=e}function y(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];c.push(new p(t,e)),1!==c.length||l||s(d)},p.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=y,i.addListener=y,i.once=y,i.off=y,i.removeListener=y,i.removeAllListeners=y,i.emit=y,i.prependListener=y,i.prependOnceListener=y,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t,e,n){var r=n(92),i="object"==typeof self&&self&&self.Object===Object&&self,a=r||i||Function("return this")();t.exports=a},function(t,e,n){var r;try{r=n(2)}catch(t){}r||(r=window.graphlib),t.exports=r},function(t,e){},function(t,e,n){(function(t){function n(t,e){for(var n=0,r=t.length-1;r>=0;r--){var i=t[r];"."===i?t.splice(r,1):".."===i?(t.splice(r,1),n++):n&&(t.splice(r,1),n--)}if(e)for(;n--;n)t.unshift("..");return t}function r(t,e){if(t.filter)return t.filter(e);for(var n=[],r=0;r<t.length;r++)e(t[r],r,t)&&n.push(t[r]);return n}e.resolve=function(){for(var e="",i=!1,a=arguments.length-1;a>=-1&&!i;a--){var o=a>=0?arguments[a]:t.cwd();if("string"!=typeof o)throw new TypeError("Arguments to path.resolve must be strings");o&&(e=o+"/"+e,i="/"===o.charAt(0))}return(i?"/":"")+(e=n(r(e.split("/"),(function(t){return!!t})),!i).join("/"))||"."},e.normalize=function(t){var a=e.isAbsolute(t),o="/"===i(t,-1);return(t=n(r(t.split("/"),(function(t){return!!t})),!a).join("/"))||a||(t="."),t&&o&&(t+="/"),(a?"/":"")+t},e.isAbsolute=function(t){return"/"===t.charAt(0)},e.join=function(){var t=Array.prototype.slice.call(arguments,0);return e.normalize(r(t,(function(t,e){if("string"!=typeof t)throw new TypeError("Arguments to path.join must be strings");return t})).join("/"))},e.relative=function(t,n){function r(t){for(var e=0;e<t.length&&""===t[e];e++);for(var n=t.length-1;n>=0&&""===t[n];n--);return e>n?[]:t.slice(e,n-e+1)}t=e.resolve(t).substr(1),n=e.resolve(n).substr(1);for(var i=r(t.split("/")),a=r(n.split("/")),o=Math.min(i.length,a.length),s=o,u=0;u<o;u++)if(i[u]!==a[u]){s=u;break}var c=[];for(u=s;u<i.length;u++)c.push("..");return(c=c.concat(a.slice(s))).join("/")},e.sep="/",e.delimiter=":",e.dirname=function(t){if("string"!=typeof t&&(t+=""),0===t.length)return".";for(var e=t.charCodeAt(0),n=47===e,r=-1,i=!0,a=t.length-1;a>=1;--a)if(47===(e=t.charCodeAt(a))){if(!i){r=a;break}}else i=!1;return-1===r?n?"/":".":n&&1===r?"/":t.slice(0,r)},e.basename=function(t,e){var n=function(t){"string"!=typeof t&&(t+="");var e,n=0,r=-1,i=!0;for(e=t.length-1;e>=0;--e)if(47===t.charCodeAt(e)){if(!i){n=e+1;break}}else-1===r&&(i=!1,r=e+1);return-1===r?"":t.slice(n,r)}(t);return e&&n.substr(-1*e.length)===e&&(n=n.substr(0,n.length-e.length)),n},e.extname=function(t){"string"!=typeof t&&(t+="");for(var e=-1,n=0,r=-1,i=!0,a=0,o=t.length-1;o>=0;--o){var s=t.charCodeAt(o);if(47!==s)-1===r&&(i=!1,r=o+1),46===s?-1===e?e=o:1!==a&&(a=1):-1!==e&&(a=-1);else if(!i){n=o+1;break}}return-1===e||-1===r||0===a||1===a&&e===r-1&&e===n+1?"":t.slice(e,r)};var i="b"==="ab".substr(-1)?function(t,e,n){return t.substr(e,n)}:function(t,e,n){return e<0&&(e=t.length+e),t.substr(e,n)}}).call(this,n(11))},function(t,e){t.exports=function(t){return null!=t&&"object"==typeof t}},function(t,e,n){(function(t,r){var i=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,2],n=[1,3],r=[1,4],i=[2,4],a=[1,9],o=[1,11],s=[1,13],u=[1,14],c=[1,15],l=[1,16],f=[1,21],h=[1,17],d=[1,18],p=[1,19],y=[1,20],g=[1,22],m=[1,4,5,13,14,16,18,19,21,22,23,24,25,28],v=[1,4,5,11,12,13,14,16,18,19,21,22,23,24,25,28],b=[4,5,13,14,16,18,19,21,22,23,24,25,28],x={trace:function(){},yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,idStatement:10,DESCR:11,"--\x3e":12,HIDE_EMPTY:13,scale:14,WIDTH:15,COMPOSIT_STATE:16,STRUCT_START:17,STRUCT_STOP:18,STATE_DESCR:19,AS:20,ID:21,FORK:22,JOIN:23,CONCURRENT:24,note:25,notePosition:26,NOTE_TEXT:27,EDGE_STATE:28,left_of:29,right_of:30,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",11:"DESCR",12:"--\x3e",13:"HIDE_EMPTY",14:"scale",15:"WIDTH",16:"COMPOSIT_STATE",17:"STRUCT_START",18:"STRUCT_STOP",19:"STATE_DESCR",20:"AS",21:"ID",22:"FORK",23:"JOIN",24:"CONCURRENT",25:"note",27:"NOTE_TEXT",28:"EDGE_STATE",29:"left_of",30:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,4],[9,4],[10,1],[10,1],[26,1],[26,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 3:return r.setRootDoc(a[s]),a[s];case 4:this.$=[];break;case 5:"nl"!=a[s]&&(a[s-1].push(a[s]),this.$=a[s-1]);break;case 6:case 7:this.$=a[s];break;case 8:this.$="nl";break;case 9:this.$={stmt:"state",id:a[s],type:"default",description:""};break;case 10:this.$={stmt:"state",id:a[s-1],type:"default",description:r.trimColon(a[s])};break;case 11:this.$={stmt:"relation",state1:{stmt:"state",id:a[s-2],type:"default",description:""},state2:{stmt:"state",id:a[s],type:"default",description:""}};break;case 12:this.$={stmt:"relation",state1:{stmt:"state",id:a[s-3],type:"default",description:""},state2:{stmt:"state",id:a[s-1],type:"default",description:""},description:a[s].substr(1).trim()};break;case 16:this.$={stmt:"state",id:a[s-3],type:"default",description:"",doc:a[s-1]};break;case 17:var u=a[s],c=a[s-2].trim();if(a[s].match(":")){var l=a[s].split(":");u=l[0],c=[c,l[1]]}this.$={stmt:"state",id:u,type:"default",description:c};break;case 18:this.$={stmt:"state",id:a[s-3],type:"default",description:a[s-5],doc:a[s-1]};break;case 19:this.$={stmt:"state",id:a[s],type:"fork"};break;case 20:this.$={stmt:"state",id:a[s],type:"join"};break;case 21:this.$={stmt:"state",id:r.getDividerId(),type:"divider"};break;case 22:this.$={stmt:"state",id:a[s-1].trim(),note:{position:a[s-2].trim(),text:a[s].trim()}};break;case 24:case 25:this.$=a[s]}},table:[{3:1,4:e,5:n,6:r},{1:[3]},{3:5,4:e,5:n,6:r},{3:6,4:e,5:n,6:r},t([1,4,5,13,14,16,19,21,22,23,24,25,28],i,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:a,5:o,8:8,9:10,10:12,13:s,14:u,16:c,19:l,21:f,22:h,23:d,24:p,25:y,28:g},t(m,[2,5]),{9:23,10:12,13:s,14:u,16:c,19:l,21:f,22:h,23:d,24:p,25:y,28:g},t(m,[2,7]),t(m,[2,8]),t(m,[2,9],{11:[1,24],12:[1,25]}),t(m,[2,13]),{15:[1,26]},t(m,[2,15],{17:[1,27]}),{20:[1,28]},t(m,[2,19]),t(m,[2,20]),t(m,[2,21]),{26:29,27:[1,30],29:[1,31],30:[1,32]},t(v,[2,24]),t(v,[2,25]),t(m,[2,6]),t(m,[2,10]),{10:33,21:f,28:g},t(m,[2,14]),t(b,i,{7:34}),{21:[1,35]},{21:[1,36]},{20:[1,37]},{21:[2,26]},{21:[2,27]},t(m,[2,11],{11:[1,38]}),{4:a,5:o,8:8,9:10,10:12,13:s,14:u,16:c,18:[1,39],19:l,21:f,22:h,23:d,24:p,25:y,28:g},t(m,[2,17],{17:[1,40]}),{27:[1,41]},{21:[1,42]},t(m,[2,12]),t(m,[2,16]),t(b,i,{7:43}),t(m,[2,22]),t(m,[2,23]),{4:a,5:o,8:8,9:10,10:12,13:s,14:u,16:c,18:[1,44],19:l,21:f,22:h,23:d,24:p,25:y,28:g},t(m,[2,18])],defaultActions:{5:[2,1],6:[2,2],31:[2,26],32:[2,27]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",u=0,c=0,l=0,f=2,h=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),y={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(y.yy[g]=this.yy[g]);p.setInput(t,y.yy),y.yy.lexer=p,y.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||h)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var x,_,w,k,E,A,T,S,M,O={};;){if(w=n[n.length-1],this.defaultActions[w]?k=this.defaultActions[w]:(null==x&&(x=b()),k=o[w]&&o[w][x]),void 0===k||!k.length||!k[0]){var N="";for(A in M=[],o[w])this.terminals_[A]&&A>f&&M.push("'"+this.terminals_[A]+"'");N=p.showPosition?"Parse error on line "+(u+1)+":\n"+p.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(u+1)+": Unexpected "+(x==h?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(N,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:m,expected:M})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),i.push(p.yytext),a.push(p.yylloc),n.push(k[1]),x=null,_?(x=_,_=null):(c=p.yyleng,s=p.yytext,u=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(T=this.productions_[k[1]][1],O.$=i[i.length-T],O._$={first_line:a[a.length-(T||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(T||1)].first_column,last_column:a[a.length-1].last_column},v&&(O._$.range=[a[a.length-(T||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(O,[s,c,u,y.yy,k[1],i,a].concat(d))))return E;T&&(n=n.slice(0,-1*T*2),i=i.slice(0,-1*T),a=a.slice(0,-1*T)),n.push(this.productions_[k[1]][0]),i.push(O.$),a.push(O._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}},_={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return 5;case 1:case 2:case 3:case 4:break;case 5:return this.pushState("SCALE"),14;case 6:return 15;case 7:this.popState();break;case 8:this.pushState("STATE");break;case 9:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),22;case 10:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),23;case 11:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),22;case 12:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),23;case 13:this.begin("STATE_STRING");break;case 14:return this.popState(),this.pushState("STATE_ID"),"AS";case 15:return this.popState(),"ID";case 16:this.popState();break;case 17:return"STATE_DESCR";case 18:return 16;case 19:this.popState();break;case 20:return this.popState(),this.pushState("struct"),17;case 21:return this.popState(),18;case 22:break;case 23:return this.begin("NOTE"),25;case 24:return this.popState(),this.pushState("NOTE_ID"),29;case 25:return this.popState(),this.pushState("NOTE_ID"),30;case 26:this.popState(),this.pushState("FLOATING_NOTE");break;case 27:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";case 28:break;case 29:return"NOTE_TEXT";case 30:return this.popState(),"ID";case 31:return this.popState(),this.pushState("NOTE_TEXT"),21;case 32:return this.popState(),e.yytext=e.yytext.substr(2).trim(),27;case 33:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),27;case 34:case 35:return 6;case 36:return 13;case 37:return 28;case 38:return 21;case 39:return e.yytext=e.yytext.trim(),11;case 40:return 12;case 41:return 24;case 42:return 5;case 43:return"INVALID"}},rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<<fork>>)/i,/^(?:.*<<join>>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:\s*[^:;]+end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[2,3],inclusive:!1},struct:{rules:[2,3,8,21,22,23,37,38,39,40,41],inclusive:!1},FLOATING_NOTE_ID:{rules:[30],inclusive:!1},FLOATING_NOTE:{rules:[27,28,29],inclusive:!1},NOTE_TEXT:{rules:[32,33],inclusive:!1},NOTE_ID:{rules:[31],inclusive:!1},NOTE:{rules:[24,25,26],inclusive:!1},SCALE:{rules:[6,7],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[15],inclusive:!1},STATE_STRING:{rules:[16,17],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[2,3,9,10,11,12,13,14,18,19,20],inclusive:!1},ID:{rules:[2,3],inclusive:!1},INITIAL:{rules:[0,1,3,4,5,8,20,23,34,35,36,37,38,39,40,42,43],inclusive:!0}}};function w(){this.yy={}}return x.lexer=_,w.prototype=x,x.Parser=w,new w}();e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(r){r[1]||(console.log("Usage: "+r[0]+" FILE"),t.exit(1));var i=n(14).readFileSync(n(15).normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n(11),n(6)(t))},function(t,e,n){(function(t){t.exports=function(){"use strict";var e,r;function i(){return e.apply(null,arguments)}function a(t){return t instanceof Array||"[object Array]"===Object.prototype.toString.call(t)}function o(t){return null!=t&&"[object Object]"===Object.prototype.toString.call(t)}function s(t){return void 0===t}function u(t){return"number"==typeof t||"[object Number]"===Object.prototype.toString.call(t)}function c(t){return t instanceof Date||"[object Date]"===Object.prototype.toString.call(t)}function l(t,e){var n,r=[];for(n=0;n<t.length;++n)r.push(e(t[n],n));return r}function f(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function h(t,e){for(var n in e)f(e,n)&&(t[n]=e[n]);return f(e,"toString")&&(t.toString=e.toString),f(e,"valueOf")&&(t.valueOf=e.valueOf),t}function d(t,e,n,r){return be(t,e,n,r,!0).utc()}function p(t){return null==t._pf&&(t._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1}),t._pf}function y(t){if(null==t._isValid){var e=p(t),n=r.call(e.parsedDateParts,(function(t){return null!=t})),i=!isNaN(t._d.getTime())&&e.overflow<0&&!e.empty&&!e.invalidMonth&&!e.invalidWeekday&&!e.weekdayMismatch&&!e.nullInput&&!e.invalidFormat&&!e.userInvalidated&&(!e.meridiem||e.meridiem&&n);if(t._strict&&(i=i&&0===e.charsLeftOver&&0===e.unusedTokens.length&&void 0===e.bigHour),null!=Object.isFrozen&&Object.isFrozen(t))return i;t._isValid=i}return t._isValid}function g(t){var e=d(NaN);return null!=t?h(p(e),t):p(e).userInvalidated=!0,e}r=Array.prototype.some?Array.prototype.some:function(t){for(var e=Object(this),n=e.length>>>0,r=0;r<n;r++)if(r in e&&t.call(this,e[r],r,e))return!0;return!1};var m=i.momentProperties=[];function v(t,e){var n,r,i;if(s(e._isAMomentObject)||(t._isAMomentObject=e._isAMomentObject),s(e._i)||(t._i=e._i),s(e._f)||(t._f=e._f),s(e._l)||(t._l=e._l),s(e._strict)||(t._strict=e._strict),s(e._tzm)||(t._tzm=e._tzm),s(e._isUTC)||(t._isUTC=e._isUTC),s(e._offset)||(t._offset=e._offset),s(e._pf)||(t._pf=p(e)),s(e._locale)||(t._locale=e._locale),0<m.length)for(n=0;n<m.length;n++)s(i=e[r=m[n]])||(t[r]=i);return t}var b=!1;function x(t){v(this,t),this._d=new Date(null!=t._d?t._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===b&&(b=!0,i.updateOffset(this),b=!1)}function _(t){return t instanceof x||null!=t&&null!=t._isAMomentObject}function w(t){return t<0?Math.ceil(t)||0:Math.floor(t)}function k(t){var e=+t,n=0;return 0!==e&&isFinite(e)&&(n=w(e)),n}function E(t,e,n){var r,i=Math.min(t.length,e.length),a=Math.abs(t.length-e.length),o=0;for(r=0;r<i;r++)(n&&t[r]!==e[r]||!n&&k(t[r])!==k(e[r]))&&o++;return o+a}function A(t){!1===i.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+t)}function T(t,e){var n=!0;return h((function(){if(null!=i.deprecationHandler&&i.deprecationHandler(null,t),n){for(var r,a=[],o=0;o<arguments.length;o++){if(r="","object"==typeof arguments[o]){for(var s in r+="\n["+o+"] ",arguments[0])r+=s+": "+arguments[0][s]+", ";r=r.slice(0,-2)}else r=arguments[o];a.push(r)}A(t+"\nArguments: "+Array.prototype.slice.call(a).join("")+"\n"+(new Error).stack),n=!1}return e.apply(this,arguments)}),e)}var S,M={};function O(t,e){null!=i.deprecationHandler&&i.deprecationHandler(t,e),M[t]||(A(e),M[t]=!0)}function N(t){return t instanceof Function||"[object Function]"===Object.prototype.toString.call(t)}function C(t,e){var n,r=h({},t);for(n in e)f(e,n)&&(o(t[n])&&o(e[n])?(r[n]={},h(r[n],t[n]),h(r[n],e[n])):null!=e[n]?r[n]=e[n]:delete r[n]);for(n in t)f(t,n)&&!f(e,n)&&o(t[n])&&(r[n]=h({},r[n]));return r}function D(t){null!=t&&this.set(t)}i.suppressDeprecationWarnings=!1,i.deprecationHandler=null,S=Object.keys?Object.keys:function(t){var e,n=[];for(e in t)f(t,e)&&n.push(e);return n};var L={};function F(t,e){var n=t.toLowerCase();L[n]=L[n+"s"]=L[e]=t}function I(t){return"string"==typeof t?L[t]||L[t.toLowerCase()]:void 0}function P(t){var e,n,r={};for(n in t)f(t,n)&&(e=I(n))&&(r[e]=t[n]);return r}var R={};function B(t,e){R[t]=e}function j(t,e,n){var r=""+Math.abs(t),i=e-r.length;return(0<=t?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var Y=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,z=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,U={},$={};function G(t,e,n,r){var i=r;"string"==typeof r&&(i=function(){return this[r]()}),t&&($[t]=i),e&&($[e[0]]=function(){return j(i.apply(this,arguments),e[1],e[2])}),n&&($[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),t)})}function V(t,e){return t.isValid()?(e=H(e,t.localeData()),U[e]=U[e]||function(t){var e,n,r,i=t.match(Y);for(e=0,n=i.length;e<n;e++)$[i[e]]?i[e]=$[i[e]]:i[e]=(r=i[e]).match(/\[[\s\S]/)?r.replace(/^\[|\]$/g,""):r.replace(/\\/g,"");return function(e){var r,a="";for(r=0;r<n;r++)a+=N(i[r])?i[r].call(e,t):i[r];return a}}(e),U[e](t)):t.localeData().invalidDate()}function H(t,e){var n=5;function r(t){return e.longDateFormat(t)||t}for(z.lastIndex=0;0<=n&&z.test(t);)t=t.replace(z,r),z.lastIndex=0,n-=1;return t}var W=/\d/,q=/\d\d/,X=/\d{3}/,Z=/\d{4}/,J=/[+-]?\d{6}/,Q=/\d\d?/,K=/\d\d\d\d?/,tt=/\d\d\d\d\d\d?/,et=/\d{1,3}/,nt=/\d{1,4}/,rt=/[+-]?\d{1,6}/,it=/\d+/,at=/[+-]?\d+/,ot=/Z|[+-]\d\d:?\d\d/gi,st=/Z|[+-]\d\d(?::?\d\d)?/gi,ut=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,ct={};function lt(t,e,n){ct[t]=N(e)?e:function(t,r){return t&&n?n:e}}function ft(t,e){return f(ct,t)?ct[t](e._strict,e._locale):new RegExp(ht(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(t,e,n,r,i){return e||n||r||i}))))}function ht(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var dt={};function pt(t,e){var n,r=e;for("string"==typeof t&&(t=[t]),u(e)&&(r=function(t,n){n[e]=k(t)}),n=0;n<t.length;n++)dt[t[n]]=r}function yt(t,e){pt(t,(function(t,n,r,i){r._w=r._w||{},e(t,r._w,r,i)}))}function gt(t){return mt(t)?366:365}function mt(t){return t%4==0&&t%100!=0||t%400==0}G("Y",0,0,(function(){var t=this.year();return t<=9999?""+t:"+"+t})),G(0,["YY",2],0,(function(){return this.year()%100})),G(0,["YYYY",4],0,"year"),G(0,["YYYYY",5],0,"year"),G(0,["YYYYYY",6,!0],0,"year"),F("year","y"),B("year",1),lt("Y",at),lt("YY",Q,q),lt("YYYY",nt,Z),lt("YYYYY",rt,J),lt("YYYYYY",rt,J),pt(["YYYYY","YYYYYY"],0),pt("YYYY",(function(t,e){e[0]=2===t.length?i.parseTwoDigitYear(t):k(t)})),pt("YY",(function(t,e){e[0]=i.parseTwoDigitYear(t)})),pt("Y",(function(t,e){e[0]=parseInt(t,10)})),i.parseTwoDigitYear=function(t){return k(t)+(68<k(t)?1900:2e3)};var vt,bt=xt("FullYear",!0);function xt(t,e){return function(n){return null!=n?(wt(this,t,n),i.updateOffset(this,e),this):_t(this,t)}}function _t(t,e){return t.isValid()?t._d["get"+(t._isUTC?"UTC":"")+e]():NaN}function wt(t,e,n){t.isValid()&&!isNaN(n)&&("FullYear"===e&&mt(t.year())&&1===t.month()&&29===t.date()?t._d["set"+(t._isUTC?"UTC":"")+e](n,t.month(),kt(n,t.month())):t._d["set"+(t._isUTC?"UTC":"")+e](n))}function kt(t,e){if(isNaN(t)||isNaN(e))return NaN;var n=(e%12+12)%12;return t+=(e-n)/12,1===n?mt(t)?29:28:31-n%7%2}vt=Array.prototype.indexOf?Array.prototype.indexOf:function(t){var e;for(e=0;e<this.length;++e)if(this[e]===t)return e;return-1},G("M",["MM",2],"Mo",(function(){return this.month()+1})),G("MMM",0,0,(function(t){return this.localeData().monthsShort(this,t)})),G("MMMM",0,0,(function(t){return this.localeData().months(this,t)})),F("month","M"),B("month",8),lt("M",Q),lt("MM",Q,q),lt("MMM",(function(t,e){return e.monthsShortRegex(t)})),lt("MMMM",(function(t,e){return e.monthsRegex(t)})),pt(["M","MM"],(function(t,e){e[1]=k(t)-1})),pt(["MMM","MMMM"],(function(t,e,n,r){var i=n._locale.monthsParse(t,r,n._strict);null!=i?e[1]=i:p(n).invalidMonth=t}));var Et=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,At="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Tt="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_");function St(t,e){var n;if(!t.isValid())return t;if("string"==typeof e)if(/^\d+$/.test(e))e=k(e);else if(!u(e=t.localeData().monthsParse(e)))return t;return n=Math.min(t.date(),kt(t.year(),e)),t._d["set"+(t._isUTC?"UTC":"")+"Month"](e,n),t}function Mt(t){return null!=t?(St(this,t),i.updateOffset(this,!0),this):_t(this,"Month")}var Ot=ut,Nt=ut;function Ct(){function t(t,e){return e.length-t.length}var e,n,r=[],i=[],a=[];for(e=0;e<12;e++)n=d([2e3,e]),r.push(this.monthsShort(n,"")),i.push(this.months(n,"")),a.push(this.months(n,"")),a.push(this.monthsShort(n,""));for(r.sort(t),i.sort(t),a.sort(t),e=0;e<12;e++)r[e]=ht(r[e]),i[e]=ht(i[e]);for(e=0;e<24;e++)a[e]=ht(a[e]);this._monthsRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+r.join("|")+")","i")}function Dt(t){var e;if(t<100&&0<=t){var n=Array.prototype.slice.call(arguments);n[0]=t+400,e=new Date(Date.UTC.apply(null,n)),isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t)}else e=new Date(Date.UTC.apply(null,arguments));return e}function Lt(t,e,n){var r=7+e-n;return-(7+Dt(t,0,r).getUTCDay()-e)%7+r-1}function Ft(t,e,n,r,i){var a,o,s=1+7*(e-1)+(7+n-r)%7+Lt(t,r,i);return o=s<=0?gt(a=t-1)+s:s>gt(t)?(a=t+1,s-gt(t)):(a=t,s),{year:a,dayOfYear:o}}function It(t,e,n){var r,i,a=Lt(t.year(),e,n),o=Math.floor((t.dayOfYear()-a-1)/7)+1;return o<1?r=o+Pt(i=t.year()-1,e,n):o>Pt(t.year(),e,n)?(r=o-Pt(t.year(),e,n),i=t.year()+1):(i=t.year(),r=o),{week:r,year:i}}function Pt(t,e,n){var r=Lt(t,e,n),i=Lt(t+1,e,n);return(gt(t)-r+i)/7}function Rt(t,e){return t.slice(e,7).concat(t.slice(0,e))}G("w",["ww",2],"wo","week"),G("W",["WW",2],"Wo","isoWeek"),F("week","w"),F("isoWeek","W"),B("week",5),B("isoWeek",5),lt("w",Q),lt("ww",Q,q),lt("W",Q),lt("WW",Q,q),yt(["w","ww","W","WW"],(function(t,e,n,r){e[r.substr(0,1)]=k(t)})),G("d",0,"do","day"),G("dd",0,0,(function(t){return this.localeData().weekdaysMin(this,t)})),G("ddd",0,0,(function(t){return this.localeData().weekdaysShort(this,t)})),G("dddd",0,0,(function(t){return this.localeData().weekdays(this,t)})),G("e",0,0,"weekday"),G("E",0,0,"isoWeekday"),F("day","d"),F("weekday","e"),F("isoWeekday","E"),B("day",11),B("weekday",11),B("isoWeekday",11),lt("d",Q),lt("e",Q),lt("E",Q),lt("dd",(function(t,e){return e.weekdaysMinRegex(t)})),lt("ddd",(function(t,e){return e.weekdaysShortRegex(t)})),lt("dddd",(function(t,e){return e.weekdaysRegex(t)})),yt(["dd","ddd","dddd"],(function(t,e,n,r){var i=n._locale.weekdaysParse(t,r,n._strict);null!=i?e.d=i:p(n).invalidWeekday=t})),yt(["d","e","E"],(function(t,e,n,r){e[r]=k(t)}));var Bt="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),jt="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Yt="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),zt=ut,Ut=ut,$t=ut;function Gt(){function t(t,e){return e.length-t.length}var e,n,r,i,a,o=[],s=[],u=[],c=[];for(e=0;e<7;e++)n=d([2e3,1]).day(e),r=this.weekdaysMin(n,""),i=this.weekdaysShort(n,""),a=this.weekdays(n,""),o.push(r),s.push(i),u.push(a),c.push(r),c.push(i),c.push(a);for(o.sort(t),s.sort(t),u.sort(t),c.sort(t),e=0;e<7;e++)s[e]=ht(s[e]),u[e]=ht(u[e]),c[e]=ht(c[e]);this._weekdaysRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+o.join("|")+")","i")}function Vt(){return this.hours()%12||12}function Ht(t,e){G(t,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)}))}function Wt(t,e){return e._meridiemParse}G("H",["HH",2],0,"hour"),G("h",["hh",2],0,Vt),G("k",["kk",2],0,(function(){return this.hours()||24})),G("hmm",0,0,(function(){return""+Vt.apply(this)+j(this.minutes(),2)})),G("hmmss",0,0,(function(){return""+Vt.apply(this)+j(this.minutes(),2)+j(this.seconds(),2)})),G("Hmm",0,0,(function(){return""+this.hours()+j(this.minutes(),2)})),G("Hmmss",0,0,(function(){return""+this.hours()+j(this.minutes(),2)+j(this.seconds(),2)})),Ht("a",!0),Ht("A",!1),F("hour","h"),B("hour",13),lt("a",Wt),lt("A",Wt),lt("H",Q),lt("h",Q),lt("k",Q),lt("HH",Q,q),lt("hh",Q,q),lt("kk",Q,q),lt("hmm",K),lt("hmmss",tt),lt("Hmm",K),lt("Hmmss",tt),pt(["H","HH"],3),pt(["k","kk"],(function(t,e,n){var r=k(t);e[3]=24===r?0:r})),pt(["a","A"],(function(t,e,n){n._isPm=n._locale.isPM(t),n._meridiem=t})),pt(["h","hh"],(function(t,e,n){e[3]=k(t),p(n).bigHour=!0})),pt("hmm",(function(t,e,n){var r=t.length-2;e[3]=k(t.substr(0,r)),e[4]=k(t.substr(r)),p(n).bigHour=!0})),pt("hmmss",(function(t,e,n){var r=t.length-4,i=t.length-2;e[3]=k(t.substr(0,r)),e[4]=k(t.substr(r,2)),e[5]=k(t.substr(i)),p(n).bigHour=!0})),pt("Hmm",(function(t,e,n){var r=t.length-2;e[3]=k(t.substr(0,r)),e[4]=k(t.substr(r))})),pt("Hmmss",(function(t,e,n){var r=t.length-4,i=t.length-2;e[3]=k(t.substr(0,r)),e[4]=k(t.substr(r,2)),e[5]=k(t.substr(i))}));var qt,Xt=xt("Hours",!0),Zt={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:At,monthsShort:Tt,week:{dow:0,doy:6},weekdays:Bt,weekdaysMin:Yt,weekdaysShort:jt,meridiemParse:/[ap]\.?m?\.?/i},Jt={},Qt={};function Kt(t){return t?t.toLowerCase().replace("_","-"):t}function te(e){var r=null;if(!Jt[e]&&void 0!==t&&t&&t.exports)try{r=qt._abbr,n(167)("./"+e),ee(r)}catch(e){}return Jt[e]}function ee(t,e){var n;return t&&((n=s(e)?re(t):ne(t,e))?qt=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+t+" not found. Did you forget to load it?")),qt._abbr}function ne(t,e){if(null===e)return delete Jt[t],null;var n,r=Zt;if(e.abbr=t,null!=Jt[t])O("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=Jt[t]._config;else if(null!=e.parentLocale)if(null!=Jt[e.parentLocale])r=Jt[e.parentLocale]._config;else{if(null==(n=te(e.parentLocale)))return Qt[e.parentLocale]||(Qt[e.parentLocale]=[]),Qt[e.parentLocale].push({name:t,config:e}),null;r=n._config}return Jt[t]=new D(C(r,e)),Qt[t]&&Qt[t].forEach((function(t){ne(t.name,t.config)})),ee(t),Jt[t]}function re(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return qt;if(!a(t)){if(e=te(t))return e;t=[t]}return function(t){for(var e,n,r,i,a=0;a<t.length;){for(e=(i=Kt(t[a]).split("-")).length,n=(n=Kt(t[a+1]))?n.split("-"):null;0<e;){if(r=te(i.slice(0,e).join("-")))return r;if(n&&n.length>=e&&E(i,n,!0)>=e-1)break;e--}a++}return qt}(t)}function ie(t){var e,n=t._a;return n&&-2===p(t).overflow&&(e=n[1]<0||11<n[1]?1:n[2]<1||n[2]>kt(n[0],n[1])?2:n[3]<0||24<n[3]||24===n[3]&&(0!==n[4]||0!==n[5]||0!==n[6])?3:n[4]<0||59<n[4]?4:n[5]<0||59<n[5]?5:n[6]<0||999<n[6]?6:-1,p(t)._overflowDayOfYear&&(e<0||2<e)&&(e=2),p(t)._overflowWeeks&&-1===e&&(e=7),p(t)._overflowWeekday&&-1===e&&(e=8),p(t).overflow=e),t}function ae(t,e,n){return null!=t?t:null!=e?e:n}function oe(t){var e,n,r,a,o,s=[];if(!t._d){var u,c;for(u=t,c=new Date(i.now()),r=u._useUTC?[c.getUTCFullYear(),c.getUTCMonth(),c.getUTCDate()]:[c.getFullYear(),c.getMonth(),c.getDate()],t._w&&null==t._a[2]&&null==t._a[1]&&function(t){var e,n,r,i,a,o,s,u;if(null!=(e=t._w).GG||null!=e.W||null!=e.E)a=1,o=4,n=ae(e.GG,t._a[0],It(xe(),1,4).year),r=ae(e.W,1),((i=ae(e.E,1))<1||7<i)&&(u=!0);else{a=t._locale._week.dow,o=t._locale._week.doy;var c=It(xe(),a,o);n=ae(e.gg,t._a[0],c.year),r=ae(e.w,c.week),null!=e.d?((i=e.d)<0||6<i)&&(u=!0):null!=e.e?(i=e.e+a,(e.e<0||6<e.e)&&(u=!0)):i=a}r<1||r>Pt(n,a,o)?p(t)._overflowWeeks=!0:null!=u?p(t)._overflowWeekday=!0:(s=Ft(n,r,i,a,o),t._a[0]=s.year,t._dayOfYear=s.dayOfYear)}(t),null!=t._dayOfYear&&(o=ae(t._a[0],r[0]),(t._dayOfYear>gt(o)||0===t._dayOfYear)&&(p(t)._overflowDayOfYear=!0),n=Dt(o,0,t._dayOfYear),t._a[1]=n.getUTCMonth(),t._a[2]=n.getUTCDate()),e=0;e<3&&null==t._a[e];++e)t._a[e]=s[e]=r[e];for(;e<7;e++)t._a[e]=s[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[3]&&0===t._a[4]&&0===t._a[5]&&0===t._a[6]&&(t._nextDay=!0,t._a[3]=0),t._d=(t._useUTC?Dt:function(t,e,n,r,i,a,o){var s;return t<100&&0<=t?(s=new Date(t+400,e,n,r,i,a,o),isFinite(s.getFullYear())&&s.setFullYear(t)):s=new Date(t,e,n,r,i,a,o),s}).apply(null,s),a=t._useUTC?t._d.getUTCDay():t._d.getDay(),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[3]=24),t._w&&void 0!==t._w.d&&t._w.d!==a&&(p(t).weekdayMismatch=!0)}}var se=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ue=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ce=/Z|[+-]\d\d(?::?\d\d)?/,le=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],fe=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],he=/^\/?Date\((\-?\d+)/i;function de(t){var e,n,r,i,a,o,s=t._i,u=se.exec(s)||ue.exec(s);if(u){for(p(t).iso=!0,e=0,n=le.length;e<n;e++)if(le[e][1].exec(u[1])){i=le[e][0],r=!1!==le[e][2];break}if(null==i)return void(t._isValid=!1);if(u[3]){for(e=0,n=fe.length;e<n;e++)if(fe[e][1].exec(u[3])){a=(u[2]||" ")+fe[e][0];break}if(null==a)return void(t._isValid=!1)}if(!r&&null!=a)return void(t._isValid=!1);if(u[4]){if(!ce.exec(u[4]))return void(t._isValid=!1);o="Z"}t._f=i+(a||"")+(o||""),me(t)}else t._isValid=!1}var pe=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,ye={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function ge(t){var e,n,r,i=pe.exec(t._i.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));if(i){var a=function(t,e,n,r,i,a){var o=[function(t){var e=parseInt(t,10);return e<=49?2e3+e:e<=999?1900+e:e}(t),Tt.indexOf(e),parseInt(n,10),parseInt(r,10),parseInt(i,10)];return a&&o.push(parseInt(a,10)),o}(i[4],i[3],i[2],i[5],i[6],i[7]);if(n=a,r=t,(e=i[1])&&jt.indexOf(e)!==new Date(n[0],n[1],n[2]).getDay()&&(p(r).weekdayMismatch=!0,!(r._isValid=!1)))return;t._a=a,t._tzm=function(t,e,n){if(t)return ye[t];if(e)return 0;var r=parseInt(n,10),i=r%100;return(r-i)/100*60+i}(i[8],i[9],i[10]),t._d=Dt.apply(null,t._a),t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),p(t).rfc2822=!0}else t._isValid=!1}function me(t){if(t._f!==i.ISO_8601)if(t._f!==i.RFC_2822){t._a=[],p(t).empty=!0;var e,n,r,a,o,s,u,c,l=""+t._i,h=l.length,d=0;for(r=H(t._f,t._locale).match(Y)||[],e=0;e<r.length;e++)a=r[e],(n=(l.match(ft(a,t))||[])[0])&&(0<(o=l.substr(0,l.indexOf(n))).length&&p(t).unusedInput.push(o),l=l.slice(l.indexOf(n)+n.length),d+=n.length),$[a]?(n?p(t).empty=!1:p(t).unusedTokens.push(a),s=a,c=t,null!=(u=n)&&f(dt,s)&&dt[s](u,c._a,c,s)):t._strict&&!n&&p(t).unusedTokens.push(a);p(t).charsLeftOver=h-d,0<l.length&&p(t).unusedInput.push(l),t._a[3]<=12&&!0===p(t).bigHour&&0<t._a[3]&&(p(t).bigHour=void 0),p(t).parsedDateParts=t._a.slice(0),p(t).meridiem=t._meridiem,t._a[3]=function(t,e,n){var r;return null==n?e:null!=t.meridiemHour?t.meridiemHour(e,n):(null!=t.isPM&&((r=t.isPM(n))&&e<12&&(e+=12),r||12!==e||(e=0)),e)}(t._locale,t._a[3],t._meridiem),oe(t),ie(t)}else ge(t);else de(t)}function ve(t){var e,n,r,f,d=t._i,m=t._f;return t._locale=t._locale||re(t._l),null===d||void 0===m&&""===d?g({nullInput:!0}):("string"==typeof d&&(t._i=d=t._locale.preparse(d)),_(d)?new x(ie(d)):(c(d)?t._d=d:a(m)?function(t){var e,n,r,i,a;if(0===t._f.length)return p(t).invalidFormat=!0,t._d=new Date(NaN);for(i=0;i<t._f.length;i++)a=0,e=v({},t),null!=t._useUTC&&(e._useUTC=t._useUTC),e._f=t._f[i],me(e),y(e)&&(a+=p(e).charsLeftOver,a+=10*p(e).unusedTokens.length,p(e).score=a,(null==r||a<r)&&(r=a,n=e));h(t,n||e)}(t):m?me(t):s(n=(e=t)._i)?e._d=new Date(i.now()):c(n)?e._d=new Date(n.valueOf()):"string"==typeof n?(r=e,null===(f=he.exec(r._i))?(de(r),!1===r._isValid&&(delete r._isValid,ge(r),!1===r._isValid&&(delete r._isValid,i.createFromInputFallback(r)))):r._d=new Date(+f[1])):a(n)?(e._a=l(n.slice(0),(function(t){return parseInt(t,10)})),oe(e)):o(n)?function(t){if(!t._d){var e=P(t._i);t._a=l([e.year,e.month,e.day||e.date,e.hour,e.minute,e.second,e.millisecond],(function(t){return t&&parseInt(t,10)})),oe(t)}}(e):u(n)?e._d=new Date(n):i.createFromInputFallback(e),y(t)||(t._d=null),t))}function be(t,e,n,r,i){var s,u={};return!0!==n&&!1!==n||(r=n,n=void 0),(o(t)&&function(t){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(t).length;var e;for(e in t)if(t.hasOwnProperty(e))return!1;return!0}(t)||a(t)&&0===t.length)&&(t=void 0),u._isAMomentObject=!0,u._useUTC=u._isUTC=i,u._l=n,u._i=t,u._f=e,u._strict=r,(s=new x(ie(ve(u))))._nextDay&&(s.add(1,"d"),s._nextDay=void 0),s}function xe(t,e,n,r){return be(t,e,n,r,!1)}i.createFromInputFallback=T("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",(function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))})),i.ISO_8601=function(){},i.RFC_2822=function(){};var _e=T("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var t=xe.apply(null,arguments);return this.isValid()&&t.isValid()?t<this?this:t:g()})),we=T("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var t=xe.apply(null,arguments);return this.isValid()&&t.isValid()?this<t?this:t:g()}));function ke(t,e){var n,r;if(1===e.length&&a(e[0])&&(e=e[0]),!e.length)return xe();for(n=e[0],r=1;r<e.length;++r)e[r].isValid()&&!e[r][t](n)||(n=e[r]);return n}var Ee=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Ae(t){var e=P(t),n=e.year||0,r=e.quarter||0,i=e.month||0,a=e.week||e.isoWeek||0,o=e.day||0,s=e.hour||0,u=e.minute||0,c=e.second||0,l=e.millisecond||0;this._isValid=function(t){for(var e in t)if(-1===vt.call(Ee,e)||null!=t[e]&&isNaN(t[e]))return!1;for(var n=!1,r=0;r<Ee.length;++r)if(t[Ee[r]]){if(n)return!1;parseFloat(t[Ee[r]])!==k(t[Ee[r]])&&(n=!0)}return!0}(e),this._milliseconds=+l+1e3*c+6e4*u+1e3*s*60*60,this._days=+o+7*a,this._months=+i+3*r+12*n,this._data={},this._locale=re(),this._bubble()}function Te(t){return t instanceof Ae}function Se(t){return t<0?-1*Math.round(-1*t):Math.round(t)}function Me(t,e){G(t,0,0,(function(){var t=this.utcOffset(),n="+";return t<0&&(t=-t,n="-"),n+j(~~(t/60),2)+e+j(~~t%60,2)}))}Me("Z",":"),Me("ZZ",""),lt("Z",st),lt("ZZ",st),pt(["Z","ZZ"],(function(t,e,n){n._useUTC=!0,n._tzm=Ne(st,t)}));var Oe=/([\+\-]|\d\d)/gi;function Ne(t,e){var n=(e||"").match(t);if(null===n)return null;var r=((n[n.length-1]||[])+"").match(Oe)||["-",0,0],i=60*r[1]+k(r[2]);return 0===i?0:"+"===r[0]?i:-i}function Ce(t,e){var n,r;return e._isUTC?(n=e.clone(),r=(_(t)||c(t)?t.valueOf():xe(t).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),i.updateOffset(n,!1),n):xe(t).local()}function De(t){return 15*-Math.round(t._d.getTimezoneOffset()/15)}function Le(){return!!this.isValid()&&this._isUTC&&0===this._offset}i.updateOffset=function(){};var Fe=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,Ie=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Pe(t,e){var n,r,i,a=t,o=null;return Te(t)?a={ms:t._milliseconds,d:t._days,M:t._months}:u(t)?(a={},e?a[e]=t:a.milliseconds=t):(o=Fe.exec(t))?(n="-"===o[1]?-1:1,a={y:0,d:k(o[2])*n,h:k(o[3])*n,m:k(o[4])*n,s:k(o[5])*n,ms:k(Se(1e3*o[6]))*n}):(o=Ie.exec(t))?(n="-"===o[1]?-1:1,a={y:Re(o[2],n),M:Re(o[3],n),w:Re(o[4],n),d:Re(o[5],n),h:Re(o[6],n),m:Re(o[7],n),s:Re(o[8],n)}):null==a?a={}:"object"==typeof a&&("from"in a||"to"in a)&&(i=function(t,e){var n;return t.isValid()&&e.isValid()?(e=Ce(e,t),t.isBefore(e)?n=Be(t,e):((n=Be(e,t)).milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}(xe(a.from),xe(a.to)),(a={}).ms=i.milliseconds,a.M=i.months),r=new Ae(a),Te(t)&&f(t,"_locale")&&(r._locale=t._locale),r}function Re(t,e){var n=t&&parseFloat(t.replace(",","."));return(isNaN(n)?0:n)*e}function Be(t,e){var n={};return n.months=e.month()-t.month()+12*(e.year()-t.year()),t.clone().add(n.months,"M").isAfter(e)&&--n.months,n.milliseconds=+e-+t.clone().add(n.months,"M"),n}function je(t,e){return function(n,r){var i;return null===r||isNaN(+r)||(O(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),i=n,n=r,r=i),Ye(this,Pe(n="string"==typeof n?+n:n,r),t),this}}function Ye(t,e,n,r){var a=e._milliseconds,o=Se(e._days),s=Se(e._months);t.isValid()&&(r=null==r||r,s&&St(t,_t(t,"Month")+s*n),o&&wt(t,"Date",_t(t,"Date")+o*n),a&&t._d.setTime(t._d.valueOf()+a*n),r&&i.updateOffset(t,o||s))}Pe.fn=Ae.prototype,Pe.invalid=function(){return Pe(NaN)};var ze=je(1,"add"),Ue=je(-1,"subtract");function $e(t,e){var n=12*(e.year()-t.year())+(e.month()-t.month()),r=t.clone().add(n,"months");return-(n+(e-r<0?(e-r)/(r-t.clone().add(n-1,"months")):(e-r)/(t.clone().add(n+1,"months")-r)))||0}function Ge(t){var e;return void 0===t?this._locale._abbr:(null!=(e=re(t))&&(this._locale=e),this)}i.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",i.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var Ve=T("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(t){return void 0===t?this.localeData():this.locale(t)}));function He(){return this._locale}var We=126227808e5;function qe(t,e){return(t%e+e)%e}function Xe(t,e,n){return t<100&&0<=t?new Date(t+400,e,n)-We:new Date(t,e,n).valueOf()}function Ze(t,e,n){return t<100&&0<=t?Date.UTC(t+400,e,n)-We:Date.UTC(t,e,n)}function Je(t,e){G(0,[t,t.length],0,e)}function Qe(t,e,n,r,i){var a;return null==t?It(this,r,i).year:((a=Pt(t,r,i))<e&&(e=a),function(t,e,n,r,i){var a=Ft(t,e,n,r,i),o=Dt(a.year,0,a.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}.call(this,t,e,n,r,i))}G(0,["gg",2],0,(function(){return this.weekYear()%100})),G(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),Je("gggg","weekYear"),Je("ggggg","weekYear"),Je("GGGG","isoWeekYear"),Je("GGGGG","isoWeekYear"),F("weekYear","gg"),F("isoWeekYear","GG"),B("weekYear",1),B("isoWeekYear",1),lt("G",at),lt("g",at),lt("GG",Q,q),lt("gg",Q,q),lt("GGGG",nt,Z),lt("gggg",nt,Z),lt("GGGGG",rt,J),lt("ggggg",rt,J),yt(["gggg","ggggg","GGGG","GGGGG"],(function(t,e,n,r){e[r.substr(0,2)]=k(t)})),yt(["gg","GG"],(function(t,e,n,r){e[r]=i.parseTwoDigitYear(t)})),G("Q",0,"Qo","quarter"),F("quarter","Q"),B("quarter",7),lt("Q",W),pt("Q",(function(t,e){e[1]=3*(k(t)-1)})),G("D",["DD",2],"Do","date"),F("date","D"),B("date",9),lt("D",Q),lt("DD",Q,q),lt("Do",(function(t,e){return t?e._dayOfMonthOrdinalParse||e._ordinalParse:e._dayOfMonthOrdinalParseLenient})),pt(["D","DD"],2),pt("Do",(function(t,e){e[2]=k(t.match(Q)[0])}));var Ke=xt("Date",!0);G("DDD",["DDDD",3],"DDDo","dayOfYear"),F("dayOfYear","DDD"),B("dayOfYear",4),lt("DDD",et),lt("DDDD",X),pt(["DDD","DDDD"],(function(t,e,n){n._dayOfYear=k(t)})),G("m",["mm",2],0,"minute"),F("minute","m"),B("minute",14),lt("m",Q),lt("mm",Q,q),pt(["m","mm"],4);var tn=xt("Minutes",!1);G("s",["ss",2],0,"second"),F("second","s"),B("second",15),lt("s",Q),lt("ss",Q,q),pt(["s","ss"],5);var en,nn=xt("Seconds",!1);for(G("S",0,0,(function(){return~~(this.millisecond()/100)})),G(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),G(0,["SSS",3],0,"millisecond"),G(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),G(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),G(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),G(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),G(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),G(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),F("millisecond","ms"),B("millisecond",16),lt("S",et,W),lt("SS",et,q),lt("SSS",et,X),en="SSSS";en.length<=9;en+="S")lt(en,it);function rn(t,e){e[6]=k(1e3*("0."+t))}for(en="S";en.length<=9;en+="S")pt(en,rn);var an=xt("Milliseconds",!1);G("z",0,0,"zoneAbbr"),G("zz",0,0,"zoneName");var on=x.prototype;function sn(t){return t}on.add=ze,on.calendar=function(t,e){var n=t||xe(),r=Ce(n,this).startOf("day"),a=i.calendarFormat(this,r)||"sameElse",o=e&&(N(e[a])?e[a].call(this,n):e[a]);return this.format(o||this.localeData().calendar(a,this,xe(n)))},on.clone=function(){return new x(this)},on.diff=function(t,e,n){var r,i,a;if(!this.isValid())return NaN;if(!(r=Ce(t,this)).isValid())return NaN;switch(i=6e4*(r.utcOffset()-this.utcOffset()),e=I(e)){case"year":a=$e(this,r)/12;break;case"month":a=$e(this,r);break;case"quarter":a=$e(this,r)/3;break;case"second":a=(this-r)/1e3;break;case"minute":a=(this-r)/6e4;break;case"hour":a=(this-r)/36e5;break;case"day":a=(this-r-i)/864e5;break;case"week":a=(this-r-i)/6048e5;break;default:a=this-r}return n?a:w(a)},on.endOf=function(t){var e;if(void 0===(t=I(t))||"millisecond"===t||!this.isValid())return this;var n=this._isUTC?Ze:Xe;switch(t){case"year":e=n(this.year()+1,0,1)-1;break;case"quarter":e=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":e=n(this.year(),this.month()+1,1)-1;break;case"week":e=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":e=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":e=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":e=this._d.valueOf(),e+=36e5-qe(e+(this._isUTC?0:6e4*this.utcOffset()),36e5)-1;break;case"minute":e=this._d.valueOf(),e+=6e4-qe(e,6e4)-1;break;case"second":e=this._d.valueOf(),e+=1e3-qe(e,1e3)-1}return this._d.setTime(e),i.updateOffset(this,!0),this},on.format=function(t){t||(t=this.isUtc()?i.defaultFormatUtc:i.defaultFormat);var e=V(this,t);return this.localeData().postformat(e)},on.from=function(t,e){return this.isValid()&&(_(t)&&t.isValid()||xe(t).isValid())?Pe({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},on.fromNow=function(t){return this.from(xe(),t)},on.to=function(t,e){return this.isValid()&&(_(t)&&t.isValid()||xe(t).isValid())?Pe({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},on.toNow=function(t){return this.to(xe(),t)},on.get=function(t){return N(this[t=I(t)])?this[t]():this},on.invalidAt=function(){return p(this).overflow},on.isAfter=function(t,e){var n=_(t)?t:xe(t);return!(!this.isValid()||!n.isValid())&&("millisecond"===(e=I(e)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(e).valueOf())},on.isBefore=function(t,e){var n=_(t)?t:xe(t);return!(!this.isValid()||!n.isValid())&&("millisecond"===(e=I(e)||"millisecond")?this.valueOf()<n.valueOf():this.clone().endOf(e).valueOf()<n.valueOf())},on.isBetween=function(t,e,n,r){var i=_(t)?t:xe(t),a=_(e)?e:xe(e);return!!(this.isValid()&&i.isValid()&&a.isValid())&&("("===(r=r||"()")[0]?this.isAfter(i,n):!this.isBefore(i,n))&&(")"===r[1]?this.isBefore(a,n):!this.isAfter(a,n))},on.isSame=function(t,e){var n,r=_(t)?t:xe(t);return!(!this.isValid()||!r.isValid())&&("millisecond"===(e=I(e)||"millisecond")?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(e).valueOf()<=n&&n<=this.clone().endOf(e).valueOf()))},on.isSameOrAfter=function(t,e){return this.isSame(t,e)||this.isAfter(t,e)},on.isSameOrBefore=function(t,e){return this.isSame(t,e)||this.isBefore(t,e)},on.isValid=function(){return y(this)},on.lang=Ve,on.locale=Ge,on.localeData=He,on.max=we,on.min=_e,on.parsingFlags=function(){return h({},p(this))},on.set=function(t,e){if("object"==typeof t)for(var n=function(t){var e=[];for(var n in t)e.push({unit:n,priority:R[n]});return e.sort((function(t,e){return t.priority-e.priority})),e}(t=P(t)),r=0;r<n.length;r++)this[n[r].unit](t[n[r].unit]);else if(N(this[t=I(t)]))return this[t](e);return this},on.startOf=function(t){var e;if(void 0===(t=I(t))||"millisecond"===t||!this.isValid())return this;var n=this._isUTC?Ze:Xe;switch(t){case"year":e=n(this.year(),0,1);break;case"quarter":e=n(this.year(),this.month()-this.month()%3,1);break;case"month":e=n(this.year(),this.month(),1);break;case"week":e=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":e=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":e=n(this.year(),this.month(),this.date());break;case"hour":e=this._d.valueOf(),e-=qe(e+(this._isUTC?0:6e4*this.utcOffset()),36e5);break;case"minute":e=this._d.valueOf(),e-=qe(e,6e4);break;case"second":e=this._d.valueOf(),e-=qe(e,1e3)}return this._d.setTime(e),i.updateOffset(this,!0),this},on.subtract=Ue,on.toArray=function(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]},on.toObject=function(){var t=this;return{years:t.year(),months:t.month(),date:t.date(),hours:t.hours(),minutes:t.minutes(),seconds:t.seconds(),milliseconds:t.milliseconds()}},on.toDate=function(){return new Date(this.valueOf())},on.toISOString=function(t){if(!this.isValid())return null;var e=!0!==t,n=e?this.clone().utc():this;return n.year()<0||9999<n.year()?V(n,e?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):N(Date.prototype.toISOString)?e?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",V(n,"Z")):V(n,e?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},on.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var t="moment",e="";this.isLocal()||(t=0===this.utcOffset()?"moment.utc":"moment.parseZone",e="Z");var n="["+t+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i=e+'[")]';return this.format(n+r+"-MM-DD[T]HH:mm:ss.SSS"+i)},on.toJSON=function(){return this.isValid()?this.toISOString():null},on.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},on.unix=function(){return Math.floor(this.valueOf()/1e3)},on.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},on.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},on.year=bt,on.isLeapYear=function(){return mt(this.year())},on.weekYear=function(t){return Qe.call(this,t,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},on.isoWeekYear=function(t){return Qe.call(this,t,this.isoWeek(),this.isoWeekday(),1,4)},on.quarter=on.quarters=function(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)},on.month=Mt,on.daysInMonth=function(){return kt(this.year(),this.month())},on.week=on.weeks=function(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")},on.isoWeek=on.isoWeeks=function(t){var e=It(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")},on.weeksInYear=function(){var t=this.localeData()._week;return Pt(this.year(),t.dow,t.doy)},on.isoWeeksInYear=function(){return Pt(this.year(),1,4)},on.date=Ke,on.day=on.days=function(t){if(!this.isValid())return null!=t?this:NaN;var e,n,r=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(e=t,n=this.localeData(),t="string"!=typeof e?e:isNaN(e)?"number"==typeof(e=n.weekdaysParse(e))?e:null:parseInt(e,10),this.add(t-r,"d")):r},on.weekday=function(t){if(!this.isValid())return null!=t?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")},on.isoWeekday=function(t){if(!this.isValid())return null!=t?this:NaN;if(null==t)return this.day()||7;var e,n,r=(e=t,n=this.localeData(),"string"==typeof e?n.weekdaysParse(e)%7||7:isNaN(e)?null:e);return this.day(this.day()%7?r:r-7)},on.dayOfYear=function(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")},on.hour=on.hours=Xt,on.minute=on.minutes=tn,on.second=on.seconds=nn,on.millisecond=on.milliseconds=an,on.utcOffset=function(t,e,n){var r,a=this._offset||0;if(!this.isValid())return null!=t?this:NaN;if(null==t)return this._isUTC?a:De(this);if("string"==typeof t){if(null===(t=Ne(st,t)))return this}else Math.abs(t)<16&&!n&&(t*=60);return!this._isUTC&&e&&(r=De(this)),this._offset=t,this._isUTC=!0,null!=r&&this.add(r,"m"),a!==t&&(!e||this._changeInProgress?Ye(this,Pe(t-a,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,i.updateOffset(this,!0),this._changeInProgress=null)),this},on.utc=function(t){return this.utcOffset(0,t)},on.local=function(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(De(this),"m")),this},on.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var t=Ne(ot,this._i);null!=t?this.utcOffset(t):this.utcOffset(0,!0)}return this},on.hasAlignedHourOffset=function(t){return!!this.isValid()&&(t=t?xe(t).utcOffset():0,(this.utcOffset()-t)%60==0)},on.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},on.isLocal=function(){return!!this.isValid()&&!this._isUTC},on.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},on.isUtc=Le,on.isUTC=Le,on.zoneAbbr=function(){return this._isUTC?"UTC":""},on.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},on.dates=T("dates accessor is deprecated. Use date instead.",Ke),on.months=T("months accessor is deprecated. Use month instead",Mt),on.years=T("years accessor is deprecated. Use year instead",bt),on.zone=T("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",(function(t,e){return null!=t?("string"!=typeof t&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()})),on.isDSTShifted=T("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",(function(){if(!s(this._isDSTShifted))return this._isDSTShifted;var t={};if(v(t,this),(t=ve(t))._a){var e=t._isUTC?d(t._a):xe(t._a);this._isDSTShifted=this.isValid()&&0<E(t._a,e.toArray())}else this._isDSTShifted=!1;return this._isDSTShifted}));var un=D.prototype;function cn(t,e,n,r){var i=re(),a=d().set(r,e);return i[n](a,t)}function ln(t,e,n){if(u(t)&&(e=t,t=void 0),t=t||"",null!=e)return cn(t,e,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=cn(t,r,n,"month");return i}function fn(t,e,n,r){"boolean"==typeof t?u(e)&&(n=e,e=void 0):(e=t,t=!1,u(n=e)&&(n=e,e=void 0)),e=e||"";var i,a=re(),o=t?a._week.dow:0;if(null!=n)return cn(e,(n+o)%7,r,"day");var s=[];for(i=0;i<7;i++)s[i]=cn(e,(i+o)%7,r,"day");return s}un.calendar=function(t,e,n){var r=this._calendar[t]||this._calendar.sameElse;return N(r)?r.call(e,n):r},un.longDateFormat=function(t){var e=this._longDateFormat[t],n=this._longDateFormat[t.toUpperCase()];return e||!n?e:(this._longDateFormat[t]=n.replace(/MMMM|MM|DD|dddd/g,(function(t){return t.slice(1)})),this._longDateFormat[t])},un.invalidDate=function(){return this._invalidDate},un.ordinal=function(t){return this._ordinal.replace("%d",t)},un.preparse=sn,un.postformat=sn,un.relativeTime=function(t,e,n,r){var i=this._relativeTime[n];return N(i)?i(t,e,n,r):i.replace(/%d/i,t)},un.pastFuture=function(t,e){var n=this._relativeTime[0<t?"future":"past"];return N(n)?n(e):n.replace(/%s/i,e)},un.set=function(t){var e,n;for(n in t)N(e=t[n])?this[n]=e:this["_"+n]=e;this._config=t,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},un.months=function(t,e){return t?a(this._months)?this._months[t.month()]:this._months[(this._months.isFormat||Et).test(e)?"format":"standalone"][t.month()]:a(this._months)?this._months:this._months.standalone},un.monthsShort=function(t,e){return t?a(this._monthsShort)?this._monthsShort[t.month()]:this._monthsShort[Et.test(e)?"format":"standalone"][t.month()]:a(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},un.monthsParse=function(t,e,n){var r,i,a;if(this._monthsParseExact)return function(t,e,n){var r,i,a,o=t.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)a=d([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(a,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(a,"").toLocaleLowerCase();return n?"MMM"===e?-1!==(i=vt.call(this._shortMonthsParse,o))?i:null:-1!==(i=vt.call(this._longMonthsParse,o))?i:null:"MMM"===e?-1!==(i=vt.call(this._shortMonthsParse,o))?i:-1!==(i=vt.call(this._longMonthsParse,o))?i:null:-1!==(i=vt.call(this._longMonthsParse,o))?i:-1!==(i=vt.call(this._shortMonthsParse,o))?i:null}.call(this,t,e,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(i=d([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(a="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[r]=new RegExp(a.replace(".",""),"i")),n&&"MMMM"===e&&this._longMonthsParse[r].test(t))return r;if(n&&"MMM"===e&&this._shortMonthsParse[r].test(t))return r;if(!n&&this._monthsParse[r].test(t))return r}},un.monthsRegex=function(t){return this._monthsParseExact?(f(this,"_monthsRegex")||Ct.call(this),t?this._monthsStrictRegex:this._monthsRegex):(f(this,"_monthsRegex")||(this._monthsRegex=Nt),this._monthsStrictRegex&&t?this._monthsStrictRegex:this._monthsRegex)},un.monthsShortRegex=function(t){return this._monthsParseExact?(f(this,"_monthsRegex")||Ct.call(this),t?this._monthsShortStrictRegex:this._monthsShortRegex):(f(this,"_monthsShortRegex")||(this._monthsShortRegex=Ot),this._monthsShortStrictRegex&&t?this._monthsShortStrictRegex:this._monthsShortRegex)},un.week=function(t){return It(t,this._week.dow,this._week.doy).week},un.firstDayOfYear=function(){return this._week.doy},un.firstDayOfWeek=function(){return this._week.dow},un.weekdays=function(t,e){var n=a(this._weekdays)?this._weekdays:this._weekdays[t&&!0!==t&&this._weekdays.isFormat.test(e)?"format":"standalone"];return!0===t?Rt(n,this._week.dow):t?n[t.day()]:n},un.weekdaysMin=function(t){return!0===t?Rt(this._weekdaysMin,this._week.dow):t?this._weekdaysMin[t.day()]:this._weekdaysMin},un.weekdaysShort=function(t){return!0===t?Rt(this._weekdaysShort,this._week.dow):t?this._weekdaysShort[t.day()]:this._weekdaysShort},un.weekdaysParse=function(t,e,n){var r,i,a;if(this._weekdaysParseExact)return function(t,e,n){var r,i,a,o=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)a=d([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(a,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(a,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(a,"").toLocaleLowerCase();return n?"dddd"===e?-1!==(i=vt.call(this._weekdaysParse,o))?i:null:"ddd"===e?-1!==(i=vt.call(this._shortWeekdaysParse,o))?i:null:-1!==(i=vt.call(this._minWeekdaysParse,o))?i:null:"dddd"===e?-1!==(i=vt.call(this._weekdaysParse,o))?i:-1!==(i=vt.call(this._shortWeekdaysParse,o))?i:-1!==(i=vt.call(this._minWeekdaysParse,o))?i:null:"ddd"===e?-1!==(i=vt.call(this._shortWeekdaysParse,o))?i:-1!==(i=vt.call(this._weekdaysParse,o))?i:-1!==(i=vt.call(this._minWeekdaysParse,o))?i:null:-1!==(i=vt.call(this._minWeekdaysParse,o))?i:-1!==(i=vt.call(this._weekdaysParse,o))?i:-1!==(i=vt.call(this._shortWeekdaysParse,o))?i:null}.call(this,t,e,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=d([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(a="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(a.replace(".",""),"i")),n&&"dddd"===e&&this._fullWeekdaysParse[r].test(t))return r;if(n&&"ddd"===e&&this._shortWeekdaysParse[r].test(t))return r;if(n&&"dd"===e&&this._minWeekdaysParse[r].test(t))return r;if(!n&&this._weekdaysParse[r].test(t))return r}},un.weekdaysRegex=function(t){return this._weekdaysParseExact?(f(this,"_weekdaysRegex")||Gt.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(f(this,"_weekdaysRegex")||(this._weekdaysRegex=zt),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)},un.weekdaysShortRegex=function(t){return this._weekdaysParseExact?(f(this,"_weekdaysRegex")||Gt.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(f(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Ut),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},un.weekdaysMinRegex=function(t){return this._weekdaysParseExact?(f(this,"_weekdaysRegex")||Gt.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(f(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=$t),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},un.isPM=function(t){return"p"===(t+"").toLowerCase().charAt(0)},un.meridiem=function(t,e,n){return 11<t?n?"pm":"PM":n?"am":"AM"},ee("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10;return t+(1===k(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th")}}),i.lang=T("moment.lang is deprecated. Use moment.locale instead.",ee),i.langData=T("moment.langData is deprecated. Use moment.localeData instead.",re);var hn=Math.abs;function dn(t,e,n,r){var i=Pe(e,n);return t._milliseconds+=r*i._milliseconds,t._days+=r*i._days,t._months+=r*i._months,t._bubble()}function pn(t){return t<0?Math.floor(t):Math.ceil(t)}function yn(t){return 4800*t/146097}function gn(t){return 146097*t/4800}function mn(t){return function(){return this.as(t)}}var vn=mn("ms"),bn=mn("s"),xn=mn("m"),_n=mn("h"),wn=mn("d"),kn=mn("w"),En=mn("M"),An=mn("Q"),Tn=mn("y");function Sn(t){return function(){return this.isValid()?this._data[t]:NaN}}var Mn=Sn("milliseconds"),On=Sn("seconds"),Nn=Sn("minutes"),Cn=Sn("hours"),Dn=Sn("days"),Ln=Sn("months"),Fn=Sn("years"),In=Math.round,Pn={ss:44,s:45,m:45,h:22,d:26,M:11},Rn=Math.abs;function Bn(t){return(0<t)-(t<0)||+t}function jn(){if(!this.isValid())return this.localeData().invalidDate();var t,e,n=Rn(this._milliseconds)/1e3,r=Rn(this._days),i=Rn(this._months);e=w((t=w(n/60))/60),n%=60,t%=60;var a=w(i/12),o=i%=12,s=r,u=e,c=t,l=n?n.toFixed(3).replace(/\.?0+$/,""):"",f=this.asSeconds();if(!f)return"P0D";var h=f<0?"-":"",d=Bn(this._months)!==Bn(f)?"-":"",p=Bn(this._days)!==Bn(f)?"-":"",y=Bn(this._milliseconds)!==Bn(f)?"-":"";return h+"P"+(a?d+a+"Y":"")+(o?d+o+"M":"")+(s?p+s+"D":"")+(u||c||l?"T":"")+(u?y+u+"H":"")+(c?y+c+"M":"")+(l?y+l+"S":"")}var Yn=Ae.prototype;return Yn.isValid=function(){return this._isValid},Yn.abs=function(){var t=this._data;return this._milliseconds=hn(this._milliseconds),this._days=hn(this._days),this._months=hn(this._months),t.milliseconds=hn(t.milliseconds),t.seconds=hn(t.seconds),t.minutes=hn(t.minutes),t.hours=hn(t.hours),t.months=hn(t.months),t.years=hn(t.years),this},Yn.add=function(t,e){return dn(this,t,e,1)},Yn.subtract=function(t,e){return dn(this,t,e,-1)},Yn.as=function(t){if(!this.isValid())return NaN;var e,n,r=this._milliseconds;if("month"===(t=I(t))||"quarter"===t||"year"===t)switch(e=this._days+r/864e5,n=this._months+yn(e),t){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(e=this._days+Math.round(gn(this._months)),t){case"week":return e/7+r/6048e5;case"day":return e+r/864e5;case"hour":return 24*e+r/36e5;case"minute":return 1440*e+r/6e4;case"second":return 86400*e+r/1e3;case"millisecond":return Math.floor(864e5*e)+r;default:throw new Error("Unknown unit "+t)}},Yn.asMilliseconds=vn,Yn.asSeconds=bn,Yn.asMinutes=xn,Yn.asHours=_n,Yn.asDays=wn,Yn.asWeeks=kn,Yn.asMonths=En,Yn.asQuarters=An,Yn.asYears=Tn,Yn.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*k(this._months/12):NaN},Yn._bubble=function(){var t,e,n,r,i,a=this._milliseconds,o=this._days,s=this._months,u=this._data;return 0<=a&&0<=o&&0<=s||a<=0&&o<=0&&s<=0||(a+=864e5*pn(gn(s)+o),s=o=0),u.milliseconds=a%1e3,t=w(a/1e3),u.seconds=t%60,e=w(t/60),u.minutes=e%60,n=w(e/60),u.hours=n%24,s+=i=w(yn(o+=w(n/24))),o-=pn(gn(i)),r=w(s/12),s%=12,u.days=o,u.months=s,u.years=r,this},Yn.clone=function(){return Pe(this)},Yn.get=function(t){return t=I(t),this.isValid()?this[t+"s"]():NaN},Yn.milliseconds=Mn,Yn.seconds=On,Yn.minutes=Nn,Yn.hours=Cn,Yn.days=Dn,Yn.weeks=function(){return w(this.days()/7)},Yn.months=Ln,Yn.years=Fn,Yn.humanize=function(t){if(!this.isValid())return this.localeData().invalidDate();var e,n,r,i,a,o,s,u,c,l,f=this.localeData(),h=(e=!t,n=f,r=Pe(this).abs(),i=In(r.as("s")),a=In(r.as("m")),o=In(r.as("h")),s=In(r.as("d")),u=In(r.as("M")),c=In(r.as("y")),(l=i<=Pn.ss&&["s",i]||i<Pn.s&&["ss",i]||a<=1&&["m"]||a<Pn.m&&["mm",a]||o<=1&&["h"]||o<Pn.h&&["hh",o]||s<=1&&["d"]||s<Pn.d&&["dd",s]||u<=1&&["M"]||u<Pn.M&&["MM",u]||c<=1&&["y"]||["yy",c])[2]=e,l[3]=0<+this,l[4]=n,function(t,e,n,r,i){return i.relativeTime(e||1,!!n,t,r)}.apply(null,l));return t&&(h=f.pastFuture(+this,h)),f.postformat(h)},Yn.toISOString=jn,Yn.toString=jn,Yn.toJSON=jn,Yn.locale=Ge,Yn.localeData=He,Yn.toIsoString=T("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",jn),Yn.lang=Ve,G("X",0,0,"unix"),G("x",0,0,"valueOf"),lt("x",at),lt("X",/[+-]?\d+(\.\d{1,3})?/),pt("X",(function(t,e,n){n._d=new Date(1e3*parseFloat(t,10))})),pt("x",(function(t,e,n){n._d=new Date(k(t))})),i.version="2.24.0",e=xe,i.fn=on,i.min=function(){return ke("isBefore",[].slice.call(arguments,0))},i.max=function(){return ke("isAfter",[].slice.call(arguments,0))},i.now=function(){return Date.now?Date.now():+new Date},i.utc=d,i.unix=function(t){return xe(1e3*t)},i.months=function(t,e){return ln(t,e,"months")},i.isDate=c,i.locale=ee,i.invalid=g,i.duration=Pe,i.isMoment=_,i.weekdays=function(t,e,n){return fn(t,e,n,"weekdays")},i.parseZone=function(){return xe.apply(null,arguments).parseZone()},i.localeData=re,i.isDuration=Te,i.monthsShort=function(t,e){return ln(t,e,"monthsShort")},i.weekdaysMin=function(t,e,n){return fn(t,e,n,"weekdaysMin")},i.defineLocale=ne,i.updateLocale=function(t,e){if(null!=e){var n,r,i=Zt;null!=(r=te(t))&&(i=r._config),(n=new D(e=C(i,e))).parentLocale=Jt[t],Jt[t]=n,ee(t)}else null!=Jt[t]&&(null!=Jt[t].parentLocale?Jt[t]=Jt[t].parentLocale:null!=Jt[t]&&delete Jt[t]);return Jt[t]},i.locales=function(){return S(Jt)},i.weekdaysShort=function(t,e,n){return fn(t,e,n,"weekdaysShort")},i.normalizeUnits=I,i.relativeTimeRounding=function(t){return void 0===t?In:"function"==typeof t&&(In=t,!0)},i.relativeTimeThreshold=function(t,e){return void 0!==Pn[t]&&(void 0===e?Pn[t]:(Pn[t]=e,"s"===t&&(Pn.ss=e-1),!0))},i.calendarFormat=function(t,e){var n=t.diff(e,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},i.prototype=on,i.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},i}()}).call(this,n(6)(t))},function(t,e,n){var r=n(31),i=n(72);t.exports=function(t){return null!=t&&i(t.length)&&!r(t)}},function(t,e,n){var r=n(226),i=n(236),a=n(29),o=n(4),s=n(243);t.exports=function(t){return"function"==typeof t?t:null==t?a:"object"==typeof t?o(t)?i(t[0],t[1]):r(t):s(t)}},function(t,e,n){t.exports={graphlib:n(13),layout:n(282),debug:n(336),util:{time:n(7).time,notime:n(7).notime},version:n(337)}},function(t,e,n){(function(t,r){var i=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,4],n=[1,3],r=[1,5],i=[1,8,9,10,11,26,34,63,64,65,66,67,68,78,79,82,83,84,86,87,93,94,95,96,97,98],a=[2,2],o=[1,12],s=[1,13],u=[1,14],c=[1,15],l=[1,22],f=[1,46],h=[1,24],d=[1,25],p=[1,26],y=[1,27],g=[1,28],m=[1,40],v=[1,35],b=[1,37],x=[1,32],_=[1,36],w=[1,39],k=[1,43],E=[1,44],A=[1,45],T=[1,34],S=[1,38],M=[1,41],O=[1,42],N=[1,33],C=[1,51],D=[1,8,9,10,11,26,30,34,63,64,65,66,67,68,78,79,82,83,84,86,87,93,94,95,96,97,98],L=[1,55],F=[1,54],I=[1,56],P=[8,9,11,57,58],R=[8,9,10,11,57,58],B=[8,9,10,11,35,57,58],j=[8,9,10,11,28,34,35,37,39,41,43,45,47,49,50,52,57,58,68,78,79,82,83,84,86,87,93,94,95,96,97,98],Y=[8,9,11,34,57,58,68,78,79,82,83,84,86,87,93,94,95,96,97,98],z=[34,68,78,79,82,83,84,86,87,93,94,95,96,97,98],U=[1,101],$=[1,122],G=[1,123],V=[1,124],H=[1,125],W=[1,105],q=[1,96],X=[1,97],Z=[1,93],J=[1,117],Q=[1,118],K=[1,119],tt=[1,120],et=[1,121],nt=[1,126],rt=[1,127],it=[1,99],at=[1,107],ot=[1,110],st=[1,108],ut=[1,109],ct=[1,102],lt=[1,115],ft=[1,114],ht=[1,98],dt=[1,95],pt=[1,104],yt=[1,106],gt=[1,111],mt=[1,112],vt=[1,113],bt=[1,116],xt=[8,9,10,11,26,30,34,63,64,65,66,67,68,78,79,82,83,84,86,87,93,94,95,96,97,98],_t=[1,130],wt=[1,134],kt=[1,136],Et=[1,137],At=[8,9,10,11,12,13,26,28,29,30,34,38,40,42,44,46,48,49,51,53,57,58,59,63,64,65,66,67,68,69,72,78,79,82,83,84,86,87,88,89,93,94,95,96,97,98],Tt=[8,9,10,11,13,34,68,78,79,82,83,84,86,87,93,94,95,96,97,98],St=[10,79],Mt=[1,204],Ot=[1,208],Nt=[1,205],Ct=[1,202],Dt=[1,199],Lt=[1,200],Ft=[1,201],It=[1,203],Pt=[1,206],Rt=[1,207],Bt=[1,209],jt=[8,9,11],Yt=[1,225],zt=[8,9,11,79],Ut=[8,9,10,11,63,75,78,79,82,83,84,85,86,87,88],$t={trace:function(){},yy:{},symbols_:{error:2,mermaidDoc:3,graphConfig:4,document:5,line:6,statement:7,SEMI:8,NEWLINE:9,SPACE:10,EOF:11,GRAPH:12,DIR:13,FirstStmtSeperator:14,ending:15,endToken:16,spaceList:17,spaceListNewline:18,verticeStatement:19,separator:20,styleStatement:21,linkStyleStatement:22,classDefStatement:23,classStatement:24,clickStatement:25,subgraph:26,text:27,SQS:28,SQE:29,end:30,link:31,node:32,vertex:33,AMP:34,STYLE_SEPARATOR:35,idString:36,PS:37,PE:38,"(-":39,"-)":40,STADIUMSTART:41,STADIUMEND:42,SUBROUTINESTART:43,SUBROUTINEEND:44,CYLINDERSTART:45,CYLINDEREND:46,DIAMOND_START:47,DIAMOND_STOP:48,TAGEND:49,TRAPSTART:50,TRAPEND:51,INVTRAPSTART:52,INVTRAPEND:53,linkStatement:54,arrowText:55,TESTSTR:56,START_LINK:57,LINK:58,PIPE:59,textToken:60,STR:61,keywords:62,STYLE:63,LINKSTYLE:64,CLASSDEF:65,CLASS:66,CLICK:67,DOWN:68,UP:69,textNoTags:70,textNoTagsToken:71,DEFAULT:72,stylesOpt:73,alphaNum:74,HEX:75,numList:76,INTERPOLATE:77,NUM:78,COMMA:79,style:80,styleComponent:81,ALPHA:82,COLON:83,MINUS:84,UNIT:85,BRKT:86,DOT:87,PCT:88,TAGSTART:89,alphaNumToken:90,idStringToken:91,alphaNumStatement:92,PUNCTUATION:93,UNICODE_TEXT:94,PLUS:95,EQUALS:96,MULT:97,UNDERSCORE:98,graphCodeTokens:99,ARROW_CROSS:100,ARROW_POINT:101,ARROW_CIRCLE:102,ARROW_OPEN:103,QUOTE:104,$accept:0,$end:1},terminals_:{2:"error",8:"SEMI",9:"NEWLINE",10:"SPACE",11:"EOF",12:"GRAPH",13:"DIR",26:"subgraph",28:"SQS",29:"SQE",30:"end",34:"AMP",35:"STYLE_SEPARATOR",37:"PS",38:"PE",39:"(-",40:"-)",41:"STADIUMSTART",42:"STADIUMEND",43:"SUBROUTINESTART",44:"SUBROUTINEEND",45:"CYLINDERSTART",46:"CYLINDEREND",47:"DIAMOND_START",48:"DIAMOND_STOP",49:"TAGEND",50:"TRAPSTART",51:"TRAPEND",52:"INVTRAPSTART",53:"INVTRAPEND",56:"TESTSTR",57:"START_LINK",58:"LINK",59:"PIPE",61:"STR",63:"STYLE",64:"LINKSTYLE",65:"CLASSDEF",66:"CLASS",67:"CLICK",68:"DOWN",69:"UP",72:"DEFAULT",75:"HEX",77:"INTERPOLATE",78:"NUM",79:"COMMA",82:"ALPHA",83:"COLON",84:"MINUS",85:"UNIT",86:"BRKT",87:"DOT",88:"PCT",89:"TAGSTART",93:"PUNCTUATION",94:"UNICODE_TEXT",95:"PLUS",96:"EQUALS",97:"MULT",98:"UNDERSCORE",100:"ARROW_CROSS",101:"ARROW_POINT",102:"ARROW_CIRCLE",103:"ARROW_OPEN",104:"QUOTE"},productions_:[0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,3],[15,2],[15,1],[16,1],[16,1],[16,1],[14,1],[14,1],[14,2],[18,2],[18,2],[18,1],[18,1],[17,2],[17,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,9],[7,6],[7,4],[20,1],[20,1],[20,1],[19,3],[19,4],[19,2],[19,1],[32,1],[32,5],[32,3],[33,4],[33,6],[33,4],[33,4],[33,4],[33,4],[33,4],[33,4],[33,6],[33,4],[33,4],[33,4],[33,4],[33,4],[33,1],[31,2],[31,3],[31,3],[31,1],[31,3],[54,1],[55,3],[27,1],[27,2],[27,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[70,1],[70,2],[23,5],[23,5],[24,5],[25,5],[25,7],[25,5],[25,7],[21,5],[21,5],[22,5],[22,5],[22,9],[22,9],[22,7],[22,7],[76,1],[76,3],[73,1],[73,3],[80,1],[80,2],[81,1],[81,1],[81,1],[81,1],[81,1],[81,1],[81,1],[81,1],[81,1],[81,1],[81,1],[60,1],[60,1],[60,1],[60,1],[60,1],[60,1],[71,1],[71,1],[71,1],[71,1],[36,1],[36,2],[74,1],[74,2],[92,1],[92,1],[92,1],[92,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[90,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[99,1],[99,1],[99,1],[99,1],[99,1],[99,1],[99,1],[99,1],[99,1],[99,1],[99,1],[99,1],[99,1],[99,1],[99,1],[99,1],[99,1],[99,1],[99,1],[99,1],[99,1],[99,1],[99,1],[99,1],[99,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 2:this.$=[];break;case 3:a[s]!==[]&&a[s-1].push(a[s]),this.$=a[s-1];break;case 4:case 67:case 69:case 81:case 127:case 129:case 130:this.$=a[s];break;case 11:r.setDirection(a[s-1]),this.$=a[s-1];break;case 26:this.$=a[s-1].nodes;break;case 27:case 28:case 29:case 30:case 31:this.$=[];break;case 32:this.$=r.addSubGraph(a[s-6],a[s-1],a[s-4]);break;case 33:this.$=r.addSubGraph(a[s-3],a[s-1],a[s-3]);break;case 34:this.$=r.addSubGraph(void 0,a[s-1],void 0);break;case 38:r.addLink(a[s-2].stmt,a[s],a[s-1]),this.$={stmt:a[s],nodes:a[s].concat(a[s-2].nodes)};break;case 39:r.addLink(a[s-3].stmt,a[s-1],a[s-2]),this.$={stmt:a[s-1],nodes:a[s-1].concat(a[s-3].nodes)};break;case 40:this.$={stmt:a[s-1],nodes:a[s-1]};break;case 41:this.$={stmt:a[s],nodes:a[s]};break;case 42:this.$=[a[s]];break;case 43:this.$=a[s-4].concat(a[s]);break;case 44:this.$=[a[s-2]],r.setClass(a[s-2],a[s]);break;case 45:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"square");break;case 46:this.$=a[s-5],r.addVertex(a[s-5],a[s-2],"circle");break;case 47:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"ellipse");break;case 48:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"stadium");break;case 49:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"subroutine");break;case 50:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"cylinder");break;case 51:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"round");break;case 52:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"diamond");break;case 53:this.$=a[s-5],r.addVertex(a[s-5],a[s-2],"hexagon");break;case 54:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"odd");break;case 55:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"trapezoid");break;case 56:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"inv_trapezoid");break;case 57:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"lean_right");break;case 58:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"lean_left");break;case 59:this.$=a[s],r.addVertex(a[s]);break;case 60:a[s-1].text=a[s],this.$=a[s-1];break;case 61:case 62:a[s-2].text=a[s-1],this.$=a[s-2];break;case 63:this.$=a[s];break;case 64:var u=r.destructLink(a[s],a[s-2]);this.$={type:u.type,stroke:u.stroke,text:a[s-1]};break;case 65:u=r.destructLink(a[s]);this.$={type:u.type,stroke:u.stroke};break;case 66:this.$=a[s-1];break;case 68:case 82:case 128:this.$=a[s-1]+""+a[s];break;case 83:case 84:this.$=a[s-4],r.addClass(a[s-2],a[s]);break;case 85:this.$=a[s-4],r.setClass(a[s-2],a[s]);break;case 86:this.$=a[s-4],r.setClickEvent(a[s-2],a[s],void 0);break;case 87:this.$=a[s-6],r.setClickEvent(a[s-4],a[s-2],a[s]);break;case 88:this.$=a[s-4],r.setLink(a[s-2],a[s],void 0);break;case 89:this.$=a[s-6],r.setLink(a[s-4],a[s-2],a[s]);break;case 90:this.$=a[s-4],r.addVertex(a[s-2],void 0,void 0,a[s]);break;case 91:case 93:this.$=a[s-4],r.updateLink(a[s-2],a[s]);break;case 92:this.$=a[s-4],r.updateLink([a[s-2]],a[s]);break;case 94:this.$=a[s-8],r.updateLinkInterpolate([a[s-6]],a[s-2]),r.updateLink([a[s-6]],a[s]);break;case 95:this.$=a[s-8],r.updateLinkInterpolate(a[s-6],a[s-2]),r.updateLink(a[s-6],a[s]);break;case 96:this.$=a[s-6],r.updateLinkInterpolate([a[s-4]],a[s]);break;case 97:this.$=a[s-6],r.updateLinkInterpolate(a[s-4],a[s]);break;case 98:case 100:this.$=[a[s]];break;case 99:case 101:a[s-2].push(a[s]),this.$=a[s-2];break;case 103:this.$=a[s-1]+a[s];break;case 125:this.$=a[s];break;case 126:this.$=a[s-1]+""+a[s];break;case 131:this.$="v";break;case 132:this.$="-"}},table:[{3:1,4:2,9:e,10:n,12:r},{1:[3]},t(i,a,{5:6}),{4:7,9:e,10:n,12:r},{4:8,9:e,10:n,12:r},{13:[1,9]},{1:[2,1],6:10,7:11,8:o,9:s,10:u,11:c,19:16,21:17,22:18,23:19,24:20,25:21,26:l,32:23,33:29,34:f,36:30,63:h,64:d,65:p,66:y,67:g,68:m,78:v,79:b,82:x,83:_,84:w,86:k,87:E,91:31,93:A,94:T,95:S,96:M,97:O,98:N},t(i,[2,9]),t(i,[2,10]),{8:[1,48],9:[1,49],10:C,14:47,17:50},t(D,[2,3]),t(D,[2,4]),t(D,[2,5]),t(D,[2,6]),t(D,[2,7]),t(D,[2,8]),{8:L,9:F,11:I,20:52,31:53,54:57,57:[1,58],58:[1,59]},{8:L,9:F,11:I,20:60},{8:L,9:F,11:I,20:61},{8:L,9:F,11:I,20:62},{8:L,9:F,11:I,20:63},{8:L,9:F,11:I,20:64},{8:L,9:F,10:[1,65],11:I,20:66},t(P,[2,41],{17:67,10:C}),{10:[1,68]},{10:[1,69]},{10:[1,70]},{10:[1,71]},{10:[1,72]},t(R,[2,42],{35:[1,73]}),t(B,[2,59],{91:84,28:[1,74],34:f,37:[1,75],39:[1,76],41:[1,77],43:[1,78],45:[1,79],47:[1,80],49:[1,81],50:[1,82],52:[1,83],68:m,78:v,79:b,82:x,83:_,84:w,86:k,87:E,93:A,94:T,95:S,96:M,97:O,98:N}),t(j,[2,125]),t(j,[2,146]),t(j,[2,147]),t(j,[2,148]),t(j,[2,149]),t(j,[2,150]),t(j,[2,151]),t(j,[2,152]),t(j,[2,153]),t(j,[2,154]),t(j,[2,155]),t(j,[2,156]),t(j,[2,157]),t(j,[2,158]),t(j,[2,159]),t(j,[2,160]),t(i,[2,11]),t(i,[2,17]),t(i,[2,18]),{9:[1,85]},t(Y,[2,25],{17:86,10:C}),t(D,[2,26]),{32:87,33:29,34:f,36:30,68:m,78:v,79:b,82:x,83:_,84:w,86:k,87:E,91:31,93:A,94:T,95:S,96:M,97:O,98:N},t(D,[2,35]),t(D,[2,36]),t(D,[2,37]),t(z,[2,63],{55:88,56:[1,89],59:[1,90]}),{10:U,12:$,13:G,26:V,27:91,30:H,34:W,49:q,57:X,60:92,61:Z,62:103,63:J,64:Q,65:K,66:tt,67:et,68:nt,69:rt,71:94,72:it,78:at,79:ot,82:st,83:ut,84:ct,86:lt,87:ft,88:ht,89:dt,90:100,93:pt,94:yt,95:gt,96:mt,97:vt,98:bt},t([34,56,59,68,78,79,82,83,84,86,87,93,94,95,96,97,98],[2,65]),t(D,[2,27]),t(D,[2,28]),t(D,[2,29]),t(D,[2,30]),t(D,[2,31]),{10:U,12:$,13:G,26:V,27:128,30:H,34:W,49:q,57:X,60:92,61:Z,62:103,63:J,64:Q,65:K,66:tt,67:et,68:nt,69:rt,71:94,72:it,78:at,79:ot,82:st,83:ut,84:ct,86:lt,87:ft,88:ht,89:dt,90:100,93:pt,94:yt,95:gt,96:mt,97:vt,98:bt},t(xt,a,{5:129}),t(P,[2,40],{34:_t}),{13:wt,34:W,68:kt,74:131,75:[1,132],78:at,79:ot,82:st,83:ut,84:Et,86:lt,87:ft,90:135,92:133,93:pt,94:yt,95:gt,96:mt,97:vt,98:bt},{72:[1,138],76:139,78:[1,140]},{13:wt,34:W,68:kt,72:[1,141],74:142,78:at,79:ot,82:st,83:ut,84:Et,86:lt,87:ft,90:135,92:133,93:pt,94:yt,95:gt,96:mt,97:vt,98:bt},{13:wt,34:W,68:kt,74:143,78:at,79:ot,82:st,83:ut,84:Et,86:lt,87:ft,90:135,92:133,93:pt,94:yt,95:gt,96:mt,97:vt,98:bt},{13:wt,34:W,68:kt,74:144,78:at,79:ot,82:st,83:ut,84:Et,86:lt,87:ft,90:135,92:133,93:pt,94:yt,95:gt,96:mt,97:vt,98:bt},{34:f,36:145,68:m,78:v,79:b,82:x,83:_,84:w,86:k,87:E,91:31,93:A,94:T,95:S,96:M,97:O,98:N},{10:U,12:$,13:G,26:V,27:146,30:H,34:W,49:q,57:X,60:92,61:Z,62:103,63:J,64:Q,65:K,66:tt,67:et,68:nt,69:rt,71:94,72:it,78:at,79:ot,82:st,83:ut,84:ct,86:lt,87:ft,88:ht,89:dt,90:100,93:pt,94:yt,95:gt,96:mt,97:vt,98:bt},{10:U,12:$,13:G,26:V,27:148,30:H,34:W,37:[1,147],49:q,57:X,60:92,61:Z,62:103,63:J,64:Q,65:K,66:tt,67:et,68:nt,69:rt,71:94,72:it,78:at,79:ot,82:st,83:ut,84:ct,86:lt,87:ft,88:ht,89:dt,90:100,93:pt,94:yt,95:gt,96:mt,97:vt,98:bt},{10:U,12:$,13:G,26:V,27:149,30:H,34:W,49:q,57:X,60:92,61:Z,62:103,63:J,64:Q,65:K,66:tt,67:et,68:nt,69:rt,71:94,72:it,78:at,79:ot,82:st,83:ut,84:ct,86:lt,87:ft,88:ht,89:dt,90:100,93:pt,94:yt,95:gt,96:mt,97:vt,98:bt},{10:U,12:$,13:G,26:V,27:150,30:H,34:W,49:q,57:X,60:92,61:Z,62:103,63:J,64:Q,65:K,66:tt,67:et,68:nt,69:rt,71:94,72:it,78:at,79:ot,82:st,83:ut,84:ct,86:lt,87:ft,88:ht,89:dt,90:100,93:pt,94:yt,95:gt,96:mt,97:vt,98:bt},{10:U,12:$,13:G,26:V,27:151,30:H,34:W,49:q,57:X,60:92,61:Z,62:103,63:J,64:Q,65:K,66:tt,67:et,68:nt,69:rt,71:94,72:it,78:at,79:ot,82:st,83:ut,84:ct,86:lt,87:ft,88:ht,89:dt,90:100,93:pt,94:yt,95:gt,96:mt,97:vt,98:bt},{10:U,12:$,13:G,26:V,27:152,30:H,34:W,49:q,57:X,60:92,61:Z,62:103,63:J,64:Q,65:K,66:tt,67:et,68:nt,69:rt,71:94,72:it,78:at,79:ot,82:st,83:ut,84:ct,86:lt,87:ft,88:ht,89:dt,90:100,93:pt,94:yt,95:gt,96:mt,97:vt,98:bt},{10:U,12:$,13:G,26:V,27:153,30:H,34:W,47:[1,154],49:q,57:X,60:92,61:Z,62:103,63:J,64:Q,65:K,66:tt,67:et,68:nt,69:rt,71:94,72:it,78:at,79:ot,82:st,83:ut,84:ct,86:lt,87:ft,88:ht,89:dt,90:100,93:pt,94:yt,95:gt,96:mt,97:vt,98:bt},{10:U,12:$,13:G,26:V,27:155,30:H,34:W,49:q,57:X,60:92,61:Z,62:103,63:J,64:Q,65:K,66:tt,67:et,68:nt,69:rt,71:94,72:it,78:at,79:ot,82:st,83:ut,84:ct,86:lt,87:ft,88:ht,89:dt,90:100,93:pt,94:yt,95:gt,96:mt,97:vt,98:bt},{10:U,12:$,13:G,26:V,27:156,30:H,34:W,49:q,57:X,60:92,61:Z,62:103,63:J,64:Q,65:K,66:tt,67:et,68:nt,69:rt,71:94,72:it,78:at,79:ot,82:st,83:ut,84:ct,86:lt,87:ft,88:ht,89:dt,90:100,93:pt,94:yt,95:gt,96:mt,97:vt,98:bt},{10:U,12:$,13:G,26:V,27:157,30:H,34:W,49:q,57:X,60:92,61:Z,62:103,63:J,64:Q,65:K,66:tt,67:et,68:nt,69:rt,71:94,72:it,78:at,79:ot,82:st,83:ut,84:ct,86:lt,87:ft,88:ht,89:dt,90:100,93:pt,94:yt,95:gt,96:mt,97:vt,98:bt},t(j,[2,126]),t(i,[2,19]),t(Y,[2,24]),t(P,[2,38],{17:158,10:C}),t(z,[2,60],{10:[1,159]}),{10:[1,160]},{10:U,12:$,13:G,26:V,27:161,30:H,34:W,49:q,57:X,60:92,61:Z,62:103,63:J,64:Q,65:K,66:tt,67:et,68:nt,69:rt,71:94,72:it,78:at,79:ot,82:st,83:ut,84:ct,86:lt,87:ft,88:ht,89:dt,90:100,93:pt,94:yt,95:gt,96:mt,97:vt,98:bt},{10:U,12:$,13:G,26:V,30:H,34:W,49:q,57:X,58:[1,162],60:163,62:103,63:J,64:Q,65:K,66:tt,67:et,68:nt,69:rt,71:94,72:it,78:at,79:ot,82:st,83:ut,84:ct,86:lt,87:ft,88:ht,89:dt,90:100,93:pt,94:yt,95:gt,96:mt,97:vt,98:bt},t(At,[2,67]),t(At,[2,69]),t(At,[2,115]),t(At,[2,116]),t(At,[2,117]),t(At,[2,118]),t(At,[2,119]),t(At,[2,120]),t(At,[2,121]),t(At,[2,122]),t(At,[2,123]),t(At,[2,124]),t(At,[2,133]),t(At,[2,134]),t(At,[2,135]),t(At,[2,136]),t(At,[2,137]),t(At,[2,138]),t(At,[2,139]),t(At,[2,140]),t(At,[2,141]),t(At,[2,142]),t(At,[2,143]),t(At,[2,144]),t(At,[2,145]),t(At,[2,70]),t(At,[2,71]),t(At,[2,72]),t(At,[2,73]),t(At,[2,74]),t(At,[2,75]),t(At,[2,76]),t(At,[2,77]),t(At,[2,78]),t(At,[2,79]),t(At,[2,80]),{8:L,9:F,10:U,11:I,12:$,13:G,20:165,26:V,28:[1,164],30:H,34:W,49:q,57:X,60:163,62:103,63:J,64:Q,65:K,66:tt,67:et,68:nt,69:rt,71:94,72:it,78:at,79:ot,82:st,83:ut,84:ct,86:lt,87:ft,88:ht,89:dt,90:100,93:pt,94:yt,95:gt,96:mt,97:vt,98:bt},{6:10,7:11,8:o,9:s,10:u,11:c,19:16,21:17,22:18,23:19,24:20,25:21,26:l,30:[1,166],32:23,33:29,34:f,36:30,63:h,64:d,65:p,66:y,67:g,68:m,78:v,79:b,82:x,83:_,84:w,86:k,87:E,91:31,93:A,94:T,95:S,96:M,97:O,98:N},{10:C,17:167},{10:[1,168],13:wt,34:W,68:kt,78:at,79:ot,82:st,83:ut,84:Et,86:lt,87:ft,90:135,92:169,93:pt,94:yt,95:gt,96:mt,97:vt,98:bt},{10:[1,170]},t(Tt,[2,127]),t(Tt,[2,129]),t(Tt,[2,130]),t(Tt,[2,131]),t(Tt,[2,132]),{10:[1,171]},{10:[1,172],79:[1,173]},t(St,[2,98]),{10:[1,174]},{10:[1,175],13:wt,34:W,68:kt,78:at,79:ot,82:st,83:ut,84:Et,86:lt,87:ft,90:135,92:169,93:pt,94:yt,95:gt,96:mt,97:vt,98:bt},{10:[1,176],13:wt,34:W,68:kt,78:at,79:ot,82:st,83:ut,84:Et,86:lt,87:ft,90:135,92:169,93:pt,94:yt,95:gt,96:mt,97:vt,98:bt},{10:[1,177],13:wt,34:W,68:kt,78:at,79:ot,82:st,83:ut,84:Et,86:lt,87:ft,90:135,92:169,93:pt,94:yt,95:gt,96:mt,97:vt,98:bt},t(R,[2,44],{91:84,34:f,68:m,78:v,79:b,82:x,83:_,84:w,86:k,87:E,93:A,94:T,95:S,96:M,97:O,98:N}),{10:U,12:$,13:G,26:V,29:[1,178],30:H,34:W,49:q,57:X,60:163,62:103,63:J,64:Q,65:K,66:tt,67:et,68:nt,69:rt,71:94,72:it,78:at,79:ot,82:st,83:ut,84:ct,86:lt,87:ft,88:ht,89:dt,90:100,93:pt,94:yt,95:gt,96:mt,97:vt,98:bt},{10:U,12:$,13:G,26:V,27:179,30:H,34:W,49:q,57:X,60:92,61:Z,62:103,63:J,64:Q,65:K,66:tt,67:et,68:nt,69:rt,71:94,72:it,78:at,79:ot,82:st,83:ut,84:ct,86:lt,87:ft,88:ht,89:dt,90:100,93:pt,94:yt,95:gt,96:mt,97:vt,98:bt},{10:U,12:$,13:G,26:V,30:H,34:W,38:[1,180],49:q,57:X,60:163,62:103,63:J,64:Q,65:K,66:tt,67:et,68:nt,69:rt,71:94,72:it,78:at,79:ot,82:st,83:ut,84:ct,86:lt,87:ft,88:ht,89:dt,90:100,93:pt,94:yt,95:gt,96:mt,97:vt,98:bt},{10:U,12:$,13:G,26:V,30:H,34:W,40:[1,181],49:q,57:X,60:163,62:103,63:J,64:Q,65:K,66:tt,67:et,68:nt,69:rt,71:94,72:it,78:at,79:ot,82:st,83:ut,84:ct,86:lt,87:ft,88:ht,89:dt,90:100,93:pt,94:yt,95:gt,96:mt,97:vt,98:bt},{10:U,12:$,13:G,26:V,30:H,34:W,42:[1,182],49:q,57:X,60:163,62:103,63:J,64:Q,65:K,66:tt,67:et,68:nt,69:rt,71:94,72:it,78:at,79:ot,82:st,83:ut,84:ct,86:lt,87:ft,88:ht,89:dt,90:100,93:pt,94:yt,95:gt,96:mt,97:vt,98:bt},{10:U,12:$,13:G,26:V,30:H,34:W,44:[1,183],49:q,57:X,60:163,62:103,63:J,64:Q,65:K,66:tt,67:et,68:nt,69:rt,71:94,72:it,78:at,79:ot,82:st,83:ut,84:ct,86:lt,87:ft,88:ht,89:dt,90:100,93:pt,94:yt,95:gt,96:mt,97:vt,98:bt},{10:U,12:$,13:G,26:V,30:H,34:W,46:[1,184],49:q,57:X,60:163,62:103,63:J,64:Q,65:K,66:tt,67:et,68:nt,69:rt,71:94,72:it,78:at,79:ot,82:st,83:ut,84:ct,86:lt,87:ft,88:ht,89:dt,90:100,93:pt,94:yt,95:gt,96:mt,97:vt,98:bt},{10:U,12:$,13:G,26:V,30:H,34:W,48:[1,185],49:q,57:X,60:163,62:103,63:J,64:Q,65:K,66:tt,67:et,68:nt,69:rt,71:94,72:it,78:at,79:ot,82:st,83:ut,84:ct,86:lt,87:ft,88:ht,89:dt,90:100,93:pt,94:yt,95:gt,96:mt,97:vt,98:bt},{10:U,12:$,13:G,26:V,27:186,30:H,34:W,49:q,57:X,60:92,61:Z,62:103,63:J,64:Q,65:K,66:tt,67:et,68:nt,69:rt,71:94,72:it,78:at,79:ot,82:st,83:ut,84:ct,86:lt,87:ft,88:ht,89:dt,90:100,93:pt,94:yt,95:gt,96:mt,97:vt,98:bt},{10:U,12:$,13:G,26:V,29:[1,187],30:H,34:W,49:q,57:X,60:163,62:103,63:J,64:Q,65:K,66:tt,67:et,68:nt,69:rt,71:94,72:it,78:at,79:ot,82:st,83:ut,84:ct,86:lt,87:ft,88:ht,89:dt,90:100,93:pt,94:yt,95:gt,96:mt,97:vt,98:bt},{10:U,12:$,13:G,26:V,30:H,34:W,49:q,51:[1,188],53:[1,189],57:X,60:163,62:103,63:J,64:Q,65:K,66:tt,67:et,68:nt,69:rt,71:94,72:it,78:at,79:ot,82:st,83:ut,84:ct,86:lt,87:ft,88:ht,89:dt,90:100,93:pt,94:yt,95:gt,96:mt,97:vt,98:bt},{10:U,12:$,13:G,26:V,30:H,34:W,49:q,51:[1,191],53:[1,190],57:X,60:163,62:103,63:J,64:Q,65:K,66:tt,67:et,68:nt,69:rt,71:94,72:it,78:at,79:ot,82:st,83:ut,84:ct,86:lt,87:ft,88:ht,89:dt,90:100,93:pt,94:yt,95:gt,96:mt,97:vt,98:bt},t(P,[2,39],{34:_t}),t(z,[2,62]),t(z,[2,61]),{10:U,12:$,13:G,26:V,30:H,34:W,49:q,57:X,59:[1,192],60:163,62:103,63:J,64:Q,65:K,66:tt,67:et,68:nt,69:rt,71:94,72:it,78:at,79:ot,82:st,83:ut,84:ct,86:lt,87:ft,88:ht,89:dt,90:100,93:pt,94:yt,95:gt,96:mt,97:vt,98:bt},t(z,[2,64]),t(At,[2,68]),{10:U,12:$,13:G,26:V,27:193,30:H,34:W,49:q,57:X,60:92,61:Z,62:103,63:J,64:Q,65:K,66:tt,67:et,68:nt,69:rt,71:94,72:it,78:at,79:ot,82:st,83:ut,84:ct,86:lt,87:ft,88:ht,89:dt,90:100,93:pt,94:yt,95:gt,96:mt,97:vt,98:bt},t(xt,a,{5:194}),t(D,[2,34]),{33:195,34:f,36:30,68:m,78:v,79:b,82:x,83:_,84:w,86:k,87:E,91:31,93:A,94:T,95:S,96:M,97:O,98:N},{10:Mt,63:Ot,73:196,75:Nt,78:Ct,80:197,81:198,82:Dt,83:Lt,84:Ft,85:It,86:Pt,87:Rt,88:Bt},t(Tt,[2,128]),{10:Mt,63:Ot,73:210,75:Nt,78:Ct,80:197,81:198,82:Dt,83:Lt,84:Ft,85:It,86:Pt,87:Rt,88:Bt},{10:Mt,63:Ot,73:211,75:Nt,77:[1,212],78:Ct,80:197,81:198,82:Dt,83:Lt,84:Ft,85:It,86:Pt,87:Rt,88:Bt},{10:Mt,63:Ot,73:213,75:Nt,77:[1,214],78:Ct,80:197,81:198,82:Dt,83:Lt,84:Ft,85:It,86:Pt,87:Rt,88:Bt},{78:[1,215]},{10:Mt,63:Ot,73:216,75:Nt,78:Ct,80:197,81:198,82:Dt,83:Lt,84:Ft,85:It,86:Pt,87:Rt,88:Bt},{10:Mt,63:Ot,73:217,75:Nt,78:Ct,80:197,81:198,82:Dt,83:Lt,84:Ft,85:It,86:Pt,87:Rt,88:Bt},{13:wt,34:W,68:kt,74:218,78:at,79:ot,82:st,83:ut,84:Et,86:lt,87:ft,90:135,92:133,93:pt,94:yt,95:gt,96:mt,97:vt,98:bt},{13:wt,34:W,61:[1,220],68:kt,74:219,78:at,79:ot,82:st,83:ut,84:Et,86:lt,87:ft,90:135,92:133,93:pt,94:yt,95:gt,96:mt,97:vt,98:bt},t(B,[2,45]),{10:U,12:$,13:G,26:V,30:H,34:W,38:[1,221],49:q,57:X,60:163,62:103,63:J,64:Q,65:K,66:tt,67:et,68:nt,69:rt,71:94,72:it,78:at,79:ot,82:st,83:ut,84:ct,86:lt,87:ft,88:ht,89:dt,90:100,93:pt,94:yt,95:gt,96:mt,97:vt,98:bt},t(B,[2,51]),t(B,[2,47]),t(B,[2,48]),t(B,[2,49]),t(B,[2,50]),t(B,[2,52]),{10:U,12:$,13:G,26:V,30:H,34:W,48:[1,222],49:q,57:X,60:163,62:103,63:J,64:Q,65:K,66:tt,67:et,68:nt,69:rt,71:94,72:it,78:at,79:ot,82:st,83:ut,84:ct,86:lt,87:ft,88:ht,89:dt,90:100,93:pt,94:yt,95:gt,96:mt,97:vt,98:bt},t(B,[2,54]),t(B,[2,55]),t(B,[2,57]),t(B,[2,56]),t(B,[2,58]),t([10,34,68,78,79,82,83,84,86,87,93,94,95,96,97,98],[2,66]),{10:U,12:$,13:G,26:V,29:[1,223],30:H,34:W,49:q,57:X,60:163,62:103,63:J,64:Q,65:K,66:tt,67:et,68:nt,69:rt,71:94,72:it,78:at,79:ot,82:st,83:ut,84:ct,86:lt,87:ft,88:ht,89:dt,90:100,93:pt,94:yt,95:gt,96:mt,97:vt,98:bt},{6:10,7:11,8:o,9:s,10:u,11:c,19:16,21:17,22:18,23:19,24:20,25:21,26:l,30:[1,224],32:23,33:29,34:f,36:30,63:h,64:d,65:p,66:y,67:g,68:m,78:v,79:b,82:x,83:_,84:w,86:k,87:E,91:31,93:A,94:T,95:S,96:M,97:O,98:N},t(R,[2,43]),t(jt,[2,90],{79:Yt}),t(zt,[2,100],{81:226,10:Mt,63:Ot,75:Nt,78:Ct,82:Dt,83:Lt,84:Ft,85:It,86:Pt,87:Rt,88:Bt}),t(Ut,[2,102]),t(Ut,[2,104]),t(Ut,[2,105]),t(Ut,[2,106]),t(Ut,[2,107]),t(Ut,[2,108]),t(Ut,[2,109]),t(Ut,[2,110]),t(Ut,[2,111]),t(Ut,[2,112]),t(Ut,[2,113]),t(Ut,[2,114]),t(jt,[2,91],{79:Yt}),t(jt,[2,92],{79:Yt}),{10:[1,227]},t(jt,[2,93],{79:Yt}),{10:[1,228]},t(St,[2,99]),t(jt,[2,83],{79:Yt}),t(jt,[2,84],{79:Yt}),t(jt,[2,85],{90:135,92:169,13:wt,34:W,68:kt,78:at,79:ot,82:st,83:ut,84:Et,86:lt,87:ft,93:pt,94:yt,95:gt,96:mt,97:vt,98:bt}),t(jt,[2,86],{90:135,92:169,10:[1,229],13:wt,34:W,68:kt,78:at,79:ot,82:st,83:ut,84:Et,86:lt,87:ft,93:pt,94:yt,95:gt,96:mt,97:vt,98:bt}),t(jt,[2,88],{10:[1,230]}),{38:[1,231]},{48:[1,232]},{8:L,9:F,11:I,20:233},t(D,[2,33]),{10:Mt,63:Ot,75:Nt,78:Ct,80:234,81:198,82:Dt,83:Lt,84:Ft,85:It,86:Pt,87:Rt,88:Bt},t(Ut,[2,103]),{13:wt,34:W,68:kt,74:235,78:at,79:ot,82:st,83:ut,84:Et,86:lt,87:ft,90:135,92:133,93:pt,94:yt,95:gt,96:mt,97:vt,98:bt},{13:wt,34:W,68:kt,74:236,78:at,79:ot,82:st,83:ut,84:Et,86:lt,87:ft,90:135,92:133,93:pt,94:yt,95:gt,96:mt,97:vt,98:bt},{61:[1,237]},{61:[1,238]},t(B,[2,46]),t(B,[2,53]),t(xt,a,{5:239}),t(zt,[2,101],{81:226,10:Mt,63:Ot,75:Nt,78:Ct,82:Dt,83:Lt,84:Ft,85:It,86:Pt,87:Rt,88:Bt}),t(jt,[2,96],{90:135,92:169,10:[1,240],13:wt,34:W,68:kt,78:at,79:ot,82:st,83:ut,84:Et,86:lt,87:ft,93:pt,94:yt,95:gt,96:mt,97:vt,98:bt}),t(jt,[2,97],{90:135,92:169,10:[1,241],13:wt,34:W,68:kt,78:at,79:ot,82:st,83:ut,84:Et,86:lt,87:ft,93:pt,94:yt,95:gt,96:mt,97:vt,98:bt}),t(jt,[2,87]),t(jt,[2,89]),{6:10,7:11,8:o,9:s,10:u,11:c,19:16,21:17,22:18,23:19,24:20,25:21,26:l,30:[1,242],32:23,33:29,34:f,36:30,63:h,64:d,65:p,66:y,67:g,68:m,78:v,79:b,82:x,83:_,84:w,86:k,87:E,91:31,93:A,94:T,95:S,96:M,97:O,98:N},{10:Mt,63:Ot,73:243,75:Nt,78:Ct,80:197,81:198,82:Dt,83:Lt,84:Ft,85:It,86:Pt,87:Rt,88:Bt},{10:Mt,63:Ot,73:244,75:Nt,78:Ct,80:197,81:198,82:Dt,83:Lt,84:Ft,85:It,86:Pt,87:Rt,88:Bt},t(D,[2,32]),t(jt,[2,94],{79:Yt}),t(jt,[2,95],{79:Yt})],defaultActions:{},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",u=0,c=0,l=0,f=2,h=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),y={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(y.yy[g]=this.yy[g]);p.setInput(t,y.yy),y.yy.lexer=p,y.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||h)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var x,_,w,k,E,A,T,S,M,O={};;){if(w=n[n.length-1],this.defaultActions[w]?k=this.defaultActions[w]:(null==x&&(x=b()),k=o[w]&&o[w][x]),void 0===k||!k.length||!k[0]){var N="";for(A in M=[],o[w])this.terminals_[A]&&A>f&&M.push("'"+this.terminals_[A]+"'");N=p.showPosition?"Parse error on line "+(u+1)+":\n"+p.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(u+1)+": Unexpected "+(x==h?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(N,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:m,expected:M})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),i.push(p.yytext),a.push(p.yylloc),n.push(k[1]),x=null,_?(x=_,_=null):(c=p.yyleng,s=p.yytext,u=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(T=this.productions_[k[1]][1],O.$=i[i.length-T],O._$={first_line:a[a.length-(T||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(T||1)].first_column,last_column:a[a.length-1].last_column},v&&(O._$.range=[a[a.length-(T||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(O,[s,c,u,y.yy,k[1],i,a].concat(d))))return E;T&&(n=n.slice(0,-1*T*2),i=i.slice(0,-1*T),a=a.slice(0,-1*T)),n.push(this.productions_[k[1]][0]),i.push(O.$),a.push(O._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}},Gt={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,e,n,r){switch(n){case 0:break;case 1:this.begin("string");break;case 2:this.popState();break;case 3:return"STR";case 4:return 63;case 5:return 72;case 6:return 64;case 7:return 77;case 8:return 65;case 9:return 66;case 10:return 67;case 11:case 12:return t.lex.firstGraph()&&this.begin("dir"),12;case 13:return 26;case 14:return 30;case 15:case 16:case 17:case 18:case 19:case 20:case 21:case 22:case 23:case 24:return this.popState(),13;case 25:return 78;case 26:return 86;case 27:return 35;case 28:return 83;case 29:return 34;case 30:return 8;case 31:return 79;case 32:return 97;case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:case 58:case 59:case 60:return 58;case 61:case 62:case 63:case 64:case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:return 57;case 73:return 39;case 74:return 40;case 75:return 41;case 76:return 42;case 77:return 43;case 78:return 44;case 79:return 45;case 80:return 46;case 81:return 84;case 82:return 87;case 83:return 98;case 84:return 95;case 85:return 88;case 86:case 87:return 96;case 88:return 89;case 89:return 49;case 90:return 69;case 91:return"SEP";case 92:return 68;case 93:return 82;case 94:return 51;case 95:return 50;case 96:return 53;case 97:return 52;case 98:return 93;case 99:return 94;case 100:return 59;case 101:return 37;case 102:return 38;case 103:return 28;case 104:return 29;case 105:return 47;case 106:return 48;case 107:return 104;case 108:return 9;case 109:return 10;case 110:return 11}},rules:[/^(?:%%[^\n]*\n*)/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:click\b)/,/^(?:graph\b)/,/^(?:flowchart\b)/,/^(?:subgraph\b)/,/^(?:end\b\s*)/,/^(?:\s*LR\b)/,/^(?:\s*RL\b)/,/^(?:\s*TB\b)/,/^(?:\s*BT\b)/,/^(?:\s*TD\b)/,/^(?:\s*BR\b)/,/^(?:\s*<)/,/^(?:\s*>)/,/^(?:\s*\^)/,/^(?:\s*v\b)/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::::)/,/^(?::)/,/^(?:&)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:\s*--[x]\s*)/,/^(?:\s*-->\s*)/,/^(?:\s*<-->\s*)/,/^(?:\s*[x]--[x]\s*)/,/^(?:\s*[o]--[o]\s*)/,/^(?:\s*[o]\.-[o]\s*)/,/^(?:\s*<==>\s*)/,/^(?:\s*[o]==[o]\s*)/,/^(?:\s*[x]==[x]\s*)/,/^(?:\s*[x].-[x]\s*)/,/^(?:\s*[x]-\.-[x]\s*)/,/^(?:\s*<\.->\s*)/,/^(?:\s*<-\.->\s*)/,/^(?:\s*[o]-\.-[o]\s*)/,/^(?:\s*--[o]\s*)/,/^(?:\s*---\s*)/,/^(?:\s*-\.-[x]\s*)/,/^(?:\s*-\.->\s*)/,/^(?:\s*-\.-[o]\s*)/,/^(?:\s*-\.-\s*)/,/^(?:\s*.-[x]\s*)/,/^(?:\s*\.->\s*)/,/^(?:\s*\.-[o]\s*)/,/^(?:\s*\.-\s*)/,/^(?:\s*==[x]\s*)/,/^(?:\s*==>\s*)/,/^(?:\s*==[o]\s*)/,/^(?:\s*==[\=]\s*)/,/^(?:\s*<--\s*)/,/^(?:\s*[x]--\s*)/,/^(?:\s*[o]--\s*)/,/^(?:\s*<-\.\s*)/,/^(?:\s*[x]-\.\s*)/,/^(?:\s*[o]-\.\s*)/,/^(?:\s*<==\s*)/,/^(?:\s*[x]==\s*)/,/^(?:\s*[o]==\s*)/,/^(?:\s*--\s*)/,/^(?:\s*-\.\s*)/,/^(?:\s*==\s*)/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\[)/,/^(?:\]\))/,/^(?:\[\[)/,/^(?:\]\])/,/^(?:\[\()/,/^(?:\)\])/,/^(?:-)/,/^(?:\.)/,/^(?:[\_])/,/^(?:\+)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:\\\|)/,/^(?:v\b)/,/^(?:[A-Za-z]+)/,/^(?:\\\])/,/^(?:\[\/)/,/^(?:\/\])/,/^(?:\[\\)/,/^(?:[!"#$%&'*+,-.`?\\_/])/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\|)/,/^(?:\()/,/^(?:\))/,/^(?:\[)/,/^(?:\])/,/^(?:\{)/,/^(?:\})/,/^(?:")/,/^(?:(\r|\n|\r\n)+)/,/^(?:\s)/,/^(?:$)/],conditions:{vertex:{rules:[],inclusive:!1},dir:{rules:[15,16,17,18,19,20,21,22,23,24],inclusive:!1},string:{rules:[2,3],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,8,9,10,11,12,13,14,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110],inclusive:!0}}};function Vt(){this.yy={}}return $t.lexer=Gt,Vt.prototype=$t,$t.Parser=Vt,new Vt}();e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(r){r[1]||(console.log("Usage: "+r[0]+" FILE"),t.exit(1));var i=n(14).readFileSync(n(15).normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n(11),n(6)(t))},function(t,e,n){(function(t,r){var i=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[6,8,10,11,12,13,14,15,16,17,19,21],n=[1,9],r=[1,10],i=[1,11],a=[1,12],o=[1,13],s=[1,14],u=[1,15],c=[1,17],l=[1,18],f={trace:function(){},yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,dateFormat:11,inclusiveEndDates:12,axisFormat:13,excludes:14,todayMarker:15,title:16,section:17,clickStatement:18,taskTxt:19,taskData:20,click:21,callbackname:22,callbackargs:23,href:24,clickStatementDebug:25,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",11:"dateFormat",12:"inclusiveEndDates",13:"axisFormat",14:"excludes",15:"todayMarker",16:"title",17:"section",19:"taskTxt",20:"taskData",21:"click",22:"callbackname",23:"callbackargs",24:"href"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[18,2],[18,3],[18,3],[18,4],[18,3],[18,4],[18,2],[25,2],[25,3],[25,3],[25,4],[25,3],[25,4],[25,2]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 1:return a[s-1];case 2:this.$=[];break;case 3:a[s-1].push(a[s]),this.$=a[s-1];break;case 4:case 5:this.$=a[s];break;case 6:case 7:this.$=[];break;case 8:r.setDateFormat(a[s].substr(11)),this.$=a[s].substr(11);break;case 9:r.enableInclusiveEndDates(),this.$=a[s].substr(18);break;case 10:r.setAxisFormat(a[s].substr(11)),this.$=a[s].substr(11);break;case 11:r.setExcludes(a[s].substr(9)),this.$=a[s].substr(9);break;case 12:r.setTodayMarker(a[s].substr(12)),this.$=a[s].substr(12);break;case 13:r.setTitle(a[s].substr(6)),this.$=a[s].substr(6);break;case 14:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 16:r.addTask(a[s-1],a[s]),this.$="task";break;case 17:this.$=a[s-1],r.setClickEvent(a[s-1],a[s],null);break;case 18:this.$=a[s-2],r.setClickEvent(a[s-2],a[s-1],a[s]);break;case 19:this.$=a[s-2],r.setClickEvent(a[s-2],a[s-1],null),r.setLink(a[s-2],a[s]);break;case 20:this.$=a[s-3],r.setClickEvent(a[s-3],a[s-2],a[s-1]),r.setLink(a[s-3],a[s]);break;case 21:this.$=a[s-2],r.setClickEvent(a[s-2],a[s],null),r.setLink(a[s-2],a[s-1]);break;case 22:this.$=a[s-3],r.setClickEvent(a[s-3],a[s-1],a[s]),r.setLink(a[s-3],a[s-2]);break;case 23:this.$=a[s-1],r.setLink(a[s-1],a[s]);break;case 24:case 30:this.$=a[s-1]+" "+a[s];break;case 25:case 26:case 28:this.$=a[s-2]+" "+a[s-1]+" "+a[s];break;case 27:case 29:this.$=a[s-3]+" "+a[s-2]+" "+a[s-1]+" "+a[s]}},table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:n,12:r,13:i,14:a,15:o,16:s,17:u,18:16,19:c,21:l},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:19,11:n,12:r,13:i,14:a,15:o,16:s,17:u,18:16,19:c,21:l},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),t(e,[2,9]),t(e,[2,10]),t(e,[2,11]),t(e,[2,12]),t(e,[2,13]),t(e,[2,14]),t(e,[2,15]),{20:[1,20]},{22:[1,21],24:[1,22]},t(e,[2,4]),t(e,[2,16]),t(e,[2,17],{23:[1,23],24:[1,24]}),t(e,[2,23],{22:[1,25]}),t(e,[2,18],{24:[1,26]}),t(e,[2,19]),t(e,[2,21],{23:[1,27]}),t(e,[2,20]),t(e,[2,22])],defaultActions:{},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",u=0,c=0,l=0,f=2,h=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),y={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(y.yy[g]=this.yy[g]);p.setInput(t,y.yy),y.yy.lexer=p,y.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||h)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var x,_,w,k,E,A,T,S,M,O={};;){if(w=n[n.length-1],this.defaultActions[w]?k=this.defaultActions[w]:(null==x&&(x=b()),k=o[w]&&o[w][x]),void 0===k||!k.length||!k[0]){var N="";for(A in M=[],o[w])this.terminals_[A]&&A>f&&M.push("'"+this.terminals_[A]+"'");N=p.showPosition?"Parse error on line "+(u+1)+":\n"+p.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(u+1)+": Unexpected "+(x==h?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(N,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:m,expected:M})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),i.push(p.yytext),a.push(p.yylloc),n.push(k[1]),x=null,_?(x=_,_=null):(c=p.yyleng,s=p.yytext,u=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(T=this.productions_[k[1]][1],O.$=i[i.length-T],O._$={first_line:a[a.length-(T||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(T||1)].first_column,last_column:a[a.length-1].last_column},v&&(O._$.range=[a[a.length-(T||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(O,[s,c,u,y.yy,k[1],i,a].concat(d))))return E;T&&(n=n.slice(0,-1*T*2),i=i.slice(0,-1*T),a=a.slice(0,-1*T)),n.push(this.productions_[k[1]][0]),i.push(O.$),a.push(O._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}},h={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return 10;case 1:case 2:case 3:break;case 4:this.begin("href");break;case 5:this.popState();break;case 6:return 24;case 7:this.begin("callbackname");break;case 8:this.popState();break;case 9:this.popState(),this.begin("callbackargs");break;case 10:return 22;case 11:this.popState();break;case 12:return 23;case 13:this.begin("click");break;case 14:this.popState();break;case 15:return 21;case 16:return 4;case 17:return 11;case 18:return 12;case 19:return 13;case 20:return 14;case 21:return 15;case 22:return"date";case 23:return 16;case 24:return 17;case 25:return 19;case 26:return 20;case 27:return":";case 28:return 6;case 29:return"INVALID"}},rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:href[\s]+["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:call[\s]+)/i,/^(?:\([\s]*\))/i,/^(?:\()/i,/^(?:[^(]*)/i,/^(?:\))/i,/^(?:[^)]*)/i,/^(?:click[\s]+)/i,/^(?:[\s\n])/i,/^(?:[^\s\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:inclusiveEndDates\b)/i,/^(?:axisFormat\s[^#\n;]+)/i,/^(?:excludes\s[^#\n;]+)/i,/^(?:todayMarker\s[^\n;]+)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{callbackargs:{rules:[11,12],inclusive:!1},callbackname:{rules:[8,9,10],inclusive:!1},href:{rules:[5,6],inclusive:!1},click:{rules:[14,15],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,7,13,16,17,18,19,20,21,22,23,24,25,26,27,28,29],inclusive:!0}}};function d(){this.yy={}}return f.lexer=h,d.prototype=f,f.Parser=d,new d}();e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(r){r[1]||(console.log("Usage: "+r[0]+" FILE"),t.exit(1));var i=n(14).readFileSync(n(15).normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n(11),n(6)(t))},function(t,e,n){(function(t,r){var i=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[6,8,10,11,12,13],n=[1,9],r=[1,10],i=[1,11],a={trace:function(){},yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,title:11,section:12,taskName:13,taskData:14,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NL",11:"title",12:"section",13:"taskName",14:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,1],[9,2]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 1:return a[s-1];case 2:this.$=[];break;case 3:a[s-1].push(a[s]),this.$=a[s-1];break;case 4:case 5:this.$=a[s];break;case 6:case 7:this.$=[];break;case 8:r.setTitle(a[s].substr(6)),this.$=a[s].substr(6);break;case 9:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 10:r.addTask(a[s-1],a[s]),this.$="task"}},table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:n,12:r,13:i},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:12,11:n,12:r,13:i},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),t(e,[2,9]),{14:[1,13]},t(e,[2,4]),t(e,[2,10])],defaultActions:{},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",u=0,c=0,l=0,f=2,h=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),y={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(y.yy[g]=this.yy[g]);p.setInput(t,y.yy),y.yy.lexer=p,y.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||h)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var x,_,w,k,E,A,T,S,M,O={};;){if(w=n[n.length-1],this.defaultActions[w]?k=this.defaultActions[w]:(null==x&&(x=b()),k=o[w]&&o[w][x]),void 0===k||!k.length||!k[0]){var N="";for(A in M=[],o[w])this.terminals_[A]&&A>f&&M.push("'"+this.terminals_[A]+"'");N=p.showPosition?"Parse error on line "+(u+1)+":\n"+p.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(u+1)+": Unexpected "+(x==h?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(N,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:m,expected:M})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),i.push(p.yytext),a.push(p.yylloc),n.push(k[1]),x=null,_?(x=_,_=null):(c=p.yyleng,s=p.yytext,u=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(T=this.productions_[k[1]][1],O.$=i[i.length-T],O._$={first_line:a[a.length-(T||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(T||1)].first_column,last_column:a[a.length-1].last_column},v&&(O._$.range=[a[a.length-(T||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(O,[s,c,u,y.yy,k[1],i,a].concat(d))))return E;T&&(n=n.slice(0,-1*T*2),i=i.slice(0,-1*T),a=a.slice(0,-1*T)),n.push(this.productions_[k[1]][0]),i.push(O.$),a.push(O._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}},o={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return 10;case 1:case 2:case 3:break;case 4:return 4;case 5:return 11;case 6:return 12;case 7:return 13;case 8:return 14;case 9:return":";case 10:return 6;case 11:return"INVALID"}},rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11],inclusive:!0}}};function s(){this.yy={}}return a.lexer=o,s.prototype=a,a.Parser=s,new s}();e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(r){r[1]||(console.log("Usage: "+r[0]+" FILE"),t.exit(1));var i=n(14).readFileSync(n(15).normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n(11),n(6)(t))},function(t,e,n){var r=n(95),i=n(74),a=n(19);t.exports=function(t){return a(t)?r(t):i(t)}},function(t,e,n){var r;if(!r)try{r=n(0)}catch(t){}r||(r=window.d3),t.exports=r},function(t,e,n){var r=n(180),i=n(186);t.exports=function(t,e){var n=i(t,e);return r(n)?n:void 0}},function(t,e,n){var r=n(32),i=n(182),a=n(183),o=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":o&&o in Object(t)?i(t):a(t)}},function(t,e){t.exports=function(t){return t}},function(t,e){t.exports=function(t,e){return t===e||t!=t&&e!=e}},function(t,e,n){var r=n(28),i=n(9);t.exports=function(t){if(!i(t))return!1;var e=r(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},function(t,e,n){var r=n(12).Symbol;t.exports=r},function(t,e,n){(function(t){var r=n(12),i=n(202),a=e&&!e.nodeType&&e,o=a&&"object"==typeof t&&t&&!t.nodeType&&t,s=o&&o.exports===a?r.Buffer:void 0,u=(s?s.isBuffer:void 0)||i;t.exports=u}).call(this,n(6)(t))},function(t,e,n){var r=n(95),i=n(206),a=n(19);t.exports=function(t){return a(t)?r(t,!0):i(t)}},function(t,e,n){var r=n(211),i=n(69),a=n(212),o=n(104),s=n(213),u=n(28),c=n(93),l=c(r),f=c(i),h=c(a),d=c(o),p=c(s),y=u;(r&&"[object DataView]"!=y(new r(new ArrayBuffer(1)))||i&&"[object Map]"!=y(new i)||a&&"[object Promise]"!=y(a.resolve())||o&&"[object Set]"!=y(new o)||s&&"[object WeakMap]"!=y(new s))&&(y=function(t){var e=u(t),n="[object Object]"==e?t.constructor:void 0,r=n?c(n):"";if(r)switch(r){case l:return"[object DataView]";case f:return"[object Map]";case h:return"[object Promise]";case d:return"[object Set]";case p:return"[object WeakMap]"}return e}),t.exports=y},function(t,e,n){var r=n(28),i=n(16);t.exports=function(t){return"symbol"==typeof t||i(t)&&"[object Symbol]"==r(t)}},function(t,e,n){var r;try{r={defaults:n(137),each:n(79),isFunction:n(31),isPlainObject:n(141),pick:n(144),has:n(85),range:n(145),uniqueId:n(146)}}catch(t){}r||(r=window._),t.exports=r},function(t,e,n){(function(t,r){var i=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,13],n=[1,16],r=[1,14],i=[1,15],a=[1,17],o=[1,18],s=[1,20],u=[1,21],c=[1,22],l=[6,8],f=[1,31],h=[1,32],d=[1,33],p=[1,34],y=[1,35],g=[1,36],m=[6,8,14,20,28,31,32,33,34,35,36],v=[6,8,12,14,20,24,28,31,32,33,34,35,36,52,53,54],b=[28,52,53,54],x=[28,35,36,52,53,54],_=[28,31,32,33,34,52,53,54],w=[6,8,14],k=[1,59],E={trace:function(){},yy:{},symbols_:{error:2,mermaidDoc:3,graphConfig:4,CLASS_DIAGRAM:5,NEWLINE:6,statements:7,EOF:8,statement:9,className:10,alphaNumToken:11,GENERICTYPE:12,relationStatement:13,LABEL:14,classStatement:15,methodStatement:16,annotationStatement:17,clickStatement:18,CLASS:19,STRUCT_START:20,members:21,STRUCT_STOP:22,ANNOTATION_START:23,ANNOTATION_END:24,MEMBER:25,SEPARATOR:26,relation:27,STR:28,relationType:29,lineType:30,AGGREGATION:31,EXTENSION:32,COMPOSITION:33,DEPENDENCY:34,LINE:35,DOTTED_LINE:36,CALLBACK:37,LINK:38,commentToken:39,textToken:40,graphCodeTokens:41,textNoTagsToken:42,TAGSTART:43,TAGEND:44,"==":45,"--":46,PCT:47,DEFAULT:48,SPACE:49,MINUS:50,keywords:51,UNICODE_TEXT:52,NUM:53,ALPHA:54,$accept:0,$end:1},terminals_:{2:"error",5:"CLASS_DIAGRAM",6:"NEWLINE",8:"EOF",12:"GENERICTYPE",14:"LABEL",19:"CLASS",20:"STRUCT_START",22:"STRUCT_STOP",23:"ANNOTATION_START",24:"ANNOTATION_END",25:"MEMBER",26:"SEPARATOR",28:"STR",31:"AGGREGATION",32:"EXTENSION",33:"COMPOSITION",34:"DEPENDENCY",35:"LINE",36:"DOTTED_LINE",37:"CALLBACK",38:"LINK",41:"graphCodeTokens",43:"TAGSTART",44:"TAGEND",45:"==",46:"--",47:"PCT",48:"DEFAULT",49:"SPACE",50:"MINUS",51:"keywords",52:"UNICODE_TEXT",53:"NUM",54:"ALPHA"},productions_:[0,[3,1],[4,4],[7,1],[7,2],[7,3],[10,2],[10,1],[10,3],[10,2],[9,1],[9,2],[9,1],[9,1],[9,1],[9,1],[15,2],[15,5],[17,4],[21,1],[21,2],[16,1],[16,2],[16,1],[16,1],[13,3],[13,4],[13,4],[13,5],[27,3],[27,2],[27,2],[27,1],[29,1],[29,1],[29,1],[29,1],[30,1],[30,1],[18,3],[18,4],[18,3],[18,4],[39,1],[39,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[42,1],[42,1],[42,1],[42,1],[11,1],[11,1],[11,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 6:this.$=a[s-1]+a[s];break;case 7:this.$=a[s];break;case 8:this.$=a[s-2]+"~"+a[s-1]+a[s];break;case 9:this.$=a[s-1]+"~"+a[s];break;case 10:r.addRelation(a[s]);break;case 11:a[s-1].title=r.cleanupLabel(a[s]),r.addRelation(a[s-1]);break;case 16:r.addClass(a[s]);break;case 17:r.addClass(a[s-3]),r.addMembers(a[s-3],a[s-1]);break;case 18:r.addAnnotation(a[s],a[s-2]);break;case 19:this.$=[a[s]];break;case 20:a[s].push(a[s-1]),this.$=a[s];break;case 21:break;case 22:r.addMember(a[s-1],r.cleanupLabel(a[s]));break;case 23:case 24:break;case 25:this.$={id1:a[s-2],id2:a[s],relation:a[s-1],relationTitle1:"none",relationTitle2:"none"};break;case 26:this.$={id1:a[s-3],id2:a[s],relation:a[s-1],relationTitle1:a[s-2],relationTitle2:"none"};break;case 27:this.$={id1:a[s-3],id2:a[s],relation:a[s-2],relationTitle1:"none",relationTitle2:a[s-1]};break;case 28:this.$={id1:a[s-4],id2:a[s],relation:a[s-2],relationTitle1:a[s-3],relationTitle2:a[s-1]};break;case 29:this.$={type1:a[s-2],type2:a[s],lineType:a[s-1]};break;case 30:this.$={type1:"none",type2:a[s],lineType:a[s-1]};break;case 31:this.$={type1:a[s-1],type2:"none",lineType:a[s]};break;case 32:this.$={type1:"none",type2:"none",lineType:a[s]};break;case 33:this.$=r.relationType.AGGREGATION;break;case 34:this.$=r.relationType.EXTENSION;break;case 35:this.$=r.relationType.COMPOSITION;break;case 36:this.$=r.relationType.DEPENDENCY;break;case 37:this.$=r.lineType.LINE;break;case 38:this.$=r.lineType.DOTTED_LINE;break;case 39:this.$=a[s-2],r.setClickEvent(a[s-1],a[s],void 0);break;case 40:this.$=a[s-3],r.setClickEvent(a[s-2],a[s-1],a[s]);break;case 41:this.$=a[s-2],r.setLink(a[s-1],a[s],void 0);break;case 42:this.$=a[s-3],r.setLink(a[s-2],a[s-1],a[s])}},table:[{3:1,4:2,5:[1,3]},{1:[3]},{1:[2,1]},{6:[1,4]},{7:5,9:6,10:12,11:19,13:7,15:8,16:9,17:10,18:11,19:e,23:n,25:r,26:i,37:a,38:o,52:s,53:u,54:c},{8:[1,23]},{6:[1,24],8:[2,3]},t(l,[2,10],{14:[1,25]}),t(l,[2,12]),t(l,[2,13]),t(l,[2,14]),t(l,[2,15]),t(l,[2,21],{27:26,29:29,30:30,14:[1,28],28:[1,27],31:f,32:h,33:d,34:p,35:y,36:g}),{10:37,11:19,52:s,53:u,54:c},t(l,[2,23]),t(l,[2,24]),{11:38,52:s,53:u,54:c},{10:39,11:19,52:s,53:u,54:c},{10:40,11:19,52:s,53:u,54:c},t(m,[2,7],{11:19,10:41,12:[1,42],52:s,53:u,54:c}),t(v,[2,56]),t(v,[2,57]),t(v,[2,58]),{1:[2,2]},{7:43,8:[2,4],9:6,10:12,11:19,13:7,15:8,16:9,17:10,18:11,19:e,23:n,25:r,26:i,37:a,38:o,52:s,53:u,54:c},t(l,[2,11]),{10:44,11:19,28:[1,45],52:s,53:u,54:c},{27:46,29:29,30:30,31:f,32:h,33:d,34:p,35:y,36:g},t(l,[2,22]),{30:47,35:y,36:g},t(b,[2,32],{29:48,31:f,32:h,33:d,34:p}),t(x,[2,33]),t(x,[2,34]),t(x,[2,35]),t(x,[2,36]),t(_,[2,37]),t(_,[2,38]),t(l,[2,16],{20:[1,49]}),{24:[1,50]},{28:[1,51]},{28:[1,52]},t(m,[2,6]),t(m,[2,9],{11:19,10:53,52:s,53:u,54:c}),{8:[2,5]},t(w,[2,25]),{10:54,11:19,52:s,53:u,54:c},{10:55,11:19,28:[1,56],52:s,53:u,54:c},t(b,[2,31],{29:57,31:f,32:h,33:d,34:p}),t(b,[2,30]),{21:58,25:k},{10:60,11:19,52:s,53:u,54:c},t(l,[2,39],{28:[1,61]}),t(l,[2,41],{28:[1,62]}),t(m,[2,8]),t(w,[2,27]),t(w,[2,26]),{10:63,11:19,52:s,53:u,54:c},t(b,[2,29]),{22:[1,64]},{21:65,22:[2,19],25:k},t(l,[2,18]),t(l,[2,40]),t(l,[2,42]),t(w,[2,28]),t(l,[2,17]),{22:[2,20]}],defaultActions:{2:[2,1],23:[2,2],43:[2,5],65:[2,20]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",u=0,c=0,l=0,f=2,h=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),y={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(y.yy[g]=this.yy[g]);p.setInput(t,y.yy),y.yy.lexer=p,y.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||h)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var x,_,w,k,E,A,T,S,M,O={};;){if(w=n[n.length-1],this.defaultActions[w]?k=this.defaultActions[w]:(null==x&&(x=b()),k=o[w]&&o[w][x]),void 0===k||!k.length||!k[0]){var N="";for(A in M=[],o[w])this.terminals_[A]&&A>f&&M.push("'"+this.terminals_[A]+"'");N=p.showPosition?"Parse error on line "+(u+1)+":\n"+p.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(u+1)+": Unexpected "+(x==h?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(N,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:m,expected:M})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),i.push(p.yytext),a.push(p.yylloc),n.push(k[1]),x=null,_?(x=_,_=null):(c=p.yyleng,s=p.yytext,u=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(T=this.productions_[k[1]][1],O.$=i[i.length-T],O._$={first_line:a[a.length-(T||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(T||1)].first_column,last_column:a[a.length-1].last_column},v&&(O._$.range=[a[a.length-(T||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(O,[s,c,u,y.yy,k[1],i,a].concat(d))))return E;T&&(n=n.slice(0,-1*T*2),i=i.slice(0,-1*T),a=a.slice(0,-1*T)),n.push(this.productions_[k[1]][0]),i.push(O.$),a.push(O._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}},A={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,e,n,r){switch(n){case 0:break;case 1:return 6;case 2:break;case 3:return 5;case 4:return this.begin("struct"),20;case 5:return"EOF_IN_STRUCT";case 6:return"OPEN_IN_STRUCT";case 7:return this.popState(),22;case 8:break;case 9:return"MEMBER";case 10:return 19;case 11:return 37;case 12:return 38;case 13:return 23;case 14:return 24;case 15:this.begin("generic");break;case 16:this.popState();break;case 17:return"GENERICTYPE";case 18:this.begin("string");break;case 19:this.popState();break;case 20:return"STR";case 21:case 22:return 32;case 23:case 24:return 34;case 25:return 33;case 26:return 31;case 27:return 35;case 28:return 36;case 29:return 14;case 30:return 50;case 31:return"DOT";case 32:return"PLUS";case 33:return 47;case 34:case 35:return"EQUALS";case 36:return 54;case 37:return"PUNCTUATION";case 38:return 53;case 39:return 52;case 40:return 49;case 41:return 8}},rules:[/^(?:%%[^\n]*\n*)/,/^(?:\n+)/,/^(?:\s+)/,/^(?:classDiagram\b)/,/^(?:[\{])/,/^(?:$)/,/^(?:[\{])/,/^(?:\})/,/^(?:[\n])/,/^(?:[^\{\}\n]*)/,/^(?:class\b)/,/^(?:callback\b)/,/^(?:link\b)/,/^(?:<<)/,/^(?:>>)/,/^(?:[~])/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:\s*<\|)/,/^(?:\s*\|>)/,/^(?:\s*>)/,/^(?:\s*<)/,/^(?:\s*\*)/,/^(?:\s*o\b)/,/^(?:--)/,/^(?:\.\.)/,/^(?::[^\n;]+)/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:\w+)/,/^(?:[!"#$%&'*+,-.`?\\/])/,/^(?:[0-9]+)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\s)/,/^(?:$)/],conditions:{string:{rules:[19,20],inclusive:!1},generic:{rules:[16,17],inclusive:!1},struct:{rules:[5,6,7,8,9],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,10,11,12,13,14,15,18,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41],inclusive:!0}}};function T(){this.yy={}}return E.lexer=A,T.prototype=E,E.Parser=T,new T}();e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(r){r[1]||(console.log("Usage: "+r[0]+" FILE"),t.exit(1));var i=n(14).readFileSync(n(15).normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n(11),n(6)(t))},function(t){t.exports=JSON.parse('{"name":"mermaid","version":"8.5.1","description":"Markdownish syntax for generating flowcharts, sequence diagrams, class diagrams, gantt charts and git graphs.","main":"dist/mermaid.core.js","keywords":["diagram","markdown","flowchart","sequence diagram","gantt","class diagram","git graph"],"scripts":{"build":"webpack --progress --colors -p","postbuild":"documentation build src/mermaidAPI.js --shallow -f md --markdown-toc false -o docs/mermaidAPI.md","build:watch":"yarn build --watch","minify":"minify ./dist/mermaid.js > ./dist/mermaid.min.js","release":"yarn build -p --config webpack.config.prod.babel.js","lint":"eslint src","e2e:depr":"yarn lint && jest e2e --config e2e/jest.config.js","cypress":"percy exec -- cypress run","e2e":"start-server-and-test dev http://localhost:9000/ cypress","e2e-upd":"yarn lint && jest e2e -u --config e2e/jest.config.js","dev":"webpack-dev-server --config webpack.config.e2e.js","test":"yarn lint && jest src/.*","test:watch":"jest --watch src","prepublishOnly":"yarn build && yarn release && yarn test && yarn e2e","prepush":"yarn test","prepare":"yarn build"},"repository":{"type":"git","url":"https://github.com/knsv/mermaid"},"author":"Knut Sveidqvist","license":"MIT","standard":{"ignore":["**/parser/*.js","dist/**/*.js","cypress/**/*.js"],"globals":["page"]},"dependencies":{"@braintree/sanitize-url":"^3.1.0","crypto-random-string":"^3.0.1","d3":"^5.7.0","dagre":"^0.8.4","dagre-d3":"^0.6.4","entity-decode":"^2.0.2","graphlib":"^2.1.7","he":"^1.2.0","minify":"^4.1.1","moment-mini":"^2.22.1","scope-css":"^1.2.1"},"devDependencies":{"@babel/core":"^7.2.2","@babel/preset-env":"^7.8.4","@babel/register":"^7.0.0","@percy/cypress":"*","babel-core":"7.0.0-bridge.0","babel-jest":"^24.9.0","babel-loader":"^8.0.4","coveralls":"^3.0.2","css-loader":"^2.0.1","css-to-string-loader":"^0.1.3","cypress":"4.0.1","documentation":"^12.0.1","eslint":"^6.3.0","eslint-config-prettier":"^6.3.0","eslint-plugin-prettier":"^3.1.0","husky":"^1.2.1","identity-obj-proxy":"^3.0.0","jest":"^24.9.0","jison":"^0.4.18","moment":"^2.23.0","node-sass":"^4.12.0","prettier":"^1.18.2","puppeteer":"^1.17.0","sass-loader":"^7.1.0","start-server-and-test":"^1.10.6","terser-webpack-plugin":"^2.2.2","webpack":"^4.41.2","webpack-bundle-analyzer":"^3.7.0","webpack-cli":"^3.1.2","webpack-dev-server":"^3.4.1","webpack-node-externals":"^1.7.2","yarn-upgrade-all":"^0.5.0"},"files":["dist"],"yarn-upgrade-all":{"ignore":["babel-core"]},"sideEffects":["**/*.css","**/*.scss"]}')},function(t,e,n){var r=n(51),i=n(52);t.exports=function(t,e,n,a){var o=!n;n||(n={});for(var s=-1,u=e.length;++s<u;){var c=e[s],l=a?a(n[c],t[c],c,n,t):void 0;void 0===l&&(l=t[c]),o?i(n,c,l):r(n,c,l)}return n}},function(t,e,n){var r=n(201),i=n(16),a=Object.prototype,o=a.hasOwnProperty,s=a.propertyIsEnumerable,u=r(function(){return arguments}())?r:function(t){return i(t)&&o.call(t,"callee")&&!s.call(t,"callee")};t.exports=u},function(t,e,n){var r=n(203),i=n(54),a=n(73),o=a&&a.isTypedArray,s=o?i(o):r;t.exports=s},function(t,e,n){var r=n(36);t.exports=function(t){if("string"==typeof t||r(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}},function(t,e,n){var r=n(10);t.exports=function(t,e){var n=t.append("foreignObject").attr("width","100000"),i=n.append("xhtml:div");i.attr("xmlns","http://www.w3.org/1999/xhtml");var a=e.label;switch(typeof a){case"function":i.insert(a);break;case"object":i.insert((function(){return a}));break;default:i.html(a)}r.applyStyle(i,e.labelStyle),i.style("display","inline-block"),i.style("white-space","nowrap");var o=i.node().getBoundingClientRect();return n.attr("width",o.width).attr("height",o.height),n}},function(t,e,n){"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n=function(t,e){var n=t[1]||"",r=t[3];if(!r)return n;if(e&&"function"==typeof btoa){var i=(o=r,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */"),a=r.sources.map((function(t){return"/*# sourceURL="+r.sourceRoot+t+" */"}));return[n].concat(a).concat([i]).join("\n")}var o;return[n].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+n+"}":n})).join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var r={},i=0;i<this.length;i++){var a=this[i][0];null!=a&&(r[a]=!0)}for(i=0;i<t.length;i++){var o=t[i];null!=o[0]&&r[o[0]]||(n&&!o[2]?o[2]=n:n&&(o[2]="("+o[2]+") and ("+n+")"),e.push(o))}},e}},function(t,e,n){var r=n(47),i=n(175),a=n(176),o=n(177),s=n(178),u=n(179);function c(t){var e=this.__data__=new r(t);this.size=e.size}c.prototype.clear=i,c.prototype.delete=a,c.prototype.get=o,c.prototype.has=s,c.prototype.set=u,t.exports=c},function(t,e,n){var r=n(170),i=n(171),a=n(172),o=n(173),s=n(174);function u(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=i,u.prototype.get=a,u.prototype.has=o,u.prototype.set=s,t.exports=u},function(t,e,n){var r=n(30);t.exports=function(t,e){for(var n=t.length;n--;)if(r(t[n][0],e))return n;return-1}},function(t,e,n){var r=n(27)(Object,"create");t.exports=r},function(t,e,n){var r=n(195);t.exports=function(t,e){var n=t.__data__;return r(e)?n["string"==typeof e?"string":"hash"]:n.map}},function(t,e,n){var r=n(52),i=n(30),a=Object.prototype.hasOwnProperty;t.exports=function(t,e,n){var o=t[e];a.call(t,e)&&i(o,n)&&(void 0!==n||e in t)||r(t,e,n)}},function(t,e,n){var r=n(94);t.exports=function(t,e,n){"__proto__"==e&&r?r(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}},function(t,e){var n=/^(?:0|[1-9]\d*)$/;t.exports=function(t,e){var r=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==r||"symbol"!=r&&n.test(t))&&t>-1&&t%1==0&&t<e}},function(t,e){t.exports=function(t){return function(e){return t(e)}}},function(t,e){var n=Object.prototype;t.exports=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||n)}},function(t,e,n){var r=n(96)(Object.getPrototypeOf,Object);t.exports=r},function(t,e,n){var r=n(80),i=n(224)(r);t.exports=i},function(t,e,n){var r=n(4),i=n(84),a=n(238),o=n(118);t.exports=function(t,e){return r(t)?t:i(t,e)?[t]:a(o(t))}},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}},function(t,e,n){var r=n(29),i=n(126),a=n(127);t.exports=function(t,e){return a(i(t,e,r),t+"")}},function(t,e,n){var r=n(30),i=n(19),a=n(53),o=n(9);t.exports=function(t,e,n){if(!o(n))return!1;var s=typeof e;return!!("number"==s?i(n)&&a(e,n.length):"string"==s&&e in n)&&r(n[e],t)}},function(t,e,n){"use strict";var r=n(3);t.exports={longestPath:function(t){var e={};r.forEach(t.sources(),(function n(i){var a=t.node(i);if(r.has(e,i))return a.rank;e[i]=!0;var o=r.min(r.map(t.outEdges(i),(function(e){return n(e.w)-t.edge(e).minlen})));return o!==Number.POSITIVE_INFINITY&&null!=o||(o=0),a.rank=o}))},slack:function(t,e){return t.node(e.w).rank-t.node(e.v).rank-t.edge(e).minlen}}},function(t,e,n){"use strict";var r=/^(%20|\s)*(javascript|data)/im,i=/[^\x20-\x7E]/gim,a=/^([^:]+):/gm,o=[".","/"];t.exports={sanitizeUrl:function(t){if(!t)return"about:blank";var e,n,s=t.replace(i,"").trim();return function(t){return o.indexOf(t[0])>-1}(s)?s:(n=s.match(a))?(e=n[0],r.test(e)?"about:blank":s):"about:blank"}}},function(t,e,n){(function(t,r){var i=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[2,3],n=[1,7],r=[7,12,15,17,19,20,21],i=[7,11,12,15,17,19,20,21],a=[2,20],o=[1,32],s={trace:function(){},yy:{},symbols_:{error:2,start:3,GG:4,":":5,document:6,EOF:7,DIR:8,options:9,body:10,OPT:11,NL:12,line:13,statement:14,COMMIT:15,commit_arg:16,BRANCH:17,ID:18,CHECKOUT:19,MERGE:20,RESET:21,reset_arg:22,STR:23,HEAD:24,reset_parents:25,CARET:26,$accept:0,$end:1},terminals_:{2:"error",4:"GG",5:":",7:"EOF",8:"DIR",11:"OPT",12:"NL",15:"COMMIT",17:"BRANCH",18:"ID",19:"CHECKOUT",20:"MERGE",21:"RESET",23:"STR",24:"HEAD",26:"CARET"},productions_:[0,[3,4],[3,5],[6,0],[6,2],[9,2],[9,1],[10,0],[10,2],[13,2],[13,1],[14,2],[14,2],[14,2],[14,2],[14,2],[16,0],[16,1],[22,2],[22,2],[25,0],[25,2]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 1:return a[s-1];case 2:return r.setDirection(a[s-3]),a[s-1];case 4:r.setOptions(a[s-1]),this.$=a[s];break;case 5:a[s-1]+=a[s],this.$=a[s-1];break;case 7:this.$=[];break;case 8:a[s-1].push(a[s]),this.$=a[s-1];break;case 9:this.$=a[s-1];break;case 11:r.commit(a[s]);break;case 12:r.branch(a[s]);break;case 13:r.checkout(a[s]);break;case 14:r.merge(a[s]);break;case 15:r.reset(a[s]);break;case 16:this.$="";break;case 17:this.$=a[s];break;case 18:this.$=a[s-1]+":"+a[s];break;case 19:this.$=a[s-1]+":"+r.count,r.count=0;break;case 20:r.count=0;break;case 21:r.count+=1}},table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3],8:[1,4]},{6:5,7:e,9:6,12:n},{5:[1,8]},{7:[1,9]},t(r,[2,7],{10:10,11:[1,11]}),t(i,[2,6]),{6:12,7:e,9:6,12:n},{1:[2,1]},{7:[2,4],12:[1,15],13:13,14:14,15:[1,16],17:[1,17],19:[1,18],20:[1,19],21:[1,20]},t(i,[2,5]),{7:[1,21]},t(r,[2,8]),{12:[1,22]},t(r,[2,10]),{12:[2,16],16:23,23:[1,24]},{18:[1,25]},{18:[1,26]},{18:[1,27]},{18:[1,30],22:28,24:[1,29]},{1:[2,2]},t(r,[2,9]),{12:[2,11]},{12:[2,17]},{12:[2,12]},{12:[2,13]},{12:[2,14]},{12:[2,15]},{12:a,25:31,26:o},{12:a,25:33,26:o},{12:[2,18]},{12:a,25:34,26:o},{12:[2,19]},{12:[2,21]}],defaultActions:{9:[2,1],21:[2,2],23:[2,11],24:[2,17],25:[2,12],26:[2,13],27:[2,14],28:[2,15],31:[2,18],33:[2,19],34:[2,21]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",u=0,c=0,l=0,f=2,h=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),y={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(y.yy[g]=this.yy[g]);p.setInput(t,y.yy),y.yy.lexer=p,y.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||h)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var x,_,w,k,E,A,T,S,M,O={};;){if(w=n[n.length-1],this.defaultActions[w]?k=this.defaultActions[w]:(null==x&&(x=b()),k=o[w]&&o[w][x]),void 0===k||!k.length||!k[0]){var N="";for(A in M=[],o[w])this.terminals_[A]&&A>f&&M.push("'"+this.terminals_[A]+"'");N=p.showPosition?"Parse error on line "+(u+1)+":\n"+p.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(u+1)+": Unexpected "+(x==h?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(N,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:m,expected:M})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),i.push(p.yytext),a.push(p.yylloc),n.push(k[1]),x=null,_?(x=_,_=null):(c=p.yyleng,s=p.yytext,u=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(T=this.productions_[k[1]][1],O.$=i[i.length-T],O._$={first_line:a[a.length-(T||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(T||1)].first_column,last_column:a[a.length-1].last_column},v&&(O._$.range=[a[a.length-(T||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(O,[s,c,u,y.yy,k[1],i,a].concat(d))))return E;T&&(n=n.slice(0,-1*T*2),i=i.slice(0,-1*T),a=a.slice(0,-1*T)),n.push(this.productions_[k[1]][0]),i.push(O.$),a.push(O._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}},u={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return 12;case 1:case 2:case 3:break;case 4:return 4;case 5:return 15;case 6:return 17;case 7:return 20;case 8:return 21;case 9:return 19;case 10:case 11:return 8;case 12:return 5;case 13:return 26;case 14:this.begin("options");break;case 15:this.popState();break;case 16:return 11;case 17:this.begin("string");break;case 18:this.popState();break;case 19:return 23;case 20:return 18;case 21:return 7}},rules:[/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:gitGraph\b)/i,/^(?:commit\b)/i,/^(?:branch\b)/i,/^(?:merge\b)/i,/^(?:reset\b)/i,/^(?:checkout\b)/i,/^(?:LR\b)/i,/^(?:BT\b)/i,/^(?::)/i,/^(?:\^)/i,/^(?:options\r?\n)/i,/^(?:end\r?\n)/i,/^(?:[^\n]+\r?\n)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[a-zA-Z][a-zA-Z0-9_]+)/i,/^(?:$)/i],conditions:{options:{rules:[15,16],inclusive:!1},string:{rules:[18,19],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,17,20,21],inclusive:!0}}};function c(){this.yy={}}return s.lexer=u,c.prototype=s,s.Parser=c,new c}();e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(r){r[1]||(console.log("Usage: "+r[0]+" FILE"),t.exit(1));var i=n(14).readFileSync(n(15).normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n(11),n(6)(t))},function(t,e,n){(function(t,r){var i=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[6,9,10],n={trace:function(){},yy:{},symbols_:{error:2,start:3,info:4,document:5,EOF:6,line:7,statement:8,NL:9,showInfo:10,$accept:0,$end:1},terminals_:{2:"error",4:"info",6:"EOF",9:"NL",10:"showInfo"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[8,1]],performAction:function(t,e,n,r,i,a,o){a.length;switch(i){case 1:return r;case 4:break;case 6:r.setInfo(!0)}},table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:6,9:[1,7],10:[1,8]},{1:[2,1]},t(e,[2,3]),t(e,[2,4]),t(e,[2,5]),t(e,[2,6])],defaultActions:{4:[2,1]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",u=0,c=0,l=0,f=2,h=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),y={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(y.yy[g]=this.yy[g]);p.setInput(t,y.yy),y.yy.lexer=p,y.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||h)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var x,_,w,k,E,A,T,S,M,O={};;){if(w=n[n.length-1],this.defaultActions[w]?k=this.defaultActions[w]:(null==x&&(x=b()),k=o[w]&&o[w][x]),void 0===k||!k.length||!k[0]){var N="";for(A in M=[],o[w])this.terminals_[A]&&A>f&&M.push("'"+this.terminals_[A]+"'");N=p.showPosition?"Parse error on line "+(u+1)+":\n"+p.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(u+1)+": Unexpected "+(x==h?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(N,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:m,expected:M})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),i.push(p.yytext),a.push(p.yylloc),n.push(k[1]),x=null,_?(x=_,_=null):(c=p.yyleng,s=p.yytext,u=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(T=this.productions_[k[1]][1],O.$=i[i.length-T],O._$={first_line:a[a.length-(T||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(T||1)].first_column,last_column:a[a.length-1].last_column},v&&(O._$.range=[a[a.length-(T||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(O,[s,c,u,y.yy,k[1],i,a].concat(d))))return E;T&&(n=n.slice(0,-1*T*2),i=i.slice(0,-1*T),a=a.slice(0,-1*T)),n.push(this.productions_[k[1]][0]),i.push(O.$),a.push(O._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}},r={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return 4;case 1:return 9;case 2:return"space";case 3:return 10;case 4:return 6;case 5:return"TXT"}},rules:[/^(?:info\b)/i,/^(?:[\s\n\r]+)/i,/^(?:[\s]+)/i,/^(?:showInfo\b)/i,/^(?:$)/i,/^(?:.)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5],inclusive:!0}}};function i(){this.yy={}}return n.lexer=r,i.prototype=n,n.Parser=i,new i}();e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(r){r[1]||(console.log("Usage: "+r[0]+" FILE"),t.exit(1));var i=n(14).readFileSync(n(15).normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n(11),n(6)(t))},function(t,e,n){(function(t,r){var i=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[6,9,10,12],n={trace:function(){},yy:{},symbols_:{error:2,start:3,pie:4,document:5,EOF:6,line:7,statement:8,NL:9,STR:10,VALUE:11,title:12,$accept:0,$end:1},terminals_:{2:"error",4:"pie",6:"EOF",9:"NL",10:"STR",11:"VALUE",12:"title"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[8,2],[8,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 4:break;case 6:r.addSection(a[s-1],r.cleanupValue(a[s]));break;case 7:r.setTitle(a[s].substr(6)),this.$=a[s].substr(6)}},table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:6,9:[1,7],10:[1,8],12:[1,9]},{1:[2,1]},t(e,[2,3]),t(e,[2,4]),t(e,[2,5]),{11:[1,10]},t(e,[2,7]),t(e,[2,6])],defaultActions:{4:[2,1]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",u=0,c=0,l=0,f=2,h=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),y={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(y.yy[g]=this.yy[g]);p.setInput(t,y.yy),y.yy.lexer=p,y.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||h)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var x,_,w,k,E,A,T,S,M,O={};;){if(w=n[n.length-1],this.defaultActions[w]?k=this.defaultActions[w]:(null==x&&(x=b()),k=o[w]&&o[w][x]),void 0===k||!k.length||!k[0]){var N="";for(A in M=[],o[w])this.terminals_[A]&&A>f&&M.push("'"+this.terminals_[A]+"'");N=p.showPosition?"Parse error on line "+(u+1)+":\n"+p.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(u+1)+": Unexpected "+(x==h?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(N,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:m,expected:M})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),i.push(p.yytext),a.push(p.yylloc),n.push(k[1]),x=null,_?(x=_,_=null):(c=p.yyleng,s=p.yytext,u=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(T=this.productions_[k[1]][1],O.$=i[i.length-T],O._$={first_line:a[a.length-(T||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(T||1)].first_column,last_column:a[a.length-1].last_column},v&&(O._$.range=[a[a.length-(T||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(O,[s,c,u,y.yy,k[1],i,a].concat(d))))return E;T&&(n=n.slice(0,-1*T*2),i=i.slice(0,-1*T),a=a.slice(0,-1*T)),n.push(this.productions_[k[1]][0]),i.push(O.$),a.push(O._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}},r={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:case 1:break;case 2:return 4;case 3:return 9;case 4:return"space";case 5:return 12;case 6:this.begin("string");break;case 7:this.popState();break;case 8:return"STR";case 9:return"VALUE";case 10:return 6}},rules:[/^(?:%%[^\n]*)/i,/^(?:\s+)/i,/^(?:pie\b)/i,/^(?:[\s\n\r]+)/i,/^(?:[\s]+)/i,/^(?:title\s[^#\n;]+)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?::[\s]*[\d]+(?:\.[\d]+)?)/i,/^(?:$)/i],conditions:{string:{rules:[7,8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,9,10],inclusive:!0}}};function i(){this.yy={}}return n.lexer=r,i.prototype=n,n.Parser=i,new i}();e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(r){r[1]||(console.log("Usage: "+r[0]+" FILE"),t.exit(1));var i=n(14).readFileSync(n(15).normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n(11),n(6)(t))},function(t,e,n){(function(t,r){var i=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[6,12],n=[1,7],r=[1,10],i=[1,11],a=[1,12],o=[1,13],s=[12,19,20],u=[15,16,17,18],c={trace:function(){},yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,statement:7,entityName:8,relSpec:9,":":10,role:11,ALPHANUM:12,cardinality:13,relType:14,ZERO_OR_ONE:15,ZERO_OR_MORE:16,ONE_OR_MORE:17,ONLY_ONE:18,NON_IDENTIFYING:19,IDENTIFYING:20,STR:21,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",10:":",12:"ALPHANUM",15:"ZERO_OR_ONE",16:"ZERO_OR_MORE",17:"ONE_OR_MORE",18:"ONLY_ONE",19:"NON_IDENTIFYING",20:"IDENTIFYING",21:"STR"},productions_:[0,[3,3],[5,0],[5,2],[7,5],[8,1],[9,3],[13,1],[13,1],[13,1],[13,1],[14,1],[14,1],[11,1],[11,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 1:break;case 4:r.addEntity(a[s-4]),r.addEntity(a[s-2]),r.addRelationship(a[s-4],a[s],a[s-2],a[s-3]);break;case 5:this.$=a[s];break;case 6:this.$={cardA:a[s],relType:a[s-1],cardB:a[s-2]};break;case 7:this.$=r.Cardinality.ZERO_OR_ONE;break;case 8:this.$=r.Cardinality.ZERO_OR_MORE;break;case 9:this.$=r.Cardinality.ONE_OR_MORE;break;case 10:this.$=r.Cardinality.ONLY_ONE;break;case 11:this.$=r.Identification.NON_IDENTIFYING;break;case 12:this.$=r.Identification.IDENTIFYING;break;case 13:case 14:this.$=a[s]}},table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:6,12:n},{1:[2,1]},t(e,[2,3]),{9:8,13:9,15:r,16:i,17:a,18:o},t([10,15,16,17,18],[2,5]),{8:14,12:n},{14:15,19:[1,16],20:[1,17]},t(s,[2,7]),t(s,[2,8]),t(s,[2,9]),t(s,[2,10]),{10:[1,18]},{13:19,15:r,16:i,17:a,18:o},t(u,[2,11]),t(u,[2,12]),{11:20,12:[1,22],21:[1,21]},{12:[2,6]},t(e,[2,4]),t(e,[2,13]),t(e,[2,14])],defaultActions:{4:[2,1],19:[2,6]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",u=0,c=0,l=0,f=2,h=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),y={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(y.yy[g]=this.yy[g]);p.setInput(t,y.yy),y.yy.lexer=p,y.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||h)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var x,_,w,k,E,A,T,S,M,O={};;){if(w=n[n.length-1],this.defaultActions[w]?k=this.defaultActions[w]:(null==x&&(x=b()),k=o[w]&&o[w][x]),void 0===k||!k.length||!k[0]){var N="";for(A in M=[],o[w])this.terminals_[A]&&A>f&&M.push("'"+this.terminals_[A]+"'");N=p.showPosition?"Parse error on line "+(u+1)+":\n"+p.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(u+1)+": Unexpected "+(x==h?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(N,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:m,expected:M})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+x);switch(k[0]){case 1:n.push(x),i.push(p.yytext),a.push(p.yylloc),n.push(k[1]),x=null,_?(x=_,_=null):(c=p.yyleng,s=p.yytext,u=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(T=this.productions_[k[1]][1],O.$=i[i.length-T],O._$={first_line:a[a.length-(T||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(T||1)].first_column,last_column:a[a.length-1].last_column},v&&(O._$.range=[a[a.length-(T||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(O,[s,c,u,y.yy,k[1],i,a].concat(d))))return E;T&&(n=n.slice(0,-1*T*2),i=i.slice(0,-1*T),a=a.slice(0,-1*T)),n.push(this.productions_[k[1]][0]),i.push(O.$),a.push(O._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}},l={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:break;case 1:return"SPACE";case 2:this.begin("string");break;case 3:this.popState();break;case 4:return 21;case 5:return 4;case 6:return 15;case 7:return 16;case 8:return 17;case 9:return 18;case 10:return 15;case 11:return 16;case 12:return 17;case 13:return 19;case 14:return 20;case 15:case 16:return 19;case 17:return 12;case 18:return e.yytext[0];case 19:return 6}},rules:[/^(?:\s+)/i,/^(?:[\s]+)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:erDiagram\b)/i,/^(?:\|o\b)/i,/^(?:\}o\b)/i,/^(?:\}\|)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:[A-Za-z][A-Za-z0-9\-]*)/i,/^(?:.)/i,/^(?:$)/i],conditions:{string:{rules:[3,4],inclusive:!1},INITIAL:{rules:[0,1,2,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19],inclusive:!0}}};function f(){this.yy={}}return c.lexer=l,f.prototype=c,c.Parser=f,new f}();e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(r){r[1]||(console.log("Usage: "+r[0]+" FILE"),t.exit(1));var i=n(14).readFileSync(n(15).normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n(11),n(6)(t))},function(t,e,n){"use strict";var r=n(8);t.exports=i;function i(t){this._isDirected=!r.has(t,"directed")||t.directed,this._isMultigraph=!!r.has(t,"multigraph")&&t.multigraph,this._isCompound=!!r.has(t,"compound")&&t.compound,this._label=void 0,this._defaultNodeLabelFn=r.constant(void 0),this._defaultEdgeLabelFn=r.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children["\0"]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}function a(t,e){t[e]?t[e]++:t[e]=1}function o(t,e){--t[e]||delete t[e]}function s(t,e,n,i){var a=""+e,o=""+n;if(!t&&a>o){var s=a;a=o,o=s}return a+""+o+""+(r.isUndefined(i)?"\0":i)}function u(t,e,n,r){var i=""+e,a=""+n;if(!t&&i>a){var o=i;i=a,a=o}var s={v:i,w:a};return r&&(s.name=r),s}function c(t,e){return s(t,e.v,e.w,e.name)}i.prototype._nodeCount=0,i.prototype._edgeCount=0,i.prototype.isDirected=function(){return this._isDirected},i.prototype.isMultigraph=function(){return this._isMultigraph},i.prototype.isCompound=function(){return this._isCompound},i.prototype.setGraph=function(t){return this._label=t,this},i.prototype.graph=function(){return this._label},i.prototype.setDefaultNodeLabel=function(t){return r.isFunction(t)||(t=r.constant(t)),this._defaultNodeLabelFn=t,this},i.prototype.nodeCount=function(){return this._nodeCount},i.prototype.nodes=function(){return r.keys(this._nodes)},i.prototype.sources=function(){var t=this;return r.filter(this.nodes(),(function(e){return r.isEmpty(t._in[e])}))},i.prototype.sinks=function(){var t=this;return r.filter(this.nodes(),(function(e){return r.isEmpty(t._out[e])}))},i.prototype.setNodes=function(t,e){var n=arguments,i=this;return r.each(t,(function(t){n.length>1?i.setNode(t,e):i.setNode(t)})),this},i.prototype.setNode=function(t,e){return r.has(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=e),this):(this._nodes[t]=arguments.length>1?e:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]="\0",this._children[t]={},this._children["\0"][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)},i.prototype.node=function(t){return this._nodes[t]},i.prototype.hasNode=function(t){return r.has(this._nodes,t)},i.prototype.removeNode=function(t){var e=this;if(r.has(this._nodes,t)){var n=function(t){e.removeEdge(e._edgeObjs[t])};delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],r.each(this.children(t),(function(t){e.setParent(t)})),delete this._children[t]),r.each(r.keys(this._in[t]),n),delete this._in[t],delete this._preds[t],r.each(r.keys(this._out[t]),n),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this},i.prototype.setParent=function(t,e){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(r.isUndefined(e))e="\0";else{for(var n=e+="";!r.isUndefined(n);n=this.parent(n))if(n===t)throw new Error("Setting "+e+" as parent of "+t+" would create a cycle");this.setNode(e)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=e,this._children[e][t]=!0,this},i.prototype._removeFromParentsChildList=function(t){delete this._children[this._parent[t]][t]},i.prototype.parent=function(t){if(this._isCompound){var e=this._parent[t];if("\0"!==e)return e}},i.prototype.children=function(t){if(r.isUndefined(t)&&(t="\0"),this._isCompound){var e=this._children[t];if(e)return r.keys(e)}else{if("\0"===t)return this.nodes();if(this.hasNode(t))return[]}},i.prototype.predecessors=function(t){var e=this._preds[t];if(e)return r.keys(e)},i.prototype.successors=function(t){var e=this._sucs[t];if(e)return r.keys(e)},i.prototype.neighbors=function(t){var e=this.predecessors(t);if(e)return r.union(e,this.successors(t))},i.prototype.isLeaf=function(t){return 0===(this.isDirected()?this.successors(t):this.neighbors(t)).length},i.prototype.filterNodes=function(t){var e=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});e.setGraph(this.graph());var n=this;r.each(this._nodes,(function(n,r){t(r)&&e.setNode(r,n)})),r.each(this._edgeObjs,(function(t){e.hasNode(t.v)&&e.hasNode(t.w)&&e.setEdge(t,n.edge(t))}));var i={};return this._isCompound&&r.each(e.nodes(),(function(t){e.setParent(t,function t(r){var a=n.parent(r);return void 0===a||e.hasNode(a)?(i[r]=a,a):a in i?i[a]:t(a)}(t))})),e},i.prototype.setDefaultEdgeLabel=function(t){return r.isFunction(t)||(t=r.constant(t)),this._defaultEdgeLabelFn=t,this},i.prototype.edgeCount=function(){return this._edgeCount},i.prototype.edges=function(){return r.values(this._edgeObjs)},i.prototype.setPath=function(t,e){var n=this,i=arguments;return r.reduce(t,(function(t,r){return i.length>1?n.setEdge(t,r,e):n.setEdge(t,r),r})),this},i.prototype.setEdge=function(){var t,e,n,i,o=!1,c=arguments[0];"object"==typeof c&&null!==c&&"v"in c?(t=c.v,e=c.w,n=c.name,2===arguments.length&&(i=arguments[1],o=!0)):(t=c,e=arguments[1],n=arguments[3],arguments.length>2&&(i=arguments[2],o=!0)),t=""+t,e=""+e,r.isUndefined(n)||(n=""+n);var l=s(this._isDirected,t,e,n);if(r.has(this._edgeLabels,l))return o&&(this._edgeLabels[l]=i),this;if(!r.isUndefined(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(e),this._edgeLabels[l]=o?i:this._defaultEdgeLabelFn(t,e,n);var f=u(this._isDirected,t,e,n);return t=f.v,e=f.w,Object.freeze(f),this._edgeObjs[l]=f,a(this._preds[e],t),a(this._sucs[t],e),this._in[e][l]=f,this._out[t][l]=f,this._edgeCount++,this},i.prototype.edge=function(t,e,n){var r=1===arguments.length?c(this._isDirected,arguments[0]):s(this._isDirected,t,e,n);return this._edgeLabels[r]},i.prototype.hasEdge=function(t,e,n){var i=1===arguments.length?c(this._isDirected,arguments[0]):s(this._isDirected,t,e,n);return r.has(this._edgeLabels,i)},i.prototype.removeEdge=function(t,e,n){var r=1===arguments.length?c(this._isDirected,arguments[0]):s(this._isDirected,t,e,n),i=this._edgeObjs[r];return i&&(t=i.v,e=i.w,delete this._edgeLabels[r],delete this._edgeObjs[r],o(this._preds[e],t),o(this._sucs[t],e),delete this._in[e][r],delete this._out[t][r],this._edgeCount--),this},i.prototype.inEdges=function(t,e){var n=this._in[t];if(n){var i=r.values(n);return e?r.filter(i,(function(t){return t.v===e})):i}},i.prototype.outEdges=function(t,e){var n=this._out[t];if(n){var i=r.values(n);return e?r.filter(i,(function(t){return t.w===e})):i}},i.prototype.nodeEdges=function(t,e){var n=this.inEdges(t,e);if(n)return n.concat(this.outEdges(t,e))}},function(t,e,n){var r=n(27)(n(12),"Map");t.exports=r},function(t,e,n){var r=n(187),i=n(194),a=n(196),o=n(197),s=n(198);function u(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=i,u.prototype.get=a,u.prototype.has=o,u.prototype.set=s,t.exports=u},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}},function(t,e){t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},function(t,e,n){(function(t){var r=n(92),i=e&&!e.nodeType&&e,a=i&&"object"==typeof t&&t&&!t.nodeType&&t,o=a&&a.exports===i&&r.process,s=function(){try{var t=a&&a.require&&a.require("util").types;return t||o&&o.binding&&o.binding("util")}catch(t){}}();t.exports=s}).call(this,n(6)(t))},function(t,e,n){var r=n(55),i=n(204),a=Object.prototype.hasOwnProperty;t.exports=function(t){if(!r(t))return i(t);var e=[];for(var n in Object(t))a.call(t,n)&&"constructor"!=n&&e.push(n);return e}},function(t,e,n){var r=n(99),i=n(100),a=Object.prototype.propertyIsEnumerable,o=Object.getOwnPropertySymbols,s=o?function(t){return null==t?[]:(t=Object(t),r(o(t),(function(e){return a.call(t,e)})))}:i;t.exports=s},function(t,e){t.exports=function(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}},function(t,e,n){var r=n(105);t.exports=function(t){var e=new t.constructor(t.byteLength);return new r(e).set(new r(t)),e}},function(t,e){t.exports=function(t){return function(){return t}}},function(t,e,n){t.exports=n(109)},function(t,e,n){var r=n(81),i=n(25);t.exports=function(t,e){return t&&r(t,e,i)}},function(t,e,n){var r=n(223)();t.exports=r},function(t,e){t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}},function(t,e,n){var r=n(58),i=n(43);t.exports=function(t,e){for(var n=0,a=(e=r(e,t)).length;null!=t&&n<a;)t=t[i(e[n++])];return n&&n==a?t:void 0}},function(t,e,n){var r=n(4),i=n(36),a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,o=/^\w*$/;t.exports=function(t,e){if(r(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!i(t))||(o.test(t)||!a.test(t)||null!=e&&t in Object(e))}},function(t,e,n){var r=n(245),i=n(120);t.exports=function(t,e){return null!=t&&i(t,e,r)}},function(t,e,n){var r=n(76),i=n(257);t.exports=function t(e,n,a,o,s){var u=-1,c=e.length;for(a||(a=i),s||(s=[]);++u<c;){var l=e[u];n>0&&a(l)?n>1?t(l,n-1,a,o,s):r(s,l):o||(s[s.length]=l)}return s}},function(t,e,n){var r=n(36);t.exports=function(t,e,n){for(var i=-1,a=t.length;++i<a;){var o=t[i],s=e(o);if(null!=s&&(void 0===u?s==s&&!r(s):n(s,u)))var u=s,c=o}return c}},function(t,e){t.exports=function(t,e,n,r){var i=t.x,a=t.y,o=i-r.x,s=a-r.y,u=Math.sqrt(e*e*s*s+n*n*o*o),c=Math.abs(e*n*o/u);r.x<i&&(c=-c);var l=Math.abs(e*n*s/u);r.y<a&&(l=-l);return{x:i+c,y:a+l}}},function(t,e,n){var r=n(342),i=n(44),a=n(343);t.exports=function(t,e,n){var o=e.label,s=t.append("g");"svg"===e.labelType?a(s,e):"string"!=typeof o||"html"===e.labelType?i(s,e):r(s,e);var u,c=s.node().getBBox();switch(n){case"top":u=-e.height/2;break;case"bottom":u=e.height/2-c.height;break;default:u=-c.height/2}return s.attr("transform","translate("+-c.width/2+","+u+")"),s}},function(t,e){},function(t,e,n){var r=n(46),i=n(71),a=n(51),o=n(199),s=n(205),u=n(97),c=n(98),l=n(208),f=n(209),h=n(102),d=n(210),p=n(35),y=n(214),g=n(215),m=n(107),v=n(4),b=n(33),x=n(219),_=n(9),w=n(221),k=n(25),E={};E["[object Arguments]"]=E["[object Array]"]=E["[object ArrayBuffer]"]=E["[object DataView]"]=E["[object Boolean]"]=E["[object Date]"]=E["[object Float32Array]"]=E["[object Float64Array]"]=E["[object Int8Array]"]=E["[object Int16Array]"]=E["[object Int32Array]"]=E["[object Map]"]=E["[object Number]"]=E["[object Object]"]=E["[object RegExp]"]=E["[object Set]"]=E["[object String]"]=E["[object Symbol]"]=E["[object Uint8Array]"]=E["[object Uint8ClampedArray]"]=E["[object Uint16Array]"]=E["[object Uint32Array]"]=!0,E["[object Error]"]=E["[object Function]"]=E["[object WeakMap]"]=!1,t.exports=function t(e,n,A,T,S,M){var O,N=1&n,C=2&n,D=4&n;if(A&&(O=S?A(e,T,S,M):A(e)),void 0!==O)return O;if(!_(e))return e;var L=v(e);if(L){if(O=y(e),!N)return c(e,O)}else{var F=p(e),I="[object Function]"==F||"[object GeneratorFunction]"==F;if(b(e))return u(e,N);if("[object Object]"==F||"[object Arguments]"==F||I&&!S){if(O=C||I?{}:m(e),!N)return C?f(e,s(O,e)):l(e,o(O,e))}else{if(!E[F])return S?e:{};O=g(e,F,N)}}M||(M=new r);var P=M.get(e);if(P)return P;M.set(e,O),w(e)?e.forEach((function(r){O.add(t(r,n,A,r,e,M))})):x(e)&&e.forEach((function(r,i){O.set(i,t(r,n,A,i,e,M))}));var R=D?C?d:h:C?keysIn:k,B=L?void 0:R(e);return i(B||e,(function(r,i){B&&(r=e[i=r]),a(O,i,t(r,n,A,i,e,M))})),O}},function(t,e,n){(function(e){var n="object"==typeof e&&e&&e.Object===Object&&e;t.exports=n}).call(this,n(181))},function(t,e){var n=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return n.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},function(t,e,n){var r=n(27),i=function(){try{var t=r(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=i},function(t,e,n){var r=n(200),i=n(41),a=n(4),o=n(33),s=n(53),u=n(42),c=Object.prototype.hasOwnProperty;t.exports=function(t,e){var n=a(t),l=!n&&i(t),f=!n&&!l&&o(t),h=!n&&!l&&!f&&u(t),d=n||l||f||h,p=d?r(t.length,String):[],y=p.length;for(var g in t)!e&&!c.call(t,g)||d&&("length"==g||f&&("offset"==g||"parent"==g)||h&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||s(g,y))||p.push(g);return p}},function(t,e){t.exports=function(t,e){return function(n){return t(e(n))}}},function(t,e,n){(function(t){var r=n(12),i=e&&!e.nodeType&&e,a=i&&"object"==typeof t&&t&&!t.nodeType&&t,o=a&&a.exports===i?r.Buffer:void 0,s=o?o.allocUnsafe:void 0;t.exports=function(t,e){if(e)return t.slice();var n=t.length,r=s?s(n):new t.constructor(n);return t.copy(r),r}}).call(this,n(6)(t))},function(t,e){t.exports=function(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,i=0,a=[];++n<r;){var o=t[n];e(o,n,t)&&(a[i++]=o)}return a}},function(t,e){t.exports=function(){return[]}},function(t,e,n){var r=n(76),i=n(56),a=n(75),o=n(100),s=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)r(e,a(t)),t=i(t);return e}:o;t.exports=s},function(t,e,n){var r=n(103),i=n(75),a=n(25);t.exports=function(t){return r(t,a,i)}},function(t,e,n){var r=n(76),i=n(4);t.exports=function(t,e,n){var a=e(t);return i(t)?a:r(a,n(t))}},function(t,e,n){var r=n(27)(n(12),"Set");t.exports=r},function(t,e,n){var r=n(12).Uint8Array;t.exports=r},function(t,e,n){var r=n(77);t.exports=function(t,e){var n=e?r(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}},function(t,e,n){var r=n(108),i=n(56),a=n(55);t.exports=function(t){return"function"!=typeof t.constructor||a(t)?{}:r(i(t))}},function(t,e,n){var r=n(9),i=Object.create,a=function(){function t(){}return function(e){if(!r(e))return{};if(i)return i(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();t.exports=a},function(t,e,n){var r=n(71),i=n(57),a=n(110),o=n(4);t.exports=function(t,e){return(o(t)?r:i)(t,a(e))}},function(t,e,n){var r=n(29);t.exports=function(t){return"function"==typeof t?t:r}},function(t,e,n){var r=n(99),i=n(225),a=n(20),o=n(4);t.exports=function(t,e){return(o(t)?r:i)(t,a(e,3))}},function(t,e,n){var r=n(228),i=n(16);t.exports=function t(e,n,a,o,s){return e===n||(null==e||null==n||!i(e)&&!i(n)?e!=e&&n!=n:r(e,n,a,o,t,s))}},function(t,e,n){var r=n(114),i=n(231),a=n(115);t.exports=function(t,e,n,o,s,u){var c=1&n,l=t.length,f=e.length;if(l!=f&&!(c&&f>l))return!1;var h=u.get(t);if(h&&u.get(e))return h==e;var d=-1,p=!0,y=2&n?new r:void 0;for(u.set(t,e),u.set(e,t);++d<l;){var g=t[d],m=e[d];if(o)var v=c?o(m,g,d,e,t,u):o(g,m,d,t,e,u);if(void 0!==v){if(v)continue;p=!1;break}if(y){if(!i(e,(function(t,e){if(!a(y,e)&&(g===t||s(g,t,n,o,u)))return y.push(e)}))){p=!1;break}}else if(g!==m&&!s(g,m,n,o,u)){p=!1;break}}return u.delete(t),u.delete(e),p}},function(t,e,n){var r=n(70),i=n(229),a=n(230);function o(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new r;++e<n;)this.add(t[e])}o.prototype.add=o.prototype.push=i,o.prototype.has=a,t.exports=o},function(t,e){t.exports=function(t,e){return t.has(e)}},function(t,e,n){var r=n(9);t.exports=function(t){return t==t&&!r(t)}},function(t,e){t.exports=function(t,e){return function(n){return null!=n&&(n[t]===e&&(void 0!==e||t in Object(n)))}}},function(t,e,n){var r=n(241);t.exports=function(t){return null==t?"":r(t)}},function(t,e,n){var r=n(242),i=n(120);t.exports=function(t,e){return null!=t&&i(t,e,r)}},function(t,e,n){var r=n(58),i=n(41),a=n(4),o=n(53),s=n(72),u=n(43);t.exports=function(t,e,n){for(var c=-1,l=(e=r(e,t)).length,f=!1;++c<l;){var h=u(e[c]);if(!(f=null!=t&&n(t,h)))break;t=t[h]}return f||++c!=l?f:!!(l=null==t?0:t.length)&&s(l)&&o(h,l)&&(a(t)||i(t))}},function(t,e){t.exports=function(t){return function(e){return null==e?void 0:e[t]}}},function(t,e){t.exports=function(t){return void 0===t}},function(t,e,n){var r=n(59),i=n(20),a=n(124),o=n(4);t.exports=function(t,e){return(o(t)?r:a)(t,i(e,3))}},function(t,e,n){var r=n(57),i=n(19);t.exports=function(t,e){var n=-1,a=i(t)?Array(t.length):[];return r(t,(function(t,r,i){a[++n]=e(t,r,i)})),a}},function(t,e,n){var r=n(247),i=n(57),a=n(20),o=n(248),s=n(4);t.exports=function(t,e,n){var u=s(t)?r:o,c=arguments.length<3;return u(t,a(e,4),n,c,i)}},function(t,e,n){var r=n(258),i=Math.max;t.exports=function(t,e,n){return e=i(void 0===e?t.length-1:e,0),function(){for(var a=arguments,o=-1,s=i(a.length-e,0),u=Array(s);++o<s;)u[o]=a[e+o];o=-1;for(var c=Array(e+1);++o<e;)c[o]=a[o];return c[e]=n(u),r(t,this,c)}}},function(t,e,n){var r=n(259),i=n(260)(r);t.exports=i},function(t,e){t.exports=function(t,e,n,r){for(var i=t.length,a=n+(r?1:-1);r?a--:++a<i;)if(e(t[a],a,t))return a;return-1}},function(t,e,n){var r=n(19),i=n(16);t.exports=function(t){return i(t)&&r(t)}},function(t,e,n){var r=n(269),i=n(25);t.exports=function(t){return null==t?[]:r(t,i(t))}},function(t,e,n){var r=n(8),i=n(132);t.exports=function(t,e,n,r){return function(t,e,n,r){var a,o,s={},u=new i,c=function(t){var e=t.v!==a?t.v:t.w,r=s[e],i=n(t),c=o.distance+i;if(i<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+t+" Weight: "+i);c<r.distance&&(r.distance=c,r.predecessor=a,u.decrease(e,c))};t.nodes().forEach((function(t){var n=t===e?0:Number.POSITIVE_INFINITY;s[t]={distance:n},u.add(t,n)}));for(;u.size()>0&&(a=u.removeMin(),(o=s[a]).distance!==Number.POSITIVE_INFINITY);)r(a).forEach(c);return s}(t,String(e),n||a,r||function(e){return t.outEdges(e)})};var a=r.constant(1)},function(t,e,n){var r=n(8);function i(){this._arr=[],this._keyIndices={}}t.exports=i,i.prototype.size=function(){return this._arr.length},i.prototype.keys=function(){return this._arr.map((function(t){return t.key}))},i.prototype.has=function(t){return r.has(this._keyIndices,t)},i.prototype.priority=function(t){var e=this._keyIndices[t];if(void 0!==e)return this._arr[e].priority},i.prototype.min=function(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key},i.prototype.add=function(t,e){var n=this._keyIndices;if(t=String(t),!r.has(n,t)){var i=this._arr,a=i.length;return n[t]=a,i.push({key:t,priority:e}),this._decrease(a),!0}return!1},i.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var t=this._arr.pop();return delete this._keyIndices[t.key],this._heapify(0),t.key},i.prototype.decrease=function(t,e){var n=this._keyIndices[t];if(e>this._arr[n].priority)throw new Error("New priority is greater than current priority. Key: "+t+" Old: "+this._arr[n].priority+" New: "+e);this._arr[n].priority=e,this._decrease(n)},i.prototype._heapify=function(t){var e=this._arr,n=2*t,r=n+1,i=t;n<e.length&&(i=e[n].priority<e[i].priority?n:i,r<e.length&&(i=e[r].priority<e[i].priority?r:i),i!==t&&(this._swap(t,i),this._heapify(i)))},i.prototype._decrease=function(t){for(var e,n=this._arr,r=n[t].priority;0!==t&&!(n[e=t>>1].priority<r);)this._swap(t,e),t=e},i.prototype._swap=function(t,e){var n=this._arr,r=this._keyIndices,i=n[t],a=n[e];n[t]=a,n[e]=i,r[a.key]=t,r[i.key]=e}},function(t,e,n){var r=n(8);t.exports=function(t){var e=0,n=[],i={},a=[];return t.nodes().forEach((function(o){r.has(i,o)||function o(s){var u=i[s]={onStack:!0,lowlink:e,index:e++};if(n.push(s),t.successors(s).forEach((function(t){r.has(i,t)?i[t].onStack&&(u.lowlink=Math.min(u.lowlink,i[t].index)):(o(t),u.lowlink=Math.min(u.lowlink,i[t].lowlink))})),u.lowlink===u.index){var c,l=[];do{c=n.pop(),i[c].onStack=!1,l.push(c)}while(s!==c);a.push(l)}}(o)})),a}},function(t,e,n){var r=n(8);function i(t){var e={},n={},i=[];if(r.each(t.sinks(),(function o(s){if(r.has(n,s))throw new a;r.has(e,s)||(n[s]=!0,e[s]=!0,r.each(t.predecessors(s),o),delete n[s],i.push(s))})),r.size(e)!==t.nodeCount())throw new a;return i}function a(){}t.exports=i,i.CycleException=a,a.prototype=new Error},function(t,e,n){var r=n(8);t.exports=function(t,e,n){r.isArray(e)||(e=[e]);var i=(t.isDirected()?t.successors:t.neighbors).bind(t),a=[],o={};return r.each(e,(function(e){if(!t.hasNode(e))throw new Error("Graph does not have node: "+e);!function t(e,n,i,a,o,s){r.has(a,n)||(a[n]=!0,i||s.push(n),r.each(o(n),(function(n){t(e,n,i,a,o,s)})),i&&s.push(n))}(t,e,"post"===n,o,i,a)})),a}},function(t,e,n){var r;try{r=n(21)}catch(t){}r||(r=window.dagre),t.exports=r},function(t,e,n){var r=n(60),i=n(30),a=n(61),o=n(34),s=Object.prototype,u=s.hasOwnProperty,c=r((function(t,e){t=Object(t);var n=-1,r=e.length,c=r>2?e[2]:void 0;for(c&&a(e[0],e[1],c)&&(r=1);++n<r;)for(var l=e[n],f=o(l),h=-1,d=f.length;++h<d;){var p=f[h],y=t[p];(void 0===y||i(y,s[p])&&!u.call(t,p))&&(t[p]=l[p])}return t}));t.exports=c},function(t,e,n){var r=n(288);t.exports=function(t){return t?(t=r(t))===1/0||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}},function(t,e,n){var r=n(86);t.exports=function(t){return(null==t?0:t.length)?r(t,1):[]}},function(t,e,n){var r=n(52),i=n(30);t.exports=function(t,e,n){(void 0===n||i(t[e],n))&&(void 0!==n||e in t)||r(t,e,n)}},function(t,e,n){var r=n(28),i=n(56),a=n(16),o=Function.prototype,s=Object.prototype,u=o.toString,c=s.hasOwnProperty,l=u.call(Object);t.exports=function(t){if(!a(t)||"[object Object]"!=r(t))return!1;var e=i(t);if(null===e)return!0;var n=c.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&u.call(n)==l}},function(t,e){t.exports=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}},function(t,e){t.exports=function(t,e){return t<e}},function(t,e,n){var r=n(302),i=n(305)((function(t,e){return null==t?{}:r(t,e)}));t.exports=i},function(t,e,n){var r=n(306)();t.exports=r},function(t,e,n){var r=n(118),i=0;t.exports=function(t){var e=++i;return r(t)+e}},function(t,e,n){"use strict";var r=n(3),i=n(13).Graph,a=n(62).slack;function o(t,e){return r.forEach(t.nodes(),(function n(i){r.forEach(e.nodeEdges(i),(function(r){var o=r.v,s=i===o?r.w:o;t.hasNode(s)||a(e,r)||(t.setNode(s,{}),t.setEdge(i,s,{}),n(s))}))})),t.nodeCount()}function s(t,e){return r.minBy(e.edges(),(function(n){if(t.hasNode(n.v)!==t.hasNode(n.w))return a(e,n)}))}function u(t,e,n){r.forEach(t.nodes(),(function(t){e.node(t).rank+=n}))}t.exports=function(t){var e,n,r=new i({directed:!1}),c=t.nodes()[0],l=t.nodeCount();r.setNode(c,{});for(;o(r,t)<l;)e=s(r,t),n=r.hasNode(e.v)?a(t,e):-a(t,e),u(r,t,n);return r}},function(t,e){t.exports=function(t,e){return t.intersect(e)}},function(t,e,n){var r=n(88);t.exports=function(t,e,n){return r(t,e,e,n)}},function(t,e,n){var r=n(339);t.exports=function(t,e,n){var i=t.x,a=t.y,o=[],s=Number.POSITIVE_INFINITY,u=Number.POSITIVE_INFINITY;e.forEach((function(t){s=Math.min(s,t.x),u=Math.min(u,t.y)}));for(var c=i-t.width/2-s,l=a-t.height/2-u,f=0;f<e.length;f++){var h=e[f],d=e[f<e.length-1?f+1:0],p=r(t,n,{x:c+h.x,y:l+h.y},{x:c+d.x,y:l+d.y});p&&o.push(p)}if(!o.length)return console.log("NO INTERSECTION FOUND, RETURN NODE CENTER",t),t;o.length>1&&o.sort((function(t,e){var r=t.x-n.x,i=t.y-n.y,a=Math.sqrt(r*r+i*i),o=e.x-n.x,s=e.y-n.y,u=Math.sqrt(o*o+s*s);return a<u?-1:a===u?0:1}));return o[0]}},function(t,e){t.exports=function(t,e){var n,r,i=t.x,a=t.y,o=e.x-i,s=e.y-a,u=t.width/2,c=t.height/2;Math.abs(s)*u>Math.abs(o)*c?(s<0&&(c=-c),n=0===s?0:c*o/s,r=c):(o<0&&(u=-u),n=u,r=0===o?0:u*s/o);return{x:i+n,y:a+r}}},function(t,e,n){"use strict";var r=n(154),i=n(155),a=n(156);function o(t,e,n){if(!t)return t;if(!e)return t;"string"==typeof n&&(n={keyframes:n}),n||(n={keyframes:!1}),t=s(t,e+" $1$2");var i=e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&");t=(t=(t=(t=t.replace(new RegExp("("+i+")\\s*\\1(?=[\\s\\r\\n,{])","g"),"$1")).replace(new RegExp("("+i+")\\s*:host","g"),"$1")).replace(new RegExp("("+i+")\\s*@","g"),"@")).replace(new RegExp("("+i+")\\s*:root","g"),":root");for(var a,o=[],u=/@keyframes\s+([a-zA-Z0-9_-]+)\s*{/g;null!==(a=u.exec(t));)o.indexOf(a[1])<0&&o.push(a[1]);var c=r(e);return o.forEach((function(e){var r=(!0===n.keyframes?c+"-":"string"==typeof n.keyframes?n.keyframes:"")+e;t=(t=t.replace(new RegExp("(@keyframes\\s+)"+e+"(\\s*{)","g"),"$1"+r+"$2")).replace(new RegExp("(animation(?:-name)?\\s*:[^;]*\\s*)"+e+"([\\s;}])","g"),"$1"+r+"$2")})),t=t.replace(new RegExp("("+i+" )(\\s*(?:to|from|[+-]?(?:(?:\\.\\d+)|(?:\\d+(?:\\.\\d*)?))%))(?=[\\s\\r\\n,{])","g"),"$2")}function s(t,e){var n=[];return t=a(t),t=(t=i.replace(t,!0,n)).replace(/([^\r\n,{}]+)(,(?=[^}]*{)|\s*{)/g,e),t=i.paste(t,n)}t.exports=o,o.replace=s},function(t,e){t.exports=function(t,e){return t.intersect(e)}},function(t,e,n){var r;r=function(){var t=JSON.parse('{"$":"dollar","%":"percent","&":"and","<":"less",">":"greater","|":"or","¢":"cent","£":"pound","¤":"currency","¥":"yen","©":"(c)","ª":"a","®":"(r)","º":"o","À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","Æ":"AE","Ç":"C","È":"E","É":"E","Ê":"E","Ë":"E","Ì":"I","Í":"I","Î":"I","Ï":"I","Ð":"D","Ñ":"N","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","Ù":"U","Ú":"U","Û":"U","Ü":"U","Ý":"Y","Þ":"TH","ß":"ss","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","æ":"ae","ç":"c","è":"e","é":"e","ê":"e","ë":"e","ì":"i","í":"i","î":"i","ï":"i","ð":"d","ñ":"n","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","ù":"u","ú":"u","û":"u","ü":"u","ý":"y","þ":"th","ÿ":"y","Ā":"A","ā":"a","Ă":"A","ă":"a","Ą":"A","ą":"a","Ć":"C","ć":"c","Č":"C","č":"c","Ď":"D","ď":"d","Đ":"DJ","đ":"dj","Ē":"E","ē":"e","Ė":"E","ė":"e","Ę":"e","ę":"e","Ě":"E","ě":"e","Ğ":"G","ğ":"g","Ģ":"G","ģ":"g","Ĩ":"I","ĩ":"i","Ī":"i","ī":"i","Į":"I","į":"i","İ":"I","ı":"i","Ķ":"k","ķ":"k","Ļ":"L","ļ":"l","Ľ":"L","ľ":"l","Ł":"L","ł":"l","Ń":"N","ń":"n","Ņ":"N","ņ":"n","Ň":"N","ň":"n","Ő":"O","ő":"o","Œ":"OE","œ":"oe","Ŕ":"R","ŕ":"r","Ř":"R","ř":"r","Ś":"S","ś":"s","Ş":"S","ş":"s","Š":"S","š":"s","Ţ":"T","ţ":"t","Ť":"T","ť":"t","Ũ":"U","ũ":"u","Ū":"u","ū":"u","Ů":"U","ů":"u","Ű":"U","ű":"u","Ų":"U","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","ź":"z","Ż":"Z","ż":"z","Ž":"Z","ž":"z","ƒ":"f","Ơ":"O","ơ":"o","Ư":"U","ư":"u","Lj":"LJ","lj":"lj","Nj":"NJ","nj":"nj","Ș":"S","ș":"s","Ț":"T","ț":"t","˚":"o","Ά":"A","Έ":"E","Ή":"H","Ί":"I","Ό":"O","Ύ":"Y","Ώ":"W","ΐ":"i","Α":"A","Β":"B","Γ":"G","Δ":"D","Ε":"E","Ζ":"Z","Η":"H","Θ":"8","Ι":"I","Κ":"K","Λ":"L","Μ":"M","Ν":"N","Ξ":"3","Ο":"O","Π":"P","Ρ":"R","Σ":"S","Τ":"T","Υ":"Y","Φ":"F","Χ":"X","Ψ":"PS","Ω":"W","Ϊ":"I","Ϋ":"Y","ά":"a","έ":"e","ή":"h","ί":"i","ΰ":"y","α":"a","β":"b","γ":"g","δ":"d","ε":"e","ζ":"z","η":"h","θ":"8","ι":"i","κ":"k","λ":"l","μ":"m","ν":"n","ξ":"3","ο":"o","π":"p","ρ":"r","ς":"s","σ":"s","τ":"t","υ":"y","φ":"f","χ":"x","ψ":"ps","ω":"w","ϊ":"i","ϋ":"y","ό":"o","ύ":"y","ώ":"w","Ё":"Yo","Ђ":"DJ","Є":"Ye","І":"I","Ї":"Yi","Ј":"J","Љ":"LJ","Њ":"NJ","Ћ":"C","Џ":"DZ","А":"A","Б":"B","В":"V","Г":"G","Д":"D","Е":"E","Ж":"Zh","З":"Z","И":"I","Й":"J","К":"K","Л":"L","М":"M","Н":"N","О":"O","П":"P","Р":"R","С":"S","Т":"T","У":"U","Ф":"F","Х":"H","Ц":"C","Ч":"Ch","Ш":"Sh","Щ":"Sh","Ъ":"U","Ы":"Y","Ь":"","Э":"E","Ю":"Yu","Я":"Ya","а":"a","б":"b","в":"v","г":"g","д":"d","е":"e","ж":"zh","з":"z","и":"i","й":"j","к":"k","л":"l","м":"m","н":"n","о":"o","п":"p","р":"r","с":"s","т":"t","у":"u","ф":"f","х":"h","ц":"c","ч":"ch","ш":"sh","щ":"sh","ъ":"u","ы":"y","ь":"","э":"e","ю":"yu","я":"ya","ё":"yo","ђ":"dj","є":"ye","і":"i","ї":"yi","ј":"j","љ":"lj","њ":"nj","ћ":"c","ѝ":"u","џ":"dz","Ґ":"G","ґ":"g","Ғ":"GH","ғ":"gh","Қ":"KH","қ":"kh","Ң":"NG","ң":"ng","Ү":"UE","ү":"ue","Ұ":"U","ұ":"u","Һ":"H","һ":"h","Ә":"AE","ә":"ae","Ө":"OE","ө":"oe","฿":"baht","ა":"a","ბ":"b","გ":"g","დ":"d","ე":"e","ვ":"v","ზ":"z","თ":"t","ი":"i","კ":"k","ლ":"l","მ":"m","ნ":"n","ო":"o","პ":"p","ჟ":"zh","რ":"r","ს":"s","ტ":"t","უ":"u","ფ":"f","ქ":"k","ღ":"gh","ყ":"q","შ":"sh","ჩ":"ch","ც":"ts","ძ":"dz","წ":"ts","ჭ":"ch","ხ":"kh","ჯ":"j","ჰ":"h","Ẁ":"W","ẁ":"w","Ẃ":"W","ẃ":"w","Ẅ":"W","ẅ":"w","ẞ":"SS","Ạ":"A","ạ":"a","Ả":"A","ả":"a","Ấ":"A","ấ":"a","Ầ":"A","ầ":"a","Ẩ":"A","ẩ":"a","Ẫ":"A","ẫ":"a","Ậ":"A","ậ":"a","Ắ":"A","ắ":"a","Ằ":"A","ằ":"a","Ẳ":"A","ẳ":"a","Ẵ":"A","ẵ":"a","Ặ":"A","ặ":"a","Ẹ":"E","ẹ":"e","Ẻ":"E","ẻ":"e","Ẽ":"E","ẽ":"e","Ế":"E","ế":"e","Ề":"E","ề":"e","Ể":"E","ể":"e","Ễ":"E","ễ":"e","Ệ":"E","ệ":"e","Ỉ":"I","ỉ":"i","Ị":"I","ị":"i","Ọ":"O","ọ":"o","Ỏ":"O","ỏ":"o","Ố":"O","ố":"o","Ồ":"O","ồ":"o","Ổ":"O","ổ":"o","Ỗ":"O","ỗ":"o","Ộ":"O","ộ":"o","Ớ":"O","ớ":"o","Ờ":"O","ờ":"o","Ở":"O","ở":"o","Ỡ":"O","ỡ":"o","Ợ":"O","ợ":"o","Ụ":"U","ụ":"u","Ủ":"U","ủ":"u","Ứ":"U","ứ":"u","Ừ":"U","ừ":"u","Ử":"U","ử":"u","Ữ":"U","ữ":"u","Ự":"U","ự":"u","Ỳ":"Y","ỳ":"y","Ỵ":"Y","ỵ":"y","Ỷ":"Y","ỷ":"y","Ỹ":"Y","ỹ":"y","‘":"\'","’":"\'","“":"\\"","”":"\\"","†":"+","•":"*","…":"...","₠":"ecu","₢":"cruzeiro","₣":"french franc","₤":"lira","₥":"mill","₦":"naira","₧":"peseta","₨":"rupee","₩":"won","₪":"new shequel","₫":"dong","€":"euro","₭":"kip","₮":"tugrik","₯":"drachma","₰":"penny","₱":"peso","₲":"guarani","₳":"austral","₴":"hryvnia","₵":"cedi","₸":"kazakhstani tenge","₹":"indian rupee","₽":"russian ruble","₿":"bitcoin","℠":"sm","™":"tm","∂":"d","∆":"delta","∑":"sum","∞":"infinity","♥":"love","元":"yuan","円":"yen","﷼":"rial"}'),e=JSON.parse('{"vi":{"Đ":"D","đ":"d"}}');function n(n,r){if("string"!=typeof n)throw new Error("slugify: string argument expected");var i=e[(r="string"==typeof r?{replacement:r}:r||{}).locale]||{},a=n.split("").reduce((function(e,n){return e+(i[n]||t[n]||n).replace(r.remove||/[^\w\s$*_+~.()'"!\-:@]/g,"")}),"").trim().replace(/[-\s]+/g,r.replacement||"-");return r.lower?a.toLowerCase():a}return n.extend=function(e){for(var n in e)t[n]=e[n]},n},t.exports=r(),t.exports.default=r()},function(t,e,n){
/*!
* Escaper v2.5.3
* https://github.com/kobezzza/Escaper
@@ -38,12 +31,12 @@ t.exports={graphlib:n(566),dagre:n(386),intersect:n(736),render:n(738),util:n(31
*
* Date: Tue, 23 Jan 2018 15:58:45 GMT
*/
-!function(t){"use strict";var e,n="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},r=e={VERSION:[2,5,3],content:[],cache:{},snakeskinRgxp:null,symbols:null,replace:T,paste:D},i={'"':!0,"'":!0,"`":!0},o={"/":!0};for(var a in i){if(!i.hasOwnProperty(a))break;o[a]=!0}var u={"//":!0,"//*":!0,"//!":!0,"//#":!0,"//@":!0,"//$":!0},s={"/*":!0,"/**":!0,"/*!":!0,"/*#":!0,"/*@":!0,"/*$":!0},c=[],f={};for(var l in o){if(!o.hasOwnProperty(l))break;c.push(l),f[l]=!0}for(var h in u){if(!u.hasOwnProperty(h))break;c.push(h),f[h]=!0}for(var d in s){if(!s.hasOwnProperty(d))break;c.push(d),f[d]=!0}var p=[],g={g:!0,m:!0,i:!0,y:!0,u:!0};for(var y in g){if(!g.hasOwnProperty(y))break;p.push(y)}var b={"-":!0,"+":!0,"*":!0,"%":!0,"~":!0,">":!0,"<":!0,"^":!0,",":!0,";":!0,"=":!0,"|":!0,"&":!0,"!":!0,"?":!0,":":!0,"(":!0,"{":!0,"[":!0},v={return:!0,yield:!0,await:!0,typeof:!0,void:!0,instanceof:!0,delete:!0,in:!0,new:!0,of:!0};function m(t,e,n){for(var r in t){if(!t.hasOwnProperty(r))break;r in e==0&&(e[r]=n)}}var _=void 0,w=void 0,x=/[^\s/]/,k=/[a-z]/,E=/\s/,A=/[\r\n]/,S=/\${pos}/g,M={object:!0,function:!0};function T(t,r,a,l){_=_||e.symbols||"a-z",w=w||e.snakeskinRgxp||new RegExp("[!$"+_+"_]","i");var h=e.cache,d=e.content,y=Boolean(r&&M[void 0===r?"undefined":n(r)]),T=y?Object(r):{};function O(t){return T["@label"]?T["@label"].replace(S,t):"__ESCAPER_QUOT__"+t+"_"}var D=!1;"boolean"==typeof r&&(D=Boolean(r)),"@comments"in T&&(m(s,T,T["@comments"]),m(u,T,T["@comments"]),delete T["@comments"]),"@strings"in T&&(m(i,T,T["@strings"]),delete T["@strings"]),"@literals"in T&&(m(o,T,T["@literals"]),delete T["@literals"]),"@all"in T&&(m(f,T,T["@all"]),delete T["@all"]);for(var C="",N=-1;++N<c.length;){var I=c[N];s[I]||u[I]?T[I]=D||T[I]:T[I]=T[I]||!y,C+=T[I]+","}var R=t,j=a||d;if(j===d&&h[C]&&h[C][R])return h[C][R];for(var L=!1,B=!0,P=!1,F=!1,q=0,U=!1,z=0,Y=!1,V=void 0,G=void 0,H="",W="",$=-1;++$<t.length;){var K=t.charAt($),Z=t.charAt($+1),X=t.substr($,2),J=t.substr($,3);if(F)(A.test(Z)&&u[F]||s[K+t.charAt($-1)]&&$-q>2&&s[F])&&(T[F]&&(V=t.substring(q,$+1),-1===T[F]?G="":(G=O(j.length),j.push(V)),t=t.substring(0,q)+G+t.substring($+1),$+=G.length-V.length),F=!1);else{if(!L){if("/"===K&&((u[X]||s[X])&&(F=u[J]||s[J]?J:X),F)){q=$;continue}b[K]||v[W]?(B=!0,W=""):x.test(K)&&(B=!1),k.test(K)?H+=K:(W=H,H="");var Q=!1;l&&("|"===K&&w.test(Z)?(Y=!0,B=!1,Q=!0):Y&&E.test(K)&&(Y=!1,B=!0,Q=!0)),Q||(b[K]?B=!0:x.test(K)&&(B=!1))}if("/"!==L||P||("["===K?U=!0:"]"===K&&(U=!1)),!L&&z&&("}"===K?z--:"{"===K&&z++,z||(K="`")),"`"!==L||P||"${"!==X||(K="`",$++,z++),!f[K]||"/"===K&&!B||L){if(L&&("\\"===K||P))P=!P;else if(f[K]&&L===K&&!P&&("/"!==L||!U)){if("/"===K)for(var tt=-1;++tt<p.length;)g[t.charAt($+1)]&&$++;L=!1,B=!1,T[K]&&(V=t.substring(q,$+1),-1===T[K]?G="":(G=O(j.length),j.push(V)),t=t.substring(0,q)+G+t.substring($+1),$+=G.length-V.length)}}else L=K,q=$}}return j===d&&(h[C]=h[C]||{},h[C][R]=t),t}var O=/__ESCAPER_QUOT__(\d+)_/g;function D(t,n,r){return t.replace(r||O,(function(t,r){return(n||e.content)[r]}))}t.default=r,t.replace=T,t.paste=D,Object.defineProperty(t,"__esModule",{value:!0})}(e)},function(t,e,n){"use strict";var r=n(452);t.exports=function(t,e){var n;t=t.toString();var i="",o="",a=!1,u=!(!1===(e=e||{}).preserve||!0===e.all),s="";"function"==typeof e.preserve?(u=!1,n=e.preserve):r(e.preserve)&&(u=!1,n=function(t){return e.preserve.test(t)});for(var c=0;c<t.length;c++)if(o=t[c],"\\"!==t[c-1]&&('"'!==o&&"'"!==o||(a===o?a=!1:a||(a=o))),a||"/"!==o||"*"!==t[c+1]||u&&"!"===t[c+2])s+=o;else{for(var f=c+2;f<t.length;f++){if("*"===t[f]&&"/"===t[f+1]){n&&(s=n(i)?s+"/*"+i+"*/":s,i="");break}n&&(i+=t[f])}c=f+1}return s}},function(t,e,n){"use strict";t.exports=function(t){return"[object RegExp]"===Object.prototype.toString.call(t)}},function(t,e,n){var r={"./locale":292,"./locale.js":292};function i(t){var e=o(t);return n(e)}function o(t){if(!n.o(r,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}return r[t]}i.keys=function(){return Object.keys(r)},i.resolve=o,t.exports=i,i.id=453},function(t,e,n){t.exports={Graph:n(224),version:n(555)}},function(t,e,n){var r=n(293);t.exports=function(t){return r(t,4)}},function(t,e){t.exports=function(){this.__data__=[],this.size=0}},function(t,e,n){var r=n(148),i=Array.prototype.splice;t.exports=function(t){var e=this.__data__,n=r(e,t);return!(n<0)&&(n==e.length-1?e.pop():i.call(e,n,1),--this.size,!0)}},function(t,e,n){var r=n(148);t.exports=function(t){var e=this.__data__,n=r(e,t);return n<0?void 0:e[n][1]}},function(t,e,n){var r=n(148);t.exports=function(t){return r(this.__data__,t)>-1}},function(t,e,n){var r=n(148);t.exports=function(t,e){var n=this.__data__,i=r(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this}},function(t,e,n){var r=n(147);t.exports=function(){this.__data__=new r,this.size=0}},function(t,e){t.exports=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}},function(t,e){t.exports=function(t){return this.__data__.get(t)}},function(t,e){t.exports=function(t){return this.__data__.has(t)}},function(t,e,n){var r=n(147),i=n(225),o=n(226);t.exports=function(t,e){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!i||a.length<199)return a.push([t,e]),this.size=++n.size,this;n=this.__data__=new o(a)}return n.set(t,e),this.size=n.size,this}},function(t,e,n){var r=n(124),i=n(469),o=n(28),a=n(295),u=/^\[object .+?Constructor\]$/,s=Function.prototype,c=Object.prototype,f=s.toString,l=c.hasOwnProperty,h=RegExp("^"+f.call(l).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!o(t)||i(t))&&(r(t)?h:u).test(a(t))}},function(t,e,n){var r=n(87),i=Object.prototype,o=i.hasOwnProperty,a=i.toString,u=r?r.toStringTag:void 0;t.exports=function(t){var e=o.call(t,u),n=t[u];try{t[u]=void 0;var r=!0}catch(t){}var i=a.call(t);return r&&(e?t[u]=n:delete t[u]),i}},function(t,e){var n=Object.prototype.toString;t.exports=function(t){return n.call(t)}},function(t,e,n){var r,i=n(470),o=(r=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";t.exports=function(t){return!!o&&o in t}},function(t,e,n){var r=n(35)["__core-js_shared__"];t.exports=r},function(t,e){t.exports=function(t,e){return null==t?void 0:t[e]}},function(t,e,n){var r=n(473),i=n(147),o=n(225);t.exports=function(){this.size=0,this.__data__={hash:new r,map:new(o||i),string:new r}}},function(t,e,n){var r=n(474),i=n(475),o=n(476),a=n(477),u=n(478);function s(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}s.prototype.clear=r,s.prototype.delete=i,s.prototype.get=o,s.prototype.has=a,s.prototype.set=u,t.exports=s},function(t,e,n){var r=n(149);t.exports=function(){this.__data__=r?r(null):{},this.size=0}},function(t,e){t.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}},function(t,e,n){var r=n(149),i=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;if(r){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return i.call(e,t)?e[t]:void 0}},function(t,e,n){var r=n(149),i=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return r?void 0!==e[t]:i.call(e,t)}},function(t,e,n){var r=n(149);t.exports=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=r&&void 0===e?"__lodash_hash_undefined__":e,this}},function(t,e,n){var r=n(150);t.exports=function(t){var e=r(this,t).delete(t);return this.size-=e?1:0,e}},function(t,e){t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},function(t,e,n){var r=n(150);t.exports=function(t){return r(this,t).get(t)}},function(t,e,n){var r=n(150);t.exports=function(t){return r(this,t).has(t)}},function(t,e,n){var r=n(150);t.exports=function(t,e){var n=r(this,t),i=n.size;return n.set(t,e),this.size+=n.size==i?0:1,this}},function(t,e,n){var r=n(125),i=n(62);t.exports=function(t,e){return t&&r(e,i(e),t)}},function(t,e){t.exports=function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}},function(t,e,n){var r=n(75),i=n(43);t.exports=function(t){return i(t)&&"[object Arguments]"==r(t)}},function(t,e){t.exports=function(){return!1}},function(t,e,n){var r=n(75),i=n(228),o=n(43),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,t.exports=function(t){return o(t)&&i(t.length)&&!!a[r(t)]}},function(t,e,n){var r=n(298)(Object.keys,Object);t.exports=r},function(t,e,n){var r=n(125),i=n(89);t.exports=function(t,e){return t&&r(e,i(e),t)}},function(t,e,n){var r=n(28),i=n(155),o=n(492),a=Object.prototype.hasOwnProperty;t.exports=function(t){if(!r(t))return o(t);var e=i(t),n=[];for(var u in t)("constructor"!=u||!e&&a.call(t,u))&&n.push(u);return n}},function(t,e){t.exports=function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}},function(t,e,n){var r=n(125),i=n(231);t.exports=function(t,e){return r(t,i(t),e)}},function(t,e,n){var r=n(125),i=n(303);t.exports=function(t,e){return r(t,i(t),e)}},function(t,e,n){var r=n(305),i=n(303),o=n(89);t.exports=function(t){return r(t,o,i)}},function(t,e,n){var r=n(74)(n(35),"DataView");t.exports=r},function(t,e,n){var r=n(74)(n(35),"Promise");t.exports=r},function(t,e,n){var r=n(74)(n(35),"WeakMap");t.exports=r},function(t,e){var n=Object.prototype.hasOwnProperty;t.exports=function(t){var e=t.length,r=new t.constructor(e);return e&&"string"==typeof t[0]&&n.call(t,"index")&&(r.index=t.index,r.input=t.input),r}},function(t,e,n){var r=n(233),i=n(501),o=n(502),a=n(503),u=n(308);t.exports=function(t,e,n){var s=t.constructor;switch(e){case"[object ArrayBuffer]":return r(t);case"[object Boolean]":case"[object Date]":return new s(+t);case"[object DataView]":return i(t,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return u(t,n);case"[object Map]":return new s;case"[object Number]":case"[object String]":return new s(t);case"[object RegExp]":return o(t);case"[object Set]":return new s;case"[object Symbol]":return a(t)}}},function(t,e,n){var r=n(233);t.exports=function(t,e){var n=e?r(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}},function(t,e){var n=/\w*$/;t.exports=function(t){var e=new t.constructor(t.source,n.exec(t));return e.lastIndex=t.lastIndex,e}},function(t,e,n){var r=n(87),i=r?r.prototype:void 0,o=i?i.valueOf:void 0;t.exports=function(t){return o?Object(o.call(t)):{}}},function(t,e,n){var r=n(505),i=n(154),o=n(229),a=o&&o.isMap,u=a?i(a):r;t.exports=u},function(t,e,n){var r=n(90),i=n(43);t.exports=function(t){return i(t)&&"[object Map]"==r(t)}},function(t,e,n){var r=n(507),i=n(154),o=n(229),a=o&&o.isSet,u=a?i(a):r;t.exports=u},function(t,e,n){var r=n(90),i=n(43);t.exports=function(t){return i(t)&&"[object Set]"==r(t)}},function(t,e){t.exports=function(t){return function(e,n,r){for(var i=-1,o=Object(e),a=r(e),u=a.length;u--;){var s=a[t?u:++i];if(!1===n(o[s],s,o))break}return e}}},function(t,e,n){var r=n(52);t.exports=function(t,e){return function(n,i){if(null==n)return n;if(!r(n))return t(n,i);for(var o=n.length,a=e?o:-1,u=Object(n);(e?a--:++a<o)&&!1!==i(u[a],a,u););return n}}},function(t,e,n){var r=n(157);t.exports=function(t,e){var n=[];return r(t,(function(t,r,i){e(t,r,i)&&n.push(t)})),n}},function(t,e,n){var r=n(512),i=n(520),o=n(320);t.exports=function(t){var e=i(t);return 1==e.length&&e[0][2]?o(e[0][0],e[0][1]):function(n){return n===t||r(n,t,e)}}},function(t,e,n){var r=n(146),i=n(315);t.exports=function(t,e,n,o){var a=n.length,u=a,s=!o;if(null==t)return!u;for(t=Object(t);a--;){var c=n[a];if(s&&c[2]?c[1]!==t[c[0]]:!(c[0]in t))return!1}for(;++a<u;){var f=(c=n[a])[0],l=t[f],h=c[1];if(s&&c[2]){if(void 0===l&&!(f in t))return!1}else{var d=new r;if(o)var p=o(l,h,f,t,e,d);if(!(void 0===p?i(h,l,3,o,d):p))return!1}}return!0}},function(t,e,n){var r=n(146),i=n(316),o=n(517),a=n(519),u=n(90),s=n(15),c=n(88),f=n(127),l="[object Object]",h=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,d,p,g){var y=s(t),b=s(e),v=y?"[object Array]":u(t),m=b?"[object Array]":u(e),_=(v="[object Arguments]"==v?l:v)==l,w=(m="[object Arguments]"==m?l:m)==l,x=v==m;if(x&&c(t)){if(!c(e))return!1;y=!0,_=!1}if(x&&!_)return g||(g=new r),y||f(t)?i(t,e,n,d,p,g):o(t,e,v,n,d,p,g);if(!(1&n)){var k=_&&h.call(t,"__wrapped__"),E=w&&h.call(e,"__wrapped__");if(k||E){var A=k?t.value():t,S=E?e.value():e;return g||(g=new r),p(A,S,n,d,g)}}return!!x&&(g||(g=new r),a(t,e,n,d,p,g))}},function(t,e){t.exports=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this}},function(t,e){t.exports=function(t){return this.__data__.has(t)}},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}},function(t,e,n){var r=n(87),i=n(307),o=n(86),a=n(316),u=n(518),s=n(237),c=r?r.prototype:void 0,f=c?c.valueOf:void 0;t.exports=function(t,e,n,r,c,l,h){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!l(new i(t),new i(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return o(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var d=u;case"[object Set]":var p=1&r;if(d||(d=s),t.size!=e.size&&!p)return!1;var g=h.get(t);if(g)return g==e;r|=2,h.set(t,e);var y=a(d(t),d(e),r,c,l,h);return h.delete(t),y;case"[object Symbol]":if(f)return f.call(t)==f.call(e)}return!1}},function(t,e){t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}},function(t,e,n){var r=n(304),i=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,o,a,u){var s=1&n,c=r(t),f=c.length;if(f!=r(e).length&&!s)return!1;for(var l=f;l--;){var h=c[l];if(!(s?h in e:i.call(e,h)))return!1}var d=u.get(t);if(d&&u.get(e))return d==e;var p=!0;u.set(t,e),u.set(e,t);for(var g=s;++l<f;){var y=t[h=c[l]],b=e[h];if(o)var v=s?o(b,y,h,e,t,u):o(y,b,h,t,e,u);if(!(void 0===v?y===b||a(y,b,n,o,u):v)){p=!1;break}g||(g="constructor"==h)}if(p&&!g){var m=t.constructor,_=e.constructor;m!=_&&"constructor"in t&&"constructor"in e&&!("function"==typeof m&&m instanceof m&&"function"==typeof _&&_ instanceof _)&&(p=!1)}return u.delete(t),u.delete(e),p}},function(t,e,n){var r=n(319),i=n(62);t.exports=function(t){for(var e=i(t),n=e.length;n--;){var o=e[n],a=t[o];e[n]=[o,a,r(a)]}return e}},function(t,e,n){var r=n(315),i=n(522),o=n(322),a=n(239),u=n(319),s=n(320),c=n(128);t.exports=function(t,e){return a(t)&&u(e)?s(c(t),e):function(n){var a=i(n,t);return void 0===a&&a===e?o(n,t):r(e,a,3)}}},function(t,e,n){var r=n(238);t.exports=function(t,e,n){var i=null==t?void 0:r(t,e);return void 0===i?n:i}},function(t,e,n){var r=n(524),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g,a=r((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(i,(function(t,n,r,i){e.push(r?i.replace(o,"$1"):n||t)})),e}));t.exports=a},function(t,e,n){var r=n(525);t.exports=function(t){var e=r(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}},function(t,e,n){var r=n(226);function i(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=t.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(i.Cache||r),n}i.Cache=r,t.exports=i},function(t,e,n){var r=n(87),i=n(159),o=n(15),a=n(91),u=r?r.prototype:void 0,s=u?u.toString:void 0;t.exports=function t(e){if("string"==typeof e)return e;if(o(e))return i(e,t)+"";if(a(e))return s?s.call(e):"";var n=e+"";return"0"==n&&1/e==-1/0?"-0":n}},function(t,e){t.exports=function(t,e){return null!=t&&e in Object(t)}},function(t,e,n){var r=n(324),i=n(529),o=n(239),a=n(128);t.exports=function(t){return o(t)?r(a(t)):i(t)}},function(t,e,n){var r=n(238);t.exports=function(t){return function(e){return r(e,t)}}},function(t,e){var n=Object.prototype.hasOwnProperty;t.exports=function(t,e){return null!=t&&n.call(t,e)}},function(t,e,n){var r=n(230),i=n(90),o=n(126),a=n(15),u=n(52),s=n(88),c=n(155),f=n(127),l=Object.prototype.hasOwnProperty;t.exports=function(t){if(null==t)return!0;if(u(t)&&(a(t)||"string"==typeof t||"function"==typeof t.splice||s(t)||f(t)||o(t)))return!t.length;var e=i(t);if("[object Map]"==e||"[object Set]"==e)return!t.size;if(c(t))return!r(t).length;for(var n in t)if(l.call(t,n))return!1;return!0}},function(t,e){t.exports=function(t,e,n,r){var i=-1,o=null==t?0:t.length;for(r&&o&&(n=t[++i]);++i<o;)n=e(n,t[i],i,t);return n}},function(t,e){t.exports=function(t,e,n,r,i){return i(t,(function(t,i,o){n=r?(r=!1,t):e(n,t,i,o)})),n}},function(t,e,n){var r=n(230),i=n(90),o=n(52),a=n(535),u=n(536);t.exports=function(t){if(null==t)return 0;if(o(t))return a(t)?u(t):t.length;var e=i(t);return"[object Map]"==e||"[object Set]"==e?t.size:r(t).length}},function(t,e,n){var r=n(75),i=n(15),o=n(43);t.exports=function(t){return"string"==typeof t||!i(t)&&o(t)&&"[object String]"==r(t)}},function(t,e,n){var r=n(537),i=n(538),o=n(539);t.exports=function(t){return i(t)?o(t):r(t)}},function(t,e,n){var r=n(324)("length");t.exports=r},function(t,e){var n=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");t.exports=function(t){return n.test(t)}},function(t,e){var n="[\\ud800-\\udfff]",r="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",i="\\ud83c[\\udffb-\\udfff]",o="[^\\ud800-\\udfff]",a="(?:\\ud83c[\\udde6-\\uddff]){2}",u="[\\ud800-\\udbff][\\udc00-\\udfff]",s="(?:"+r+"|"+i+")"+"?",c="[\\ufe0e\\ufe0f]?"+s+("(?:\\u200d(?:"+[o,a,u].join("|")+")[\\ufe0e\\ufe0f]?"+s+")*"),f="(?:"+[o+r+"?",r,a,u,n].join("|")+")",l=RegExp(i+"(?="+i+")|"+f+c,"g");t.exports=function(t){for(var e=l.lastIndex=0;l.test(t);)++e;return e}},function(t,e,n){var r=n(227),i=n(310),o=n(235),a=n(53),u=n(156),s=n(15),c=n(88),f=n(124),l=n(28),h=n(127);t.exports=function(t,e,n){var d=s(t),p=d||c(t)||h(t);if(e=a(e,4),null==n){var g=t&&t.constructor;n=p?d?new g:[]:l(t)&&f(g)?i(u(t)):{}}return(p?r:o)(t,(function(t,r,i){return e(n,t,r,i)})),n}},function(t,e,n){var r=n(240),i=n(160),o=n(546),a=n(333),u=i((function(t){return o(r(t,1,a,!0))}));t.exports=u},function(t,e,n){var r=n(87),i=n(126),o=n(15),a=r?r.isConcatSpreadable:void 0;t.exports=function(t){return o(t)||i(t)||!!(a&&t&&t[a])}},function(t,e){t.exports=function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}},function(t,e,n){var r=n(234),i=n(296),o=n(76),a=i?function(t,e){return i(t,"toString",{configurable:!0,enumerable:!1,value:r(e),writable:!0})}:o;t.exports=a},function(t,e){var n=Date.now;t.exports=function(t){var e=0,r=0;return function(){var i=n(),o=16-(i-r);if(r=i,o>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}},function(t,e,n){var r=n(317),i=n(547),o=n(551),a=n(318),u=n(552),s=n(237);t.exports=function(t,e,n){var c=-1,f=i,l=t.length,h=!0,d=[],p=d;if(n)h=!1,f=o;else if(l>=200){var g=e?null:u(t);if(g)return s(g);h=!1,f=a,p=new r}else p=e?[]:d;t:for(;++c<l;){var y=t[c],b=e?e(y):y;if(y=n||0!==y?y:0,h&&b==b){for(var v=p.length;v--;)if(p[v]===b)continue t;e&&p.push(b),d.push(y)}else f(p,b,n)||(p!==d&&p.push(b),d.push(y))}return d}},function(t,e,n){var r=n(548);t.exports=function(t,e){return!!(null==t?0:t.length)&&r(t,e,0)>-1}},function(t,e,n){var r=n(332),i=n(549),o=n(550);t.exports=function(t,e,n){return e==e?o(t,e,n):r(t,i,n)}},function(t,e){t.exports=function(t){return t!=t}},function(t,e){t.exports=function(t,e,n){for(var r=n-1,i=t.length;++r<i;)if(t[r]===e)return r;return-1}},function(t,e){t.exports=function(t,e,n){for(var r=-1,i=null==t?0:t.length;++r<i;)if(n(e,t[r]))return!0;return!1}},function(t,e,n){var r=n(306),i=n(553),o=n(237),a=r&&1/o(new r([,-0]))[1]==1/0?function(t){return new r(t)}:i;t.exports=a},function(t,e){t.exports=function(){}},function(t,e,n){var r=n(159);t.exports=function(t,e){return r(e,(function(e){return t[e]}))}},function(t,e){t.exports="2.1.8"},function(t,e,n){var r=n(27),i=n(224);function o(t){return r.map(t.nodes(),(function(e){var n=t.node(e),i=t.parent(e),o={v:e};return r.isUndefined(n)||(o.value=n),r.isUndefined(i)||(o.parent=i),o}))}function a(t){return r.map(t.edges(),(function(e){var n=t.edge(e),i={v:e.v,w:e.w};return r.isUndefined(e.name)||(i.name=e.name),r.isUndefined(n)||(i.value=n),i}))}t.exports={write:function(t){var e={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:o(t),edges:a(t)};r.isUndefined(t.graph())||(e.value=r.clone(t.graph()));return e},read:function(t){var e=new i(t.options).setGraph(t.value);return r.each(t.nodes,(function(t){e.setNode(t.v,t.value),t.parent&&e.setParent(t.v,t.parent)})),r.each(t.edges,(function(t){e.setEdge({v:t.v,w:t.w,name:t.name},t.value)})),e}}},function(t,e,n){t.exports={components:n(558),dijkstra:n(335),dijkstraAll:n(559),findCycles:n(560),floydWarshall:n(561),isAcyclic:n(562),postorder:n(563),preorder:n(564),prim:n(565),tarjan:n(337),topsort:n(338)}},function(t,e,n){var r=n(27);t.exports=function(t){var e,n={},i=[];function o(i){r.has(n,i)||(n[i]=!0,e.push(i),r.each(t.successors(i),o),r.each(t.predecessors(i),o))}return r.each(t.nodes(),(function(t){e=[],o(t),e.length&&i.push(e)})),i}},function(t,e,n){var r=n(335),i=n(27);t.exports=function(t,e,n){return i.transform(t.nodes(),(function(i,o){i[o]=r(t,o,e,n)}),{})}},function(t,e,n){var r=n(27),i=n(337);t.exports=function(t){return r.filter(i(t),(function(e){return e.length>1||1===e.length&&t.hasEdge(e[0],e[0])}))}},function(t,e,n){var r=n(27);t.exports=function(t,e,n){return function(t,e,n){var r={},i=t.nodes();return i.forEach((function(t){r[t]={},r[t][t]={distance:0},i.forEach((function(e){t!==e&&(r[t][e]={distance:Number.POSITIVE_INFINITY})})),n(t).forEach((function(n){var i=n.v===t?n.w:n.v,o=e(n);r[t][i]={distance:o,predecessor:t}}))})),i.forEach((function(t){var e=r[t];i.forEach((function(n){var o=r[n];i.forEach((function(n){var r=o[t],i=e[n],a=o[n],u=r.distance+i.distance;u<a.distance&&(a.distance=u,a.predecessor=i.predecessor)}))}))})),r}(t,e||i,n||function(e){return t.outEdges(e)})};var i=r.constant(1)},function(t,e,n){var r=n(338);t.exports=function(t){try{r(t)}catch(t){if(t instanceof r.CycleException)return!1;throw t}return!0}},function(t,e,n){var r=n(339);t.exports=function(t,e){return r(t,e,"post")}},function(t,e,n){var r=n(339);t.exports=function(t,e){return r(t,e,"pre")}},function(t,e,n){var r=n(27),i=n(224),o=n(336);t.exports=function(t,e){var n,a=new i,u={},s=new o;function c(t){var r=t.v===n?t.w:t.v,i=s.priority(r);if(void 0!==i){var o=e(t);o<i&&(u[r]=n,s.decrease(r,o))}}if(0===t.nodeCount())return a;r.each(t.nodes(),(function(t){s.add(t,Number.POSITIVE_INFINITY),a.setNode(t)})),s.decrease(t.nodes()[0],0);var f=!1;for(;s.size()>0;){if(n=s.removeMin(),r.has(u,n))a.setEdge(n,u[n]);else{if(f)throw new Error("Input graph is not connected: "+t);f=!0}t.nodeEdges(n).forEach(c)}return a}},function(t,e,n){var r;try{r=n(340)}catch(t){}r||(r=window.graphlib),t.exports=r},function(t,e,n){t.exports={Graph:n(241),version:n(668)}},function(t,e,n){var r=n(341);t.exports=function(t){return r(t,4)}},function(t,e){t.exports=function(){this.__data__=[],this.size=0}},function(t,e,n){var r=n(163),i=Array.prototype.splice;t.exports=function(t){var e=this.__data__,n=r(e,t);return!(n<0)&&(n==e.length-1?e.pop():i.call(e,n,1),--this.size,!0)}},function(t,e,n){var r=n(163);t.exports=function(t){var e=this.__data__,n=r(e,t);return n<0?void 0:e[n][1]}},function(t,e,n){var r=n(163);t.exports=function(t){return r(this.__data__,t)>-1}},function(t,e,n){var r=n(163);t.exports=function(t,e){var n=this.__data__,i=r(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this}},function(t,e,n){var r=n(162);t.exports=function(){this.__data__=new r,this.size=0}},function(t,e){t.exports=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}},function(t,e){t.exports=function(t){return this.__data__.get(t)}},function(t,e){t.exports=function(t){return this.__data__.has(t)}},function(t,e,n){var r=n(162),i=n(242),o=n(243);t.exports=function(t,e){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!i||a.length<199)return a.push([t,e]),this.size=++n.size,this;n=this.__data__=new o(a)}return n.set(t,e),this.size=n.size,this}},function(t,e,n){var r=n(93),i=n(582),o=n(30),a=n(343),u=/^\[object .+?Constructor\]$/,s=Function.prototype,c=Object.prototype,f=s.toString,l=c.hasOwnProperty,h=RegExp("^"+f.call(l).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!o(t)||i(t))&&(r(t)?h:u).test(a(t))}},function(t,e,n){var r=n(94),i=Object.prototype,o=i.hasOwnProperty,a=i.toString,u=r?r.toStringTag:void 0;t.exports=function(t){var e=o.call(t,u),n=t[u];try{t[u]=void 0;var r=!0}catch(t){}var i=a.call(t);return r&&(e?t[u]=n:delete t[u]),i}},function(t,e){var n=Object.prototype.toString;t.exports=function(t){return n.call(t)}},function(t,e,n){var r,i=n(583),o=(r=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";t.exports=function(t){return!!o&&o in t}},function(t,e,n){var r=n(36)["__core-js_shared__"];t.exports=r},function(t,e){t.exports=function(t,e){return null==t?void 0:t[e]}},function(t,e,n){var r=n(586),i=n(162),o=n(242);t.exports=function(){this.size=0,this.__data__={hash:new r,map:new(o||i),string:new r}}},function(t,e,n){var r=n(587),i=n(588),o=n(589),a=n(590),u=n(591);function s(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}s.prototype.clear=r,s.prototype.delete=i,s.prototype.get=o,s.prototype.has=a,s.prototype.set=u,t.exports=s},function(t,e,n){var r=n(164);t.exports=function(){this.__data__=r?r(null):{},this.size=0}},function(t,e){t.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}},function(t,e,n){var r=n(164),i=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;if(r){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return i.call(e,t)?e[t]:void 0}},function(t,e,n){var r=n(164),i=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return r?void 0!==e[t]:i.call(e,t)}},function(t,e,n){var r=n(164);t.exports=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=r&&void 0===e?"__lodash_hash_undefined__":e,this}},function(t,e,n){var r=n(165);t.exports=function(t){var e=r(this,t).delete(t);return this.size-=e?1:0,e}},function(t,e){t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},function(t,e,n){var r=n(165);t.exports=function(t){return r(this,t).get(t)}},function(t,e,n){var r=n(165);t.exports=function(t){return r(this,t).has(t)}},function(t,e,n){var r=n(165);t.exports=function(t,e){var n=r(this,t),i=n.size;return n.set(t,e),this.size+=n.size==i?0:1,this}},function(t,e,n){var r=n(129),i=n(63);t.exports=function(t,e){return t&&r(e,i(e),t)}},function(t,e){t.exports=function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}},function(t,e,n){var r=n(78),i=n(44);t.exports=function(t){return i(t)&&"[object Arguments]"==r(t)}},function(t,e){t.exports=function(){return!1}},function(t,e,n){var r=n(78),i=n(245),o=n(44),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,t.exports=function(t){return o(t)&&i(t.length)&&!!a[r(t)]}},function(t,e,n){var r=n(346)(Object.keys,Object);t.exports=r},function(t,e,n){var r=n(129),i=n(96);t.exports=function(t,e){return t&&r(e,i(e),t)}},function(t,e,n){var r=n(30),i=n(170),o=n(605),a=Object.prototype.hasOwnProperty;t.exports=function(t){if(!r(t))return o(t);var e=i(t),n=[];for(var u in t)("constructor"!=u||!e&&a.call(t,u))&&n.push(u);return n}},function(t,e){t.exports=function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}},function(t,e,n){var r=n(129),i=n(248);t.exports=function(t,e){return r(t,i(t),e)}},function(t,e,n){var r=n(129),i=n(351);t.exports=function(t,e){return r(t,i(t),e)}},function(t,e,n){var r=n(353),i=n(351),o=n(96);t.exports=function(t){return r(t,o,i)}},function(t,e,n){var r=n(77)(n(36),"DataView");t.exports=r},function(t,e,n){var r=n(77)(n(36),"Promise");t.exports=r},function(t,e,n){var r=n(77)(n(36),"WeakMap");t.exports=r},function(t,e){var n=Object.prototype.hasOwnProperty;t.exports=function(t){var e=t.length,r=new t.constructor(e);return e&&"string"==typeof t[0]&&n.call(t,"index")&&(r.index=t.index,r.input=t.input),r}},function(t,e,n){var r=n(250),i=n(614),o=n(615),a=n(616),u=n(356);t.exports=function(t,e,n){var s=t.constructor;switch(e){case"[object ArrayBuffer]":return r(t);case"[object Boolean]":case"[object Date]":return new s(+t);case"[object DataView]":return i(t,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return u(t,n);case"[object Map]":return new s;case"[object Number]":case"[object String]":return new s(t);case"[object RegExp]":return o(t);case"[object Set]":return new s;case"[object Symbol]":return a(t)}}},function(t,e,n){var r=n(250);t.exports=function(t,e){var n=e?r(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}},function(t,e){var n=/\w*$/;t.exports=function(t){var e=new t.constructor(t.source,n.exec(t));return e.lastIndex=t.lastIndex,e}},function(t,e,n){var r=n(94),i=r?r.prototype:void 0,o=i?i.valueOf:void 0;t.exports=function(t){return o?Object(o.call(t)):{}}},function(t,e,n){var r=n(618),i=n(169),o=n(246),a=o&&o.isMap,u=a?i(a):r;t.exports=u},function(t,e,n){var r=n(97),i=n(44);t.exports=function(t){return i(t)&&"[object Map]"==r(t)}},function(t,e,n){var r=n(620),i=n(169),o=n(246),a=o&&o.isSet,u=a?i(a):r;t.exports=u},function(t,e,n){var r=n(97),i=n(44);t.exports=function(t){return i(t)&&"[object Set]"==r(t)}},function(t,e){t.exports=function(t){return function(e,n,r){for(var i=-1,o=Object(e),a=r(e),u=a.length;u--;){var s=a[t?u:++i];if(!1===n(o[s],s,o))break}return e}}},function(t,e,n){var r=n(56);t.exports=function(t,e){return function(n,i){if(null==n)return n;if(!r(n))return t(n,i);for(var o=n.length,a=e?o:-1,u=Object(n);(e?a--:++a<o)&&!1!==i(u[a],a,u););return n}}},function(t,e,n){var r=n(172);t.exports=function(t,e){var n=[];return r(t,(function(t,r,i){e(t,r,i)&&n.push(t)})),n}},function(t,e,n){var r=n(625),i=n(633),o=n(367);t.exports=function(t){var e=i(t);return 1==e.length&&e[0][2]?o(e[0][0],e[0][1]):function(n){return n===t||r(n,t,e)}}},function(t,e,n){var r=n(161),i=n(362);t.exports=function(t,e,n,o){var a=n.length,u=a,s=!o;if(null==t)return!u;for(t=Object(t);a--;){var c=n[a];if(s&&c[2]?c[1]!==t[c[0]]:!(c[0]in t))return!1}for(;++a<u;){var f=(c=n[a])[0],l=t[f],h=c[1];if(s&&c[2]){if(void 0===l&&!(f in t))return!1}else{var d=new r;if(o)var p=o(l,h,f,t,e,d);if(!(void 0===p?i(h,l,3,o,d):p))return!1}}return!0}},function(t,e,n){var r=n(161),i=n(363),o=n(630),a=n(632),u=n(97),s=n(16),c=n(95),f=n(131),l="[object Object]",h=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,d,p,g){var y=s(t),b=s(e),v=y?"[object Array]":u(t),m=b?"[object Array]":u(e),_=(v="[object Arguments]"==v?l:v)==l,w=(m="[object Arguments]"==m?l:m)==l,x=v==m;if(x&&c(t)){if(!c(e))return!1;y=!0,_=!1}if(x&&!_)return g||(g=new r),y||f(t)?i(t,e,n,d,p,g):o(t,e,v,n,d,p,g);if(!(1&n)){var k=_&&h.call(t,"__wrapped__"),E=w&&h.call(e,"__wrapped__");if(k||E){var A=k?t.value():t,S=E?e.value():e;return g||(g=new r),p(A,S,n,d,g)}}return!!x&&(g||(g=new r),a(t,e,n,d,p,g))}},function(t,e){t.exports=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this}},function(t,e){t.exports=function(t){return this.__data__.has(t)}},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}},function(t,e,n){var r=n(94),i=n(355),o=n(92),a=n(363),u=n(631),s=n(255),c=r?r.prototype:void 0,f=c?c.valueOf:void 0;t.exports=function(t,e,n,r,c,l,h){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!l(new i(t),new i(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return o(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var d=u;case"[object Set]":var p=1&r;if(d||(d=s),t.size!=e.size&&!p)return!1;var g=h.get(t);if(g)return g==e;r|=2,h.set(t,e);var y=a(d(t),d(e),r,c,l,h);return h.delete(t),y;case"[object Symbol]":if(f)return f.call(t)==f.call(e)}return!1}},function(t,e){t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}},function(t,e,n){var r=n(352),i=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,o,a,u){var s=1&n,c=r(t),f=c.length;if(f!=r(e).length&&!s)return!1;for(var l=f;l--;){var h=c[l];if(!(s?h in e:i.call(e,h)))return!1}var d=u.get(t);if(d&&u.get(e))return d==e;var p=!0;u.set(t,e),u.set(e,t);for(var g=s;++l<f;){var y=t[h=c[l]],b=e[h];if(o)var v=s?o(b,y,h,e,t,u):o(y,b,h,t,e,u);if(!(void 0===v?y===b||a(y,b,n,o,u):v)){p=!1;break}g||(g="constructor"==h)}if(p&&!g){var m=t.constructor,_=e.constructor;m!=_&&"constructor"in t&&"constructor"in e&&!("function"==typeof m&&m instanceof m&&"function"==typeof _&&_ instanceof _)&&(p=!1)}return u.delete(t),u.delete(e),p}},function(t,e,n){var r=n(366),i=n(63);t.exports=function(t){for(var e=i(t),n=e.length;n--;){var o=e[n],a=t[o];e[n]=[o,a,r(a)]}return e}},function(t,e,n){var r=n(362),i=n(635),o=n(369),a=n(257),u=n(366),s=n(367),c=n(132);t.exports=function(t,e){return a(t)&&u(e)?s(c(t),e):function(n){var a=i(n,t);return void 0===a&&a===e?o(n,t):r(e,a,3)}}},function(t,e,n){var r=n(256);t.exports=function(t,e,n){var i=null==t?void 0:r(t,e);return void 0===i?n:i}},function(t,e,n){var r=n(637),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g,a=r((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(i,(function(t,n,r,i){e.push(r?i.replace(o,"$1"):n||t)})),e}));t.exports=a},function(t,e,n){var r=n(638);t.exports=function(t){var e=r(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}},function(t,e,n){var r=n(243);function i(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=t.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(i.Cache||r),n}i.Cache=r,t.exports=i},function(t,e,n){var r=n(94),i=n(174),o=n(16),a=n(98),u=r?r.prototype:void 0,s=u?u.toString:void 0;t.exports=function t(e){if("string"==typeof e)return e;if(o(e))return i(e,t)+"";if(a(e))return s?s.call(e):"";var n=e+"";return"0"==n&&1/e==-1/0?"-0":n}},function(t,e){t.exports=function(t,e){return null!=t&&e in Object(t)}},function(t,e,n){var r=n(371),i=n(642),o=n(257),a=n(132);t.exports=function(t){return o(t)?r(a(t)):i(t)}},function(t,e,n){var r=n(256);t.exports=function(t){return function(e){return r(e,t)}}},function(t,e){var n=Object.prototype.hasOwnProperty;t.exports=function(t,e){return null!=t&&n.call(t,e)}},function(t,e,n){var r=n(247),i=n(97),o=n(130),a=n(16),u=n(56),s=n(95),c=n(170),f=n(131),l=Object.prototype.hasOwnProperty;t.exports=function(t){if(null==t)return!0;if(u(t)&&(a(t)||"string"==typeof t||"function"==typeof t.splice||s(t)||f(t)||o(t)))return!t.length;var e=i(t);if("[object Map]"==e||"[object Set]"==e)return!t.size;if(c(t))return!r(t).length;for(var n in t)if(l.call(t,n))return!1;return!0}},function(t,e){t.exports=function(t,e,n,r){var i=-1,o=null==t?0:t.length;for(r&&o&&(n=t[++i]);++i<o;)n=e(n,t[i],i,t);return n}},function(t,e){t.exports=function(t,e,n,r,i){return i(t,(function(t,i,o){n=r?(r=!1,t):e(n,t,i,o)})),n}},function(t,e,n){var r=n(247),i=n(97),o=n(56),a=n(648),u=n(649);t.exports=function(t){if(null==t)return 0;if(o(t))return a(t)?u(t):t.length;var e=i(t);return"[object Map]"==e||"[object Set]"==e?t.size:r(t).length}},function(t,e,n){var r=n(78),i=n(16),o=n(44);t.exports=function(t){return"string"==typeof t||!i(t)&&o(t)&&"[object String]"==r(t)}},function(t,e,n){var r=n(650),i=n(651),o=n(652);t.exports=function(t){return i(t)?o(t):r(t)}},function(t,e,n){var r=n(371)("length");t.exports=r},function(t,e){var n=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");t.exports=function(t){return n.test(t)}},function(t,e){var n="[\\ud800-\\udfff]",r="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",i="\\ud83c[\\udffb-\\udfff]",o="[^\\ud800-\\udfff]",a="(?:\\ud83c[\\udde6-\\uddff]){2}",u="[\\ud800-\\udbff][\\udc00-\\udfff]",s="(?:"+r+"|"+i+")"+"?",c="[\\ufe0e\\ufe0f]?"+s+("(?:\\u200d(?:"+[o,a,u].join("|")+")[\\ufe0e\\ufe0f]?"+s+")*"),f="(?:"+[o+r+"?",r,a,u,n].join("|")+")",l=RegExp(i+"(?="+i+")|"+f+c,"g");t.exports=function(t){for(var e=l.lastIndex=0;l.test(t);)++e;return e}},function(t,e,n){var r=n(244),i=n(358),o=n(253),a=n(57),u=n(171),s=n(16),c=n(95),f=n(93),l=n(30),h=n(131);t.exports=function(t,e,n){var d=s(t),p=d||c(t)||h(t);if(e=a(e,4),null==n){var g=t&&t.constructor;n=p?d?new g:[]:l(t)&&f(g)?i(u(t)):{}}return(p?r:o)(t,(function(t,r,i){return e(n,t,r,i)})),n}},function(t,e,n){var r=n(259),i=n(175),o=n(659),a=n(379),u=i((function(t){return o(r(t,1,a,!0))}));t.exports=u},function(t,e,n){var r=n(94),i=n(130),o=n(16),a=r?r.isConcatSpreadable:void 0;t.exports=function(t){return o(t)||i(t)||!!(a&&t&&t[a])}},function(t,e){t.exports=function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}},function(t,e,n){var r=n(251),i=n(344),o=n(79),a=i?function(t,e){return i(t,"toString",{configurable:!0,enumerable:!1,value:r(e),writable:!0})}:o;t.exports=a},function(t,e){var n=Date.now;t.exports=function(t){var e=0,r=0;return function(){var i=n(),o=16-(i-r);if(r=i,o>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}},function(t,e,n){var r=n(364),i=n(660),o=n(664),a=n(365),u=n(665),s=n(255);t.exports=function(t,e,n){var c=-1,f=i,l=t.length,h=!0,d=[],p=d;if(n)h=!1,f=o;else if(l>=200){var g=e?null:u(t);if(g)return s(g);h=!1,f=a,p=new r}else p=e?[]:d;t:for(;++c<l;){var y=t[c],b=e?e(y):y;if(y=n||0!==y?y:0,h&&b==b){for(var v=p.length;v--;)if(p[v]===b)continue t;e&&p.push(b),d.push(y)}else f(p,b,n)||(p!==d&&p.push(b),d.push(y))}return d}},function(t,e,n){var r=n(661);t.exports=function(t,e){return!!(null==t?0:t.length)&&r(t,e,0)>-1}},function(t,e,n){var r=n(378),i=n(662),o=n(663);t.exports=function(t,e,n){return e==e?o(t,e,n):r(t,i,n)}},function(t,e){t.exports=function(t){return t!=t}},function(t,e){t.exports=function(t,e,n){for(var r=n-1,i=t.length;++r<i;)if(t[r]===e)return r;return-1}},function(t,e){t.exports=function(t,e,n){for(var r=-1,i=null==t?0:t.length;++r<i;)if(n(e,t[r]))return!0;return!1}},function(t,e,n){var r=n(354),i=n(666),o=n(255),a=r&&1/o(new r([,-0]))[1]==1/0?function(t){return new r(t)}:i;t.exports=a},function(t,e){t.exports=function(){}},function(t,e,n){var r=n(174);t.exports=function(t,e){return r(e,(function(e){return t[e]}))}},function(t,e){t.exports="2.1.8"},function(t,e,n){var r=n(29),i=n(241);function o(t){return r.map(t.nodes(),(function(e){var n=t.node(e),i=t.parent(e),o={v:e};return r.isUndefined(n)||(o.value=n),r.isUndefined(i)||(o.parent=i),o}))}function a(t){return r.map(t.edges(),(function(e){var n=t.edge(e),i={v:e.v,w:e.w};return r.isUndefined(e.name)||(i.name=e.name),r.isUndefined(n)||(i.value=n),i}))}t.exports={write:function(t){var e={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:o(t),edges:a(t)};r.isUndefined(t.graph())||(e.value=r.clone(t.graph()));return e},read:function(t){var e=new i(t.options).setGraph(t.value);return r.each(t.nodes,(function(t){e.setNode(t.v,t.value),t.parent&&e.setParent(t.v,t.parent)})),r.each(t.edges,(function(t){e.setEdge({v:t.v,w:t.w,name:t.name},t.value)})),e}}},function(t,e,n){t.exports={components:n(671),dijkstra:n(381),dijkstraAll:n(672),findCycles:n(673),floydWarshall:n(674),isAcyclic:n(675),postorder:n(676),preorder:n(677),prim:n(678),tarjan:n(383),topsort:n(384)}},function(t,e,n){var r=n(29);t.exports=function(t){var e,n={},i=[];function o(i){r.has(n,i)||(n[i]=!0,e.push(i),r.each(t.successors(i),o),r.each(t.predecessors(i),o))}return r.each(t.nodes(),(function(t){e=[],o(t),e.length&&i.push(e)})),i}},function(t,e,n){var r=n(381),i=n(29);t.exports=function(t,e,n){return i.transform(t.nodes(),(function(i,o){i[o]=r(t,o,e,n)}),{})}},function(t,e,n){var r=n(29),i=n(383);t.exports=function(t){return r.filter(i(t),(function(e){return e.length>1||1===e.length&&t.hasEdge(e[0],e[0])}))}},function(t,e,n){var r=n(29);t.exports=function(t,e,n){return function(t,e,n){var r={},i=t.nodes();return i.forEach((function(t){r[t]={},r[t][t]={distance:0},i.forEach((function(e){t!==e&&(r[t][e]={distance:Number.POSITIVE_INFINITY})})),n(t).forEach((function(n){var i=n.v===t?n.w:n.v,o=e(n);r[t][i]={distance:o,predecessor:t}}))})),i.forEach((function(t){var e=r[t];i.forEach((function(n){var o=r[n];i.forEach((function(n){var r=o[t],i=e[n],a=o[n],u=r.distance+i.distance;u<a.distance&&(a.distance=u,a.predecessor=i.predecessor)}))}))})),r}(t,e||i,n||function(e){return t.outEdges(e)})};var i=r.constant(1)},function(t,e,n){var r=n(384);t.exports=function(t){try{r(t)}catch(t){if(t instanceof r.CycleException)return!1;throw t}return!0}},function(t,e,n){var r=n(385);t.exports=function(t,e){return r(t,e,"post")}},function(t,e,n){var r=n(385);t.exports=function(t,e){return r(t,e,"pre")}},function(t,e,n){var r=n(29),i=n(241),o=n(382);t.exports=function(t,e){var n,a=new i,u={},s=new o;function c(t){var r=t.v===n?t.w:t.v,i=s.priority(r);if(void 0!==i){var o=e(t);o<i&&(u[r]=n,s.decrease(r,o))}}if(0===t.nodeCount())return a;r.each(t.nodes(),(function(t){s.add(t,Number.POSITIVE_INFINITY),a.setNode(t)})),s.decrease(t.nodes()[0],0);var f=!1;for(;s.size()>0;){if(n=s.removeMin(),r.has(u,n))a.setEdge(n,u[n]);else{if(f)throw new Error("Input graph is not connected: "+t);f=!0}t.nodeEdges(n).forEach(c)}return a}},function(t,e,n){t.exports={graphlib:n(37),layout:n(680),debug:n(734),util:{time:n(21).time,notime:n(21).notime},version:n(735)}},function(t,e,n){"use strict";var r=n(7),i=n(713),o=n(716),a=n(717),u=n(21).normalizeRanks,s=n(719),c=n(21).removeEmptyRanks,f=n(720),l=n(721),h=n(722),d=n(723),p=n(732),g=n(21),y=n(37).Graph;t.exports=function(t,e){var n=e&&e.debugTiming?g.time:g.notime;n("layout",(function(){var e=n(" buildLayoutGraph",(function(){return function(t){var e=new y({multigraph:!0,compound:!0}),n=S(t.graph());return e.setGraph(r.merge({},v,A(n,b),r.pick(n,m))),r.forEach(t.nodes(),(function(n){var i=S(t.node(n));e.setNode(n,r.defaults(A(i,_),w)),e.setParent(n,t.parent(n))})),r.forEach(t.edges(),(function(n){var i=S(t.edge(n));e.setEdge(n,r.merge({},k,A(i,x),r.pick(i,E)))})),e}(t)}));n(" runLayout",(function(){!function(t,e){e(" makeSpaceForEdgeLabels",(function(){!function(t){var e=t.graph();e.ranksep/=2,r.forEach(t.edges(),(function(n){var r=t.edge(n);r.minlen*=2,"c"!==r.labelpos.toLowerCase()&&("TB"===e.rankdir||"BT"===e.rankdir?r.width+=r.labeloffset:r.height+=r.labeloffset)}))}(t)})),e(" removeSelfEdges",(function(){!function(t){r.forEach(t.edges(),(function(e){if(e.v===e.w){var n=t.node(e.v);n.selfEdges||(n.selfEdges=[]),n.selfEdges.push({e:e,label:t.edge(e)}),t.removeEdge(e)}}))}(t)})),e(" acyclic",(function(){i.run(t)})),e(" nestingGraph.run",(function(){f.run(t)})),e(" rank",(function(){a(g.asNonCompoundGraph(t))})),e(" injectEdgeLabelProxies",(function(){!function(t){r.forEach(t.edges(),(function(e){var n=t.edge(e);if(n.width&&n.height){var r=t.node(e.v),i={rank:(t.node(e.w).rank-r.rank)/2+r.rank,e:e};g.addDummyNode(t,"edge-proxy",i,"_ep")}}))}(t)})),e(" removeEmptyRanks",(function(){c(t)})),e(" nestingGraph.cleanup",(function(){f.cleanup(t)})),e(" normalizeRanks",(function(){u(t)})),e(" assignRankMinMax",(function(){!function(t){var e=0;r.forEach(t.nodes(),(function(n){var i=t.node(n);i.borderTop&&(i.minRank=t.node(i.borderTop).rank,i.maxRank=t.node(i.borderBottom).rank,e=r.max(e,i.maxRank))})),t.graph().maxRank=e}(t)})),e(" removeEdgeLabelProxies",(function(){!function(t){r.forEach(t.nodes(),(function(e){var n=t.node(e);"edge-proxy"===n.dummy&&(t.edge(n.e).labelRank=n.rank,t.removeNode(e))}))}(t)})),e(" normalize.run",(function(){o.run(t)})),e(" parentDummyChains",(function(){s(t)})),e(" addBorderSegments",(function(){l(t)})),e(" order",(function(){d(t)})),e(" insertSelfEdges",(function(){!function(t){var e=g.buildLayerMatrix(t);r.forEach(e,(function(e){var n=0;r.forEach(e,(function(e,i){var o=t.node(e);o.order=i+n,r.forEach(o.selfEdges,(function(e){g.addDummyNode(t,"selfedge",{width:e.label.width,height:e.label.height,rank:o.rank,order:i+ ++n,e:e.e,label:e.label},"_se")})),delete o.selfEdges}))}))}(t)})),e(" adjustCoordinateSystem",(function(){h.adjust(t)})),e(" position",(function(){p(t)})),e(" positionSelfEdges",(function(){!function(t){r.forEach(t.nodes(),(function(e){var n=t.node(e);if("selfedge"===n.dummy){var r=t.node(n.e.v),i=r.x+r.width/2,o=r.y,a=n.x-i,u=r.height/2;t.setEdge(n.e,n.label),t.removeNode(e),n.label.points=[{x:i+2*a/3,y:o-u},{x:i+5*a/6,y:o-u},{x:i+a,y:o},{x:i+5*a/6,y:o+u},{x:i+2*a/3,y:o+u}],n.label.x=n.x,n.label.y=n.y}}))}(t)})),e(" removeBorderNodes",(function(){!function(t){r.forEach(t.nodes(),(function(e){if(t.children(e).length){var n=t.node(e),i=t.node(n.borderTop),o=t.node(n.borderBottom),a=t.node(r.last(n.borderLeft)),u=t.node(r.last(n.borderRight));n.width=Math.abs(u.x-a.x),n.height=Math.abs(o.y-i.y),n.x=a.x+n.width/2,n.y=i.y+n.height/2}})),r.forEach(t.nodes(),(function(e){"border"===t.node(e).dummy&&t.removeNode(e)}))}(t)})),e(" normalize.undo",(function(){o.undo(t)})),e(" fixupEdgeLabelCoords",(function(){!function(t){r.forEach(t.edges(),(function(e){var n=t.edge(e);if(r.has(n,"x"))switch("l"!==n.labelpos&&"r"!==n.labelpos||(n.width-=n.labeloffset),n.labelpos){case"l":n.x-=n.width/2+n.labeloffset;break;case"r":n.x+=n.width/2+n.labeloffset}}))}(t)})),e(" undoCoordinateSystem",(function(){h.undo(t)})),e(" translateGraph",(function(){!function(t){var e=Number.POSITIVE_INFINITY,n=0,i=Number.POSITIVE_INFINITY,o=0,a=t.graph(),u=a.marginx||0,s=a.marginy||0;function c(t){var r=t.x,a=t.y,u=t.width,s=t.height;e=Math.min(e,r-u/2),n=Math.max(n,r+u/2),i=Math.min(i,a-s/2),o=Math.max(o,a+s/2)}r.forEach(t.nodes(),(function(e){c(t.node(e))})),r.forEach(t.edges(),(function(e){var n=t.edge(e);r.has(n,"x")&&c(n)})),e-=u,i-=s,r.forEach(t.nodes(),(function(n){var r=t.node(n);r.x-=e,r.y-=i})),r.forEach(t.edges(),(function(n){var o=t.edge(n);r.forEach(o.points,(function(t){t.x-=e,t.y-=i})),r.has(o,"x")&&(o.x-=e),r.has(o,"y")&&(o.y-=i)})),a.width=n-e+u,a.height=o-i+s}(t)})),e(" assignNodeIntersects",(function(){!function(t){r.forEach(t.edges(),(function(e){var n,r,i=t.edge(e),o=t.node(e.v),a=t.node(e.w);i.points?(n=i.points[0],r=i.points[i.points.length-1]):(i.points=[],n=a,r=o),i.points.unshift(g.intersectRect(o,n)),i.points.push(g.intersectRect(a,r))}))}(t)})),e(" reversePoints",(function(){!function(t){r.forEach(t.edges(),(function(e){var n=t.edge(e);n.reversed&&n.points.reverse()}))}(t)})),e(" acyclic.undo",(function(){i.undo(t)}))}(e,n)})),n(" updateInputGraph",(function(){!function(t,e){r.forEach(t.nodes(),(function(n){var r=t.node(n),i=e.node(n);r&&(r.x=i.x,r.y=i.y,e.children(n).length&&(r.width=i.width,r.height=i.height))})),r.forEach(t.edges(),(function(n){var i=t.edge(n),o=e.edge(n);i.points=o.points,r.has(o,"x")&&(i.x=o.x,i.y=o.y)})),t.graph().width=e.graph().width,t.graph().height=e.graph().height}(t,e)}))}))};var b=["nodesep","edgesep","ranksep","marginx","marginy"],v={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},m=["acyclicer","ranker","rankdir","align"],_=["width","height"],w={width:0,height:0},x=["minlen","weight","width","height","labeloffset"],k={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},E=["labelpos"];function A(t,e){return r.mapValues(r.pick(t,e),Number)}function S(t){var e={};return r.forEach(t,(function(t,n){e[n.toLowerCase()]=t})),e}},function(t,e,n){var r=n(341);t.exports=function(t){return r(t,5)}},function(t,e,n){var r=n(683)(n(684));t.exports=r},function(t,e,n){var r=n(57),i=n(56),o=n(63);t.exports=function(t){return function(e,n,a){var u=Object(e);if(!i(e)){var s=r(n,3);e=o(e),n=function(t){return s(u[t],t,u)}}var c=t(e,n,a);return c>-1?u[s?e[c]:c]:void 0}}},function(t,e,n){var r=n(378),i=n(57),o=n(685),a=Math.max;t.exports=function(t,e,n){var u=null==t?0:t.length;if(!u)return-1;var s=null==n?0:o(n);return s<0&&(s=a(u+s,0)),r(t,i(e,3),s)}},function(t,e,n){var r=n(388);t.exports=function(t){var e=r(t),n=e%1;return e==e?n?e-n:e:0}},function(t,e,n){var r=n(30),i=n(98),o=/^\s+|\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,s=/^0o[0-7]+$/i,c=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(i(t))return NaN;if(r(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=r(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(o,"");var n=u.test(t);return n||s.test(t)?c(t.slice(2),n?2:8):a.test(t)?NaN:+t}},function(t,e,n){var r=n(254),i=n(360),o=n(96);t.exports=function(t,e){return null==t?t:r(t,i(e),o)}},function(t,e){t.exports=function(t){var e=null==t?0:t.length;return e?t[e-1]:void 0}},function(t,e,n){var r=n(167),i=n(253),o=n(57);t.exports=function(t,e){var n={};return e=o(e,3),i(t,(function(t,i,o){r(n,i,e(t,i,o))})),n}},function(t,e,n){var r=n(260),i=n(691),o=n(79);t.exports=function(t){return t&&t.length?r(t,o,i):void 0}},function(t,e){t.exports=function(t,e){return t>e}},function(t,e,n){var r=n(693),i=n(696)((function(t,e,n){r(t,e,n)}));t.exports=i},function(t,e,n){var r=n(161),i=n(390),o=n(254),a=n(694),u=n(30),s=n(96),c=n(392);t.exports=function t(e,n,f,l,h){e!==n&&o(n,(function(o,s){if(h||(h=new r),u(o))a(e,n,s,f,t,l,h);else{var d=l?l(c(e,s),o,s+"",e,n,h):void 0;void 0===d&&(d=o),i(e,s,d)}}),s)}},function(t,e,n){var r=n(390),i=n(347),o=n(356),a=n(348),u=n(357),s=n(130),c=n(16),f=n(379),l=n(95),h=n(93),d=n(30),p=n(391),g=n(131),y=n(392),b=n(695);t.exports=function(t,e,n,v,m,_,w){var x=y(t,n),k=y(e,n),E=w.get(k);if(E)r(t,n,E);else{var A=_?_(x,k,n+"",t,e,w):void 0,S=void 0===A;if(S){var M=c(k),T=!M&&l(k),O=!M&&!T&&g(k);A=k,M||T||O?c(x)?A=x:f(x)?A=a(x):T?(S=!1,A=i(k,!0)):O?(S=!1,A=o(k,!0)):A=[]:p(k)||s(k)?(A=x,s(x)?A=b(x):d(x)&&!h(x)||(A=u(k))):S=!1}S&&(w.set(k,A),m(A,k,v,_,w),w.delete(k)),r(t,n,A)}}},function(t,e,n){var r=n(129),i=n(96);t.exports=function(t){return r(t,i(t))}},function(t,e,n){var r=n(175),i=n(176);t.exports=function(t){return r((function(e,n){var r=-1,o=n.length,a=o>1?n[o-1]:void 0,u=o>2?n[2]:void 0;for(a=t.length>3&&"function"==typeof a?(o--,a):void 0,u&&i(n[0],n[1],u)&&(a=o<3?void 0:a,o=1),e=Object(e);++r<o;){var s=n[r];s&&t(e,s,r,a)}return e}))}},function(t,e,n){var r=n(260),i=n(393),o=n(79);t.exports=function(t){return t&&t.length?r(t,o,i):void 0}},function(t,e,n){var r=n(260),i=n(57),o=n(393);t.exports=function(t,e){return t&&t.length?r(t,i(e,2),o):void 0}},function(t,e,n){var r=n(36);t.exports=function(){return r.Date.now()}},function(t,e,n){var r=n(701),i=n(369);t.exports=function(t,e){return r(t,e,(function(e,n){return i(t,n)}))}},function(t,e,n){var r=n(256),i=n(702),o=n(173);t.exports=function(t,e,n){for(var a=-1,u=e.length,s={};++a<u;){var c=e[a],f=r(t,c);n(f,c)&&i(s,o(c,t),f)}return s}},function(t,e,n){var r=n(166),i=n(173),o=n(168),a=n(30),u=n(132);t.exports=function(t,e,n,s){if(!a(t))return t;for(var c=-1,f=(e=i(e,t)).length,l=f-1,h=t;null!=h&&++c<f;){var d=u(e[c]),p=n;if(c!=l){var g=h[d];void 0===(p=s?s(g,d,h):void 0)&&(p=a(g)?g:o(e[c+1])?[]:{})}r(h,d,p),h=h[d]}return t}},function(t,e,n){var r=n(389),i=n(376),o=n(377);t.exports=function(t){return o(i(t,void 0,r),t+"")}},function(t,e,n){var r=n(705),i=n(176),o=n(388);t.exports=function(t){return function(e,n,a){return a&&"number"!=typeof a&&i(e,n,a)&&(n=a=void 0),e=o(e),void 0===n?(n=e,e=0):n=o(n),a=void 0===a?e<n?1:-1:o(a),r(e,n,a,t)}}},function(t,e){var n=Math.ceil,r=Math.max;t.exports=function(t,e,i,o){for(var a=-1,u=r(n((e-t)/(i||1)),0),s=Array(u);u--;)s[o?u:++a]=t,t+=i;return s}},function(t,e,n){var r=n(259),i=n(707),o=n(175),a=n(176),u=o((function(t,e){if(null==t)return[];var n=e.length;return n>1&&a(t,e[0],e[1])?e=[]:n>2&&a(e[0],e[1],e[2])&&(e=[e[0]]),i(t,r(e,1),[])}));t.exports=u},function(t,e,n){var r=n(174),i=n(57),o=n(374),a=n(708),u=n(169),s=n(709),c=n(79);t.exports=function(t,e,n){var f=-1;e=r(e.length?e:[c],u(i));var l=o(t,(function(t,n,i){return{criteria:r(e,(function(e){return e(t)})),index:++f,value:t}}));return a(l,(function(t,e){return s(t,e,n)}))}},function(t,e){t.exports=function(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}},function(t,e,n){var r=n(710);t.exports=function(t,e,n){for(var i=-1,o=t.criteria,a=e.criteria,u=o.length,s=n.length;++i<u;){var c=r(o[i],a[i]);if(c)return i>=s?c:c*("desc"==n[i]?-1:1)}return t.index-e.index}},function(t,e,n){var r=n(98);t.exports=function(t,e){if(t!==e){var n=void 0!==t,i=null===t,o=t==t,a=r(t),u=void 0!==e,s=null===e,c=e==e,f=r(e);if(!s&&!f&&!a&&t>e||a&&u&&c&&!s&&!f||i&&u&&c||!n&&c||!o)return 1;if(!i&&!a&&!f&&t<e||f&&n&&o&&!i&&!a||s&&n&&o||!u&&o||!c)return-1}return 0}},function(t,e,n){var r=n(166),i=n(712);t.exports=function(t,e){return i(t||[],e||[],r)}},function(t,e){t.exports=function(t,e,n){for(var r=-1,i=t.length,o=e.length,a={};++r<i;){var u=r<o?e[r]:void 0;n(a,t[r],u)}return a}},function(t,e,n){"use strict";var r=n(7),i=n(714);t.exports={run:function(t){var e="greedy"===t.graph().acyclicer?i(t,function(t){return function(e){return t.edge(e).weight}}(t)):function(t){var e=[],n={},i={};function o(a){r.has(i,a)||(i[a]=!0,n[a]=!0,r.forEach(t.outEdges(a),(function(t){r.has(n,t.w)?e.push(t):o(t.w)})),delete n[a])}return r.forEach(t.nodes(),o),e}(t);r.forEach(e,(function(e){var n=t.edge(e);t.removeEdge(e),n.forwardName=e.name,n.reversed=!0,t.setEdge(e.w,e.v,n,r.uniqueId("rev"))}))},undo:function(t){r.forEach(t.edges(),(function(e){var n=t.edge(e);if(n.reversed){t.removeEdge(e);var r=n.forwardName;delete n.reversed,delete n.forwardName,t.setEdge(e.w,e.v,n,r)}}))}}},function(t,e,n){var r=n(7),i=n(37).Graph,o=n(715);t.exports=function(t,e){if(t.nodeCount()<=1)return[];var n=function(t,e){var n=new i,a=0,u=0;r.forEach(t.nodes(),(function(t){n.setNode(t,{v:t,in:0,out:0})})),r.forEach(t.edges(),(function(t){var r=n.edge(t.v,t.w)||0,i=e(t),o=r+i;n.setEdge(t.v,t.w,o),u=Math.max(u,n.node(t.v).out+=i),a=Math.max(a,n.node(t.w).in+=i)}));var c=r.range(u+a+3).map((function(){return new o})),f=a+1;return r.forEach(n.nodes(),(function(t){s(c,f,n.node(t))})),{graph:n,buckets:c,zeroIdx:f}}(t,e||a),c=function(t,e,n){var r,i=[],o=e[e.length-1],a=e[0];for(;t.nodeCount();){for(;r=a.dequeue();)u(t,e,n,r);for(;r=o.dequeue();)u(t,e,n,r);if(t.nodeCount())for(var s=e.length-2;s>0;--s)if(r=e[s].dequeue()){i=i.concat(u(t,e,n,r,!0));break}}return i}(n.graph,n.buckets,n.zeroIdx);return r.flatten(r.map(c,(function(e){return t.outEdges(e.v,e.w)})),!0)};var a=r.constant(1);function u(t,e,n,i,o){var a=o?[]:void 0;return r.forEach(t.inEdges(i.v),(function(r){var i=t.edge(r),u=t.node(r.v);o&&a.push({v:r.v,w:r.w}),u.out-=i,s(e,n,u)})),r.forEach(t.outEdges(i.v),(function(r){var i=t.edge(r),o=r.w,a=t.node(o);a.in-=i,s(e,n,a)})),t.removeNode(i.v),a}function s(t,e,n){n.out?n.in?t[n.out-n.in+e].enqueue(n):t[t.length-1].enqueue(n):t[0].enqueue(n)}},function(t,e){function n(){var t={};t._next=t._prev=t,this._sentinel=t}function r(t){t._prev._next=t._next,t._next._prev=t._prev,delete t._next,delete t._prev}function i(t,e){if("_next"!==t&&"_prev"!==t)return e}t.exports=n,n.prototype.dequeue=function(){var t=this._sentinel,e=t._prev;if(e!==t)return r(e),e},n.prototype.enqueue=function(t){var e=this._sentinel;t._prev&&t._next&&r(t),t._next=e._next,e._next._prev=t,e._next=t,t._prev=e},n.prototype.toString=function(){for(var t=[],e=this._sentinel,n=e._prev;n!==e;)t.push(JSON.stringify(n,i)),n=n._prev;return"["+t.join(", ")+"]"}},function(t,e,n){"use strict";var r=n(7),i=n(21);t.exports={run:function(t){t.graph().dummyChains=[],r.forEach(t.edges(),(function(e){!function(t,e){var n,r,o,a=e.v,u=t.node(a).rank,s=e.w,c=t.node(s).rank,f=e.name,l=t.edge(e),h=l.labelRank;if(c===u+1)return;for(t.removeEdge(e),o=0,++u;u<c;++o,++u)l.points=[],r={width:0,height:0,edgeLabel:l,edgeObj:e,rank:u},n=i.addDummyNode(t,"edge",r,"_d"),u===h&&(r.width=l.width,r.height=l.height,r.dummy="edge-label",r.labelpos=l.labelpos),t.setEdge(a,n,{weight:l.weight},f),0===o&&t.graph().dummyChains.push(n),a=n;t.setEdge(a,s,{weight:l.weight},f)}(t,e)}))},undo:function(t){r.forEach(t.graph().dummyChains,(function(e){var n,r=t.node(e),i=r.edgeLabel;for(t.setEdge(r.edgeObj,i);r.dummy;)n=t.successors(e)[0],t.removeNode(e),i.points.push({x:r.x,y:r.y}),"edge-label"===r.dummy&&(i.x=r.x,i.y=r.y,i.width=r.width,i.height=r.height),e=n,r=t.node(e)}))}}},function(t,e,n){"use strict";var r=n(177).longestPath,i=n(397),o=n(718);t.exports=function(t){switch(t.graph().ranker){case"network-simplex":u(t);break;case"tight-tree":!function(t){r(t),i(t)}(t);break;case"longest-path":a(t);break;default:u(t)}};var a=r;function u(t){o(t)}},function(t,e,n){"use strict";var r=n(7),i=n(397),o=n(177).slack,a=n(177).longestPath,u=n(37).alg.preorder,s=n(37).alg.postorder,c=n(21).simplify;function f(t){t=c(t),a(t);var e,n=i(t);for(d(n),l(n,t);e=g(n);)b(n,t,e,y(n,t,e))}function l(t,e){var n=s(t,t.nodes());n=n.slice(0,n.length-1),r.forEach(n,(function(n){!function(t,e,n){var r=t.node(n).parent;t.edge(n,r).cutvalue=h(t,e,n)}(t,e,n)}))}function h(t,e,n){var i=t.node(n).parent,o=!0,a=e.edge(n,i),u=0;return a||(o=!1,a=e.edge(i,n)),u=a.weight,r.forEach(e.nodeEdges(n),(function(r){var a,s,c=r.v===n,f=c?r.w:r.v;if(f!==i){var l=c===o,h=e.edge(r).weight;if(u+=l?h:-h,a=n,s=f,t.hasEdge(a,s)){var d=t.edge(n,f).cutvalue;u+=l?-d:d}}})),u}function d(t,e){arguments.length<2&&(e=t.nodes()[0]),p(t,{},1,e)}function p(t,e,n,i,o){var a=n,u=t.node(i);return e[i]=!0,r.forEach(t.neighbors(i),(function(o){r.has(e,o)||(n=p(t,e,n,o,i))})),u.low=a,u.lim=n++,o?u.parent=o:delete u.parent,n}function g(t){return r.find(t.edges(),(function(e){return t.edge(e).cutvalue<0}))}function y(t,e,n){var i=n.v,a=n.w;e.hasEdge(i,a)||(i=n.w,a=n.v);var u=t.node(i),s=t.node(a),c=u,f=!1;u.lim>s.lim&&(c=s,f=!0);var l=r.filter(e.edges(),(function(e){return f===v(t,t.node(e.v),c)&&f!==v(t,t.node(e.w),c)}));return r.minBy(l,(function(t){return o(e,t)}))}function b(t,e,n,i){var o=n.v,a=n.w;t.removeEdge(o,a),t.setEdge(i.v,i.w,{}),d(t),l(t,e),function(t,e){var n=r.find(t.nodes(),(function(t){return!e.node(t).parent})),i=u(t,n);i=i.slice(1),r.forEach(i,(function(n){var r=t.node(n).parent,i=e.edge(n,r),o=!1;i||(i=e.edge(r,n),o=!0),e.node(n).rank=e.node(r).rank+(o?i.minlen:-i.minlen)}))}(t,e)}function v(t,e,n){return n.low<=e.lim&&e.lim<=n.lim}t.exports=f,f.initLowLimValues=d,f.initCutValues=l,f.calcCutValue=h,f.leaveEdge=g,f.enterEdge=y,f.exchangeEdges=b},function(t,e,n){var r=n(7);t.exports=function(t){var e=function(t){var e={},n=0;function i(o){var a=n;r.forEach(t.children(o),i),e[o]={low:a,lim:n++}}return r.forEach(t.children(),i),e}(t);r.forEach(t.graph().dummyChains,(function(n){for(var r=t.node(n),i=r.edgeObj,o=function(t,e,n,r){var i,o,a=[],u=[],s=Math.min(e[n].low,e[r].low),c=Math.max(e[n].lim,e[r].lim);i=n;do{i=t.parent(i),a.push(i)}while(i&&(e[i].low>s||c>e[i].lim));o=i,i=r;for(;(i=t.parent(i))!==o;)u.push(i);return{path:a.concat(u.reverse()),lca:o}}(t,e,i.v,i.w),a=o.path,u=o.lca,s=0,c=a[s],f=!0;n!==i.w;){if(r=t.node(n),f){for(;(c=a[s])!==u&&t.node(c).maxRank<r.rank;)s++;c===u&&(f=!1)}if(!f){for(;s<a.length-1&&t.node(c=a[s+1]).minRank<=r.rank;)s++;c=a[s]}t.setParent(n,c),n=t.successors(n)[0]}}))}},function(t,e,n){var r=n(7),i=n(21);t.exports={run:function(t){var e=i.addDummyNode(t,"root",{},"_root"),n=function(t){var e={};return r.forEach(t.children(),(function(n){!function n(i,o){var a=t.children(i);a&&a.length&&r.forEach(a,(function(t){n(t,o+1)}));e[i]=o}(n,1)})),e}(t),o=r.max(r.values(n))-1,a=2*o+1;t.graph().nestingRoot=e,r.forEach(t.edges(),(function(e){t.edge(e).minlen*=a}));var u=function(t){return r.reduce(t.edges(),(function(e,n){return e+t.edge(n).weight}),0)}(t)+1;r.forEach(t.children(),(function(s){!function t(e,n,o,a,u,s,c){var f=e.children(c);if(!f.length)return void(c!==n&&e.setEdge(n,c,{weight:0,minlen:o}));var l=i.addBorderNode(e,"_bt"),h=i.addBorderNode(e,"_bb"),d=e.node(c);e.setParent(l,c),d.borderTop=l,e.setParent(h,c),d.borderBottom=h,r.forEach(f,(function(r){t(e,n,o,a,u,s,r);var i=e.node(r),f=i.borderTop?i.borderTop:r,d=i.borderBottom?i.borderBottom:r,p=i.borderTop?a:2*a,g=f!==d?1:u-s[c]+1;e.setEdge(l,f,{weight:p,minlen:g,nestingEdge:!0}),e.setEdge(d,h,{weight:p,minlen:g,nestingEdge:!0})})),e.parent(c)||e.setEdge(n,l,{weight:0,minlen:u+s[c]})}(t,e,a,u,o,n,s)})),t.graph().nodeRankFactor=a},cleanup:function(t){var e=t.graph();t.removeNode(e.nestingRoot),delete e.nestingRoot,r.forEach(t.edges(),(function(e){t.edge(e).nestingEdge&&t.removeEdge(e)}))}}},function(t,e,n){var r=n(7),i=n(21);function o(t,e,n,r,o,a){var u={width:0,height:0,rank:a,borderType:e},s=o[e][a-1],c=i.addDummyNode(t,"border",u,n);o[e][a]=c,t.setParent(c,r),s&&t.setEdge(s,c,{weight:1})}t.exports=function(t){r.forEach(t.children(),(function e(n){var i=t.children(n),a=t.node(n);if(i.length&&r.forEach(i,e),r.has(a,"minRank")){a.borderLeft=[],a.borderRight=[];for(var u=a.minRank,s=a.maxRank+1;u<s;++u)o(t,"borderLeft","_bl",n,a,u),o(t,"borderRight","_br",n,a,u)}}))}},function(t,e,n){"use strict";var r=n(7);function i(t){r.forEach(t.nodes(),(function(e){o(t.node(e))})),r.forEach(t.edges(),(function(e){o(t.edge(e))}))}function o(t){var e=t.width;t.width=t.height,t.height=e}function a(t){t.y=-t.y}function u(t){var e=t.x;t.x=t.y,t.y=e}t.exports={adjust:function(t){var e=t.graph().rankdir.toLowerCase();"lr"!==e&&"rl"!==e||i(t)},undo:function(t){var e=t.graph().rankdir.toLowerCase();"bt"!==e&&"rl"!==e||function(t){r.forEach(t.nodes(),(function(e){a(t.node(e))})),r.forEach(t.edges(),(function(e){var n=t.edge(e);r.forEach(n.points,a),r.has(n,"y")&&a(n)}))}(t);"lr"!==e&&"rl"!==e||(!function(t){r.forEach(t.nodes(),(function(e){u(t.node(e))})),r.forEach(t.edges(),(function(e){var n=t.edge(e);r.forEach(n.points,u),r.has(n,"x")&&u(n)}))}(t),i(t))}}},function(t,e,n){"use strict";var r=n(7),i=n(724),o=n(725),a=n(726),u=n(730),s=n(731),c=n(37).Graph,f=n(21);function l(t,e,n){return r.map(e,(function(e){return u(t,e,n)}))}function h(t,e){var n=new c;r.forEach(t,(function(t){var i=t.graph().root,o=a(t,i,n,e);r.forEach(o.vs,(function(e,n){t.node(e).order=n})),s(t,n,o.vs)}))}function d(t,e){r.forEach(e,(function(e){r.forEach(e,(function(e,n){t.node(e).order=n}))}))}t.exports=function(t){var e=f.maxRank(t),n=l(t,r.range(1,e+1),"inEdges"),a=l(t,r.range(e-1,-1,-1),"outEdges"),u=i(t);d(t,u);for(var s,c=Number.POSITIVE_INFINITY,p=0,g=0;g<4;++p,++g){h(p%2?n:a,p%4>=2),u=f.buildLayerMatrix(t);var y=o(t,u);y<c&&(g=0,s=r.cloneDeep(u),c=y)}d(t,s)}},function(t,e,n){"use strict";var r=n(7);t.exports=function(t){var e={},n=r.filter(t.nodes(),(function(e){return!t.children(e).length})),i=r.max(r.map(n,(function(e){return t.node(e).rank}))),o=r.map(r.range(i+1),(function(){return[]}));var a=r.sortBy(n,(function(e){return t.node(e).rank}));return r.forEach(a,(function n(i){if(r.has(e,i))return;e[i]=!0;var a=t.node(i);o[a.rank].push(i),r.forEach(t.successors(i),n)})),o}},function(t,e,n){"use strict";var r=n(7);function i(t,e,n){for(var i=r.zipObject(n,r.map(n,(function(t,e){return e}))),o=r.flatten(r.map(e,(function(e){return r.sortBy(r.map(t.outEdges(e),(function(e){return{pos:i[e.w],weight:t.edge(e).weight}})),"pos")})),!0),a=1;a<n.length;)a<<=1;var u=2*a-1;a-=1;var s=r.map(new Array(u),(function(){return 0})),c=0;return r.forEach(o.forEach((function(t){var e=t.pos+a;s[e]+=t.weight;for(var n=0;e>0;)e%2&&(n+=s[e+1]),s[e=e-1>>1]+=t.weight;c+=t.weight*n}))),c}t.exports=function(t,e){for(var n=0,r=1;r<e.length;++r)n+=i(t,e[r-1],e[r]);return n}},function(t,e,n){var r=n(7),i=n(727),o=n(728),a=n(729);t.exports=function t(e,n,u,s){var c=e.children(n),f=e.node(n),l=f?f.borderLeft:void 0,h=f?f.borderRight:void 0,d={};l&&(c=r.filter(c,(function(t){return t!==l&&t!==h})));var p=i(e,c);r.forEach(p,(function(n){if(e.children(n.v).length){var i=t(e,n.v,u,s);d[n.v]=i,r.has(i,"barycenter")&&(o=n,a=i,r.isUndefined(o.barycenter)?(o.barycenter=a.barycenter,o.weight=a.weight):(o.barycenter=(o.barycenter*o.weight+a.barycenter*a.weight)/(o.weight+a.weight),o.weight+=a.weight))}var o,a}));var g=o(p,u);!function(t,e){r.forEach(t,(function(t){t.vs=r.flatten(t.vs.map((function(t){return e[t]?e[t].vs:t})),!0)}))}(g,d);var y=a(g,s);if(l&&(y.vs=r.flatten([l,y.vs,h],!0),e.predecessors(l).length)){var b=e.node(e.predecessors(l)[0]),v=e.node(e.predecessors(h)[0]);r.has(y,"barycenter")||(y.barycenter=0,y.weight=0),y.barycenter=(y.barycenter*y.weight+b.order+v.order)/(y.weight+2),y.weight+=2}return y}},function(t,e,n){var r=n(7);t.exports=function(t,e){return r.map(e,(function(e){var n=t.inEdges(e);if(n.length){var i=r.reduce(n,(function(e,n){var r=t.edge(n),i=t.node(n.v);return{sum:e.sum+r.weight*i.order,weight:e.weight+r.weight}}),{sum:0,weight:0});return{v:e,barycenter:i.sum/i.weight,weight:i.weight}}return{v:e}}))}},function(t,e,n){"use strict";var r=n(7);t.exports=function(t,e){var n={};return r.forEach(t,(function(t,e){var i=n[t.v]={indegree:0,in:[],out:[],vs:[t.v],i:e};r.isUndefined(t.barycenter)||(i.barycenter=t.barycenter,i.weight=t.weight)})),r.forEach(e.edges(),(function(t){var e=n[t.v],i=n[t.w];r.isUndefined(e)||r.isUndefined(i)||(i.indegree++,e.out.push(n[t.w]))})),function(t){var e=[];function n(t){return function(e){e.merged||(r.isUndefined(e.barycenter)||r.isUndefined(t.barycenter)||e.barycenter>=t.barycenter)&&function(t,e){var n=0,r=0;t.weight&&(n+=t.barycenter*t.weight,r+=t.weight);e.weight&&(n+=e.barycenter*e.weight,r+=e.weight);t.vs=e.vs.concat(t.vs),t.barycenter=n/r,t.weight=r,t.i=Math.min(e.i,t.i),e.merged=!0}(t,e)}}function i(e){return function(n){n.in.push(e),0==--n.indegree&&t.push(n)}}for(;t.length;){var o=t.pop();e.push(o),r.forEach(o.in.reverse(),n(o)),r.forEach(o.out,i(o))}return r.map(r.filter(e,(function(t){return!t.merged})),(function(t){return r.pick(t,["vs","i","barycenter","weight"])}))}(r.filter(n,(function(t){return!t.indegree})))}},function(t,e,n){var r=n(7),i=n(21);function o(t,e,n){for(var i;e.length&&(i=r.last(e)).i<=n;)e.pop(),t.push(i.vs),n++;return n}t.exports=function(t,e){var n=i.partition(t,(function(t){return r.has(t,"barycenter")})),a=n.lhs,u=r.sortBy(n.rhs,(function(t){return-t.i})),s=[],c=0,f=0,l=0;a.sort((h=!!e,function(t,e){return t.barycenter<e.barycenter?-1:t.barycenter>e.barycenter?1:h?e.i-t.i:t.i-e.i})),l=o(s,u,l),r.forEach(a,(function(t){l+=t.vs.length,s.push(t.vs),c+=t.barycenter*t.weight,f+=t.weight,l=o(s,u,l)}));var h;var d={vs:r.flatten(s,!0)};f&&(d.barycenter=c/f,d.weight=f);return d}},function(t,e,n){var r=n(7),i=n(37).Graph;t.exports=function(t,e,n){var o=function(t){var e;for(;t.hasNode(e=r.uniqueId("_root")););return e}(t),a=new i({compound:!0}).setGraph({root:o}).setDefaultNodeLabel((function(e){return t.node(e)}));return r.forEach(t.nodes(),(function(i){var u=t.node(i),s=t.parent(i);(u.rank===e||u.minRank<=e&&e<=u.maxRank)&&(a.setNode(i),a.setParent(i,s||o),r.forEach(t[n](i),(function(e){var n=e.v===i?e.w:e.v,o=a.edge(n,i),u=r.isUndefined(o)?0:o.weight;a.setEdge(n,i,{weight:t.edge(e).weight+u})})),r.has(u,"minRank")&&a.setNode(i,{borderLeft:u.borderLeft[e],borderRight:u.borderRight[e]}))})),a}},function(t,e,n){var r=n(7);t.exports=function(t,e,n){var i,o={};r.forEach(n,(function(n){for(var r,a,u=t.parent(n);u;){if((r=t.parent(u))?(a=o[r],o[r]=u):(a=i,i=u),a&&a!==u)return void e.setEdge(a,u);u=r}}))}},function(t,e,n){"use strict";var r=n(7),i=n(21),o=n(733).positionX;t.exports=function(t){(function(t){var e=i.buildLayerMatrix(t),n=t.graph().ranksep,o=0;r.forEach(e,(function(e){var i=r.max(r.map(e,(function(e){return t.node(e).height})));r.forEach(e,(function(e){t.node(e).y=o+i/2})),o+=i+n}))})(t=i.asNonCompoundGraph(t)),r.forEach(o(t),(function(e,n){t.node(n).x=e}))}},function(t,e,n){"use strict";var r=n(7),i=n(37).Graph,o=n(21);function a(t,e){var n={};return r.reduce(e,(function(e,i){var o=0,a=0,u=e.length,c=r.last(i);return r.forEach(i,(function(e,f){var l=function(t,e){if(t.node(e).dummy)return r.find(t.predecessors(e),(function(e){return t.node(e).dummy}))}(t,e),h=l?t.node(l).order:u;(l||e===c)&&(r.forEach(i.slice(a,f+1),(function(e){r.forEach(t.predecessors(e),(function(r){var i=t.node(r),a=i.order;!(a<o||h<a)||i.dummy&&t.node(e).dummy||s(n,r,e)}))})),a=f+1,o=h)})),i})),n}function u(t,e){var n={};function i(e,i,o,a,u){var c;r.forEach(r.range(i,o),(function(i){c=e[i],t.node(c).dummy&&r.forEach(t.predecessors(c),(function(e){var r=t.node(e);r.dummy&&(r.order<a||r.order>u)&&s(n,e,c)}))}))}return r.reduce(e,(function(e,n){var o,a=-1,u=0;return r.forEach(n,(function(r,s){if("border"===t.node(r).dummy){var c=t.predecessors(r);c.length&&(o=t.node(c[0]).order,i(n,u,s,a,o),u=s,a=o)}i(n,u,n.length,o,e.length)})),n})),n}function s(t,e,n){if(e>n){var r=e;e=n,n=r}var i=t[e];i||(t[e]=i={}),i[n]=!0}function c(t,e,n){if(e>n){var i=e;e=n,n=i}return r.has(t[e],n)}function f(t,e,n,i){var o={},a={},u={};return r.forEach(e,(function(t){r.forEach(t,(function(t,e){o[t]=t,a[t]=t,u[t]=e}))})),r.forEach(e,(function(t){var e=-1;r.forEach(t,(function(t){var s=i(t);if(s.length)for(var f=((s=r.sortBy(s,(function(t){return u[t]}))).length-1)/2,l=Math.floor(f),h=Math.ceil(f);l<=h;++l){var d=s[l];a[t]===t&&e<u[d]&&!c(n,t,d)&&(a[d]=t,a[t]=o[t]=o[d],e=u[d])}}))})),{root:o,align:a}}function l(t,e,n,o,a){var u={},s=function(t,e,n,o){var a=new i,u=t.graph(),s=function(t,e,n){return function(i,o,a){var u,s=i.node(o),c=i.node(a),f=0;if(f+=s.width/2,r.has(s,"labelpos"))switch(s.labelpos.toLowerCase()){case"l":u=-s.width/2;break;case"r":u=s.width/2}if(u&&(f+=n?u:-u),u=0,f+=(s.dummy?e:t)/2,f+=(c.dummy?e:t)/2,f+=c.width/2,r.has(c,"labelpos"))switch(c.labelpos.toLowerCase()){case"l":u=c.width/2;break;case"r":u=-c.width/2}return u&&(f+=n?u:-u),u=0,f}}(u.nodesep,u.edgesep,o);return r.forEach(e,(function(e){var i;r.forEach(e,(function(e){var r=n[e];if(a.setNode(r),i){var o=n[i],u=a.edge(o,r);a.setEdge(o,r,Math.max(s(t,e,i),u||0))}i=e}))})),a}(t,e,n,a),c=a?"borderLeft":"borderRight";function f(t,e){for(var n=s.nodes(),r=n.pop(),i={};r;)i[r]?t(r):(i[r]=!0,n.push(r),n=n.concat(e(r))),r=n.pop()}return f((function(t){u[t]=s.inEdges(t).reduce((function(t,e){return Math.max(t,u[e.v]+s.edge(e))}),0)}),s.predecessors.bind(s)),f((function(e){var n=s.outEdges(e).reduce((function(t,e){return Math.min(t,u[e.w]-s.edge(e))}),Number.POSITIVE_INFINITY),r=t.node(e);n!==Number.POSITIVE_INFINITY&&r.borderType!==c&&(u[e]=Math.max(u[e],n))}),s.successors.bind(s)),r.forEach(o,(function(t){u[t]=u[n[t]]})),u}function h(t,e){return r.minBy(r.values(e),(function(e){var n=Number.NEGATIVE_INFINITY,i=Number.POSITIVE_INFINITY;return r.forIn(e,(function(e,r){var o=function(t,e){return t.node(e).width}(t,r)/2;n=Math.max(e+o,n),i=Math.min(e-o,i)})),n-i}))}function d(t,e){var n=r.values(e),i=r.min(n),o=r.max(n);r.forEach(["u","d"],(function(n){r.forEach(["l","r"],(function(a){var u,s=n+a,c=t[s];if(c!==e){var f=r.values(c);(u="l"===a?i-r.min(f):o-r.max(f))&&(t[s]=r.mapValues(c,(function(t){return t+u})))}}))}))}function p(t,e){return r.mapValues(t.ul,(function(n,i){if(e)return t[e.toLowerCase()][i];var o=r.sortBy(r.map(t,i));return(o[1]+o[2])/2}))}t.exports={positionX:function(t){var e,n=o.buildLayerMatrix(t),i=r.merge(a(t,n),u(t,n)),s={};r.forEach(["u","d"],(function(o){e="u"===o?n:r.values(n).reverse(),r.forEach(["l","r"],(function(n){"r"===n&&(e=r.map(e,(function(t){return r.values(t).reverse()})));var a=("u"===o?t.predecessors:t.successors).bind(t),u=f(t,e,i,a),c=l(t,e,u.root,u.align,"r"===n);"r"===n&&(c=r.mapValues(c,(function(t){return-t}))),s[o+n]=c}))}));var c=h(t,s);return d(s,c),p(s,t.graph().align)},findType1Conflicts:a,findType2Conflicts:u,addConflict:s,hasConflict:c,verticalAlignment:f,horizontalCompaction:l,alignCoordinates:d,findSmallestWidthAlignment:h,balance:p}},function(t,e,n){var r=n(7),i=n(21),o=n(37).Graph;t.exports={debugOrdering:function(t){var e=i.buildLayerMatrix(t),n=new o({compound:!0,multigraph:!0}).setGraph({});return r.forEach(t.nodes(),(function(e){n.setNode(e,{label:e}),n.setParent(e,"layer"+t.node(e).rank)})),r.forEach(t.edges(),(function(t){n.setEdge(t.v,t.w,{},t.name)})),r.forEach(e,(function(t,e){var i="layer"+e;n.setNode(i,{rank:"same"}),r.reduce(t,(function(t,e){return n.setEdge(t,e,{style:"invis"}),e}))})),n}}},function(t,e){t.exports="0.8.5"},function(t,e,n){t.exports={node:n(398),circle:n(399),ellipse:n(261),polygon:n(400),rect:n(401)}},function(t,e){function n(t,e){return t*e>0}t.exports=function(t,e,r,i){var o,a,u,s,c,f,l,h,d,p,g,y,b;if(o=e.y-t.y,u=t.x-e.x,c=e.x*t.y-t.x*e.y,d=o*r.x+u*r.y+c,p=o*i.x+u*i.y+c,0!==d&&0!==p&&n(d,p))return;if(a=i.y-r.y,s=r.x-i.x,f=i.x*r.y-r.x*i.y,l=a*t.x+s*t.y+f,h=a*e.x+s*e.y+f,0!==l&&0!==h&&n(l,h))return;if(0===(g=o*s-a*u))return;return y=Math.abs(g/2),{x:(b=u*f-s*c)<0?(b-y)/g:(b+y)/g,y:(b=a*c-o*f)<0?(b-y)/g:(b+y)/g}}},function(t,e,n){var r=n(99),i=n(64),o=n(386).layout;t.exports=function(){var t=n(739),e=n(742),i=n(743),c=n(744),f=n(745),l=n(746),h=n(747),d=n(748),p=n(749),g=function(n,g){!function(t){t.nodes().forEach((function(e){var n=t.node(e);r.has(n,"label")||t.children(e).length||(n.label=e),r.has(n,"paddingX")&&r.defaults(n,{paddingLeft:n.paddingX,paddingRight:n.paddingX}),r.has(n,"paddingY")&&r.defaults(n,{paddingTop:n.paddingY,paddingBottom:n.paddingY}),r.has(n,"padding")&&r.defaults(n,{paddingLeft:n.padding,paddingRight:n.padding,paddingTop:n.padding,paddingBottom:n.padding}),r.defaults(n,a),r.each(["paddingLeft","paddingRight","paddingTop","paddingBottom"],(function(t){n[t]=Number(n[t])})),r.has(n,"width")&&(n._prevWidth=n.width),r.has(n,"height")&&(n._prevHeight=n.height)})),t.edges().forEach((function(e){var n=t.edge(e);r.has(n,"label")||(n.label=""),r.defaults(n,u)}))}(g);var y=s(n,"output"),b=s(y,"clusters"),v=s(y,"edgePaths"),m=i(s(y,"edgeLabels"),g),_=t(s(y,"nodes"),g,d);o(g),f(_,g),l(m,g),c(v,g,p);var w=e(b,g);h(w,g),function(t){r.each(t.nodes(),(function(e){var n=t.node(e);r.has(n,"_prevWidth")?n.width=n._prevWidth:delete n.width,r.has(n,"_prevHeight")?n.height=n._prevHeight:delete n.height,delete n._prevWidth,delete n._prevHeight}))}(g)};return g.createNodes=function(e){return arguments.length?(t=e,g):t},g.createClusters=function(t){return arguments.length?(e=t,g):e},g.createEdgeLabels=function(t){return arguments.length?(i=t,g):i},g.createEdgePaths=function(t){return arguments.length?(c=t,g):c},g.shapes=function(t){return arguments.length?(d=t,g):d},g.arrows=function(t){return arguments.length?(p=t,g):p},g};var a={paddingLeft:10,paddingRight:10,paddingTop:10,paddingBottom:10,rx:0,ry:0,shape:"rect"},u={arrowhead:"normal",curve:i.curveLinear};function s(t,e){var n=t.select("g."+e);return n.empty()&&(n=t.append("g").attr("class",e)),n}},function(t,e,n){"use strict";var r=n(99),i=n(262),o=n(31),a=n(64);t.exports=function(t,e,n){var u,s=e.nodes().filter((function(t){return!o.isSubgraph(e,t)})),c=t.selectAll("g.node").data(s,(function(t){return t})).classed("update",!0);c.exit().remove(),c.enter().append("g").attr("class","node").style("opacity",0),(c=t.selectAll("g.node")).each((function(t){var u=e.node(t),s=a.select(this);o.applyClass(s,u.class,(s.classed("update")?"update ":"")+"node"),s.select("g.label").remove();var c=s.append("g").attr("class","label"),f=i(c,u),l=n[u.shape],h=r.pick(f.node().getBBox(),"width","height");u.elem=this,u.id&&s.attr("id",u.id),u.labelId&&c.attr("id",u.labelId),r.has(u,"width")&&(h.width=u.width),r.has(u,"height")&&(h.height=u.height),h.width+=u.paddingLeft+u.paddingRight,h.height+=u.paddingTop+u.paddingBottom,c.attr("transform","translate("+(u.paddingLeft-u.paddingRight)/2+","+(u.paddingTop-u.paddingBottom)/2+")");var d=a.select(this);d.select(".label-container").remove();var p=l(d,h,u).classed("label-container",!0);o.applyStyle(p,u.style);var g=p.node().getBBox();u.width=g.width,u.height=g.height})),u=c.exit?c.exit():c.selectAll(null);return o.applyTransition(u,e).style("opacity",0).remove(),c}},function(t,e,n){var r=n(31);t.exports=function(t,e){for(var n=t.append("text"),i=function(t){for(var e,n="",r=!1,i=0;i<t.length;++i)if(e=t[i],r){switch(e){case"n":n+="\n";break;default:n+=e}r=!1}else"\\"===e?r=!0:n+=e;return n}(e.label).split("\n"),o=0;o<i.length;o++)n.append("tspan").attr("xml:space","preserve").attr("dy","1em").attr("x","1").text(i[o]);return r.applyStyle(n,e.labelStyle),n}},function(t,e,n){var r=n(31);t.exports=function(t,e){var n=t;return n.node().appendChild(e.label),r.applyStyle(n,e.labelStyle),n}},function(t,e,n){var r=n(31),i=n(64),o=n(262);t.exports=function(t,e){var n,a=e.nodes().filter((function(t){return r.isSubgraph(e,t)})),u=t.selectAll("g.cluster").data(a,(function(t){return t}));u.selectAll("*").remove(),u.enter().append("g").attr("class","cluster").attr("id",(function(t){return e.node(t).id})).style("opacity",0),u=t.selectAll("g.cluster"),r.applyTransition(u,e).style("opacity",1),u.each((function(t){var n=e.node(t),r=i.select(this);i.select(this).append("rect");var a=r.append("g").attr("class","label");o(a,n,n.clusterLabelPos)})),u.selectAll("rect").each((function(t){var n=e.node(t),o=i.select(this);r.applyStyle(o,n.style)})),n=u.exit?u.exit():u.selectAll(null);return r.applyTransition(n,e).style("opacity",0).remove(),u}},function(t,e,n){"use strict";var r=n(99),i=n(262),o=n(31),a=n(64);t.exports=function(t,e){var n,u=t.selectAll("g.edgeLabel").data(e.edges(),(function(t){return o.edgeToId(t)})).classed("update",!0);u.exit().remove(),u.enter().append("g").classed("edgeLabel",!0).style("opacity",0),(u=t.selectAll("g.edgeLabel")).each((function(t){var n=a.select(this);n.select(".label").remove();var o=e.edge(t),u=i(n,e.edge(t),0,0).classed("label",!0),s=u.node().getBBox();o.labelId&&u.attr("id",o.labelId),r.has(o,"width")||(o.width=s.width),r.has(o,"height")||(o.height=s.height)})),n=u.exit?u.exit():u.selectAll(null);return o.applyTransition(n,e).style("opacity",0).remove(),u}},function(t,e,n){"use strict";var r=n(99),i=n(398),o=n(31),a=n(64);function u(t,e){var n=(a.line||a.svg.line)().x((function(t){return t.x})).y((function(t){return t.y}));return(n.curve||n.interpolate)(t.curve),n(e)}t.exports=function(t,e,n){var s=t.selectAll("g.edgePath").data(e.edges(),(function(t){return o.edgeToId(t)})).classed("update",!0),c=function(t,e){var n=t.enter().append("g").attr("class","edgePath").style("opacity",0);return n.append("path").attr("class","path").attr("d",(function(t){var n=e.edge(t),i=e.node(t.v).elem;return u(n,r.range(n.points.length).map((function(){return e=(t=i).getBBox(),{x:(n=t.ownerSVGElement.getScreenCTM().inverse().multiply(t.getScreenCTM()).translate(e.width/2,e.height/2)).e,y:n.f};var t,e,n})))})),n.append("defs"),n}(s,e);!function(t,e){var n=t.exit();o.applyTransition(n,e).style("opacity",0).remove()}(s,e);var f=void 0!==s.merge?s.merge(c):s;return o.applyTransition(f,e).style("opacity",1),f.each((function(t){var n=a.select(this),r=e.edge(t);r.elem=this,r.id&&n.attr("id",r.id),o.applyClass(n,r.class,(n.classed("update")?"update ":"")+"edgePath")})),f.selectAll("path.path").each((function(t){var n=e.edge(t);n.arrowheadId=r.uniqueId("arrowhead");var s=a.select(this).attr("marker-end",(function(){return"url("+(t=location.href,e=n.arrowheadId,t.split("#")[0]+"#"+e)+")";var t,e})).style("fill","none");o.applyTransition(s,e).attr("d",(function(t){return function(t,e){var n=t.edge(e),r=t.node(e.v),o=t.node(e.w),a=n.points.slice(1,n.points.length-1);return a.unshift(i(r,a[0])),a.push(i(o,a[a.length-1])),u(n,a)}(e,t)})),o.applyStyle(s,n.style)})),f.selectAll("defs *").remove(),f.selectAll("defs").each((function(t){var r=e.edge(t);(0,n[r.arrowhead])(a.select(this),r.arrowheadId,r,"arrowhead")})),f}},function(t,e,n){"use strict";var r=n(31),i=n(64);t.exports=function(t,e){function n(t){var n=e.node(t);return"translate("+n.x+","+n.y+")"}t.filter((function(){return!i.select(this).classed("update")})).attr("transform",n),r.applyTransition(t,e).style("opacity",1).attr("transform",n)}},function(t,e,n){"use strict";var r=n(31),i=n(64),o=n(99);t.exports=function(t,e){function n(t){var n=e.edge(t);return o.has(n,"x")?"translate("+n.x+","+n.y+")":""}t.filter((function(){return!i.select(this).classed("update")})).attr("transform",n),r.applyTransition(t,e).style("opacity",1).attr("transform",n)}},function(t,e,n){"use strict";var r=n(31),i=n(64);t.exports=function(t,e){var n=t.filter((function(){return!i.select(this).classed("update")}));function o(t){var n=e.node(t);return"translate("+n.x+","+n.y+")"}n.attr("transform",o),r.applyTransition(t,e).style("opacity",1).attr("transform",o),r.applyTransition(n.selectAll("rect"),e).attr("width",(function(t){return e.node(t).width})).attr("height",(function(t){return e.node(t).height})).attr("x",(function(t){return-e.node(t).width/2})).attr("y",(function(t){return-e.node(t).height/2}))}},function(t,e,n){"use strict";var r=n(401),i=n(261),o=n(399),a=n(400);t.exports={rect:function(t,e,n){var i=t.insert("rect",":first-child").attr("rx",n.rx).attr("ry",n.ry).attr("x",-e.width/2).attr("y",-e.height/2).attr("width",e.width).attr("height",e.height);return n.intersect=function(t){return r(n,t)},i},ellipse:function(t,e,n){var r=e.width/2,o=e.height/2,a=t.insert("ellipse",":first-child").attr("x",-e.width/2).attr("y",-e.height/2).attr("rx",r).attr("ry",o);return n.intersect=function(t){return i(n,r,o,t)},a},circle:function(t,e,n){var r=Math.max(e.width,e.height)/2,i=t.insert("circle",":first-child").attr("x",-e.width/2).attr("y",-e.height/2).attr("r",r);return n.intersect=function(t){return o(n,r,t)},i},diamond:function(t,e,n){var r=e.width*Math.SQRT2/2,i=e.height*Math.SQRT2/2,o=[{x:0,y:-i},{x:-r,y:0},{x:0,y:i},{x:r,y:0}],u=t.insert("polygon",":first-child").attr("points",o.map((function(t){return t.x+","+t.y})).join(" "));return n.intersect=function(t){return a(n,o,t)},u}}},function(t,e,n){var r=n(31);function i(t,e,n,i){var o=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").style("stroke-width",1).style("stroke-dasharray","1,0");r.applyStyle(o,n[i+"Style"]),n[i+"Class"]&&o.attr("class",n[i+"Class"])}t.exports={default:i,normal:i,vee:function(t,e,n,i){var o=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 L 4 5 z").style("stroke-width",1).style("stroke-dasharray","1,0");r.applyStyle(o,n[i+"Style"]),n[i+"Class"]&&o.attr("class",n[i+"Class"])},undirected:function(t,e,n,i){var o=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 0 5 L 10 5").style("stroke-width",1).style("stroke-dasharray","1,0");r.applyStyle(o,n[i+"Style"]),n[i+"Class"]&&o.attr("class",n[i+"Class"])}}},function(t,e){t.exports="0.6.4"},function(t,e,n){"use strict";var r=n(8),i=n(789),o=n(792),a=n(793),u=n(22).normalizeRanks,s=n(795),c=n(22).removeEmptyRanks,f=n(796),l=n(797),h=n(798),d=n(799),p=n(808),g=n(22),y=n(38).Graph;t.exports=function(t,e){var n=e&&e.debugTiming?g.time:g.notime;n("layout",(function(){var e=n(" buildLayoutGraph",(function(){return function(t){var e=new y({multigraph:!0,compound:!0}),n=S(t.graph());return e.setGraph(r.merge({},v,A(n,b),r.pick(n,m))),r.forEach(t.nodes(),(function(n){var i=S(t.node(n));e.setNode(n,r.defaults(A(i,_),w)),e.setParent(n,t.parent(n))})),r.forEach(t.edges(),(function(n){var i=S(t.edge(n));e.setEdge(n,r.merge({},k,A(i,x),r.pick(i,E)))})),e}(t)}));n(" runLayout",(function(){!function(t,e){e(" makeSpaceForEdgeLabels",(function(){!function(t){var e=t.graph();e.ranksep/=2,r.forEach(t.edges(),(function(n){var r=t.edge(n);r.minlen*=2,"c"!==r.labelpos.toLowerCase()&&("TB"===e.rankdir||"BT"===e.rankdir?r.width+=r.labeloffset:r.height+=r.labeloffset)}))}(t)})),e(" removeSelfEdges",(function(){!function(t){r.forEach(t.edges(),(function(e){if(e.v===e.w){var n=t.node(e.v);n.selfEdges||(n.selfEdges=[]),n.selfEdges.push({e:e,label:t.edge(e)}),t.removeEdge(e)}}))}(t)})),e(" acyclic",(function(){i.run(t)})),e(" nestingGraph.run",(function(){f.run(t)})),e(" rank",(function(){a(g.asNonCompoundGraph(t))})),e(" injectEdgeLabelProxies",(function(){!function(t){r.forEach(t.edges(),(function(e){var n=t.edge(e);if(n.width&&n.height){var r=t.node(e.v),i={rank:(t.node(e.w).rank-r.rank)/2+r.rank,e:e};g.addDummyNode(t,"edge-proxy",i,"_ep")}}))}(t)})),e(" removeEmptyRanks",(function(){c(t)})),e(" nestingGraph.cleanup",(function(){f.cleanup(t)})),e(" normalizeRanks",(function(){u(t)})),e(" assignRankMinMax",(function(){!function(t){var e=0;r.forEach(t.nodes(),(function(n){var i=t.node(n);i.borderTop&&(i.minRank=t.node(i.borderTop).rank,i.maxRank=t.node(i.borderBottom).rank,e=r.max(e,i.maxRank))})),t.graph().maxRank=e}(t)})),e(" removeEdgeLabelProxies",(function(){!function(t){r.forEach(t.nodes(),(function(e){var n=t.node(e);"edge-proxy"===n.dummy&&(t.edge(n.e).labelRank=n.rank,t.removeNode(e))}))}(t)})),e(" normalize.run",(function(){o.run(t)})),e(" parentDummyChains",(function(){s(t)})),e(" addBorderSegments",(function(){l(t)})),e(" order",(function(){d(t)})),e(" insertSelfEdges",(function(){!function(t){var e=g.buildLayerMatrix(t);r.forEach(e,(function(e){var n=0;r.forEach(e,(function(e,i){var o=t.node(e);o.order=i+n,r.forEach(o.selfEdges,(function(e){g.addDummyNode(t,"selfedge",{width:e.label.width,height:e.label.height,rank:o.rank,order:i+ ++n,e:e.e,label:e.label},"_se")})),delete o.selfEdges}))}))}(t)})),e(" adjustCoordinateSystem",(function(){h.adjust(t)})),e(" position",(function(){p(t)})),e(" positionSelfEdges",(function(){!function(t){r.forEach(t.nodes(),(function(e){var n=t.node(e);if("selfedge"===n.dummy){var r=t.node(n.e.v),i=r.x+r.width/2,o=r.y,a=n.x-i,u=r.height/2;t.setEdge(n.e,n.label),t.removeNode(e),n.label.points=[{x:i+2*a/3,y:o-u},{x:i+5*a/6,y:o-u},{x:i+a,y:o},{x:i+5*a/6,y:o+u},{x:i+2*a/3,y:o+u}],n.label.x=n.x,n.label.y=n.y}}))}(t)})),e(" removeBorderNodes",(function(){!function(t){r.forEach(t.nodes(),(function(e){if(t.children(e).length){var n=t.node(e),i=t.node(n.borderTop),o=t.node(n.borderBottom),a=t.node(r.last(n.borderLeft)),u=t.node(r.last(n.borderRight));n.width=Math.abs(u.x-a.x),n.height=Math.abs(o.y-i.y),n.x=a.x+n.width/2,n.y=i.y+n.height/2}})),r.forEach(t.nodes(),(function(e){"border"===t.node(e).dummy&&t.removeNode(e)}))}(t)})),e(" normalize.undo",(function(){o.undo(t)})),e(" fixupEdgeLabelCoords",(function(){!function(t){r.forEach(t.edges(),(function(e){var n=t.edge(e);if(r.has(n,"x"))switch("l"!==n.labelpos&&"r"!==n.labelpos||(n.width-=n.labeloffset),n.labelpos){case"l":n.x-=n.width/2+n.labeloffset;break;case"r":n.x+=n.width/2+n.labeloffset}}))}(t)})),e(" undoCoordinateSystem",(function(){h.undo(t)})),e(" translateGraph",(function(){!function(t){var e=Number.POSITIVE_INFINITY,n=0,i=Number.POSITIVE_INFINITY,o=0,a=t.graph(),u=a.marginx||0,s=a.marginy||0;function c(t){var r=t.x,a=t.y,u=t.width,s=t.height;e=Math.min(e,r-u/2),n=Math.max(n,r+u/2),i=Math.min(i,a-s/2),o=Math.max(o,a+s/2)}r.forEach(t.nodes(),(function(e){c(t.node(e))})),r.forEach(t.edges(),(function(e){var n=t.edge(e);r.has(n,"x")&&c(n)})),e-=u,i-=s,r.forEach(t.nodes(),(function(n){var r=t.node(n);r.x-=e,r.y-=i})),r.forEach(t.edges(),(function(n){var o=t.edge(n);r.forEach(o.points,(function(t){t.x-=e,t.y-=i})),r.has(o,"x")&&(o.x-=e),r.has(o,"y")&&(o.y-=i)})),a.width=n-e+u,a.height=o-i+s}(t)})),e(" assignNodeIntersects",(function(){!function(t){r.forEach(t.edges(),(function(e){var n,r,i=t.edge(e),o=t.node(e.v),a=t.node(e.w);i.points?(n=i.points[0],r=i.points[i.points.length-1]):(i.points=[],n=a,r=o),i.points.unshift(g.intersectRect(o,n)),i.points.push(g.intersectRect(a,r))}))}(t)})),e(" reversePoints",(function(){!function(t){r.forEach(t.edges(),(function(e){var n=t.edge(e);n.reversed&&n.points.reverse()}))}(t)})),e(" acyclic.undo",(function(){i.undo(t)}))}(e,n)})),n(" updateInputGraph",(function(){!function(t,e){r.forEach(t.nodes(),(function(n){var r=t.node(n),i=e.node(n);r&&(r.x=i.x,r.y=i.y,e.children(n).length&&(r.width=i.width,r.height=i.height))})),r.forEach(t.edges(),(function(n){var i=t.edge(n),o=e.edge(n);i.points=o.points,r.has(o,"x")&&(i.x=o.x,i.y=o.y)})),t.graph().width=e.graph().width,t.graph().height=e.graph().height}(t,e)}))}))};var b=["nodesep","edgesep","ranksep","marginx","marginy"],v={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},m=["acyclicer","ranker","rankdir","align"],_=["width","height"],w={width:0,height:0},x=["minlen","weight","width","height","labeloffset"],k={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},E=["labelpos"];function A(t,e){return r.mapValues(r.pick(t,e),Number)}function S(t){var e={};return r.forEach(t,(function(t,n){e[n.toLowerCase()]=t})),e}},function(t,e,n){var r=n(293);t.exports=function(t){return r(t,5)}},function(t,e,n){var r=n(160),i=n(86),o=n(178),a=n(89),u=Object.prototype,s=u.hasOwnProperty,c=r((function(t,e){t=Object(t);var n=-1,r=e.length,c=r>2?e[2]:void 0;for(c&&o(e[0],e[1],c)&&(r=1);++n<r;)for(var f=e[n],l=a(f),h=-1,d=l.length;++h<d;){var p=l[h],g=t[p];(void 0===g||i(g,u[p])&&!s.call(t,p))&&(t[p]=f[p])}return t}));t.exports=c},function(t,e,n){var r=n(755)(n(756));t.exports=r},function(t,e,n){var r=n(53),i=n(52),o=n(62);t.exports=function(t){return function(e,n,a){var u=Object(e);if(!i(e)){var s=r(n,3);e=o(e),n=function(t){return s(u[t],t,u)}}var c=t(e,n,a);return c>-1?u[s?e[c]:c]:void 0}}},function(t,e,n){var r=n(332),i=n(53),o=n(757),a=Math.max;t.exports=function(t,e,n){var u=null==t?0:t.length;if(!u)return-1;var s=null==n?0:o(n);return s<0&&(s=a(u+s,0)),r(t,i(e,3),s)}},function(t,e,n){var r=n(402);t.exports=function(t){var e=r(t),n=e%1;return e==e?n?e-n:e:0}},function(t,e,n){var r=n(28),i=n(91),o=/^\s+|\s+$/g,a=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,s=/^0o[0-7]+$/i,c=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(i(t))return NaN;if(r(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=r(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(o,"");var n=u.test(t);return n||s.test(t)?c(t.slice(2),n?2:8):a.test(t)?NaN:+t}},function(t,e,n){var r=n(236),i=n(313),o=n(89);t.exports=function(t,e){return null==t?t:r(t,i(e),o)}},function(t,e){t.exports=function(t){var e=null==t?0:t.length;return e?t[e-1]:void 0}},function(t,e,n){var r=n(152),i=n(235),o=n(53);t.exports=function(t,e){var n={};return e=o(e,3),i(t,(function(t,i,o){r(n,i,e(t,i,o))})),n}},function(t,e,n){var r=n(263),i=n(763),o=n(76);t.exports=function(t){return t&&t.length?r(t,o,i):void 0}},function(t,e){t.exports=function(t,e){return t>e}},function(t,e,n){var r=n(765),i=n(769)((function(t,e,n){r(t,e,n)}));t.exports=i},function(t,e,n){var r=n(146),i=n(404),o=n(236),a=n(766),u=n(28),s=n(89),c=n(405);t.exports=function t(e,n,f,l,h){e!==n&&o(n,(function(o,s){if(h||(h=new r),u(o))a(e,n,s,f,t,l,h);else{var d=l?l(c(e,s),o,s+"",e,n,h):void 0;void 0===d&&(d=o),i(e,s,d)}}),s)}},function(t,e,n){var r=n(404),i=n(299),o=n(308),a=n(300),u=n(309),s=n(126),c=n(15),f=n(333),l=n(88),h=n(124),d=n(28),p=n(767),g=n(127),y=n(405),b=n(768);t.exports=function(t,e,n,v,m,_,w){var x=y(t,n),k=y(e,n),E=w.get(k);if(E)r(t,n,E);else{var A=_?_(x,k,n+"",t,e,w):void 0,S=void 0===A;if(S){var M=c(k),T=!M&&l(k),O=!M&&!T&&g(k);A=k,M||T||O?c(x)?A=x:f(x)?A=a(x):T?(S=!1,A=i(k,!0)):O?(S=!1,A=o(k,!0)):A=[]:p(k)||s(k)?(A=x,s(x)?A=b(x):d(x)&&!h(x)||(A=u(k))):S=!1}S&&(w.set(k,A),m(A,k,v,_,w),w.delete(k)),r(t,n,A)}}},function(t,e,n){var r=n(75),i=n(156),o=n(43),a=Function.prototype,u=Object.prototype,s=a.toString,c=u.hasOwnProperty,f=s.call(Object);t.exports=function(t){if(!o(t)||"[object Object]"!=r(t))return!1;var e=i(t);if(null===e)return!0;var n=c.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&s.call(n)==f}},function(t,e,n){var r=n(125),i=n(89);t.exports=function(t){return r(t,i(t))}},function(t,e,n){var r=n(160),i=n(178);t.exports=function(t){return r((function(e,n){var r=-1,o=n.length,a=o>1?n[o-1]:void 0,u=o>2?n[2]:void 0;for(a=t.length>3&&"function"==typeof a?(o--,a):void 0,u&&i(n[0],n[1],u)&&(a=o<3?void 0:a,o=1),e=Object(e);++r<o;){var s=n[r];s&&t(e,s,r,a)}return e}))}},function(t,e,n){var r=n(263),i=n(406),o=n(76);t.exports=function(t){return t&&t.length?r(t,o,i):void 0}},function(t,e,n){var r=n(263),i=n(53),o=n(406);t.exports=function(t,e){return t&&t.length?r(t,i(e,2),o):void 0}},function(t,e,n){var r=n(35);t.exports=function(){return r.Date.now()}},function(t,e,n){var r=n(774),i=n(777)((function(t,e){return null==t?{}:r(t,e)}));t.exports=i},function(t,e,n){var r=n(775),i=n(322);t.exports=function(t,e){return r(t,e,(function(e,n){return i(t,n)}))}},function(t,e,n){var r=n(238),i=n(776),o=n(158);t.exports=function(t,e,n){for(var a=-1,u=e.length,s={};++a<u;){var c=e[a],f=r(t,c);n(f,c)&&i(s,o(c,t),f)}return s}},function(t,e,n){var r=n(151),i=n(158),o=n(153),a=n(28),u=n(128);t.exports=function(t,e,n,s){if(!a(t))return t;for(var c=-1,f=(e=i(e,t)).length,l=f-1,h=t;null!=h&&++c<f;){var d=u(e[c]),p=n;if(c!=l){var g=h[d];void 0===(p=s?s(g,d,h):void 0)&&(p=a(g)?g:o(e[c+1])?[]:{})}r(h,d,p),h=h[d]}return t}},function(t,e,n){var r=n(403),i=n(330),o=n(331);t.exports=function(t){return o(i(t,void 0,r),t+"")}},function(t,e,n){var r=n(779)();t.exports=r},function(t,e,n){var r=n(780),i=n(178),o=n(402);t.exports=function(t){return function(e,n,a){return a&&"number"!=typeof a&&i(e,n,a)&&(n=a=void 0),e=o(e),void 0===n?(n=e,e=0):n=o(n),a=void 0===a?e<n?1:-1:o(a),r(e,n,a,t)}}},function(t,e){var n=Math.ceil,r=Math.max;t.exports=function(t,e,i,o){for(var a=-1,u=r(n((e-t)/(i||1)),0),s=Array(u);u--;)s[o?u:++a]=t,t+=i;return s}},function(t,e,n){var r=n(240),i=n(782),o=n(160),a=n(178),u=o((function(t,e){if(null==t)return[];var n=e.length;return n>1&&a(t,e[0],e[1])?e=[]:n>2&&a(e[0],e[1],e[2])&&(e=[e[0]]),i(t,r(e,1),[])}));t.exports=u},function(t,e,n){var r=n(159),i=n(53),o=n(328),a=n(783),u=n(154),s=n(784),c=n(76);t.exports=function(t,e,n){var f=-1;e=r(e.length?e:[c],u(i));var l=o(t,(function(t,n,i){return{criteria:r(e,(function(e){return e(t)})),index:++f,value:t}}));return a(l,(function(t,e){return s(t,e,n)}))}},function(t,e){t.exports=function(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}},function(t,e,n){var r=n(785);t.exports=function(t,e,n){for(var i=-1,o=t.criteria,a=e.criteria,u=o.length,s=n.length;++i<u;){var c=r(o[i],a[i]);if(c)return i>=s?c:c*("desc"==n[i]?-1:1)}return t.index-e.index}},function(t,e,n){var r=n(91);t.exports=function(t,e){if(t!==e){var n=void 0!==t,i=null===t,o=t==t,a=r(t),u=void 0!==e,s=null===e,c=e==e,f=r(e);if(!s&&!f&&!a&&t>e||a&&u&&c&&!s&&!f||i&&u&&c||!n&&c||!o)return 1;if(!i&&!a&&!f&&t<e||f&&n&&o&&!i&&!a||s&&n&&o||!u&&o||!c)return-1}return 0}},function(t,e,n){var r=n(321),i=0;t.exports=function(t){var e=++i;return r(t)+e}},function(t,e,n){var r=n(151),i=n(788);t.exports=function(t,e){return i(t||[],e||[],r)}},function(t,e){t.exports=function(t,e,n){for(var r=-1,i=t.length,o=e.length,a={};++r<i;){var u=r<o?e[r]:void 0;n(a,t[r],u)}return a}},function(t,e,n){"use strict";var r=n(8),i=n(790);t.exports={run:function(t){var e="greedy"===t.graph().acyclicer?i(t,function(t){return function(e){return t.edge(e).weight}}(t)):function(t){var e=[],n={},i={};function o(a){r.has(i,a)||(i[a]=!0,n[a]=!0,r.forEach(t.outEdges(a),(function(t){r.has(n,t.w)?e.push(t):o(t.w)})),delete n[a])}return r.forEach(t.nodes(),o),e}(t);r.forEach(e,(function(e){var n=t.edge(e);t.removeEdge(e),n.forwardName=e.name,n.reversed=!0,t.setEdge(e.w,e.v,n,r.uniqueId("rev"))}))},undo:function(t){r.forEach(t.edges(),(function(e){var n=t.edge(e);if(n.reversed){t.removeEdge(e);var r=n.forwardName;delete n.reversed,delete n.forwardName,t.setEdge(e.w,e.v,n,r)}}))}}},function(t,e,n){var r=n(8),i=n(38).Graph,o=n(791);t.exports=function(t,e){if(t.nodeCount()<=1)return[];var n=function(t,e){var n=new i,a=0,u=0;r.forEach(t.nodes(),(function(t){n.setNode(t,{v:t,in:0,out:0})})),r.forEach(t.edges(),(function(t){var r=n.edge(t.v,t.w)||0,i=e(t),o=r+i;n.setEdge(t.v,t.w,o),u=Math.max(u,n.node(t.v).out+=i),a=Math.max(a,n.node(t.w).in+=i)}));var c=r.range(u+a+3).map((function(){return new o})),f=a+1;return r.forEach(n.nodes(),(function(t){s(c,f,n.node(t))})),{graph:n,buckets:c,zeroIdx:f}}(t,e||a),c=function(t,e,n){var r,i=[],o=e[e.length-1],a=e[0];for(;t.nodeCount();){for(;r=a.dequeue();)u(t,e,n,r);for(;r=o.dequeue();)u(t,e,n,r);if(t.nodeCount())for(var s=e.length-2;s>0;--s)if(r=e[s].dequeue()){i=i.concat(u(t,e,n,r,!0));break}}return i}(n.graph,n.buckets,n.zeroIdx);return r.flatten(r.map(c,(function(e){return t.outEdges(e.v,e.w)})),!0)};var a=r.constant(1);function u(t,e,n,i,o){var a=o?[]:void 0;return r.forEach(t.inEdges(i.v),(function(r){var i=t.edge(r),u=t.node(r.v);o&&a.push({v:r.v,w:r.w}),u.out-=i,s(e,n,u)})),r.forEach(t.outEdges(i.v),(function(r){var i=t.edge(r),o=r.w,a=t.node(o);a.in-=i,s(e,n,a)})),t.removeNode(i.v),a}function s(t,e,n){n.out?n.in?t[n.out-n.in+e].enqueue(n):t[t.length-1].enqueue(n):t[0].enqueue(n)}},function(t,e){function n(){var t={};t._next=t._prev=t,this._sentinel=t}function r(t){t._prev._next=t._next,t._next._prev=t._prev,delete t._next,delete t._prev}function i(t,e){if("_next"!==t&&"_prev"!==t)return e}t.exports=n,n.prototype.dequeue=function(){var t=this._sentinel,e=t._prev;if(e!==t)return r(e),e},n.prototype.enqueue=function(t){var e=this._sentinel;t._prev&&t._next&&r(t),t._next=e._next,e._next._prev=t,e._next=t,t._prev=e},n.prototype.toString=function(){for(var t=[],e=this._sentinel,n=e._prev;n!==e;)t.push(JSON.stringify(n,i)),n=n._prev;return"["+t.join(", ")+"]"}},function(t,e,n){"use strict";var r=n(8),i=n(22);t.exports={run:function(t){t.graph().dummyChains=[],r.forEach(t.edges(),(function(e){!function(t,e){var n,r,o,a=e.v,u=t.node(a).rank,s=e.w,c=t.node(s).rank,f=e.name,l=t.edge(e),h=l.labelRank;if(c===u+1)return;for(t.removeEdge(e),o=0,++u;u<c;++o,++u)l.points=[],r={width:0,height:0,edgeLabel:l,edgeObj:e,rank:u},n=i.addDummyNode(t,"edge",r,"_d"),u===h&&(r.width=l.width,r.height=l.height,r.dummy="edge-label",r.labelpos=l.labelpos),t.setEdge(a,n,{weight:l.weight},f),0===o&&t.graph().dummyChains.push(n),a=n;t.setEdge(a,s,{weight:l.weight},f)}(t,e)}))},undo:function(t){r.forEach(t.graph().dummyChains,(function(e){var n,r=t.node(e),i=r.edgeLabel;for(t.setEdge(r.edgeObj,i);r.dummy;)n=t.successors(e)[0],t.removeNode(e),i.points.push({x:r.x,y:r.y}),"edge-label"===r.dummy&&(i.x=r.x,i.y=r.y,i.width=r.width,i.height=r.height),e=n,r=t.node(e)}))}}},function(t,e,n){"use strict";var r=n(179).longestPath,i=n(407),o=n(794);t.exports=function(t){switch(t.graph().ranker){case"network-simplex":u(t);break;case"tight-tree":!function(t){r(t),i(t)}(t);break;case"longest-path":a(t);break;default:u(t)}};var a=r;function u(t){o(t)}},function(t,e,n){"use strict";var r=n(8),i=n(407),o=n(179).slack,a=n(179).longestPath,u=n(38).alg.preorder,s=n(38).alg.postorder,c=n(22).simplify;function f(t){t=c(t),a(t);var e,n=i(t);for(d(n),l(n,t);e=g(n);)b(n,t,e,y(n,t,e))}function l(t,e){var n=s(t,t.nodes());n=n.slice(0,n.length-1),r.forEach(n,(function(n){!function(t,e,n){var r=t.node(n).parent;t.edge(n,r).cutvalue=h(t,e,n)}(t,e,n)}))}function h(t,e,n){var i=t.node(n).parent,o=!0,a=e.edge(n,i),u=0;return a||(o=!1,a=e.edge(i,n)),u=a.weight,r.forEach(e.nodeEdges(n),(function(r){var a,s,c=r.v===n,f=c?r.w:r.v;if(f!==i){var l=c===o,h=e.edge(r).weight;if(u+=l?h:-h,a=n,s=f,t.hasEdge(a,s)){var d=t.edge(n,f).cutvalue;u+=l?-d:d}}})),u}function d(t,e){arguments.length<2&&(e=t.nodes()[0]),p(t,{},1,e)}function p(t,e,n,i,o){var a=n,u=t.node(i);return e[i]=!0,r.forEach(t.neighbors(i),(function(o){r.has(e,o)||(n=p(t,e,n,o,i))})),u.low=a,u.lim=n++,o?u.parent=o:delete u.parent,n}function g(t){return r.find(t.edges(),(function(e){return t.edge(e).cutvalue<0}))}function y(t,e,n){var i=n.v,a=n.w;e.hasEdge(i,a)||(i=n.w,a=n.v);var u=t.node(i),s=t.node(a),c=u,f=!1;u.lim>s.lim&&(c=s,f=!0);var l=r.filter(e.edges(),(function(e){return f===v(t,t.node(e.v),c)&&f!==v(t,t.node(e.w),c)}));return r.minBy(l,(function(t){return o(e,t)}))}function b(t,e,n,i){var o=n.v,a=n.w;t.removeEdge(o,a),t.setEdge(i.v,i.w,{}),d(t),l(t,e),function(t,e){var n=r.find(t.nodes(),(function(t){return!e.node(t).parent})),i=u(t,n);i=i.slice(1),r.forEach(i,(function(n){var r=t.node(n).parent,i=e.edge(n,r),o=!1;i||(i=e.edge(r,n),o=!0),e.node(n).rank=e.node(r).rank+(o?i.minlen:-i.minlen)}))}(t,e)}function v(t,e,n){return n.low<=e.lim&&e.lim<=n.lim}t.exports=f,f.initLowLimValues=d,f.initCutValues=l,f.calcCutValue=h,f.leaveEdge=g,f.enterEdge=y,f.exchangeEdges=b},function(t,e,n){var r=n(8);t.exports=function(t){var e=function(t){var e={},n=0;function i(o){var a=n;r.forEach(t.children(o),i),e[o]={low:a,lim:n++}}return r.forEach(t.children(),i),e}(t);r.forEach(t.graph().dummyChains,(function(n){for(var r=t.node(n),i=r.edgeObj,o=function(t,e,n,r){var i,o,a=[],u=[],s=Math.min(e[n].low,e[r].low),c=Math.max(e[n].lim,e[r].lim);i=n;do{i=t.parent(i),a.push(i)}while(i&&(e[i].low>s||c>e[i].lim));o=i,i=r;for(;(i=t.parent(i))!==o;)u.push(i);return{path:a.concat(u.reverse()),lca:o}}(t,e,i.v,i.w),a=o.path,u=o.lca,s=0,c=a[s],f=!0;n!==i.w;){if(r=t.node(n),f){for(;(c=a[s])!==u&&t.node(c).maxRank<r.rank;)s++;c===u&&(f=!1)}if(!f){for(;s<a.length-1&&t.node(c=a[s+1]).minRank<=r.rank;)s++;c=a[s]}t.setParent(n,c),n=t.successors(n)[0]}}))}},function(t,e,n){var r=n(8),i=n(22);t.exports={run:function(t){var e=i.addDummyNode(t,"root",{},"_root"),n=function(t){var e={};return r.forEach(t.children(),(function(n){!function n(i,o){var a=t.children(i);a&&a.length&&r.forEach(a,(function(t){n(t,o+1)}));e[i]=o}(n,1)})),e}(t),o=r.max(r.values(n))-1,a=2*o+1;t.graph().nestingRoot=e,r.forEach(t.edges(),(function(e){t.edge(e).minlen*=a}));var u=function(t){return r.reduce(t.edges(),(function(e,n){return e+t.edge(n).weight}),0)}(t)+1;r.forEach(t.children(),(function(s){!function t(e,n,o,a,u,s,c){var f=e.children(c);if(!f.length)return void(c!==n&&e.setEdge(n,c,{weight:0,minlen:o}));var l=i.addBorderNode(e,"_bt"),h=i.addBorderNode(e,"_bb"),d=e.node(c);e.setParent(l,c),d.borderTop=l,e.setParent(h,c),d.borderBottom=h,r.forEach(f,(function(r){t(e,n,o,a,u,s,r);var i=e.node(r),f=i.borderTop?i.borderTop:r,d=i.borderBottom?i.borderBottom:r,p=i.borderTop?a:2*a,g=f!==d?1:u-s[c]+1;e.setEdge(l,f,{weight:p,minlen:g,nestingEdge:!0}),e.setEdge(d,h,{weight:p,minlen:g,nestingEdge:!0})})),e.parent(c)||e.setEdge(n,l,{weight:0,minlen:u+s[c]})}(t,e,a,u,o,n,s)})),t.graph().nodeRankFactor=a},cleanup:function(t){var e=t.graph();t.removeNode(e.nestingRoot),delete e.nestingRoot,r.forEach(t.edges(),(function(e){t.edge(e).nestingEdge&&t.removeEdge(e)}))}}},function(t,e,n){var r=n(8),i=n(22);function o(t,e,n,r,o,a){var u={width:0,height:0,rank:a,borderType:e},s=o[e][a-1],c=i.addDummyNode(t,"border",u,n);o[e][a]=c,t.setParent(c,r),s&&t.setEdge(s,c,{weight:1})}t.exports=function(t){r.forEach(t.children(),(function e(n){var i=t.children(n),a=t.node(n);if(i.length&&r.forEach(i,e),r.has(a,"minRank")){a.borderLeft=[],a.borderRight=[];for(var u=a.minRank,s=a.maxRank+1;u<s;++u)o(t,"borderLeft","_bl",n,a,u),o(t,"borderRight","_br",n,a,u)}}))}},function(t,e,n){"use strict";var r=n(8);function i(t){r.forEach(t.nodes(),(function(e){o(t.node(e))})),r.forEach(t.edges(),(function(e){o(t.edge(e))}))}function o(t){var e=t.width;t.width=t.height,t.height=e}function a(t){t.y=-t.y}function u(t){var e=t.x;t.x=t.y,t.y=e}t.exports={adjust:function(t){var e=t.graph().rankdir.toLowerCase();"lr"!==e&&"rl"!==e||i(t)},undo:function(t){var e=t.graph().rankdir.toLowerCase();"bt"!==e&&"rl"!==e||function(t){r.forEach(t.nodes(),(function(e){a(t.node(e))})),r.forEach(t.edges(),(function(e){var n=t.edge(e);r.forEach(n.points,a),r.has(n,"y")&&a(n)}))}(t);"lr"!==e&&"rl"!==e||(!function(t){r.forEach(t.nodes(),(function(e){u(t.node(e))})),r.forEach(t.edges(),(function(e){var n=t.edge(e);r.forEach(n.points,u),r.has(n,"x")&&u(n)}))}(t),i(t))}}},function(t,e,n){"use strict";var r=n(8),i=n(800),o=n(801),a=n(802),u=n(806),s=n(807),c=n(38).Graph,f=n(22);function l(t,e,n){return r.map(e,(function(e){return u(t,e,n)}))}function h(t,e){var n=new c;r.forEach(t,(function(t){var i=t.graph().root,o=a(t,i,n,e);r.forEach(o.vs,(function(e,n){t.node(e).order=n})),s(t,n,o.vs)}))}function d(t,e){r.forEach(e,(function(e){r.forEach(e,(function(e,n){t.node(e).order=n}))}))}t.exports=function(t){var e=f.maxRank(t),n=l(t,r.range(1,e+1),"inEdges"),a=l(t,r.range(e-1,-1,-1),"outEdges"),u=i(t);d(t,u);for(var s,c=Number.POSITIVE_INFINITY,p=0,g=0;g<4;++p,++g){h(p%2?n:a,p%4>=2),u=f.buildLayerMatrix(t);var y=o(t,u);y<c&&(g=0,s=r.cloneDeep(u),c=y)}d(t,s)}},function(t,e,n){"use strict";var r=n(8);t.exports=function(t){var e={},n=r.filter(t.nodes(),(function(e){return!t.children(e).length})),i=r.max(r.map(n,(function(e){return t.node(e).rank}))),o=r.map(r.range(i+1),(function(){return[]}));var a=r.sortBy(n,(function(e){return t.node(e).rank}));return r.forEach(a,(function n(i){if(r.has(e,i))return;e[i]=!0;var a=t.node(i);o[a.rank].push(i),r.forEach(t.successors(i),n)})),o}},function(t,e,n){"use strict";var r=n(8);function i(t,e,n){for(var i=r.zipObject(n,r.map(n,(function(t,e){return e}))),o=r.flatten(r.map(e,(function(e){return r.sortBy(r.map(t.outEdges(e),(function(e){return{pos:i[e.w],weight:t.edge(e).weight}})),"pos")})),!0),a=1;a<n.length;)a<<=1;var u=2*a-1;a-=1;var s=r.map(new Array(u),(function(){return 0})),c=0;return r.forEach(o.forEach((function(t){var e=t.pos+a;s[e]+=t.weight;for(var n=0;e>0;)e%2&&(n+=s[e+1]),s[e=e-1>>1]+=t.weight;c+=t.weight*n}))),c}t.exports=function(t,e){for(var n=0,r=1;r<e.length;++r)n+=i(t,e[r-1],e[r]);return n}},function(t,e,n){var r=n(8),i=n(803),o=n(804),a=n(805);t.exports=function t(e,n,u,s){var c=e.children(n),f=e.node(n),l=f?f.borderLeft:void 0,h=f?f.borderRight:void 0,d={};l&&(c=r.filter(c,(function(t){return t!==l&&t!==h})));var p=i(e,c);r.forEach(p,(function(n){if(e.children(n.v).length){var i=t(e,n.v,u,s);d[n.v]=i,r.has(i,"barycenter")&&(o=n,a=i,r.isUndefined(o.barycenter)?(o.barycenter=a.barycenter,o.weight=a.weight):(o.barycenter=(o.barycenter*o.weight+a.barycenter*a.weight)/(o.weight+a.weight),o.weight+=a.weight))}var o,a}));var g=o(p,u);!function(t,e){r.forEach(t,(function(t){t.vs=r.flatten(t.vs.map((function(t){return e[t]?e[t].vs:t})),!0)}))}(g,d);var y=a(g,s);if(l&&(y.vs=r.flatten([l,y.vs,h],!0),e.predecessors(l).length)){var b=e.node(e.predecessors(l)[0]),v=e.node(e.predecessors(h)[0]);r.has(y,"barycenter")||(y.barycenter=0,y.weight=0),y.barycenter=(y.barycenter*y.weight+b.order+v.order)/(y.weight+2),y.weight+=2}return y}},function(t,e,n){var r=n(8);t.exports=function(t,e){return r.map(e,(function(e){var n=t.inEdges(e);if(n.length){var i=r.reduce(n,(function(e,n){var r=t.edge(n),i=t.node(n.v);return{sum:e.sum+r.weight*i.order,weight:e.weight+r.weight}}),{sum:0,weight:0});return{v:e,barycenter:i.sum/i.weight,weight:i.weight}}return{v:e}}))}},function(t,e,n){"use strict";var r=n(8);t.exports=function(t,e){var n={};return r.forEach(t,(function(t,e){var i=n[t.v]={indegree:0,in:[],out:[],vs:[t.v],i:e};r.isUndefined(t.barycenter)||(i.barycenter=t.barycenter,i.weight=t.weight)})),r.forEach(e.edges(),(function(t){var e=n[t.v],i=n[t.w];r.isUndefined(e)||r.isUndefined(i)||(i.indegree++,e.out.push(n[t.w]))})),function(t){var e=[];function n(t){return function(e){e.merged||(r.isUndefined(e.barycenter)||r.isUndefined(t.barycenter)||e.barycenter>=t.barycenter)&&function(t,e){var n=0,r=0;t.weight&&(n+=t.barycenter*t.weight,r+=t.weight);e.weight&&(n+=e.barycenter*e.weight,r+=e.weight);t.vs=e.vs.concat(t.vs),t.barycenter=n/r,t.weight=r,t.i=Math.min(e.i,t.i),e.merged=!0}(t,e)}}function i(e){return function(n){n.in.push(e),0==--n.indegree&&t.push(n)}}for(;t.length;){var o=t.pop();e.push(o),r.forEach(o.in.reverse(),n(o)),r.forEach(o.out,i(o))}return r.map(r.filter(e,(function(t){return!t.merged})),(function(t){return r.pick(t,["vs","i","barycenter","weight"])}))}(r.filter(n,(function(t){return!t.indegree})))}},function(t,e,n){var r=n(8),i=n(22);function o(t,e,n){for(var i;e.length&&(i=r.last(e)).i<=n;)e.pop(),t.push(i.vs),n++;return n}t.exports=function(t,e){var n=i.partition(t,(function(t){return r.has(t,"barycenter")})),a=n.lhs,u=r.sortBy(n.rhs,(function(t){return-t.i})),s=[],c=0,f=0,l=0;a.sort((h=!!e,function(t,e){return t.barycenter<e.barycenter?-1:t.barycenter>e.barycenter?1:h?e.i-t.i:t.i-e.i})),l=o(s,u,l),r.forEach(a,(function(t){l+=t.vs.length,s.push(t.vs),c+=t.barycenter*t.weight,f+=t.weight,l=o(s,u,l)}));var h;var d={vs:r.flatten(s,!0)};f&&(d.barycenter=c/f,d.weight=f);return d}},function(t,e,n){var r=n(8),i=n(38).Graph;t.exports=function(t,e,n){var o=function(t){var e;for(;t.hasNode(e=r.uniqueId("_root")););return e}(t),a=new i({compound:!0}).setGraph({root:o}).setDefaultNodeLabel((function(e){return t.node(e)}));return r.forEach(t.nodes(),(function(i){var u=t.node(i),s=t.parent(i);(u.rank===e||u.minRank<=e&&e<=u.maxRank)&&(a.setNode(i),a.setParent(i,s||o),r.forEach(t[n](i),(function(e){var n=e.v===i?e.w:e.v,o=a.edge(n,i),u=r.isUndefined(o)?0:o.weight;a.setEdge(n,i,{weight:t.edge(e).weight+u})})),r.has(u,"minRank")&&a.setNode(i,{borderLeft:u.borderLeft[e],borderRight:u.borderRight[e]}))})),a}},function(t,e,n){var r=n(8);t.exports=function(t,e,n){var i,o={};r.forEach(n,(function(n){for(var r,a,u=t.parent(n);u;){if((r=t.parent(u))?(a=o[r],o[r]=u):(a=i,i=u),a&&a!==u)return void e.setEdge(a,u);u=r}}))}},function(t,e,n){"use strict";var r=n(8),i=n(22),o=n(809).positionX;t.exports=function(t){(function(t){var e=i.buildLayerMatrix(t),n=t.graph().ranksep,o=0;r.forEach(e,(function(e){var i=r.max(r.map(e,(function(e){return t.node(e).height})));r.forEach(e,(function(e){t.node(e).y=o+i/2})),o+=i+n}))})(t=i.asNonCompoundGraph(t)),r.forEach(o(t),(function(e,n){t.node(n).x=e}))}},function(t,e,n){"use strict";var r=n(8),i=n(38).Graph,o=n(22);function a(t,e){var n={};return r.reduce(e,(function(e,i){var o=0,a=0,u=e.length,c=r.last(i);return r.forEach(i,(function(e,f){var l=function(t,e){if(t.node(e).dummy)return r.find(t.predecessors(e),(function(e){return t.node(e).dummy}))}(t,e),h=l?t.node(l).order:u;(l||e===c)&&(r.forEach(i.slice(a,f+1),(function(e){r.forEach(t.predecessors(e),(function(r){var i=t.node(r),a=i.order;!(a<o||h<a)||i.dummy&&t.node(e).dummy||s(n,r,e)}))})),a=f+1,o=h)})),i})),n}function u(t,e){var n={};function i(e,i,o,a,u){var c;r.forEach(r.range(i,o),(function(i){c=e[i],t.node(c).dummy&&r.forEach(t.predecessors(c),(function(e){var r=t.node(e);r.dummy&&(r.order<a||r.order>u)&&s(n,e,c)}))}))}return r.reduce(e,(function(e,n){var o,a=-1,u=0;return r.forEach(n,(function(r,s){if("border"===t.node(r).dummy){var c=t.predecessors(r);c.length&&(o=t.node(c[0]).order,i(n,u,s,a,o),u=s,a=o)}i(n,u,n.length,o,e.length)})),n})),n}function s(t,e,n){if(e>n){var r=e;e=n,n=r}var i=t[e];i||(t[e]=i={}),i[n]=!0}function c(t,e,n){if(e>n){var i=e;e=n,n=i}return r.has(t[e],n)}function f(t,e,n,i){var o={},a={},u={};return r.forEach(e,(function(t){r.forEach(t,(function(t,e){o[t]=t,a[t]=t,u[t]=e}))})),r.forEach(e,(function(t){var e=-1;r.forEach(t,(function(t){var s=i(t);if(s.length)for(var f=((s=r.sortBy(s,(function(t){return u[t]}))).length-1)/2,l=Math.floor(f),h=Math.ceil(f);l<=h;++l){var d=s[l];a[t]===t&&e<u[d]&&!c(n,t,d)&&(a[d]=t,a[t]=o[t]=o[d],e=u[d])}}))})),{root:o,align:a}}function l(t,e,n,o,a){var u={},s=function(t,e,n,o){var a=new i,u=t.graph(),s=function(t,e,n){return function(i,o,a){var u,s=i.node(o),c=i.node(a),f=0;if(f+=s.width/2,r.has(s,"labelpos"))switch(s.labelpos.toLowerCase()){case"l":u=-s.width/2;break;case"r":u=s.width/2}if(u&&(f+=n?u:-u),u=0,f+=(s.dummy?e:t)/2,f+=(c.dummy?e:t)/2,f+=c.width/2,r.has(c,"labelpos"))switch(c.labelpos.toLowerCase()){case"l":u=c.width/2;break;case"r":u=-c.width/2}return u&&(f+=n?u:-u),u=0,f}}(u.nodesep,u.edgesep,o);return r.forEach(e,(function(e){var i;r.forEach(e,(function(e){var r=n[e];if(a.setNode(r),i){var o=n[i],u=a.edge(o,r);a.setEdge(o,r,Math.max(s(t,e,i),u||0))}i=e}))})),a}(t,e,n,a),c=a?"borderLeft":"borderRight";function f(t,e){for(var n=s.nodes(),r=n.pop(),i={};r;)i[r]?t(r):(i[r]=!0,n.push(r),n=n.concat(e(r))),r=n.pop()}return f((function(t){u[t]=s.inEdges(t).reduce((function(t,e){return Math.max(t,u[e.v]+s.edge(e))}),0)}),s.predecessors.bind(s)),f((function(e){var n=s.outEdges(e).reduce((function(t,e){return Math.min(t,u[e.w]-s.edge(e))}),Number.POSITIVE_INFINITY),r=t.node(e);n!==Number.POSITIVE_INFINITY&&r.borderType!==c&&(u[e]=Math.max(u[e],n))}),s.successors.bind(s)),r.forEach(o,(function(t){u[t]=u[n[t]]})),u}function h(t,e){return r.minBy(r.values(e),(function(e){var n=Number.NEGATIVE_INFINITY,i=Number.POSITIVE_INFINITY;return r.forIn(e,(function(e,r){var o=function(t,e){return t.node(e).width}(t,r)/2;n=Math.max(e+o,n),i=Math.min(e-o,i)})),n-i}))}function d(t,e){var n=r.values(e),i=r.min(n),o=r.max(n);r.forEach(["u","d"],(function(n){r.forEach(["l","r"],(function(a){var u,s=n+a,c=t[s];if(c!==e){var f=r.values(c);(u="l"===a?i-r.min(f):o-r.max(f))&&(t[s]=r.mapValues(c,(function(t){return t+u})))}}))}))}function p(t,e){return r.mapValues(t.ul,(function(n,i){if(e)return t[e.toLowerCase()][i];var o=r.sortBy(r.map(t,i));return(o[1]+o[2])/2}))}t.exports={positionX:function(t){var e,n=o.buildLayerMatrix(t),i=r.merge(a(t,n),u(t,n)),s={};r.forEach(["u","d"],(function(o){e="u"===o?n:r.values(n).reverse(),r.forEach(["l","r"],(function(n){"r"===n&&(e=r.map(e,(function(t){return r.values(t).reverse()})));var a=("u"===o?t.predecessors:t.successors).bind(t),u=f(t,e,i,a),c=l(t,e,u.root,u.align,"r"===n);"r"===n&&(c=r.mapValues(c,(function(t){return-t}))),s[o+n]=c}))}));var c=h(t,s);return d(s,c),p(s,t.graph().align)},findType1Conflicts:a,findType2Conflicts:u,addConflict:s,hasConflict:c,verticalAlignment:f,horizontalCompaction:l,alignCoordinates:d,findSmallestWidthAlignment:h,balance:p}},function(t,e,n){var r=n(8),i=n(22),o=n(38).Graph;t.exports={debugOrdering:function(t){var e=i.buildLayerMatrix(t),n=new o({compound:!0,multigraph:!0}).setGraph({});return r.forEach(t.nodes(),(function(e){n.setNode(e,{label:e}),n.setParent(e,"layer"+t.node(e).rank)})),r.forEach(t.edges(),(function(t){n.setEdge(t.v,t.w,{},t.name)})),r.forEach(e,(function(t,e){var i="layer"+e;n.setNode(i,{rank:"same"}),r.reduce(t,(function(t,e){return n.setEdge(t,e,{style:"invis"}),e}))})),n}}},function(t,e){t.exports="0.8.5"},function(t,e,n){"use strict";e.randomBytes=e.rng=e.pseudoRandomBytes=e.prng=n(100),e.createHash=e.Hash=n(133),e.createHmac=e.Hmac=n(416);var r=n(831),i=Object.keys(r),o=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(i);e.getHashes=function(){return o};var a=n(419);e.pbkdf2=a.pbkdf2,e.pbkdf2Sync=a.pbkdf2Sync;var u=n(833);e.Cipher=u.Cipher,e.createCipher=u.createCipher,e.Cipheriv=u.Cipheriv,e.createCipheriv=u.createCipheriv,e.Decipher=u.Decipher,e.createDecipher=u.createDecipher,e.Decipheriv=u.Decipheriv,e.createDecipheriv=u.createDecipheriv,e.getCiphers=u.getCiphers,e.listCiphers=u.listCiphers;var s=n(848);e.DiffieHellmanGroup=s.DiffieHellmanGroup,e.createDiffieHellmanGroup=s.createDiffieHellmanGroup,e.getDiffieHellman=s.getDiffieHellman,e.createDiffieHellman=s.createDiffieHellman,e.DiffieHellman=s.DiffieHellman;var c=n(853);e.createSign=c.createSign,e.Sign=c.Sign,e.createVerify=c.createVerify,e.Verify=c.Verify,e.createECDH=n(887);var f=n(888);e.publicEncrypt=f.publicEncrypt,e.privateEncrypt=f.privateEncrypt,e.publicDecrypt=f.publicDecrypt,e.privateDecrypt=f.privateDecrypt;var l=n(891);e.randomFill=l.randomFill,e.randomFillSync=l.randomFillSync,e.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))},e.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}},function(t,e,n){"use strict";e.byteLength=function(t){var e=c(t),n=e[0],r=e[1];return 3*(n+r)/4-r},e.toByteArray=function(t){var e,n,r=c(t),a=r[0],u=r[1],s=new o(function(t,e,n){return 3*(e+n)/4-n}(0,a,u)),f=0,l=u>0?a-4:a;for(n=0;n<l;n+=4)e=i[t.charCodeAt(n)]<<18|i[t.charCodeAt(n+1)]<<12|i[t.charCodeAt(n+2)]<<6|i[t.charCodeAt(n+3)],s[f++]=e>>16&255,s[f++]=e>>8&255,s[f++]=255&e;2===u&&(e=i[t.charCodeAt(n)]<<2|i[t.charCodeAt(n+1)]>>4,s[f++]=255&e);1===u&&(e=i[t.charCodeAt(n)]<<10|i[t.charCodeAt(n+1)]<<4|i[t.charCodeAt(n+2)]>>2,s[f++]=e>>8&255,s[f++]=255&e);return s},e.fromByteArray=function(t){for(var e,n=t.length,i=n%3,o=[],a=0,u=n-i;a<u;a+=16383)o.push(f(t,a,a+16383>u?u:a+16383));1===i?(e=t[n-1],o.push(r[e>>2]+r[e<<4&63]+"==")):2===i&&(e=(t[n-2]<<8)+t[n-1],o.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"="));return o.join("")};for(var r=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=0,s=a.length;u<s;++u)r[u]=a[u],i[a.charCodeAt(u)]=u;function c(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");return-1===n&&(n=e),[n,n===e?0:4-n%4]}function f(t,e,n){for(var i,o,a=[],u=e;u<n;u+=3)i=(t[u]<<16&16711680)+(t[u+1]<<8&65280)+(255&t[u+2]),a.push(r[(o=i)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return a.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(t,e){e.read=function(t,e,n,r,i){var o,a,u=8*i-r-1,s=(1<<u)-1,c=s>>1,f=-7,l=n?i-1:0,h=n?-1:1,d=t[e+l];for(l+=h,o=d&(1<<-f)-1,d>>=-f,f+=u;f>0;o=256*o+t[e+l],l+=h,f-=8);for(a=o&(1<<-f)-1,o>>=-f,f+=r;f>0;a=256*a+t[e+l],l+=h,f-=8);if(0===o)o=1-c;else{if(o===s)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,r),o-=c}return(d?-1:1)*a*Math.pow(2,o-r)},e.write=function(t,e,n,r,i,o){var a,u,s,c=8*o-i-1,f=(1<<c)-1,l=f>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:o-1,p=r?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(u=isNaN(e)?1:0,a=f):(a=Math.floor(Math.log(e)/Math.LN2),e*(s=Math.pow(2,-a))<1&&(a--,s*=2),(e+=a+l>=1?h/s:h*Math.pow(2,1-l))*s>=2&&(a++,s/=2),a+l>=f?(u=0,a=f):a+l>=1?(u=(e*s-1)*Math.pow(2,i),a+=l):(u=e*Math.pow(2,l-1)*Math.pow(2,i),a=0));i>=8;t[n+d]=255&u,d+=p,u/=256,i-=8);for(a=a<<i|u,c+=i;c>0;t[n+d]=255&a,d+=p,a/=256,c-=8);t[n+d-p]|=128*g}},function(t,e){},function(t,e,n){"use strict";var r=n(268).Buffer,i=n(817);t.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}return t.prototype.push=function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length},t.prototype.unshift=function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},t.prototype.shift=function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}},t.prototype.clear=function(){this.head=this.tail=null,this.length=0},t.prototype.join=function(t){if(0===this.length)return"";for(var e=this.head,n=""+e.data;e=e.next;)n+=t+e.data;return n},t.prototype.concat=function(t){if(0===this.length)return r.alloc(0);if(1===this.length)return this.head.data;for(var e,n,i,o=r.allocUnsafe(t>>>0),a=this.head,u=0;a;)e=a.data,n=o,i=u,e.copy(n,i),u+=a.data.length,a=a.next;return o},t}(),i&&i.inspect&&i.inspect.custom&&(t.exports.prototype[i.inspect.custom]=function(){var t=i.inspect({length:this.length});return this.constructor.name+" "+t})},function(t,e){},function(t,e,n){(function(t){var r=void 0!==t&&t||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function o(t,e){this._id=t,this._clearFn=e}e.setTimeout=function(){return new o(i.call(setTimeout,r,arguments),clearTimeout)},e.setInterval=function(){return new o(i.call(setInterval,r,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(r,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout((function(){t._onTimeout&&t._onTimeout()}),e))},n(819),e.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(this,n(25))},function(t,e,n){(function(t,e){!function(t,n){"use strict";if(!t.setImmediate){var r,i,o,a,u,s=1,c={},f=!1,l=t.document,h=Object.getPrototypeOf&&Object.getPrototypeOf(t);h=h&&h.setTimeout?h:t,"[object process]"==={}.toString.call(t.process)?r=function(t){e.nextTick((function(){p(t)}))}:!function(){if(t.postMessage&&!t.importScripts){var e=!0,n=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=n,e}}()?t.MessageChannel?((o=new MessageChannel).port1.onmessage=function(t){p(t.data)},r=function(t){o.port2.postMessage(t)}):l&&"onreadystatechange"in l.createElement("script")?(i=l.documentElement,r=function(t){var e=l.createElement("script");e.onreadystatechange=function(){p(t),e.onreadystatechange=null,i.removeChild(e),e=null},i.appendChild(e)}):r=function(t){setTimeout(p,0,t)}:(a="setImmediate$"+Math.random()+"$",u=function(e){e.source===t&&"string"==typeof e.data&&0===e.data.indexOf(a)&&p(+e.data.slice(a.length))},t.addEventListener?t.addEventListener("message",u,!1):t.attachEvent("onmessage",u),r=function(e){t.postMessage(a+e,"*")}),h.setImmediate=function(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),n=0;n<e.length;n++)e[n]=arguments[n+1];var i={callback:t,args:e};return c[s]=i,r(s),s++},h.clearImmediate=d}function d(t){delete c[t]}function p(t){if(f)setTimeout(p,0,t);else{var e=c[t];if(e){f=!0;try{!function(t){var e=t.callback,n=t.args;switch(n.length){case 0:e();break;case 1:e(n[0]);break;case 2:e(n[0],n[1]);break;case 3:e(n[0],n[1],n[2]);break;default:e.apply(void 0,n)}}(e)}finally{d(t),f=!1}}}}}("undefined"==typeof self?void 0===t?this:t:self)}).call(this,n(25),n(17))},function(t,e,n){(function(e){function n(t){try{if(!e.localStorage)return!1}catch(t){return!1}var n=e.localStorage[t];return null!=n&&"true"===String(n).toLowerCase()}t.exports=function(t,e){if(n("noDeprecation"))return t;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw new Error(e);n("traceDeprecation")?console.trace(e):console.warn(e),r=!0}return t.apply(this,arguments)}}}).call(this,n(25))},function(t,e,n){"use strict";t.exports=o;var r=n(413),i=Object.create(n(134));function o(t){if(!(this instanceof o))return new o(t);r.call(this,t)}i.inherits=n(2),i.inherits(o,r),o.prototype._transform=function(t,e,n){n(null,t)}},function(t,e,n){t.exports=n(269)},function(t,e,n){t.exports=n(80)},function(t,e,n){t.exports=n(267).Transform},function(t,e,n){t.exports=n(267).PassThrough},function(t,e,n){var r=n(2),i=n(101),o=n(3).Buffer,a=[1518500249,1859775393,-1894007588,-899497514],u=new Array(80);function s(){this.init(),this._w=u,i.call(this,64,56)}function c(t){return t<<30|t>>>2}function f(t,e,n,r){return 0===t?e&n|~e&r:2===t?e&n|e&r|n&r:e^n^r}r(s,i),s.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},s.prototype._update=function(t){for(var e,n=this._w,r=0|this._a,i=0|this._b,o=0|this._c,u=0|this._d,s=0|this._e,l=0;l<16;++l)n[l]=t.readInt32BE(4*l);for(;l<80;++l)n[l]=n[l-3]^n[l-8]^n[l-14]^n[l-16];for(var h=0;h<80;++h){var d=~~(h/20),p=0|((e=r)<<5|e>>>27)+f(d,i,o,u)+s+n[h]+a[d];s=u,u=o,o=c(i),i=r,r=p}this._a=r+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=u+this._d|0,this._e=s+this._e|0},s.prototype._hash=function(){var t=o.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=s},function(t,e,n){var r=n(2),i=n(101),o=n(3).Buffer,a=[1518500249,1859775393,-1894007588,-899497514],u=new Array(80);function s(){this.init(),this._w=u,i.call(this,64,56)}function c(t){return t<<5|t>>>27}function f(t){return t<<30|t>>>2}function l(t,e,n,r){return 0===t?e&n|~e&r:2===t?e&n|e&r|n&r:e^n^r}r(s,i),s.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},s.prototype._update=function(t){for(var e,n=this._w,r=0|this._a,i=0|this._b,o=0|this._c,u=0|this._d,s=0|this._e,h=0;h<16;++h)n[h]=t.readInt32BE(4*h);for(;h<80;++h)n[h]=(e=n[h-3]^n[h-8]^n[h-14]^n[h-16])<<1|e>>>31;for(var d=0;d<80;++d){var p=~~(d/20),g=c(r)+l(p,i,o,u)+s+n[d]+a[p]|0;s=u,u=o,o=f(i),i=r,r=g}this._a=r+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=u+this._d|0,this._e=s+this._e|0},s.prototype._hash=function(){var t=o.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=s},function(t,e,n){var r=n(2),i=n(414),o=n(101),a=n(3).Buffer,u=new Array(64);function s(){this.init(),this._w=u,o.call(this,64,56)}r(s,i),s.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},s.prototype._hash=function(){var t=a.allocUnsafe(28);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t},t.exports=s},function(t,e,n){var r=n(2),i=n(415),o=n(101),a=n(3).Buffer,u=new Array(160);function s(){this.init(),this._w=u,o.call(this,128,112)}r(s,i),s.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},s.prototype._hash=function(){var t=a.allocUnsafe(48);function e(e,n,r){t.writeInt32BE(e,r),t.writeInt32BE(n,r+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),t},t.exports=s},function(t,e,n){"use strict";var r=n(2),i=n(3).Buffer,o=n(65),a=i.alloc(128);function u(t,e){o.call(this,"digest"),"string"==typeof e&&(e=i.from(e)),this._alg=t,this._key=e,e.length>64?e=t(e):e.length<64&&(e=i.concat([e,a],64));for(var n=this._ipad=i.allocUnsafe(64),r=this._opad=i.allocUnsafe(64),u=0;u<64;u++)n[u]=54^e[u],r[u]=92^e[u];this._hash=[n]}r(u,o),u.prototype._update=function(t){this._hash.push(t)},u.prototype._final=function(){var t=this._alg(i.concat(this._hash));return this._alg(i.concat([this._opad,t]))},t.exports=u},function(t,e,n){t.exports=n(418)},function(t,e,n){(function(e,r){var i,o=n(420),a=n(421),u=n(422),s=n(3).Buffer,c=e.crypto&&e.crypto.subtle,f={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},l=[];function h(t,e,n,r,i){return c.importKey("raw",t,{name:"PBKDF2"},!1,["deriveBits"]).then((function(t){return c.deriveBits({name:"PBKDF2",salt:e,iterations:n,hash:{name:i}},t,r<<3)})).then((function(t){return s.from(t)}))}t.exports=function(t,n,d,p,g,y){"function"==typeof g&&(y=g,g=void 0);var b=f[(g=g||"sha1").toLowerCase()];if(!b||"function"!=typeof e.Promise)return r.nextTick((function(){var e;try{e=u(t,n,d,p,g)}catch(t){return y(t)}y(null,e)}));if(o(t,n,d,p),"function"!=typeof y)throw new Error("No callback provided to pbkdf2");s.isBuffer(t)||(t=s.from(t,a)),s.isBuffer(n)||(n=s.from(n,a)),function(t,e){t.then((function(t){r.nextTick((function(){e(null,t)}))}),(function(t){r.nextTick((function(){e(t)}))}))}(function(t){if(e.process&&!e.process.browser)return Promise.resolve(!1);if(!c||!c.importKey||!c.deriveBits)return Promise.resolve(!1);if(void 0!==l[t])return l[t];var n=h(i=i||s.alloc(8),i,10,128,t).then((function(){return!0})).catch((function(){return!1}));return l[t]=n,n}(b).then((function(e){return e?h(t,n,d,p,b):u(t,n,d,p,g)})),y)}}).call(this,n(25),n(17))},function(t,e,n){var r=n(834),i=n(274),o=n(275),a=n(847),u=n(182);function s(t,e,n){if(t=t.toLowerCase(),o[t])return i.createCipheriv(t,e,n);if(a[t])return new r({key:e,iv:n,mode:t});throw new TypeError("invalid suite type")}function c(t,e,n){if(t=t.toLowerCase(),o[t])return i.createDecipheriv(t,e,n);if(a[t])return new r({key:e,iv:n,mode:t,decrypt:!0});throw new TypeError("invalid suite type")}e.createCipher=e.Cipher=function(t,e){var n,r;if(t=t.toLowerCase(),o[t])n=o[t].key,r=o[t].iv;else{if(!a[t])throw new TypeError("invalid suite type");n=8*a[t].key,r=a[t].iv}var i=u(e,!1,n,r);return s(t,i.key,i.iv)},e.createCipheriv=e.Cipheriv=s,e.createDecipher=e.Decipher=function(t,e){var n,r;if(t=t.toLowerCase(),o[t])n=o[t].key,r=o[t].iv;else{if(!a[t])throw new TypeError("invalid suite type");n=8*a[t].key,r=a[t].iv}var i=u(e,!1,n,r);return c(t,i.key,i.iv)},e.createDecipheriv=e.Decipheriv=c,e.listCiphers=e.getCiphers=function(){return Object.keys(a).concat(i.getCiphers())}},function(t,e,n){var r=n(65),i=n(835),o=n(2),a=n(3).Buffer,u={"des-ede3-cbc":i.CBC.instantiate(i.EDE),"des-ede3":i.EDE,"des-ede-cbc":i.CBC.instantiate(i.EDE),"des-ede":i.EDE,"des-cbc":i.CBC.instantiate(i.DES),"des-ecb":i.DES};function s(t){r.call(this);var e,n=t.mode.toLowerCase(),i=u[n];e=t.decrypt?"decrypt":"encrypt";var o=t.key;a.isBuffer(o)||(o=a.from(o)),"des-ede"!==n&&"des-ede-cbc"!==n||(o=a.concat([o,o.slice(0,8)]));var s=t.iv;a.isBuffer(s)||(s=a.from(s)),this._des=i.create({key:o,iv:s,type:e})}u.des=u["des-cbc"],u.des3=u["des-ede3-cbc"],t.exports=s,o(s,r),s.prototype._update=function(t){return a.from(this._des.update(t))},s.prototype._final=function(){return a.from(this._des.final())}},function(t,e,n){"use strict";e.utils=n(423),e.Cipher=n(273),e.DES=n(424),e.CBC=n(836),e.EDE=n(837)},function(t,e,n){"use strict";var r=n(32),i=n(2),o={};function a(t){r.equal(t.length,8,"Invalid IV length"),this.iv=new Array(8);for(var e=0;e<this.iv.length;e++)this.iv[e]=t[e]}e.instantiate=function(t){function e(e){t.call(this,e),this._cbcInit()}i(e,t);for(var n=Object.keys(o),r=0;r<n.length;r++){var a=n[r];e.prototype[a]=o[a]}return e.create=function(t){return new e(t)},e},o._cbcInit=function(){var t=new a(this.options.iv);this._cbcState=t},o._update=function(t,e,n,r){var i=this._cbcState,o=this.constructor.super_.prototype,a=i.iv;if("encrypt"===this.type){for(var u=0;u<this.blockSize;u++)a[u]^=t[e+u];o._update.call(this,a,0,n,r);for(u=0;u<this.blockSize;u++)a[u]=n[r+u]}else{o._update.call(this,t,e,n,r);for(u=0;u<this.blockSize;u++)n[r+u]^=a[u];for(u=0;u<this.blockSize;u++)a[u]=t[e+u]}}},function(t,e,n){"use strict";var r=n(32),i=n(2),o=n(273),a=n(424);function u(t,e){r.equal(e.length,24,"Invalid key length");var n=e.slice(0,8),i=e.slice(8,16),o=e.slice(16,24);this.ciphers="encrypt"===t?[a.create({type:"encrypt",key:n}),a.create({type:"decrypt",key:i}),a.create({type:"encrypt",key:o})]:[a.create({type:"decrypt",key:o}),a.create({type:"encrypt",key:i}),a.create({type:"decrypt",key:n})]}function s(t){o.call(this,t);var e=new u(this.type,this.options.key);this._edeState=e}i(s,o),t.exports=s,s.create=function(t){return new s(t)},s.prototype._update=function(t,e,n,r){var i=this._edeState;i.ciphers[0]._update(t,e,n,r),i.ciphers[1]._update(n,r,n,r),i.ciphers[2]._update(n,r,n,r)},s.prototype._pad=a.prototype._pad,s.prototype._unpad=a.prototype._unpad},function(t,e,n){var r=n(275),i=n(428),o=n(3).Buffer,a=n(429),u=n(65),s=n(181),c=n(182);function f(t,e,n){u.call(this),this._cache=new h,this._cipher=new s.AES(e),this._prev=o.from(n),this._mode=t,this._autopadding=!0}n(2)(f,u),f.prototype._update=function(t){var e,n;this._cache.add(t);for(var r=[];e=this._cache.get();)n=this._mode.encrypt(this,e),r.push(n);return o.concat(r)};var l=o.alloc(16,16);function h(){this.cache=o.allocUnsafe(0)}function d(t,e,n){var u=r[t.toLowerCase()];if(!u)throw new TypeError("invalid suite type");if("string"==typeof e&&(e=o.from(e)),e.length!==u.key/8)throw new TypeError("invalid key length "+e.length);if("string"==typeof n&&(n=o.from(n)),"GCM"!==u.mode&&n.length!==u.iv)throw new TypeError("invalid iv length "+n.length);return"stream"===u.type?new a(u.module,e,n):"auth"===u.type?new i(u.module,e,n):new f(u.module,e,n)}f.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return t=this._mode.encrypt(this,t),this._cipher.scrub(),t;if(!t.equals(l))throw this._cipher.scrub(),new Error("data not multiple of block length")},f.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this},h.prototype.add=function(t){this.cache=o.concat([this.cache,t])},h.prototype.get=function(){if(this.cache.length>15){var t=this.cache.slice(0,16);return this.cache=this.cache.slice(16),t}return null},h.prototype.flush=function(){for(var t=16-this.cache.length,e=o.allocUnsafe(t),n=-1;++n<t;)e.writeUInt8(t,n);return o.concat([this.cache,e])},e.createCipheriv=d,e.createCipher=function(t,e){var n=r[t.toLowerCase()];if(!n)throw new TypeError("invalid suite type");var i=c(e,!1,n.key,n.iv);return d(t,i.key,i.iv)}},function(t,e){e.encrypt=function(t,e){return t._cipher.encryptBlock(e)},e.decrypt=function(t,e){return t._cipher.decryptBlock(e)}},function(t,e,n){var r=n(135);e.encrypt=function(t,e){var n=r(e,t._prev);return t._prev=t._cipher.encryptBlock(n),t._prev},e.decrypt=function(t,e){var n=t._prev;t._prev=e;var i=t._cipher.decryptBlock(e);return r(i,n)}},function(t,e,n){var r=n(3).Buffer,i=n(135);function o(t,e,n){var o=e.length,a=i(e,t._cache);return t._cache=t._cache.slice(o),t._prev=r.concat([t._prev,n?e:a]),a}e.encrypt=function(t,e,n){for(var i,a=r.allocUnsafe(0);e.length;){if(0===t._cache.length&&(t._cache=t._cipher.encryptBlock(t._prev),t._prev=r.allocUnsafe(0)),!(t._cache.length<=e.length)){a=r.concat([a,o(t,e,n)]);break}i=t._cache.length,a=r.concat([a,o(t,e.slice(0,i),n)]),e=e.slice(i)}return a}},function(t,e,n){var r=n(3).Buffer;function i(t,e,n){var i=t._cipher.encryptBlock(t._prev)[0]^e;return t._prev=r.concat([t._prev.slice(1),r.from([n?e:i])]),i}e.encrypt=function(t,e,n){for(var o=e.length,a=r.allocUnsafe(o),u=-1;++u<o;)a[u]=i(t,e[u],n);return a}},function(t,e,n){var r=n(3).Buffer;function i(t,e,n){for(var r,i,a=-1,u=0;++a<8;)r=e&1<<7-a?128:0,u+=(128&(i=t._cipher.encryptBlock(t._prev)[0]^r))>>a%8,t._prev=o(t._prev,n?r:i);return u}function o(t,e){var n=t.length,i=-1,o=r.allocUnsafe(t.length);for(t=r.concat([t,r.from([e])]);++i<n;)o[i]=t[i]<<1|t[i+1]>>7;return o}e.encrypt=function(t,e,n){for(var o=e.length,a=r.allocUnsafe(o),u=-1;++u<o;)a[u]=i(t,e[u],n);return a}},function(t,e,n){(function(t){var r=n(135);function i(t){return t._prev=t._cipher.encryptBlock(t._prev),t._prev}e.encrypt=function(e,n){for(;e._cache.length<n.length;)e._cache=t.concat([e._cache,i(e)]);var o=e._cache.slice(0,n.length);return e._cache=e._cache.slice(n.length),r(n,o)}}).call(this,n(18).Buffer)},function(t,e,n){var r=n(3).Buffer,i=r.alloc(16,0);function o(t){var e=r.allocUnsafe(16);return e.writeUInt32BE(t[0]>>>0,0),e.writeUInt32BE(t[1]>>>0,4),e.writeUInt32BE(t[2]>>>0,8),e.writeUInt32BE(t[3]>>>0,12),e}function a(t){this.h=t,this.state=r.alloc(16,0),this.cache=r.allocUnsafe(0)}a.prototype.ghash=function(t){for(var e=-1;++e<t.length;)this.state[e]^=t[e];this._multiply()},a.prototype._multiply=function(){for(var t,e,n,r=[(t=this.h).readUInt32BE(0),t.readUInt32BE(4),t.readUInt32BE(8),t.readUInt32BE(12)],i=[0,0,0,0],a=-1;++a<128;){for(0!=(this.state[~~(a/8)]&1<<7-a%8)&&(i[0]^=r[0],i[1]^=r[1],i[2]^=r[2],i[3]^=r[3]),n=0!=(1&r[3]),e=3;e>0;e--)r[e]=r[e]>>>1|(1&r[e-1])<<31;r[0]=r[0]>>>1,n&&(r[0]=r[0]^225<<24)}this.state=o(i)},a.prototype.update=function(t){var e;for(this.cache=r.concat([this.cache,t]);this.cache.length>=16;)e=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(e)},a.prototype.final=function(t,e){return this.cache.length&&this.ghash(r.concat([this.cache,i],16)),this.ghash(o([0,t,0,e])),this.state},t.exports=a},function(t,e,n){var r=n(428),i=n(3).Buffer,o=n(275),a=n(429),u=n(65),s=n(181),c=n(182);function f(t,e,n){u.call(this),this._cache=new l,this._last=void 0,this._cipher=new s.AES(e),this._prev=i.from(n),this._mode=t,this._autopadding=!0}function l(){this.cache=i.allocUnsafe(0)}function h(t,e,n){var u=o[t.toLowerCase()];if(!u)throw new TypeError("invalid suite type");if("string"==typeof n&&(n=i.from(n)),"GCM"!==u.mode&&n.length!==u.iv)throw new TypeError("invalid iv length "+n.length);if("string"==typeof e&&(e=i.from(e)),e.length!==u.key/8)throw new TypeError("invalid key length "+e.length);return"stream"===u.type?new a(u.module,e,n,!0):"auth"===u.type?new r(u.module,e,n,!0):new f(u.module,e,n)}n(2)(f,u),f.prototype._update=function(t){var e,n;this._cache.add(t);for(var r=[];e=this._cache.get(this._autopadding);)n=this._mode.decrypt(this,e),r.push(n);return i.concat(r)},f.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return function(t){var e=t[15];if(e<1||e>16)throw new Error("unable to decrypt data");var n=-1;for(;++n<e;)if(t[n+(16-e)]!==e)throw new Error("unable to decrypt data");if(16===e)return;return t.slice(0,16-e)}(this._mode.decrypt(this,t));if(t)throw new Error("data not multiple of block length")},f.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this},l.prototype.add=function(t){this.cache=i.concat([this.cache,t])},l.prototype.get=function(t){var e;if(t){if(this.cache.length>16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e}else if(this.cache.length>=16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e;return null},l.prototype.flush=function(){if(this.cache.length)return this.cache},e.createDecipher=function(t,e){var n=o[t.toLowerCase()];if(!n)throw new TypeError("invalid suite type");var r=c(e,!1,n.key,n.iv);return h(t,r.key,r.iv)},e.createDecipheriv=h},function(t,e){e["des-ecb"]={key:8,iv:0},e["des-cbc"]=e.des={key:8,iv:8},e["des-ede3-cbc"]=e.des3={key:24,iv:8},e["des-ede3"]={key:24,iv:0},e["des-ede-cbc"]={key:16,iv:8},e["des-ede"]={key:16,iv:0}},function(t,e,n){(function(t){var r=n(430),i=n(851),o=n(852);var a={binary:!0,hex:!0,base64:!0};e.DiffieHellmanGroup=e.createDiffieHellmanGroup=e.getDiffieHellman=function(e){var n=new t(i[e].prime,"hex"),r=new t(i[e].gen,"hex");return new o(n,r)},e.createDiffieHellman=e.DiffieHellman=function e(n,i,u,s){return t.isBuffer(i)||void 0===a[i]?e(n,"binary",i,u):(i=i||"binary",s=s||"binary",u=u||new t([2]),t.isBuffer(u)||(u=new t(u,s)),"number"==typeof n?new o(r(n,u),u,!0):(t.isBuffer(n)||(n=new t(n,i)),new o(n,u,!0)))}}).call(this,n(18).Buffer)},function(t,e){},function(t,e){},function(t){t.exports=JSON.parse('{"modp1":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},"modp2":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},"modp5":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},"modp14":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},"modp15":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},"modp16":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},"modp17":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},"modp18":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}')},function(t,e,n){(function(e){var r=n(12),i=new(n(431)),o=new r(24),a=new r(11),u=new r(10),s=new r(3),c=new r(7),f=n(430),l=n(100);function h(t,n){return n=n||"utf8",e.isBuffer(t)||(t=new e(t,n)),this._pub=new r(t),this}function d(t,n){return n=n||"utf8",e.isBuffer(t)||(t=new e(t,n)),this._priv=new r(t),this}t.exports=g;var p={};function g(t,e,n){this.setGenerator(e),this.__prime=new r(t),this._prime=r.mont(this.__prime),this._primeLen=t.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,n?(this.setPublicKey=h,this.setPrivateKey=d):this._primeCode=8}function y(t,n){var r=new e(t.toArray());return n?r.toString(n):r}Object.defineProperty(g.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!=typeof this._primeCode&&(this._primeCode=function(t,e){var n=e.toString("hex"),r=[n,t.toString(16)].join("_");if(r in p)return p[r];var l,h=0;if(t.isEven()||!f.simpleSieve||!f.fermatTest(t)||!i.test(t))return h+=1,h+="02"===n||"05"===n?8:4,p[r]=h,h;switch(i.test(t.shrn(1))||(h+=2),n){case"02":t.mod(o).cmp(a)&&(h+=8);break;case"05":(l=t.mod(u)).cmp(s)&&l.cmp(c)&&(h+=8);break;default:h+=4}return p[r]=h,h}(this.__prime,this.__gen)),this._primeCode}}),g.prototype.generateKeys=function(){return this._priv||(this._priv=new r(l(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},g.prototype.computeSecret=function(t){var n=(t=(t=new r(t)).toRed(this._prime)).redPow(this._priv).fromRed(),i=new e(n.toArray()),o=this.getPrime();if(i.length<o.length){var a=new e(o.length-i.length);a.fill(0),i=e.concat([a,i])}return i},g.prototype.getPublicKey=function(t){return y(this._pub,t)},g.prototype.getPrivateKey=function(t){return y(this._priv,t)},g.prototype.getPrime=function(t){return y(this.__prime,t)},g.prototype.getGenerator=function(t){return y(this._gen,t)},g.prototype.setGenerator=function(t,n){return n=n||"utf8",e.isBuffer(t)||(t=new e(t,n)),this.__gen=t,this._gen=new r(t),this}}).call(this,n(18).Buffer)},function(t,e,n){(function(e){var r=n(133),i=n(265),o=n(2),a=n(854),u=n(886),s=n(418);function c(t){i.Writable.call(this);var e=s[t];if(!e)throw new Error("Unknown message digest");this._hashType=e.hash,this._hash=r(e.hash),this._tag=e.id,this._signType=e.sign}function f(t){i.Writable.call(this);var e=s[t];if(!e)throw new Error("Unknown message digest");this._hash=r(e.hash),this._tag=e.id,this._signType=e.sign}function l(t){return new c(t)}function h(t){return new f(t)}Object.keys(s).forEach((function(t){s[t].id=new e(s[t].id,"hex"),s[t.toLowerCase()]=s[t]})),o(c,i.Writable),c.prototype._write=function(t,e,n){this._hash.update(t),n()},c.prototype.update=function(t,n){return"string"==typeof t&&(t=new e(t,n)),this._hash.update(t),this},c.prototype.sign=function(t,e){this.end();var n=this._hash.digest(),r=a(n,t,this._hashType,this._signType,this._tag);return e?r.toString(e):r},o(f,i.Writable),f.prototype._write=function(t,e,n){this._hash.update(t),n()},f.prototype.update=function(t,n){return"string"==typeof t&&(t=new e(t,n)),this._hash.update(t),this},f.prototype.verify=function(t,n,r){"string"==typeof n&&(n=new e(n,r)),this.end();var i=this._hash.digest();return u(n,i,t,this._signType,this._tag)},t.exports={Sign:l,Verify:h,createSign:l,createVerify:h}}).call(this,n(18).Buffer)},function(t,e,n){(function(e){var r=n(416),i=n(277),o=n(278).ec,a=n(12),u=n(184),s=n(441);function c(t,n,i,o){if((t=new e(t.toArray())).length<n.byteLength()){var a=new e(n.byteLength()-t.length);a.fill(0),t=e.concat([a,t])}var u=i.length,s=function(t,n){t=(t=f(t,n)).mod(n);var r=new e(t.toArray());if(r.length<n.byteLength()){var i=new e(n.byteLength()-r.length);i.fill(0),r=e.concat([i,r])}return r}(i,n),c=new e(u);c.fill(1);var l=new e(u);return l.fill(0),l=r(o,l).update(c).update(new e([0])).update(t).update(s).digest(),c=r(o,l).update(c).digest(),{k:l=r(o,l).update(c).update(new e([1])).update(t).update(s).digest(),v:c=r(o,l).update(c).digest()}}function f(t,e){var n=new a(t),r=(t.length<<3)-e.bitLength();return r>0&&n.ishrn(r),n}function l(t,n,i){var o,a;do{for(o=new e(0);8*o.length<t.bitLength();)n.v=r(i,n.k).update(n.v).digest(),o=e.concat([o,n.v]);a=f(o,t),n.k=r(i,n.k).update(n.v).update(new e([0])).digest(),n.v=r(i,n.k).update(n.v).digest()}while(-1!==a.cmp(t));return a}function h(t,e,n,r){return t.toRed(a.mont(n)).redPow(e).fromRed().mod(r)}t.exports=function(t,n,r,d,p){var g=u(n);if(g.curve){if("ecdsa"!==d&&"ecdsa/rsa"!==d)throw new Error("wrong private key type");return function(t,n){var r=s[n.curve.join(".")];if(!r)throw new Error("unknown curve "+n.curve.join("."));var i=new o(r).keyFromPrivate(n.privateKey).sign(t);return new e(i.toDER())}(t,g)}if("dsa"===g.type){if("dsa"!==d)throw new Error("wrong private key type");return function(t,n,r){var i,o=n.params.priv_key,u=n.params.p,s=n.params.q,d=n.params.g,p=new a(0),g=f(t,s).mod(s),y=!1,b=c(o,s,t,r);for(;!1===y;)i=l(s,b,r),p=h(d,i,u,s),0===(y=i.invm(s).imul(g.add(o.mul(p))).mod(s)).cmpn(0)&&(y=!1,p=new a(0));return function(t,n){t=t.toArray(),n=n.toArray(),128&t[0]&&(t=[0].concat(t));128&n[0]&&(n=[0].concat(n));var r=[48,t.length+n.length+4,2,t.length];return r=r.concat(t,[2,n.length],n),new e(r)}(p,y)}(t,g,r)}if("rsa"!==d&&"ecdsa/rsa"!==d)throw new Error("wrong private key type");t=e.concat([p,t]);for(var y=g.modulus.byteLength(),b=[0,1];t.length+b.length+1<y;)b.push(255);b.push(0);for(var v=-1;++v<t.length;)b.push(t[v]);return i(b,g)},t.exports.getKey=c,t.exports.makeKey=l}).call(this,n(18).Buffer)},function(t){t.exports=JSON.parse('{"_from":"elliptic@^6.0.0","_id":"elliptic@6.5.2","_inBundle":false,"_integrity":"sha512-f4x70okzZbIQl/NSRLkI/+tteV/9WqL98zx+SQ69KbXxmVrmjwsNUPn/gYJJ0sHvEak24cZgHIPegRePAtA/xw==","_location":"/elliptic","_phantomChildren":{},"_requested":{"type":"range","registry":true,"raw":"elliptic@^6.0.0","name":"elliptic","escapedName":"elliptic","rawSpec":"^6.0.0","saveSpec":null,"fetchSpec":"^6.0.0"},"_requiredBy":["/browserify-sign","/create-ecdh"],"_resolved":"https://registry.npmjs.org/elliptic/-/elliptic-6.5.2.tgz","_shasum":"05c5678d7173c049d8ca433552224a495d0e3762","_spec":"elliptic@^6.0.0","_where":"/Users/knuts/source/priv/atlantica/mermaid/node_modules/browserify-sign","author":{"name":"Fedor Indutny","email":"fedor@indutny.com"},"bugs":{"url":"https://github.com/indutny/elliptic/issues"},"bundleDependencies":false,"dependencies":{"bn.js":"^4.4.0","brorand":"^1.0.1","hash.js":"^1.0.0","hmac-drbg":"^1.0.0","inherits":"^2.0.1","minimalistic-assert":"^1.0.0","minimalistic-crypto-utils":"^1.0.0"},"deprecated":false,"description":"EC cryptography","devDependencies":{"brfs":"^1.4.3","coveralls":"^3.0.8","grunt":"^1.0.4","grunt-browserify":"^5.0.0","grunt-cli":"^1.2.0","grunt-contrib-connect":"^1.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^1.0.1","grunt-mocha-istanbul":"^3.0.1","grunt-saucelabs":"^9.0.1","istanbul":"^0.4.2","jscs":"^3.0.7","jshint":"^2.10.3","mocha":"^6.2.2"},"files":["lib"],"homepage":"https://github.com/indutny/elliptic","keywords":["EC","Elliptic","curve","Cryptography"],"license":"MIT","main":"lib/elliptic.js","name":"elliptic","repository":{"type":"git","url":"git+ssh://git@github.com/indutny/elliptic.git"},"scripts":{"jscs":"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js","jshint":"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js","lint":"npm run jscs && npm run jshint","test":"npm run lint && npm run unit","unit":"istanbul test _mocha --reporter=spec test/index.js","version":"grunt dist && git add dist/"},"version":"6.5.2"}')},function(t,e,n){"use strict";var r=n(33),i=n(12),o=n(2),a=n(183),u=r.assert;function s(t){a.call(this,"short",t),this.a=new i(t.a,16).toRed(this.red),this.b=new i(t.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(t),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function c(t,e,n,r){a.BasePoint.call(this,t,"affine"),null===e&&null===n?(this.x=null,this.y=null,this.inf=!0):(this.x=new i(e,16),this.y=new i(n,16),r&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function f(t,e,n,r){a.BasePoint.call(this,t,"jacobian"),null===e&&null===n&&null===r?(this.x=this.curve.one,this.y=this.curve.one,this.z=new i(0)):(this.x=new i(e,16),this.y=new i(n,16),this.z=new i(r,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}o(s,a),t.exports=s,s.prototype._getEndomorphism=function(t){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var e,n;if(t.beta)e=new i(t.beta,16).toRed(this.red);else{var r=this._getEndoRoots(this.p);e=(e=r[0].cmp(r[1])<0?r[0]:r[1]).toRed(this.red)}if(t.lambda)n=new i(t.lambda,16);else{var o=this._getEndoRoots(this.n);0===this.g.mul(o[0]).x.cmp(this.g.x.redMul(e))?n=o[0]:(n=o[1],u(0===this.g.mul(n).x.cmp(this.g.x.redMul(e))))}return{beta:e,lambda:n,basis:t.basis?t.basis.map((function(t){return{a:new i(t.a,16),b:new i(t.b,16)}})):this._getEndoBasis(n)}}},s.prototype._getEndoRoots=function(t){var e=t===this.p?this.red:i.mont(t),n=new i(2).toRed(e).redInvm(),r=n.redNeg(),o=new i(3).toRed(e).redNeg().redSqrt().redMul(n);return[r.redAdd(o).fromRed(),r.redSub(o).fromRed()]},s.prototype._getEndoBasis=function(t){for(var e,n,r,o,a,u,s,c,f,l=this.n.ushrn(Math.floor(this.n.bitLength()/2)),h=t,d=this.n.clone(),p=new i(1),g=new i(0),y=new i(0),b=new i(1),v=0;0!==h.cmpn(0);){var m=d.div(h);c=d.sub(m.mul(h)),f=y.sub(m.mul(p));var _=b.sub(m.mul(g));if(!r&&c.cmp(l)<0)e=s.neg(),n=p,r=c.neg(),o=f;else if(r&&2==++v)break;s=c,d=h,h=c,y=p,p=f,b=g,g=_}a=c.neg(),u=f;var w=r.sqr().add(o.sqr());return a.sqr().add(u.sqr()).cmp(w)>=0&&(a=e,u=n),r.negative&&(r=r.neg(),o=o.neg()),a.negative&&(a=a.neg(),u=u.neg()),[{a:r,b:o},{a:a,b:u}]},s.prototype._endoSplit=function(t){var e=this.endo.basis,n=e[0],r=e[1],i=r.b.mul(t).divRound(this.n),o=n.b.neg().mul(t).divRound(this.n),a=i.mul(n.a),u=o.mul(r.a),s=i.mul(n.b),c=o.mul(r.b);return{k1:t.sub(a).sub(u),k2:s.add(c).neg()}},s.prototype.pointFromX=function(t,e){(t=new i(t,16)).red||(t=t.toRed(this.red));var n=t.redSqr().redMul(t).redIAdd(t.redMul(this.a)).redIAdd(this.b),r=n.redSqrt();if(0!==r.redSqr().redSub(n).cmp(this.zero))throw new Error("invalid point");var o=r.fromRed().isOdd();return(e&&!o||!e&&o)&&(r=r.redNeg()),this.point(t,r)},s.prototype.validate=function(t){if(t.inf)return!0;var e=t.x,n=t.y,r=this.a.redMul(e),i=e.redSqr().redMul(e).redIAdd(r).redIAdd(this.b);return 0===n.redSqr().redISub(i).cmpn(0)},s.prototype._endoWnafMulAdd=function(t,e,n){for(var r=this._endoWnafT1,i=this._endoWnafT2,o=0;o<t.length;o++){var a=this._endoSplit(e[o]),u=t[o],s=u._getBeta();a.k1.negative&&(a.k1.ineg(),u=u.neg(!0)),a.k2.negative&&(a.k2.ineg(),s=s.neg(!0)),r[2*o]=u,r[2*o+1]=s,i[2*o]=a.k1,i[2*o+1]=a.k2}for(var c=this._wnafMulAdd(1,r,i,2*o,n),f=0;f<2*o;f++)r[f]=null,i[f]=null;return c},o(c,a.BasePoint),s.prototype.point=function(t,e,n){return new c(this,t,e,n)},s.prototype.pointFromJSON=function(t,e){return c.fromJSON(this,t,e)},c.prototype._getBeta=function(){if(this.curve.endo){var t=this.precomputed;if(t&&t.beta)return t.beta;var e=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(t){var n=this.curve,r=function(t){return n.point(t.x.redMul(n.endo.beta),t.y)};t.beta=e,e.precomputed={beta:null,naf:t.naf&&{wnd:t.naf.wnd,points:t.naf.points.map(r)},doubles:t.doubles&&{step:t.doubles.step,points:t.doubles.points.map(r)}}}return e}},c.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},c.fromJSON=function(t,e,n){"string"==typeof e&&(e=JSON.parse(e));var r=t.point(e[0],e[1],n);if(!e[2])return r;function i(e){return t.point(e[0],e[1],n)}var o=e[2];return r.precomputed={beta:null,doubles:o.doubles&&{step:o.doubles.step,points:[r].concat(o.doubles.points.map(i))},naf:o.naf&&{wnd:o.naf.wnd,points:[r].concat(o.naf.points.map(i))}},r},c.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},c.prototype.isInfinity=function(){return this.inf},c.prototype.add=function(t){if(this.inf)return t;if(t.inf)return this;if(this.eq(t))return this.dbl();if(this.neg().eq(t))return this.curve.point(null,null);if(0===this.x.cmp(t.x))return this.curve.point(null,null);var e=this.y.redSub(t.y);0!==e.cmpn(0)&&(e=e.redMul(this.x.redSub(t.x).redInvm()));var n=e.redSqr().redISub(this.x).redISub(t.x),r=e.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,r)},c.prototype.dbl=function(){if(this.inf)return this;var t=this.y.redAdd(this.y);if(0===t.cmpn(0))return this.curve.point(null,null);var e=this.curve.a,n=this.x.redSqr(),r=t.redInvm(),i=n.redAdd(n).redIAdd(n).redIAdd(e).redMul(r),o=i.redSqr().redISub(this.x.redAdd(this.x)),a=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,a)},c.prototype.getX=function(){return this.x.fromRed()},c.prototype.getY=function(){return this.y.fromRed()},c.prototype.mul=function(t){return t=new i(t,16),this.isInfinity()?this:this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve.endo?this.curve._endoWnafMulAdd([this],[t]):this.curve._wnafMul(this,t)},c.prototype.mulAdd=function(t,e,n){var r=[this,e],i=[t,n];return this.curve.endo?this.curve._endoWnafMulAdd(r,i):this.curve._wnafMulAdd(1,r,i,2)},c.prototype.jmulAdd=function(t,e,n){var r=[this,e],i=[t,n];return this.curve.endo?this.curve._endoWnafMulAdd(r,i,!0):this.curve._wnafMulAdd(1,r,i,2,!0)},c.prototype.eq=function(t){return this===t||this.inf===t.inf&&(this.inf||0===this.x.cmp(t.x)&&0===this.y.cmp(t.y))},c.prototype.neg=function(t){if(this.inf)return this;var e=this.curve.point(this.x,this.y.redNeg());if(t&&this.precomputed){var n=this.precomputed,r=function(t){return t.neg()};e.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(r)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(r)}}}return e},c.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},o(f,a.BasePoint),s.prototype.jpoint=function(t,e,n){return new f(this,t,e,n)},f.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var t=this.z.redInvm(),e=t.redSqr(),n=this.x.redMul(e),r=this.y.redMul(e).redMul(t);return this.curve.point(n,r)},f.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},f.prototype.add=function(t){if(this.isInfinity())return t;if(t.isInfinity())return this;var e=t.z.redSqr(),n=this.z.redSqr(),r=this.x.redMul(e),i=t.x.redMul(n),o=this.y.redMul(e.redMul(t.z)),a=t.y.redMul(n.redMul(this.z)),u=r.redSub(i),s=o.redSub(a);if(0===u.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=u.redSqr(),f=c.redMul(u),l=r.redMul(c),h=s.redSqr().redIAdd(f).redISub(l).redISub(l),d=s.redMul(l.redISub(h)).redISub(o.redMul(f)),p=this.z.redMul(t.z).redMul(u);return this.curve.jpoint(h,d,p)},f.prototype.mixedAdd=function(t){if(this.isInfinity())return t.toJ();if(t.isInfinity())return this;var e=this.z.redSqr(),n=this.x,r=t.x.redMul(e),i=this.y,o=t.y.redMul(e).redMul(this.z),a=n.redSub(r),u=i.redSub(o);if(0===a.cmpn(0))return 0!==u.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var s=a.redSqr(),c=s.redMul(a),f=n.redMul(s),l=u.redSqr().redIAdd(c).redISub(f).redISub(f),h=u.redMul(f.redISub(l)).redISub(i.redMul(c)),d=this.z.redMul(a);return this.curve.jpoint(l,h,d)},f.prototype.dblp=function(t){if(0===t)return this;if(this.isInfinity())return this;if(!t)return this.dbl();if(this.curve.zeroA||this.curve.threeA){for(var e=this,n=0;n<t;n++)e=e.dbl();return e}var r=this.curve.a,i=this.curve.tinv,o=this.x,a=this.y,u=this.z,s=u.redSqr().redSqr(),c=a.redAdd(a);for(n=0;n<t;n++){var f=o.redSqr(),l=c.redSqr(),h=l.redSqr(),d=f.redAdd(f).redIAdd(f).redIAdd(r.redMul(s)),p=o.redMul(l),g=d.redSqr().redISub(p.redAdd(p)),y=p.redISub(g),b=d.redMul(y);b=b.redIAdd(b).redISub(h);var v=c.redMul(u);n+1<t&&(s=s.redMul(h)),o=g,u=v,c=b}return this.curve.jpoint(o,c.redMul(i),u)},f.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},f.prototype._zeroDbl=function(){var t,e,n;if(this.zOne){var r=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),a=this.x.redAdd(i).redSqr().redISub(r).redISub(o);a=a.redIAdd(a);var u=r.redAdd(r).redIAdd(r),s=u.redSqr().redISub(a).redISub(a),c=o.redIAdd(o);c=(c=c.redIAdd(c)).redIAdd(c),t=s,e=u.redMul(a.redISub(s)).redISub(c),n=this.y.redAdd(this.y)}else{var f=this.x.redSqr(),l=this.y.redSqr(),h=l.redSqr(),d=this.x.redAdd(l).redSqr().redISub(f).redISub(h);d=d.redIAdd(d);var p=f.redAdd(f).redIAdd(f),g=p.redSqr(),y=h.redIAdd(h);y=(y=y.redIAdd(y)).redIAdd(y),t=g.redISub(d).redISub(d),e=p.redMul(d.redISub(t)).redISub(y),n=(n=this.y.redMul(this.z)).redIAdd(n)}return this.curve.jpoint(t,e,n)},f.prototype._threeDbl=function(){var t,e,n;if(this.zOne){var r=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),a=this.x.redAdd(i).redSqr().redISub(r).redISub(o);a=a.redIAdd(a);var u=r.redAdd(r).redIAdd(r).redIAdd(this.curve.a),s=u.redSqr().redISub(a).redISub(a);t=s;var c=o.redIAdd(o);c=(c=c.redIAdd(c)).redIAdd(c),e=u.redMul(a.redISub(s)).redISub(c),n=this.y.redAdd(this.y)}else{var f=this.z.redSqr(),l=this.y.redSqr(),h=this.x.redMul(l),d=this.x.redSub(f).redMul(this.x.redAdd(f));d=d.redAdd(d).redIAdd(d);var p=h.redIAdd(h),g=(p=p.redIAdd(p)).redAdd(p);t=d.redSqr().redISub(g),n=this.y.redAdd(this.z).redSqr().redISub(l).redISub(f);var y=l.redSqr();y=(y=(y=y.redIAdd(y)).redIAdd(y)).redIAdd(y),e=d.redMul(p.redISub(t)).redISub(y)}return this.curve.jpoint(t,e,n)},f.prototype._dbl=function(){var t=this.curve.a,e=this.x,n=this.y,r=this.z,i=r.redSqr().redSqr(),o=e.redSqr(),a=n.redSqr(),u=o.redAdd(o).redIAdd(o).redIAdd(t.redMul(i)),s=e.redAdd(e),c=(s=s.redIAdd(s)).redMul(a),f=u.redSqr().redISub(c.redAdd(c)),l=c.redISub(f),h=a.redSqr();h=(h=(h=h.redIAdd(h)).redIAdd(h)).redIAdd(h);var d=u.redMul(l).redISub(h),p=n.redAdd(n).redMul(r);return this.curve.jpoint(f,d,p)},f.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var t=this.x.redSqr(),e=this.y.redSqr(),n=this.z.redSqr(),r=e.redSqr(),i=t.redAdd(t).redIAdd(t),o=i.redSqr(),a=this.x.redAdd(e).redSqr().redISub(t).redISub(r),u=(a=(a=(a=a.redIAdd(a)).redAdd(a).redIAdd(a)).redISub(o)).redSqr(),s=r.redIAdd(r);s=(s=(s=s.redIAdd(s)).redIAdd(s)).redIAdd(s);var c=i.redIAdd(a).redSqr().redISub(o).redISub(u).redISub(s),f=e.redMul(c);f=(f=f.redIAdd(f)).redIAdd(f);var l=this.x.redMul(u).redISub(f);l=(l=l.redIAdd(l)).redIAdd(l);var h=this.y.redMul(c.redMul(s.redISub(c)).redISub(a.redMul(u)));h=(h=(h=h.redIAdd(h)).redIAdd(h)).redIAdd(h);var d=this.z.redAdd(a).redSqr().redISub(n).redISub(u);return this.curve.jpoint(l,h,d)},f.prototype.mul=function(t,e){return t=new i(t,e),this.curve._wnafMul(this,t)},f.prototype.eq=function(t){if("affine"===t.type)return this.eq(t.toJ());if(this===t)return!0;var e=this.z.redSqr(),n=t.z.redSqr();if(0!==this.x.redMul(n).redISub(t.x.redMul(e)).cmpn(0))return!1;var r=e.redMul(this.z),i=n.redMul(t.z);return 0===this.y.redMul(i).redISub(t.y.redMul(r)).cmpn(0)},f.prototype.eqXToP=function(t){var e=this.z.redSqr(),n=t.toRed(this.curve.red).redMul(e);if(0===this.x.cmp(n))return!0;for(var r=t.clone(),i=this.curve.redN.redMul(e);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(n.redIAdd(i),0===this.x.cmp(n))return!0}},f.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},f.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},function(t,e,n){"use strict";var r=n(12),i=n(2),o=n(183),a=n(33);function u(t){o.call(this,"mont",t),this.a=new r(t.a,16).toRed(this.red),this.b=new r(t.b,16).toRed(this.red),this.i4=new r(4).toRed(this.red).redInvm(),this.two=new r(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function s(t,e,n){o.BasePoint.call(this,t,"projective"),null===e&&null===n?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new r(e,16),this.z=new r(n,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}i(u,o),t.exports=u,u.prototype.validate=function(t){var e=t.normalize().x,n=e.redSqr(),r=n.redMul(e).redAdd(n.redMul(this.a)).redAdd(e);return 0===r.redSqrt().redSqr().cmp(r)},i(s,o.BasePoint),u.prototype.decodePoint=function(t,e){return this.point(a.toArray(t,e),1)},u.prototype.point=function(t,e){return new s(this,t,e)},u.prototype.pointFromJSON=function(t){return s.fromJSON(this,t)},s.prototype.precompute=function(){},s.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},s.fromJSON=function(t,e){return new s(t,e[0],e[1]||t.one)},s.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},s.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},s.prototype.dbl=function(){var t=this.x.redAdd(this.z).redSqr(),e=this.x.redSub(this.z).redSqr(),n=t.redSub(e),r=t.redMul(e),i=n.redMul(e.redAdd(this.curve.a24.redMul(n)));return this.curve.point(r,i)},s.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},s.prototype.diffAdd=function(t,e){var n=this.x.redAdd(this.z),r=this.x.redSub(this.z),i=t.x.redAdd(t.z),o=t.x.redSub(t.z).redMul(n),a=i.redMul(r),u=e.z.redMul(o.redAdd(a).redSqr()),s=e.x.redMul(o.redISub(a).redSqr());return this.curve.point(u,s)},s.prototype.mul=function(t){for(var e=t.clone(),n=this,r=this.curve.point(null,null),i=[];0!==e.cmpn(0);e.iushrn(1))i.push(e.andln(1));for(var o=i.length-1;o>=0;o--)0===i[o]?(n=n.diffAdd(r,this),r=r.dbl()):(r=n.diffAdd(r,this),n=n.dbl());return r},s.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},s.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},s.prototype.eq=function(t){return 0===this.getX().cmp(t.getX())},s.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},s.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},function(t,e,n){"use strict";var r=n(33),i=n(12),o=n(2),a=n(183),u=r.assert;function s(t){this.twisted=1!=(0|t.a),this.mOneA=this.twisted&&-1==(0|t.a),this.extended=this.mOneA,a.call(this,"edwards",t),this.a=new i(t.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new i(t.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new i(t.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),u(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|t.c)}function c(t,e,n,r,o){a.BasePoint.call(this,t,"projective"),null===e&&null===n&&null===r?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new i(e,16),this.y=new i(n,16),this.z=r?new i(r,16):this.curve.one,this.t=o&&new i(o,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}o(s,a),t.exports=s,s.prototype._mulA=function(t){return this.mOneA?t.redNeg():this.a.redMul(t)},s.prototype._mulC=function(t){return this.oneC?t:this.c.redMul(t)},s.prototype.jpoint=function(t,e,n,r){return this.point(t,e,n,r)},s.prototype.pointFromX=function(t,e){(t=new i(t,16)).red||(t=t.toRed(this.red));var n=t.redSqr(),r=this.c2.redSub(this.a.redMul(n)),o=this.one.redSub(this.c2.redMul(this.d).redMul(n)),a=r.redMul(o.redInvm()),u=a.redSqrt();if(0!==u.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");var s=u.fromRed().isOdd();return(e&&!s||!e&&s)&&(u=u.redNeg()),this.point(t,u)},s.prototype.pointFromY=function(t,e){(t=new i(t,16)).red||(t=t.toRed(this.red));var n=t.redSqr(),r=n.redSub(this.c2),o=n.redMul(this.d).redMul(this.c2).redSub(this.a),a=r.redMul(o.redInvm());if(0===a.cmp(this.zero)){if(e)throw new Error("invalid point");return this.point(this.zero,t)}var u=a.redSqrt();if(0!==u.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");return u.fromRed().isOdd()!==e&&(u=u.redNeg()),this.point(u,t)},s.prototype.validate=function(t){if(t.isInfinity())return!0;t.normalize();var e=t.x.redSqr(),n=t.y.redSqr(),r=e.redMul(this.a).redAdd(n),i=this.c2.redMul(this.one.redAdd(this.d.redMul(e).redMul(n)));return 0===r.cmp(i)},o(c,a.BasePoint),s.prototype.pointFromJSON=function(t){return c.fromJSON(this,t)},s.prototype.point=function(t,e,n,r){return new c(this,t,e,n,r)},c.fromJSON=function(t,e){return new c(t,e[0],e[1],e[2])},c.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},c.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},c.prototype._extDbl=function(){var t=this.x.redSqr(),e=this.y.redSqr(),n=this.z.redSqr();n=n.redIAdd(n);var r=this.curve._mulA(t),i=this.x.redAdd(this.y).redSqr().redISub(t).redISub(e),o=r.redAdd(e),a=o.redSub(n),u=r.redSub(e),s=i.redMul(a),c=o.redMul(u),f=i.redMul(u),l=a.redMul(o);return this.curve.point(s,c,l,f)},c.prototype._projDbl=function(){var t,e,n,r=this.x.redAdd(this.y).redSqr(),i=this.x.redSqr(),o=this.y.redSqr();if(this.curve.twisted){var a=(c=this.curve._mulA(i)).redAdd(o);if(this.zOne)t=r.redSub(i).redSub(o).redMul(a.redSub(this.curve.two)),e=a.redMul(c.redSub(o)),n=a.redSqr().redSub(a).redSub(a);else{var u=this.z.redSqr(),s=a.redSub(u).redISub(u);t=r.redSub(i).redISub(o).redMul(s),e=a.redMul(c.redSub(o)),n=a.redMul(s)}}else{var c=i.redAdd(o);u=this.curve._mulC(this.z).redSqr(),s=c.redSub(u).redSub(u);t=this.curve._mulC(r.redISub(c)).redMul(s),e=this.curve._mulC(c).redMul(i.redISub(o)),n=c.redMul(s)}return this.curve.point(t,e,n)},c.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},c.prototype._extAdd=function(t){var e=this.y.redSub(this.x).redMul(t.y.redSub(t.x)),n=this.y.redAdd(this.x).redMul(t.y.redAdd(t.x)),r=this.t.redMul(this.curve.dd).redMul(t.t),i=this.z.redMul(t.z.redAdd(t.z)),o=n.redSub(e),a=i.redSub(r),u=i.redAdd(r),s=n.redAdd(e),c=o.redMul(a),f=u.redMul(s),l=o.redMul(s),h=a.redMul(u);return this.curve.point(c,f,h,l)},c.prototype._projAdd=function(t){var e,n,r=this.z.redMul(t.z),i=r.redSqr(),o=this.x.redMul(t.x),a=this.y.redMul(t.y),u=this.curve.d.redMul(o).redMul(a),s=i.redSub(u),c=i.redAdd(u),f=this.x.redAdd(this.y).redMul(t.x.redAdd(t.y)).redISub(o).redISub(a),l=r.redMul(s).redMul(f);return this.curve.twisted?(e=r.redMul(c).redMul(a.redSub(this.curve._mulA(o))),n=s.redMul(c)):(e=r.redMul(c).redMul(a.redSub(o)),n=this.curve._mulC(s).redMul(c)),this.curve.point(l,e,n)},c.prototype.add=function(t){return this.isInfinity()?t:t.isInfinity()?this:this.curve.extended?this._extAdd(t):this._projAdd(t)},c.prototype.mul=function(t){return this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve._wnafMul(this,t)},c.prototype.mulAdd=function(t,e,n){return this.curve._wnafMulAdd(1,[this,e],[t,n],2,!1)},c.prototype.jmulAdd=function(t,e,n){return this.curve._wnafMulAdd(1,[this,e],[t,n],2,!0)},c.prototype.normalize=function(){if(this.zOne)return this;var t=this.z.redInvm();return this.x=this.x.redMul(t),this.y=this.y.redMul(t),this.t&&(this.t=this.t.redMul(t)),this.z=this.curve.one,this.zOne=!0,this},c.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},c.prototype.getX=function(){return this.normalize(),this.x.fromRed()},c.prototype.getY=function(){return this.normalize(),this.y.fromRed()},c.prototype.eq=function(t){return this===t||0===this.getX().cmp(t.getX())&&0===this.getY().cmp(t.getY())},c.prototype.eqXToP=function(t){var e=t.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(e))return!0;for(var n=t.clone(),r=this.curve.redN.redMul(this.z);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(e.redIAdd(r),0===this.x.cmp(e))return!0}},c.prototype.toP=c.prototype.normalize,c.prototype.mixedAdd=c.prototype.add},function(t,e,n){"use strict";e.sha1=n(860),e.sha224=n(861),e.sha256=n(435),e.sha384=n(862),e.sha512=n(436)},function(t,e,n){"use strict";var r=n(45),i=n(136),o=n(434),a=r.rotl32,u=r.sum32,s=r.sum32_5,c=o.ft_1,f=i.BlockHash,l=[1518500249,1859775393,2400959708,3395469782];function h(){if(!(this instanceof h))return new h;f.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}r.inherits(h,f),t.exports=h,h.blockSize=512,h.outSize=160,h.hmacStrength=80,h.padLength=64,h.prototype._update=function(t,e){for(var n=this.W,r=0;r<16;r++)n[r]=t[e+r];for(;r<n.length;r++)n[r]=a(n[r-3]^n[r-8]^n[r-14]^n[r-16],1);var i=this.h[0],o=this.h[1],f=this.h[2],h=this.h[3],d=this.h[4];for(r=0;r<n.length;r++){var p=~~(r/20),g=s(a(i,5),c(p,o,f,h),d,n[r],l[p]);d=h,h=f,f=a(o,30),o=i,i=g}this.h[0]=u(this.h[0],i),this.h[1]=u(this.h[1],o),this.h[2]=u(this.h[2],f),this.h[3]=u(this.h[3],h),this.h[4]=u(this.h[4],d)},h.prototype._digest=function(t){return"hex"===t?r.toHex32(this.h,"big"):r.split32(this.h,"big")}},function(t,e,n){"use strict";var r=n(45),i=n(435);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}r.inherits(o,i),t.exports=o,o.blockSize=512,o.outSize=224,o.hmacStrength=192,o.padLength=64,o.prototype._digest=function(t){return"hex"===t?r.toHex32(this.h.slice(0,7),"big"):r.split32(this.h.slice(0,7),"big")}},function(t,e,n){"use strict";var r=n(45),i=n(436);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}r.inherits(o,i),t.exports=o,o.blockSize=1024,o.outSize=384,o.hmacStrength=192,o.padLength=128,o.prototype._digest=function(t){return"hex"===t?r.toHex32(this.h.slice(0,12),"big"):r.split32(this.h.slice(0,12),"big")}},function(t,e,n){"use strict";var r=n(45),i=n(136),o=r.rotl32,a=r.sum32,u=r.sum32_3,s=r.sum32_4,c=i.BlockHash;function f(){if(!(this instanceof f))return new f;c.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function l(t,e,n,r){return t<=15?e^n^r:t<=31?e&n|~e&r:t<=47?(e|~n)^r:t<=63?e&r|n&~r:e^(n|~r)}function h(t){return t<=15?0:t<=31?1518500249:t<=47?1859775393:t<=63?2400959708:2840853838}function d(t){return t<=15?1352829926:t<=31?1548603684:t<=47?1836072691:t<=63?2053994217:0}r.inherits(f,c),e.ripemd160=f,f.blockSize=512,f.outSize=160,f.hmacStrength=192,f.padLength=64,f.prototype._update=function(t,e){for(var n=this.h[0],r=this.h[1],i=this.h[2],c=this.h[3],f=this.h[4],v=n,m=r,_=i,w=c,x=f,k=0;k<80;k++){var E=a(o(s(n,l(k,r,i,c),t[p[k]+e],h(k)),y[k]),f);n=f,f=c,c=o(i,10),i=r,r=E,E=a(o(s(v,l(79-k,m,_,w),t[g[k]+e],d(k)),b[k]),x),v=x,x=w,w=o(_,10),_=m,m=E}E=u(this.h[1],i,w),this.h[1]=u(this.h[2],c,x),this.h[2]=u(this.h[3],f,v),this.h[3]=u(this.h[4],n,m),this.h[4]=u(this.h[0],r,_),this.h[0]=E},f.prototype._digest=function(t){return"hex"===t?r.toHex32(this.h,"little"):r.split32(this.h,"little")};var p=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],g=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],y=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],b=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]},function(t,e,n){"use strict";var r=n(45),i=n(32);function o(t,e,n){if(!(this instanceof o))return new o(t,e,n);this.Hash=t,this.blockSize=t.blockSize/8,this.outSize=t.outSize/8,this.inner=null,this.outer=null,this._init(r.toArray(e,n))}t.exports=o,o.prototype._init=function(t){t.length>this.blockSize&&(t=(new this.Hash).update(t).digest()),i(t.length<=this.blockSize);for(var e=t.length;e<this.blockSize;e++)t.push(0);for(e=0;e<t.length;e++)t[e]^=54;for(this.inner=(new this.Hash).update(t),e=0;e<t.length;e++)t[e]^=106;this.outer=(new this.Hash).update(t)},o.prototype.update=function(t,e){return this.inner.update(t,e),this},o.prototype.digest=function(t){return this.outer.update(this.inner.digest()),this.outer.digest(t)}},function(t,e){t.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}},function(t,e,n){"use strict";var r=n(12),i=n(867),o=n(33),a=n(279),u=n(276),s=o.assert,c=n(868),f=n(869);function l(t){if(!(this instanceof l))return new l(t);"string"==typeof t&&(s(a.hasOwnProperty(t),"Unknown curve "+t),t=a[t]),t instanceof a.PresetCurve&&(t={curve:t}),this.curve=t.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=t.curve.g,this.g.precompute(t.curve.n.bitLength()+1),this.hash=t.hash||t.curve.hash}t.exports=l,l.prototype.keyPair=function(t){return new c(this,t)},l.prototype.keyFromPrivate=function(t,e){return c.fromPrivate(this,t,e)},l.prototype.keyFromPublic=function(t,e){return c.fromPublic(this,t,e)},l.prototype.genKeyPair=function(t){t||(t={});for(var e=new i({hash:this.hash,pers:t.pers,persEnc:t.persEnc||"utf8",entropy:t.entropy||u(this.hash.hmacStrength),entropyEnc:t.entropy&&t.entropyEnc||"utf8",nonce:this.n.toArray()}),n=this.n.byteLength(),o=this.n.sub(new r(2));;){var a=new r(e.generate(n));if(!(a.cmp(o)>0))return a.iaddn(1),this.keyFromPrivate(a)}},l.prototype._truncateToN=function(t,e){var n=8*t.byteLength()-this.n.bitLength();return n>0&&(t=t.ushrn(n)),!e&&t.cmp(this.n)>=0?t.sub(this.n):t},l.prototype.sign=function(t,e,n,o){"object"==typeof n&&(o=n,n=null),o||(o={}),e=this.keyFromPrivate(e,n),t=this._truncateToN(new r(t,16));for(var a=this.n.byteLength(),u=e.getPrivate().toArray("be",a),s=t.toArray("be",a),c=new i({hash:this.hash,entropy:u,nonce:s,pers:o.pers,persEnc:o.persEnc||"utf8"}),l=this.n.sub(new r(1)),h=0;;h++){var d=o.k?o.k(h):new r(c.generate(this.n.byteLength()));if(!((d=this._truncateToN(d,!0)).cmpn(1)<=0||d.cmp(l)>=0)){var p=this.g.mul(d);if(!p.isInfinity()){var g=p.getX(),y=g.umod(this.n);if(0!==y.cmpn(0)){var b=d.invm(this.n).mul(y.mul(e.getPrivate()).iadd(t));if(0!==(b=b.umod(this.n)).cmpn(0)){var v=(p.getY().isOdd()?1:0)|(0!==g.cmp(y)?2:0);return o.canonical&&b.cmp(this.nh)>0&&(b=this.n.sub(b),v^=1),new f({r:y,s:b,recoveryParam:v})}}}}}},l.prototype.verify=function(t,e,n,i){t=this._truncateToN(new r(t,16)),n=this.keyFromPublic(n,i);var o=(e=new f(e,"hex")).r,a=e.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;var u,s=a.invm(this.n),c=s.mul(t).umod(this.n),l=s.mul(o).umod(this.n);return this.curve._maxwellTrick?!(u=this.g.jmulAdd(c,n.getPublic(),l)).isInfinity()&&u.eqXToP(o):!(u=this.g.mulAdd(c,n.getPublic(),l)).isInfinity()&&0===u.getX().umod(this.n).cmp(o)},l.prototype.recoverPubKey=function(t,e,n,i){s((3&n)===n,"The recovery param is more than two bits"),e=new f(e,i);var o=this.n,a=new r(t),u=e.r,c=e.s,l=1&n,h=n>>1;if(u.cmp(this.curve.p.umod(this.curve.n))>=0&&h)throw new Error("Unable to find sencond key candinate");u=h?this.curve.pointFromX(u.add(this.curve.n),l):this.curve.pointFromX(u,l);var d=e.r.invm(o),p=o.sub(a).mul(d).umod(o),g=c.mul(d).umod(o);return this.g.mulAdd(p,u,g)},l.prototype.getKeyRecoveryParam=function(t,e,n,r){if(null!==(e=new f(e,r)).recoveryParam)return e.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(t,e,i)}catch(t){continue}if(o.eq(n))return i}throw new Error("Unable to find valid recovery factor")}},function(t,e,n){"use strict";var r=n(280),i=n(432),o=n(32);function a(t){if(!(this instanceof a))return new a(t);this.hash=t.hash,this.predResist=!!t.predResist,this.outLen=this.hash.outSize,this.minEntropy=t.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=i.toArray(t.entropy,t.entropyEnc||"hex"),n=i.toArray(t.nonce,t.nonceEnc||"hex"),r=i.toArray(t.pers,t.persEnc||"hex");o(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,n,r)}t.exports=a,a.prototype._init=function(t,e,n){var r=t.concat(e).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i<this.V.length;i++)this.K[i]=0,this.V[i]=1;this._update(r),this._reseed=1,this.reseedInterval=281474976710656},a.prototype._hmac=function(){return new r.hmac(this.hash,this.K)},a.prototype._update=function(t){var e=this._hmac().update(this.V).update([0]);t&&(e=e.update(t)),this.K=e.digest(),this.V=this._hmac().update(this.V).digest(),t&&(this.K=this._hmac().update(this.V).update([1]).update(t).digest(),this.V=this._hmac().update(this.V).digest())},a.prototype.reseed=function(t,e,n,r){"string"!=typeof e&&(r=n,n=e,e=null),t=i.toArray(t,e),n=i.toArray(n,r),o(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(t.concat(n||[])),this._reseed=1},a.prototype.generate=function(t,e,n,r){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof e&&(r=n,n=e,e=null),n&&(n=i.toArray(n,r||"hex"),this._update(n));for(var o=[];o.length<t;)this.V=this._hmac().update(this.V).digest(),o=o.concat(this.V);var a=o.slice(0,t);return this._update(n),this._reseed++,i.encode(a,e)}},function(t,e,n){"use strict";var r=n(12),i=n(33).assert;function o(t,e){this.ec=t,this.priv=null,this.pub=null,e.priv&&this._importPrivate(e.priv,e.privEnc),e.pub&&this._importPublic(e.pub,e.pubEnc)}t.exports=o,o.fromPublic=function(t,e,n){return e instanceof o?e:new o(t,{pub:e,pubEnc:n})},o.fromPrivate=function(t,e,n){return e instanceof o?e:new o(t,{priv:e,privEnc:n})},o.prototype.validate=function(){var t=this.getPublic();return t.isInfinity()?{result:!1,reason:"Invalid public key"}:t.validate()?t.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},o.prototype.getPublic=function(t,e){return"string"==typeof t&&(e=t,t=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),e?this.pub.encode(e,t):this.pub},o.prototype.getPrivate=function(t){return"hex"===t?this.priv.toString(16,2):this.priv},o.prototype._importPrivate=function(t,e){this.priv=new r(t,e||16),this.priv=this.priv.umod(this.ec.curve.n)},o.prototype._importPublic=function(t,e){if(t.x||t.y)return"mont"===this.ec.curve.type?i(t.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||i(t.x&&t.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(t.x,t.y));this.pub=this.ec.curve.decodePoint(t,e)},o.prototype.derive=function(t){return t.mul(this.priv).getX()},o.prototype.sign=function(t,e,n){return this.ec.sign(t,this,e,n)},o.prototype.verify=function(t,e){return this.ec.verify(t,e,this)},o.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}},function(t,e,n){"use strict";var r=n(12),i=n(33),o=i.assert;function a(t,e){if(t instanceof a)return t;this._importDER(t,e)||(o(t.r&&t.s,"Signature without r or s"),this.r=new r(t.r,16),this.s=new r(t.s,16),void 0===t.recoveryParam?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}function u(){this.place=0}function s(t,e){var n=t[e.place++];if(!(128&n))return n;for(var r=15&n,i=0,o=0,a=e.place;o<r;o++,a++)i<<=8,i|=t[a];return e.place=a,i}function c(t){for(var e=0,n=t.length-1;!t[e]&&!(128&t[e+1])&&e<n;)e++;return 0===e?t:t.slice(e)}function f(t,e){if(e<128)t.push(e);else{var n=1+(Math.log(e)/Math.LN2>>>3);for(t.push(128|n);--n;)t.push(e>>>(n<<3)&255);t.push(e)}}t.exports=a,a.prototype._importDER=function(t,e){t=i.toArray(t,e);var n=new u;if(48!==t[n.place++])return!1;if(s(t,n)+n.place!==t.length)return!1;if(2!==t[n.place++])return!1;var o=s(t,n),a=t.slice(n.place,o+n.place);if(n.place+=o,2!==t[n.place++])return!1;var c=s(t,n);if(t.length!==c+n.place)return!1;var f=t.slice(n.place,c+n.place);return 0===a[0]&&128&a[1]&&(a=a.slice(1)),0===f[0]&&128&f[1]&&(f=f.slice(1)),this.r=new r(a),this.s=new r(f),this.recoveryParam=null,!0},a.prototype.toDER=function(t){var e=this.r.toArray(),n=this.s.toArray();for(128&e[0]&&(e=[0].concat(e)),128&n[0]&&(n=[0].concat(n)),e=c(e),n=c(n);!(n[0]||128&n[1]);)n=n.slice(1);var r=[2];f(r,e.length),(r=r.concat(e)).push(2),f(r,n.length);var o=r.concat(n),a=[48];return f(a,o.length),a=a.concat(o),i.encode(a,t)}},function(t,e,n){"use strict";var r=n(280),i=n(279),o=n(33),a=o.assert,u=o.parseBytes,s=n(871),c=n(872);function f(t){if(a("ed25519"===t,"only tested with ed25519 so far"),!(this instanceof f))return new f(t);t=i[t].curve;this.curve=t,this.g=t.g,this.g.precompute(t.n.bitLength()+1),this.pointClass=t.point().constructor,this.encodingLength=Math.ceil(t.n.bitLength()/8),this.hash=r.sha512}t.exports=f,f.prototype.sign=function(t,e){t=u(t);var n=this.keyFromSecret(e),r=this.hashInt(n.messagePrefix(),t),i=this.g.mul(r),o=this.encodePoint(i),a=this.hashInt(o,n.pubBytes(),t).mul(n.priv()),s=r.add(a).umod(this.curve.n);return this.makeSignature({R:i,S:s,Rencoded:o})},f.prototype.verify=function(t,e,n){t=u(t),e=this.makeSignature(e);var r=this.keyFromPublic(n),i=this.hashInt(e.Rencoded(),r.pubBytes(),t),o=this.g.mul(e.S());return e.R().add(r.pub().mul(i)).eq(o)},f.prototype.hashInt=function(){for(var t=this.hash(),e=0;e<arguments.length;e++)t.update(arguments[e]);return o.intFromLE(t.digest()).umod(this.curve.n)},f.prototype.keyFromPublic=function(t){return s.fromPublic(this,t)},f.prototype.keyFromSecret=function(t){return s.fromSecret(this,t)},f.prototype.makeSignature=function(t){return t instanceof c?t:new c(this,t)},f.prototype.encodePoint=function(t){var e=t.getY().toArray("le",this.encodingLength);return e[this.encodingLength-1]|=t.getX().isOdd()?128:0,e},f.prototype.decodePoint=function(t){var e=(t=o.parseBytes(t)).length-1,n=t.slice(0,e).concat(-129&t[e]),r=0!=(128&t[e]),i=o.intFromLE(n);return this.curve.pointFromY(i,r)},f.prototype.encodeInt=function(t){return t.toArray("le",this.encodingLength)},f.prototype.decodeInt=function(t){return o.intFromLE(t)},f.prototype.isPoint=function(t){return t instanceof this.pointClass}},function(t,e,n){"use strict";var r=n(33),i=r.assert,o=r.parseBytes,a=r.cachedProperty;function u(t,e){this.eddsa=t,this._secret=o(e.secret),t.isPoint(e.pub)?this._pub=e.pub:this._pubBytes=o(e.pub)}u.fromPublic=function(t,e){return e instanceof u?e:new u(t,{pub:e})},u.fromSecret=function(t,e){return e instanceof u?e:new u(t,{secret:e})},u.prototype.secret=function(){return this._secret},a(u,"pubBytes",(function(){return this.eddsa.encodePoint(this.pub())})),a(u,"pub",(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())})),a(u,"privBytes",(function(){var t=this.eddsa,e=this.hash(),n=t.encodingLength-1,r=e.slice(0,t.encodingLength);return r[0]&=248,r[n]&=127,r[n]|=64,r})),a(u,"priv",(function(){return this.eddsa.decodeInt(this.privBytes())})),a(u,"hash",(function(){return this.eddsa.hash().update(this.secret()).digest()})),a(u,"messagePrefix",(function(){return this.hash().slice(this.eddsa.encodingLength)})),u.prototype.sign=function(t){return i(this._secret,"KeyPair can only verify"),this.eddsa.sign(t,this)},u.prototype.verify=function(t,e){return this.eddsa.verify(t,e,this)},u.prototype.getSecret=function(t){return i(this._secret,"KeyPair is public only"),r.encode(this.secret(),t)},u.prototype.getPublic=function(t){return r.encode(this.pubBytes(),t)},t.exports=u},function(t,e,n){"use strict";var r=n(12),i=n(33),o=i.assert,a=i.cachedProperty,u=i.parseBytes;function s(t,e){this.eddsa=t,"object"!=typeof e&&(e=u(e)),Array.isArray(e)&&(e={R:e.slice(0,t.encodingLength),S:e.slice(t.encodingLength)}),o(e.R&&e.S,"Signature without R or S"),t.isPoint(e.R)&&(this._R=e.R),e.S instanceof r&&(this._S=e.S),this._Rencoded=Array.isArray(e.R)?e.R:e.Rencoded,this._Sencoded=Array.isArray(e.S)?e.S:e.Sencoded}a(s,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),a(s,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),a(s,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),a(s,"Sencoded",(function(){return this.eddsa.encodeInt(this.S())})),s.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},s.prototype.toHex=function(){return i.encode(this.toBytes(),"hex").toUpperCase()},t.exports=s},function(t,e,n){"use strict";var r=n(137);e.certificate=n(883);var i=r.define("RSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())}));e.RSAPrivateKey=i;var o=r.define("RSAPublicKey",(function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())}));e.RSAPublicKey=o;var a=r.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(u),this.key("subjectPublicKey").bitstr())}));e.PublicKey=a;var u=r.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())})),s=r.define("PrivateKeyInfo",(function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(u),this.key("subjectPrivateKey").octstr())}));e.PrivateKey=s;var c=r.define("EncryptedPrivateKeyInfo",(function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())}));e.EncryptedPrivateKey=c;var f=r.define("DSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())}));e.DSAPrivateKey=f,e.DSAparam=r.define("DSAparam",(function(){this.int()}));var l=r.define("ECPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(h),this.key("publicKey").optional().explicit(1).bitstr())}));e.ECPrivateKey=l;var h=r.define("ECParameters",(function(){this.choice({namedCurve:this.objid()})}));e.signature=r.define("signature",(function(){this.seq().obj(this.key("r").int(),this.key("s").int())}))},function(t,e,n){var r=n(137),i=n(2);function o(t,e){this.name=t,this.body=e,this.decoders={},this.encoders={}}e.define=function(t,e){return new o(t,e)},o.prototype._createNamed=function(t){var e;try{e=n(875).runInThisContext("(function "+this.name+"(entity) {\n this._initNamed(entity);\n})")}catch(t){e=function(t){this._initNamed(t)}}return i(e,t),e.prototype._initNamed=function(e){t.call(this,e)},new e(this)},o.prototype._getDecoder=function(t){return t=t||"der",this.decoders.hasOwnProperty(t)||(this.decoders[t]=this._createNamed(r.decoders[t])),this.decoders[t]},o.prototype.decode=function(t,e,n){return this._getDecoder(e).decode(t,n)},o.prototype._getEncoder=function(t){return t=t||"der",this.encoders.hasOwnProperty(t)||(this.encoders[t]=this._createNamed(r.encoders[t])),this.encoders[t]},o.prototype.encode=function(t,e,n){return this._getEncoder(e).encode(t,n)}},function(module,exports){var indexOf=function(t,e){if(t.indexOf)return t.indexOf(e);for(var n=0;n<t.length;n++)if(t[n]===e)return n;return-1},Object_keys=function(t){if(Object.keys)return Object.keys(t);var e=[];for(var n in t)e.push(n);return e},forEach=function(t,e){if(t.forEach)return t.forEach(e);for(var n=0;n<t.length;n++)e(t[n],n,t)},defineProp=function(){try{return Object.defineProperty({},"_",{}),function(t,e,n){Object.defineProperty(t,e,{writable:!0,enumerable:!1,configurable:!0,value:n})}}catch(t){return function(t,e,n){t[e]=n}}}(),globals=["Array","Boolean","Date","Error","EvalError","Function","Infinity","JSON","Math","NaN","Number","Object","RangeError","ReferenceError","RegExp","String","SyntaxError","TypeError","URIError","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","eval","isFinite","isNaN","parseFloat","parseInt","undefined","unescape"];function Context(){}Context.prototype={};var Script=exports.Script=function(t){if(!(this instanceof Script))return new Script(t);this.code=t};Script.prototype.runInContext=function(t){if(!(t instanceof Context))throw new TypeError("needs a 'context' argument.");var e=document.createElement("iframe");e.style||(e.style={}),e.style.display="none",document.body.appendChild(e);var n=e.contentWindow,r=n.eval,i=n.execScript;!r&&i&&(i.call(n,"null"),r=n.eval),forEach(Object_keys(t),(function(e){n[e]=t[e]})),forEach(globals,(function(e){t[e]&&(n[e]=t[e])}));var o=Object_keys(n),a=r.call(n,this.code);return forEach(Object_keys(n),(function(e){(e in t||-1===indexOf(o,e))&&(t[e]=n[e])})),forEach(globals,(function(e){e in t||defineProp(t,e,n[e])})),document.body.removeChild(e),a},Script.prototype.runInThisContext=function(){return eval(this.code)},Script.prototype.runInNewContext=function(t){var e=Script.createContext(t),n=this.runInContext(e);return t&&forEach(Object_keys(e),(function(n){t[n]=e[n]})),n},forEach(Object_keys(Script.prototype),(function(t){exports[t]=Script[t]=function(e){var n=Script(e);return n[t].apply(n,[].slice.call(arguments,1))}})),exports.isContext=function(t){return t instanceof Context},exports.createScript=function(t){return exports.Script(t)},exports.createContext=Script.createContext=function(t){var e=new Context;return"object"==typeof t&&forEach(Object_keys(t),(function(n){e[n]=t[n]})),e}},function(t,e,n){var r=n(2);function i(t){this._reporterState={obj:null,path:[],options:t||{},errors:[]}}function o(t,e){this.path=t,this.rethrow(e)}e.Reporter=i,i.prototype.isError=function(t){return t instanceof o},i.prototype.save=function(){var t=this._reporterState;return{obj:t.obj,pathLen:t.path.length}},i.prototype.restore=function(t){var e=this._reporterState;e.obj=t.obj,e.path=e.path.slice(0,t.pathLen)},i.prototype.enterKey=function(t){return this._reporterState.path.push(t)},i.prototype.exitKey=function(t){var e=this._reporterState;e.path=e.path.slice(0,t-1)},i.prototype.leaveKey=function(t,e,n){var r=this._reporterState;this.exitKey(t),null!==r.obj&&(r.obj[e]=n)},i.prototype.path=function(){return this._reporterState.path.join("/")},i.prototype.enterObject=function(){var t=this._reporterState,e=t.obj;return t.obj={},e},i.prototype.leaveObject=function(t){var e=this._reporterState,n=e.obj;return e.obj=t,n},i.prototype.error=function(t){var e,n=this._reporterState,r=t instanceof o;if(e=r?t:new o(n.path.map((function(t){return"["+JSON.stringify(t)+"]"})).join(""),t.message||t,t.stack),!n.options.partial)throw e;return r||n.errors.push(e),e},i.prototype.wrapResult=function(t){var e=this._reporterState;return e.options.partial?{result:this.isError(t)?null:t,errors:e.errors}:t},r(o,Error),o.prototype.rethrow=function(t){if(this.message=t+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,o),!this.stack)try{throw new Error(this.message)}catch(t){this.stack=t.stack}return this}},function(t,e,n){var r=n(138).Reporter,i=n(138).EncoderBuffer,o=n(138).DecoderBuffer,a=n(32),u=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],s=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(u);function c(t,e){var n={};this._baseState=n,n.enc=t,n.parent=e||null,n.children=null,n.tag=null,n.args=null,n.reverseArgs=null,n.choice=null,n.optional=!1,n.any=!1,n.obj=!1,n.use=null,n.useDecoder=null,n.key=null,n.default=null,n.explicit=null,n.implicit=null,n.contains=null,n.parent||(n.children=[],this._wrap())}t.exports=c;var f=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];c.prototype.clone=function(){var t=this._baseState,e={};f.forEach((function(n){e[n]=t[n]}));var n=new this.constructor(e.parent);return n._baseState=e,n},c.prototype._wrap=function(){var t=this._baseState;s.forEach((function(e){this[e]=function(){var n=new this.constructor(this);return t.children.push(n),n[e].apply(n,arguments)}}),this)},c.prototype._init=function(t){var e=this._baseState;a(null===e.parent),t.call(this),e.children=e.children.filter((function(t){return t._baseState.parent===this}),this),a.equal(e.children.length,1,"Root node can have only one child")},c.prototype._useArgs=function(t){var e=this._baseState,n=t.filter((function(t){return t instanceof this.constructor}),this);t=t.filter((function(t){return!(t instanceof this.constructor)}),this),0!==n.length&&(a(null===e.children),e.children=n,n.forEach((function(t){t._baseState.parent=this}),this)),0!==t.length&&(a(null===e.args),e.args=t,e.reverseArgs=t.map((function(t){if("object"!=typeof t||t.constructor!==Object)return t;var e={};return Object.keys(t).forEach((function(n){n==(0|n)&&(n|=0);var r=t[n];e[r]=n})),e})))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach((function(t){c.prototype[t]=function(){var e=this._baseState;throw new Error(t+" not implemented for encoding: "+e.enc)}})),u.forEach((function(t){c.prototype[t]=function(){var e=this._baseState,n=Array.prototype.slice.call(arguments);return a(null===e.tag),e.tag=t,this._useArgs(n),this}})),c.prototype.use=function(t){a(t);var e=this._baseState;return a(null===e.use),e.use=t,this},c.prototype.optional=function(){return this._baseState.optional=!0,this},c.prototype.def=function(t){var e=this._baseState;return a(null===e.default),e.default=t,e.optional=!0,this},c.prototype.explicit=function(t){var e=this._baseState;return a(null===e.explicit&&null===e.implicit),e.explicit=t,this},c.prototype.implicit=function(t){var e=this._baseState;return a(null===e.explicit&&null===e.implicit),e.implicit=t,this},c.prototype.obj=function(){var t=this._baseState,e=Array.prototype.slice.call(arguments);return t.obj=!0,0!==e.length&&this._useArgs(e),this},c.prototype.key=function(t){var e=this._baseState;return a(null===e.key),e.key=t,this},c.prototype.any=function(){return this._baseState.any=!0,this},c.prototype.choice=function(t){var e=this._baseState;return a(null===e.choice),e.choice=t,this._useArgs(Object.keys(t).map((function(e){return t[e]}))),this},c.prototype.contains=function(t){var e=this._baseState;return a(null===e.use),e.contains=t,this},c.prototype._decode=function(t,e){var n=this._baseState;if(null===n.parent)return t.wrapResult(n.children[0]._decode(t,e));var r,i=n.default,a=!0,u=null;if(null!==n.key&&(u=t.enterKey(n.key)),n.optional){var s=null;if(null!==n.explicit?s=n.explicit:null!==n.implicit?s=n.implicit:null!==n.tag&&(s=n.tag),null!==s||n.any){if(a=this._peekTag(t,s,n.any),t.isError(a))return a}else{var c=t.save();try{null===n.choice?this._decodeGeneric(n.tag,t,e):this._decodeChoice(t,e),a=!0}catch(t){a=!1}t.restore(c)}}if(n.obj&&a&&(r=t.enterObject()),a){if(null!==n.explicit){var f=this._decodeTag(t,n.explicit);if(t.isError(f))return f;t=f}var l=t.offset;if(null===n.use&&null===n.choice){if(n.any)c=t.save();var h=this._decodeTag(t,null!==n.implicit?n.implicit:n.tag,n.any);if(t.isError(h))return h;n.any?i=t.raw(c):t=h}if(e&&e.track&&null!==n.tag&&e.track(t.path(),l,t.length,"tagged"),e&&e.track&&null!==n.tag&&e.track(t.path(),t.offset,t.length,"content"),i=n.any?i:null===n.choice?this._decodeGeneric(n.tag,t,e):this._decodeChoice(t,e),t.isError(i))return i;if(n.any||null!==n.choice||null===n.children||n.children.forEach((function(n){n._decode(t,e)})),n.contains&&("octstr"===n.tag||"bitstr"===n.tag)){var d=new o(i);i=this._getUse(n.contains,t._reporterState.obj)._decode(d,e)}}return n.obj&&a&&(i=t.leaveObject(r)),null===n.key||null===i&&!0!==a?null!==u&&t.exitKey(u):t.leaveKey(u,n.key,i),i},c.prototype._decodeGeneric=function(t,e,n){var r=this._baseState;return"seq"===t||"set"===t?null:"seqof"===t||"setof"===t?this._decodeList(e,t,r.args[0],n):/str$/.test(t)?this._decodeStr(e,t,n):"objid"===t&&r.args?this._decodeObjid(e,r.args[0],r.args[1],n):"objid"===t?this._decodeObjid(e,null,null,n):"gentime"===t||"utctime"===t?this._decodeTime(e,t,n):"null_"===t?this._decodeNull(e,n):"bool"===t?this._decodeBool(e,n):"objDesc"===t?this._decodeStr(e,t,n):"int"===t||"enum"===t?this._decodeInt(e,r.args&&r.args[0],n):null!==r.use?this._getUse(r.use,e._reporterState.obj)._decode(e,n):e.error("unknown tag: "+t)},c.prototype._getUse=function(t,e){var n=this._baseState;return n.useDecoder=this._use(t,e),a(null===n.useDecoder._baseState.parent),n.useDecoder=n.useDecoder._baseState.children[0],n.implicit!==n.useDecoder._baseState.implicit&&(n.useDecoder=n.useDecoder.clone(),n.useDecoder._baseState.implicit=n.implicit),n.useDecoder},c.prototype._decodeChoice=function(t,e){var n=this._baseState,r=null,i=!1;return Object.keys(n.choice).some((function(o){var a=t.save(),u=n.choice[o];try{var s=u._decode(t,e);if(t.isError(s))return!1;r={type:o,value:s},i=!0}catch(e){return t.restore(a),!1}return!0}),this),i?r:t.error("Choice not matched")},c.prototype._createEncoderBuffer=function(t){return new i(t,this.reporter)},c.prototype._encode=function(t,e,n){var r=this._baseState;if(null===r.default||r.default!==t){var i=this._encodeValue(t,e,n);if(void 0!==i&&!this._skipDefault(i,e,n))return i}},c.prototype._encodeValue=function(t,e,n){var i=this._baseState;if(null===i.parent)return i.children[0]._encode(t,e||new r);var o=null;if(this.reporter=e,i.optional&&void 0===t){if(null===i.default)return;t=i.default}var a=null,u=!1;if(i.any)o=this._createEncoderBuffer(t);else if(i.choice)o=this._encodeChoice(t,e);else if(i.contains)a=this._getUse(i.contains,n)._encode(t,e),u=!0;else if(i.children)a=i.children.map((function(n){if("null_"===n._baseState.tag)return n._encode(null,e,t);if(null===n._baseState.key)return e.error("Child should have a key");var r=e.enterKey(n._baseState.key);if("object"!=typeof t)return e.error("Child expected, but input is not object");var i=n._encode(t[n._baseState.key],e,t);return e.leaveKey(r),i}),this).filter((function(t){return t})),a=this._createEncoderBuffer(a);else if("seqof"===i.tag||"setof"===i.tag){if(!i.args||1!==i.args.length)return e.error("Too many args for : "+i.tag);if(!Array.isArray(t))return e.error("seqof/setof, but data is not Array");var s=this.clone();s._baseState.implicit=null,a=this._createEncoderBuffer(t.map((function(n){var r=this._baseState;return this._getUse(r.args[0],t)._encode(n,e)}),s))}else null!==i.use?o=this._getUse(i.use,n)._encode(t,e):(a=this._encodePrimitive(i.tag,t),u=!0);if(!i.any&&null===i.choice){var c=null!==i.implicit?i.implicit:i.tag,f=null===i.implicit?"universal":"context";null===c?null===i.use&&e.error("Tag could be omitted only for .use()"):null===i.use&&(o=this._encodeComposite(c,u,f,a))}return null!==i.explicit&&(o=this._encodeComposite(i.explicit,!1,"context",o)),o},c.prototype._encodeChoice=function(t,e){var n=this._baseState,r=n.choice[t.type];return r||a(!1,t.type+" not found in "+JSON.stringify(Object.keys(n.choice))),r._encode(t.value,e)},c.prototype._encodePrimitive=function(t,e){var n=this._baseState;if(/str$/.test(t))return this._encodeStr(e,t);if("objid"===t&&n.args)return this._encodeObjid(e,n.reverseArgs[0],n.args[1]);if("objid"===t)return this._encodeObjid(e,null,null);if("gentime"===t||"utctime"===t)return this._encodeTime(e,t);if("null_"===t)return this._encodeNull();if("int"===t||"enum"===t)return this._encodeInt(e,n.args&&n.reverseArgs[0]);if("bool"===t)return this._encodeBool(e);if("objDesc"===t)return this._encodeStr(e,t);throw new Error("Unsupported tag: "+t)},c.prototype._isNumstr=function(t){return/^[0-9 ]*$/.test(t)},c.prototype._isPrintstr=function(t){return/^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(t)}},function(t,e,n){var r=n(438);e.tagClass={0:"universal",1:"application",2:"context",3:"private"},e.tagClassByName=r._reverse(e.tagClass),e.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},e.tagByName=r._reverse(e.tag)},function(t,e,n){var r=e;r.der=n(439),r.pem=n(880)},function(t,e,n){var r=n(2),i=n(18).Buffer,o=n(439);function a(t){o.call(this,t),this.enc="pem"}r(a,o),t.exports=a,a.prototype.decode=function(t,e){for(var n=t.toString().split(/[\r\n]+/g),r=e.label.toUpperCase(),a=/^-----(BEGIN|END) ([^-]+)-----$/,u=-1,s=-1,c=0;c<n.length;c++){var f=n[c].match(a);if(null!==f&&f[2]===r){if(-1!==u){if("END"!==f[1])break;s=c;break}if("BEGIN"!==f[1])break;u=c}}if(-1===u||-1===s)throw new Error("PEM section not found for: "+r);var l=n.slice(u+1,s).join("");l.replace(/[^a-z0-9\+\/=]+/gi,"");var h=new i(l,"base64");return o.prototype.decode.call(this,h,e)}},function(t,e,n){var r=e;r.der=n(440),r.pem=n(882)},function(t,e,n){var r=n(2),i=n(440);function o(t){i.call(this,t),this.enc="pem"}r(o,i),t.exports=o,o.prototype.encode=function(t,e){for(var n=i.prototype.encode.call(this,t).toString("base64"),r=["-----BEGIN "+e.label+"-----"],o=0;o<n.length;o+=64)r.push(n.slice(o,o+64));return r.push("-----END "+e.label+"-----"),r.join("\n")}},function(t,e,n){"use strict";var r=n(137),i=r.define("Time",(function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})})),o=r.define("AttributeTypeValue",(function(){this.seq().obj(this.key("type").objid(),this.key("value").any())})),a=r.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())})),u=r.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(a),this.key("subjectPublicKey").bitstr())})),s=r.define("RelativeDistinguishedName",(function(){this.setof(o)})),c=r.define("RDNSequence",(function(){this.seqof(s)})),f=r.define("Name",(function(){this.choice({rdnSequence:this.use(c)})})),l=r.define("Validity",(function(){this.seq().obj(this.key("notBefore").use(i),this.key("notAfter").use(i))})),h=r.define("Extension",(function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())})),d=r.define("TBSCertificate",(function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(a),this.key("issuer").use(f),this.key("validity").use(l),this.key("subject").use(f),this.key("subjectPublicKeyInfo").use(u),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(h).optional())})),p=r.define("X509Certificate",(function(){this.seq().obj(this.key("tbsCertificate").use(d),this.key("signatureAlgorithm").use(a),this.key("signatureValue").bitstr())}));t.exports=p},function(t){t.exports=JSON.parse('{"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"}')},function(t,e,n){var r=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r\+\/\=]+)[\n\r]+/m,i=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,o=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r\+\/\=]+)-----END \1-----$/m,a=n(182),u=n(274),s=n(3).Buffer;t.exports=function(t,e){var n,c=t.toString(),f=c.match(r);if(f){var l="aes"+f[1],h=s.from(f[2],"hex"),d=s.from(f[3].replace(/[\r\n]/g,""),"base64"),p=a(e,h.slice(0,8),parseInt(f[1],10)).key,g=[],y=u.createDecipheriv(l,p,h);g.push(y.update(d)),g.push(y.final()),n=s.concat(g)}else{var b=c.match(o);n=new s(b[2].replace(/[\r\n]/g,""),"base64")}return{tag:c.match(i)[1],data:n}}},function(t,e,n){(function(e){var r=n(12),i=n(278).ec,o=n(184),a=n(441);function u(t,e){if(t.cmpn(0)<=0)throw new Error("invalid sig");if(t.cmp(e)>=e)throw new Error("invalid sig")}t.exports=function(t,n,s,c,f){var l=o(s);if("ec"===l.type){if("ecdsa"!==c&&"ecdsa/rsa"!==c)throw new Error("wrong public key type");return function(t,e,n){var r=a[n.data.algorithm.curve.join(".")];if(!r)throw new Error("unknown curve "+n.data.algorithm.curve.join("."));var o=new i(r),u=n.data.subjectPrivateKey.data;return o.verify(e,t,u)}(t,n,l)}if("dsa"===l.type){if("dsa"!==c)throw new Error("wrong public key type");return function(t,e,n){var i=n.data.p,a=n.data.q,s=n.data.g,c=n.data.pub_key,f=o.signature.decode(t,"der"),l=f.s,h=f.r;u(l,a),u(h,a);var d=r.mont(i),p=l.invm(a);return 0===s.toRed(d).redPow(new r(e).mul(p).mod(a)).fromRed().mul(c.toRed(d).redPow(h.mul(p).mod(a)).fromRed()).mod(i).mod(a).cmp(h)}(t,n,l)}if("rsa"!==c&&"ecdsa/rsa"!==c)throw new Error("wrong public key type");n=e.concat([f,n]);for(var h=l.modulus.byteLength(),d=[1],p=0;n.length+d.length+2<h;)d.push(255),p++;d.push(0);for(var g=-1;++g<n.length;)d.push(n[g]);d=new e(d);var y=r.mont(l.modulus);t=(t=new r(t).toRed(y)).redPow(new r(l.publicExponent)),t=new e(t.fromRed().toArray());var b=p<8?1:0;for(h=Math.min(t.length,d.length),t.length!==d.length&&(b=1),g=-1;++g<h;)b|=t[g]^d[g];return 0===b}}).call(this,n(18).Buffer)},function(t,e,n){(function(e){var r=n(278),i=n(12);t.exports=function(t){return new a(t)};var o={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};function a(t){this.curveType=o[t],this.curveType||(this.curveType={name:t}),this.curve=new r.ec(this.curveType.name),this.keys=void 0}function u(t,n,r){Array.isArray(t)||(t=t.toArray());var i=new e(t);if(r&&i.length<r){var o=new e(r-i.length);o.fill(0),i=e.concat([o,i])}return n?i.toString(n):i}o.p224=o.secp224r1,o.p256=o.secp256r1=o.prime256v1,o.p192=o.secp192r1=o.prime192v1,o.p384=o.secp384r1,o.p521=o.secp521r1,a.prototype.generateKeys=function(t,e){return this.keys=this.curve.genKeyPair(),this.getPublicKey(t,e)},a.prototype.computeSecret=function(t,n,r){return n=n||"utf8",e.isBuffer(t)||(t=new e(t,n)),u(this.curve.keyFromPublic(t).getPublic().mul(this.keys.getPrivate()).getX(),r,this.curveType.byteLength)},a.prototype.getPublicKey=function(t,e){var n=this.keys.getPublic("compressed"===e,!0);return"hybrid"===e&&(n[n.length-1]%2?n[0]=7:n[0]=6),u(n,t)},a.prototype.getPrivateKey=function(t){return u(this.keys.getPrivate(),t)},a.prototype.setPublicKey=function(t,n){return n=n||"utf8",e.isBuffer(t)||(t=new e(t,n)),this.keys._importPublic(t),this},a.prototype.setPrivateKey=function(t,n){n=n||"utf8",e.isBuffer(t)||(t=new e(t,n));var r=new i(t);return r=r.toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(r),this}}).call(this,n(18).Buffer)},function(t,e,n){e.publicEncrypt=n(889),e.privateDecrypt=n(890),e.privateEncrypt=function(t,n){return e.publicEncrypt(t,n,!0)},e.publicDecrypt=function(t,n){return e.privateDecrypt(t,n,!0)}},function(t,e,n){var r=n(184),i=n(100),o=n(133),a=n(442),u=n(443),s=n(12),c=n(444),f=n(277),l=n(3).Buffer;t.exports=function(t,e,n){var h;h=t.padding?t.padding:n?1:4;var d,p=r(t);if(4===h)d=function(t,e){var n=t.modulus.byteLength(),r=e.length,c=o("sha1").update(l.alloc(0)).digest(),f=c.length,h=2*f;if(r>n-h-2)throw new Error("message too long");var d=l.alloc(n-r-h-2),p=n-f-1,g=i(f),y=u(l.concat([c,d,l.alloc(1,1),e],p),a(g,p)),b=u(g,a(y,f));return new s(l.concat([l.alloc(1),b,y],n))}(p,e);else if(1===h)d=function(t,e,n){var r,o=e.length,a=t.modulus.byteLength();if(o>a-11)throw new Error("message too long");r=n?l.alloc(a-o-3,255):function(t){var e,n=l.allocUnsafe(t),r=0,o=i(2*t),a=0;for(;r<t;)a===o.length&&(o=i(2*t),a=0),(e=o[a++])&&(n[r++]=e);return n}(a-o-3);return new s(l.concat([l.from([0,n?1:2]),r,l.alloc(1),e],a))}(p,e,n);else{if(3!==h)throw new Error("unknown padding");if((d=new s(e)).cmp(p.modulus)>=0)throw new Error("data too long for modulus")}return n?f(d,p):c(d,p)}},function(t,e,n){var r=n(184),i=n(442),o=n(443),a=n(12),u=n(277),s=n(133),c=n(444),f=n(3).Buffer;t.exports=function(t,e,n){var l;l=t.padding?t.padding:n?1:4;var h,d=r(t),p=d.modulus.byteLength();if(e.length>p||new a(e).cmp(d.modulus)>=0)throw new Error("decryption error");h=n?c(new a(e),d):u(e,d);var g=f.alloc(p-h.length);if(h=f.concat([g,h],p),4===l)return function(t,e){var n=t.modulus.byteLength(),r=s("sha1").update(f.alloc(0)).digest(),a=r.length;if(0!==e[0])throw new Error("decryption error");var u=e.slice(1,a+1),c=e.slice(a+1),l=o(u,i(c,a)),h=o(c,i(l,n-a-1));if(function(t,e){t=f.from(t),e=f.from(e);var n=0,r=t.length;t.length!==e.length&&(n++,r=Math.min(t.length,e.length));var i=-1;for(;++i<r;)n+=t[i]^e[i];return n}(r,h.slice(0,a)))throw new Error("decryption error");var d=a;for(;0===h[d];)d++;if(1!==h[d++])throw new Error("decryption error");return h.slice(d)}(d,h);if(1===l)return function(t,e,n){var r=e.slice(0,2),i=2,o=0;for(;0!==e[i++];)if(i>=e.length){o++;break}var a=e.slice(2,i-1);("0002"!==r.toString("hex")&&!n||"0001"!==r.toString("hex")&&n)&&o++;a.length<8&&o++;if(o)throw new Error("decryption error");return e.slice(i)}(0,h,n);if(3===l)return h;throw new Error("unknown padding")}},function(t,e,n){"use strict";(function(t,r){function i(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var o=n(3),a=n(100),u=o.Buffer,s=o.kMaxLength,c=t.crypto||t.msCrypto,f=Math.pow(2,32)-1;function l(t,e){if("number"!=typeof t||t!=t)throw new TypeError("offset must be a number");if(t>f||t<0)throw new TypeError("offset must be a uint32");if(t>s||t>e)throw new RangeError("offset out of range")}function h(t,e,n){if("number"!=typeof t||t!=t)throw new TypeError("size must be a number");if(t>f||t<0)throw new TypeError("size must be a uint32");if(t+e>n||t>s)throw new RangeError("buffer too small")}function d(t,e,n,i){if(r.browser){var o=t.buffer,u=new Uint8Array(o,e,n);return c.getRandomValues(u),i?void r.nextTick((function(){i(null,t)})):t}if(!i)return a(n).copy(t,e),t;a(n,(function(n,r){if(n)return i(n);r.copy(t,e),i(null,t)}))}c&&c.getRandomValues||!r.browser?(e.randomFill=function(e,n,r,i){if(!(u.isBuffer(e)||e instanceof t.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof n)i=n,n=0,r=e.length;else if("function"==typeof r)i=r,r=e.length-n;else if("function"!=typeof i)throw new TypeError('"cb" argument must be a function');return l(n,e.length),h(r,n,e.length),d(e,n,r,i)},e.randomFillSync=function(e,n,r){void 0===n&&(n=0);if(!(u.isBuffer(e)||e instanceof t.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');l(n,e.length),void 0===r&&(r=e.length-n);return h(r,n,e.length),d(e,n,r)}):(e.randomFill=i,e.randomFillSync=i)}).call(this,n(25),n(17))},function(t,e,n){var r={"./dark/index.scss":893,"./default/index.scss":895,"./forest/index.scss":897,"./neutral/index.scss":899};function i(t){var e=o(t);return n(e)}function o(t){if(!n.o(r,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}return r[t]}i.keys=function(){return Object.keys(r)},i.resolve=o,t.exports=i,i.id=892},function(t,e,n){var r=n(894);t.exports="string"==typeof r?r:r.toString()},function(t,e,n){(t.exports=n(185)(!1)).push([t.i,".label{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);color:#333}.label text{fill:#333}.node rect,.node circle,.node ellipse,.node polygon,.node path{fill:#BDD5EA;stroke:purple;stroke-width:1px}.node .label{text-align:center}.node.clickable{cursor:pointer}.arrowheadPath{fill:#d3d3d3}.edgePath .path{stroke:#d3d3d3;stroke-width:1.5px}.edgeLabel{background-color:#e8e8e8;text-align:center}.cluster rect{fill:#6D6D65;stroke:rgba(255,255,255,0.25);stroke-width:1px}.cluster text{fill:#F9FFFE}div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:12px;background:#6D6D65;border:1px solid rgba(255,255,255,0.25);border-radius:2px;pointer-events:none;z-index:100}.actor{stroke:#81B1DB;fill:#BDD5EA}text.actor{fill:#000;stroke:none}.actor-line{stroke:#d3d3d3}.messageLine0{stroke-width:1.5;stroke-dasharray:'2 2';stroke:#d3d3d3}.messageLine1{stroke-width:1.5;stroke-dasharray:'2 2';stroke:#d3d3d3}#arrowhead{fill:#d3d3d3}.sequenceNumber{fill:#fff}#sequencenumber{fill:#d3d3d3}#crosshead path{fill:#d3d3d3 !important;stroke:#d3d3d3 !important}.messageText{fill:#d3d3d3;stroke:none}.labelBox{stroke:#81B1DB;fill:#BDD5EA}.labelText{fill:#323D47;stroke:none}.loopText{fill:#d3d3d3;stroke:none}.loopLine{stroke-width:2;stroke-dasharray:'2 2';stroke:#81B1DB}.note{stroke:rgba(255,255,255,0.25);fill:#fff5ad}.noteText{fill:black;stroke:none;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:14px}.activation0{fill:#f4f4f4;stroke:#666}.activation1{fill:#f4f4f4;stroke:#666}.activation2{fill:#f4f4f4;stroke:#666}.mermaid-main-font{font-family:\"trebuchet ms\", verdana, arial;font-family:var(--mermaid-font-family)}.section{stroke:none;opacity:0.2}.section0{fill:rgba(255,255,255,0.3)}.section2{fill:#EAE8B9}.section1,.section3{fill:#fff;opacity:0.2}.sectionTitle0{fill:#F9FFFE}.sectionTitle1{fill:#F9FFFE}.sectionTitle2{fill:#F9FFFE}.sectionTitle3{fill:#F9FFFE}.sectionTitle{text-anchor:start;font-size:11px;text-height:14px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.grid .tick{stroke:#d3d3d3;opacity:0.8;shape-rendering:crispEdges}.grid .tick text{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.grid path{stroke-width:0}.today{fill:none;stroke:#DB5757;stroke-width:2px}.task{stroke-width:2}.taskText{text-anchor:middle;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.taskText:not([font-size]){font-size:11px}.taskTextOutsideRight{fill:#323D47;text-anchor:start;font-size:11px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.taskTextOutsideLeft{fill:#323D47;text-anchor:end;font-size:11px}.task.clickable{cursor:pointer}.taskText.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}.taskTextOutsideLeft.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}.taskTextOutsideRight.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}.taskText0,.taskText1,.taskText2,.taskText3{fill:#323D47}.task0,.task1,.task2,.task3{fill:#BDD5EA;stroke:rgba(255,255,255,0.5)}.taskTextOutside0,.taskTextOutside2{fill:#d3d3d3}.taskTextOutside1,.taskTextOutside3{fill:#d3d3d3}.active0,.active1,.active2,.active3{fill:#81B1DB;stroke:rgba(255,255,255,0.5)}.activeText0,.activeText1,.activeText2,.activeText3{fill:#323D47 !important}.done0,.done1,.done2,.done3{stroke:grey;fill:#d3d3d3;stroke-width:2}.doneText0,.doneText1,.doneText2,.doneText3{fill:#323D47 !important}.crit0,.crit1,.crit2,.crit3{stroke:#E83737;fill:#E83737;stroke-width:2}.activeCrit0,.activeCrit1,.activeCrit2,.activeCrit3{stroke:#E83737;fill:#81B1DB;stroke-width:2}.doneCrit0,.doneCrit1,.doneCrit2,.doneCrit3{stroke:#E83737;fill:#d3d3d3;stroke-width:2;cursor:pointer;shape-rendering:crispEdges}.milestone{transform:rotate(45deg) scale(0.8, 0.8)}.milestoneText{font-style:italic}.doneCritText0,.doneCritText1,.doneCritText2,.doneCritText3{fill:#323D47 !important}.activeCritText0,.activeCritText1,.activeCritText2,.activeCritText3{fill:#323D47 !important}.titleText{text-anchor:middle;font-size:18px;fill:#323D47;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}g.classGroup text{fill:purple;stroke:none;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:10px}g.classGroup text .title{font-weight:bolder}g.clickable{cursor:pointer}g.classGroup rect{fill:#BDD5EA;stroke:purple}g.classGroup line{stroke:purple;stroke-width:1}.classLabel .box{stroke:none;stroke-width:0;fill:#BDD5EA;opacity:0.5}.classLabel .label{fill:purple;font-size:10px}.relation{stroke:purple;stroke-width:1;fill:none}.dashed-line{stroke-dasharray:3}#compositionStart{fill:purple;stroke:purple;stroke-width:1}#compositionEnd{fill:purple;stroke:purple;stroke-width:1}#aggregationStart{fill:#BDD5EA;stroke:purple;stroke-width:1}#aggregationEnd{fill:#BDD5EA;stroke:purple;stroke-width:1}#dependencyStart{fill:purple;stroke:purple;stroke-width:1}#dependencyEnd{fill:purple;stroke:purple;stroke-width:1}#extensionStart{fill:purple;stroke:purple;stroke-width:1}#extensionEnd{fill:purple;stroke:purple;stroke-width:1}.commit-id,.commit-msg,.branch-label{fill:lightgrey;color:lightgrey;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.pieTitleText{text-anchor:middle;font-size:25px;fill:#323D47;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.slice{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}g.stateGroup text{fill:purple;stroke:none;font-size:10px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}g.stateGroup text{fill:purple;stroke:none;font-size:10px}g.stateGroup .state-title{font-weight:bolder;fill:#000}g.stateGroup rect{fill:#BDD5EA;stroke:purple}g.stateGroup line{stroke:purple;stroke-width:1}.transition{stroke:purple;stroke-width:1;fill:none}.stateGroup .composit{fill:white;border-bottom:1px}.stateGroup .alt-composit{fill:#e0e0e0;border-bottom:1px}.state-note{stroke:rgba(255,255,255,0.25);fill:#fff5ad}.state-note text{fill:black;stroke:none;font-size:10px}.stateLabel .box{stroke:none;stroke-width:0;fill:#BDD5EA;opacity:0.5}.stateLabel text{fill:#000;font-size:10px;font-weight:bold;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}:root{--mermaid-font-family: '\"trebuchet ms\", verdana, arial';--mermaid-font-family: \"Comic Sans MS\", \"Comic Sans\", cursive}\n",""])},function(t,e,n){var r=n(896);t.exports="string"==typeof r?r:r.toString()},function(t,e,n){(t.exports=n(185)(!1)).push([t.i,".label{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);color:#333}.label text{fill:#333}.node rect,.node circle,.node ellipse,.node polygon,.node path{fill:#ECECFF;stroke:#9370db;stroke-width:1px}.node .label{text-align:center}.node.clickable{cursor:pointer}.arrowheadPath{fill:#333}.edgePath .path{stroke:#333;stroke-width:1.5px}.edgeLabel{background-color:#e8e8e8;text-align:center}.cluster rect{fill:#ffffde;stroke:#aa3;stroke-width:1px}.cluster text{fill:#333}div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:12px;background:#ffffde;border:1px solid #aa3;border-radius:2px;pointer-events:none;z-index:100}.actor{stroke:#ccf;fill:#ECECFF}text.actor{fill:#000;stroke:none}.actor-line{stroke:grey}.messageLine0{stroke-width:1.5;stroke-dasharray:'2 2';stroke:#333}.messageLine1{stroke-width:1.5;stroke-dasharray:'2 2';stroke:#333}#arrowhead{fill:#333}.sequenceNumber{fill:#fff}#sequencenumber{fill:#333}#crosshead path{fill:#333 !important;stroke:#333 !important}.messageText{fill:#333;stroke:none}.labelBox{stroke:#ccf;fill:#ECECFF}.labelText{fill:#000;stroke:none}.loopText{fill:#000;stroke:none}.loopLine{stroke-width:2;stroke-dasharray:'2 2';stroke:#ccf}.note{stroke:#aa3;fill:#fff5ad}.noteText{fill:black;stroke:none;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:14px}.activation0{fill:#f4f4f4;stroke:#666}.activation1{fill:#f4f4f4;stroke:#666}.activation2{fill:#f4f4f4;stroke:#666}.mermaid-main-font{font-family:\"trebuchet ms\", verdana, arial;font-family:var(--mermaid-font-family)}.section{stroke:none;opacity:0.2}.section0{fill:rgba(102,102,255,0.49)}.section2{fill:#fff400}.section1,.section3{fill:#fff;opacity:0.2}.sectionTitle0{fill:#333}.sectionTitle1{fill:#333}.sectionTitle2{fill:#333}.sectionTitle3{fill:#333}.sectionTitle{text-anchor:start;font-size:11px;text-height:14px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.grid .tick{stroke:#d3d3d3;opacity:0.8;shape-rendering:crispEdges}.grid .tick text{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.grid path{stroke-width:0}.today{fill:none;stroke:red;stroke-width:2px}.task{stroke-width:2}.taskText{text-anchor:middle;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.taskText:not([font-size]){font-size:11px}.taskTextOutsideRight{fill:#000;text-anchor:start;font-size:11px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.taskTextOutsideLeft{fill:#000;text-anchor:end;font-size:11px}.task.clickable{cursor:pointer}.taskText.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}.taskTextOutsideLeft.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}.taskTextOutsideRight.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}.taskText0,.taskText1,.taskText2,.taskText3{fill:#fff}.task0,.task1,.task2,.task3{fill:#8a90dd;stroke:#534fbc}.taskTextOutside0,.taskTextOutside2{fill:#000}.taskTextOutside1,.taskTextOutside3{fill:#000}.active0,.active1,.active2,.active3{fill:#bfc7ff;stroke:#534fbc}.activeText0,.activeText1,.activeText2,.activeText3{fill:#000 !important}.done0,.done1,.done2,.done3{stroke:grey;fill:#d3d3d3;stroke-width:2}.doneText0,.doneText1,.doneText2,.doneText3{fill:#000 !important}.crit0,.crit1,.crit2,.crit3{stroke:#f88;fill:red;stroke-width:2}.activeCrit0,.activeCrit1,.activeCrit2,.activeCrit3{stroke:#f88;fill:#bfc7ff;stroke-width:2}.doneCrit0,.doneCrit1,.doneCrit2,.doneCrit3{stroke:#f88;fill:#d3d3d3;stroke-width:2;cursor:pointer;shape-rendering:crispEdges}.milestone{transform:rotate(45deg) scale(0.8, 0.8)}.milestoneText{font-style:italic}.doneCritText0,.doneCritText1,.doneCritText2,.doneCritText3{fill:#000 !important}.activeCritText0,.activeCritText1,.activeCritText2,.activeCritText3{fill:#000 !important}.titleText{text-anchor:middle;font-size:18px;fill:#000;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}g.classGroup text{fill:#9370db;stroke:none;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:10px}g.classGroup text .title{font-weight:bolder}g.clickable{cursor:pointer}g.classGroup rect{fill:#ECECFF;stroke:#9370db}g.classGroup line{stroke:#9370db;stroke-width:1}.classLabel .box{stroke:none;stroke-width:0;fill:#ECECFF;opacity:0.5}.classLabel .label{fill:#9370db;font-size:10px}.relation{stroke:#9370db;stroke-width:1;fill:none}.dashed-line{stroke-dasharray:3}#compositionStart{fill:#9370db;stroke:#9370db;stroke-width:1}#compositionEnd{fill:#9370db;stroke:#9370db;stroke-width:1}#aggregationStart{fill:#ECECFF;stroke:#9370db;stroke-width:1}#aggregationEnd{fill:#ECECFF;stroke:#9370db;stroke-width:1}#dependencyStart{fill:#9370db;stroke:#9370db;stroke-width:1}#dependencyEnd{fill:#9370db;stroke:#9370db;stroke-width:1}#extensionStart{fill:#9370db;stroke:#9370db;stroke-width:1}#extensionEnd{fill:#9370db;stroke:#9370db;stroke-width:1}.commit-id,.commit-msg,.branch-label{fill:lightgrey;color:lightgrey;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.pieTitleText{text-anchor:middle;font-size:25px;fill:#000;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.slice{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}g.stateGroup text{fill:#9370db;stroke:none;font-size:10px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}g.stateGroup text{fill:#9370db;stroke:none;font-size:10px}g.stateGroup .state-title{font-weight:bolder;fill:#000}g.stateGroup rect{fill:#ECECFF;stroke:#9370db}g.stateGroup line{stroke:#9370db;stroke-width:1}.transition{stroke:#9370db;stroke-width:1;fill:none}.stateGroup .composit{fill:white;border-bottom:1px}.stateGroup .alt-composit{fill:#e0e0e0;border-bottom:1px}.state-note{stroke:#aa3;fill:#fff5ad}.state-note text{fill:black;stroke:none;font-size:10px}.stateLabel .box{stroke:none;stroke-width:0;fill:#ECECFF;opacity:0.5}.stateLabel text{fill:#000;font-size:10px;font-weight:bold;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}:root{--mermaid-font-family: '\"trebuchet ms\", verdana, arial';--mermaid-font-family: \"Comic Sans MS\", \"Comic Sans\", cursive}\n",""])},function(t,e,n){var r=n(898);t.exports="string"==typeof r?r:r.toString()},function(t,e,n){(t.exports=n(185)(!1)).push([t.i,".label{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);color:#333}.label text{fill:#333}.node rect,.node circle,.node ellipse,.node polygon,.node path{fill:#cde498;stroke:#13540c;stroke-width:1px}.node .label{text-align:center}.node.clickable{cursor:pointer}.arrowheadPath{fill:green}.edgePath .path{stroke:green;stroke-width:1.5px}.edgeLabel{background-color:#e8e8e8;text-align:center}.cluster rect{fill:#cdffb2;stroke:#6eaa49;stroke-width:1px}.cluster text{fill:#333}div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:12px;background:#cdffb2;border:1px solid #6eaa49;border-radius:2px;pointer-events:none;z-index:100}.actor{stroke:#13540c;fill:#cde498}text.actor{fill:#000;stroke:none}.actor-line{stroke:grey}.messageLine0{stroke-width:1.5;stroke-dasharray:'2 2';stroke:#333}.messageLine1{stroke-width:1.5;stroke-dasharray:'2 2';stroke:#333}#arrowhead{fill:#333}.sequenceNumber{fill:#fff}#sequencenumber{fill:#333}#crosshead path{fill:#333 !important;stroke:#333 !important}.messageText{fill:#333;stroke:none}.labelBox{stroke:#326932;fill:#cde498}.labelText{fill:#000;stroke:none}.loopText{fill:#000;stroke:none}.loopLine{stroke-width:2;stroke-dasharray:'2 2';stroke:#326932}.note{stroke:#6eaa49;fill:#fff5ad}.noteText{fill:black;stroke:none;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:14px}.activation0{fill:#f4f4f4;stroke:#666}.activation1{fill:#f4f4f4;stroke:#666}.activation2{fill:#f4f4f4;stroke:#666}.mermaid-main-font{font-family:\"trebuchet ms\", verdana, arial;font-family:var(--mermaid-font-family)}.section{stroke:none;opacity:0.2}.section0{fill:#6eaa49}.section2{fill:#6eaa49}.section1,.section3{fill:#fff;opacity:0.2}.sectionTitle0{fill:#333}.sectionTitle1{fill:#333}.sectionTitle2{fill:#333}.sectionTitle3{fill:#333}.sectionTitle{text-anchor:start;font-size:11px;text-height:14px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.grid .tick{stroke:#d3d3d3;opacity:0.8;shape-rendering:crispEdges}.grid .tick text{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.grid path{stroke-width:0}.today{fill:none;stroke:red;stroke-width:2px}.task{stroke-width:2}.taskText{text-anchor:middle;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.taskText:not([font-size]){font-size:11px}.taskTextOutsideRight{fill:#000;text-anchor:start;font-size:11px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.taskTextOutsideLeft{fill:#000;text-anchor:end;font-size:11px}.task.clickable{cursor:pointer}.taskText.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}.taskTextOutsideLeft.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}.taskTextOutsideRight.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}.taskText0,.taskText1,.taskText2,.taskText3{fill:#fff}.task0,.task1,.task2,.task3{fill:#487e3a;stroke:#13540c}.taskTextOutside0,.taskTextOutside2{fill:#000}.taskTextOutside1,.taskTextOutside3{fill:#000}.active0,.active1,.active2,.active3{fill:#cde498;stroke:#13540c}.activeText0,.activeText1,.activeText2,.activeText3{fill:#000 !important}.done0,.done1,.done2,.done3{stroke:grey;fill:#d3d3d3;stroke-width:2}.doneText0,.doneText1,.doneText2,.doneText3{fill:#000 !important}.crit0,.crit1,.crit2,.crit3{stroke:#f88;fill:red;stroke-width:2}.activeCrit0,.activeCrit1,.activeCrit2,.activeCrit3{stroke:#f88;fill:#cde498;stroke-width:2}.doneCrit0,.doneCrit1,.doneCrit2,.doneCrit3{stroke:#f88;fill:#d3d3d3;stroke-width:2;cursor:pointer;shape-rendering:crispEdges}.milestone{transform:rotate(45deg) scale(0.8, 0.8)}.milestoneText{font-style:italic}.doneCritText0,.doneCritText1,.doneCritText2,.doneCritText3{fill:#000 !important}.activeCritText0,.activeCritText1,.activeCritText2,.activeCritText3{fill:#000 !important}.titleText{text-anchor:middle;font-size:18px;fill:#000;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}g.classGroup text{fill:#13540c;stroke:none;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:10px}g.classGroup text .title{font-weight:bolder}g.clickable{cursor:pointer}g.classGroup rect{fill:#cde498;stroke:#13540c}g.classGroup line{stroke:#13540c;stroke-width:1}.classLabel .box{stroke:none;stroke-width:0;fill:#cde498;opacity:0.5}.classLabel .label{fill:#13540c;font-size:10px}.relation{stroke:#13540c;stroke-width:1;fill:none}.dashed-line{stroke-dasharray:3}#compositionStart{fill:#13540c;stroke:#13540c;stroke-width:1}#compositionEnd{fill:#13540c;stroke:#13540c;stroke-width:1}#aggregationStart{fill:#cde498;stroke:#13540c;stroke-width:1}#aggregationEnd{fill:#cde498;stroke:#13540c;stroke-width:1}#dependencyStart{fill:#13540c;stroke:#13540c;stroke-width:1}#dependencyEnd{fill:#13540c;stroke:#13540c;stroke-width:1}#extensionStart{fill:#13540c;stroke:#13540c;stroke-width:1}#extensionEnd{fill:#13540c;stroke:#13540c;stroke-width:1}.commit-id,.commit-msg,.branch-label{fill:lightgrey;color:lightgrey;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.pieTitleText{text-anchor:middle;font-size:25px;fill:#000;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.slice{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}g.stateGroup text{fill:#13540c;stroke:none;font-size:10px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}g.stateGroup text{fill:#13540c;stroke:none;font-size:10px}g.stateGroup .state-title{font-weight:bolder;fill:#000}g.stateGroup rect{fill:#cde498;stroke:#13540c}g.stateGroup line{stroke:#13540c;stroke-width:1}.transition{stroke:#13540c;stroke-width:1;fill:none}.stateGroup .composit{fill:white;border-bottom:1px}.stateGroup .alt-composit{fill:#e0e0e0;border-bottom:1px}.state-note{stroke:#6eaa49;fill:#fff5ad}.state-note text{fill:black;stroke:none;font-size:10px}.stateLabel .box{stroke:none;stroke-width:0;fill:#cde498;opacity:0.5}.stateLabel text{fill:#000;font-size:10px;font-weight:bold;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}:root{--mermaid-font-family: '\"trebuchet ms\", verdana, arial';--mermaid-font-family: \"Comic Sans MS\", \"Comic Sans\", cursive}\n",""])},function(t,e,n){var r=n(900);t.exports="string"==typeof r?r:r.toString()},function(t,e,n){(t.exports=n(185)(!1)).push([t.i,".label{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);color:#333}.label text{fill:#333}.node rect,.node circle,.node ellipse,.node polygon,.node path{fill:#eee;stroke:#999;stroke-width:1px}.node .label{text-align:center}.node.clickable{cursor:pointer}.arrowheadPath{fill:#333}.edgePath .path{stroke:#666;stroke-width:1.5px}.edgeLabel{background-color:#fff;text-align:center}.cluster rect{fill:#eaf2fb;stroke:#26a;stroke-width:1px}.cluster text{fill:#333}div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:12px;background:#eaf2fb;border:1px solid #26a;border-radius:2px;pointer-events:none;z-index:100}.actor{stroke:#999;fill:#eee}text.actor{fill:#333;stroke:none}.actor-line{stroke:#666}.messageLine0{stroke-width:1.5;stroke-dasharray:'2 2';stroke:#333}.messageLine1{stroke-width:1.5;stroke-dasharray:'2 2';stroke:#333}#arrowhead{fill:#333}.sequenceNumber{fill:#fff}#sequencenumber{fill:#333}#crosshead path{fill:#333 !important;stroke:#333 !important}.messageText{fill:#333;stroke:none}.labelBox{stroke:#999;fill:#eee}.labelText{fill:#333;stroke:none}.loopText{fill:#333;stroke:none}.loopLine{stroke-width:2;stroke-dasharray:'2 2';stroke:#999}.note{stroke:#770;fill:#ffa}.noteText{fill:black;stroke:none;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:14px}.activation0{fill:#f4f4f4;stroke:#666}.activation1{fill:#f4f4f4;stroke:#666}.activation2{fill:#f4f4f4;stroke:#666}.mermaid-main-font{font-family:\"trebuchet ms\", verdana, arial;font-family:var(--mermaid-font-family)}.section{stroke:none;opacity:0.2}.section0{fill:#80b3e6}.section2{fill:#80b3e6}.section1,.section3{fill:#fff;opacity:0.2}.sectionTitle0{fill:#333}.sectionTitle1{fill:#333}.sectionTitle2{fill:#333}.sectionTitle3{fill:#333}.sectionTitle{text-anchor:start;font-size:11px;text-height:14px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.grid .tick{stroke:#e6e6e6;opacity:0.8;shape-rendering:crispEdges}.grid .tick text{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.grid path{stroke-width:0}.today{fill:none;stroke:#d42;stroke-width:2px}.task{stroke-width:2}.taskText{text-anchor:middle;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.taskText:not([font-size]){font-size:11px}.taskTextOutsideRight{fill:#333;text-anchor:start;font-size:11px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.taskTextOutsideLeft{fill:#333;text-anchor:end;font-size:11px}.task.clickable{cursor:pointer}.taskText.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}.taskTextOutsideLeft.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}.taskTextOutsideRight.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}.taskText0,.taskText1,.taskText2,.taskText3{fill:#fff}.task0,.task1,.task2,.task3{fill:#26a;stroke:#1a4d80}.taskTextOutside0,.taskTextOutside2{fill:#333}.taskTextOutside1,.taskTextOutside3{fill:#333}.active0,.active1,.active2,.active3{fill:#eee;stroke:#1a4d80}.activeText0,.activeText1,.activeText2,.activeText3{fill:#333 !important}.done0,.done1,.done2,.done3{stroke:#666;fill:#bbb;stroke-width:2}.doneText0,.doneText1,.doneText2,.doneText3{fill:#333 !important}.crit0,.crit1,.crit2,.crit3{stroke:#b1361b;fill:#d42;stroke-width:2}.activeCrit0,.activeCrit1,.activeCrit2,.activeCrit3{stroke:#b1361b;fill:#eee;stroke-width:2}.doneCrit0,.doneCrit1,.doneCrit2,.doneCrit3{stroke:#b1361b;fill:#bbb;stroke-width:2;cursor:pointer;shape-rendering:crispEdges}.milestone{transform:rotate(45deg) scale(0.8, 0.8)}.milestoneText{font-style:italic}.doneCritText0,.doneCritText1,.doneCritText2,.doneCritText3{fill:#333 !important}.activeCritText0,.activeCritText1,.activeCritText2,.activeCritText3{fill:#333 !important}.titleText{text-anchor:middle;font-size:18px;fill:#333;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}g.classGroup text{fill:#999;stroke:none;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:10px}g.classGroup text .title{font-weight:bolder}g.clickable{cursor:pointer}g.classGroup rect{fill:#eee;stroke:#999}g.classGroup line{stroke:#999;stroke-width:1}.classLabel .box{stroke:none;stroke-width:0;fill:#eee;opacity:0.5}.classLabel .label{fill:#999;font-size:10px}.relation{stroke:#999;stroke-width:1;fill:none}.dashed-line{stroke-dasharray:3}#compositionStart{fill:#999;stroke:#999;stroke-width:1}#compositionEnd{fill:#999;stroke:#999;stroke-width:1}#aggregationStart{fill:#eee;stroke:#999;stroke-width:1}#aggregationEnd{fill:#eee;stroke:#999;stroke-width:1}#dependencyStart{fill:#999;stroke:#999;stroke-width:1}#dependencyEnd{fill:#999;stroke:#999;stroke-width:1}#extensionStart{fill:#999;stroke:#999;stroke-width:1}#extensionEnd{fill:#999;stroke:#999;stroke-width:1}.commit-id,.commit-msg,.branch-label{fill:lightgrey;color:lightgrey;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.pieTitleText{text-anchor:middle;font-size:25px;fill:#333;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.slice{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}g.stateGroup text{fill:#999;stroke:none;font-size:10px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}g.stateGroup text{fill:#999;stroke:none;font-size:10px}g.stateGroup .state-title{font-weight:bolder;fill:#000}g.stateGroup rect{fill:#eee;stroke:#999}g.stateGroup line{stroke:#999;stroke-width:1}.transition{stroke:#999;stroke-width:1;fill:none}.stateGroup .composit{fill:white;border-bottom:1px}.stateGroup .alt-composit{fill:#e0e0e0;border-bottom:1px}.state-note{stroke:#770;fill:#ffa}.state-note text{fill:black;stroke:none;font-size:10px}.stateLabel .box{stroke:none;stroke-width:0;fill:#eee;opacity:0.5}.stateLabel text{fill:#000;font-size:10px;font-weight:bold;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}:root{--mermaid-font-family: '\"trebuchet ms\", verdana, arial';--mermaid-font-family: \"Comic Sans MS\", \"Comic Sans\", cursive}\n",""])},function(t,e,n){"use strict";n.r(e);var r={};n.r(r),n.d(r,"version",(function(){return a})),n.d(r,"bisect",(function(){return u.b})),n.d(r,"bisectRight",(function(){return u.d})),n.d(r,"bisectLeft",(function(){return u.c})),n.d(r,"ascending",(function(){return u.a})),n.d(r,"bisector",(function(){return u.e})),n.d(r,"cross",(function(){return u.f})),n.d(r,"descending",(function(){return u.g})),n.d(r,"deviation",(function(){return u.h})),n.d(r,"extent",(function(){return u.i})),n.d(r,"histogram",(function(){return u.j})),n.d(r,"thresholdFreedmanDiaconis",(function(){return u.w})),n.d(r,"thresholdScott",(function(){return u.x})),n.d(r,"thresholdSturges",(function(){return u.y})),n.d(r,"max",(function(){return u.k})),n.d(r,"mean",(function(){return u.l})),n.d(r,"median",(function(){return u.m})),n.d(r,"merge",(function(){return u.n})),n.d(r,"min",(function(){return u.o})),n.d(r,"pairs",(function(){return u.p})),n.d(r,"permute",(function(){return u.q})),n.d(r,"quantile",(function(){return u.r})),n.d(r,"range",(function(){return u.s})),n.d(r,"scan",(function(){return u.t})),n.d(r,"shuffle",(function(){return u.u})),n.d(r,"sum",(function(){return u.v})),n.d(r,"ticks",(function(){return u.B})),n.d(r,"tickIncrement",(function(){return u.z})),n.d(r,"tickStep",(function(){return u.A})),n.d(r,"transpose",(function(){return u.C})),n.d(r,"variance",(function(){return u.D})),n.d(r,"zip",(function(){return u.E})),n.d(r,"axisTop",(function(){return s.d})),n.d(r,"axisRight",(function(){return s.c})),n.d(r,"axisBottom",(function(){return s.a})),n.d(r,"axisLeft",(function(){return s.b})),n.d(r,"brush",(function(){return c.a})),n.d(r,"brushX",(function(){return c.c})),n.d(r,"brushY",(function(){return c.d})),n.d(r,"brushSelection",(function(){return c.b})),n.d(r,"chord",(function(){return f.a})),n.d(r,"ribbon",(function(){return f.b})),n.d(r,"nest",(function(){return l.d})),n.d(r,"set",(function(){return l.e})),n.d(r,"map",(function(){return l.c})),n.d(r,"keys",(function(){return l.b})),n.d(r,"values",(function(){return l.f})),n.d(r,"entries",(function(){return l.a})),n.d(r,"color",(function(){return h.a})),n.d(r,"rgb",(function(){return h.h})),n.d(r,"hsl",(function(){return h.e})),n.d(r,"lab",(function(){return h.f})),n.d(r,"hcl",(function(){return h.d})),n.d(r,"lch",(function(){return h.g})),n.d(r,"gray",(function(){return h.c})),n.d(r,"cubehelix",(function(){return h.b})),n.d(r,"contours",(function(){return d.b})),n.d(r,"contourDensity",(function(){return d.a})),n.d(r,"dispatch",(function(){return p.a})),n.d(r,"drag",(function(){return g.a})),n.d(r,"dragDisable",(function(){return g.b})),n.d(r,"dragEnable",(function(){return g.c})),n.d(r,"dsvFormat",(function(){return y.i})),n.d(r,"csvParse",(function(){return y.g})),n.d(r,"csvParseRows",(function(){return y.h})),n.d(r,"csvFormat",(function(){return y.b})),n.d(r,"csvFormatBody",(function(){return y.c})),n.d(r,"csvFormatRows",(function(){return y.e})),n.d(r,"csvFormatRow",(function(){return y.d})),n.d(r,"csvFormatValue",(function(){return y.f})),n.d(r,"tsvParse",(function(){return y.o})),n.d(r,"tsvParseRows",(function(){return y.p})),n.d(r,"tsvFormat",(function(){return y.j})),n.d(r,"tsvFormatBody",(function(){return y.k})),n.d(r,"tsvFormatRows",(function(){return y.m})),n.d(r,"tsvFormatRow",(function(){return y.l})),n.d(r,"tsvFormatValue",(function(){return y.n})),n.d(r,"autoType",(function(){return y.a})),n.d(r,"easeLinear",(function(){return b.y})),n.d(r,"easeQuad",(function(){return b.D})),n.d(r,"easeQuadIn",(function(){return b.E})),n.d(r,"easeQuadOut",(function(){return b.G})),n.d(r,"easeQuadInOut",(function(){return b.F})),n.d(r,"easeCubic",(function(){return b.m})),n.d(r,"easeCubicIn",(function(){return b.n})),n.d(r,"easeCubicOut",(function(){return b.p})),n.d(r,"easeCubicInOut",(function(){return b.o})),n.d(r,"easePoly",(function(){return b.z})),n.d(r,"easePolyIn",(function(){return b.A})),n.d(r,"easePolyOut",(function(){return b.C})),n.d(r,"easePolyInOut",(function(){return b.B})),n.d(r,"easeSin",(function(){return b.H})),n.d(r,"easeSinIn",(function(){return b.I})),n.d(r,"easeSinOut",(function(){return b.K})),n.d(r,"easeSinInOut",(function(){return b.J})),n.d(r,"easeExp",(function(){return b.u})),n.d(r,"easeExpIn",(function(){return b.v})),n.d(r,"easeExpOut",(function(){return b.x})),n.d(r,"easeExpInOut",(function(){return b.w})),n.d(r,"easeCircle",(function(){return b.i})),n.d(r,"easeCircleIn",(function(){return b.j})),n.d(r,"easeCircleOut",(function(){return b.l})),n.d(r,"easeCircleInOut",(function(){return b.k})),n.d(r,"easeBounce",(function(){return b.e})),n.d(r,"easeBounceIn",(function(){return b.f})),n.d(r,"easeBounceOut",(function(){return b.h})),n.d(r,"easeBounceInOut",(function(){return b.g})),n.d(r,"easeBack",(function(){return b.a})),n.d(r,"easeBackIn",(function(){return b.b})),n.d(r,"easeBackOut",(function(){return b.d})),n.d(r,"easeBackInOut",(function(){return b.c})),n.d(r,"easeElastic",(function(){return b.q})),n.d(r,"easeElasticIn",(function(){return b.r})),n.d(r,"easeElasticOut",(function(){return b.t})),n.d(r,"easeElasticInOut",(function(){return b.s})),n.d(r,"blob",(function(){return v.a})),n.d(r,"buffer",(function(){return v.b})),n.d(r,"dsv",(function(){return v.d})),n.d(r,"csv",(function(){return v.c})),n.d(r,"tsv",(function(){return v.j})),n.d(r,"image",(function(){return v.f})),n.d(r,"json",(function(){return v.g})),n.d(r,"text",(function(){return v.i})),n.d(r,"xml",(function(){return v.k})),n.d(r,"html",(function(){return v.e})),n.d(r,"svg",(function(){return v.h})),n.d(r,"forceCenter",(function(){return m.a})),n.d(r,"forceCollide",(function(){return m.b})),n.d(r,"forceLink",(function(){return m.c})),n.d(r,"forceManyBody",(function(){return m.d})),n.d(r,"forceRadial",(function(){return m.e})),n.d(r,"forceSimulation",(function(){return m.f})),n.d(r,"forceX",(function(){return m.g})),n.d(r,"forceY",(function(){return m.h})),n.d(r,"formatDefaultLocale",(function(){return _.c})),n.d(r,"format",(function(){return _.b})),n.d(r,"formatPrefix",(function(){return _.e})),n.d(r,"formatLocale",(function(){return _.d})),n.d(r,"formatSpecifier",(function(){return _.f})),n.d(r,"FormatSpecifier",(function(){return _.a})),n.d(r,"precisionFixed",(function(){return _.g})),n.d(r,"precisionPrefix",(function(){return _.h})),n.d(r,"precisionRound",(function(){return _.i})),n.d(r,"geoArea",(function(){return w.c})),n.d(r,"geoBounds",(function(){return w.h})),n.d(r,"geoCentroid",(function(){return w.i})),n.d(r,"geoCircle",(function(){return w.j})),n.d(r,"geoClipAntimeridian",(function(){return w.k})),n.d(r,"geoClipCircle",(function(){return w.l})),n.d(r,"geoClipExtent",(function(){return w.m})),n.d(r,"geoClipRectangle",(function(){return w.n})),n.d(r,"geoContains",(function(){return w.u})),n.d(r,"geoDistance",(function(){return w.v})),n.d(r,"geoGraticule",(function(){return w.C})),n.d(r,"geoGraticule10",(function(){return w.D})),n.d(r,"geoInterpolate",(function(){return w.F})),n.d(r,"geoLength",(function(){return w.G})),n.d(r,"geoPath",(function(){return w.N})),n.d(r,"geoAlbers",(function(){return w.a})),n.d(r,"geoAlbersUsa",(function(){return w.b})),n.d(r,"geoAzimuthalEqualArea",(function(){return w.d})),n.d(r,"geoAzimuthalEqualAreaRaw",(function(){return w.e})),n.d(r,"geoAzimuthalEquidistant",(function(){return w.f})),n.d(r,"geoAzimuthalEquidistantRaw",(function(){return w.g})),n.d(r,"geoConicConformal",(function(){return w.o})),n.d(r,"geoConicConformalRaw",(function(){return w.p})),n.d(r,"geoConicEqualArea",(function(){return w.q})),n.d(r,"geoConicEqualAreaRaw",(function(){return w.r})),n.d(r,"geoConicEquidistant",(function(){return w.s})),n.d(r,"geoConicEquidistantRaw",(function(){return w.t})),n.d(r,"geoEqualEarth",(function(){return w.w})),n.d(r,"geoEqualEarthRaw",(function(){return w.x})),n.d(r,"geoEquirectangular",(function(){return w.y})),n.d(r,"geoEquirectangularRaw",(function(){return w.z})),n.d(r,"geoGnomonic",(function(){return w.A})),n.d(r,"geoGnomonicRaw",(function(){return w.B})),n.d(r,"geoIdentity",(function(){return w.E})),n.d(r,"geoProjection",(function(){return w.O})),n.d(r,"geoProjectionMutator",(function(){return w.P})),n.d(r,"geoMercator",(function(){return w.H})),n.d(r,"geoMercatorRaw",(function(){return w.I})),n.d(r,"geoNaturalEarth1",(function(){return w.J})),n.d(r,"geoNaturalEarth1Raw",(function(){return w.K})),n.d(r,"geoOrthographic",(function(){return w.L})),n.d(r,"geoOrthographicRaw",(function(){return w.M})),n.d(r,"geoStereographic",(function(){return w.R})),n.d(r,"geoStereographicRaw",(function(){return w.S})),n.d(r,"geoTransverseMercator",(function(){return w.V})),n.d(r,"geoTransverseMercatorRaw",(function(){return w.W})),n.d(r,"geoRotation",(function(){return w.Q})),n.d(r,"geoStream",(function(){return w.T})),n.d(r,"geoTransform",(function(){return w.U})),n.d(r,"cluster",(function(){return x.a})),n.d(r,"hierarchy",(function(){return x.b})),n.d(r,"pack",(function(){return x.c})),n.d(r,"packSiblings",(function(){return x.e})),n.d(r,"packEnclose",(function(){return x.d})),n.d(r,"partition",(function(){return x.f})),n.d(r,"stratify",(function(){return x.g})),n.d(r,"tree",(function(){return x.h})),n.d(r,"treemap",(function(){return x.i})),n.d(r,"treemapBinary",(function(){return x.j})),n.d(r,"treemapDice",(function(){return x.k})),n.d(r,"treemapSlice",(function(){return x.m})),n.d(r,"treemapSliceDice",(function(){return x.n})),n.d(r,"treemapSquarify",(function(){return x.o})),n.d(r,"treemapResquarify",(function(){return x.l})),n.d(r,"interpolate",(function(){return k.a})),n.d(r,"interpolateArray",(function(){return k.b})),n.d(r,"interpolateBasis",(function(){return k.c})),n.d(r,"interpolateBasisClosed",(function(){return k.d})),n.d(r,"interpolateDate",(function(){return k.g})),n.d(r,"interpolateDiscrete",(function(){return k.h})),n.d(r,"interpolateHue",(function(){return k.m})),n.d(r,"interpolateNumber",(function(){return k.o})),n.d(r,"interpolateNumberArray",(function(){return k.p})),n.d(r,"interpolateObject",(function(){return k.q})),n.d(r,"interpolateRound",(function(){return k.u})),n.d(r,"interpolateString",(function(){return k.v})),n.d(r,"interpolateTransformCss",(function(){return k.w})),n.d(r,"interpolateTransformSvg",(function(){return k.x})),n.d(r,"interpolateZoom",(function(){return k.y})),n.d(r,"interpolateRgb",(function(){return k.r})),n.d(r,"interpolateRgbBasis",(function(){return k.s})),n.d(r,"interpolateRgbBasisClosed",(function(){return k.t})),n.d(r,"interpolateHsl",(function(){return k.k})),n.d(r,"interpolateHslLong",(function(){return k.l})),n.d(r,"interpolateLab",(function(){return k.n})),n.d(r,"interpolateHcl",(function(){return k.i})),n.d(r,"interpolateHclLong",(function(){return k.j})),n.d(r,"interpolateCubehelix",(function(){return k.e})),n.d(r,"interpolateCubehelixLong",(function(){return k.f})),n.d(r,"piecewise",(function(){return k.z})),n.d(r,"quantize",(function(){return k.A})),n.d(r,"path",(function(){return E.a})),n.d(r,"polygonArea",(function(){return A.a})),n.d(r,"polygonCentroid",(function(){return A.b})),n.d(r,"polygonHull",(function(){return A.d})),n.d(r,"polygonContains",(function(){return A.c})),n.d(r,"polygonLength",(function(){return A.e})),n.d(r,"quadtree",(function(){return S.a})),n.d(r,"randomUniform",(function(){return M.f})),n.d(r,"randomNormal",(function(){return M.e})),n.d(r,"randomLogNormal",(function(){return M.d})),n.d(r,"randomBates",(function(){return M.a})),n.d(r,"randomIrwinHall",(function(){return M.c})),n.d(r,"randomExponential",(function(){return M.b})),n.d(r,"scaleBand",(function(){return T.a})),n.d(r,"scalePoint",(function(){return T.l})),n.d(r,"scaleIdentity",(function(){return T.g})),n.d(r,"scaleLinear",(function(){return T.i})),n.d(r,"scaleLog",(function(){return T.j})),n.d(r,"scaleSymlog",(function(){return T.w})),n.d(r,"scaleOrdinal",(function(){return T.k})),n.d(r,"scaleImplicit",(function(){return T.h})),n.d(r,"scalePow",(function(){return T.m})),n.d(r,"scaleSqrt",(function(){return T.v})),n.d(r,"scaleQuantile",(function(){return T.n})),n.d(r,"scaleQuantize",(function(){return T.o})),n.d(r,"scaleThreshold",(function(){return T.x})),n.d(r,"scaleTime",(function(){return T.y})),n.d(r,"scaleUtc",(function(){return T.z})),n.d(r,"scaleSequential",(function(){return T.p})),n.d(r,"scaleSequentialLog",(function(){return T.q})),n.d(r,"scaleSequentialPow",(function(){return T.r})),n.d(r,"scaleSequentialSqrt",(function(){return T.t})),n.d(r,"scaleSequentialSymlog",(function(){return T.u})),n.d(r,"scaleSequentialQuantile",(function(){return T.s})),n.d(r,"scaleDiverging",(function(){return T.b})),n.d(r,"scaleDivergingLog",(function(){return T.c})),n.d(r,"scaleDivergingPow",(function(){return T.d})),n.d(r,"scaleDivergingSqrt",(function(){return T.e})),n.d(r,"scaleDivergingSymlog",(function(){return T.f})),n.d(r,"tickFormat",(function(){return T.A})),n.d(r,"schemeCategory10",(function(){return O.R})),n.d(r,"schemeAccent",(function(){return O.M})),n.d(r,"schemeDark2",(function(){return O.S})),n.d(r,"schemePaired",(function(){return O.Z})),n.d(r,"schemePastel1",(function(){return O.ab})),n.d(r,"schemePastel2",(function(){return O.bb})),n.d(r,"schemeSet1",(function(){return O.ob})),n.d(r,"schemeSet2",(function(){return O.pb})),n.d(r,"schemeSet3",(function(){return O.qb})),n.d(r,"schemeTableau10",(function(){return O.sb})),n.d(r,"interpolateBrBG",(function(){return O.b})),n.d(r,"schemeBrBG",(function(){return O.O})),n.d(r,"interpolatePRGn",(function(){return O.o})),n.d(r,"schemePRGn",(function(){return O.Y})),n.d(r,"interpolatePiYG",(function(){return O.p})),n.d(r,"schemePiYG",(function(){return O.cb})),n.d(r,"interpolatePuOr",(function(){return O.t})),n.d(r,"schemePuOr",(function(){return O.fb})),n.d(r,"interpolateRdBu",(function(){return O.x})),n.d(r,"schemeRdBu",(function(){return O.ib})),n.d(r,"interpolateRdGy",(function(){return O.y})),n.d(r,"schemeRdGy",(function(){return O.jb})),n.d(r,"interpolateRdYlBu",(function(){return O.A})),n.d(r,"schemeRdYlBu",(function(){return O.lb})),n.d(r,"interpolateRdYlGn",(function(){return O.B})),n.d(r,"schemeRdYlGn",(function(){return O.mb})),n.d(r,"interpolateSpectral",(function(){return O.E})),n.d(r,"schemeSpectral",(function(){return O.rb})),n.d(r,"interpolateBuGn",(function(){return O.c})),n.d(r,"schemeBuGn",(function(){return O.P})),n.d(r,"interpolateBuPu",(function(){return O.d})),n.d(r,"schemeBuPu",(function(){return O.Q})),n.d(r,"interpolateGnBu",(function(){return O.h})),n.d(r,"schemeGnBu",(function(){return O.T})),n.d(r,"interpolateOrRd",(function(){return O.m})),n.d(r,"schemeOrRd",(function(){return O.W})),n.d(r,"interpolatePuBuGn",(function(){return O.s})),n.d(r,"schemePuBuGn",(function(){return O.eb})),n.d(r,"interpolatePuBu",(function(){return O.r})),n.d(r,"schemePuBu",(function(){return O.db})),n.d(r,"interpolatePuRd",(function(){return O.u})),n.d(r,"schemePuRd",(function(){return O.gb})),n.d(r,"interpolateRdPu",(function(){return O.z})),n.d(r,"schemeRdPu",(function(){return O.kb})),n.d(r,"interpolateYlGnBu",(function(){return O.J})),n.d(r,"schemeYlGnBu",(function(){return O.ub})),n.d(r,"interpolateYlGn",(function(){return O.I})),n.d(r,"schemeYlGn",(function(){return O.tb})),n.d(r,"interpolateYlOrBr",(function(){return O.K})),n.d(r,"schemeYlOrBr",(function(){return O.vb})),n.d(r,"interpolateYlOrRd",(function(){return O.L})),n.d(r,"schemeYlOrRd",(function(){return O.wb})),n.d(r,"interpolateBlues",(function(){return O.a})),n.d(r,"schemeBlues",(function(){return O.N})),n.d(r,"interpolateGreens",(function(){return O.i})),n.d(r,"schemeGreens",(function(){return O.U})),n.d(r,"interpolateGreys",(function(){return O.j})),n.d(r,"schemeGreys",(function(){return O.V})),n.d(r,"interpolatePurples",(function(){return O.v})),n.d(r,"schemePurples",(function(){return O.hb})),n.d(r,"interpolateReds",(function(){return O.C})),n.d(r,"schemeReds",(function(){return O.nb})),n.d(r,"interpolateOranges",(function(){return O.n})),n.d(r,"schemeOranges",(function(){return O.X})),n.d(r,"interpolateCividis",(function(){return O.e})),n.d(r,"interpolateCubehelixDefault",(function(){return O.g})),n.d(r,"interpolateRainbow",(function(){return O.w})),n.d(r,"interpolateWarm",(function(){return O.H})),n.d(r,"interpolateCool",(function(){return O.f})),n.d(r,"interpolateSinebow",(function(){return O.D})),n.d(r,"interpolateTurbo",(function(){return O.F})),n.d(r,"interpolateViridis",(function(){return O.G})),n.d(r,"interpolateMagma",(function(){return O.l})),n.d(r,"interpolateInferno",(function(){return O.k})),n.d(r,"interpolatePlasma",(function(){return O.q})),n.d(r,"create",(function(){return D.b})),n.d(r,"creator",(function(){return D.c})),n.d(r,"local",(function(){return D.f})),n.d(r,"matcher",(function(){return D.g})),n.d(r,"mouse",(function(){return D.h})),n.d(r,"namespace",(function(){return D.i})),n.d(r,"namespaces",(function(){return D.j})),n.d(r,"clientPoint",(function(){return D.a})),n.d(r,"select",(function(){return D.k})),n.d(r,"selectAll",(function(){return D.l})),n.d(r,"selection",(function(){return D.m})),n.d(r,"selector",(function(){return D.n})),n.d(r,"selectorAll",(function(){return D.o})),n.d(r,"style",(function(){return D.p})),n.d(r,"touch",(function(){return D.q})),n.d(r,"touches",(function(){return D.r})),n.d(r,"window",(function(){return D.s})),n.d(r,"event",(function(){return D.e})),n.d(r,"customEvent",(function(){return D.d})),n.d(r,"arc",(function(){return C.a})),n.d(r,"area",(function(){return C.b})),n.d(r,"line",(function(){return C.v})),n.d(r,"pie",(function(){return C.A})),n.d(r,"areaRadial",(function(){return C.c})),n.d(r,"radialArea",(function(){return C.C})),n.d(r,"lineRadial",(function(){return C.w})),n.d(r,"radialLine",(function(){return C.D})),n.d(r,"pointRadial",(function(){return C.B})),n.d(r,"linkHorizontal",(function(){return C.x})),n.d(r,"linkVertical",(function(){return C.z})),n.d(r,"linkRadial",(function(){return C.y})),n.d(r,"symbol",(function(){return C.Q})),n.d(r,"symbols",(function(){return C.Y})),n.d(r,"symbolCircle",(function(){return C.R})),n.d(r,"symbolCross",(function(){return C.S})),n.d(r,"symbolDiamond",(function(){return C.T})),n.d(r,"symbolSquare",(function(){return C.U})),n.d(r,"symbolStar",(function(){return C.V})),n.d(r,"symbolTriangle",(function(){return C.W})),n.d(r,"symbolWye",(function(){return C.X})),n.d(r,"curveBasisClosed",(function(){return C.e})),n.d(r,"curveBasisOpen",(function(){return C.f})),n.d(r,"curveBasis",(function(){return C.d})),n.d(r,"curveBundle",(function(){return C.g})),n.d(r,"curveCardinalClosed",(function(){return C.i})),n.d(r,"curveCardinalOpen",(function(){return C.j})),n.d(r,"curveCardinal",(function(){return C.h})),n.d(r,"curveCatmullRomClosed",(function(){return C.l})),n.d(r,"curveCatmullRomOpen",(function(){return C.m})),n.d(r,"curveCatmullRom",(function(){return C.k})),n.d(r,"curveLinearClosed",(function(){return C.o})),n.d(r,"curveLinear",(function(){return C.n})),n.d(r,"curveMonotoneX",(function(){return C.p})),n.d(r,"curveMonotoneY",(function(){return C.q})),n.d(r,"curveNatural",(function(){return C.r})),n.d(r,"curveStep",(function(){return C.s})),n.d(r,"curveStepAfter",(function(){return C.t})),n.d(r,"curveStepBefore",(function(){return C.u})),n.d(r,"stack",(function(){return C.E})),n.d(r,"stackOffsetExpand",(function(){return C.G})),n.d(r,"stackOffsetDiverging",(function(){return C.F})),n.d(r,"stackOffsetNone",(function(){return C.H})),n.d(r,"stackOffsetSilhouette",(function(){return C.I})),n.d(r,"stackOffsetWiggle",(function(){return C.J})),n.d(r,"stackOrderAppearance",(function(){return C.K})),n.d(r,"stackOrderAscending",(function(){return C.L})),n.d(r,"stackOrderDescending",(function(){return C.M})),n.d(r,"stackOrderInsideOut",(function(){return C.N})),n.d(r,"stackOrderNone",(function(){return C.O})),n.d(r,"stackOrderReverse",(function(){return C.P})),n.d(r,"timeInterval",(function(){return N.g})),n.d(r,"timeMillisecond",(function(){return N.h})),n.d(r,"timeMilliseconds",(function(){return N.i})),n.d(r,"utcMillisecond",(function(){return N.L})),n.d(r,"utcMilliseconds",(function(){return N.M})),n.d(r,"timeSecond",(function(){return N.r})),n.d(r,"timeSeconds",(function(){return N.s})),n.d(r,"utcSecond",(function(){return N.V})),n.d(r,"utcSeconds",(function(){return N.W})),n.d(r,"timeMinute",(function(){return N.j})),n.d(r,"timeMinutes",(function(){return N.k})),n.d(r,"timeHour",(function(){return N.e})),n.d(r,"timeHours",(function(){return N.f})),n.d(r,"timeDay",(function(){return N.a})),n.d(r,"timeDays",(function(){return N.b})),n.d(r,"timeWeek",(function(){return N.B})),n.d(r,"timeWeeks",(function(){return N.C})),n.d(r,"timeSunday",(function(){return N.t})),n.d(r,"timeSundays",(function(){return N.u})),n.d(r,"timeMonday",(function(){return N.l})),n.d(r,"timeMondays",(function(){return N.m})),n.d(r,"timeTuesday",(function(){return N.x})),n.d(r,"timeTuesdays",(function(){return N.y})),n.d(r,"timeWednesday",(function(){return N.z})),n.d(r,"timeWednesdays",(function(){return N.A})),n.d(r,"timeThursday",(function(){return N.v})),n.d(r,"timeThursdays",(function(){return N.w})),n.d(r,"timeFriday",(function(){return N.c})),n.d(r,"timeFridays",(function(){return N.d})),n.d(r,"timeSaturday",(function(){return N.p})),n.d(r,"timeSaturdays",(function(){return N.q})),n.d(r,"timeMonth",(function(){return N.n})),n.d(r,"timeMonths",(function(){return N.o})),n.d(r,"timeYear",(function(){return N.D})),n.d(r,"timeYears",(function(){return N.E})),n.d(r,"utcMinute",(function(){return N.N})),n.d(r,"utcMinutes",(function(){return N.O})),n.d(r,"utcHour",(function(){return N.J})),n.d(r,"utcHours",(function(){return N.K})),n.d(r,"utcDay",(function(){return N.F})),n.d(r,"utcDays",(function(){return N.G})),n.d(r,"utcWeek",(function(){return N.fb})),n.d(r,"utcWeeks",(function(){return N.gb})),n.d(r,"utcSunday",(function(){return N.X})),n.d(r,"utcSundays",(function(){return N.Y})),n.d(r,"utcMonday",(function(){return N.P})),n.d(r,"utcMondays",(function(){return N.Q})),n.d(r,"utcTuesday",(function(){return N.bb})),n.d(r,"utcTuesdays",(function(){return N.cb})),n.d(r,"utcWednesday",(function(){return N.db})),n.d(r,"utcWednesdays",(function(){return N.eb})),n.d(r,"utcThursday",(function(){return N.Z})),n.d(r,"utcThursdays",(function(){return N.ab})),n.d(r,"utcFriday",(function(){return N.H})),n.d(r,"utcFridays",(function(){return N.I})),n.d(r,"utcSaturday",(function(){return N.T})),n.d(r,"utcSaturdays",(function(){return N.U})),n.d(r,"utcMonth",(function(){return N.R})),n.d(r,"utcMonths",(function(){return N.S})),n.d(r,"utcYear",(function(){return N.hb})),n.d(r,"utcYears",(function(){return N.ib})),n.d(r,"timeFormatDefaultLocale",(function(){return I.d})),n.d(r,"timeFormat",(function(){return I.c})),n.d(r,"timeParse",(function(){return I.f})),n.d(r,"utcFormat",(function(){return I.g})),n.d(r,"utcParse",(function(){return I.h})),n.d(r,"timeFormatLocale",(function(){return I.e})),n.d(r,"isoFormat",(function(){return I.a})),n.d(r,"isoParse",(function(){return I.b})),n.d(r,"now",(function(){return R.b})),n.d(r,"timer",(function(){return R.d})),n.d(r,"timerFlush",(function(){return R.e})),n.d(r,"timeout",(function(){return R.c})),n.d(r,"interval",(function(){return R.a})),n.d(r,"transition",(function(){return j.c})),n.d(r,"active",(function(){return j.a})),n.d(r,"interrupt",(function(){return j.b})),n.d(r,"voronoi",(function(){return L.a})),n.d(r,"zoom",(function(){return B.a})),n.d(r,"zoomTransform",(function(){return B.c})),n.d(r,"zoomIdentity",(function(){return B.b}));var i=n(446),o=n.n(i),a="5.15.0",u=n(0),s=n(200),c=n(199),f=n(197),l=n(39),h=n(20),d=n(192),p=n(51),g=n(102),y=n(140),b=n(139),v=n(194),m=n(191),_=n(84),w=n(186),x=n(189),k=n(26),E=n(42),A=n(196),S=n(85),M=n(195),T=n(190),O=n(188),D=n(13),C=n(187),N=n(73),I=n(103),R=n(81),j=n(40),L=n(193),B=n(198),P=n(447),F=n.n(P),q=n(144);function U(t){return(U="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)}var z={},Y=function(t){!function(t){for(var e=Object.keys(t),n=0;n<e.length;n++)if("object"===U(t[e[n]])&&null!=t[e[n]])for(var r=Object.keys(t[e[n]]),i=0;i<r.length;i++)void 0===z[e[n]]&&(z[e[n]]={}),z[e[n]][r[i]]=t[e[n]][r[i]];else z[e[n]]=t[e[n]]}(t)},V=function(){return z},G=n(50),H=n.n(G),W=1,$=2,K=3,Z=4,X=5,J={debug:function(){},info:function(){},warn:function(){},error:function(){},fatal:function(){}},Q=function(t){J.debug=function(){},J.info=function(){},J.warn=function(){},J.error=function(){},J.fatal=function(){},t<=X&&(J.fatal=console.error?console.error.bind(console,tt("FATAL"),"color: orange"):console.log.bind(console,"",tt("FATAL"))),t<=Z&&(J.error=console.error?console.error.bind(console,tt("ERROR"),"color: orange"):console.log.bind(console,"",tt("ERROR"))),t<=K&&(J.warn=console.warn?console.warn.bind(console,tt("WARN"),"color: orange"):console.log.bind(console,"",tt("WARN"))),t<=$&&(J.info=console.info?console.info.bind(console,tt("INFO"),"color: lightblue"):console.log.bind(console,"",tt("INFO"))),t<=W&&(J.debug=console.debug?console.debug.bind(console,tt("DEBUG"),"color: lightgreen"):console.log.bind(console,"",tt("DEBUG")))},tt=function(t){var e=H()().format("ss.SSS");return"%c".concat(e," : ").concat(t," : ")},et=n(212),nt=function(t,e){if(!t)return e;var n="curve".concat(t.charAt(0).toUpperCase()+t.slice(1));return r[n]||e},rt=function(t,e){return t&&e?Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)):0},it=function(t){for(var e="",n="",r=0;r<t.length;r++)void 0!==t[r]&&(t[r].startsWith("color:")||t[r].startsWith("text-align:")?n=n+t[r]+";":e=e+t[r]+";");return{style:e,labelStyle:n}},ot=function(t){return t=t.replace(/^\s*%%.*\n/g,"\n"),J.debug("Detecting diagram type based on the text "+t),t.match(/^\s*sequenceDiagram/)?"sequence":t.match(/^\s*gantt/)?"gantt":t.match(/^\s*classDiagram/)?"class":t.match(/^\s*stateDiagram/)?"state":t.match(/^\s*gitGraph/)?"git":t.match(/^\s*flowchart/)?"flowchart-v2":t.match(/^\s*info/)?"info":t.match(/^\s*pie/)?"pie":t.match(/^\s*erDiagram/)?"er":"flowchart"},at=function(t,e){for(var n=0;n<e.length;n++)if(e[n].match(t))return n;return-1},ut=function(t){return function(t){var e,n=0;t.forEach((function(t){n+=rt(t,e),e=t}));var r,i=n/2;return e=void 0,t.forEach((function(t){if(e&&!r){var n=rt(t,e);if(n<i)i-=n;else{var o=i/n;o<=0&&(r=e),o>=1&&(r={x:t.x,y:t.y}),o>0&&o<1&&(r={x:(1-o)*e.x+o*t.x,y:(1-o)*e.y+o*t.y})}}e=t})),r}(t)},st=function(t,e,n){var r;e[0]!==n&&(e=e.reverse()),e.forEach((function(t){rt(t,r),r=t}));var i,o=25;r=void 0,e.forEach((function(t){if(r&&!i){var e=rt(t,r);if(e<o)o-=e;else{var n=o/e;n<=0&&(i=r),n>=1&&(i={x:t.x,y:t.y}),n>0&&n<1&&(i={x:(1-n)*r.x+n*t.x,y:(1-n)*r.y+n*t.y})}}r=t}));var a=t?10:5,u=Math.atan2(e[0].y-i.y,e[0].x-i.x),s={x:0,y:0};return s.x=Math.sin(u)*a+(e[0].x+i.x)/2,s.y=-Math.cos(u)*a+(e[0].y+i.y)/2,s},ct=function(t,e){var n=t.trim();if(n)return"loose"!==e.securityLevel?Object(et.sanitizeUrl)(n):n},ft=n(34),lt=n.n(ft),ht=function(t){return t.replace(/<br\s*\/?>/gi,"#br#")},dt=function(t){return t.replace(/#br#/g,"<br/>")},pt=function(t){if(!t)return 1;var e=ht(t);return(e=e.replace(/\\n/g,"#br#")).split("#br#")},gt=function(t,e){var n=t,r=!0;return!e.flowchart||!1!==e.flowchart.htmlLabels&&"false"!==e.flowchart.htmlLabels||(r=!1),"loose"!==e.securityLevel&&r&&(n=(n=(n=ht(n)).replace(/</g,"&lt;").replace(/>/g,"&gt;")).replace(/=/g,"&equals;"),n=dt(n)),n};function yt(t){return(yt="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)}var bt,vt=V(),mt={},_t=[],wt=[],xt=[],kt={},Et={},At=0,St=!0,Mt=[],Tt=function(t,e,n,r){var i=t,o=e;i[0].match(/\d/)&&(i=""+i),o[0].match(/\d/)&&(o=""+o),J.info("Got edge...",i,o);var a={start:i,end:o,type:void 0,text:""};void 0!==(r=n.text)&&(a.text=gt(r.trim(),vt),'"'===a.text[0]&&'"'===a.text[a.text.length-1]&&(a.text=a.text.substring(1,a.text.length-1))),void 0!==n&&(a.type=n.type,a.stroke=n.stroke),_t.push(a)},Ot=function(t,e){t.split(",").forEach((function(t){var n=t;t[0].match(/\d/)&&(n=""+n),void 0!==mt[n]&&mt[n].classes.push(e),void 0!==kt[n]&&kt[n].classes.push(e)}))},Dt=function(t,e){t.split(",").forEach((function(t){void 0!==e&&(Et[t]=gt(e,vt))}))},Ct=function(t){var e=D.k(".mermaidTooltip");null===(e._groups||e)[0][0]&&(e=D.k("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),D.k(t).select("svg").selectAll("g.node").on("mouseover",(function(){var t=D.k(this);if(null!==t.attr("title")){var n=this.getBoundingClientRect();e.transition().duration(200).style("opacity",".9"),e.html(t.attr("title")).style("left",n.left+(n.right-n.left)/2+"px").style("top",n.top-14+document.body.scrollTop+"px"),t.classed("hover",!0)}})).on("mouseout",(function(){e.transition().duration(500).style("opacity",0),D.k(this).classed("hover",!1)}))};Mt.push(Ct);var Nt=function(t){for(var e=0;e<xt.length;e++)if(xt[e].id===t)return e;return-1},It=-1,Rt=[],jt={addVertex:function(t,e,n,r,i){var o,a=t;void 0!==a&&0!==a.trim().length&&(a[0].match(/\d/)&&(a=""+a),void 0===mt[a]&&(mt[a]={id:a,styles:[],classes:[]}),void 0!==e?('"'===(o=gt(e.trim(),vt))[0]&&'"'===o[o.length-1]&&(o=o.substring(1,o.length-1)),mt[a].text=o):void 0===mt[a].text&&(mt[a].text=t),void 0!==n&&(mt[a].type=n),null!=r&&r.forEach((function(t){mt[a].styles.push(t)})),null!=i&&i.forEach((function(t){mt[a].classes.push(t)})))},addLink:function(t,e,n,r){var i,o;for(i=0;i<t.length;i++)for(o=0;o<e.length;o++)Tt(t[i],e[o],n,r)},updateLinkInterpolate:function(t,e){t.forEach((function(t){"default"===t?_t.defaultInterpolate=e:_t[t].interpolate=e}))},updateLink:function(t,e){t.forEach((function(t){"default"===t?_t.defaultStyle=e:(-1===at("fill",e)&&e.push("fill:none"),_t[t].style=e)}))},addClass:function(t,e){void 0===wt[t]&&(wt[t]={id:t,styles:[],textStyles:[]}),null!=e&&e.forEach((function(e){if(e.match("color")){var n=e.replace("fill","bgFill").replace("color","fill");wt[t].textStyles.push(n)}wt[t].styles.push(e)}))},setDirection:function(t){(bt=t).match(/.*</)&&(bt="RL"),bt.match(/.*\^/)&&(bt="BT"),bt.match(/.*>/)&&(bt="LR"),bt.match(/.*v/)&&(bt="TB")},setClass:Ot,getTooltip:function(t){return Et[t]},setClickEvent:function(t,e,n){t.split(",").forEach((function(t){!function(t,e){var n=t;t[0].match(/\d/)&&(n=""+n),"loose"===vt.securityLevel&&void 0!==e&&void 0!==mt[n]&&Mt.push((function(){var t=document.querySelector('[id="'.concat(n,'"]'));null!==t&&t.addEventListener("click",(function(){window[e](n)}),!1)}))}(t,e)})),Dt(t,n),Ot(t,"clickable")},setLink:function(t,e,n){t.split(",").forEach((function(t){var n=t;t[0].match(/\d/)&&(n=""+n),void 0!==mt[n]&&(mt[n].link=ct(e,vt))})),Dt(t,n),Ot(t,"clickable")},bindFunctions:function(t){Mt.forEach((function(e){e(t)}))},getDirection:function(){return bt.trim()},getVertices:function(){return mt},getEdges:function(){return _t},getClasses:function(){return wt},clear:function(){mt={},wt={},_t=[],(Mt=[]).push(Ct),xt=[],kt={},At=0,Et=[],St=!0},defaultStyle:function(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"},addSubGraph:function(t,e,n){var r=t.trim(),i=n;t===n&&n.match(/\s/)&&(r=void 0);var o,a,u,s=[];o=s.concat.apply(s,e),a={boolean:{},number:{},string:{}},u=[],s=o.filter((function(t){var e=yt(t);return""!==t.trim()&&(e in a?!a[e].hasOwnProperty(t)&&(a[e][t]=!0):!(u.indexOf(t)>=0)&&u.push(t))}));for(var c=0;c<s.length;c++)s[c][0].match(/\d/)&&(s[c]=""+s[c]);(r=r||"subGraph"+At)[0].match(/\d/)&&(r=""+r),i=gt(i=i||"",vt),At+=1;var f={id:r,nodes:s,title:i.trim(),classes:[]};return xt.push(f),kt[r]=f,r},getDepthFirstPos:function(t){return Rt[t]},indexNodes:function(){It=-1,xt.length>0&&function t(e,n){var r=xt[n].nodes;if(!((It+=1)>2e3)){if(Rt[It]=n,xt[n].id===e)return{result:!0,count:0};for(var i=0,o=1;i<r.length;){var a=Nt(r[i]);if(a>=0){var u=t(e,a);if(u.result)return{result:!0,count:o+u.count};o+=u.count}i+=1}return{result:!1,count:o}}}("none",xt.length-1)},getSubGraphs:function(){return xt},destructLink:function(t,e){var n,r=function(t){switch(t.trim()){case"--x":return{type:"arrow_cross",stroke:"normal"};case"--\x3e":return{type:"arrow",stroke:"normal"};case"<--\x3e":return{type:"double_arrow_point",stroke:"normal"};case"x--x":return{type:"double_arrow_cross",stroke:"normal"};case"o--o":return{type:"double_arrow_circle",stroke:"normal"};case"o.-o":return{type:"double_arrow_circle",stroke:"dotted"};case"<==>":return{type:"double_arrow_point",stroke:"thick"};case"o==o":return{type:"double_arrow_circle",stroke:"thick"};case"x==x":return{type:"double_arrow_cross",stroke:"thick"};case"x.-x":case"x-.-x":return{type:"double_arrow_cross",stroke:"dotted"};case"<.->":case"<-.->":return{type:"double_arrow_point",stroke:"dotted"};case"o-.-o":return{type:"double_arrow_circle",stroke:"dotted"};case"--o":return{type:"arrow_circle",stroke:"normal"};case"---":return{type:"arrow_open",stroke:"normal"};case"-.-x":return{type:"arrow_cross",stroke:"dotted"};case"-.->":return{type:"arrow",stroke:"dotted"};case"-.-o":return{type:"arrow_circle",stroke:"dotted"};case"-.-":return{type:"arrow_open",stroke:"dotted"};case".-x":return{type:"arrow_cross",stroke:"dotted"};case".->":return{type:"arrow",stroke:"dotted"};case".-o":return{type:"arrow_circle",stroke:"dotted"};case".-":return{type:"arrow_open",stroke:"dotted"};case"==x":return{type:"arrow_cross",stroke:"thick"};case"==>":return{type:"arrow",stroke:"thick"};case"==o":return{type:"arrow_circle",stroke:"thick"};case"===":return{type:"arrow_open",stroke:"thick"}}}(t);if(e){if((n=function(t){switch(t.trim()){case"<--":return{type:"arrow",stroke:"normal"};case"x--":return{type:"arrow_cross",stroke:"normal"};case"o--":return{type:"arrow_circle",stroke:"normal"};case"<-.":return{type:"arrow",stroke:"dotted"};case"x-.":return{type:"arrow_cross",stroke:"dotted"};case"o-.":return{type:"arrow_circle",stroke:"dotted"};case"<==":return{type:"arrow",stroke:"thick"};case"x==":return{type:"arrow_cross",stroke:"thick"};case"o==":return{type:"arrow_circle",stroke:"thick"};case"--":return{type:"arrow_open",stroke:"normal"};case"==":return{type:"arrow_open",stroke:"thick"};case"-.":return{type:"arrow_open",stroke:"dotted"}}}(e)).stroke!==r.stroke)return{type:"INVALID",stroke:"INVALID"};if("arrow_open"===n.type)n.type=r.type;else{if(n.type!==r.type)return{type:"INVALID",stroke:"INVALID"};n.type="double_"+n.type}return"double_arrow"===n.type&&(n.type="double_arrow_point"),n}return r},lex:{firstGraph:function(){return!!St&&(St=!1,!0)}}},Lt=n(72),Bt=n.n(Lt),Pt=n(19),Ft=n.n(Pt),qt=n(143),Ut=n.n(qt);function zt(t,e,n){var r=.9*(e.width+e.height),i=[{x:r/2,y:0},{x:r,y:-r/2},{x:r/2,y:-r},{x:0,y:-r/2}],o=Jt(t,r,r,i);return n.intersect=function(t){return Ft.a.intersect.polygon(n,i,t)},o}function Yt(t,e,n){var r=e.height,i=r/4,o=e.width+2*i,a=[{x:i,y:0},{x:o-i,y:0},{x:o,y:-r/2},{x:o-i,y:-r},{x:i,y:-r},{x:0,y:-r/2}],u=Jt(t,o,r,a);return n.intersect=function(t){return Ft.a.intersect.polygon(n,a,t)},u}function Vt(t,e,n){var r=e.width,i=e.height,o=[{x:-i/2,y:0},{x:r,y:0},{x:r,y:-i},{x:-i/2,y:-i},{x:0,y:-i/2}],a=Jt(t,r,i,o);return n.intersect=function(t){return Ft.a.intersect.polygon(n,o,t)},a}function Gt(t,e,n){var r=e.width,i=e.height,o=[{x:-2*i/6,y:0},{x:r-i/6,y:0},{x:r+2*i/6,y:-i},{x:i/6,y:-i}],a=Jt(t,r,i,o);return n.intersect=function(t){return Ft.a.intersect.polygon(n,o,t)},a}function Ht(t,e,n){var r=e.width,i=e.height,o=[{x:2*i/6,y:0},{x:r+i/6,y:0},{x:r-2*i/6,y:-i},{x:-i/6,y:-i}],a=Jt(t,r,i,o);return n.intersect=function(t){return Ft.a.intersect.polygon(n,o,t)},a}function Wt(t,e,n){var r=e.width,i=e.height,o=[{x:-2*i/6,y:0},{x:r+2*i/6,y:0},{x:r-i/6,y:-i},{x:i/6,y:-i}],a=Jt(t,r,i,o);return n.intersect=function(t){return Ft.a.intersect.polygon(n,o,t)},a}function $t(t,e,n){var r=e.width,i=e.height,o=[{x:i/6,y:0},{x:r-i/6,y:0},{x:r+2*i/6,y:-i},{x:-2*i/6,y:-i}],a=Jt(t,r,i,o);return n.intersect=function(t){return Ft.a.intersect.polygon(n,o,t)},a}function Kt(t,e,n){var r=e.width,i=e.height,o=[{x:0,y:0},{x:r+i/2,y:0},{x:r,y:-i/2},{x:r+i/2,y:-i},{x:0,y:-i}],a=Jt(t,r,i,o);return n.intersect=function(t){return Ft.a.intersect.polygon(n,o,t)},a}function Zt(t,e,n){var r=e.height,i=e.width+r/4,o=t.insert("rect",":first-child").attr("rx",r/2).attr("ry",r/2).attr("x",-i/2).attr("y",-r/2).attr("width",i).attr("height",r);return n.intersect=function(t){return Ft.a.intersect.rect(n,t)},o}function Xt(t,e,n){var r=e.width,i=r/2,o=i/(2.5+r/50),a=e.height+o,u="M 0,"+o+" a "+i+","+o+" 0,0,0 "+r+" 0 a "+i+","+o+" 0,0,0 "+-r+" 0 l 0,"+a+" a "+i+","+o+" 0,0,0 "+r+" 0 l 0,"+-a,s=t.attr("label-offset-y",o).insert("path",":first-child").attr("d",u).attr("transform","translate("+-r/2+","+-(a/2+o)+")");return n.intersect=function(t){var e=Ft.a.intersect.rect(n,t),r=e.x-n.x;if(0!=i&&(Math.abs(r)<n.width/2||Math.abs(r)==n.width/2&&Math.abs(e.y-n.y)>n.height/2-o)){var a=o*o*(1-r*r/(i*i));0!=a&&(a=Math.sqrt(a)),a=o-a,t.y-n.y>0&&(a=-a),e.y+=a}return e},s}function Jt(t,e,n,r){return t.insert("polygon",":first-child").attr("points",r.map((function(t){return t.x+","+t.y})).join(" ")).attr("transform","translate("+-e/2+","+n/2+")")}var Qt={addToRender:function(t){t.shapes().question=zt,t.shapes().hexagon=Yt,t.shapes().stadium=Zt,t.shapes().cylinder=Xt,t.shapes().rect_left_inv_arrow=Vt,t.shapes().lean_right=Gt,t.shapes().lean_left=Ht,t.shapes().trapezoid=Wt,t.shapes().inv_trapezoid=$t,t.shapes().rect_right_inv_arrow=Kt}},te={},ee=function(t,e,n){var r=D.k('[id="'.concat(n,'"]'));Object.keys(t).forEach((function(n){var i=t[n],o="default";i.classes.length>0&&(o=i.classes.join(" "));var a,u=it(i.styles),s=void 0!==i.text?i.text:i.id;if(V().flowchart.htmlLabels){var c={label:s.replace(/fa[lrsb]?:fa-[\w-]+/g,(function(t){return"<i class='".concat(t.replace(":"," "),"'></i>")}))};(a=Ut()(r,c).node()).parentNode.removeChild(a)}else{var f=document.createElementNS("http://www.w3.org/2000/svg","text");f.setAttribute("style",u.labelStyle.replace("color:","fill:"));for(var l=s.split(/<br\s*\/?>/gi),h=0;h<l.length;h++){var d=document.createElementNS("http://www.w3.org/2000/svg","tspan");d.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),d.setAttribute("dy","1em"),d.setAttribute("x","1"),d.textContent=l[h],f.appendChild(d)}a=f}var p=0,g="";switch(i.type){case"round":p=5,g="rect";break;case"square":g="rect";break;case"diamond":g="question";break;case"hexagon":g="hexagon";break;case"odd":g="rect_left_inv_arrow";break;case"lean_right":g="lean_right";break;case"lean_left":g="lean_left";break;case"trapezoid":g="trapezoid";break;case"inv_trapezoid":g="inv_trapezoid";break;case"odd_right":g="rect_left_inv_arrow";break;case"circle":g="circle";break;case"ellipse":g="ellipse";break;case"stadium":g="stadium";break;case"cylinder":g="cylinder";break;case"group":g="rect";break;default:g="rect"}e.setNode(i.id,{labelType:"svg",labelStyle:u.labelStyle,shape:g,label:a,rx:p,ry:p,class:o,style:u.style,id:i.id})}))},ne=function(t,e){var n,r,i=0;if(void 0!==t.defaultStyle){var o=it(t.defaultStyle);n=o.style,r=o.labelStyle}t.forEach((function(o){i++;var a={};"arrow_open"===o.type?a.arrowhead="none":a.arrowhead="normal";var u="",s="";if(void 0!==o.style){var c=it(o.style);u=c.style,s=c.labelStyle}else switch(o.stroke){case"normal":u="fill:none",void 0!==n&&(u=n),void 0!==r&&(s=r);break;case"dotted":u="fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":u=" stroke-width: 3.5px;fill:none"}a.style=u,a.labelStyle=s,void 0!==o.interpolate?a.curve=nt(o.interpolate,C.n):void 0!==t.defaultInterpolate?a.curve=nt(t.defaultInterpolate,C.n):a.curve=nt(te.curve,C.n),void 0===o.text?void 0!==o.style&&(a.arrowheadStyle="fill: #333"):(a.arrowheadStyle="fill: #333",a.labelpos="c",V().flowchart.htmlLabels?(a.labelType="html",a.label='<span class="edgeLabel">'+o.text+"</span>"):(a.labelType="text",a.label=o.text.replace(/<br\s*\/?>/gi,"\n"),void 0===o.style&&(a.style=a.style||"stroke: #333; stroke-width: 1.5px;fill:none"),a.labelStyle=a.labelStyle.replace("color:","fill:"))),e.setEdge(o.start,o.end,a,i)}))},re=function(t){for(var e=Object.keys(t),n=0;n<e.length;n++)te[e[n]]=t[e[n]]},ie=function(t){J.info("Extracting classes"),jt.clear();var e=Bt.a.parser;return e.yy=jt,e.parse(t),jt.getClasses()},oe=function(t,e){J.info("Drawing flowchart"),jt.clear();var n=Bt.a.parser;n.yy=jt;try{n.parse(t)}catch(t){J.debug("Parsing failed")}var r=jt.getDirection();void 0===r&&(r="TD");for(var i,o=V().flowchart,a=o.nodeSpacing||50,u=o.rankSpacing||50,s=new lt.a.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:r,nodesep:a,ranksep:u,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}})),c=jt.getSubGraphs(),f=c.length-1;f>=0;f--)i=c[f],jt.addVertex(i.id,i.title,"group",void 0,i.classes);var l=jt.getVertices(),h=jt.getEdges(),d=0;for(d=c.length-1;d>=0;d--){i=c[d],D.l("cluster").append("text");for(var p=0;p<i.nodes.length;p++)s.setParent(i.nodes[p],i.id)}ee(l,s,e),ne(h,s);var g=new(0,Ft.a.render);Qt.addToRender(g),g.arrows().none=function(t,e,n,r){var i=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 0 0 L 0 0 L 0 0 z");Ft.a.util.applyStyle(i,n[r+"Style"])},g.arrows().normal=function(t,e){t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowheadPath").style("stroke-width",1).style("stroke-dasharray","1,0")};var y=D.k('[id="'.concat(e,'"]')),b=D.k("#"+e+" g");g(b,s),b.selectAll("g.node").attr("title",(function(){return jt.getTooltip(this.id)}));var v=y.node().getBBox(),m=v.width+16,_=v.height+16;for(J.debug("new ViewBox 0 0 ".concat(m," ").concat(_),"translate(".concat(8-s._label.marginx,", ").concat(8-s._label.marginy,")")),o.useMaxWidth?(y.attr("width","100%"),y.attr("style","max-width: ".concat(m,"px;"))):(y.attr("height",_),y.attr("width",m)),y.attr("viewBox","0 0 ".concat(m," ").concat(_)),y.select("g").attr("transform","translate(".concat(8-s._label.marginx,", ").concat(8-v.y,")")),jt.indexNodes("subGraph"+d),d=0;d<c.length;d++)if("undefined"!==(i=c[d]).title){var w=document.querySelectorAll("#"+e+' [id="'+i.id+'"] rect'),x=document.querySelectorAll("#"+e+' [id="'+i.id+'"]'),k=w[0].x.baseVal.value,E=w[0].y.baseVal.value,A=w[0].width.baseVal.value,S=D.k(x[0]).select(".label");S.attr("transform","translate(".concat(k+A/2,", ").concat(E+14,")")),S.attr("id",e+"Text");for(var M=0;M<i.classes.length;M++)x[0].classList.add(i.classes[M])}if(!o.htmlLabels)for(var T=document.querySelectorAll('[id="'+e+'"] .edgeLabel .label'),O=0;O<T.length;O++){var C=T[O],N=C.getBBox(),I=document.createElementNS("http://www.w3.org/2000/svg","rect");I.setAttribute("rx",0),I.setAttribute("ry",0),I.setAttribute("width",N.width),I.setAttribute("height",N.height),I.setAttribute("style","fill:#e8e8e8;"),C.insertBefore(I,C.firstChild)}Object.keys(l).forEach((function(t){var n=l[t];if(n.link){var r=D.k("#"+e+' [id="'+t+'"]');if(r){var i=document.createElementNS("http://www.w3.org/2000/svg","a");i.setAttributeNS("http://www.w3.org/2000/svg","class",n.classes.join(" ")),i.setAttributeNS("http://www.w3.org/2000/svg","href",n.link),i.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener");var o=r.insert((function(){return i}),":first-child"),a=r.select(".label-container");a&&o.append((function(){return a.node()}));var u=r.select(".label");u&&o.append((function(){return u.node()}))}}}))},ae={},ue=function(t,e,n){var r=D.k('[id="'.concat(n,'"]'));Object.keys(t).forEach((function(n){var i=t[n],o="default";i.classes.length>0&&(o=i.classes.join(" "));var a,u=it(i.styles),s=void 0!==i.text?i.text:i.id;if(V().flowchart.htmlLabels){var c={label:s.replace(/fa[lrsb]?:fa-[\w-]+/g,(function(t){return"<i class='".concat(t.replace(":"," "),"'></i>")}))};(a=Ut()(r,c).node()).parentNode.removeChild(a)}else{var f=document.createElementNS("http://www.w3.org/2000/svg","text");f.setAttribute("style",u.labelStyle.replace("color:","fill:"));for(var l=s.split(/<br\s*\/?>/gi),h=0;h<l.length;h++){var d=document.createElementNS("http://www.w3.org/2000/svg","tspan");d.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),d.setAttribute("dy","1em"),d.setAttribute("x","1"),d.textContent=l[h],f.appendChild(d)}a=f}var p=0,g="";switch(i.type){case"round":p=5,g="rect";break;case"square":g="rect";break;case"diamond":g="question";break;case"hexagon":g="hexagon";break;case"odd":g="rect_left_inv_arrow";break;case"lean_right":g="lean_right";break;case"lean_left":g="lean_left";break;case"trapezoid":g="trapezoid";break;case"inv_trapezoid":g="inv_trapezoid";break;case"odd_right":g="rect_left_inv_arrow";break;case"circle":g="circle";break;case"ellipse":g="ellipse";break;case"stadium":g="stadium";break;case"cylinder":g="cylinder";break;case"group":g="rect";break;default:g="rect"}e.setNode(i.id,{labelType:"svg",labelStyle:u.labelStyle,shape:g,label:a,rx:p,ry:p,class:o,style:u.style,id:i.id})}))},se=function(t,e){var n,r,i=0;if(void 0!==t.defaultStyle){var o=it(t.defaultStyle);n=o.style,r=o.labelStyle}t.forEach((function(o){i++;var a={};"arrow_open"===o.type?a.arrowhead="none":a.arrowhead="normal";var u="",s="";if(void 0!==o.style){var c=it(o.style);u=c.style,s=c.labelStyle}else switch(o.stroke){case"normal":u="fill:none",void 0!==n&&(u=n),void 0!==r&&(s=r);break;case"dotted":u="fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":u=" stroke-width: 3.5px;fill:none"}a.style=u,a.labelStyle=s,void 0!==o.interpolate?a.curve=nt(o.interpolate,C.n):void 0!==t.defaultInterpolate?a.curve=nt(t.defaultInterpolate,C.n):a.curve=nt(ae.curve,C.n),void 0===o.text?void 0!==o.style&&(a.arrowheadStyle="fill: #333"):(a.arrowheadStyle="fill: #333",a.labelpos="c",V().flowchart.htmlLabels?(a.labelType="html",a.label='<span class="edgeLabel">'+o.text+"</span>"):(a.labelType="text",a.label=o.text.replace(/<br\s*\/?>/gi,"\n"),void 0===o.style&&(a.style=a.style||"stroke: #333; stroke-width: 1.5px;fill:none"),a.labelStyle=a.labelStyle.replace("color:","fill:"))),e.setEdge(o.start,o.end,a,i)}))},ce={setConf:function(t){for(var e=Object.keys(t),n=0;n<e.length;n++)ae[e[n]]=t[e[n]]},addVertices:ue,addEdges:se,getClasses:function(t){J.info("Extracting classes"),jt.clear();var e=Bt.a.parser;return e.yy=jt,e.parse(t),jt.getClasses()},draw:function(t,e){J.info("Drawing flowchart"),jt.clear();var n=Bt.a.parser;n.yy=jt;try{n.parse(t)}catch(t){J.debug("Parsing failed")}var r=jt.getDirection();void 0===r&&(r="TD");for(var i,o=V().flowchart,a=o.nodeSpacing||50,u=o.rankSpacing||50,s=new lt.a.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:r,nodesep:a,ranksep:u,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}})),c=jt.getSubGraphs(),f=c.length-1;f>=0;f--)i=c[f],jt.addVertex(i.id,i.title,"group",void 0,i.classes);var l=jt.getVertices(),h=jt.getEdges(),d=0;for(d=c.length-1;d>=0;d--){i=c[d],D.l("cluster").append("text");for(var p=0;p<i.nodes.length;p++)s.setParent(i.nodes[p],i.id)}ue(l,s,e),se(h,s);var g=new(0,Ft.a.render);Qt.addToRender(g),g.arrows().none=function(t,e,n,r){var i=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 0 0 L 0 0 L 0 0 z");Ft.a.util.applyStyle(i,n[r+"Style"])},g.arrows().normal=function(t,e){t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowheadPath").style("stroke-width",1).style("stroke-dasharray","1,0")};var y=D.k('[id="'.concat(e,'"]')),b=D.k("#"+e+" g");g(b,s),b.selectAll("g.node").attr("title",(function(){return jt.getTooltip(this.id)}));var v=y.node().getBBox(),m=v.width+16,_=v.height+16;for(J.debug("new ViewBox 0 0 ".concat(m," ").concat(_),"translate(".concat(8-s._label.marginx,", ").concat(8-s._label.marginy,")")),o.useMaxWidth?(y.attr("width","100%"),y.attr("style","max-width: ".concat(m,"px;"))):(y.attr("height",_),y.attr("width",m)),y.attr("viewBox","0 0 ".concat(m," ").concat(_)),y.select("g").attr("transform","translate(".concat(8-s._label.marginx,", ").concat(8-v.y,")")),jt.indexNodes("subGraph"+d),d=0;d<c.length;d++)if("undefined"!==(i=c[d]).title){var w=document.querySelectorAll("#"+e+' [id="'+i.id+'"] rect'),x=document.querySelectorAll("#"+e+' [id="'+i.id+'"]'),k=w[0].x.baseVal.value,E=w[0].y.baseVal.value,A=w[0].width.baseVal.value,S=D.k(x[0]).select(".label");S.attr("transform","translate(".concat(k+A/2,", ").concat(E+14,")")),S.attr("id",e+"Text");for(var M=0;M<i.classes.length;M++)x[0].classList.add(i.classes[M])}if(!o.htmlLabels)for(var T=document.querySelectorAll('[id="'+e+'"] .edgeLabel .label'),O=0;O<T.length;O++){var C=T[O],N=C.getBBox(),I=document.createElementNS("http://www.w3.org/2000/svg","rect");I.setAttribute("rx",0),I.setAttribute("ry",0),I.setAttribute("width",N.width),I.setAttribute("height",N.height),I.setAttribute("style","fill:#e8e8e8;"),C.insertBefore(I,C.firstChild)}Object.keys(l).forEach((function(t){var n=l[t];if(n.link){var r=D.k("#"+e+' [id="'+t+'"]');if(r){var i=document.createElementNS("http://www.w3.org/2000/svg","a");i.setAttributeNS("http://www.w3.org/2000/svg","class",n.classes.join(" ")),i.setAttributeNS("http://www.w3.org/2000/svg","href",n.link),i.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener");var o=r.insert((function(){return i}),":first-child"),a=r.select(".label-container");a&&o.append((function(){return a.node()}));var u=r.select(".label");u&&o.append((function(){return u.node()}))}}}))}},fe=function(t,e){var n=t.append("rect");return n.attr("x",e.x),n.attr("y",e.y),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("width",e.width),n.attr("height",e.height),n.attr("rx",e.rx),n.attr("ry",e.ry),void 0!==e.class&&n.attr("class",e.class),n},le=function(t,e){var n=e.text.replace(/<br\s*\/?>/gi," "),r=t.append("text");r.attr("x",e.x),r.attr("y",e.y),r.style("text-anchor",e.anchor),r.attr("fill",e.fill),void 0!==e.class&&r.attr("class",e.class);var i=r.append("tspan");return i.attr("x",e.x+2*e.textMargin),i.attr("fill",e.fill),i.text(n),r},he=function(t,e){var n,r,i,o,a,u=t.append("polygon");u.attr("points",(n=e.x,r=e.y,n+","+r+" "+(n+(i=50))+","+r+" "+(n+i)+","+(r+(o=20)-(a=7))+" "+(n+i-1.2*a)+","+(r+o)+" "+n+","+(r+o))),u.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,le(t,e)},de=-1,pe=function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0}},ge=function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},ye=function(){function t(t,e,n,i,o,a,u){r(e.append("text").attr("x",n+o/2).attr("y",i+a/2+5).style("text-anchor","middle").text(t),u)}function e(t,e,n,i,o,a,u,s){for(var c=s.actorFontSize,f=s.actorFontFamily,l=t.split(/<br\s*\/?>/gi),h=0;h<l.length;h++){var d=h*c-c*(l.length-1)/2,p=e.append("text").attr("x",n+o/2).attr("y",i).style("text-anchor","middle").style("font-size",c).style("font-family",f);p.append("tspan").attr("x",n+o/2).attr("dy",d).text(l[h]),p.attr("y",i+a/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),r(p,u)}}function n(t,n,i,o,a,u,s,c){var f=n.append("switch"),l=f.append("foreignObject").attr("x",i).attr("y",o).attr("width",a).attr("height",u).append("div").style("display","table").style("height","100%").style("width","100%");l.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,f,i,o,a,u,s,c),r(l,s)}function r(t,e){for(var n in e)e.hasOwnProperty(n)&&t.attr(n,e[n])}return function(r){return"fo"===r.textPlacement?n:"old"===r.textPlacement?t:e}}(),be={drawRect:fe,drawText:le,drawLabel:he,drawActor:function(t,e,n,r,i){var o=e+i.width/2,a=t.append("g");0===n&&(de++,a.append("line").attr("id","actor"+de).attr("x1",o).attr("y1",5).attr("x2",o).attr("y2",2e3).attr("class","actor-line").attr("stroke-width","0.5px").attr("stroke","#999"));var u=ge();u.x=e,u.y=n,u.fill="#eaeaea",u.width=i.width,u.height=i.height,u.class="actor",u.rx=3,u.ry=3,fe(a,u),ye(i)(r,a,u.x,u.y,u.width,u.height,{class:"actor"},i)},anchorElement:function(t){return t.append("g")},drawActivation:function(t,e,n,r,i){var o=ge(),a=e.anchored;o.x=e.startx,o.y=e.starty,o.class="activation"+i%3,o.width=e.stopx-e.startx,o.height=n-e.starty,fe(a,o)},drawLoop:function(t,e,n,r){var i=t.append("g"),o=function(t,e,n,r){return i.append("line").attr("x1",t).attr("y1",e).attr("x2",n).attr("y2",r).attr("class","loopLine")};o(e.startx,e.starty,e.stopx,e.starty),o(e.stopx,e.starty,e.stopx,e.stopy),o(e.startx,e.stopy,e.stopx,e.stopy),o(e.startx,e.starty,e.startx,e.stopy),void 0!==e.sections&&e.sections.forEach((function(t){o(e.startx,t,e.stopx,t).style("stroke-dasharray","3, 3")}));var a=pe();a.text=n,a.x=e.startx,a.y=e.starty,a.labelMargin=15,a.class="labelText",he(i,a),(a=pe()).text="[ "+e.title+" ]",a.x=e.startx+(e.stopx-e.startx)/2,a.y=e.starty+1.5*r.boxMargin,a.anchor="middle",a.class="loopText",le(i,a),void 0!==e.sectionTitles&&e.sectionTitles.forEach((function(t,n){""!==t&&(a.text="[ "+t+" ]",a.y=e.sections[n]+1.5*r.boxMargin,le(i,a))}))},drawBackgroundRect:function(t,e){fe(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,class:"rect"}).lower()},insertArrowHead:function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},insertSequenceNumber:function(t){t.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},insertArrowCrossHead:function(t){var e=t.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);e.append("path").attr("fill","black").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 9,2 V 6 L16,4 Z"),e.append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 0,1 L 6,7 M 6,1 L 0,7")},getTextObj:pe,getNoteRect:ge},ve=n(1),me=n.n(ve),_e={},we=[],xe=[],ke="",Ee=!1,Ae=function(t,e,n){var r=_e[t];r&&e===r.name&&null==n||(null==n&&(n=e),_e[t]={name:e,description:n})},Se=function(t,e,n,r){if(J.debug("Adding message from="+t+" to="+e+" message="+n+" type="+r),r===Me.ACTIVE_END){var i=function(t){var e=0,n=0;for(e=0;e<we.length;e++)we[e].type===Me.ACTIVE_START&&we[e].from.actor===t&&n++,we[e].type===Me.ACTIVE_END&&we[e].from.actor===t&&n--;return n}(t.actor);if(J.debug("Adding message from=",we,i),i<1){var o=new Error("Trying to inactivate an inactive participant ("+t.actor+")");throw o.hash={text:"->>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},o}}return we.push({from:t,to:e,message:n,type:r}),!0},Me={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23},Te=function(t,e,n){var r={actor:t,placement:e,message:n},i=[].concat(t,t);xe.push(r),we.push({from:i[0],to:i[1],message:n,type:Me.NOTE,placement:e})},Oe=function(t){ke=t},De={addActor:Ae,addMessage:function(t,e,n,r){we.push({from:t,to:e,message:n,answer:r})},addSignal:Se,enableSequenceNumbers:function(){Ee=!0},showSequenceNumbers:function(){return Ee},getMessages:function(){return we},getActors:function(){return _e},getActor:function(t){return _e[t]},getActorKeys:function(){return Object.keys(_e)},getTitle:function(){return ke},clear:function(){_e={},we=[]},LINETYPE:Me,ARROWTYPE:{FILLED:0,OPEN:1},PLACEMENT:{LEFTOF:0,RIGHTOF:1,OVER:2},addNote:Te,setTitle:Oe,apply:function t(e){if(e instanceof Array)e.forEach((function(e){t(e)}));else switch(e.type){case"addActor":Ae(e.actor,e.actor,e.description);break;case"activeStart":case"activeEnd":Se(e.actor,void 0,void 0,e.signalType);break;case"addNote":Te(e.actor,e.placement,e.text);break;case"addMessage":Se(e.from,e.to,e.msg,e.signalType);break;case"loopStart":Se(void 0,void 0,e.loopText,e.signalType);break;case"loopEnd":Se(void 0,void 0,void 0,e.signalType);break;case"rectStart":Se(void 0,void 0,e.color,e.signalType);break;case"rectEnd":Se(void 0,void 0,void 0,e.signalType);break;case"optStart":Se(void 0,void 0,e.optText,e.signalType);break;case"optEnd":Se(void 0,void 0,void 0,e.signalType);break;case"altStart":case"else":Se(void 0,void 0,e.altText,e.signalType);break;case"altEnd":Se(void 0,void 0,void 0,e.signalType);break;case"setTitle":Oe(e.text);break;case"parStart":case"and":Se(void 0,void 0,e.parText,e.signalType);break;case"parEnd":Se(void 0,void 0,void 0,e.signalType)}}};function Ce(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}ve.parser.yy=De;var Ne={diagramMarginX:50,diagramMarginY:30,actorMargin:50,width:150,height:65,actorFontSize:14,actorFontFamily:'"Open-Sans", "sans-serif"',boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!1,bottomMarginAdj:1,activationWidth:10,textPlacement:"tspan",showSequenceNumbers:!1},Ie={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],activations:[],init:function(){this.sequenceItems=[],this.activations=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},updateVal:function(t,e,n,r){void 0===t[e]?t[e]=n:t[e]=r(n,t[e])},updateBounds:function(t,e,n,r){var i=this,o=0;function a(a){return function(u){o++;var s=i.sequenceItems.length-o+1;i.updateVal(u,"starty",e-s*Ne.boxMargin,Math.min),i.updateVal(u,"stopy",r+s*Ne.boxMargin,Math.max),i.updateVal(Ie.data,"startx",t-s*Ne.boxMargin,Math.min),i.updateVal(Ie.data,"stopx",n+s*Ne.boxMargin,Math.max),"activation"!==a&&(i.updateVal(u,"startx",t-s*Ne.boxMargin,Math.min),i.updateVal(u,"stopx",n+s*Ne.boxMargin,Math.max),i.updateVal(Ie.data,"starty",e-s*Ne.boxMargin,Math.min),i.updateVal(Ie.data,"stopy",r+s*Ne.boxMargin,Math.max))}}this.sequenceItems.forEach(a()),this.activations.forEach(a("activation"))},insert:function(t,e,n,r){var i=Math.min(t,n),o=Math.max(t,n),a=Math.min(e,r),u=Math.max(e,r);this.updateVal(Ie.data,"startx",i,Math.min),this.updateVal(Ie.data,"starty",a,Math.min),this.updateVal(Ie.data,"stopx",o,Math.max),this.updateVal(Ie.data,"stopy",u,Math.max),this.updateBounds(i,a,o,u)},newActivation:function(t,e){var n=ve.parser.yy.getActors()[t.from.actor],r=Le(t.from.actor).length,i=n.x+Ne.width/2+(r-1)*Ne.activationWidth/2;this.activations.push({startx:i,starty:this.verticalPos+2,stopx:i+Ne.activationWidth,stopy:void 0,actor:t.from.actor,anchored:be.anchorElement(e)})},endActivation:function(t){var e=this.activations.map((function(t){return t.actor})).lastIndexOf(t.from.actor);return this.activations.splice(e,1)[0]},newLoop:function(t,e){this.sequenceItems.push({startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:t,fill:e})},endLoop:function(){return this.sequenceItems.pop()},addSectionToLoop:function(t){var e=this.sequenceItems.pop();e.sections=e.sections||[],e.sectionTitles=e.sectionTitles||[],e.sections.push(Ie.getVerticalPos()),e.sectionTitles.push(t),this.sequenceItems.push(e)},bumpVerticalPos:function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},getVerticalPos:function(){return this.verticalPos},getBounds:function(){return this.data}},Re=function(t,e,n,r,i){var o=be.getNoteRect();o.x=e,o.y=n,o.width=i||Ne.width,o.class="note";var a=t.append("g"),u=be.drawRect(a,o),s=function(t,e,n,r,i){var o=0,a=t.split(/<br\s*\/?>/gi),u=!0,s=!1,c=void 0;try{for(var f,l=a[Symbol.iterator]();!(u=(f=l.next()).done);u=!0){var h=f.value,d=be.getTextObj();d.x=e,d.y=n+o,d.textMargin=Ne.noteMargin,d.dy="1em",d.text=h,d.class="noteText";var p=be.drawText(r,d,i);o+=(p._groups||p)[0][0].getBBox().height}}catch(t){s=!0,c=t}finally{try{u||null==l.return||l.return()}finally{if(s)throw c}}return o}(r.message,e-4,n+24,a,o.width-Ne.noteMargin);Ie.insert(e,n,e+o.width,n+2*Ne.noteMargin+s),u.attr("height",s+2*Ne.noteMargin),Ie.bumpVerticalPos(s+2*Ne.noteMargin)},je=function(t,e,n,r){for(var i=0;i<n.length;i++){var o=n[i];e[o].x=i*Ne.actorMargin+i*Ne.width,e[o].y=r,e[o].width=Ne.diagramMarginX,e[o].height=Ne.diagramMarginY,be.drawActor(t,e[o].x,r,e[o].description,Ne),Ie.insert(e[o].x,r,e[o].x+Ne.width,Ne.height)}Ie.bumpVerticalPos(Ne.height)},Le=function(t){return Ie.activations.filter((function(e){return e.actor===t}))},Be=function(t){var e=ve.parser.yy.getActors(),n=Le(t);return[n.reduce((function(t,e){return Math.min(t,e.startx)}),e[t].x+Ne.width/2),n.reduce((function(t,e){return Math.max(t,e.stopx)}),e[t].x+Ne.width/2)]},Pe=function(t){Object.keys(t).forEach((function(e){Ne[e]=t[e]})),Ne.actorFontFamily=t.fontFamily},Fe=function(t,e){ve.parser.yy.clear(),ve.parser.parse(t+"\n"),Ie.init();var n,r,i,o=D.k('[id="'.concat(e,'"]')),a=ve.parser.yy.getActors(),u=ve.parser.yy.getActorKeys(),s=ve.parser.yy.getMessages(),c=ve.parser.yy.getTitle();je(o,a,u,0),be.insertArrowHead(o),be.insertArrowCrossHead(o),be.insertSequenceNumber(o);var f=1;s.forEach((function(t){var e;switch(t.type){case ve.parser.yy.LINETYPE.NOTE:Ie.bumpVerticalPos(Ne.boxMargin),n=a[t.from].x,r=a[t.to].x,t.placement===ve.parser.yy.PLACEMENT.RIGHTOF?Re(o,n+(Ne.width+Ne.actorMargin)/2,Ie.getVerticalPos(),t):t.placement===ve.parser.yy.PLACEMENT.LEFTOF?Re(o,n-(Ne.width+Ne.actorMargin)/2,Ie.getVerticalPos(),t):t.to===t.from?Re(o,n,Ie.getVerticalPos(),t):(i=Math.abs(n-r)+Ne.actorMargin,Re(o,(n+r+Ne.width-i)/2,Ie.getVerticalPos(),t,i));break;case ve.parser.yy.LINETYPE.ACTIVE_START:Ie.newActivation(t,o);break;case ve.parser.yy.LINETYPE.ACTIVE_END:!function(t,e){var n=Ie.endActivation(t);n.starty+18>e&&(n.starty=e-6,e+=12),be.drawActivation(o,n,e,Ne,Le(t.from.actor).length),Ie.insert(n.startx,e-10,n.stopx,e)}(t,Ie.getVerticalPos());break;case ve.parser.yy.LINETYPE.LOOP_START:Ie.bumpVerticalPos(Ne.boxMargin),Ie.newLoop(t.message),Ie.bumpVerticalPos(Ne.boxMargin+Ne.boxTextMargin);break;case ve.parser.yy.LINETYPE.LOOP_END:e=Ie.endLoop(),be.drawLoop(o,e,"loop",Ne),Ie.bumpVerticalPos(Ne.boxMargin);break;case ve.parser.yy.LINETYPE.RECT_START:Ie.bumpVerticalPos(Ne.boxMargin),Ie.newLoop(void 0,t.message),Ie.bumpVerticalPos(Ne.boxMargin);break;case ve.parser.yy.LINETYPE.RECT_END:var u=Ie.endLoop();be.drawBackgroundRect(o,u),Ie.bumpVerticalPos(Ne.boxMargin);break;case ve.parser.yy.LINETYPE.OPT_START:Ie.bumpVerticalPos(Ne.boxMargin),Ie.newLoop(t.message),Ie.bumpVerticalPos(Ne.boxMargin+Ne.boxTextMargin);break;case ve.parser.yy.LINETYPE.OPT_END:e=Ie.endLoop(),be.drawLoop(o,e,"opt",Ne),Ie.bumpVerticalPos(Ne.boxMargin);break;case ve.parser.yy.LINETYPE.ALT_START:Ie.bumpVerticalPos(Ne.boxMargin),Ie.newLoop(t.message),Ie.bumpVerticalPos(Ne.boxMargin+Ne.boxTextMargin);break;case ve.parser.yy.LINETYPE.ALT_ELSE:Ie.bumpVerticalPos(Ne.boxMargin),e=Ie.addSectionToLoop(t.message),Ie.bumpVerticalPos(Ne.boxMargin);break;case ve.parser.yy.LINETYPE.ALT_END:e=Ie.endLoop(),be.drawLoop(o,e,"alt",Ne),Ie.bumpVerticalPos(Ne.boxMargin);break;case ve.parser.yy.LINETYPE.PAR_START:Ie.bumpVerticalPos(Ne.boxMargin),Ie.newLoop(t.message),Ie.bumpVerticalPos(Ne.boxMargin+Ne.boxTextMargin);break;case ve.parser.yy.LINETYPE.PAR_AND:Ie.bumpVerticalPos(Ne.boxMargin),e=Ie.addSectionToLoop(t.message),Ie.bumpVerticalPos(Ne.boxMargin);break;case ve.parser.yy.LINETYPE.PAR_END:e=Ie.endLoop(),be.drawLoop(o,e,"par",Ne),Ie.bumpVerticalPos(Ne.boxMargin);break;default:try{Ie.bumpVerticalPos(Ne.messageMargin);var s=Be(t.from),c=Be(t.to),l=s[0]<=c[0]?1:0,h=s[0]<c[0]?0:1;n=s[l],r=c[h];var d=Ie.getVerticalPos();!function(t,e,n,r,i,o){var a=t.append("g"),u=e+(n-e)/2,s=[],c=0,f=i.message.split(/<br\s*\/?>/gi),l=!0,h=!1,d=void 0;try{for(var p,g=f[Symbol.iterator]();!(l=(p=g.next()).done);l=!0){var y=p.value;s.push(a.append("text").attr("x",u).attr("y",r-7+17*c).style("text-anchor","middle").attr("class","messageText").text(y.trim())),c++}}catch(t){h=!0,d=t}finally{try{l||null==g.return||g.return()}finally{if(h)throw d}}for(var b,v=17*(c-1),m=s.map((function(t){return(t._groups||t)[0][0].getBBox().width})),_=Math.max.apply(Math,Ce(m)),w=0,x=s;w<x.length;w++){var k=x[w];"left"===Ne.messageAlign?k.attr("x",u-_/2).style("text-anchor","start"):"right"===Ne.messageAlign&&k.attr("x",u+_/2).style("text-anchor","end")}if(Ie.bumpVerticalPos(v),e===n){b=Ne.rightAngles?a.append("path").attr("d","M ".concat(e,",").concat(r+v," H ").concat(e+Ne.width/2," V ").concat(r+25+v," H ").concat(e)):a.append("path").attr("d","M "+e+","+(r+v)+" C "+(e+60)+","+(r-10+v)+" "+(e+60)+","+(r+30+v)+" "+e+","+(r+20+v)),Ie.bumpVerticalPos(30+v);var E=Math.max(_/2,100);Ie.insert(e-E,Ie.getVerticalPos()-10+v,n+E,Ie.getVerticalPos()+v)}else(b=a.append("line")).attr("x1",e),b.attr("y1",r+v),b.attr("x2",n),b.attr("y2",r+v),Ie.insert(e,Ie.getVerticalPos()-10+v,n,Ie.getVerticalPos()+v);i.type===ve.parser.yy.LINETYPE.DOTTED||i.type===ve.parser.yy.LINETYPE.DOTTED_CROSS||i.type===ve.parser.yy.LINETYPE.DOTTED_OPEN?(b.style("stroke-dasharray","3, 3"),b.attr("class","messageLine1")):b.attr("class","messageLine0");var A="";Ne.arrowMarkerAbsolute&&(A=(A=(A=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),b.attr("stroke-width",2),b.attr("stroke","black"),b.style("fill","none"),i.type!==ve.parser.yy.LINETYPE.SOLID&&i.type!==ve.parser.yy.LINETYPE.DOTTED||b.attr("marker-end","url("+A+"#arrowhead)"),i.type!==ve.parser.yy.LINETYPE.SOLID_CROSS&&i.type!==ve.parser.yy.LINETYPE.DOTTED_CROSS||b.attr("marker-end","url("+A+"#crosshead)"),(De.showSequenceNumbers()||Ne.showSequenceNumbers)&&(b.attr("marker-start","url("+A+"#sequencenumber)"),a.append("text").attr("x",e).attr("y",r+4).attr("font-family","sans-serif").attr("font-size","12px").attr("text-anchor","middle").attr("textLength","16px").attr("class","sequenceNumber").text(o))}(o,n,r,d,t,f);var p=s.concat(c);Ie.insert(Math.min.apply(null,p),d,Math.max.apply(null,p),d)}catch(t){J.error("error while drawing message",t)}}[ve.parser.yy.LINETYPE.SOLID_OPEN,ve.parser.yy.LINETYPE.DOTTED_OPEN,ve.parser.yy.LINETYPE.SOLID,ve.parser.yy.LINETYPE.DOTTED,ve.parser.yy.LINETYPE.SOLID_CROSS,ve.parser.yy.LINETYPE.DOTTED_CROSS].includes(t.type)&&f++})),Ne.mirrorActors&&(Ie.bumpVerticalPos(2*Ne.boxMargin),je(o,a,u,Ie.getVerticalPos()));var l=Ie.getBounds();J.debug("For line height fix Querying: #"+e+" .actor-line"),D.l("#"+e+" .actor-line").attr("y2",l.stopy);var h=l.stopy-l.starty+2*Ne.diagramMarginY;Ne.mirrorActors&&(h=h-Ne.boxMargin+Ne.bottomMarginAdj);var d=l.stopx-l.startx+2*Ne.diagramMarginX;c&&o.append("text").text(c).attr("x",(l.stopx-l.startx)/2-2*Ne.diagramMarginX).attr("y",-25),Ne.useMaxWidth?(o.attr("height","100%"),o.attr("width","100%"),o.attr("style","max-width:"+d+"px;")):(o.attr("height",h),o.attr("width",d));var p=c?40:0;o.attr("viewBox",l.startx-Ne.diagramMarginX+" -"+(Ne.diagramMarginY+p)+" "+d+" "+(h+p))},qe=n(59),Ue=n.n(qe);function ze(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var Ye,Ve,Ge=V(),He="",We="",$e=[],Ke="",Ze=[],Xe=[],Je="",Qe=["active","done","crit","milestone"],tn=[],en=!1,nn=function(t,e,n){return t.isoWeekday()>=6&&n.indexOf("weekends")>=0||(n.indexOf(t.format("dddd").toLowerCase())>=0||n.indexOf(t.format(e.trim()))>=0)},rn=function(t,e,n){if(n.length&&!t.manualEndTime){var r=H()(t.startTime,e,!0);r.add(1,"d");var i=H()(t.endTime,e,!0),o=on(r,i,e,n);t.endTime=i.toDate(),t.renderEndTime=o}},on=function(t,e,n,r){for(var i=!1,o=null;t<=e;)i||(o=e.toDate()),(i=nn(t,n,r))&&e.add(1,"d"),t.add(1,"d");return o},an=function(t,e,n){n=n.trim();var r=/^after\s+([\d\w- ]+)/.exec(n.trim());if(null!==r){var i=null;if(r[1].split(" ").forEach((function(t){var e=dn(t);void 0!==e&&(i?e.endTime>i.endTime&&(i=e):i=e)})),i)return i.endTime;var o=new Date;return o.setHours(0,0,0,0),o}var a=H()(n,e.trim(),!0);return a.isValid()?a.toDate():(J.debug("Invalid date:"+n),J.debug("With date format:"+e.trim()),new Date)},un=function(t,e){if(null!==t)switch(t[2]){case"s":e.add(t[1],"seconds");break;case"m":e.add(t[1],"minutes");break;case"h":e.add(t[1],"hours");break;case"d":e.add(t[1],"days");break;case"w":e.add(t[1],"weeks")}return e.toDate()},sn=function(t,e,n,r){r=r||!1,n=n.trim();var i=H()(n,e.trim(),!0);return i.isValid()?(r&&i.add(1,"d"),i.toDate()):un(/^([\d]+)([wdhms])/.exec(n.trim()),H()(t))},cn=0,fn=function(t){return void 0===t?"task"+(cn+=1):t},ln=[],hn={},dn=function(t){var e=hn[t];return ln[e]},pn=function(){for(var t=function(t){var e=ln[t],n="";switch(ln[t].raw.startTime.type){case"prevTaskEnd":var r=dn(e.prevTaskId);e.startTime=r.endTime;break;case"getStartDate":(n=an(0,He,ln[t].raw.startTime.startData))&&(ln[t].startTime=n)}return ln[t].startTime&&(ln[t].endTime=sn(ln[t].startTime,He,ln[t].raw.endTime.data,en),ln[t].endTime&&(ln[t].processed=!0,ln[t].manualEndTime=H()(ln[t].raw.endTime.data,"YYYY-MM-DD",!0).isValid(),rn(ln[t],He,$e))),ln[t].processed},e=!0,n=0;n<ln.length;n++)t(n),e=e&&ln[n].processed;return e},gn=function(t,e){t.split(",").forEach((function(t){var n=dn(t);void 0!==n&&n.classes.push(e)}))},yn=function(t,e){tn.push((function(){var n=document.querySelector('[id="'.concat(t,'"]'));null!==n&&n.addEventListener("click",(function(){e()}))})),tn.push((function(){var n=document.querySelector('[id="'.concat(t,'-text"]'));null!==n&&n.addEventListener("click",(function(){e()}))}))},bn={clear:function(){Ze=[],Xe=[],Je="",tn=[],Ke="",cn=0,Ye=void 0,Ve=void 0,ln=[],He="",We="",$e=[],en=!1},setDateFormat:function(t){He=t},getDateFormat:function(){return He},enableInclusiveEndDates:function(){en=!0},endDatesAreInclusive:function(){return en},setAxisFormat:function(t){We=t},getAxisFormat:function(){return We},setTitle:function(t){Ke=t},getTitle:function(){return Ke},addSection:function(t){Je=t,Ze.push(t)},getSections:function(){return Ze},getTasks:function(){for(var t=pn(),e=0;!t&&e<10;)t=pn(),e++;return Xe=ln},addTask:function(t,e){var n={section:Je,type:Je,processed:!1,manualEndTime:!1,renderEndTime:null,raw:{data:e},task:t,classes:[]},r=function(t,e){var n=(":"===e.substr(0,1)?e.substr(1,e.length):e).split(","),r={};vn(n,r,Qe);for(var i=0;i<n.length;i++)n[i]=n[i].trim();switch(n.length){case 1:r.id=fn(),r.startTime={type:"prevTaskEnd",id:t},r.endTime={data:n[0]};break;case 2:r.id=fn(),r.startTime={type:"getStartDate",startData:n[0]},r.endTime={data:n[1]};break;case 3:r.id=fn(n[0]),r.startTime={type:"getStartDate",startData:n[1]},r.endTime={data:n[2]}}return r}(Ve,e);n.raw.startTime=r.startTime,n.raw.endTime=r.endTime,n.id=r.id,n.prevTaskId=Ve,n.active=r.active,n.done=r.done,n.crit=r.crit,n.milestone=r.milestone;var i=ln.push(n);Ve=n.id,hn[n.id]=i-1},findTaskById:dn,addTaskOrg:function(t,e){var n={section:Je,type:Je,description:t,task:t,classes:[]},r=function(t,e){var n=(":"===e.substr(0,1)?e.substr(1,e.length):e).split(","),r={};vn(n,r,Qe);for(var i=0;i<n.length;i++)n[i]=n[i].trim();var o="";switch(n.length){case 1:r.id=fn(),r.startTime=t.endTime,o=n[0];break;case 2:r.id=fn(),r.startTime=an(0,He,n[0]),o=n[1];break;case 3:r.id=fn(n[0]),r.startTime=an(0,He,n[1]),o=n[2]}return o&&(r.endTime=sn(r.startTime,He,o,en),r.manualEndTime=H()(o,"YYYY-MM-DD",!0).isValid(),rn(r,He,$e)),r}(Ye,e);n.startTime=r.startTime,n.endTime=r.endTime,n.id=r.id,n.active=r.active,n.done=r.done,n.crit=r.crit,n.milestone=r.milestone,Ye=n,Xe.push(n)},setExcludes:function(t){$e=t.toLowerCase().split(/[\s,]+/)},getExcludes:function(){return $e},setClickEvent:function(t,e,n){t.split(",").forEach((function(t){!function(t,e,n){if("loose"===Ge.securityLevel&&void 0!==e){var r=[];if("string"==typeof n){r=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(var i=0;i<r.length;i++){var o=r[i].trim();'"'===o.charAt(0)&&'"'===o.charAt(o.length-1)&&(o=o.substr(1,o.length-2)),r[i]=o}}0===r.length&&r.push(t),void 0!==dn(t)&&yn(t,(function(){var t;(t=window)[e].apply(t,ze(r))}))}}(t,e,n)})),gn(t,"clickable")},setLink:function(t,e){var n=e;"loose"!==Ge.securityLevel&&(n=Object(et.sanitizeUrl)(e)),t.split(",").forEach((function(t){void 0!==dn(t)&&yn(t,(function(){window.open(n,"_self")}))})),gn(t,"clickable")},bindFunctions:function(t){tn.forEach((function(e){e(t)}))},durationToDate:un};function vn(t,e,n){for(var r=!0;r;)r=!1,n.forEach((function(n){var i=new RegExp("^\\s*"+n+"\\s*$");t[0].match(i)&&(e[n]=!0,t.shift(1),r=!0)}))}qe.parser.yy=bn;var mn,_n={titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"'},wn=function(t){Object.keys(t).forEach((function(e){_n[e]=t[e]}))},xn=function(t,e){qe.parser.yy.clear(),qe.parser.parse(t);var n=document.getElementById(e);void 0===(mn=n.parentElement.offsetWidth)&&(mn=1200),void 0!==_n.useWidth&&(mn=_n.useWidth);var r=qe.parser.yy.getTasks(),i=r.length*(_n.barHeight+_n.barGap)+2*_n.topPadding;n.setAttribute("height","100%"),n.setAttribute("viewBox","0 0 "+mn+" "+i);for(var o=D.k('[id="'.concat(e,'"]')),a=T.y().domain([u.o(r,(function(t){return t.startTime})),u.k(r,(function(t){return t.endTime}))]).rangeRound([0,mn-_n.leftPadding-_n.rightPadding]),c=[],f=0;f<r.length;f++)c.push(r[f].type);var l=c;function h(t){for(var e=t.length,n={};e;)n[t[--e]]=(n[t[e]]||0)+1;return n}c=function(t){for(var e={},n=[],r=0,i=t.length;r<i;++r)e.hasOwnProperty(t[r])||(e[t[r]]=!0,n.push(t[r]));return n}(c),function(t,e,n){var r=_n.barHeight,i=r+_n.barGap,u=_n.topPadding,f=_n.leftPadding;T.i().domain([0,c.length]).range(["#00B9FA","#F95002"]).interpolate(k.i);(function(t,e,n,r){var i=s.a(a).tickSize(-r+e+_n.gridLineStartPadding).tickFormat(I.c(qe.parser.yy.getAxisFormat()||_n.axisFormat||"%Y-%m-%d"));o.append("g").attr("class","grid").attr("transform","translate("+t+", "+(r-50)+")").call(i).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em")})(f,u,0,n),function(t,e,n,r,i,u,s){o.append("g").selectAll("rect").data(t).enter().append("rect").attr("x",0).attr("y",(function(t,r){return r*e+n-2})).attr("width",(function(){return s-_n.rightPadding/2})).attr("height",e).attr("class",(function(t){for(var e=0;e<c.length;e++)if(t.type===c[e])return"section section"+e%_n.numberSectionStyles;return"section section0"}));var f=o.append("g").selectAll("rect").data(t).enter();f.append("rect").attr("id",(function(t){return t.id})).attr("rx",3).attr("ry",3).attr("x",(function(t){return t.milestone?a(t.startTime)+r+.5*(a(t.endTime)-a(t.startTime))-.5*i:a(t.startTime)+r})).attr("y",(function(t,r){return r*e+n})).attr("width",(function(t){return t.milestone?i:a(t.renderEndTime||t.endTime)-a(t.startTime)})).attr("height",i).attr("transform-origin",(function(t,o){return(a(t.startTime)+r+.5*(a(t.endTime)-a(t.startTime))).toString()+"px "+(o*e+n+.5*i).toString()+"px"})).attr("class",(function(t){var e="";t.classes.length>0&&(e=t.classes.join(" "));for(var n=0,r=0;r<c.length;r++)t.type===c[r]&&(n=r%_n.numberSectionStyles);var i="";return t.active?t.crit?i+=" activeCrit":i=" active":t.done?i=t.crit?" doneCrit":" done":t.crit&&(i+=" crit"),0===i.length&&(i=" task"),t.milestone&&(i=" milestone "+i),i+=n,"task"+(i+=" "+e)})),f.append("text").attr("id",(function(t){return t.id+"-text"})).text((function(t){return t.task})).attr("font-size",_n.fontSize).attr("x",(function(t){var e=a(t.startTime),n=a(t.renderEndTime||t.endTime);t.milestone&&(e+=.5*(a(t.endTime)-a(t.startTime))-.5*i),t.milestone&&(n=e+i);var o=this.getBBox().width;return o>n-e?n+o+1.5*_n.leftPadding>s?e+r-5:n+r+5:(n-e)/2+e+r})).attr("y",(function(t,r){return r*e+_n.barHeight/2+(_n.fontSize/2-2)+n})).attr("text-height",i).attr("class",(function(t){var e=a(t.startTime),n=a(t.endTime);t.milestone&&(n=e+i);var r=this.getBBox().width,o="";t.classes.length>0&&(o=t.classes.join(" "));for(var u=0,f=0;f<c.length;f++)t.type===c[f]&&(u=f%_n.numberSectionStyles);var l="";return t.active&&(l=t.crit?"activeCritText"+u:"activeText"+u),t.done?l=t.crit?l+" doneCritText"+u:l+" doneText"+u:t.crit&&(l=l+" critText"+u),t.milestone&&(l+=" milestoneText"),r>n-e?n+r+1.5*_n.leftPadding>s?o+" taskTextOutsideLeft taskTextOutside"+u+" "+l:o+" taskTextOutsideRight taskTextOutside"+u+" "+l+" width-"+r:o+" taskText taskText"+u+" "+l+" width-"+r}))}(t,i,u,f,r,0,e),function(t,e){for(var n=[],r=0,i=0;i<c.length;i++)n[i]=[c[i],(a=c[i],u=l,h(u)[a]||0)];var a,u;o.append("g").selectAll("text").data(n).enter().append((function(t){var e=t[0].split(/<br\s*\/?>/gi),n=-(e.length-1)/2,r=document.createElementNS("http://www.w3.org/2000/svg","text");r.setAttribute("dy",n+"em");for(var i=0;i<e.length;i++){var o=document.createElementNS("http://www.w3.org/2000/svg","tspan");o.setAttribute("alignment-baseline","central"),o.setAttribute("x","10"),i>0&&o.setAttribute("dy","1em"),o.textContent=e[i],r.appendChild(o)}return r})).attr("x",10).attr("y",(function(i,o){if(!(o>0))return i[1]*t/2+e;for(var a=0;a<o;a++)return r+=n[o-1][1],i[1]*t/2+r*t+e})).attr("class",(function(t){for(var e=0;e<c.length;e++)if(t[0]===c[e])return"sectionTitle sectionTitle"+e%_n.numberSectionStyles;return"sectionTitle"}))}(i,u),function(t,e,n,r){var i=o.append("g").attr("class","today"),u=new Date;i.append("line").attr("x1",a(u)+t).attr("x2",a(u)+t).attr("y1",_n.titleTopMargin).attr("y2",r-_n.titleTopMargin).attr("class","today")}(f,0,0,n)}(r,mn,i),void 0!==_n.useWidth&&n.setAttribute("width",mn),o.append("text").text(qe.parser.yy.getTitle()).attr("x",mn/2).attr("y",_n.titleTopMargin).attr("class","titleText")},kn=n(114),En=n.n(kn),An=V(),Sn=[],Mn={},Tn=0,On=[],Dn=function(t){var e="",n=t;if(t.indexOf("~")>0){var r=t.split("~");n=r[0],e=r[1]}return{className:n,type:e}},Cn=function(t){var e=Dn(t);void 0===Mn[e.className]&&(Mn[e.className]={id:e.className,type:e.type,cssClasses:[],methods:[],members:[],annotations:[],domId:"classid-"+e.className+"-"+Tn},Tn++)},Nn=function(t){for(var e=Object.keys(Mn),n=0;n<e.length;n++)if(Mn[e[n]].id===t)return Mn[e[n]].domId},In=function(t,e){var n=Dn(t).className,r=Mn[n];if("string"==typeof e){var i=e.trim();i.startsWith("<<")&&i.endsWith(">>")?r.annotations.push(i.substring(2,i.length-2)):i.indexOf(")")>0?r.methods.push(i):i&&r.members.push(i)}},Rn=function(t,e){t.split(",").forEach((function(t){var n=t;t[0].match(/\d/)&&(n="classid-"+n),void 0!==Mn[n]&&Mn[n].cssClasses.push(e)}))},jn=function(t,e,n){var r=t,i=Nn(r);"loose"===An.securityLevel&&void 0!==e&&void 0!==Mn[r]&&(n&&(Mn[r].tooltip=gt(n,An)),On.push((function(){var t=document.querySelector('[id="'.concat(i,'"]'));null!==t&&t.addEventListener("click",(function(){window[e](i)}),!1)})))},Ln=function(t){var e=D.k(".mermaidTooltip");null===(e._groups||e)[0][0]&&(e=D.k("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),D.k(t).select("svg").selectAll("g.node").on("mouseover",(function(){var t=D.k(this);if(null!==t.attr("title")){var n=this.getBoundingClientRect();e.transition().duration(200).style("opacity",".9"),e.html(t.attr("title")).style("left",n.left+(n.right-n.left)/2+"px").style("top",n.top-14+document.body.scrollTop+"px"),t.classed("hover",!0)}})).on("mouseout",(function(){e.transition().duration(500).style("opacity",0),D.k(this).classed("hover",!1)}))};On.push(Ln);var Bn={addClass:Cn,bindFunctions:function(t){On.forEach((function(e){e(t)}))},clear:function(){Sn=[],Mn={},(On=[]).push(Ln)},getClass:function(t){return Mn[t]},getClasses:function(){return Mn},addAnnotation:function(t,e){var n=Dn(t).className;Mn[n].annotations.push(e)},getRelations:function(){return Sn},addRelation:function(t){J.debug("Adding relation: "+JSON.stringify(t)),Cn(t.id1),Cn(t.id2),t.id1=Dn(t.id1).className,t.id2=Dn(t.id2).className,Sn.push(t)},addMember:In,addMembers:function(t,e){Array.isArray(e)&&(e.reverse(),e.forEach((function(e){return In(t,e)})))},cleanupLabel:function(t){return":"===t.substring(0,1)?t.substr(1).trim():t.trim()},lineType:{LINE:0,DOTTED_LINE:1},relationType:{AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3},setClickEvent:function(t,e,n){t.split(",").forEach((function(t){jn(t,e,n)})),Rn(t,"clickable")},setCssClass:Rn,setLink:function(t,e,n){t.split(",").forEach((function(t){var r=t;t[0].match(/\d/)&&(r="classid-"+r),void 0!==Mn[r]&&(Mn[r].link=ct(e,An),n&&(Mn[r].tooltip=gt(n,An)))})),Rn(t,"clickable")},lookUpDomId:Nn},Pn=n(117),Fn=n.n(Pn),qn=0,Un=function(t){var e=t.match(/^(\+|-|~|#)?(\w+)(~\w+~|\[\])?\s+(\w+)$/),n=t.match(/^(\+|-|~|#)?(\w+)\s?\(\s*(\w+(~\w+~|\[\])?\s*(\w+)?)?\s*\)\s?([*|$])?\s?(\w+(~\w+~|\[\])?)?\s*$/);return e?zn(e):n?Yn(n):Vn(t)},zn=function(t){return{displayText:(t[1]?t[1].trim():"")+(t[2]?t[2].trim():"")+(t[3]?Hn(t[3]):"")+" "+(t[4]?t[4].trim():""),cssStyle:""}},Yn=function(t){var e=t[1]?t[1].trim():"",n=t[2]?t[2].trim():"",r=t[3]?Hn(t[3]):"",i=t[6]?t[6].trim():"";return{displayText:e+n+"("+r+")"+(t[7]?" : "+Hn(t[7]).trim():""),cssStyle:Wn(i)}},Vn=function(t){var e="",n="",r="",i=t.indexOf("("),o=t.indexOf(")");if(i>1&&o>i&&o<=t.length){var a=t.match(/(\+|-|~|#)?(\w+)/),u=a[1]?a[1].trim():"",s=a[2],c=t.substring(i+1,o),f=t.substring(o,o+1);n=Wn(f),o<(e=u+s+"("+Hn(c.trim())+")").length&&""!==(r=t.substring(o+2).trim())&&(r=" : "+Hn(r))}else e=Hn(t);return{displayText:e+r,cssStyle:n}},Gn=function(t,e,n,r){var i=Un(e),o=t.append("tspan").attr("x",r.padding).text(i.displayText);""!==i.cssStyle&&o.attr("style",i.cssStyle),n||o.attr("dy",r.textHeight)},Hn=function t(e){var n=e;return-1!=e.indexOf("~")?t(n=(n=n.replace("~","<")).replace("~",">")):n},Wn=function(t){switch(t){case"*":return"font-style:italic;";case"$":return"text-decoration:underline;";default:return""}},$n=function(t,e,n){J.info("Rendering class "+e);var r="classGroup ";e.cssClasses.length>0&&(r+=e.cssClasses.join(" "));var i,o=e.id,a={id:o,label:e.id,width:0,height:0},u=t.append("g").attr("id",Nn(o)).attr("class",r);i=e.link?u.append("svg:a").attr("xlink:href",e.link).attr("target","_blank").append("text").attr("y",n.textHeight+n.padding).attr("x",0):u.append("text").attr("y",n.textHeight+n.padding).attr("x",0);var s=!0;e.annotations.forEach((function(t){var e=i.append("tspan").text("«"+t+"»");s||e.attr("dy",n.textHeight),s=!1}));var c=e.id;void 0!==e.type&&""!==e.type&&(c+="<"+e.type+">");var f=i.append("tspan").text(c).attr("class","title");s||f.attr("dy",n.textHeight);var l=i.node().getBBox().height,h=u.append("line").attr("x1",0).attr("y1",n.padding+l+n.dividerMargin/2).attr("y2",n.padding+l+n.dividerMargin/2),d=u.append("text").attr("x",n.padding).attr("y",l+n.dividerMargin+n.textHeight).attr("fill","white").attr("class","classText");s=!0,e.members.forEach((function(t){Gn(d,t,s,n),s=!1}));var p=d.node().getBBox(),g=u.append("line").attr("x1",0).attr("y1",n.padding+l+n.dividerMargin+p.height).attr("y2",n.padding+l+n.dividerMargin+p.height),y=u.append("text").attr("x",n.padding).attr("y",l+2*n.dividerMargin+p.height+n.textHeight).attr("fill","white").attr("class","classText");s=!0,e.methods.forEach((function(t){Gn(y,t,s,n),s=!1}));var b=u.node().getBBox(),v=u.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",b.width+2*n.padding).attr("height",b.height+n.padding+.5*n.dividerMargin).node().getBBox().width;return i.node().childNodes.forEach((function(t){t.setAttribute("x",(v-t.getBBox().width)/2)})),e.tooltip&&i.insert("title").text(e.tooltip),h.attr("x2",v),g.attr("x2",v),a.width=v,a.height=b.height+n.padding+.5*n.dividerMargin,a},Kn=function(t,e,n,r){var i=function(t){switch(t){case Bn.relationType.AGGREGATION:return"aggregation";case Bn.relationType.EXTENSION:return"extension";case Bn.relationType.COMPOSITION:return"composition";case Bn.relationType.DEPENDENCY:return"dependency"}};e.points=e.points.filter((function(t){return!Number.isNaN(t.y)}));var o,a,u=e.points,s=C.v().x((function(t){return t.x})).y((function(t){return t.y})).curve(C.d),c=t.append("path").attr("d",s(u)).attr("id","edge"+qn).attr("class","relation"),f="";r.arrowMarkerAbsolute&&(f=(f=(f=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),1==n.relation.lineType&&c.attr("class","relation dashed-line"),"none"!==n.relation.type1&&c.attr("marker-start","url("+f+"#"+i(n.relation.type1)+"Start)"),"none"!==n.relation.type2&&c.attr("marker-end","url("+f+"#"+i(n.relation.type2)+"End)");var l,h,d,p,g=e.points.length,y=ut(e.points);if(o=y.x,a=y.y,g%2!=0&&g>1){var b=st("none"!==n.relation.type1,e.points,e.points[0]),v=st("none"!==n.relation.type2,e.points,e.points[g-1]);J.debug("cardinality_1_point "+JSON.stringify(b)),J.debug("cardinality_2_point "+JSON.stringify(v)),l=b.x,h=b.y,d=v.x,p=v.y}if(void 0!==n.title){var m=t.append("g").attr("class","classLabel"),_=m.append("text").attr("class","label").attr("x",o).attr("y",a).attr("fill","red").attr("text-anchor","middle").text(n.title);window.label=_;var w=_.node().getBBox();m.insert("rect",":first-child").attr("class","box").attr("x",w.x-r.padding/2).attr("y",w.y-r.padding/2).attr("width",w.width+r.padding).attr("height",w.height+r.padding)}(J.info("Rendering relation "+JSON.stringify(n)),void 0!==n.relationTitle1&&"none"!==n.relationTitle1)&&t.append("g").attr("class","cardinality").append("text").attr("class","type1").attr("x",l).attr("y",h).attr("fill","black").attr("font-size","6").text(n.relationTitle1);void 0!==n.relationTitle2&&"none"!==n.relationTitle2&&t.append("g").attr("class","cardinality").append("text").attr("class","type2").attr("x",d).attr("y",p).attr("fill","black").attr("font-size","6").text(n.relationTitle2);qn++};Pn.parser.yy=Bn;var Zn={},Xn={dividerMargin:10,padding:5,textHeight:10},Jn=function(t){for(var e=Object.keys(Zn),n=0;n<e.length;n++)if(Zn[e[n]].label===t)return e[n]},Qn=function(t){Object.keys(t).forEach((function(e){Xn[e]=t[e]}))},tr=function(t,e){Zn={},Pn.parser.yy.clear(),Pn.parser.parse(t),J.info("Rendering diagram "+t);var n,r=D.k("[id='".concat(e,"']"));(n=r).append("defs").append("marker").attr("id","extensionStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),n.append("defs").append("marker").attr("id","extensionEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z"),n.append("defs").append("marker").attr("id","compositionStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),n.append("defs").append("marker").attr("id","compositionEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),n.append("defs").append("marker").attr("id","aggregationStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),n.append("defs").append("marker").attr("id","aggregationEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),n.append("defs").append("marker").attr("id","dependencyStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),n.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z");var i=new lt.a.Graph({multigraph:!0});i.setGraph({isMultiGraph:!0}),i.setDefaultEdgeLabel((function(){return{}}));for(var o=Bn.getClasses(),a=Object.keys(o),u=0;u<a.length;u++){var s=o[a[u]],c=$n(r,s,Xn);Zn[c.id]=c,i.setNode(c.id,c),J.info("Org height: "+c.height)}Bn.getRelations().forEach((function(t){J.info("tjoho"+Jn(t.id1)+Jn(t.id2)+JSON.stringify(t)),i.setEdge(Jn(t.id1),Jn(t.id2),{relation:t},t.title||"DEFAULT")})),En.a.layout(i),i.nodes().forEach((function(t){void 0!==t&&void 0!==i.node(t)&&(J.debug("Node "+t+": "+JSON.stringify(i.node(t))),D.k("#"+Nn(t)).attr("transform","translate("+(i.node(t).x-i.node(t).width/2)+","+(i.node(t).y-i.node(t).height/2)+" )"))})),i.edges().forEach((function(t){void 0!==t&&void 0!==i.edge(t)&&(J.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(i.edge(t))),Kn(r,i.edge(t),i.edge(t).relation,Xn))})),r.attr("height",i.graph().height+40),r.attr("width",1.5*i.graph().width+20),r.attr("viewBox","-10 -10 "+(i.graph().width+20)+" "+(i.graph().height+20))};function er(t){return(er="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)}var nr,rr=[],ir={root:{relations:[],states:{},documents:{}}},or=ir.root,ar=0,ur=function(t,e,n,r,i){void 0===or.states[t]?or.states[t]={id:t,descriptions:[],type:e,doc:n,note:i}:(or.states[t].doc||(or.states[t].doc=n),or.states[t].type||(or.states[t].type=e)),r&&("string"==typeof r&&fr(t,r.trim()),"object"===er(r)&&r.forEach((function(e){return fr(t,e.trim())}))),i&&(or.states[t].note=i)},sr=function(){or=(ir={root:{relations:[],states:{},documents:{}}}).root},cr=function(t,e,n){var r=t,i=e,o="default",a="default";"[*]"===t&&(r="start"+ ++ar,o="start"),"[*]"===e&&(i="end"+ar,a="end"),ur(r,o),ur(i,a),or.relations.push({id1:r,id2:i,title:n})},fr=function(t,e){var n=or.states[t],r=e;":"===r[0]&&(r=r.substr(1).trim()),n.descriptions.push(r)},lr=0,hr={addState:ur,clear:sr,getState:function(t){return or.states[t]},getStates:function(){return or.states},getRelations:function(){return or.relations},addRelation:cr,getDividerId:function(){return"divider-id-"+ ++lr},cleanupLabel:function(t){return":"===t.substring(0,1)?t.substr(2).trim():t.trim()},lineType:{LINE:0,DOTTED_LINE:1},relationType:{AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3},logDocuments:function(){J.info("Documents = ",ir)},getRootDoc:function(){return rr},setRootDoc:function(t){J.info("Setting root doc",t),rr=t},extract:function(t){sr(),t.forEach((function(t){"state"===t.stmt&&ur(t.id,t.type,t.doc,t.description,t.note),"relation"===t.stmt&&cr(t.state1.id,t.state2.id,t.description)}))}},dr=n(118),pr=n.n(dr),gr={},yr=function(t,e){gr[t]=e},br=function(t,e){var n=t.append("text").attr("x",2*V().state.padding).attr("y",V().state.textHeight+1.3*V().state.padding).attr("font-size",V().state.fontSize).attr("class","state-title").text(e.descriptions[0]).node().getBBox(),r=n.height,i=t.append("text").attr("x",V().state.padding).attr("y",r+.4*V().state.padding+V().state.dividerMargin+V().state.textHeight).attr("class","state-description"),o=!0,a=!0;e.descriptions.forEach((function(t){o||(!function(t,e,n){var r=t.append("tspan").attr("x",2*V().state.padding).text(e);n||r.attr("dy",V().state.textHeight)}(i,t,a),a=!1),o=!1}));var u=t.append("line").attr("x1",V().state.padding).attr("y1",V().state.padding+r+V().state.dividerMargin/2).attr("y2",V().state.padding+r+V().state.dividerMargin/2).attr("class","descr-divider"),s=i.node().getBBox(),c=Math.max(s.width,n.width);return u.attr("x2",c+3*V().state.padding),t.insert("rect",":first-child").attr("x",V().state.padding).attr("y",V().state.padding).attr("width",c+2*V().state.padding).attr("height",s.height+r+2*V().state.padding).attr("rx",V().state.radius),t},vr=function(t,e,n){var r,i=V().state.padding,o=2*V().state.padding,a=t.node().getBBox(),u=a.width,s=a.x,c=t.append("text").attr("x",0).attr("y",V().state.titleShift).attr("font-size",V().state.fontSize).attr("class","state-title").text(e.id),f=c.node().getBBox().width+o,l=Math.max(f,u);l===u&&(l+=o);var h=t.node().getBBox();e.doc,r=s-i,f>u&&(r=(u-l)/2+i),Math.abs(s-h.x)<i&&f>u&&(r=s-(f-u)/2);var d=1-V().state.textHeight;return t.insert("rect",":first-child").attr("x",r).attr("y",d).attr("class",n?"alt-composit":"composit").attr("width",l).attr("height",h.height+V().state.textHeight+V().state.titleShift+1).attr("rx","0"),c.attr("x",r+i),f<=u&&c.attr("x",s+(l-o)/2-f/2+i),t.insert("rect",":first-child").attr("x",r).attr("y",V().state.titleShift-V().state.textHeight-V().state.padding).attr("width",l).attr("height",3*V().state.textHeight).attr("rx",V().state.radius),t.insert("rect",":first-child").attr("x",r).attr("y",V().state.titleShift-V().state.textHeight-V().state.padding).attr("width",l).attr("height",h.height+3+2*V().state.textHeight).attr("rx",V().state.radius),t},mr=function(t,e){e.attr("class","state-note");var n=e.append("rect").attr("x",0).attr("y",V().state.padding),r=function(t,e,n,r){var i=0,o=r.append("text");o.style("text-anchor","start"),o.attr("class","noteText");var a=t.replace(/\r\n/g,"<br/>"),u=(a=a.replace(/\n/g,"<br/>")).split(/<br\s*\/?>/gi),s=1.25*V().state.noteMargin,c=!0,f=!1,l=void 0;try{for(var h,d=u[Symbol.iterator]();!(c=(h=d.next()).done);c=!0){var p=h.value.trim();if(p.length>0){var g=o.append("tspan");if(g.text(p),0===s)s+=g.node().getBBox().height;i+=s,g.attr("x",e+V().state.noteMargin),g.attr("y",n+i+1.25*V().state.noteMargin)}}}catch(t){f=!0,l=t}finally{try{c||null==d.return||d.return()}finally{if(f)throw l}}return{textWidth:o.node().getBBox().width,textHeight:i}}(t,0,0,e.append("g")),i=r.textWidth,o=r.textHeight;return n.attr("height",o+2*V().state.noteMargin),n.attr("width",i+2*V().state.noteMargin),n},_r=function(t,e){var n=e.id,r={id:n,label:e.id,width:0,height:0},i=t.append("g").attr("id",n).attr("class","stateGroup");"start"===e.type&&function(t){t.append("circle").style("stroke","black").style("fill","black").attr("r",V().state.sizeUnit).attr("cx",V().state.padding+V().state.sizeUnit).attr("cy",V().state.padding+V().state.sizeUnit)}(i),"end"===e.type&&function(t){t.append("circle").style("stroke","black").style("fill","white").attr("r",V().state.sizeUnit+V().state.miniPadding).attr("cx",V().state.padding+V().state.sizeUnit+V().state.miniPadding).attr("cy",V().state.padding+V().state.sizeUnit+V().state.miniPadding),t.append("circle").style("stroke","black").style("fill","black").attr("r",V().state.sizeUnit).attr("cx",V().state.padding+V().state.sizeUnit+2).attr("cy",V().state.padding+V().state.sizeUnit+2)}(i),"fork"!==e.type&&"join"!==e.type||function(t,e){var n=V().state.forkWidth,r=V().state.forkHeight;if(e.parentId){var i=n;n=r,r=i}t.append("rect").style("stroke","black").style("fill","black").attr("width",n).attr("height",r).attr("x",V().state.padding).attr("y",V().state.padding)}(i,e),"note"===e.type&&mr(e.note.text,i),"divider"===e.type&&function(t){t.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",V().state.textHeight).attr("class","divider").attr("x2",2*V().state.textHeight).attr("y1",0).attr("y2",0)}(i),"default"===e.type&&0===e.descriptions.length&&function(t,e){var n=t.append("text").attr("x",2*V().state.padding).attr("y",V().state.textHeight+2*V().state.padding).attr("font-size",V().state.fontSize).attr("class","state-title").text(e.id),r=n.node().getBBox();t.insert("rect",":first-child").attr("x",V().state.padding).attr("y",V().state.padding).attr("width",r.width+2*V().state.padding).attr("height",r.height+2*V().state.padding).attr("rx",V().state.radius)}(i,e),"default"===e.type&&e.descriptions.length>0&&br(i,e);var o=i.node().getBBox();return r.width=o.width+2*V().state.padding,r.height=o.height+2*V().state.padding,yr(n,r),r},wr=0;dr.parser.yy=hr;var xr={},kr=function t(e,n,r,i){var o,a=new lt.a.Graph({compound:!0,multigraph:!0}),u=!0;for(o=0;o<e.length;o++)if("relation"===e[o].stmt){u=!1;break}r?a.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:u?1:nr.edgeLengthFactor,nodeSep:u?1:50,isMultiGraph:!0}):a.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:u?1:nr.edgeLengthFactor,nodeSep:u?1:50,ranker:"tight-tree",isMultiGraph:!0}),a.setDefaultEdgeLabel((function(){return{}})),hr.extract(e);for(var s=hr.getStates(),c=hr.getRelations(),f=Object.keys(s),l=0;l<f.length;l++){var h=s[f[l]];r&&(h.parentId=r);var d=void 0;if(h.doc){var p=n.append("g").attr("id",h.id).attr("class","stateGroup");d=t(h.doc,p,h.id,!i);var g=(p=vr(p,h,i)).node().getBBox();d.width=g.width,d.height=g.height+nr.padding/2,xr[h.id]={y:nr.compositTitleSize}}else d=_r(n,h);if(h.note){var y={descriptions:[],id:h.id+"-note",note:h.note,type:"note"},b=_r(n,y);"left of"===h.note.position?(a.setNode(d.id+"-note",b),a.setNode(d.id,d)):(a.setNode(d.id,d),a.setNode(d.id+"-note",b)),a.setParent(d.id,d.id+"-group"),a.setParent(d.id+"-note",d.id+"-group")}else a.setNode(d.id,d)}J.debug("Count=",a.nodeCount(),a);var v=0;c.forEach((function(t){var e;v++,J.debug("Setting edge",t),a.setEdge(t.id1,t.id2,{relation:t,width:(e=t.title,e?e.length*nr.fontSizeFactor:1),height:nr.labelHeight*pt(t.title).length,labelpos:"c"},"id"+v)})),En.a.layout(a),J.debug("Graph after layout",a.nodes());var m=n.node();a.nodes().forEach((function(t){void 0!==t&&void 0!==a.node(t)?(J.warn("Node "+t+": "+JSON.stringify(a.node(t))),D.k("#"+m.id+" #"+t).attr("transform","translate("+(a.node(t).x-a.node(t).width/2)+","+(a.node(t).y+(xr[t]?xr[t].y:0)-a.node(t).height/2)+" )"),D.k("#"+m.id+" #"+t).attr("data-x-shift",a.node(t).x-a.node(t).width/2),document.querySelectorAll("#"+m.id+" #"+t+" .divider").forEach((function(t){var e=t.parentElement,n=0,r=0;e&&(e.parentElement&&(n=e.parentElement.getBBox().width),r=parseInt(e.getAttribute("data-x-shift"),10),Number.isNaN(r)&&(r=0)),t.setAttribute("x1",0-r+8),t.setAttribute("x2",n-r-8)}))):J.debug("No Node "+t+": "+JSON.stringify(a.node(t)))}));var _=m.getBBox();a.edges().forEach((function(t){void 0!==t&&void 0!==a.edge(t)&&(J.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(a.edge(t))),function(t,e,n){e.points=e.points.filter((function(t){return!Number.isNaN(t.y)}));var r=e.points,i=C.v().x((function(t){return t.x})).y((function(t){return t.y})).curve(C.d),o=t.append("path").attr("d",i(r)).attr("id","edge"+wr).attr("class","transition"),a="";if(V().state.arrowMarkerAbsolute&&(a=(a=(a=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),o.attr("marker-end","url("+a+"#"+function(t){switch(t){case hr.relationType.AGGREGATION:return"aggregation";case hr.relationType.EXTENSION:return"extension";case hr.relationType.COMPOSITION:return"composition";case hr.relationType.DEPENDENCY:return"dependency"}}(hr.relationType.DEPENDENCY)+"End)"),void 0!==n.title){for(var u=t.append("g").attr("class","stateLabel"),s=ut(e.points),c=s.x,f=s.y,l=pt(n.title),h=0,d=[],p=0,g=0,y=0;y<=l.length;y++){var b=u.append("text").attr("text-anchor","middle").text(l[y]).attr("x",c).attr("y",f+h),v=b.node().getBBox();if(p=Math.max(p,v.width),g=Math.min(g,v.x),J.info(v.x,c,f+h),0===h){var m=b.node().getBBox();h=m.height,J.info("Title height",h,f)}d.push(b)}var _=h*l.length;if(l.length>1){var w=(l.length-1)*h*.5;d.forEach((function(t,e){return t.attr("y",f+e*h-w)})),_=h*l.length}var x=u.node().getBBox();u.insert("rect",":first-child").attr("class","box").attr("x",c-p/2-V().state.padding/2).attr("y",f-_/2-V().state.padding/2-3.5).attr("width",p+V().state.padding).attr("height",_+V().state.padding),J.info(x)}wr++}(n,a.edge(t),a.edge(t).relation))})),_=m.getBBox();var w={id:r||"root",label:r||"root",width:0,height:0};return w.width=_.width+2*nr.padding,w.height=_.height+2*nr.padding,J.debug("Doc rendered",w,a),w},Er=function(){},Ar=function(t,e){nr=V().state,dr.parser.yy.clear(),dr.parser.parse(t),J.debug("Rendering diagram "+t);var n=D.k("[id='".concat(e,"']"));n.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z"),new lt.a.Graph({multigraph:!0,compound:!0,rankdir:"RL"}).setDefaultEdgeLabel((function(){return{}}));var r=hr.getRootDoc();kr(r,n,void 0,!1);var i=nr.padding,o=n.node().getBBox(),a=o.width+2*i,u=o.height+2*i;n.attr("width",1.75*a),n.attr("viewBox","".concat(o.x-nr.padding," ").concat(o.y-nr.padding," ")+a+" "+u)},Sr=n(119),Mr=n.n(Sr),Tr=n(448),Or=n.n(Tr),Dr={},Cr=null,Nr={master:Cr},Ir="master",Rr="LR",jr=0;function Lr(){return Or()({length:7,characters:"0123456789abcdef"})}function Br(t,e){for(J.debug("Entering isfastforwardable:",t.id,e.id);t.seq<=e.seq&&t!==e&&null!=e.parent;){if(Array.isArray(e.parent))return J.debug("In merge commit:",e.parent),Br(t,Dr[e.parent[0]])||Br(t,Dr[e.parent[1]]);e=Dr[e.parent]}return J.debug(t.id,e.id),t.id===e.id}var Pr={};function Fr(t,e,n){var r=t.indexOf(e);-1===r?t.push(n):t.splice(r,1,n)}var qr,Ur=function(){var t=Object.keys(Dr).map((function(t){return Dr[t]}));return t.forEach((function(t){J.debug(t.id)})),Mr.a.orderBy(t,["seq"],["desc"])},zr={setDirection:function(t){Rr=t},setOptions:function(t){J.debug("options str",t),t=(t=t&&t.trim())||"{}";try{Pr=JSON.parse(t)}catch(t){J.error("error while parsing gitGraph options",t.message)}},getOptions:function(){return Pr},commit:function(t){var e={id:Lr(),message:t,seq:jr++,parent:null==Cr?null:Cr.id};Cr=e,Dr[e.id]=e,Nr[Ir]=e.id,J.debug("in pushCommit "+e.id)},branch:function(t){Nr[t]=null!=Cr?Cr.id:null,J.debug("in createBranch")},merge:function(t){var e=Dr[Nr[Ir]],n=Dr[Nr[t]];if(function(t,e){return t.seq>e.seq&&Br(e,t)}(e,n))J.debug("Already merged");else{if(Br(e,n))Nr[Ir]=Nr[t],Cr=Dr[Nr[Ir]];else{var r={id:Lr(),message:"merged branch "+t+" into "+Ir,seq:jr++,parent:[null==Cr?null:Cr.id,Nr[t]]};Cr=r,Dr[r.id]=r,Nr[Ir]=r.id}J.debug(Nr),J.debug("in mergeBranch")}},checkout:function(t){J.debug("in checkout");var e=Nr[Ir=t];Cr=Dr[e]},reset:function(t){J.debug("in reset",t);var e=t.split(":")[0],n=parseInt(t.split(":")[1]),r="HEAD"===e?Cr:Dr[Nr[e]];for(J.debug(r,n);n>0;)if(n--,!(r=Dr[r.parent])){var i="Critical error - unique parent commit not found during reset";throw J.error(i),i}Cr=r,Nr[Ir]=r.id},prettyPrint:function(){J.debug(Dr),function t(e){var n=Mr.a.maxBy(e,"seq"),r="";e.forEach((function(t){r+=t===n?"\t*":"\t|"}));var i=[r,n.id,n.seq];for(var o in Nr)Nr[o]===n.id&&i.push(o);if(J.debug(i.join(" ")),Array.isArray(n.parent)){var a=Dr[n.parent[0]];Fr(e,n,a),e.push(Dr[n.parent[1]])}else{if(null==n.parent)return;var u=Dr[n.parent];Fr(e,n,u)}t(e=Mr.a.uniqBy(e,"id"))}([Ur()[0]])},clear:function(){Dr={},Nr={master:Cr=null},Ir="master",jr=0},getBranchesAsObjArray:function(){var t=[];for(var e in Nr)t.push({name:e,commit:Dr[Nr[e]]});return t},getBranches:function(){return Nr},getCommits:function(){return Dr},getCommitsArray:Ur,getCurrentBranch:function(){return Ir},getDirection:function(){return Rr},getHead:function(){return Cr}},Yr=n(213),Vr=n.n(Yr),Gr={},Hr={nodeSpacing:150,nodeFillColor:"yellow",nodeStrokeWidth:2,nodeStrokeColor:"grey",lineStrokeWidth:4,branchOffset:50,lineColor:"grey",leftMargin:50,branchColors:["#442f74","#983351","#609732","#AA9A39"],nodeRadius:10,nodeLabel:{width:75,height:100,x:-25,y:0}},Wr={};function $r(t,e,n,r){var i=nt(r,C.d),o=Hr.branchColors[n%Hr.branchColors.length],a=C.v().x((function(t){return Math.round(t.x)})).y((function(t){return Math.round(t.y)})).curve(i);t.append("svg:path").attr("d",a(e)).style("stroke",o).style("stroke-width",Hr.lineStrokeWidth).style("fill","none")}function Kr(t,e){e=e||t.node().getBBox();var n=t.node().getCTM();return{left:n.e+e.x*n.a,top:n.f+e.y*n.d,width:e.width,height:e.height}}function Zr(t,e,n,r,i){J.debug("svgDrawLineForCommits: ",e,n);var o=Kr(t.select("#node-"+e+" circle")),a=Kr(t.select("#node-"+n+" circle"));switch(r){case"LR":if(o.left-a.left>Hr.nodeSpacing){var u={x:o.left-Hr.nodeSpacing,y:a.top+a.height/2};$r(t,[u,{x:a.left+a.width,y:a.top+a.height/2}],i,"linear"),$r(t,[{x:o.left,y:o.top+o.height/2},{x:o.left-Hr.nodeSpacing/2,y:o.top+o.height/2},{x:o.left-Hr.nodeSpacing/2,y:u.y},u],i)}else $r(t,[{x:o.left,y:o.top+o.height/2},{x:o.left-Hr.nodeSpacing/2,y:o.top+o.height/2},{x:o.left-Hr.nodeSpacing/2,y:a.top+a.height/2},{x:a.left+a.width,y:a.top+a.height/2}],i);break;case"BT":if(a.top-o.top>Hr.nodeSpacing){var s={x:a.left+a.width/2,y:o.top+o.height+Hr.nodeSpacing};$r(t,[s,{x:a.left+a.width/2,y:a.top}],i,"linear"),$r(t,[{x:o.left+o.width/2,y:o.top+o.height},{x:o.left+o.width/2,y:o.top+o.height+Hr.nodeSpacing/2},{x:a.left+a.width/2,y:s.y-Hr.nodeSpacing/2},s],i)}else $r(t,[{x:o.left+o.width/2,y:o.top+o.height},{x:o.left+o.width/2,y:o.top+Hr.nodeSpacing/2},{x:a.left+a.width/2,y:a.top-Hr.nodeSpacing/2},{x:a.left+a.width/2,y:a.top}],i)}}function Xr(t,e){return t.select(e).node().cloneNode(!0)}function Jr(t,e,n,r){var i,o=Object.keys(Gr).length;if("string"==typeof e)do{if(i=Gr[e],J.debug("in renderCommitHistory",i.id,i.seq),t.select("#node-"+e).size()>0)return;t.append((function(){return Xr(t,"#def-commit")})).attr("class","commit").attr("id",(function(){return"node-"+i.id})).attr("transform",(function(){switch(r){case"LR":return"translate("+(i.seq*Hr.nodeSpacing+Hr.leftMargin)+", "+qr*Hr.branchOffset+")";case"BT":return"translate("+(qr*Hr.branchOffset+Hr.leftMargin)+", "+(o-i.seq)*Hr.nodeSpacing+")"}})).attr("fill",Hr.nodeFillColor).attr("stroke",Hr.nodeStrokeColor).attr("stroke-width",Hr.nodeStrokeWidth);var a=void 0;for(var u in n)if(n[u].commit===i){a=n[u];break}a&&(J.debug("found branch ",a.name),t.select("#node-"+i.id+" p").append("xhtml:span").attr("class","branch-label").text(a.name+", ")),t.select("#node-"+i.id+" p").append("xhtml:span").attr("class","commit-id").text(i.id),""!==i.message&&"BT"===r&&t.select("#node-"+i.id+" p").append("xhtml:span").attr("class","commit-msg").text(", "+i.message),e=i.parent}while(e&&Gr[e]);Array.isArray(e)&&(J.debug("found merge commmit",e),Jr(t,e[0],n,r),qr++,Jr(t,e[1],n,r),qr--)}function Qr(t,e,n,r){for(r=r||0;e.seq>0&&!e.lineDrawn;)"string"==typeof e.parent?(Zr(t,e.id,e.parent,n,r),e.lineDrawn=!0,e=Gr[e.parent]):Array.isArray(e.parent)&&(Zr(t,e.id,e.parent[0],n,r),Zr(t,e.id,e.parent[1],n,r+1),Qr(t,Gr[e.parent[1]],n,r+1),e.lineDrawn=!0,e=Gr[e.parent[0]])}var ti,ei=function(t){Wr=t},ni=function(t,e,n){try{var r=Vr.a.parser;r.yy=zr,r.yy.clear(),J.debug("in gitgraph renderer",t+"\n","id:",e,n),r.parse(t+"\n"),Hr=Mr.a.assign(Hr,Wr,zr.getOptions()),J.debug("effective options",Hr);var i=zr.getDirection();Gr=zr.getCommits();var o=zr.getBranchesAsObjArray();"BT"===i&&(Hr.nodeLabel.x=o.length*Hr.branchOffset,Hr.nodeLabel.width="100%",Hr.nodeLabel.y=-2*Hr.nodeRadius);var a=D.k('[id="'.concat(e,'"]'));for(var u in function(t){t.append("defs").append("g").attr("id","def-commit").append("circle").attr("r",Hr.nodeRadius).attr("cx",0).attr("cy",0),t.select("#def-commit").append("foreignObject").attr("width",Hr.nodeLabel.width).attr("height",Hr.nodeLabel.height).attr("x",Hr.nodeLabel.x).attr("y",Hr.nodeLabel.y).attr("class","node-label").attr("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility").append("p").html("")}(a),qr=1,o){var s=o[u];Jr(a,s.commit.id,o,i),Qr(a,s.commit,i),qr++}a.attr("height",(function(){return"BT"===i?Object.keys(Gr).length*Hr.nodeSpacing:(o.length+1)*Hr.branchOffset}))}catch(t){J.error("Error while rendering gitgraph"),J.error(t.message)}},ri="",ii=!1,oi={setMessage:function(t){J.debug("Setting message to: "+t),ri=t},getMessage:function(){return ri},setInfo:function(t){ii=t},getInfo:function(){return ii}},ai=n(214),ui=n.n(ai),si={},ci=function(t){Object.keys(t).forEach((function(e){si[e]=t[e]}))},fi=function(t,e,n){try{var r=ui.a.parser;r.yy=oi,J.debug("Renering info diagram\n"+t),r.parse(t),J.debug("Parsed info diagram");var i=D.k("#"+e);i.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size","32px").style("text-anchor","middle").text("v "+n),i.attr("height",100),i.attr("width",400)}catch(t){J.error("Error while rendering info diagram"),J.error(t.message)}},li={},hi="",di={addSection:function(t,e){void 0===li[t]&&(li[t]=e,J.debug("Added new section :",t))},getSections:function(){return li},cleanupValue:function(t){return":"===t.substring(0,1)?(t=t.substring(1).trim(),Number(t.trim())):Number(t.trim())},clear:function(){li={},hi=""},setTitle:function(t){hi=t},getTitle:function(){return hi}},pi=n(215),gi=n.n(pi),yi={},bi=function(t){Object.keys(t).forEach((function(e){yi[e]=t[e]}))},vi=function(t,e){try{var n=gi.a.parser;n.yy=di,J.debug("Rendering info diagram\n"+t),n.yy.clear(),n.parse(t),J.debug("Parsed info diagram");var r=document.getElementById(e);void 0===(ti=r.parentElement.offsetWidth)&&(ti=1200),void 0!==yi.useWidth&&(ti=yi.useWidth);r.setAttribute("height","100%"),r.setAttribute("viewBox","0 0 "+ti+" 450");var i=ti,o=Math.min(i,450)/2-40,a=D.k("#"+e).append("svg").attr("width",i).attr("height",450).append("g").attr("transform","translate("+i/2+",225)"),u=di.getSections(),s=0;Object.keys(u).forEach((function(t){s+=u[t]})),J.info(u);var c=T.k().domain(u).range(O.pb),f=C.A().value((function(t){return t.value}))(l.a(u)),h=C.a().innerRadius(0).outerRadius(o);a.selectAll("mySlices").data(f).enter().append("path").attr("d",h).attr("fill",(function(t){return c(t.data.key)})).attr("stroke","black").style("stroke-width","2px").style("opacity",.7),a.selectAll("mySlices").data(f).enter().append("text").text((function(t){return(t.data.value/s*100).toFixed(0)+"%"})).attr("transform",(function(t){return"translate("+h.centroid(t)+")"})).style("text-anchor","middle").attr("class","slice").style("font-size",17),a.append("text").text(n.yy.getTitle()).attr("x",0).attr("y",-200).attr("class","pieTitleText");var d=a.selectAll(".legend").data(c.domain()).enter().append("g").attr("class","legend").attr("transform",(function(t,e){return"translate(216,"+(22*e-22*c.domain().length/2)+")"}));d.append("rect").attr("width",18).attr("height",18).style("fill",c).style("stroke",c),d.append("text").attr("x",22).attr("y",14).text((function(t){return t}))}catch(t){J.error("Error while rendering info diagram"),J.error(t.message)}},mi={},_i=[],wi="",xi={Cardinality:{ZERO_OR_ONE:"ZERO_OR_ONE",ZERO_OR_MORE:"ZERO_OR_MORE",ONE_OR_MORE:"ONE_OR_MORE",ONLY_ONE:"ONLY_ONE"},Identification:{NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},addEntity:function(t){void 0===mi[t]&&(mi[t]=t,J.debug("Added new entity :",t))},getEntities:function(){return mi},addRelationship:function(t,e,n,r){var i={entityA:t,roleA:e,entityB:n,relSpec:r};_i.push(i),J.debug("Added new relationship :",i)},getRelationships:function(){return _i},clear:function(){mi={},_i=[],wi=""},setTitle:function(t){wi=t},getTitle:function(){return wi}},ki=n(216),Ei=n.n(ki),Ai={ONLY_ONE_START:"ONLY_ONE_START",ONLY_ONE_END:"ONLY_ONE_END",ZERO_OR_ONE_START:"ZERO_OR_ONE_START",ZERO_OR_ONE_END:"ZERO_OR_ONE_END",ONE_OR_MORE_START:"ONE_OR_MORE_START",ONE_OR_MORE_END:"ONE_OR_MORE_END",ZERO_OR_MORE_START:"ZERO_OR_MORE_START",ZERO_OR_MORE_END:"ZERO_OR_MORE_END"},Si=Ai,Mi=function(t,e){var n;t.append("defs").append("marker").attr("id",Ai.ONLY_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M9,0 L9,18 M15,0 L15,18"),t.append("defs").append("marker").attr("id",Ai.ONLY_ONE_END).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M3,0 L3,18 M9,0 L9,18"),(n=t.append("defs").append("marker").attr("id",Ai.ZERO_OR_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto")).append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),n.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M9,0 L9,18"),(n=t.append("defs").append("marker").attr("id",Ai.ZERO_OR_ONE_END).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto")).append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),n.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M21,0 L21,18"),t.append("defs").append("marker").attr("id",Ai.ONE_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),t.append("defs").append("marker").attr("id",Ai.ONE_OR_MORE_END).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18"),(n=t.append("defs").append("marker").attr("id",Ai.ZERO_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto")).append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),n.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18"),(n=t.append("defs").append("marker").attr("id",Ai.ZERO_OR_MORE_END).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto")).append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),n.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},Ti={},Oi=function(t){return(t.entityA+t.roleA+t.entityB).replace(/\s/g,"")},Di=0,Ci=function(t){for(var e=Object.keys(t),n=0;n<e.length;n++)Ti[e[n]]=t[e[n]]},Ni=function(t,e){J.info("Drawing ER diagram"),xi.clear();var n=Ei.a.parser;n.yy=xi;try{n.parse(t)}catch(t){J.debug("Parsing failed")}var r,i=D.k("[id='".concat(e,"']"));Mi(i,Ti),r=new lt.a.Graph({multigraph:!0,directed:!0,compound:!1}).setGraph({rankdir:Ti.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel((function(){return{}}));var o,a,u,s,c=(o=i,a=xi.getEntities(),u=r,Object.keys(a).forEach((function(t){var e=o.append("g").attr("id",t);s=void 0===s?t:s;var n="entity-"+t,r=e.append("text").attr("id",n).attr("x",0).attr("y",(Ti.fontSize+2*Ti.entityPadding)/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("style","font-family: "+V().fontFamily+"; font-size: "+Ti.fontSize).text(t),i=r.node().getBBox(),a=Math.max(Ti.minEntityWidth,i.width+2*Ti.entityPadding),c=Math.max(Ti.minEntityHeight,i.height+2*Ti.entityPadding);r.attr("transform","translate("+a/2+","+c/2+")");var f=e.insert("rect","#"+n).attr("fill",Ti.fill).attr("fill-opacity","100%").attr("stroke",Ti.stroke).attr("x",0).attr("y",0).attr("width",a).attr("height",c).node().getBBox();u.setNode(t,{width:f.width,height:f.height,shape:"rect",id:t})})),s),f=function(t,e){return t.forEach((function(t){e.setEdge(t.entityA,t.entityB,{relationship:t},Oi(t))})),t}(xi.getRelationships(),r);En.a.layout(r),function(t,e){e.nodes().forEach((function(n){void 0!==n&&void 0!==e.node(n)&&t.select("#"+n).attr("transform","translate("+(e.node(n).x-e.node(n).width/2)+","+(e.node(n).y-e.node(n).height/2)+" )")}))}(i,r),f.forEach((function(t){!function(t,e,n,r){Di++;var i=n.edge(e.entityA,e.entityB,Oi(e)),o=C.v().x((function(t){return t.x})).y((function(t){return t.y})).curve(C.d),a=t.insert("path","#"+r).attr("d",o(i.points)).attr("stroke",Ti.stroke).attr("fill","none");e.relSpec.relType===xi.Identification.NON_IDENTIFYING&&a.attr("stroke-dasharray","8,8");var u="";switch(Ti.arrowMarkerAbsolute&&(u=(u=(u=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),e.relSpec.cardA){case xi.Cardinality.ZERO_OR_ONE:a.attr("marker-end","url("+u+"#"+Si.ZERO_OR_ONE_END+")");break;case xi.Cardinality.ZERO_OR_MORE:a.attr("marker-end","url("+u+"#"+Si.ZERO_OR_MORE_END+")");break;case xi.Cardinality.ONE_OR_MORE:a.attr("marker-end","url("+u+"#"+Si.ONE_OR_MORE_END+")");break;case xi.Cardinality.ONLY_ONE:a.attr("marker-end","url("+u+"#"+Si.ONLY_ONE_END+")")}switch(e.relSpec.cardB){case xi.Cardinality.ZERO_OR_ONE:a.attr("marker-start","url("+u+"#"+Si.ZERO_OR_ONE_START+")");break;case xi.Cardinality.ZERO_OR_MORE:a.attr("marker-start","url("+u+"#"+Si.ZERO_OR_MORE_START+")");break;case xi.Cardinality.ONE_OR_MORE:a.attr("marker-start","url("+u+"#"+Si.ONE_OR_MORE_START+")");break;case xi.Cardinality.ONLY_ONE:a.attr("marker-start","url("+u+"#"+Si.ONLY_ONE_START+")")}var s=a.node().getTotalLength(),c=a.node().getPointAtLength(.5*s),f="rel"+Di,l=t.append("text").attr("id",f).attr("x",c.x).attr("y",c.y).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("style","font-family: "+V().fontFamily+"; font-size: "+Ti.fontSize).text(e.roleA).node().getBBox();t.insert("rect","#"+f).attr("x",c.x-l.width/2).attr("y",c.y-l.height/2).attr("width",l.width).attr("height",l.height).attr("fill","white").attr("fill-opacity","85%")}(i,t,r,c)}));var l=Ti.diagramPadding,h=i.node().getBBox(),d=h.width+2*l,p=h.height+2*l;i.attr("height",p),i.attr("width","100%"),i.attr("style","max-width: ".concat(d,"px;")),i.attr("viewBox","".concat(h.x-l," ").concat(h.y-l," ").concat(d," ").concat(p))};function Ii(t){return(Ii="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)}for(var Ri={},ji=0,Li=["default","forest","dark","neutral"];ji<Li.length;ji++){var Bi=Li[ji];Ri[Bi]=n(892)("./".concat(Bi,"/index.scss"))}var Pi={theme:"default",themeCSS:void 0,maxTextSize:5e4,fontFamily:'"trebuchet ms", verdana, arial;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"linear"},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"},class:{},git:{},state:{dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5},er:{diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,stroke:"gray",fill:"honeydew",fontSize:"12px"}};Q(Pi.logLevel),Y(Pi);var Fi={render:function(t,e,n,r){var i=e;if(e.length>Pi.maxTextSize&&(i="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa"),void 0!==r)r.innerHTML="",D.k(r).append("div").attr("id","d"+t).attr("style","font-family: "+Pi.fontFamily).append("svg").attr("id",t).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg").append("g");else{var o=document.getElementById(t);o&&o.remove();var a=document.querySelector("#d"+t);a&&(a.innerHTML=""),D.k("body").append("div").attr("id","d"+t).append("svg").attr("id",t).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg").append("g")}window.txt=i,i=function(t){var e=t;return e=(e=(e=e.replace(/style.*:\S*#.*;/g,(function(t){return t.substring(0,t.length-1)}))).replace(/classDef.*:\S*#.*;/g,(function(t){return t.substring(0,t.length-1)}))).replace(/#\w+;/g,(function(t){var e=t.substring(1,t.length-1);return/^\+?\d+$/.test(e)?"fl°°"+e+"¶ß":"fl°"+e+"¶ß"}))}(i);var u=D.k("#d"+t).node(),s=ot(i),c=u.firstChild,f=c.firstChild,l=Ri[Pi.theme];if(void 0===l&&(l=""),void 0!==Pi.themeCSS&&(l+="\n".concat(Pi.themeCSS)),void 0!==Pi.fontFamily&&(l+="\n:root { --mermaid-font-family: ".concat(Pi.fontFamily,"}")),void 0!==Pi.altFontFamily&&(l+="\n:root { --mermaid-alt-font-family: ".concat(Pi.altFontFamily,"}")),"flowchart"===s){var h=ie(i);for(var d in h)l+="\n.".concat(d," > * { ").concat(h[d].styles.join(" !important; ")," !important; }"),h[d].textStyles&&(l+="\n.".concat(d," tspan { ").concat(h[d].textStyles.join(" !important; ")," !important; }"))}var p=document.createElement("style");p.innerHTML=F()(l,"#".concat(t)),c.insertBefore(p,f);var g=document.createElement("style"),y=window.getComputedStyle(c);switch(g.innerHTML="#".concat(t," {\n color: ").concat(y.color,";\n font: ").concat(y.font,";\n }"),c.insertBefore(g,f),s){case"git":Pi.flowchart.arrowMarkerAbsolute=Pi.arrowMarkerAbsolute,ei(Pi.git),ni(i,t,!1);break;case"flowchart":Pi.flowchart.arrowMarkerAbsolute=Pi.arrowMarkerAbsolute,re(Pi.flowchart),oe(i,t,!1);break;case"flowchart-v2":Pi.flowchart.arrowMarkerAbsolute=Pi.arrowMarkerAbsolute,ce.setConf(Pi.flowchart),ce.draw(i,t,!1);break;case"sequence":Pi.sequence.arrowMarkerAbsolute=Pi.arrowMarkerAbsolute,Pi.sequenceDiagram?(Pe(Object.assign(Pi.sequence,Pi.sequenceDiagram)),console.error("`mermaid config.sequenceDiagram` has been renamed to `config.sequence`. Please update your mermaid config.")):Pe(Pi.sequence),Fe(i,t);break;case"gantt":Pi.gantt.arrowMarkerAbsolute=Pi.arrowMarkerAbsolute,wn(Pi.gantt),xn(i,t);break;case"class":Pi.class.arrowMarkerAbsolute=Pi.arrowMarkerAbsolute,Qn(Pi.class),tr(i,t);break;case"state":Er(Pi.state),Ar(i,t);break;case"info":Pi.class.arrowMarkerAbsolute=Pi.arrowMarkerAbsolute,ci(Pi.class),fi(i,t,q.version);break;case"pie":Pi.class.arrowMarkerAbsolute=Pi.arrowMarkerAbsolute,bi(Pi.class),vi(i,t,q.version);break;case"er":Ci(Pi.er),Ni(i,t,q.version)}D.k('[id="'.concat(t,'"]')).selectAll("foreignobject > *").attr("xmlns","http://www.w3.org/1999/xhtml");var b=D.k("#d"+t).node().innerHTML;if(Pi.arrowMarkerAbsolute&&"false"!==Pi.arrowMarkerAbsolute||(b=b.replace(/marker-end="url\(.*?#/g,'marker-end="url(#',"g")),b=function(t){var e=t;return e=(e=(e=e.replace(/fl°°/g,(function(){return"&#"}))).replace(/fl°/g,(function(){return"&"}))).replace(/¶ß/g,(function(){return";"}))}(b),void 0!==n)switch(s){case"flowchart":n(b,jt.bindFunctions);break;case"gantt":n(b,bn.bindFunctions);break;case"class":n(b,Bn.bindFunctions);break;default:n(b)}else J.debug("CB = undefined!");var v=D.k("#d"+t).node();return null!==v&&"function"==typeof v.remove&&D.k("#d"+t).node().remove(),b},parse:function(t){var e,n=ot(t);switch(J.debug("Type "+n),n){case"git":(e=Vr.a).parser.yy=zr;break;case"flowchart":jt.clear(),(e=Bt.a).parser.yy=jt;break;case"flowchart-v2":jt.clear(),(e=ce).parser.yy=jt;break;case"sequence":(e=me.a).parser.yy=De;break;case"gantt":(e=Ue.a).parser.yy=bn;break;case"class":(e=Fn.a).parser.yy=Bn;break;case"state":(e=pr.a).parser.yy=hr;break;case"info":J.debug("info info info"),(e=ui.a).parser.yy=oi;break;case"pie":J.debug("pie"),(e=gi.a).parser.yy=di;break;case"er":J.debug("er"),(e=Ei.a).parser.yy=xi}e.parser.yy.parseError=function(t,e){throw{str:t,hash:e}},e.parse(t)},initialize:function(t){J.debug("Initializing mermaidAPI ",q.version),"object"===Ii(t)&&function(t){for(var e=Object.keys(t),n=0;n<e.length;n++)if("object"===Ii(t[e[n]])&&null!=t[e[n]])for(var r=Object.keys(t[e[n]]),i=0;i<r.length;i++)J.debug("Setting conf ",e[n],"-",r[i]),void 0===Pi[e[n]]&&(Pi[e[n]]={}),J.debug("Setting config: "+e[n]+" "+r[i]+" to "+t[e[n]][r[i]]),Pi[e[n]][r[i]]=t[e[n]][r[i]];else Pi[e[n]]=t[e[n]]}(t),Y(Pi),Q(Pi.logLevel)},getConfig:V},qi=function(){Ui.startOnLoad?Fi.getConfig().startOnLoad&&Ui.init():void 0===Ui.startOnLoad&&(J.debug("In start, no config"),Fi.getConfig().startOnLoad&&Ui.init())};"undefined"!=typeof document&&
+!function(t){"use strict";var e,n="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},r=e={VERSION:[2,5,3],content:[],cache:{},snakeskinRgxp:null,symbols:null,replace:M,paste:N},i={'"':!0,"'":!0,"`":!0},a={"/":!0};for(var o in i){if(!i.hasOwnProperty(o))break;a[o]=!0}var s={"//":!0,"//*":!0,"//!":!0,"//#":!0,"//@":!0,"//$":!0},u={"/*":!0,"/**":!0,"/*!":!0,"/*#":!0,"/*@":!0,"/*$":!0},c=[],l={};for(var f in a){if(!a.hasOwnProperty(f))break;c.push(f),l[f]=!0}for(var h in s){if(!s.hasOwnProperty(h))break;c.push(h),l[h]=!0}for(var d in u){if(!u.hasOwnProperty(d))break;c.push(d),l[d]=!0}var p=[],y={g:!0,m:!0,i:!0,y:!0,u:!0};for(var g in y){if(!y.hasOwnProperty(g))break;p.push(g)}var m={"-":!0,"+":!0,"*":!0,"%":!0,"~":!0,">":!0,"<":!0,"^":!0,",":!0,";":!0,"=":!0,"|":!0,"&":!0,"!":!0,"?":!0,":":!0,"(":!0,"{":!0,"[":!0},v={return:!0,yield:!0,await:!0,typeof:!0,void:!0,instanceof:!0,delete:!0,in:!0,new:!0,of:!0};function b(t,e,n){for(var r in t){if(!t.hasOwnProperty(r))break;r in e==0&&(e[r]=n)}}var x=void 0,_=void 0,w=/[^\s/]/,k=/[a-z]/,E=/\s/,A=/[\r\n]/,T=/\${pos}/g,S={object:!0,function:!0};function M(t,r,o,f){x=x||e.symbols||"a-z",_=_||e.snakeskinRgxp||new RegExp("[!$"+x+"_]","i");var h=e.cache,d=e.content,g=Boolean(r&&S[void 0===r?"undefined":n(r)]),M=g?Object(r):{};function O(t){return M["@label"]?M["@label"].replace(T,t):"__ESCAPER_QUOT__"+t+"_"}var N=!1;"boolean"==typeof r&&(N=Boolean(r)),"@comments"in M&&(b(u,M,M["@comments"]),b(s,M,M["@comments"]),delete M["@comments"]),"@strings"in M&&(b(i,M,M["@strings"]),delete M["@strings"]),"@literals"in M&&(b(a,M,M["@literals"]),delete M["@literals"]),"@all"in M&&(b(l,M,M["@all"]),delete M["@all"]);for(var C="",D=-1;++D<c.length;){var L=c[D];u[L]||s[L]?M[L]=N||M[L]:M[L]=M[L]||!g,C+=M[L]+","}var F=t,I=o||d;if(I===d&&h[C]&&h[C][F])return h[C][F];for(var P=!1,R=!0,B=!1,j=!1,Y=0,z=!1,U=0,$=!1,G=void 0,V=void 0,H="",W="",q=-1;++q<t.length;){var X=t.charAt(q),Z=t.charAt(q+1),J=t.substr(q,2),Q=t.substr(q,3);if(j)(A.test(Z)&&s[j]||u[X+t.charAt(q-1)]&&q-Y>2&&u[j])&&(M[j]&&(G=t.substring(Y,q+1),-1===M[j]?V="":(V=O(I.length),I.push(G)),t=t.substring(0,Y)+V+t.substring(q+1),q+=V.length-G.length),j=!1);else{if(!P){if("/"===X&&((s[J]||u[J])&&(j=s[Q]||u[Q]?Q:J),j)){Y=q;continue}m[X]||v[W]?(R=!0,W=""):w.test(X)&&(R=!1),k.test(X)?H+=X:(W=H,H="");var K=!1;f&&("|"===X&&_.test(Z)?($=!0,R=!1,K=!0):$&&E.test(X)&&($=!1,R=!0,K=!0)),K||(m[X]?R=!0:w.test(X)&&(R=!1))}if("/"!==P||B||("["===X?z=!0:"]"===X&&(z=!1)),!P&&U&&("}"===X?U--:"{"===X&&U++,U||(X="`")),"`"!==P||B||"${"!==J||(X="`",q++,U++),!l[X]||"/"===X&&!R||P){if(P&&("\\"===X||B))B=!B;else if(l[X]&&P===X&&!B&&("/"!==P||!z)){if("/"===X)for(var tt=-1;++tt<p.length;)y[t.charAt(q+1)]&&q++;P=!1,R=!1,M[X]&&(G=t.substring(Y,q+1),-1===M[X]?V="":(V=O(I.length),I.push(G)),t=t.substring(0,Y)+V+t.substring(q+1),q+=V.length-G.length)}}else P=X,Y=q}}return I===d&&(h[C]=h[C]||{},h[C][F]=t),t}var O=/__ESCAPER_QUOT__(\d+)_/g;function N(t,n,r){return t.replace(r||O,(function(t,r){return(n||e.content)[r]}))}t.default=r,t.replace=M,t.paste=N,Object.defineProperty(t,"__esModule",{value:!0})}(e)},function(t,e,n){"use strict";var r=n(157);t.exports=function(t,e){var n;t=t.toString();var i="",a="",o=!1,s=!(!1===(e=e||{}).preserve||!0===e.all),u="";"function"==typeof e.preserve?(s=!1,n=e.preserve):r(e.preserve)&&(s=!1,n=function(t){return e.preserve.test(t)});for(var c=0;c<t.length;c++)if(a=t[c],"\\"!==t[c-1]&&('"'!==a&&"'"!==a||(o===a?o=!1:o||(o=a))),o||"/"!==a||"*"!==t[c+1]||s&&"!"===t[c+2])u+=a;else{for(var l=c+2;l<t.length;l++){if("*"===t[l]&&"/"===t[l+1]){n&&(u=n(i)?u+"/*"+i+"*/":u,i="");break}n&&(i+=t[l])}c=l+1}return u}},function(t,e,n){"use strict";t.exports=function(t){return"[object RegExp]"===Object.prototype.toString.call(t)}},function(t,e,n){var r={"./dark/index.scss":159,"./default/index.scss":161,"./forest/index.scss":163,"./neutral/index.scss":165};function i(t){var e=a(t);return n(e)}function a(t){if(!n.o(r,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}return r[t]}i.keys=function(){return Object.keys(r)},i.resolve=a,t.exports=i,i.id=158},function(t,e,n){var r=n(160);t.exports="string"==typeof r?r:r.toString()},function(t,e,n){(t.exports=n(45)(!1)).push([t.i,".label{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);color:#333}.label text{fill:#333}.node rect,.node circle,.node ellipse,.node polygon,.node path{fill:#BDD5EA;stroke:purple;stroke-width:1px}.node .label{text-align:center}.node.clickable{cursor:pointer}.arrowheadPath{fill:#d3d3d3}.edgePath .path{stroke:#d3d3d3;stroke-width:1.5px}.edgeLabel{background-color:#e8e8e8;text-align:center}.edgeLabel rect{opacity:0.5}.cluster rect{fill:#6D6D65;stroke:rgba(255,255,255,0.25);stroke-width:1px}.cluster text{fill:#F9FFFE}div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:12px;background:#6D6D65;border:1px solid rgba(255,255,255,0.25);border-radius:2px;pointer-events:none;z-index:100}.actor{stroke:#81B1DB;fill:#BDD5EA}text.actor{fill:#000;stroke:none}.actor-line{stroke:#d3d3d3}.messageLine0{stroke-width:1.5;stroke-dasharray:'2 2';stroke:#d3d3d3}.messageLine1{stroke-width:1.5;stroke-dasharray:'2 2';stroke:#d3d3d3}#arrowhead{fill:#d3d3d3}.sequenceNumber{fill:#fff}#sequencenumber{fill:#d3d3d3}#crosshead path{fill:#d3d3d3 !important;stroke:#d3d3d3 !important}.messageText{fill:#d3d3d3;stroke:none}.labelBox{stroke:#81B1DB;fill:#BDD5EA}.labelText{fill:#323D47;stroke:none}.loopText{fill:#d3d3d3;stroke:none}.loopLine{stroke-width:2;stroke-dasharray:'2 2';stroke:#81B1DB}.note{stroke:rgba(255,255,255,0.25);fill:#fff5ad}.noteText{fill:black;stroke:none;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:14px}.activation0{fill:#f4f4f4;stroke:#666}.activation1{fill:#f4f4f4;stroke:#666}.activation2{fill:#f4f4f4;stroke:#666}.mermaid-main-font{font-family:\"trebuchet ms\", verdana, arial;font-family:var(--mermaid-font-family)}.section{stroke:none;opacity:0.2}.section0{fill:rgba(255,255,255,0.3)}.section2{fill:#EAE8B9}.section1,.section3{fill:#fff;opacity:0.2}.sectionTitle0{fill:#F9FFFE}.sectionTitle1{fill:#F9FFFE}.sectionTitle2{fill:#F9FFFE}.sectionTitle3{fill:#F9FFFE}.sectionTitle{text-anchor:start;font-size:11px;text-height:14px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.grid .tick{stroke:#d3d3d3;opacity:0.8;shape-rendering:crispEdges}.grid .tick text{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.grid path{stroke-width:0}.today{fill:none;stroke:#DB5757;stroke-width:2px}.task{stroke-width:2}.taskText{text-anchor:middle;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.taskText:not([font-size]){font-size:11px}.taskTextOutsideRight{fill:#323D47;text-anchor:start;font-size:11px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.taskTextOutsideLeft{fill:#323D47;text-anchor:end;font-size:11px}.task.clickable{cursor:pointer}.taskText.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}.taskTextOutsideLeft.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}.taskTextOutsideRight.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}.taskText0,.taskText1,.taskText2,.taskText3{fill:#323D47}.task0,.task1,.task2,.task3{fill:#BDD5EA;stroke:rgba(255,255,255,0.5)}.taskTextOutside0,.taskTextOutside2{fill:#d3d3d3}.taskTextOutside1,.taskTextOutside3{fill:#d3d3d3}.active0,.active1,.active2,.active3{fill:#81B1DB;stroke:rgba(255,255,255,0.5)}.activeText0,.activeText1,.activeText2,.activeText3{fill:#323D47 !important}.done0,.done1,.done2,.done3{stroke:grey;fill:#d3d3d3;stroke-width:2}.doneText0,.doneText1,.doneText2,.doneText3{fill:#323D47 !important}.crit0,.crit1,.crit2,.crit3{stroke:#E83737;fill:#E83737;stroke-width:2}.activeCrit0,.activeCrit1,.activeCrit2,.activeCrit3{stroke:#E83737;fill:#81B1DB;stroke-width:2}.doneCrit0,.doneCrit1,.doneCrit2,.doneCrit3{stroke:#E83737;fill:#d3d3d3;stroke-width:2;cursor:pointer;shape-rendering:crispEdges}.milestone{transform:rotate(45deg) scale(0.8, 0.8)}.milestoneText{font-style:italic}.doneCritText0,.doneCritText1,.doneCritText2,.doneCritText3{fill:#323D47 !important}.activeCritText0,.activeCritText1,.activeCritText2,.activeCritText3{fill:#323D47 !important}.titleText{text-anchor:middle;font-size:18px;fill:#323D47;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}g.classGroup text{fill:purple;stroke:none;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:10px}g.classGroup text .title{font-weight:bolder}g.clickable{cursor:pointer}g.classGroup rect{fill:#BDD5EA;stroke:purple}g.classGroup line{stroke:purple;stroke-width:1}.classLabel .box{stroke:none;stroke-width:0;fill:#BDD5EA;opacity:0.5}.classLabel .label{fill:purple;font-size:10px}.relation{stroke:purple;stroke-width:1;fill:none}.dashed-line{stroke-dasharray:3}#compositionStart{fill:purple;stroke:purple;stroke-width:1}#compositionEnd{fill:purple;stroke:purple;stroke-width:1}#aggregationStart{fill:#BDD5EA;stroke:purple;stroke-width:1}#aggregationEnd{fill:#BDD5EA;stroke:purple;stroke-width:1}#dependencyStart{fill:purple;stroke:purple;stroke-width:1}#dependencyEnd{fill:purple;stroke:purple;stroke-width:1}#extensionStart{fill:purple;stroke:purple;stroke-width:1}#extensionEnd{fill:purple;stroke:purple;stroke-width:1}.commit-id,.commit-msg,.branch-label{fill:lightgrey;color:lightgrey;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.pieTitleText{text-anchor:middle;font-size:25px;fill:#323D47;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.slice{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}g.stateGroup text{fill:purple;stroke:none;font-size:10px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}g.stateGroup text{fill:purple;stroke:none;font-size:10px}g.stateGroup .state-title{font-weight:bolder;fill:#000}g.stateGroup rect{fill:#BDD5EA;stroke:purple}g.stateGroup line{stroke:purple;stroke-width:1}.transition{stroke:purple;stroke-width:1;fill:none}.stateGroup .composit{fill:white;border-bottom:1px}.stateGroup .alt-composit{fill:#e0e0e0;border-bottom:1px}.state-note{stroke:rgba(255,255,255,0.25);fill:#fff5ad}.state-note text{fill:black;stroke:none;font-size:10px}.stateLabel .box{stroke:none;stroke-width:0;fill:#BDD5EA;opacity:0.5}.stateLabel text{fill:#000;font-size:10px;font-weight:bold;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.node circle.state-start{fill:black;stroke:black}.node circle.state-end{fill:black;stroke:white;stroke-width:1.5}#statediagram-barbEnd{fill:purple}.statediagram-cluster rect{fill:#BDD5EA;stroke:purple;stroke-width:1px}.statediagram-cluster rect.outer{rx:5px;ry:5px}.statediagram-state .divider{stroke:purple}.statediagram-state .title-state{rx:5px;ry:5px}.statediagram-cluster.statediagram-cluster .inner{fill:white}.statediagram-cluster.statediagram-cluster-alt .inner{fill:#e0e0e0}.statediagram-cluster .inner{rx:0;ry:0}.statediagram-state rect.basic{rx:5px;ry:5px}.statediagram-state rect.divider{stroke-dasharray:10,10;fill:#efefef}.note-edge{stroke-dasharray:5}.statediagram-note rect{fill:#fff5ad;stroke:rgba(255,255,255,0.25);stroke-width:1px;rx:0;ry:0}:root{--mermaid-font-family: '\"trebuchet ms\", verdana, arial';--mermaid-font-family: \"Comic Sans MS\", \"Comic Sans\", cursive}\n",""])},function(t,e,n){var r=n(162);t.exports="string"==typeof r?r:r.toString()},function(t,e,n){(t.exports=n(45)(!1)).push([t.i,".label{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);color:#333}.label text{fill:#333}.node rect,.node circle,.node ellipse,.node polygon,.node path{fill:#ECECFF;stroke:#9370db;stroke-width:1px}.node .label{text-align:center}.node.clickable{cursor:pointer}.arrowheadPath{fill:#333}.edgePath .path{stroke:#333;stroke-width:1.5px}.edgeLabel{background-color:#e8e8e8;text-align:center}.edgeLabel rect{opacity:0.5}.cluster rect{fill:#ffffde;stroke:#aa3;stroke-width:1px}.cluster text{fill:#333}div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:12px;background:#ffffde;border:1px solid #aa3;border-radius:2px;pointer-events:none;z-index:100}.actor{stroke:#ccf;fill:#ECECFF}text.actor{fill:#000;stroke:none}.actor-line{stroke:grey}.messageLine0{stroke-width:1.5;stroke-dasharray:'2 2';stroke:#333}.messageLine1{stroke-width:1.5;stroke-dasharray:'2 2';stroke:#333}#arrowhead{fill:#333}.sequenceNumber{fill:#fff}#sequencenumber{fill:#333}#crosshead path{fill:#333 !important;stroke:#333 !important}.messageText{fill:#333;stroke:none}.labelBox{stroke:#ccf;fill:#ECECFF}.labelText{fill:#000;stroke:none}.loopText{fill:#000;stroke:none}.loopLine{stroke-width:2;stroke-dasharray:'2 2';stroke:#ccf}.note{stroke:#aa3;fill:#fff5ad}.noteText{fill:black;stroke:none;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:14px}.activation0{fill:#f4f4f4;stroke:#666}.activation1{fill:#f4f4f4;stroke:#666}.activation2{fill:#f4f4f4;stroke:#666}.mermaid-main-font{font-family:\"trebuchet ms\", verdana, arial;font-family:var(--mermaid-font-family)}.section{stroke:none;opacity:0.2}.section0{fill:rgba(102,102,255,0.49)}.section2{fill:#fff400}.section1,.section3{fill:#fff;opacity:0.2}.sectionTitle0{fill:#333}.sectionTitle1{fill:#333}.sectionTitle2{fill:#333}.sectionTitle3{fill:#333}.sectionTitle{text-anchor:start;font-size:11px;text-height:14px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.grid .tick{stroke:#d3d3d3;opacity:0.8;shape-rendering:crispEdges}.grid .tick text{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.grid path{stroke-width:0}.today{fill:none;stroke:red;stroke-width:2px}.task{stroke-width:2}.taskText{text-anchor:middle;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.taskText:not([font-size]){font-size:11px}.taskTextOutsideRight{fill:#000;text-anchor:start;font-size:11px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.taskTextOutsideLeft{fill:#000;text-anchor:end;font-size:11px}.task.clickable{cursor:pointer}.taskText.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}.taskTextOutsideLeft.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}.taskTextOutsideRight.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}.taskText0,.taskText1,.taskText2,.taskText3{fill:#fff}.task0,.task1,.task2,.task3{fill:#8a90dd;stroke:#534fbc}.taskTextOutside0,.taskTextOutside2{fill:#000}.taskTextOutside1,.taskTextOutside3{fill:#000}.active0,.active1,.active2,.active3{fill:#bfc7ff;stroke:#534fbc}.activeText0,.activeText1,.activeText2,.activeText3{fill:#000 !important}.done0,.done1,.done2,.done3{stroke:grey;fill:#d3d3d3;stroke-width:2}.doneText0,.doneText1,.doneText2,.doneText3{fill:#000 !important}.crit0,.crit1,.crit2,.crit3{stroke:#f88;fill:red;stroke-width:2}.activeCrit0,.activeCrit1,.activeCrit2,.activeCrit3{stroke:#f88;fill:#bfc7ff;stroke-width:2}.doneCrit0,.doneCrit1,.doneCrit2,.doneCrit3{stroke:#f88;fill:#d3d3d3;stroke-width:2;cursor:pointer;shape-rendering:crispEdges}.milestone{transform:rotate(45deg) scale(0.8, 0.8)}.milestoneText{font-style:italic}.doneCritText0,.doneCritText1,.doneCritText2,.doneCritText3{fill:#000 !important}.activeCritText0,.activeCritText1,.activeCritText2,.activeCritText3{fill:#000 !important}.titleText{text-anchor:middle;font-size:18px;fill:#000;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}g.classGroup text{fill:#9370db;stroke:none;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:10px}g.classGroup text .title{font-weight:bolder}g.clickable{cursor:pointer}g.classGroup rect{fill:#ECECFF;stroke:#9370db}g.classGroup line{stroke:#9370db;stroke-width:1}.classLabel .box{stroke:none;stroke-width:0;fill:#ECECFF;opacity:0.5}.classLabel .label{fill:#9370db;font-size:10px}.relation{stroke:#9370db;stroke-width:1;fill:none}.dashed-line{stroke-dasharray:3}#compositionStart{fill:#9370db;stroke:#9370db;stroke-width:1}#compositionEnd{fill:#9370db;stroke:#9370db;stroke-width:1}#aggregationStart{fill:#ECECFF;stroke:#9370db;stroke-width:1}#aggregationEnd{fill:#ECECFF;stroke:#9370db;stroke-width:1}#dependencyStart{fill:#9370db;stroke:#9370db;stroke-width:1}#dependencyEnd{fill:#9370db;stroke:#9370db;stroke-width:1}#extensionStart{fill:#9370db;stroke:#9370db;stroke-width:1}#extensionEnd{fill:#9370db;stroke:#9370db;stroke-width:1}.commit-id,.commit-msg,.branch-label{fill:lightgrey;color:lightgrey;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.pieTitleText{text-anchor:middle;font-size:25px;fill:#000;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.slice{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}g.stateGroup text{fill:#9370db;stroke:none;font-size:10px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}g.stateGroup text{fill:#9370db;stroke:none;font-size:10px}g.stateGroup .state-title{font-weight:bolder;fill:#000}g.stateGroup rect{fill:#ECECFF;stroke:#9370db}g.stateGroup line{stroke:#9370db;stroke-width:1}.transition{stroke:#9370db;stroke-width:1;fill:none}.stateGroup .composit{fill:white;border-bottom:1px}.stateGroup .alt-composit{fill:#e0e0e0;border-bottom:1px}.state-note{stroke:#aa3;fill:#fff5ad}.state-note text{fill:black;stroke:none;font-size:10px}.stateLabel .box{stroke:none;stroke-width:0;fill:#ECECFF;opacity:0.5}.stateLabel text{fill:#000;font-size:10px;font-weight:bold;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.node circle.state-start{fill:black;stroke:black}.node circle.state-end{fill:black;stroke:white;stroke-width:1.5}#statediagram-barbEnd{fill:#9370db}.statediagram-cluster rect{fill:#ECECFF;stroke:#9370db;stroke-width:1px}.statediagram-cluster rect.outer{rx:5px;ry:5px}.statediagram-state .divider{stroke:#9370db}.statediagram-state .title-state{rx:5px;ry:5px}.statediagram-cluster.statediagram-cluster .inner{fill:white}.statediagram-cluster.statediagram-cluster-alt .inner{fill:#e0e0e0}.statediagram-cluster .inner{rx:0;ry:0}.statediagram-state rect.basic{rx:5px;ry:5px}.statediagram-state rect.divider{stroke-dasharray:10,10;fill:#efefef}.note-edge{stroke-dasharray:5}.statediagram-note rect{fill:#fff5ad;stroke:#aa3;stroke-width:1px;rx:0;ry:0}:root{--mermaid-font-family: '\"trebuchet ms\", verdana, arial';--mermaid-font-family: \"Comic Sans MS\", \"Comic Sans\", cursive}\n",""])},function(t,e,n){var r=n(164);t.exports="string"==typeof r?r:r.toString()},function(t,e,n){(t.exports=n(45)(!1)).push([t.i,".label{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);color:#333}.label text{fill:#333}.node rect,.node circle,.node ellipse,.node polygon,.node path{fill:#cde498;stroke:#13540c;stroke-width:1px}.node .label{text-align:center}.node.clickable{cursor:pointer}.arrowheadPath{fill:green}.edgePath .path{stroke:green;stroke-width:1.5px}.edgeLabel{background-color:#e8e8e8;text-align:center}.edgeLabel rect{opacity:0.5}.cluster rect{fill:#cdffb2;stroke:#6eaa49;stroke-width:1px}.cluster text{fill:#333}div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:12px;background:#cdffb2;border:1px solid #6eaa49;border-radius:2px;pointer-events:none;z-index:100}.actor{stroke:#13540c;fill:#cde498}text.actor{fill:#000;stroke:none}.actor-line{stroke:grey}.messageLine0{stroke-width:1.5;stroke-dasharray:'2 2';stroke:#333}.messageLine1{stroke-width:1.5;stroke-dasharray:'2 2';stroke:#333}#arrowhead{fill:#333}.sequenceNumber{fill:#fff}#sequencenumber{fill:#333}#crosshead path{fill:#333 !important;stroke:#333 !important}.messageText{fill:#333;stroke:none}.labelBox{stroke:#326932;fill:#cde498}.labelText{fill:#000;stroke:none}.loopText{fill:#000;stroke:none}.loopLine{stroke-width:2;stroke-dasharray:'2 2';stroke:#326932}.note{stroke:#6eaa49;fill:#fff5ad}.noteText{fill:black;stroke:none;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:14px}.activation0{fill:#f4f4f4;stroke:#666}.activation1{fill:#f4f4f4;stroke:#666}.activation2{fill:#f4f4f4;stroke:#666}.mermaid-main-font{font-family:\"trebuchet ms\", verdana, arial;font-family:var(--mermaid-font-family)}.section{stroke:none;opacity:0.2}.section0{fill:#6eaa49}.section2{fill:#6eaa49}.section1,.section3{fill:#fff;opacity:0.2}.sectionTitle0{fill:#333}.sectionTitle1{fill:#333}.sectionTitle2{fill:#333}.sectionTitle3{fill:#333}.sectionTitle{text-anchor:start;font-size:11px;text-height:14px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.grid .tick{stroke:#d3d3d3;opacity:0.8;shape-rendering:crispEdges}.grid .tick text{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.grid path{stroke-width:0}.today{fill:none;stroke:red;stroke-width:2px}.task{stroke-width:2}.taskText{text-anchor:middle;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.taskText:not([font-size]){font-size:11px}.taskTextOutsideRight{fill:#000;text-anchor:start;font-size:11px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.taskTextOutsideLeft{fill:#000;text-anchor:end;font-size:11px}.task.clickable{cursor:pointer}.taskText.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}.taskTextOutsideLeft.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}.taskTextOutsideRight.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}.taskText0,.taskText1,.taskText2,.taskText3{fill:#fff}.task0,.task1,.task2,.task3{fill:#487e3a;stroke:#13540c}.taskTextOutside0,.taskTextOutside2{fill:#000}.taskTextOutside1,.taskTextOutside3{fill:#000}.active0,.active1,.active2,.active3{fill:#cde498;stroke:#13540c}.activeText0,.activeText1,.activeText2,.activeText3{fill:#000 !important}.done0,.done1,.done2,.done3{stroke:grey;fill:#d3d3d3;stroke-width:2}.doneText0,.doneText1,.doneText2,.doneText3{fill:#000 !important}.crit0,.crit1,.crit2,.crit3{stroke:#f88;fill:red;stroke-width:2}.activeCrit0,.activeCrit1,.activeCrit2,.activeCrit3{stroke:#f88;fill:#cde498;stroke-width:2}.doneCrit0,.doneCrit1,.doneCrit2,.doneCrit3{stroke:#f88;fill:#d3d3d3;stroke-width:2;cursor:pointer;shape-rendering:crispEdges}.milestone{transform:rotate(45deg) scale(0.8, 0.8)}.milestoneText{font-style:italic}.doneCritText0,.doneCritText1,.doneCritText2,.doneCritText3{fill:#000 !important}.activeCritText0,.activeCritText1,.activeCritText2,.activeCritText3{fill:#000 !important}.titleText{text-anchor:middle;font-size:18px;fill:#000;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}g.classGroup text{fill:#13540c;stroke:none;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:10px}g.classGroup text .title{font-weight:bolder}g.clickable{cursor:pointer}g.classGroup rect{fill:#cde498;stroke:#13540c}g.classGroup line{stroke:#13540c;stroke-width:1}.classLabel .box{stroke:none;stroke-width:0;fill:#cde498;opacity:0.5}.classLabel .label{fill:#13540c;font-size:10px}.relation{stroke:#13540c;stroke-width:1;fill:none}.dashed-line{stroke-dasharray:3}#compositionStart{fill:#13540c;stroke:#13540c;stroke-width:1}#compositionEnd{fill:#13540c;stroke:#13540c;stroke-width:1}#aggregationStart{fill:#cde498;stroke:#13540c;stroke-width:1}#aggregationEnd{fill:#cde498;stroke:#13540c;stroke-width:1}#dependencyStart{fill:#13540c;stroke:#13540c;stroke-width:1}#dependencyEnd{fill:#13540c;stroke:#13540c;stroke-width:1}#extensionStart{fill:#13540c;stroke:#13540c;stroke-width:1}#extensionEnd{fill:#13540c;stroke:#13540c;stroke-width:1}.commit-id,.commit-msg,.branch-label{fill:lightgrey;color:lightgrey;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.pieTitleText{text-anchor:middle;font-size:25px;fill:#000;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.slice{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}g.stateGroup text{fill:#13540c;stroke:none;font-size:10px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}g.stateGroup text{fill:#13540c;stroke:none;font-size:10px}g.stateGroup .state-title{font-weight:bolder;fill:#000}g.stateGroup rect{fill:#cde498;stroke:#13540c}g.stateGroup line{stroke:#13540c;stroke-width:1}.transition{stroke:#13540c;stroke-width:1;fill:none}.stateGroup .composit{fill:white;border-bottom:1px}.stateGroup .alt-composit{fill:#e0e0e0;border-bottom:1px}.state-note{stroke:#6eaa49;fill:#fff5ad}.state-note text{fill:black;stroke:none;font-size:10px}.stateLabel .box{stroke:none;stroke-width:0;fill:#cde498;opacity:0.5}.stateLabel text{fill:#000;font-size:10px;font-weight:bold;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.node circle.state-start{fill:black;stroke:black}.node circle.state-end{fill:black;stroke:white;stroke-width:1.5}#statediagram-barbEnd{fill:#13540c}.statediagram-cluster rect{fill:#cde498;stroke:#13540c;stroke-width:1px}.statediagram-cluster rect.outer{rx:5px;ry:5px}.statediagram-state .divider{stroke:#13540c}.statediagram-state .title-state{rx:5px;ry:5px}.statediagram-cluster.statediagram-cluster .inner{fill:white}.statediagram-cluster.statediagram-cluster-alt .inner{fill:#e0e0e0}.statediagram-cluster .inner{rx:0;ry:0}.statediagram-state rect.basic{rx:5px;ry:5px}.statediagram-state rect.divider{stroke-dasharray:10,10;fill:#efefef}.note-edge{stroke-dasharray:5}.statediagram-note rect{fill:#fff5ad;stroke:#6eaa49;stroke-width:1px;rx:0;ry:0}:root{--mermaid-font-family: '\"trebuchet ms\", verdana, arial';--mermaid-font-family: \"Comic Sans MS\", \"Comic Sans\", cursive}\n",""])},function(t,e,n){var r=n(166);t.exports="string"==typeof r?r:r.toString()},function(t,e,n){(t.exports=n(45)(!1)).push([t.i,".label{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);color:#333}.label text{fill:#333}.node rect,.node circle,.node ellipse,.node polygon,.node path{fill:#eee;stroke:#999;stroke-width:1px}.node .label{text-align:center}.node.clickable{cursor:pointer}.arrowheadPath{fill:#333}.edgePath .path{stroke:#666;stroke-width:1.5px}.edgeLabel{background-color:#fff;text-align:center}.edgeLabel rect{opacity:0.5}.cluster rect{fill:#eaf2fb;stroke:#26a;stroke-width:1px}.cluster text{fill:#333}div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:12px;background:#eaf2fb;border:1px solid #26a;border-radius:2px;pointer-events:none;z-index:100}.actor{stroke:#999;fill:#eee}text.actor{fill:#333;stroke:none}.actor-line{stroke:#666}.messageLine0{stroke-width:1.5;stroke-dasharray:'2 2';stroke:#333}.messageLine1{stroke-width:1.5;stroke-dasharray:'2 2';stroke:#333}#arrowhead{fill:#333}.sequenceNumber{fill:#fff}#sequencenumber{fill:#333}#crosshead path{fill:#333 !important;stroke:#333 !important}.messageText{fill:#333;stroke:none}.labelBox{stroke:#999;fill:#eee}.labelText{fill:#333;stroke:none}.loopText{fill:#333;stroke:none}.loopLine{stroke-width:2;stroke-dasharray:'2 2';stroke:#999}.note{stroke:#770;fill:#ffa}.noteText{fill:black;stroke:none;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:14px}.activation0{fill:#f4f4f4;stroke:#666}.activation1{fill:#f4f4f4;stroke:#666}.activation2{fill:#f4f4f4;stroke:#666}.mermaid-main-font{font-family:\"trebuchet ms\", verdana, arial;font-family:var(--mermaid-font-family)}.section{stroke:none;opacity:0.2}.section0{fill:#80b3e6}.section2{fill:#80b3e6}.section1,.section3{fill:#fff;opacity:0.2}.sectionTitle0{fill:#333}.sectionTitle1{fill:#333}.sectionTitle2{fill:#333}.sectionTitle3{fill:#333}.sectionTitle{text-anchor:start;font-size:11px;text-height:14px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.grid .tick{stroke:#e6e6e6;opacity:0.8;shape-rendering:crispEdges}.grid .tick text{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.grid path{stroke-width:0}.today{fill:none;stroke:#d42;stroke-width:2px}.task{stroke-width:2}.taskText{text-anchor:middle;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.taskText:not([font-size]){font-size:11px}.taskTextOutsideRight{fill:#333;text-anchor:start;font-size:11px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.taskTextOutsideLeft{fill:#333;text-anchor:end;font-size:11px}.task.clickable{cursor:pointer}.taskText.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}.taskTextOutsideLeft.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}.taskTextOutsideRight.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}.taskText0,.taskText1,.taskText2,.taskText3{fill:#fff}.task0,.task1,.task2,.task3{fill:#26a;stroke:#1a4d80}.taskTextOutside0,.taskTextOutside2{fill:#333}.taskTextOutside1,.taskTextOutside3{fill:#333}.active0,.active1,.active2,.active3{fill:#eee;stroke:#1a4d80}.activeText0,.activeText1,.activeText2,.activeText3{fill:#333 !important}.done0,.done1,.done2,.done3{stroke:#666;fill:#bbb;stroke-width:2}.doneText0,.doneText1,.doneText2,.doneText3{fill:#333 !important}.crit0,.crit1,.crit2,.crit3{stroke:#b1361b;fill:#d42;stroke-width:2}.activeCrit0,.activeCrit1,.activeCrit2,.activeCrit3{stroke:#b1361b;fill:#eee;stroke-width:2}.doneCrit0,.doneCrit1,.doneCrit2,.doneCrit3{stroke:#b1361b;fill:#bbb;stroke-width:2;cursor:pointer;shape-rendering:crispEdges}.milestone{transform:rotate(45deg) scale(0.8, 0.8)}.milestoneText{font-style:italic}.doneCritText0,.doneCritText1,.doneCritText2,.doneCritText3{fill:#333 !important}.activeCritText0,.activeCritText1,.activeCritText2,.activeCritText3{fill:#333 !important}.titleText{text-anchor:middle;font-size:18px;fill:#333;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}g.classGroup text{fill:#999;stroke:none;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:10px}g.classGroup text .title{font-weight:bolder}g.clickable{cursor:pointer}g.classGroup rect{fill:#eee;stroke:#999}g.classGroup line{stroke:#999;stroke-width:1}.classLabel .box{stroke:none;stroke-width:0;fill:#eee;opacity:0.5}.classLabel .label{fill:#999;font-size:10px}.relation{stroke:#999;stroke-width:1;fill:none}.dashed-line{stroke-dasharray:3}#compositionStart{fill:#999;stroke:#999;stroke-width:1}#compositionEnd{fill:#999;stroke:#999;stroke-width:1}#aggregationStart{fill:#eee;stroke:#999;stroke-width:1}#aggregationEnd{fill:#eee;stroke:#999;stroke-width:1}#dependencyStart{fill:#999;stroke:#999;stroke-width:1}#dependencyEnd{fill:#999;stroke:#999;stroke-width:1}#extensionStart{fill:#999;stroke:#999;stroke-width:1}#extensionEnd{fill:#999;stroke:#999;stroke-width:1}.commit-id,.commit-msg,.branch-label{fill:lightgrey;color:lightgrey;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.pieTitleText{text-anchor:middle;font-size:25px;fill:#333;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.slice{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}g.stateGroup text{fill:#999;stroke:none;font-size:10px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}g.stateGroup text{fill:#999;stroke:none;font-size:10px}g.stateGroup .state-title{font-weight:bolder;fill:#000}g.stateGroup rect{fill:#eee;stroke:#999}g.stateGroup line{stroke:#999;stroke-width:1}.transition{stroke:#999;stroke-width:1;fill:none}.stateGroup .composit{fill:white;border-bottom:1px}.stateGroup .alt-composit{fill:#e0e0e0;border-bottom:1px}.state-note{stroke:#770;fill:#ffa}.state-note text{fill:black;stroke:none;font-size:10px}.stateLabel .box{stroke:none;stroke-width:0;fill:#eee;opacity:0.5}.stateLabel text{fill:#000;font-size:10px;font-weight:bold;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.node circle.state-start{fill:black;stroke:black}.node circle.state-end{fill:black;stroke:white;stroke-width:1.5}#statediagram-barbEnd{fill:#999}.statediagram-cluster rect{fill:#eee;stroke:#999;stroke-width:1px}.statediagram-cluster rect.outer{rx:5px;ry:5px}.statediagram-state .divider{stroke:#999}.statediagram-state .title-state{rx:5px;ry:5px}.statediagram-cluster.statediagram-cluster .inner{fill:white}.statediagram-cluster.statediagram-cluster-alt .inner{fill:#e0e0e0}.statediagram-cluster .inner{rx:0;ry:0}.statediagram-state rect.basic{rx:5px;ry:5px}.statediagram-state rect.divider{stroke-dasharray:10,10;fill:#efefef}.note-edge{stroke-dasharray:5}.statediagram-note rect{fill:#ffa;stroke:#770;stroke-width:1px;rx:0;ry:0}:root{--mermaid-font-family: '\"trebuchet ms\", verdana, arial';--mermaid-font-family: \"Comic Sans MS\", \"Comic Sans\", cursive}\n",""])},function(t,e,n){var r={"./locale":90,"./locale.js":90};function i(t){var e=a(t);return n(e)}function a(t){if(!n.o(r,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}return r[t]}i.keys=function(){return Object.keys(r)},i.resolve=a,t.exports=i,i.id=167},function(t,e,n){t.exports={Graph:n(68),version:n(270)}},function(t,e,n){var r=n(91);t.exports=function(t){return r(t,4)}},function(t,e){t.exports=function(){this.__data__=[],this.size=0}},function(t,e,n){var r=n(48),i=Array.prototype.splice;t.exports=function(t){var e=this.__data__,n=r(e,t);return!(n<0)&&(n==e.length-1?e.pop():i.call(e,n,1),--this.size,!0)}},function(t,e,n){var r=n(48);t.exports=function(t){var e=this.__data__,n=r(e,t);return n<0?void 0:e[n][1]}},function(t,e,n){var r=n(48);t.exports=function(t){return r(this.__data__,t)>-1}},function(t,e,n){var r=n(48);t.exports=function(t,e){var n=this.__data__,i=r(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this}},function(t,e,n){var r=n(47);t.exports=function(){this.__data__=new r,this.size=0}},function(t,e){t.exports=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}},function(t,e){t.exports=function(t){return this.__data__.get(t)}},function(t,e){t.exports=function(t){return this.__data__.has(t)}},function(t,e,n){var r=n(47),i=n(69),a=n(70);t.exports=function(t,e){var n=this.__data__;if(n instanceof r){var o=n.__data__;if(!i||o.length<199)return o.push([t,e]),this.size=++n.size,this;n=this.__data__=new a(o)}return n.set(t,e),this.size=n.size,this}},function(t,e,n){var r=n(31),i=n(184),a=n(9),o=n(93),s=/^\[object .+?Constructor\]$/,u=Function.prototype,c=Object.prototype,l=u.toString,f=c.hasOwnProperty,h=RegExp("^"+l.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!a(t)||i(t))&&(r(t)?h:s).test(o(t))}},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){var r=n(32),i=Object.prototype,a=i.hasOwnProperty,o=i.toString,s=r?r.toStringTag:void 0;t.exports=function(t){var e=a.call(t,s),n=t[s];try{t[s]=void 0;var r=!0}catch(t){}var i=o.call(t);return r&&(e?t[s]=n:delete t[s]),i}},function(t,e){var n=Object.prototype.toString;t.exports=function(t){return n.call(t)}},function(t,e,n){var r,i=n(185),a=(r=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";t.exports=function(t){return!!a&&a in t}},function(t,e,n){var r=n(12)["__core-js_shared__"];t.exports=r},function(t,e){t.exports=function(t,e){return null==t?void 0:t[e]}},function(t,e,n){var r=n(188),i=n(47),a=n(69);t.exports=function(){this.size=0,this.__data__={hash:new r,map:new(a||i),string:new r}}},function(t,e,n){var r=n(189),i=n(190),a=n(191),o=n(192),s=n(193);function u(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}u.prototype.clear=r,u.prototype.delete=i,u.prototype.get=a,u.prototype.has=o,u.prototype.set=s,t.exports=u},function(t,e,n){var r=n(49);t.exports=function(){this.__data__=r?r(null):{},this.size=0}},function(t,e){t.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}},function(t,e,n){var r=n(49),i=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;if(r){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return i.call(e,t)?e[t]:void 0}},function(t,e,n){var r=n(49),i=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return r?void 0!==e[t]:i.call(e,t)}},function(t,e,n){var r=n(49);t.exports=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=r&&void 0===e?"__lodash_hash_undefined__":e,this}},function(t,e,n){var r=n(50);t.exports=function(t){var e=r(this,t).delete(t);return this.size-=e?1:0,e}},function(t,e){t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},function(t,e,n){var r=n(50);t.exports=function(t){return r(this,t).get(t)}},function(t,e,n){var r=n(50);t.exports=function(t){return r(this,t).has(t)}},function(t,e,n){var r=n(50);t.exports=function(t,e){var n=r(this,t),i=n.size;return n.set(t,e),this.size+=n.size==i?0:1,this}},function(t,e,n){var r=n(40),i=n(25);t.exports=function(t,e){return t&&r(e,i(e),t)}},function(t,e){t.exports=function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}},function(t,e,n){var r=n(28),i=n(16);t.exports=function(t){return i(t)&&"[object Arguments]"==r(t)}},function(t,e){t.exports=function(){return!1}},function(t,e,n){var r=n(28),i=n(72),a=n(16),o={};o["[object Float32Array]"]=o["[object Float64Array]"]=o["[object Int8Array]"]=o["[object Int16Array]"]=o["[object Int32Array]"]=o["[object Uint8Array]"]=o["[object Uint8ClampedArray]"]=o["[object Uint16Array]"]=o["[object Uint32Array]"]=!0,o["[object Arguments]"]=o["[object Array]"]=o["[object ArrayBuffer]"]=o["[object Boolean]"]=o["[object DataView]"]=o["[object Date]"]=o["[object Error]"]=o["[object Function]"]=o["[object Map]"]=o["[object Number]"]=o["[object Object]"]=o["[object RegExp]"]=o["[object Set]"]=o["[object String]"]=o["[object WeakMap]"]=!1,t.exports=function(t){return a(t)&&i(t.length)&&!!o[r(t)]}},function(t,e,n){var r=n(96)(Object.keys,Object);t.exports=r},function(t,e,n){var r=n(40),i=n(34);t.exports=function(t,e){return t&&r(e,i(e),t)}},function(t,e,n){var r=n(9),i=n(55),a=n(207),o=Object.prototype.hasOwnProperty;t.exports=function(t){if(!r(t))return a(t);var e=i(t),n=[];for(var s in t)("constructor"!=s||!e&&o.call(t,s))&&n.push(s);return n}},function(t,e){t.exports=function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}},function(t,e,n){var r=n(40),i=n(75);t.exports=function(t,e){return r(t,i(t),e)}},function(t,e,n){var r=n(40),i=n(101);t.exports=function(t,e){return r(t,i(t),e)}},function(t,e,n){var r=n(103),i=n(101),a=n(34);t.exports=function(t){return r(t,a,i)}},function(t,e,n){var r=n(27)(n(12),"DataView");t.exports=r},function(t,e,n){var r=n(27)(n(12),"Promise");t.exports=r},function(t,e,n){var r=n(27)(n(12),"WeakMap");t.exports=r},function(t,e){var n=Object.prototype.hasOwnProperty;t.exports=function(t){var e=t.length,r=new t.constructor(e);return e&&"string"==typeof t[0]&&n.call(t,"index")&&(r.index=t.index,r.input=t.input),r}},function(t,e,n){var r=n(77),i=n(216),a=n(217),o=n(218),s=n(106);t.exports=function(t,e,n){var u=t.constructor;switch(e){case"[object ArrayBuffer]":return r(t);case"[object Boolean]":case"[object Date]":return new u(+t);case"[object DataView]":return i(t,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return s(t,n);case"[object Map]":return new u;case"[object Number]":case"[object String]":return new u(t);case"[object RegExp]":return a(t);case"[object Set]":return new u;case"[object Symbol]":return o(t)}}},function(t,e,n){var r=n(77);t.exports=function(t,e){var n=e?r(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}},function(t,e){var n=/\w*$/;t.exports=function(t){var e=new t.constructor(t.source,n.exec(t));return e.lastIndex=t.lastIndex,e}},function(t,e,n){var r=n(32),i=r?r.prototype:void 0,a=i?i.valueOf:void 0;t.exports=function(t){return a?Object(a.call(t)):{}}},function(t,e,n){var r=n(220),i=n(54),a=n(73),o=a&&a.isMap,s=o?i(o):r;t.exports=s},function(t,e,n){var r=n(35),i=n(16);t.exports=function(t){return i(t)&&"[object Map]"==r(t)}},function(t,e,n){var r=n(222),i=n(54),a=n(73),o=a&&a.isSet,s=o?i(o):r;t.exports=s},function(t,e,n){var r=n(35),i=n(16);t.exports=function(t){return i(t)&&"[object Set]"==r(t)}},function(t,e){t.exports=function(t){return function(e,n,r){for(var i=-1,a=Object(e),o=r(e),s=o.length;s--;){var u=o[t?s:++i];if(!1===n(a[u],u,a))break}return e}}},function(t,e,n){var r=n(19);t.exports=function(t,e){return function(n,i){if(null==n)return n;if(!r(n))return t(n,i);for(var a=n.length,o=e?a:-1,s=Object(n);(e?o--:++o<a)&&!1!==i(s[o],o,s););return n}}},function(t,e,n){var r=n(57);t.exports=function(t,e){var n=[];return r(t,(function(t,r,i){e(t,r,i)&&n.push(t)})),n}},function(t,e,n){var r=n(227),i=n(235),a=n(117);t.exports=function(t){var e=i(t);return 1==e.length&&e[0][2]?a(e[0][0],e[0][1]):function(n){return n===t||r(n,t,e)}}},function(t,e,n){var r=n(46),i=n(112);t.exports=function(t,e,n,a){var o=n.length,s=o,u=!a;if(null==t)return!s;for(t=Object(t);o--;){var c=n[o];if(u&&c[2]?c[1]!==t[c[0]]:!(c[0]in t))return!1}for(;++o<s;){var l=(c=n[o])[0],f=t[l],h=c[1];if(u&&c[2]){if(void 0===f&&!(l in t))return!1}else{var d=new r;if(a)var p=a(f,h,l,t,e,d);if(!(void 0===p?i(h,f,3,a,d):p))return!1}}return!0}},function(t,e,n){var r=n(46),i=n(113),a=n(232),o=n(234),s=n(35),u=n(4),c=n(33),l=n(42),f="[object Object]",h=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,d,p,y){var g=u(t),m=u(e),v=g?"[object Array]":s(t),b=m?"[object Array]":s(e),x=(v="[object Arguments]"==v?f:v)==f,_=(b="[object Arguments]"==b?f:b)==f,w=v==b;if(w&&c(t)){if(!c(e))return!1;g=!0,x=!1}if(w&&!x)return y||(y=new r),g||l(t)?i(t,e,n,d,p,y):a(t,e,v,n,d,p,y);if(!(1&n)){var k=x&&h.call(t,"__wrapped__"),E=_&&h.call(e,"__wrapped__");if(k||E){var A=k?t.value():t,T=E?e.value():e;return y||(y=new r),p(A,T,n,d,y)}}return!!w&&(y||(y=new r),o(t,e,n,d,p,y))}},function(t,e){t.exports=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this}},function(t,e){t.exports=function(t){return this.__data__.has(t)}},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}},function(t,e,n){var r=n(32),i=n(105),a=n(30),o=n(113),s=n(233),u=n(82),c=r?r.prototype:void 0,l=c?c.valueOf:void 0;t.exports=function(t,e,n,r,c,f,h){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!f(new i(t),new i(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return a(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var d=s;case"[object Set]":var p=1&r;if(d||(d=u),t.size!=e.size&&!p)return!1;var y=h.get(t);if(y)return y==e;r|=2,h.set(t,e);var g=o(d(t),d(e),r,c,f,h);return h.delete(t),g;case"[object Symbol]":if(l)return l.call(t)==l.call(e)}return!1}},function(t,e){t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}},function(t,e,n){var r=n(102),i=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,a,o,s){var u=1&n,c=r(t),l=c.length;if(l!=r(e).length&&!u)return!1;for(var f=l;f--;){var h=c[f];if(!(u?h in e:i.call(e,h)))return!1}var d=s.get(t);if(d&&s.get(e))return d==e;var p=!0;s.set(t,e),s.set(e,t);for(var y=u;++f<l;){var g=t[h=c[f]],m=e[h];if(a)var v=u?a(m,g,h,e,t,s):a(g,m,h,t,e,s);if(!(void 0===v?g===m||o(g,m,n,a,s):v)){p=!1;break}y||(y="constructor"==h)}if(p&&!y){var b=t.constructor,x=e.constructor;b!=x&&"constructor"in t&&"constructor"in e&&!("function"==typeof b&&b instanceof b&&"function"==typeof x&&x instanceof x)&&(p=!1)}return s.delete(t),s.delete(e),p}},function(t,e,n){var r=n(116),i=n(25);t.exports=function(t){for(var e=i(t),n=e.length;n--;){var a=e[n],o=t[a];e[n]=[a,o,r(o)]}return e}},function(t,e,n){var r=n(112),i=n(237),a=n(119),o=n(84),s=n(116),u=n(117),c=n(43);t.exports=function(t,e){return o(t)&&s(e)?u(c(t),e):function(n){var o=i(n,t);return void 0===o&&o===e?a(n,t):r(e,o,3)}}},function(t,e,n){var r=n(83);t.exports=function(t,e,n){var i=null==t?void 0:r(t,e);return void 0===i?n:i}},function(t,e,n){var r=n(239),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,a=/\\(\\)?/g,o=r((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(i,(function(t,n,r,i){e.push(r?i.replace(a,"$1"):n||t)})),e}));t.exports=o},function(t,e,n){var r=n(240);t.exports=function(t){var e=r(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}},function(t,e,n){var r=n(70);function i(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=t.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(i.Cache||r),n}i.Cache=r,t.exports=i},function(t,e,n){var r=n(32),i=n(59),a=n(4),o=n(36),s=r?r.prototype:void 0,u=s?s.toString:void 0;t.exports=function t(e){if("string"==typeof e)return e;if(a(e))return i(e,t)+"";if(o(e))return u?u.call(e):"";var n=e+"";return"0"==n&&1/e==-1/0?"-0":n}},function(t,e){t.exports=function(t,e){return null!=t&&e in Object(t)}},function(t,e,n){var r=n(121),i=n(244),a=n(84),o=n(43);t.exports=function(t){return a(t)?r(o(t)):i(t)}},function(t,e,n){var r=n(83);t.exports=function(t){return function(e){return r(e,t)}}},function(t,e){var n=Object.prototype.hasOwnProperty;t.exports=function(t,e){return null!=t&&n.call(t,e)}},function(t,e,n){var r=n(74),i=n(35),a=n(41),o=n(4),s=n(19),u=n(33),c=n(55),l=n(42),f=Object.prototype.hasOwnProperty;t.exports=function(t){if(null==t)return!0;if(s(t)&&(o(t)||"string"==typeof t||"function"==typeof t.splice||u(t)||l(t)||a(t)))return!t.length;var e=i(t);if("[object Map]"==e||"[object Set]"==e)return!t.size;if(c(t))return!r(t).length;for(var n in t)if(f.call(t,n))return!1;return!0}},function(t,e){t.exports=function(t,e,n,r){var i=-1,a=null==t?0:t.length;for(r&&a&&(n=t[++i]);++i<a;)n=e(n,t[i],i,t);return n}},function(t,e){t.exports=function(t,e,n,r,i){return i(t,(function(t,i,a){n=r?(r=!1,t):e(n,t,i,a)})),n}},function(t,e,n){var r=n(74),i=n(35),a=n(19),o=n(250),s=n(251);t.exports=function(t){if(null==t)return 0;if(a(t))return o(t)?s(t):t.length;var e=i(t);return"[object Map]"==e||"[object Set]"==e?t.size:r(t).length}},function(t,e,n){var r=n(28),i=n(4),a=n(16);t.exports=function(t){return"string"==typeof t||!i(t)&&a(t)&&"[object String]"==r(t)}},function(t,e,n){var r=n(252),i=n(253),a=n(254);t.exports=function(t){return i(t)?a(t):r(t)}},function(t,e,n){var r=n(121)("length");t.exports=r},function(t,e){var n=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");t.exports=function(t){return n.test(t)}},function(t,e){var n="[\\ud800-\\udfff]",r="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",i="\\ud83c[\\udffb-\\udfff]",a="[^\\ud800-\\udfff]",o="(?:\\ud83c[\\udde6-\\uddff]){2}",s="[\\ud800-\\udbff][\\udc00-\\udfff]",u="(?:"+r+"|"+i+")"+"?",c="[\\ufe0e\\ufe0f]?"+u+("(?:\\u200d(?:"+[a,o,s].join("|")+")[\\ufe0e\\ufe0f]?"+u+")*"),l="(?:"+[a+r+"?",r,o,s,n].join("|")+")",f=RegExp(i+"(?="+i+")|"+l+c,"g");t.exports=function(t){for(var e=f.lastIndex=0;f.test(t);)++e;return e}},function(t,e,n){var r=n(71),i=n(108),a=n(80),o=n(20),s=n(56),u=n(4),c=n(33),l=n(31),f=n(9),h=n(42);t.exports=function(t,e,n){var d=u(t),p=d||c(t)||h(t);if(e=o(e,4),null==n){var y=t&&t.constructor;n=p?d?new y:[]:f(t)&&l(y)?i(s(t)):{}}return(p?r:a)(t,(function(t,r,i){return e(n,t,r,i)})),n}},function(t,e,n){var r=n(86),i=n(60),a=n(261),o=n(129),s=i((function(t){return a(r(t,1,o,!0))}));t.exports=s},function(t,e,n){var r=n(32),i=n(41),a=n(4),o=r?r.isConcatSpreadable:void 0;t.exports=function(t){return a(t)||i(t)||!!(o&&t&&t[o])}},function(t,e){t.exports=function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}},function(t,e,n){var r=n(78),i=n(94),a=n(29),o=i?function(t,e){return i(t,"toString",{configurable:!0,enumerable:!1,value:r(e),writable:!0})}:a;t.exports=o},function(t,e){var n=Date.now;t.exports=function(t){var e=0,r=0;return function(){var i=n(),a=16-(i-r);if(r=i,a>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}},function(t,e,n){var r=n(114),i=n(262),a=n(266),o=n(115),s=n(267),u=n(82);t.exports=function(t,e,n){var c=-1,l=i,f=t.length,h=!0,d=[],p=d;if(n)h=!1,l=a;else if(f>=200){var y=e?null:s(t);if(y)return u(y);h=!1,l=o,p=new r}else p=e?[]:d;t:for(;++c<f;){var g=t[c],m=e?e(g):g;if(g=n||0!==g?g:0,h&&m==m){for(var v=p.length;v--;)if(p[v]===m)continue t;e&&p.push(m),d.push(g)}else l(p,m,n)||(p!==d&&p.push(m),d.push(g))}return d}},function(t,e,n){var r=n(263);t.exports=function(t,e){return!!(null==t?0:t.length)&&r(t,e,0)>-1}},function(t,e,n){var r=n(128),i=n(264),a=n(265);t.exports=function(t,e,n){return e==e?a(t,e,n):r(t,i,n)}},function(t,e){t.exports=function(t){return t!=t}},function(t,e){t.exports=function(t,e,n){for(var r=n-1,i=t.length;++r<i;)if(t[r]===e)return r;return-1}},function(t,e){t.exports=function(t,e,n){for(var r=-1,i=null==t?0:t.length;++r<i;)if(n(e,t[r]))return!0;return!1}},function(t,e,n){var r=n(104),i=n(268),a=n(82),o=r&&1/a(new r([,-0]))[1]==1/0?function(t){return new r(t)}:i;t.exports=o},function(t,e){t.exports=function(){}},function(t,e,n){var r=n(59);t.exports=function(t,e){return r(e,(function(e){return t[e]}))}},function(t,e){t.exports="2.1.8"},function(t,e,n){var r=n(8),i=n(68);function a(t){return r.map(t.nodes(),(function(e){var n=t.node(e),i=t.parent(e),a={v:e};return r.isUndefined(n)||(a.value=n),r.isUndefined(i)||(a.parent=i),a}))}function o(t){return r.map(t.edges(),(function(e){var n=t.edge(e),i={v:e.v,w:e.w};return r.isUndefined(e.name)||(i.name=e.name),r.isUndefined(n)||(i.value=n),i}))}t.exports={write:function(t){var e={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:a(t),edges:o(t)};r.isUndefined(t.graph())||(e.value=r.clone(t.graph()));return e},read:function(t){var e=new i(t.options).setGraph(t.value);return r.each(t.nodes,(function(t){e.setNode(t.v,t.value),t.parent&&e.setParent(t.v,t.parent)})),r.each(t.edges,(function(t){e.setEdge({v:t.v,w:t.w,name:t.name},t.value)})),e}}},function(t,e,n){t.exports={components:n(273),dijkstra:n(131),dijkstraAll:n(274),findCycles:n(275),floydWarshall:n(276),isAcyclic:n(277),postorder:n(278),preorder:n(279),prim:n(280),tarjan:n(133),topsort:n(134)}},function(t,e,n){var r=n(8);t.exports=function(t){var e,n={},i=[];function a(i){r.has(n,i)||(n[i]=!0,e.push(i),r.each(t.successors(i),a),r.each(t.predecessors(i),a))}return r.each(t.nodes(),(function(t){e=[],a(t),e.length&&i.push(e)})),i}},function(t,e,n){var r=n(131),i=n(8);t.exports=function(t,e,n){return i.transform(t.nodes(),(function(i,a){i[a]=r(t,a,e,n)}),{})}},function(t,e,n){var r=n(8),i=n(133);t.exports=function(t){return r.filter(i(t),(function(e){return e.length>1||1===e.length&&t.hasEdge(e[0],e[0])}))}},function(t,e,n){var r=n(8);t.exports=function(t,e,n){return function(t,e,n){var r={},i=t.nodes();return i.forEach((function(t){r[t]={},r[t][t]={distance:0},i.forEach((function(e){t!==e&&(r[t][e]={distance:Number.POSITIVE_INFINITY})})),n(t).forEach((function(n){var i=n.v===t?n.w:n.v,a=e(n);r[t][i]={distance:a,predecessor:t}}))})),i.forEach((function(t){var e=r[t];i.forEach((function(n){var a=r[n];i.forEach((function(n){var r=a[t],i=e[n],o=a[n],s=r.distance+i.distance;s<o.distance&&(o.distance=s,o.predecessor=i.predecessor)}))}))})),r}(t,e||i,n||function(e){return t.outEdges(e)})};var i=r.constant(1)},function(t,e,n){var r=n(134);t.exports=function(t){try{r(t)}catch(t){if(t instanceof r.CycleException)return!1;throw t}return!0}},function(t,e,n){var r=n(135);t.exports=function(t,e){return r(t,e,"post")}},function(t,e,n){var r=n(135);t.exports=function(t,e){return r(t,e,"pre")}},function(t,e,n){var r=n(8),i=n(68),a=n(132);t.exports=function(t,e){var n,o=new i,s={},u=new a;function c(t){var r=t.v===n?t.w:t.v,i=u.priority(r);if(void 0!==i){var a=e(t);a<i&&(s[r]=n,u.decrease(r,a))}}if(0===t.nodeCount())return o;r.each(t.nodes(),(function(t){u.add(t,Number.POSITIVE_INFINITY),o.setNode(t)})),u.decrease(t.nodes()[0],0);var l=!1;for(;u.size()>0;){if(n=u.removeMin(),r.has(s,n))o.setEdge(n,s[n]);else{if(l)throw new Error("Input graph is not connected: "+t);l=!0}t.nodeEdges(n).forEach(c)}return o}},function(t,e,n){var r;try{r=n(2)}catch(t){}r||(r=window.graphlib),t.exports=r},function(t,e,n){"use strict";var r=n(3),i=n(315),a=n(318),o=n(319),s=n(7).normalizeRanks,u=n(321),c=n(7).removeEmptyRanks,l=n(322),f=n(323),h=n(324),d=n(325),p=n(334),y=n(7),g=n(13).Graph;t.exports=function(t,e){var n=e&&e.debugTiming?y.time:y.notime;n("layout",(function(){var e=n(" buildLayoutGraph",(function(){return function(t){var e=new g({multigraph:!0,compound:!0}),n=T(t.graph());return e.setGraph(r.merge({},v,A(n,m),r.pick(n,b))),r.forEach(t.nodes(),(function(n){var i=T(t.node(n));e.setNode(n,r.defaults(A(i,x),_)),e.setParent(n,t.parent(n))})),r.forEach(t.edges(),(function(n){var i=T(t.edge(n));e.setEdge(n,r.merge({},k,A(i,w),r.pick(i,E)))})),e}(t)}));n(" runLayout",(function(){!function(t,e){e(" makeSpaceForEdgeLabels",(function(){!function(t){var e=t.graph();e.ranksep/=2,r.forEach(t.edges(),(function(n){var r=t.edge(n);r.minlen*=2,"c"!==r.labelpos.toLowerCase()&&("TB"===e.rankdir||"BT"===e.rankdir?r.width+=r.labeloffset:r.height+=r.labeloffset)}))}(t)})),e(" removeSelfEdges",(function(){!function(t){r.forEach(t.edges(),(function(e){if(e.v===e.w){var n=t.node(e.v);n.selfEdges||(n.selfEdges=[]),n.selfEdges.push({e:e,label:t.edge(e)}),t.removeEdge(e)}}))}(t)})),e(" acyclic",(function(){i.run(t)})),e(" nestingGraph.run",(function(){l.run(t)})),e(" rank",(function(){o(y.asNonCompoundGraph(t))})),e(" injectEdgeLabelProxies",(function(){!function(t){r.forEach(t.edges(),(function(e){var n=t.edge(e);if(n.width&&n.height){var r=t.node(e.v),i={rank:(t.node(e.w).rank-r.rank)/2+r.rank,e:e};y.addDummyNode(t,"edge-proxy",i,"_ep")}}))}(t)})),e(" removeEmptyRanks",(function(){c(t)})),e(" nestingGraph.cleanup",(function(){l.cleanup(t)})),e(" normalizeRanks",(function(){s(t)})),e(" assignRankMinMax",(function(){!function(t){var e=0;r.forEach(t.nodes(),(function(n){var i=t.node(n);i.borderTop&&(i.minRank=t.node(i.borderTop).rank,i.maxRank=t.node(i.borderBottom).rank,e=r.max(e,i.maxRank))})),t.graph().maxRank=e}(t)})),e(" removeEdgeLabelProxies",(function(){!function(t){r.forEach(t.nodes(),(function(e){var n=t.node(e);"edge-proxy"===n.dummy&&(t.edge(n.e).labelRank=n.rank,t.removeNode(e))}))}(t)})),e(" normalize.run",(function(){a.run(t)})),e(" parentDummyChains",(function(){u(t)})),e(" addBorderSegments",(function(){f(t)})),e(" order",(function(){d(t)})),e(" insertSelfEdges",(function(){!function(t){var e=y.buildLayerMatrix(t);r.forEach(e,(function(e){var n=0;r.forEach(e,(function(e,i){var a=t.node(e);a.order=i+n,r.forEach(a.selfEdges,(function(e){y.addDummyNode(t,"selfedge",{width:e.label.width,height:e.label.height,rank:a.rank,order:i+ ++n,e:e.e,label:e.label},"_se")})),delete a.selfEdges}))}))}(t)})),e(" adjustCoordinateSystem",(function(){h.adjust(t)})),e(" position",(function(){p(t)})),e(" positionSelfEdges",(function(){!function(t){r.forEach(t.nodes(),(function(e){var n=t.node(e);if("selfedge"===n.dummy){var r=t.node(n.e.v),i=r.x+r.width/2,a=r.y,o=n.x-i,s=r.height/2;t.setEdge(n.e,n.label),t.removeNode(e),n.label.points=[{x:i+2*o/3,y:a-s},{x:i+5*o/6,y:a-s},{x:i+o,y:a},{x:i+5*o/6,y:a+s},{x:i+2*o/3,y:a+s}],n.label.x=n.x,n.label.y=n.y}}))}(t)})),e(" removeBorderNodes",(function(){!function(t){r.forEach(t.nodes(),(function(e){if(t.children(e).length){var n=t.node(e),i=t.node(n.borderTop),a=t.node(n.borderBottom),o=t.node(r.last(n.borderLeft)),s=t.node(r.last(n.borderRight));n.width=Math.abs(s.x-o.x),n.height=Math.abs(a.y-i.y),n.x=o.x+n.width/2,n.y=i.y+n.height/2}})),r.forEach(t.nodes(),(function(e){"border"===t.node(e).dummy&&t.removeNode(e)}))}(t)})),e(" normalize.undo",(function(){a.undo(t)})),e(" fixupEdgeLabelCoords",(function(){!function(t){r.forEach(t.edges(),(function(e){var n=t.edge(e);if(r.has(n,"x"))switch("l"!==n.labelpos&&"r"!==n.labelpos||(n.width-=n.labeloffset),n.labelpos){case"l":n.x-=n.width/2+n.labeloffset;break;case"r":n.x+=n.width/2+n.labeloffset}}))}(t)})),e(" undoCoordinateSystem",(function(){h.undo(t)})),e(" translateGraph",(function(){!function(t){var e=Number.POSITIVE_INFINITY,n=0,i=Number.POSITIVE_INFINITY,a=0,o=t.graph(),s=o.marginx||0,u=o.marginy||0;function c(t){var r=t.x,o=t.y,s=t.width,u=t.height;e=Math.min(e,r-s/2),n=Math.max(n,r+s/2),i=Math.min(i,o-u/2),a=Math.max(a,o+u/2)}r.forEach(t.nodes(),(function(e){c(t.node(e))})),r.forEach(t.edges(),(function(e){var n=t.edge(e);r.has(n,"x")&&c(n)})),e-=s,i-=u,r.forEach(t.nodes(),(function(n){var r=t.node(n);r.x-=e,r.y-=i})),r.forEach(t.edges(),(function(n){var a=t.edge(n);r.forEach(a.points,(function(t){t.x-=e,t.y-=i})),r.has(a,"x")&&(a.x-=e),r.has(a,"y")&&(a.y-=i)})),o.width=n-e+s,o.height=a-i+u}(t)})),e(" assignNodeIntersects",(function(){!function(t){r.forEach(t.edges(),(function(e){var n,r,i=t.edge(e),a=t.node(e.v),o=t.node(e.w);i.points?(n=i.points[0],r=i.points[i.points.length-1]):(i.points=[],n=o,r=a),i.points.unshift(y.intersectRect(a,n)),i.points.push(y.intersectRect(o,r))}))}(t)})),e(" reversePoints",(function(){!function(t){r.forEach(t.edges(),(function(e){var n=t.edge(e);n.reversed&&n.points.reverse()}))}(t)})),e(" acyclic.undo",(function(){i.undo(t)}))}(e,n)})),n(" updateInputGraph",(function(){!function(t,e){r.forEach(t.nodes(),(function(n){var r=t.node(n),i=e.node(n);r&&(r.x=i.x,r.y=i.y,e.children(n).length&&(r.width=i.width,r.height=i.height))})),r.forEach(t.edges(),(function(n){var i=t.edge(n),a=e.edge(n);i.points=a.points,r.has(a,"x")&&(i.x=a.x,i.y=a.y)})),t.graph().width=e.graph().width,t.graph().height=e.graph().height}(t,e)}))}))};var m=["nodesep","edgesep","ranksep","marginx","marginy"],v={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},b=["acyclicer","ranker","rankdir","align"],x=["width","height"],_={width:0,height:0},w=["minlen","weight","width","height","labeloffset"],k={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},E=["labelpos"];function A(t,e){return r.mapValues(r.pick(t,e),Number)}function T(t){var e={};return r.forEach(t,(function(t,n){e[n.toLowerCase()]=t})),e}},function(t,e,n){var r=n(91);t.exports=function(t){return r(t,5)}},function(t,e,n){var r=n(285)(n(286));t.exports=r},function(t,e,n){var r=n(20),i=n(19),a=n(25);t.exports=function(t){return function(e,n,o){var s=Object(e);if(!i(e)){var u=r(n,3);e=a(e),n=function(t){return u(s[t],t,s)}}var c=t(e,n,o);return c>-1?s[u?e[c]:c]:void 0}}},function(t,e,n){var r=n(128),i=n(20),a=n(287),o=Math.max;t.exports=function(t,e,n){var s=null==t?0:t.length;if(!s)return-1;var u=null==n?0:a(n);return u<0&&(u=o(s+u,0)),r(t,i(e,3),u)}},function(t,e,n){var r=n(138);t.exports=function(t){var e=r(t),n=e%1;return e==e?n?e-n:e:0}},function(t,e,n){var r=n(9),i=n(36),a=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,u=/^0o[0-7]+$/i,c=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(i(t))return NaN;if(r(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=r(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(a,"");var n=s.test(t);return n||u.test(t)?c(t.slice(2),n?2:8):o.test(t)?NaN:+t}},function(t,e,n){var r=n(81),i=n(110),a=n(34);t.exports=function(t,e){return null==t?t:r(t,i(e),a)}},function(t,e){t.exports=function(t){var e=null==t?0:t.length;return e?t[e-1]:void 0}},function(t,e,n){var r=n(52),i=n(80),a=n(20);t.exports=function(t,e){var n={};return e=a(e,3),i(t,(function(t,i,a){r(n,i,e(t,i,a))})),n}},function(t,e,n){var r=n(87),i=n(293),a=n(29);t.exports=function(t){return t&&t.length?r(t,a,i):void 0}},function(t,e){t.exports=function(t,e){return t>e}},function(t,e,n){var r=n(295),i=n(298)((function(t,e,n){r(t,e,n)}));t.exports=i},function(t,e,n){var r=n(46),i=n(140),a=n(81),o=n(296),s=n(9),u=n(34),c=n(142);t.exports=function t(e,n,l,f,h){e!==n&&a(n,(function(a,u){if(h||(h=new r),s(a))o(e,n,u,l,t,f,h);else{var d=f?f(c(e,u),a,u+"",e,n,h):void 0;void 0===d&&(d=a),i(e,u,d)}}),u)}},function(t,e,n){var r=n(140),i=n(97),a=n(106),o=n(98),s=n(107),u=n(41),c=n(4),l=n(129),f=n(33),h=n(31),d=n(9),p=n(141),y=n(42),g=n(142),m=n(297);t.exports=function(t,e,n,v,b,x,_){var w=g(t,n),k=g(e,n),E=_.get(k);if(E)r(t,n,E);else{var A=x?x(w,k,n+"",t,e,_):void 0,T=void 0===A;if(T){var S=c(k),M=!S&&f(k),O=!S&&!M&&y(k);A=k,S||M||O?c(w)?A=w:l(w)?A=o(w):M?(T=!1,A=i(k,!0)):O?(T=!1,A=a(k,!0)):A=[]:p(k)||u(k)?(A=w,u(w)?A=m(w):d(w)&&!h(w)||(A=s(k))):T=!1}T&&(_.set(k,A),b(A,k,v,x,_),_.delete(k)),r(t,n,A)}}},function(t,e,n){var r=n(40),i=n(34);t.exports=function(t){return r(t,i(t))}},function(t,e,n){var r=n(60),i=n(61);t.exports=function(t){return r((function(e,n){var r=-1,a=n.length,o=a>1?n[a-1]:void 0,s=a>2?n[2]:void 0;for(o=t.length>3&&"function"==typeof o?(a--,o):void 0,s&&i(n[0],n[1],s)&&(o=a<3?void 0:o,a=1),e=Object(e);++r<a;){var u=n[r];u&&t(e,u,r,o)}return e}))}},function(t,e,n){var r=n(87),i=n(143),a=n(29);t.exports=function(t){return t&&t.length?r(t,a,i):void 0}},function(t,e,n){var r=n(87),i=n(20),a=n(143);t.exports=function(t,e){return t&&t.length?r(t,i(e,2),a):void 0}},function(t,e,n){var r=n(12);t.exports=function(){return r.Date.now()}},function(t,e,n){var r=n(303),i=n(119);t.exports=function(t,e){return r(t,e,(function(e,n){return i(t,n)}))}},function(t,e,n){var r=n(83),i=n(304),a=n(58);t.exports=function(t,e,n){for(var o=-1,s=e.length,u={};++o<s;){var c=e[o],l=r(t,c);n(l,c)&&i(u,a(c,t),l)}return u}},function(t,e,n){var r=n(51),i=n(58),a=n(53),o=n(9),s=n(43);t.exports=function(t,e,n,u){if(!o(t))return t;for(var c=-1,l=(e=i(e,t)).length,f=l-1,h=t;null!=h&&++c<l;){var d=s(e[c]),p=n;if(c!=f){var y=h[d];void 0===(p=u?u(y,d,h):void 0)&&(p=o(y)?y:a(e[c+1])?[]:{})}r(h,d,p),h=h[d]}return t}},function(t,e,n){var r=n(139),i=n(126),a=n(127);t.exports=function(t){return a(i(t,void 0,r),t+"")}},function(t,e,n){var r=n(307),i=n(61),a=n(138);t.exports=function(t){return function(e,n,o){return o&&"number"!=typeof o&&i(e,n,o)&&(n=o=void 0),e=a(e),void 0===n?(n=e,e=0):n=a(n),o=void 0===o?e<n?1:-1:a(o),r(e,n,o,t)}}},function(t,e){var n=Math.ceil,r=Math.max;t.exports=function(t,e,i,a){for(var o=-1,s=r(n((e-t)/(i||1)),0),u=Array(s);s--;)u[a?s:++o]=t,t+=i;return u}},function(t,e,n){var r=n(86),i=n(309),a=n(60),o=n(61),s=a((function(t,e){if(null==t)return[];var n=e.length;return n>1&&o(t,e[0],e[1])?e=[]:n>2&&o(e[0],e[1],e[2])&&(e=[e[0]]),i(t,r(e,1),[])}));t.exports=s},function(t,e,n){var r=n(59),i=n(20),a=n(124),o=n(310),s=n(54),u=n(311),c=n(29);t.exports=function(t,e,n){var l=-1;e=r(e.length?e:[c],s(i));var f=a(t,(function(t,n,i){return{criteria:r(e,(function(e){return e(t)})),index:++l,value:t}}));return o(f,(function(t,e){return u(t,e,n)}))}},function(t,e){t.exports=function(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}},function(t,e,n){var r=n(312);t.exports=function(t,e,n){for(var i=-1,a=t.criteria,o=e.criteria,s=a.length,u=n.length;++i<s;){var c=r(a[i],o[i]);if(c)return i>=u?c:c*("desc"==n[i]?-1:1)}return t.index-e.index}},function(t,e,n){var r=n(36);t.exports=function(t,e){if(t!==e){var n=void 0!==t,i=null===t,a=t==t,o=r(t),s=void 0!==e,u=null===e,c=e==e,l=r(e);if(!u&&!l&&!o&&t>e||o&&s&&c&&!u&&!l||i&&s&&c||!n&&c||!a)return 1;if(!i&&!o&&!l&&t<e||l&&n&&a&&!i&&!o||u&&n&&a||!s&&a||!c)return-1}return 0}},function(t,e,n){var r=n(51),i=n(314);t.exports=function(t,e){return i(t||[],e||[],r)}},function(t,e){t.exports=function(t,e,n){for(var r=-1,i=t.length,a=e.length,o={};++r<i;){var s=r<a?e[r]:void 0;n(o,t[r],s)}return o}},function(t,e,n){"use strict";var r=n(3),i=n(316);t.exports={run:function(t){var e="greedy"===t.graph().acyclicer?i(t,function(t){return function(e){return t.edge(e).weight}}(t)):function(t){var e=[],n={},i={};function a(o){r.has(i,o)||(i[o]=!0,n[o]=!0,r.forEach(t.outEdges(o),(function(t){r.has(n,t.w)?e.push(t):a(t.w)})),delete n[o])}return r.forEach(t.nodes(),a),e}(t);r.forEach(e,(function(e){var n=t.edge(e);t.removeEdge(e),n.forwardName=e.name,n.reversed=!0,t.setEdge(e.w,e.v,n,r.uniqueId("rev"))}))},undo:function(t){r.forEach(t.edges(),(function(e){var n=t.edge(e);if(n.reversed){t.removeEdge(e);var r=n.forwardName;delete n.reversed,delete n.forwardName,t.setEdge(e.w,e.v,n,r)}}))}}},function(t,e,n){var r=n(3),i=n(13).Graph,a=n(317);t.exports=function(t,e){if(t.nodeCount()<=1)return[];var n=function(t,e){var n=new i,o=0,s=0;r.forEach(t.nodes(),(function(t){n.setNode(t,{v:t,in:0,out:0})})),r.forEach(t.edges(),(function(t){var r=n.edge(t.v,t.w)||0,i=e(t),a=r+i;n.setEdge(t.v,t.w,a),s=Math.max(s,n.node(t.v).out+=i),o=Math.max(o,n.node(t.w).in+=i)}));var c=r.range(s+o+3).map((function(){return new a})),l=o+1;return r.forEach(n.nodes(),(function(t){u(c,l,n.node(t))})),{graph:n,buckets:c,zeroIdx:l}}(t,e||o),c=function(t,e,n){var r,i=[],a=e[e.length-1],o=e[0];for(;t.nodeCount();){for(;r=o.dequeue();)s(t,e,n,r);for(;r=a.dequeue();)s(t,e,n,r);if(t.nodeCount())for(var u=e.length-2;u>0;--u)if(r=e[u].dequeue()){i=i.concat(s(t,e,n,r,!0));break}}return i}(n.graph,n.buckets,n.zeroIdx);return r.flatten(r.map(c,(function(e){return t.outEdges(e.v,e.w)})),!0)};var o=r.constant(1);function s(t,e,n,i,a){var o=a?[]:void 0;return r.forEach(t.inEdges(i.v),(function(r){var i=t.edge(r),s=t.node(r.v);a&&o.push({v:r.v,w:r.w}),s.out-=i,u(e,n,s)})),r.forEach(t.outEdges(i.v),(function(r){var i=t.edge(r),a=r.w,o=t.node(a);o.in-=i,u(e,n,o)})),t.removeNode(i.v),o}function u(t,e,n){n.out?n.in?t[n.out-n.in+e].enqueue(n):t[t.length-1].enqueue(n):t[0].enqueue(n)}},function(t,e){function n(){var t={};t._next=t._prev=t,this._sentinel=t}function r(t){t._prev._next=t._next,t._next._prev=t._prev,delete t._next,delete t._prev}function i(t,e){if("_next"!==t&&"_prev"!==t)return e}t.exports=n,n.prototype.dequeue=function(){var t=this._sentinel,e=t._prev;if(e!==t)return r(e),e},n.prototype.enqueue=function(t){var e=this._sentinel;t._prev&&t._next&&r(t),t._next=e._next,e._next._prev=t,e._next=t,t._prev=e},n.prototype.toString=function(){for(var t=[],e=this._sentinel,n=e._prev;n!==e;)t.push(JSON.stringify(n,i)),n=n._prev;return"["+t.join(", ")+"]"}},function(t,e,n){"use strict";var r=n(3),i=n(7);t.exports={run:function(t){t.graph().dummyChains=[],r.forEach(t.edges(),(function(e){!function(t,e){var n,r,a,o=e.v,s=t.node(o).rank,u=e.w,c=t.node(u).rank,l=e.name,f=t.edge(e),h=f.labelRank;if(c===s+1)return;for(t.removeEdge(e),a=0,++s;s<c;++a,++s)f.points=[],r={width:0,height:0,edgeLabel:f,edgeObj:e,rank:s},n=i.addDummyNode(t,"edge",r,"_d"),s===h&&(r.width=f.width,r.height=f.height,r.dummy="edge-label",r.labelpos=f.labelpos),t.setEdge(o,n,{weight:f.weight},l),0===a&&t.graph().dummyChains.push(n),o=n;t.setEdge(o,u,{weight:f.weight},l)}(t,e)}))},undo:function(t){r.forEach(t.graph().dummyChains,(function(e){var n,r=t.node(e),i=r.edgeLabel;for(t.setEdge(r.edgeObj,i);r.dummy;)n=t.successors(e)[0],t.removeNode(e),i.points.push({x:r.x,y:r.y}),"edge-label"===r.dummy&&(i.x=r.x,i.y=r.y,i.width=r.width,i.height=r.height),e=n,r=t.node(e)}))}}},function(t,e,n){"use strict";var r=n(62).longestPath,i=n(147),a=n(320);t.exports=function(t){switch(t.graph().ranker){case"network-simplex":s(t);break;case"tight-tree":!function(t){r(t),i(t)}(t);break;case"longest-path":o(t);break;default:s(t)}};var o=r;function s(t){a(t)}},function(t,e,n){"use strict";var r=n(3),i=n(147),a=n(62).slack,o=n(62).longestPath,s=n(13).alg.preorder,u=n(13).alg.postorder,c=n(7).simplify;function l(t){t=c(t),o(t);var e,n=i(t);for(d(n),f(n,t);e=y(n);)m(n,t,e,g(n,t,e))}function f(t,e){var n=u(t,t.nodes());n=n.slice(0,n.length-1),r.forEach(n,(function(n){!function(t,e,n){var r=t.node(n).parent;t.edge(n,r).cutvalue=h(t,e,n)}(t,e,n)}))}function h(t,e,n){var i=t.node(n).parent,a=!0,o=e.edge(n,i),s=0;return o||(a=!1,o=e.edge(i,n)),s=o.weight,r.forEach(e.nodeEdges(n),(function(r){var o,u,c=r.v===n,l=c?r.w:r.v;if(l!==i){var f=c===a,h=e.edge(r).weight;if(s+=f?h:-h,o=n,u=l,t.hasEdge(o,u)){var d=t.edge(n,l).cutvalue;s+=f?-d:d}}})),s}function d(t,e){arguments.length<2&&(e=t.nodes()[0]),p(t,{},1,e)}function p(t,e,n,i,a){var o=n,s=t.node(i);return e[i]=!0,r.forEach(t.neighbors(i),(function(a){r.has(e,a)||(n=p(t,e,n,a,i))})),s.low=o,s.lim=n++,a?s.parent=a:delete s.parent,n}function y(t){return r.find(t.edges(),(function(e){return t.edge(e).cutvalue<0}))}function g(t,e,n){var i=n.v,o=n.w;e.hasEdge(i,o)||(i=n.w,o=n.v);var s=t.node(i),u=t.node(o),c=s,l=!1;s.lim>u.lim&&(c=u,l=!0);var f=r.filter(e.edges(),(function(e){return l===v(t,t.node(e.v),c)&&l!==v(t,t.node(e.w),c)}));return r.minBy(f,(function(t){return a(e,t)}))}function m(t,e,n,i){var a=n.v,o=n.w;t.removeEdge(a,o),t.setEdge(i.v,i.w,{}),d(t),f(t,e),function(t,e){var n=r.find(t.nodes(),(function(t){return!e.node(t).parent})),i=s(t,n);i=i.slice(1),r.forEach(i,(function(n){var r=t.node(n).parent,i=e.edge(n,r),a=!1;i||(i=e.edge(r,n),a=!0),e.node(n).rank=e.node(r).rank+(a?i.minlen:-i.minlen)}))}(t,e)}function v(t,e,n){return n.low<=e.lim&&e.lim<=n.lim}t.exports=l,l.initLowLimValues=d,l.initCutValues=f,l.calcCutValue=h,l.leaveEdge=y,l.enterEdge=g,l.exchangeEdges=m},function(t,e,n){var r=n(3);t.exports=function(t){var e=function(t){var e={},n=0;function i(a){var o=n;r.forEach(t.children(a),i),e[a]={low:o,lim:n++}}return r.forEach(t.children(),i),e}(t);r.forEach(t.graph().dummyChains,(function(n){for(var r=t.node(n),i=r.edgeObj,a=function(t,e,n,r){var i,a,o=[],s=[],u=Math.min(e[n].low,e[r].low),c=Math.max(e[n].lim,e[r].lim);i=n;do{i=t.parent(i),o.push(i)}while(i&&(e[i].low>u||c>e[i].lim));a=i,i=r;for(;(i=t.parent(i))!==a;)s.push(i);return{path:o.concat(s.reverse()),lca:a}}(t,e,i.v,i.w),o=a.path,s=a.lca,u=0,c=o[u],l=!0;n!==i.w;){if(r=t.node(n),l){for(;(c=o[u])!==s&&t.node(c).maxRank<r.rank;)u++;c===s&&(l=!1)}if(!l){for(;u<o.length-1&&t.node(c=o[u+1]).minRank<=r.rank;)u++;c=o[u]}t.setParent(n,c),n=t.successors(n)[0]}}))}},function(t,e,n){var r=n(3),i=n(7);t.exports={run:function(t){var e=i.addDummyNode(t,"root",{},"_root"),n=function(t){var e={};return r.forEach(t.children(),(function(n){!function n(i,a){var o=t.children(i);o&&o.length&&r.forEach(o,(function(t){n(t,a+1)}));e[i]=a}(n,1)})),e}(t),a=r.max(r.values(n))-1,o=2*a+1;t.graph().nestingRoot=e,r.forEach(t.edges(),(function(e){t.edge(e).minlen*=o}));var s=function(t){return r.reduce(t.edges(),(function(e,n){return e+t.edge(n).weight}),0)}(t)+1;r.forEach(t.children(),(function(u){!function t(e,n,a,o,s,u,c){var l=e.children(c);if(!l.length)return void(c!==n&&e.setEdge(n,c,{weight:0,minlen:a}));var f=i.addBorderNode(e,"_bt"),h=i.addBorderNode(e,"_bb"),d=e.node(c);e.setParent(f,c),d.borderTop=f,e.setParent(h,c),d.borderBottom=h,r.forEach(l,(function(r){t(e,n,a,o,s,u,r);var i=e.node(r),l=i.borderTop?i.borderTop:r,d=i.borderBottom?i.borderBottom:r,p=i.borderTop?o:2*o,y=l!==d?1:s-u[c]+1;e.setEdge(f,l,{weight:p,minlen:y,nestingEdge:!0}),e.setEdge(d,h,{weight:p,minlen:y,nestingEdge:!0})})),e.parent(c)||e.setEdge(n,f,{weight:0,minlen:s+u[c]})}(t,e,o,s,a,n,u)})),t.graph().nodeRankFactor=o},cleanup:function(t){var e=t.graph();t.removeNode(e.nestingRoot),delete e.nestingRoot,r.forEach(t.edges(),(function(e){t.edge(e).nestingEdge&&t.removeEdge(e)}))}}},function(t,e,n){var r=n(3),i=n(7);function a(t,e,n,r,a,o){var s={width:0,height:0,rank:o,borderType:e},u=a[e][o-1],c=i.addDummyNode(t,"border",s,n);a[e][o]=c,t.setParent(c,r),u&&t.setEdge(u,c,{weight:1})}t.exports=function(t){r.forEach(t.children(),(function e(n){var i=t.children(n),o=t.node(n);if(i.length&&r.forEach(i,e),r.has(o,"minRank")){o.borderLeft=[],o.borderRight=[];for(var s=o.minRank,u=o.maxRank+1;s<u;++s)a(t,"borderLeft","_bl",n,o,s),a(t,"borderRight","_br",n,o,s)}}))}},function(t,e,n){"use strict";var r=n(3);function i(t){r.forEach(t.nodes(),(function(e){a(t.node(e))})),r.forEach(t.edges(),(function(e){a(t.edge(e))}))}function a(t){var e=t.width;t.width=t.height,t.height=e}function o(t){t.y=-t.y}function s(t){var e=t.x;t.x=t.y,t.y=e}t.exports={adjust:function(t){var e=t.graph().rankdir.toLowerCase();"lr"!==e&&"rl"!==e||i(t)},undo:function(t){var e=t.graph().rankdir.toLowerCase();"bt"!==e&&"rl"!==e||function(t){r.forEach(t.nodes(),(function(e){o(t.node(e))})),r.forEach(t.edges(),(function(e){var n=t.edge(e);r.forEach(n.points,o),r.has(n,"y")&&o(n)}))}(t);"lr"!==e&&"rl"!==e||(!function(t){r.forEach(t.nodes(),(function(e){s(t.node(e))})),r.forEach(t.edges(),(function(e){var n=t.edge(e);r.forEach(n.points,s),r.has(n,"x")&&s(n)}))}(t),i(t))}}},function(t,e,n){"use strict";var r=n(3),i=n(326),a=n(327),o=n(328),s=n(332),u=n(333),c=n(13).Graph,l=n(7);function f(t,e,n){return r.map(e,(function(e){return s(t,e,n)}))}function h(t,e){var n=new c;r.forEach(t,(function(t){var i=t.graph().root,a=o(t,i,n,e);r.forEach(a.vs,(function(e,n){t.node(e).order=n})),u(t,n,a.vs)}))}function d(t,e){r.forEach(e,(function(e){r.forEach(e,(function(e,n){t.node(e).order=n}))}))}t.exports=function(t){var e=l.maxRank(t),n=f(t,r.range(1,e+1),"inEdges"),o=f(t,r.range(e-1,-1,-1),"outEdges"),s=i(t);d(t,s);for(var u,c=Number.POSITIVE_INFINITY,p=0,y=0;y<4;++p,++y){h(p%2?n:o,p%4>=2),s=l.buildLayerMatrix(t);var g=a(t,s);g<c&&(y=0,u=r.cloneDeep(s),c=g)}d(t,u)}},function(t,e,n){"use strict";var r=n(3);t.exports=function(t){var e={},n=r.filter(t.nodes(),(function(e){return!t.children(e).length})),i=r.max(r.map(n,(function(e){return t.node(e).rank}))),a=r.map(r.range(i+1),(function(){return[]}));var o=r.sortBy(n,(function(e){return t.node(e).rank}));return r.forEach(o,(function n(i){if(r.has(e,i))return;e[i]=!0;var o=t.node(i);a[o.rank].push(i),r.forEach(t.successors(i),n)})),a}},function(t,e,n){"use strict";var r=n(3);function i(t,e,n){for(var i=r.zipObject(n,r.map(n,(function(t,e){return e}))),a=r.flatten(r.map(e,(function(e){return r.sortBy(r.map(t.outEdges(e),(function(e){return{pos:i[e.w],weight:t.edge(e).weight}})),"pos")})),!0),o=1;o<n.length;)o<<=1;var s=2*o-1;o-=1;var u=r.map(new Array(s),(function(){return 0})),c=0;return r.forEach(a.forEach((function(t){var e=t.pos+o;u[e]+=t.weight;for(var n=0;e>0;)e%2&&(n+=u[e+1]),u[e=e-1>>1]+=t.weight;c+=t.weight*n}))),c}t.exports=function(t,e){for(var n=0,r=1;r<e.length;++r)n+=i(t,e[r-1],e[r]);return n}},function(t,e,n){var r=n(3),i=n(329),a=n(330),o=n(331);t.exports=function t(e,n,s,u){var c=e.children(n),l=e.node(n),f=l?l.borderLeft:void 0,h=l?l.borderRight:void 0,d={};f&&(c=r.filter(c,(function(t){return t!==f&&t!==h})));var p=i(e,c);r.forEach(p,(function(n){if(e.children(n.v).length){var i=t(e,n.v,s,u);d[n.v]=i,r.has(i,"barycenter")&&(a=n,o=i,r.isUndefined(a.barycenter)?(a.barycenter=o.barycenter,a.weight=o.weight):(a.barycenter=(a.barycenter*a.weight+o.barycenter*o.weight)/(a.weight+o.weight),a.weight+=o.weight))}var a,o}));var y=a(p,s);!function(t,e){r.forEach(t,(function(t){t.vs=r.flatten(t.vs.map((function(t){return e[t]?e[t].vs:t})),!0)}))}(y,d);var g=o(y,u);if(f&&(g.vs=r.flatten([f,g.vs,h],!0),e.predecessors(f).length)){var m=e.node(e.predecessors(f)[0]),v=e.node(e.predecessors(h)[0]);r.has(g,"barycenter")||(g.barycenter=0,g.weight=0),g.barycenter=(g.barycenter*g.weight+m.order+v.order)/(g.weight+2),g.weight+=2}return g}},function(t,e,n){var r=n(3);t.exports=function(t,e){return r.map(e,(function(e){var n=t.inEdges(e);if(n.length){var i=r.reduce(n,(function(e,n){var r=t.edge(n),i=t.node(n.v);return{sum:e.sum+r.weight*i.order,weight:e.weight+r.weight}}),{sum:0,weight:0});return{v:e,barycenter:i.sum/i.weight,weight:i.weight}}return{v:e}}))}},function(t,e,n){"use strict";var r=n(3);t.exports=function(t,e){var n={};return r.forEach(t,(function(t,e){var i=n[t.v]={indegree:0,in:[],out:[],vs:[t.v],i:e};r.isUndefined(t.barycenter)||(i.barycenter=t.barycenter,i.weight=t.weight)})),r.forEach(e.edges(),(function(t){var e=n[t.v],i=n[t.w];r.isUndefined(e)||r.isUndefined(i)||(i.indegree++,e.out.push(n[t.w]))})),function(t){var e=[];function n(t){return function(e){e.merged||(r.isUndefined(e.barycenter)||r.isUndefined(t.barycenter)||e.barycenter>=t.barycenter)&&function(t,e){var n=0,r=0;t.weight&&(n+=t.barycenter*t.weight,r+=t.weight);e.weight&&(n+=e.barycenter*e.weight,r+=e.weight);t.vs=e.vs.concat(t.vs),t.barycenter=n/r,t.weight=r,t.i=Math.min(e.i,t.i),e.merged=!0}(t,e)}}function i(e){return function(n){n.in.push(e),0==--n.indegree&&t.push(n)}}for(;t.length;){var a=t.pop();e.push(a),r.forEach(a.in.reverse(),n(a)),r.forEach(a.out,i(a))}return r.map(r.filter(e,(function(t){return!t.merged})),(function(t){return r.pick(t,["vs","i","barycenter","weight"])}))}(r.filter(n,(function(t){return!t.indegree})))}},function(t,e,n){var r=n(3),i=n(7);function a(t,e,n){for(var i;e.length&&(i=r.last(e)).i<=n;)e.pop(),t.push(i.vs),n++;return n}t.exports=function(t,e){var n=i.partition(t,(function(t){return r.has(t,"barycenter")})),o=n.lhs,s=r.sortBy(n.rhs,(function(t){return-t.i})),u=[],c=0,l=0,f=0;o.sort((h=!!e,function(t,e){return t.barycenter<e.barycenter?-1:t.barycenter>e.barycenter?1:h?e.i-t.i:t.i-e.i})),f=a(u,s,f),r.forEach(o,(function(t){f+=t.vs.length,u.push(t.vs),c+=t.barycenter*t.weight,l+=t.weight,f=a(u,s,f)}));var h;var d={vs:r.flatten(u,!0)};l&&(d.barycenter=c/l,d.weight=l);return d}},function(t,e,n){var r=n(3),i=n(13).Graph;t.exports=function(t,e,n){var a=function(t){var e;for(;t.hasNode(e=r.uniqueId("_root")););return e}(t),o=new i({compound:!0}).setGraph({root:a}).setDefaultNodeLabel((function(e){return t.node(e)}));return r.forEach(t.nodes(),(function(i){var s=t.node(i),u=t.parent(i);(s.rank===e||s.minRank<=e&&e<=s.maxRank)&&(o.setNode(i),o.setParent(i,u||a),r.forEach(t[n](i),(function(e){var n=e.v===i?e.w:e.v,a=o.edge(n,i),s=r.isUndefined(a)?0:a.weight;o.setEdge(n,i,{weight:t.edge(e).weight+s})})),r.has(s,"minRank")&&o.setNode(i,{borderLeft:s.borderLeft[e],borderRight:s.borderRight[e]}))})),o}},function(t,e,n){var r=n(3);t.exports=function(t,e,n){var i,a={};r.forEach(n,(function(n){for(var r,o,s=t.parent(n);s;){if((r=t.parent(s))?(o=a[r],a[r]=s):(o=i,i=s),o&&o!==s)return void e.setEdge(o,s);s=r}}))}},function(t,e,n){"use strict";var r=n(3),i=n(7),a=n(335).positionX;t.exports=function(t){(function(t){var e=i.buildLayerMatrix(t),n=t.graph().ranksep,a=0;r.forEach(e,(function(e){var i=r.max(r.map(e,(function(e){return t.node(e).height})));r.forEach(e,(function(e){t.node(e).y=a+i/2})),a+=i+n}))})(t=i.asNonCompoundGraph(t)),r.forEach(a(t),(function(e,n){t.node(n).x=e}))}},function(t,e,n){"use strict";var r=n(3),i=n(13).Graph,a=n(7);function o(t,e){var n={};return r.reduce(e,(function(e,i){var a=0,o=0,s=e.length,c=r.last(i);return r.forEach(i,(function(e,l){var f=function(t,e){if(t.node(e).dummy)return r.find(t.predecessors(e),(function(e){return t.node(e).dummy}))}(t,e),h=f?t.node(f).order:s;(f||e===c)&&(r.forEach(i.slice(o,l+1),(function(e){r.forEach(t.predecessors(e),(function(r){var i=t.node(r),o=i.order;!(o<a||h<o)||i.dummy&&t.node(e).dummy||u(n,r,e)}))})),o=l+1,a=h)})),i})),n}function s(t,e){var n={};function i(e,i,a,o,s){var c;r.forEach(r.range(i,a),(function(i){c=e[i],t.node(c).dummy&&r.forEach(t.predecessors(c),(function(e){var r=t.node(e);r.dummy&&(r.order<o||r.order>s)&&u(n,e,c)}))}))}return r.reduce(e,(function(e,n){var a,o=-1,s=0;return r.forEach(n,(function(r,u){if("border"===t.node(r).dummy){var c=t.predecessors(r);c.length&&(a=t.node(c[0]).order,i(n,s,u,o,a),s=u,o=a)}i(n,s,n.length,a,e.length)})),n})),n}function u(t,e,n){if(e>n){var r=e;e=n,n=r}var i=t[e];i||(t[e]=i={}),i[n]=!0}function c(t,e,n){if(e>n){var i=e;e=n,n=i}return r.has(t[e],n)}function l(t,e,n,i){var a={},o={},s={};return r.forEach(e,(function(t){r.forEach(t,(function(t,e){a[t]=t,o[t]=t,s[t]=e}))})),r.forEach(e,(function(t){var e=-1;r.forEach(t,(function(t){var u=i(t);if(u.length)for(var l=((u=r.sortBy(u,(function(t){return s[t]}))).length-1)/2,f=Math.floor(l),h=Math.ceil(l);f<=h;++f){var d=u[f];o[t]===t&&e<s[d]&&!c(n,t,d)&&(o[d]=t,o[t]=a[t]=a[d],e=s[d])}}))})),{root:a,align:o}}function f(t,e,n,a,o){var s={},u=function(t,e,n,a){var o=new i,s=t.graph(),u=function(t,e,n){return function(i,a,o){var s,u=i.node(a),c=i.node(o),l=0;if(l+=u.width/2,r.has(u,"labelpos"))switch(u.labelpos.toLowerCase()){case"l":s=-u.width/2;break;case"r":s=u.width/2}if(s&&(l+=n?s:-s),s=0,l+=(u.dummy?e:t)/2,l+=(c.dummy?e:t)/2,l+=c.width/2,r.has(c,"labelpos"))switch(c.labelpos.toLowerCase()){case"l":s=c.width/2;break;case"r":s=-c.width/2}return s&&(l+=n?s:-s),s=0,l}}(s.nodesep,s.edgesep,a);return r.forEach(e,(function(e){var i;r.forEach(e,(function(e){var r=n[e];if(o.setNode(r),i){var a=n[i],s=o.edge(a,r);o.setEdge(a,r,Math.max(u(t,e,i),s||0))}i=e}))})),o}(t,e,n,o),c=o?"borderLeft":"borderRight";function l(t,e){for(var n=u.nodes(),r=n.pop(),i={};r;)i[r]?t(r):(i[r]=!0,n.push(r),n=n.concat(e(r))),r=n.pop()}return l((function(t){s[t]=u.inEdges(t).reduce((function(t,e){return Math.max(t,s[e.v]+u.edge(e))}),0)}),u.predecessors.bind(u)),l((function(e){var n=u.outEdges(e).reduce((function(t,e){return Math.min(t,s[e.w]-u.edge(e))}),Number.POSITIVE_INFINITY),r=t.node(e);n!==Number.POSITIVE_INFINITY&&r.borderType!==c&&(s[e]=Math.max(s[e],n))}),u.successors.bind(u)),r.forEach(a,(function(t){s[t]=s[n[t]]})),s}function h(t,e){return r.minBy(r.values(e),(function(e){var n=Number.NEGATIVE_INFINITY,i=Number.POSITIVE_INFINITY;return r.forIn(e,(function(e,r){var a=function(t,e){return t.node(e).width}(t,r)/2;n=Math.max(e+a,n),i=Math.min(e-a,i)})),n-i}))}function d(t,e){var n=r.values(e),i=r.min(n),a=r.max(n);r.forEach(["u","d"],(function(n){r.forEach(["l","r"],(function(o){var s,u=n+o,c=t[u];if(c!==e){var l=r.values(c);(s="l"===o?i-r.min(l):a-r.max(l))&&(t[u]=r.mapValues(c,(function(t){return t+s})))}}))}))}function p(t,e){return r.mapValues(t.ul,(function(n,i){if(e)return t[e.toLowerCase()][i];var a=r.sortBy(r.map(t,i));return(a[1]+a[2])/2}))}t.exports={positionX:function(t){var e,n=a.buildLayerMatrix(t),i=r.merge(o(t,n),s(t,n)),u={};r.forEach(["u","d"],(function(a){e="u"===a?n:r.values(n).reverse(),r.forEach(["l","r"],(function(n){"r"===n&&(e=r.map(e,(function(t){return r.values(t).reverse()})));var o=("u"===a?t.predecessors:t.successors).bind(t),s=l(t,e,i,o),c=f(t,e,s.root,s.align,"r"===n);"r"===n&&(c=r.mapValues(c,(function(t){return-t}))),u[a+n]=c}))}));var c=h(t,u);return d(u,c),p(u,t.graph().align)},findType1Conflicts:o,findType2Conflicts:s,addConflict:u,hasConflict:c,verticalAlignment:l,horizontalCompaction:f,alignCoordinates:d,findSmallestWidthAlignment:h,balance:p}},function(t,e,n){var r=n(3),i=n(7),a=n(13).Graph;t.exports={debugOrdering:function(t){var e=i.buildLayerMatrix(t),n=new a({compound:!0,multigraph:!0}).setGraph({});return r.forEach(t.nodes(),(function(e){n.setNode(e,{label:e}),n.setParent(e,"layer"+t.node(e).rank)})),r.forEach(t.edges(),(function(t){n.setEdge(t.v,t.w,{},t.name)})),r.forEach(e,(function(t,e){var i="layer"+e;n.setNode(i,{rank:"same"}),r.reduce(t,(function(t,e){return n.setEdge(t,e,{style:"invis"}),e}))})),n}}},function(t,e){t.exports="0.8.5"},function(t,e,n){t.exports={node:n(148),circle:n(149),ellipse:n(88),polygon:n(150),rect:n(151)}},function(t,e){function n(t,e){return t*e>0}t.exports=function(t,e,r,i){var a,o,s,u,c,l,f,h,d,p,y,g,m;if(a=e.y-t.y,s=t.x-e.x,c=e.x*t.y-t.x*e.y,d=a*r.x+s*r.y+c,p=a*i.x+s*i.y+c,0!==d&&0!==p&&n(d,p))return;if(o=i.y-r.y,u=r.x-i.x,l=i.x*r.y-r.x*i.y,f=o*t.x+u*t.y+l,h=o*e.x+u*e.y+l,0!==f&&0!==h&&n(f,h))return;if(0===(y=a*u-o*s))return;return g=Math.abs(y/2),{x:(m=s*l-u*c)<0?(m-g)/y:(m+g)/y,y:(m=o*c-a*l)<0?(m-g)/y:(m+g)/y}}},function(t,e,n){var r=n(37),i=n(26),a=n(136).layout;t.exports=function(){var t=n(341),e=n(344),i=n(345),c=n(346),l=n(347),f=n(348),h=n(349),d=n(350),p=n(351),y=function(n,y){!function(t){t.nodes().forEach((function(e){var n=t.node(e);r.has(n,"label")||t.children(e).length||(n.label=e),r.has(n,"paddingX")&&r.defaults(n,{paddingLeft:n.paddingX,paddingRight:n.paddingX}),r.has(n,"paddingY")&&r.defaults(n,{paddingTop:n.paddingY,paddingBottom:n.paddingY}),r.has(n,"padding")&&r.defaults(n,{paddingLeft:n.padding,paddingRight:n.padding,paddingTop:n.padding,paddingBottom:n.padding}),r.defaults(n,o),r.each(["paddingLeft","paddingRight","paddingTop","paddingBottom"],(function(t){n[t]=Number(n[t])})),r.has(n,"width")&&(n._prevWidth=n.width),r.has(n,"height")&&(n._prevHeight=n.height)})),t.edges().forEach((function(e){var n=t.edge(e);r.has(n,"label")||(n.label=""),r.defaults(n,s)}))}(y);var g=u(n,"output"),m=u(g,"clusters"),v=u(g,"edgePaths"),b=i(u(g,"edgeLabels"),y),x=t(u(g,"nodes"),y,d);a(y),l(x,y),f(b,y),c(v,y,p);var _=e(m,y);h(_,y),function(t){r.each(t.nodes(),(function(e){var n=t.node(e);r.has(n,"_prevWidth")?n.width=n._prevWidth:delete n.width,r.has(n,"_prevHeight")?n.height=n._prevHeight:delete n.height,delete n._prevWidth,delete n._prevHeight}))}(y)};return y.createNodes=function(e){return arguments.length?(t=e,y):t},y.createClusters=function(t){return arguments.length?(e=t,y):e},y.createEdgeLabels=function(t){return arguments.length?(i=t,y):i},y.createEdgePaths=function(t){return arguments.length?(c=t,y):c},y.shapes=function(t){return arguments.length?(d=t,y):d},y.arrows=function(t){return arguments.length?(p=t,y):p},y};var o={paddingLeft:10,paddingRight:10,paddingTop:10,paddingBottom:10,rx:0,ry:0,shape:"rect"},s={arrowhead:"normal",curve:i.curveLinear};function u(t,e){var n=t.select("g."+e);return n.empty()&&(n=t.append("g").attr("class",e)),n}},function(t,e,n){"use strict";var r=n(37),i=n(89),a=n(10),o=n(26);t.exports=function(t,e,n){var s,u=e.nodes().filter((function(t){return!a.isSubgraph(e,t)})),c=t.selectAll("g.node").data(u,(function(t){return t})).classed("update",!0);c.exit().remove(),c.enter().append("g").attr("class","node").style("opacity",0),(c=t.selectAll("g.node")).each((function(t){var s=e.node(t),u=o.select(this);a.applyClass(u,s.class,(u.classed("update")?"update ":"")+"node"),u.select("g.label").remove();var c=u.append("g").attr("class","label"),l=i(c,s),f=n[s.shape],h=r.pick(l.node().getBBox(),"width","height");s.elem=this,s.id&&u.attr("id",s.id),s.labelId&&c.attr("id",s.labelId),r.has(s,"width")&&(h.width=s.width),r.has(s,"height")&&(h.height=s.height),h.width+=s.paddingLeft+s.paddingRight,h.height+=s.paddingTop+s.paddingBottom,c.attr("transform","translate("+(s.paddingLeft-s.paddingRight)/2+","+(s.paddingTop-s.paddingBottom)/2+")");var d=o.select(this);d.select(".label-container").remove();var p=f(d,h,s).classed("label-container",!0);a.applyStyle(p,s.style);var y=p.node().getBBox();s.width=y.width,s.height=y.height})),s=c.exit?c.exit():c.selectAll(null);return a.applyTransition(s,e).style("opacity",0).remove(),c}},function(t,e,n){var r=n(10);t.exports=function(t,e){for(var n=t.append("text"),i=function(t){for(var e,n="",r=!1,i=0;i<t.length;++i)if(e=t[i],r){switch(e){case"n":n+="\n";break;default:n+=e}r=!1}else"\\"===e?r=!0:n+=e;return n}(e.label).split("\n"),a=0;a<i.length;a++)n.append("tspan").attr("xml:space","preserve").attr("dy","1em").attr("x","1").text(i[a]);return r.applyStyle(n,e.labelStyle),n}},function(t,e,n){var r=n(10);t.exports=function(t,e){var n=t;return n.node().appendChild(e.label),r.applyStyle(n,e.labelStyle),n}},function(t,e,n){var r=n(10),i=n(26),a=n(89);t.exports=function(t,e){var n,o=e.nodes().filter((function(t){return r.isSubgraph(e,t)})),s=t.selectAll("g.cluster").data(o,(function(t){return t}));s.selectAll("*").remove(),s.enter().append("g").attr("class","cluster").attr("id",(function(t){return e.node(t).id})).style("opacity",0),s=t.selectAll("g.cluster"),r.applyTransition(s,e).style("opacity",1),s.each((function(t){var n=e.node(t),r=i.select(this);i.select(this).append("rect");var o=r.append("g").attr("class","label");a(o,n,n.clusterLabelPos)})),s.selectAll("rect").each((function(t){var n=e.node(t),a=i.select(this);r.applyStyle(a,n.style)})),n=s.exit?s.exit():s.selectAll(null);return r.applyTransition(n,e).style("opacity",0).remove(),s}},function(t,e,n){"use strict";var r=n(37),i=n(89),a=n(10),o=n(26);t.exports=function(t,e){var n,s=t.selectAll("g.edgeLabel").data(e.edges(),(function(t){return a.edgeToId(t)})).classed("update",!0);s.exit().remove(),s.enter().append("g").classed("edgeLabel",!0).style("opacity",0),(s=t.selectAll("g.edgeLabel")).each((function(t){var n=o.select(this);n.select(".label").remove();var a=e.edge(t),s=i(n,e.edge(t),0,0).classed("label",!0),u=s.node().getBBox();a.labelId&&s.attr("id",a.labelId),r.has(a,"width")||(a.width=u.width),r.has(a,"height")||(a.height=u.height)})),n=s.exit?s.exit():s.selectAll(null);return a.applyTransition(n,e).style("opacity",0).remove(),s}},function(t,e,n){"use strict";var r=n(37),i=n(148),a=n(10),o=n(26);function s(t,e){var n=(o.line||o.svg.line)().x((function(t){return t.x})).y((function(t){return t.y}));return(n.curve||n.interpolate)(t.curve),n(e)}t.exports=function(t,e,n){var u=t.selectAll("g.edgePath").data(e.edges(),(function(t){return a.edgeToId(t)})).classed("update",!0),c=function(t,e){var n=t.enter().append("g").attr("class","edgePath").style("opacity",0);return n.append("path").attr("class","path").attr("d",(function(t){var n=e.edge(t),i=e.node(t.v).elem;return s(n,r.range(n.points.length).map((function(){return e=(t=i).getBBox(),{x:(n=t.ownerSVGElement.getScreenCTM().inverse().multiply(t.getScreenCTM()).translate(e.width/2,e.height/2)).e,y:n.f};var t,e,n})))})),n.append("defs"),n}(u,e);!function(t,e){var n=t.exit();a.applyTransition(n,e).style("opacity",0).remove()}(u,e);var l=void 0!==u.merge?u.merge(c):u;return a.applyTransition(l,e).style("opacity",1),l.each((function(t){var n=o.select(this),r=e.edge(t);r.elem=this,r.id&&n.attr("id",r.id),a.applyClass(n,r.class,(n.classed("update")?"update ":"")+"edgePath")})),l.selectAll("path.path").each((function(t){var n=e.edge(t);n.arrowheadId=r.uniqueId("arrowhead");var u=o.select(this).attr("marker-end",(function(){return"url("+(t=location.href,e=n.arrowheadId,t.split("#")[0]+"#"+e)+")";var t,e})).style("fill","none");a.applyTransition(u,e).attr("d",(function(t){return function(t,e){var n=t.edge(e),r=t.node(e.v),a=t.node(e.w),o=n.points.slice(1,n.points.length-1);return o.unshift(i(r,o[0])),o.push(i(a,o[o.length-1])),s(n,o)}(e,t)})),a.applyStyle(u,n.style)})),l.selectAll("defs *").remove(),l.selectAll("defs").each((function(t){var r=e.edge(t);(0,n[r.arrowhead])(o.select(this),r.arrowheadId,r,"arrowhead")})),l}},function(t,e,n){"use strict";var r=n(10),i=n(26);t.exports=function(t,e){function n(t){var n=e.node(t);return"translate("+n.x+","+n.y+")"}t.filter((function(){return!i.select(this).classed("update")})).attr("transform",n),r.applyTransition(t,e).style("opacity",1).attr("transform",n)}},function(t,e,n){"use strict";var r=n(10),i=n(26),a=n(37);t.exports=function(t,e){function n(t){var n=e.edge(t);return a.has(n,"x")?"translate("+n.x+","+n.y+")":""}t.filter((function(){return!i.select(this).classed("update")})).attr("transform",n),r.applyTransition(t,e).style("opacity",1).attr("transform",n)}},function(t,e,n){"use strict";var r=n(10),i=n(26);t.exports=function(t,e){var n=t.filter((function(){return!i.select(this).classed("update")}));function a(t){var n=e.node(t);return"translate("+n.x+","+n.y+")"}n.attr("transform",a),r.applyTransition(t,e).style("opacity",1).attr("transform",a),r.applyTransition(n.selectAll("rect"),e).attr("width",(function(t){return e.node(t).width})).attr("height",(function(t){return e.node(t).height})).attr("x",(function(t){return-e.node(t).width/2})).attr("y",(function(t){return-e.node(t).height/2}))}},function(t,e,n){"use strict";var r=n(151),i=n(88),a=n(149),o=n(150);t.exports={rect:function(t,e,n){var i=t.insert("rect",":first-child").attr("rx",n.rx).attr("ry",n.ry).attr("x",-e.width/2).attr("y",-e.height/2).attr("width",e.width).attr("height",e.height);return n.intersect=function(t){return r(n,t)},i},ellipse:function(t,e,n){var r=e.width/2,a=e.height/2,o=t.insert("ellipse",":first-child").attr("x",-e.width/2).attr("y",-e.height/2).attr("rx",r).attr("ry",a);return n.intersect=function(t){return i(n,r,a,t)},o},circle:function(t,e,n){var r=Math.max(e.width,e.height)/2,i=t.insert("circle",":first-child").attr("x",-e.width/2).attr("y",-e.height/2).attr("r",r);return n.intersect=function(t){return a(n,r,t)},i},diamond:function(t,e,n){var r=e.width*Math.SQRT2/2,i=e.height*Math.SQRT2/2,a=[{x:0,y:-i},{x:-r,y:0},{x:0,y:i},{x:r,y:0}],s=t.insert("polygon",":first-child").attr("points",a.map((function(t){return t.x+","+t.y})).join(" "));return n.intersect=function(t){return o(n,a,t)},s}}},function(t,e,n){var r=n(10);function i(t,e,n,i){var a=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").style("stroke-width",1).style("stroke-dasharray","1,0");r.applyStyle(a,n[i+"Style"]),n[i+"Class"]&&a.attr("class",n[i+"Class"])}t.exports={default:i,normal:i,vee:function(t,e,n,i){var a=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 L 4 5 z").style("stroke-width",1).style("stroke-dasharray","1,0");r.applyStyle(a,n[i+"Style"]),n[i+"Class"]&&a.attr("class",n[i+"Class"])},undirected:function(t,e,n,i){var a=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 0 5 L 10 5").style("stroke-width",1).style("stroke-dasharray","1,0");r.applyStyle(a,n[i+"Style"]),n[i+"Class"]&&a.attr("class",n[i+"Class"])}}},function(t,e){t.exports="0.6.4"},function(t,e,n){"use strict";var r;function i(t){return r=r||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),r.innerHTML=t,unescape(r.textContent)}n.r(e);var a=n(0),o=n(152),s=n.n(o),u=n(39);function c(t){return(c="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)}var l={},f=function(t){!function(t){for(var e=Object.keys(t),n=0;n<e.length;n++)if("object"===c(t[e[n]])&&null!=t[e[n]])for(var r=Object.keys(t[e[n]]),i=0;i<r.length;i++)void 0===l[e[n]]&&(l[e[n]]={}),l[e[n]][r[i]]=t[e[n]][r[i]];else l[e[n]]=t[e[n]]}(t)},h=function(){return l},d=n(18),p=n.n(d),y=1,g=2,m=3,v=4,b=5,x={debug:function(){},info:function(){},warn:function(){},error:function(){},fatal:function(){}},_=function(t){x.trace=function(){},x.debug=function(){},x.info=function(){},x.warn=function(){},x.error=function(){},x.fatal=function(){},t<=b&&(x.fatal=console.error?console.error.bind(console,w("FATAL"),"color: orange"):console.log.bind(console,"",w("FATAL"))),t<=v&&(x.error=console.error?console.error.bind(console,w("ERROR"),"color: orange"):console.log.bind(console,"",w("ERROR"))),t<=m&&(x.warn=console.warn?console.warn.bind(console,w("WARN"),"color: orange"):console.log.bind(console,"",w("WARN"))),t<=g&&(x.info=console.info?console.info.bind(console,w("INFO"),"color: lightblue"):console.log.bind(console,"",w("INFO"))),t<=y&&(x.debug=console.debug?console.debug.bind(console,w("DEBUG"),"color: lightgreen"):console.log.bind(console,"",w("DEBUG")))},w=function(t){var e=p()().format("ss.SSS");return"%c".concat(e," : ").concat(t," : ")},k=n(63),E={curveBasis:a.curveBasis,curveBasisClosed:a.curveBasisClosed,curveBasisOpen:a.curveBasisOpen,curveLinear:a.curveLinear,curveLinearClosed:a.curveLinearClosed,curveMonotoneX:a.curveMonotoneX,curveMonotoneY:a.curveMonotoneY,curveNatural:a.curveNatural,curveStep:a.curveStep,curveStepAfter:a.curveStepAfter,curveStepBefore:a.curveStepBefore},A=function(t,e){if(!t)return e;var n="curve".concat(t.charAt(0).toUpperCase()+t.slice(1));return E[n]||e},T=function(t,e){return t&&e?Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)):0},S=function(t){for(var e="",n="",r=0;r<t.length;r++)void 0!==t[r]&&(t[r].startsWith("color:")||t[r].startsWith("text-align:")?n=n+t[r]+";":e=e+t[r]+";");return{style:e,labelStyle:n}},M=0,O=function(){return M++,"id-"+Math.random().toString(36).substr(2,12)+"-"+M},N=function(t){return t=t.replace(/^\s*%%.*\n/g,"\n"),x.debug("Detecting diagram type based on the text "+t),t.match(/^\s*sequenceDiagram/)?"sequence":t.match(/^\s*gantt/)?"gantt":t.match(/^\s*classDiagram/)?"class":t.match(/^\s*stateDiagram-v2/)?"stateDiagram":t.match(/^\s*stateDiagram/)?"state":t.match(/^\s*gitGraph/)?"git":t.match(/^\s*flowchart/)?"flowchart-v2":t.match(/^\s*info/)?"info":t.match(/^\s*pie/)?"pie":t.match(/^\s*erDiagram/)?"er":t.match(/^\s*journey/)?"journey":"flowchart"},C=function(t,e){for(var n=0;n<e.length;n++)if(e[n].match(t))return n;return-1},D=function(t){return function(t){var e,n=0;t.forEach((function(t){n+=T(t,e),e=t}));var r,i=n/2;return e=void 0,t.forEach((function(t){if(e&&!r){var n=T(t,e);if(n<i)i-=n;else{var a=i/n;a<=0&&(r=e),a>=1&&(r={x:t.x,y:t.y}),a>0&&a<1&&(r={x:(1-a)*e.x+a*t.x,y:(1-a)*e.y+a*t.y})}}e=t})),r}(t)},L=function(t,e,n){var r;e[0]!==n&&(e=e.reverse()),e.forEach((function(t){T(t,r),r=t}));var i,a=25;r=void 0,e.forEach((function(t){if(r&&!i){var e=T(t,r);if(e<a)a-=e;else{var n=a/e;n<=0&&(i=r),n>=1&&(i={x:t.x,y:t.y}),n>0&&n<1&&(i={x:(1-n)*r.x+n*t.x,y:(1-n)*r.y+n*t.y})}}r=t}));var o=t?10:5,s=Math.atan2(e[0].y-i.y,e[0].x-i.x),u={x:0,y:0};return u.x=Math.sin(s)*o+(e[0].x+i.x)/2,u.y=-Math.cos(s)*o+(e[0].y+i.y)/2,u},F=function(t,e){var n=t.trim();if(n)return"loose"!==e.securityLevel?Object(k.sanitizeUrl)(n):n},I=n(2),P=n.n(I),R=/<br\s*\/?>/gi,B=function(t){return t.replace(R,"#br#")},j=function(t){return t.replace(/#br#/g,"<br/>")},Y=function(t){if(!t)return 1;var e=B(t);return(e=e.replace(/\\n/g,"#br#")).split("#br#")},z=function(t,e){var n=t,r=!0;return!e.flowchart||!1!==e.flowchart.htmlLabels&&"false"!==e.flowchart.htmlLabels||(r=!1),"loose"!==e.securityLevel&&r&&(n=(n=(n=B(n)).replace(/</g,"&lt;").replace(/>/g,"&gt;")).replace(/=/g,"&equals;"),n=j(n)),n},U=R;function $(t){return($="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)}var G,V=h(),H={},W=[],q=[],X=[],Z={},J={},Q=0,K=!0,tt=[],et=function(t,e,n,r){var i=t,a=e;i[0].match(/\d/)&&(i=""+i),a[0].match(/\d/)&&(a=""+a);var o={start:i,end:a,type:void 0,text:""};void 0!==(r=n.text)&&(o.text=z(r.trim(),V),'"'===o.text[0]&&'"'===o.text[o.text.length-1]&&(o.text=o.text.substring(1,o.text.length-1))),void 0!==n&&(o.type=n.type,o.stroke=n.stroke),W.push(o)},nt=function(t,e){t.split(",").forEach((function(t){var n=t;t[0].match(/\d/)&&(n=""+n),void 0!==H[n]&&H[n].classes.push(e),void 0!==Z[n]&&Z[n].classes.push(e)}))},rt=function(t,e){t.split(",").forEach((function(t){void 0!==e&&(J[t]=z(e,V))}))},it=function(t){var e=Object(a.select)(".mermaidTooltip");null===(e._groups||e)[0][0]&&(e=Object(a.select)("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),Object(a.select)(t).select("svg").selectAll("g.node").on("mouseover",(function(){var t=Object(a.select)(this);if(null!==t.attr("title")){var n=this.getBoundingClientRect();e.transition().duration(200).style("opacity",".9"),e.html(t.attr("title")).style("left",n.left+(n.right-n.left)/2+"px").style("top",n.top-14+document.body.scrollTop+"px"),t.classed("hover",!0)}})).on("mouseout",(function(){e.transition().duration(500).style("opacity",0),Object(a.select)(this).classed("hover",!1)}))};tt.push(it);var at=function(t){for(var e=0;e<X.length;e++)if(X[e].id===t)return e;return-1},ot=-1,st=[],ut={addVertex:function(t,e,n,r,i){var a,o=t;void 0!==o&&0!==o.trim().length&&(o[0].match(/\d/)&&(o=""+o),void 0===H[o]&&(H[o]={id:o,styles:[],classes:[]}),void 0!==e?('"'===(a=z(e.trim(),V))[0]&&'"'===a[a.length-1]&&(a=a.substring(1,a.length-1)),H[o].text=a):void 0===H[o].text&&(H[o].text=t),void 0!==n&&(H[o].type=n),null!=r&&r.forEach((function(t){H[o].styles.push(t)})),null!=i&&i.forEach((function(t){H[o].classes.push(t)})))},addLink:function(t,e,n,r){var i,a;for(i=0;i<t.length;i++)for(a=0;a<e.length;a++)et(t[i],e[a],n,r)},updateLinkInterpolate:function(t,e){t.forEach((function(t){"default"===t?W.defaultInterpolate=e:W[t].interpolate=e}))},updateLink:function(t,e){t.forEach((function(t){"default"===t?W.defaultStyle=e:(-1===C("fill",e)&&e.push("fill:none"),W[t].style=e)}))},addClass:function(t,e){void 0===q[t]&&(q[t]={id:t,styles:[],textStyles:[]}),null!=e&&e.forEach((function(e){if(e.match("color")){var n=e.replace("fill","bgFill").replace("color","fill");q[t].textStyles.push(n)}q[t].styles.push(e)}))},setDirection:function(t){(G=t).match(/.*</)&&(G="RL"),G.match(/.*\^/)&&(G="BT"),G.match(/.*>/)&&(G="LR"),G.match(/.*v/)&&(G="TB")},setClass:nt,getTooltip:function(t){return J[t]},setClickEvent:function(t,e,n){t.split(",").forEach((function(t){!function(t,e){var n=t;t[0].match(/\d/)&&(n=""+n),"loose"===V.securityLevel&&void 0!==e&&void 0!==H[n]&&tt.push((function(){var t=document.querySelector('[id="'.concat(n,'"]'));null!==t&&t.addEventListener("click",(function(){window[e](n)}),!1)}))}(t,e)})),rt(t,n),nt(t,"clickable")},setLink:function(t,e,n){t.split(",").forEach((function(t){var n=t;t[0].match(/\d/)&&(n=""+n),void 0!==H[n]&&(H[n].link=F(e,V))})),rt(t,n),nt(t,"clickable")},bindFunctions:function(t){tt.forEach((function(e){e(t)}))},getDirection:function(){return G.trim()},getVertices:function(){return H},getEdges:function(){return W},getClasses:function(){return q},clear:function(){H={},q={},W=[],(tt=[]).push(it),X=[],Z={},Q=0,J=[],K=!0},defaultStyle:function(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"},addSubGraph:function(t,e,n){var r=t.trim(),i=n;t===n&&n.match(/\s/)&&(r=void 0);var a,o,s,u=[];a=u.concat.apply(u,e),o={boolean:{},number:{},string:{}},s=[],u=a.filter((function(t){var e=$(t);return""!==t.trim()&&(e in o?!o[e].hasOwnProperty(t)&&(o[e][t]=!0):!(s.indexOf(t)>=0)&&s.push(t))}));for(var c=0;c<u.length;c++)u[c][0].match(/\d/)&&(u[c]=""+u[c]);(r=r||"subGraph"+Q)[0].match(/\d/)&&(r=""+r),i=z(i=i||"",V),Q+=1;var l={id:r,nodes:u,title:i.trim(),classes:[]};return X.push(l),Z[r]=l,r},getDepthFirstPos:function(t){return st[t]},indexNodes:function(){ot=-1,X.length>0&&function t(e,n){var r=X[n].nodes;if(!((ot+=1)>2e3)){if(st[ot]=n,X[n].id===e)return{result:!0,count:0};for(var i=0,a=1;i<r.length;){var o=at(r[i]);if(o>=0){var s=t(e,o);if(s.result)return{result:!0,count:a+s.count};a+=s.count}i+=1}return{result:!1,count:a}}}("none",X.length-1)},getSubGraphs:function(){return X},destructLink:function(t,e){var n,r=function(t){switch(t.trim()){case"--x":return{type:"arrow_cross",stroke:"normal"};case"--\x3e":return{type:"arrow_point",stroke:"normal"};case"<--\x3e":return{type:"double_arrow_point",stroke:"normal"};case"x--x":return{type:"double_arrow_cross",stroke:"normal"};case"o--o":return{type:"double_arrow_circle",stroke:"normal"};case"o.-o":return{type:"double_arrow_circle",stroke:"dotted"};case"<==>":return{type:"double_arrow_point",stroke:"thick"};case"o==o":return{type:"double_arrow_circle",stroke:"thick"};case"x==x":return{type:"double_arrow_cross",stroke:"thick"};case"x.-x":case"x-.-x":return{type:"double_arrow_cross",stroke:"dotted"};case"<.->":case"<-.->":return{type:"double_arrow_point",stroke:"dotted"};case"o-.-o":return{type:"double_arrow_circle",stroke:"dotted"};case"--o":return{type:"arrow_circle",stroke:"normal"};case"---":return{type:"arrow_open",stroke:"normal"};case"-.-x":return{type:"arrow_cross",stroke:"dotted"};case"-.->":return{type:"arrow_point",stroke:"dotted"};case"-.-o":return{type:"arrow_circle",stroke:"dotted"};case"-.-":return{type:"arrow_open",stroke:"dotted"};case".-x":return{type:"arrow_cross",stroke:"dotted"};case".->":return{type:"arrow_point",stroke:"dotted"};case".-o":return{type:"arrow_circle",stroke:"dotted"};case".-":return{type:"arrow_open",stroke:"dotted"};case"==x":return{type:"arrow_cross",stroke:"thick"};case"==>":return{type:"arrow_point",stroke:"thick"};case"==o":return{type:"arrow_circle",stroke:"thick"};case"===":return{type:"arrow_open",stroke:"thick"}}}(t);if(e){if((n=function(t){switch(t.trim()){case"<--":return{type:"arrow_point",stroke:"normal"};case"x--":return{type:"arrow_cross",stroke:"normal"};case"o--":return{type:"arrow_circle",stroke:"normal"};case"<-.":return{type:"arrow_point",stroke:"dotted"};case"x-.":return{type:"arrow_cross",stroke:"dotted"};case"o-.":return{type:"arrow_circle",stroke:"dotted"};case"<==":return{type:"arrow_point",stroke:"thick"};case"x==":return{type:"arrow_cross",stroke:"thick"};case"o==":return{type:"arrow_circle",stroke:"thick"};case"--":return{type:"arrow_open",stroke:"normal"};case"==":return{type:"arrow_open",stroke:"thick"};case"-.":return{type:"arrow_open",stroke:"dotted"}}}(e)).stroke!==r.stroke)return{type:"INVALID",stroke:"INVALID"};if("arrow_open"===n.type)n.type=r.type;else{if(n.type!==r.type)return{type:"INVALID",stroke:"INVALID"};n.type="double_"+n.type}return"double_arrow"===n.type&&(n.type="double_arrow_point"),n}return r},lex:{firstGraph:function(){return!!K&&(K=!1,!0)}}},ct=n(22),lt=n.n(ct),ft=n(5),ht=n.n(ft),dt=n(44),pt=n.n(dt);function yt(t,e,n){var r=.9*(e.width+e.height),i=[{x:r/2,y:0},{x:r,y:-r/2},{x:r/2,y:-r},{x:0,y:-r/2}],a=Tt(t,r,r,i);return n.intersect=function(t){return ht.a.intersect.polygon(n,i,t)},a}function gt(t,e,n){var r=e.height,i=r/4,a=e.width+2*i,o=[{x:i,y:0},{x:a-i,y:0},{x:a,y:-r/2},{x:a-i,y:-r},{x:i,y:-r},{x:0,y:-r/2}],s=Tt(t,a,r,o);return n.intersect=function(t){return ht.a.intersect.polygon(n,o,t)},s}function mt(t,e,n){var r=e.width,i=e.height,a=[{x:-i/2,y:0},{x:r,y:0},{x:r,y:-i},{x:-i/2,y:-i},{x:0,y:-i/2}],o=Tt(t,r,i,a);return n.intersect=function(t){return ht.a.intersect.polygon(n,a,t)},o}function vt(t,e,n){var r=e.width,i=e.height,a=[{x:-2*i/6,y:0},{x:r-i/6,y:0},{x:r+2*i/6,y:-i},{x:i/6,y:-i}],o=Tt(t,r,i,a);return n.intersect=function(t){return ht.a.intersect.polygon(n,a,t)},o}function bt(t,e,n){var r=e.width,i=e.height,a=[{x:2*i/6,y:0},{x:r+i/6,y:0},{x:r-2*i/6,y:-i},{x:-i/6,y:-i}],o=Tt(t,r,i,a);return n.intersect=function(t){return ht.a.intersect.polygon(n,a,t)},o}function xt(t,e,n){var r=e.width,i=e.height,a=[{x:-2*i/6,y:0},{x:r+2*i/6,y:0},{x:r-i/6,y:-i},{x:i/6,y:-i}],o=Tt(t,r,i,a);return n.intersect=function(t){return ht.a.intersect.polygon(n,a,t)},o}function _t(t,e,n){var r=e.width,i=e.height,a=[{x:i/6,y:0},{x:r-i/6,y:0},{x:r+2*i/6,y:-i},{x:-2*i/6,y:-i}],o=Tt(t,r,i,a);return n.intersect=function(t){return ht.a.intersect.polygon(n,a,t)},o}function wt(t,e,n){var r=e.width,i=e.height,a=[{x:0,y:0},{x:r+i/2,y:0},{x:r,y:-i/2},{x:r+i/2,y:-i},{x:0,y:-i}],o=Tt(t,r,i,a);return n.intersect=function(t){return ht.a.intersect.polygon(n,a,t)},o}function kt(t,e,n){var r=e.height,i=e.width+r/4,a=t.insert("rect",":first-child").attr("rx",r/2).attr("ry",r/2).attr("x",-i/2).attr("y",-r/2).attr("width",i).attr("height",r);return n.intersect=function(t){return ht.a.intersect.rect(n,t)},a}function Et(t,e,n){var r=e.width,i=e.height,a=[{x:0,y:0},{x:r,y:0},{x:r,y:-i},{x:0,y:-i},{x:0,y:0},{x:-8,y:0},{x:r+8,y:0},{x:r+8,y:-i},{x:-8,y:-i},{x:-8,y:0}],o=Tt(t,r,i,a);return n.intersect=function(t){return ht.a.intersect.polygon(n,a,t)},o}function At(t,e,n){var r=e.width,i=r/2,a=i/(2.5+r/50),o=e.height+a,s="M 0,"+a+" a "+i+","+a+" 0,0,0 "+r+" 0 a "+i+","+a+" 0,0,0 "+-r+" 0 l 0,"+o+" a "+i+","+a+" 0,0,0 "+r+" 0 l 0,"+-o,u=t.attr("label-offset-y",a).insert("path",":first-child").attr("d",s).attr("transform","translate("+-r/2+","+-(o/2+a)+")");return n.intersect=function(t){var e=ht.a.intersect.rect(n,t),r=e.x-n.x;if(0!=i&&(Math.abs(r)<n.width/2||Math.abs(r)==n.width/2&&Math.abs(e.y-n.y)>n.height/2-a)){var o=a*a*(1-r*r/(i*i));0!=o&&(o=Math.sqrt(o)),o=a-o,t.y-n.y>0&&(o=-o),e.y+=o}return e},u}function Tt(t,e,n,r){return t.insert("polygon",":first-child").attr("points",r.map((function(t){return t.x+","+t.y})).join(" ")).attr("transform","translate("+-e/2+","+n/2+")")}var St={addToRender:function(t){t.shapes().question=yt,t.shapes().hexagon=gt,t.shapes().stadium=kt,t.shapes().subroutine=Et,t.shapes().cylinder=At,t.shapes().rect_left_inv_arrow=mt,t.shapes().lean_right=vt,t.shapes().lean_left=bt,t.shapes().trapezoid=xt,t.shapes().inv_trapezoid=_t,t.shapes().rect_right_inv_arrow=wt},addToRenderV2:function(t){t({question:yt}),t({hexagon:gt}),t({stadium:kt}),t({subroutine:Et}),t({cylinder:At}),t({rect_left_inv_arrow:mt}),t({lean_right:vt}),t({lean_left:bt}),t({trapezoid:xt}),t({inv_trapezoid:_t}),t({rect_right_inv_arrow:wt})}},Mt={},Ot=function(t,e,n){var r=Object(a.select)('[id="'.concat(n,'"]'));Object.keys(t).forEach((function(n){var i=t[n],a="default";i.classes.length>0&&(a=i.classes.join(" "));var o,s=S(i.styles),u=void 0!==i.text?i.text:i.id;if(h().flowchart.htmlLabels){var c={label:u.replace(/fa[lrsb]?:fa-[\w-]+/g,(function(t){return"<i class='".concat(t.replace(":"," "),"'></i>")}))};(o=pt()(r,c).node()).parentNode.removeChild(o)}else{var l=document.createElementNS("http://www.w3.org/2000/svg","text");l.setAttribute("style",s.labelStyle.replace("color:","fill:"));for(var f=u.split(U),d=0;d<f.length;d++){var p=document.createElementNS("http://www.w3.org/2000/svg","tspan");p.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),p.setAttribute("dy","1em"),p.setAttribute("x","1"),p.textContent=f[d],l.appendChild(p)}o=l}var y=0,g="";switch(i.type){case"round":y=5,g="rect";break;case"square":g="rect";break;case"diamond":g="question";break;case"hexagon":g="hexagon";break;case"odd":g="rect_left_inv_arrow";break;case"lean_right":g="lean_right";break;case"lean_left":g="lean_left";break;case"trapezoid":g="trapezoid";break;case"inv_trapezoid":g="inv_trapezoid";break;case"odd_right":g="rect_left_inv_arrow";break;case"circle":g="circle";break;case"ellipse":g="ellipse";break;case"stadium":g="stadium";break;case"subroutine":g="subroutine";break;case"cylinder":g="cylinder";break;case"group":g="rect";break;default:g="rect"}e.setNode(i.id,{labelType:"svg",labelStyle:s.labelStyle,shape:g,label:o,rx:y,ry:y,class:a,style:s.style,id:i.id})}))},Nt=function(t,e){var n,r,i=0;if(void 0!==t.defaultStyle){var o=S(t.defaultStyle);n=o.style,r=o.labelStyle}t.forEach((function(o){i++;var s={};"arrow_open"===o.type?s.arrowhead="none":s.arrowhead="normal";var u="",c="";if(void 0!==o.style){var l=S(o.style);u=l.style,c=l.labelStyle}else switch(o.stroke){case"normal":u="fill:none",void 0!==n&&(u=n),void 0!==r&&(c=r);break;case"dotted":u="fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":u=" stroke-width: 3.5px;fill:none"}s.style=u,s.labelStyle=c,void 0!==o.interpolate?s.curve=A(o.interpolate,a.curveLinear):void 0!==t.defaultInterpolate?s.curve=A(t.defaultInterpolate,a.curveLinear):s.curve=A(Mt.curve,a.curveLinear),void 0===o.text?void 0!==o.style&&(s.arrowheadStyle="fill: #333"):(s.arrowheadStyle="fill: #333",s.labelpos="c",h().flowchart.htmlLabels?(s.labelType="html",s.label='<span class="edgeLabel">'+o.text+"</span>"):(s.labelType="text",s.label=o.text.replace(U,"\n"),void 0===o.style&&(s.style=s.style||"stroke: #333; stroke-width: 1.5px;fill:none"),s.labelStyle=s.labelStyle.replace("color:","fill:"))),e.setEdge(o.start,o.end,s,i)}))},Ct=function(t){for(var e=Object.keys(t),n=0;n<e.length;n++)Mt[e[n]]=t[e[n]]},Dt=function(t){x.info("Extracting classes"),ut.clear();var e=lt.a.parser;return e.yy=ut,e.parse(t),ut.getClasses()},Lt=function(t,e){x.info("Drawing flowchart"),ut.clear();var n=lt.a.parser;n.yy=ut;try{n.parse(t)}catch(t){x.debug("Parsing failed")}var r=ut.getDirection();void 0===r&&(r="TD");for(var i,o=h().flowchart,s=o.nodeSpacing||50,u=o.rankSpacing||50,c=new P.a.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:r,nodesep:s,ranksep:u,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}})),l=ut.getSubGraphs(),f=l.length-1;f>=0;f--)i=l[f],ut.addVertex(i.id,i.title,"group",void 0,i.classes);var d=ut.getVertices(),p=ut.getEdges(),y=0;for(y=l.length-1;y>=0;y--){i=l[y],Object(a.selectAll)("cluster").append("text");for(var g=0;g<i.nodes.length;g++)c.setParent(i.nodes[g],i.id)}Ot(d,c,e),Nt(p,c);var m=new(0,ht.a.render);St.addToRender(m),m.arrows().none=function(t,e,n,r){var i=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 0 0 L 0 0 L 0 0 z");ht.a.util.applyStyle(i,n[r+"Style"])},m.arrows().normal=function(t,e){t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowheadPath").style("stroke-width",1).style("stroke-dasharray","1,0")};var v=Object(a.select)('[id="'.concat(e,'"]')),b=Object(a.select)("#"+e+" g");m(b,c),b.selectAll("g.node").attr("title",(function(){return ut.getTooltip(this.id)}));var _=v.node().getBBox(),w=_.width+16,k=_.height+16;o.useMaxWidth?(v.attr("width","100%"),v.attr("style","max-width: ".concat(w,"px;"))):(v.attr("height",k),v.attr("width",w));var E="".concat(_.x-8," ").concat(_.y-8," ").concat(w," ").concat(k);for(x.debug("viewBox ".concat(E)),v.attr("viewBox",E),ut.indexNodes("subGraph"+y),y=0;y<l.length;y++)if("undefined"!==(i=l[y]).title){var A=document.querySelectorAll("#"+e+' [id="'+i.id+'"] rect'),T=document.querySelectorAll("#"+e+' [id="'+i.id+'"]'),S=A[0].x.baseVal.value,M=A[0].y.baseVal.value,O=A[0].width.baseVal.value,N=Object(a.select)(T[0]).select(".label");N.attr("transform","translate(".concat(S+O/2,", ").concat(M+14,")")),N.attr("id",e+"Text");for(var C=0;C<i.classes.length;C++)T[0].classList.add(i.classes[C])}o.htmlLabels;for(var D=document.querySelectorAll('[id="'+e+'"] .edgeLabel .label'),L=0;L<D.length;L++){var F=D[L],I=F.getBBox(),R=document.createElementNS("http://www.w3.org/2000/svg","rect");R.setAttribute("rx",0),R.setAttribute("ry",0),R.setAttribute("width",I.width),R.setAttribute("height",I.height),R.setAttribute("style","fill:#e8e8e8;"),F.insertBefore(R,F.firstChild)}Object.keys(d).forEach((function(t){var n=d[t];if(n.link){var r=Object(a.select)("#"+e+' [id="'+t+'"]');if(r){var i=document.createElementNS("http://www.w3.org/2000/svg","a");i.setAttributeNS("http://www.w3.org/2000/svg","class",n.classes.join(" ")),i.setAttributeNS("http://www.w3.org/2000/svg","href",n.link),i.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener");var o=r.insert((function(){return i}),":first-child"),s=r.select(".label-container");s&&o.append((function(){return s.node()}));var u=r.select(".label");u&&o.append((function(){return u.node()}))}}}))},Ft=n(21),It=n.n(Ft),Pt={extension:function(t,e,n){x.trace("Making markers for ",n),t.append("defs").append("marker").attr("id",e+"-extensionStart").attr("class","extension "+e).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id",e+"-extensionEnd "+e).attr("class","extension "+e).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},composition:function(t,e){t.append("defs").append("marker").attr("id",e+"-compositionStart").attr("class","extension "+e).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",e+"-compositionEnd").attr("class","extension "+e).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},aggregation:function(t,e){t.append("defs").append("marker").attr("id",e+"-aggregationStart").attr("class","extension "+e).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",e+"-aggregationEnd").attr("class",e).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},dependency:function(t,e){t.append("defs").append("marker").attr("id",e+"-dependencyStart").attr("class","extension "+e).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",e+"-dependencyEnd").attr("class",e).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},point:function(t,e){t.append("marker").attr("id",e+"-pointEnd").attr("class",e).attr("viewBox","0 0 10 10").attr("refX",10).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",e+"-pointStart").attr("class",e).attr("viewBox","0 0 10 10").attr("refX",0).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},circle:function(t,e){t.append("marker").attr("id",e+"-circleEnd").attr("class",e).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",7).attr("markerHeight",7).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",e+"-circleStart").attr("class",e).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",7).attr("markerHeight",7).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},cross:function(t,e){t.append("marker").attr("id",e+"-crossEnd").attr("class",e).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","strokeWidth").attr("markerWidth",7).attr("markerHeight",7).attr("orient","auto").append("path").attr("stroke","black").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),t.append("marker").attr("id",e+"-crossStart").attr("class",e).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","strokeWidth").attr("markerWidth",7).attr("markerHeight",7).attr("orient","auto").append("path").attr("stroke","black").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},barb:function(t,e){t.append("defs").append("marker").attr("id",e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits",0).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")}},Rt=function(t,e,n,r){e.forEach((function(e){Pt[e](t,n,r)}))},Bt=function(t,e,n){var r=document.createElementNS("http://www.w3.org/2000/svg","text");r.setAttribute("style",e.replace("color:","fill:"));var i=[];i="string"==typeof t?t.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(t)?t:[];for(var a=0;a<i.length;a++){var o=document.createElementNS("http://www.w3.org/2000/svg","tspan");o.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),o.setAttribute("dy","1em"),o.setAttribute("x","0"),n?o.setAttribute("class","title-row"):o.setAttribute("class","row"),o.textContent=i[a].trim(),r.appendChild(o)}return r},jt=function(t,e,n){var r;r=n||"node default";var i=t.insert("g").attr("class",r).attr("id",e.id),a=i.insert("g").attr("class","label"),o=a.node().appendChild(Bt(e.labelText,e.labelStyle)).getBBox(),s=e.padding/2;return a.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),{shapeSvg:i,bbox:o,halfPadding:s,label:a}},Yt=function(t,e){var n=e.node().getBBox();t.width=n.width,t.height=n.height};function zt(t,e,n,r){return t.insert("polygon",":first-child").attr("points",r.map((function(t){return t.x+","+t.y})).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+n/2+")")}var Ut={},$t={},Gt={},Vt=function(t,e){return x.debug("In isDecendant",e," ",t," = ",$t[e].indexOf(t)>=0),$t[e].indexOf(t)>=0},Ht=function t(e,n,r,i){x.info("Copying children of ",e,"root",i,"data",n.node(e),i);var a=n.children(e)||[];e!==i&&a.push(e),x.debug("Copying (nodes) clusterId",e,"nodes",a),a.forEach((function(a){if(n.children(a).length>0)t(a,n,r,i);else{var o=n.node(a);x.info("cp ",a," to ",i," with parent ",e),r.setNode(a,o),x.debug("Setting parent",a,n.parent(a)),i!==n.parent(a)&&r.setParent(a,n.parent(a)),e!==i&&a!==e?(x.debug("Setting parent",a,e),r.setParent(a,e)):(x.info("In copy ",e,"root",i,"data",n.node(e),i),x.debug("Not Setting parent for node=",a,"cluster!==rootId",e!==i,"node!==clusterId",a!==e));var s=n.edges(a);x.debug("Copying Edges",s),s.forEach((function(t){x.info("Edge",t);var a=n.edge(t.v,t.w,t.name);x.info("Edge data",a,i);try{!function(t,e){return x.info("Decendants of ",e," is ",$t[e]),x.info("Edge is ",t),t.v!==e&&(t.w!==e&&($t[e]?(x.info("Here "),$t[e].indexOf(t.v)>=0||(!!Vt(t.v,e)||(!!Vt(t.w,e)||$t[e].indexOf(t.w)>=0))):(x.debug("Tilt, ",e,",not in decendants"),!1)))}(t,i)?x.info("Skipping copy of edge ",t.v,"--\x3e",t.w," rootId: ",i," clusterId:",e):(x.info("Copying as ",t.v,t.w,a,t.name),r.setEdge(t.v,t.w,a,t.name),x.info("newGraph edges ",r.edges(),r.edge(r.edges()[0])))}catch(t){x.error(t)}}))}x.debug("Removing node",a),n.removeNode(a)}))},Wt=function t(e,n){x.trace("Searching",e);var r=n.children(e);if(r.length<1)return x.trace("This is a valid node",e),e;for(var i=0;i<r.length;i++){var a=t(r[i],n);if(a)return x.trace("Found replacement for",e," => ",a),a}},qt=function(t){return Ut[t]&&Ut[t].externalConnections&&Ut[t]?Ut[t].id:t},Xt=function(t,e){!t||e>10?x.debug("Opting out, no graph "):(x.debug("Opting in, graph "),t.nodes().forEach((function(e){t.children(e).length>0&&(x.trace("Cluster identified",e," Replacement id in edges: ",Wt(e,t)),$t[e]=function t(e,n){for(var r=n.children(e),i=[].concat(r),a=0;a<r.length;a++)Gt[r[a]]=e,i=i.concat(t(r[a],n));return i}(e,t),Ut[e]={id:Wt(e,t),clusterData:t.node(e)})})),t.nodes().forEach((function(e){var n=t.children(e),r=t.edges();n.length>0&&(x.debug("Cluster identified",e,$t),r.forEach((function(t){t.v!==e&&t.w!==e&&(Vt(t.v,e)^Vt(t.w,e)&&(x.debug("Edge: ",t," leaves cluster ",e),x.debug("Decendants of ",e,": ",$t[e]),Ut[e].externalConnections=!0))})))})),Zt(t,0),t.edges().forEach((function(e){var n=t.edge(e);x.trace("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(e)),x.trace("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(t.edge(e)));var r=e.v,i=e.w;x.trace("Fix",Ut,"ids:",e.v,e.w,"Translateing: ",Ut[e.v],Ut[e.w]),(Ut[e.v]||Ut[e.w])&&(x.trace("Fixing and trixing - removing",e.v,e.w,e.name),r=qt(e.v),i=qt(e.w),t.removeEdge(e.v,e.w,e.name),r!==e.v&&(n.fromCluster=e.v),i!==e.w&&(n.toCluster=e.w),x.trace("Replacing with",r,i,e.name),t.setEdge(r,i,n,e.name))})),x.debug("Adjusted Graph",P.a.json.write(t)),x.trace(Ut))},Zt=function t(e,n){if(x.debug("extractor - ",n,P.a.json.write(e),e.children("D")),n>10)x.error("Bailing out");else{for(var r=e.nodes(),i=!1,a=0;a<r.length;a++){var o=r[a],s=e.children(o);i=i||s.length>0}if(i){x.debug("Nodes = ",r,n);for(var u=0;u<r.length;u++){var c=r[u];if(x.debug("Extracting node",c,Ut,Ut[c]&&!Ut[c].externalConnections,!e.parent(c),e.node(c),e.children("D")," Depth ",n),Ut[c])if(!Ut[c].externalConnections&&!e.parent(c)&&e.children(c)&&e.children(c).length>0){x.debug("Cluster without external connections, without a parent and with children",c,n);var l=e.graph(),f=new P.a.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:"TB"===l.rankdir?"LR":"TB",nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}}));x.debug("Old graph before copy",P.a.json.write(e)),Ht(c,e,f,c),e.setNode(c,{clusterNode:!0,id:c,clusterData:Ut[c].clusterData,labelText:Ut[c].labelText,graph:f}),x.debug("New graph after copy",P.a.json.write(f)),x.debug("Old graph after copy",P.a.json.write(e))}else x.debug("Cluster ** ",c," **not meeting the criteria !externalConnections:",!Ut[c].externalConnections," no parent: ",!e.parent(c)," children ",e.children(c)&&e.children(c).length>0,e.children("D"),n),x.debug(Ut);else x.debug("Not a cluster",c,n)}r=e.nodes(),x.debug("New list of nodes",r);for(var h=0;h<r.length;h++){var d=r[h],p=e.node(d);x.debug(" Now next leveö",d,p),p.clusterNode&&t(p.graph,n+1)}}else x.debug("Done, no node has children",e.nodes())}},Jt=n(153);var Qt=function(t,e,n,r){var i=t.x,a=t.y,o=i-r.x,s=a-r.y,u=Math.sqrt(e*e*s*s+n*n*o*o),c=Math.abs(e*n*o/u);r.x<i&&(c=-c);var l=Math.abs(e*n*s/u);return r.y<a&&(l=-l),{x:i+c,y:a+l}};var Kt=function(t,e,n){return Qt(t,e,e,n)};function te(t,e){return t*e>0}var ee=function(t,e,n,r){var i,a,o,s,u,c,l,f,h,d,p,y,g;if(i=e.y-t.y,o=t.x-e.x,u=e.x*t.y-t.x*e.y,h=i*n.x+o*n.y+u,d=i*r.x+o*r.y+u,!(0!==h&&0!==d&&te(h,d)||(a=r.y-n.y,s=n.x-r.x,c=r.x*n.y-n.x*r.y,l=a*t.x+s*t.y+c,f=a*e.x+s*e.y+c,0!==l&&0!==f&&te(l,f)||0==(p=i*s-a*o))))return y=Math.abs(p/2),{x:(g=o*c-s*u)<0?(g-y)/p:(g+y)/p,y:(g=a*u-i*c)<0?(g-y)/p:(g+y)/p}},ne=function(t,e,n){var r=t.x,i=t.y,a=[],o=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY;e.forEach((function(t){o=Math.min(o,t.x),s=Math.min(s,t.y)}));for(var u=r-t.width/2-o,c=i-t.height/2-s,l=0;l<e.length;l++){var f=e[l],h=e[l<e.length-1?l+1:0],d=ee(t,n,{x:u+f.x,y:c+f.y},{x:u+h.x,y:c+h.y});d&&a.push(d)}if(!a.length)return console.log("NO INTERSECTION FOUND, RETURN NODE CENTER",t),t;a.length>1&&a.sort((function(t,e){var r=t.x-n.x,i=t.y-n.y,a=Math.sqrt(r*r+i*i),o=e.x-n.x,s=e.y-n.y,u=Math.sqrt(o*o+s*s);return a<u?-1:a===u?0:1}));return a[0]};var re=function(t,e){var n,r,i=t.x,a=t.y,o=e.x-i,s=e.y-a,u=t.width/2,c=t.height/2;return Math.abs(s)*u>Math.abs(o)*c?(s<0&&(c=-c),n=0===s?0:c*o/s,r=c):(o<0&&(u=-u),n=u,r=0===o?0:u*s/o),{x:i+n,y:a+r}},ie={node:n.n(Jt).a,circle:Kt,ellipse:Qt,polygon:ne,rect:re},ae=function(t,e,n){var r=t.insert("g").attr("class","node default").attr("id",e.id),i=70,a=10;"LR"===n&&(i=10,a=70);var o=r.append("rect").style("stroke","black").style("fill","black").attr("x",-1*i/2).attr("y",-1*a/2).attr("width",i).attr("height",a).attr("class","fork-join");return Yt(e,o),e.height=e.height+e.padding/2,e.width=e.width+e.padding/2,e.intersect=function(t){return ie.rect(e,t)},r},oe={question:function(t,e){var n=jt(t,e),r=n.shapeSvg,i=n.bbox,a=i.width+e.padding+(i.height+e.padding),o=[{x:a/2,y:0},{x:a,y:-a/2},{x:a/2,y:-a},{x:0,y:-a/2}],s=zt(r,a,a,o);return Yt(e,s),e.intersect=function(t){return x.warn("Intersect called"),ie.polygon(e,o,t)},r},rect:function(t,e){var n=jt(t,e,"node "+e.classes),r=n.shapeSvg,i=n.bbox,a=n.halfPadding;x.trace("Classes = ",e.classes);var o=r.insert("rect",":first-child");return o.attr("class","basic label-container").attr("rx",e.rx).attr("ry",e.ry).attr("x",-i.width/2-a).attr("y",-i.height/2-a).attr("width",i.width+e.padding).attr("height",i.height+e.padding),Yt(e,o),e.intersect=function(t){return ie.rect(e,t)},r},rectWithTitle:function(t,e){var n;n=e.classes?"node "+e.classes:"node default";var r=t.insert("g").attr("class",n).attr("id",e.id),i=r.insert("rect",":first-child"),o=r.insert("line"),s=r.insert("g").attr("class","label"),u=e.labelText.flat();x.info("Label text",u[0]);var c=s.node().appendChild(Bt(u[0],e.labelStyle,!0)),l=u.slice(1,u.length),f=c.getBBox(),h=s.node().appendChild(Bt(l.join("<br/>"),e.labelStyle,!0));x.info(h);var d=e.padding/2;Object(a.select)(h).attr("transform","translate( 0, "+(f.height+d)+")");var p=s.node().getBBox();return s.attr("transform","translate("+-p.width/2+", "+(-p.height/2-d+3)+")"),i.attr("class","outer title-state").attr("x",-p.width/2-d).attr("y",-p.height/2-d).attr("width",p.width+e.padding).attr("height",p.height+e.padding),o.attr("class","divider").attr("x1",-p.width/2-d).attr("x2",p.width/2+d).attr("y1",-p.height/2-d+f.height+d).attr("y2",-p.height/2-d+f.height+d),Yt(e,i),e.intersect=function(t){return ie.rect(e,t)},r},circle:function(t,e){var n=jt(t,e),r=n.shapeSvg,i=n.bbox,a=n.halfPadding,o=r.insert("circle",":first-child");return o.attr("rx",e.rx).attr("ry",e.ry).attr("r",i.width/2+a).attr("width",i.width+e.padding).attr("height",i.height+e.padding),Yt(e,o),e.intersect=function(t){return ie.circle(e,e.rx,t)},r},stadium:function(t,e){var n=jt(t,e),r=n.shapeSvg,i=n.bbox,a=i.height+e.padding,o=i.width+a/4+e.padding,s=r.insert("rect",":first-child").attr("rx",a/2).attr("ry",a/2).attr("x",-o/2).attr("y",-a/2).attr("width",o).attr("height",a);return Yt(e,s),e.intersect=function(t){return ie.rect(e,t)},r},hexagon:function(t,e){var n=jt(t,e),r=n.shapeSvg,i=n.bbox,a=i.height+e.padding,o=a/4,s=i.width+2*o+e.padding,u=zt(r,s,a,[{x:o,y:0},{x:s-o,y:0},{x:s,y:-a/2},{x:s-o,y:-a},{x:o,y:-a},{x:0,y:-a/2}]);return Yt(e,u),e.intersect=function(t){return ie.polygon(e,t)},r},rect_left_inv_arrow:function(t,e){var n=jt(t,e),r=n.shapeSvg,i=n.bbox,a=i.width+e.padding,o=i.height+e.padding,s=zt(r,a,o,[{x:-o/2,y:0},{x:a,y:0},{x:a,y:-o},{x:-o/2,y:-o},{x:0,y:-o/2}]);return Yt(e,s),e.intersect=function(t){return ie.polygon(e,t)},r},lean_right:function(t,e){var n=jt(t,e),r=n.shapeSvg,i=n.bbox,a=i.width+e.padding,o=i.height+e.padding,s=zt(r,a,o,[{x:-2*o/6,y:0},{x:a-o/6,y:0},{x:a+2*o/6,y:-o},{x:o/6,y:-o}]);return Yt(e,s),e.intersect=function(t){return ie.polygon(e,t)},r},lean_left:function(t,e){var n=jt(t,e),r=n.shapeSvg,i=n.bbox,a=i.width+e.padding,o=i.height+e.padding,s=zt(r,a,o,[{x:2*o/6,y:0},{x:a+o/6,y:0},{x:a-2*o/6,y:-o},{x:-o/6,y:-o}]);return Yt(e,s),e.intersect=function(t){return ie.polygon(e,t)},r},trapezoid:function(t,e){var n=jt(t,e),r=n.shapeSvg,i=n.bbox,a=i.width+e.padding,o=i.height+e.padding,s=zt(r,a,o,[{x:-2*o/6,y:0},{x:a+2*o/6,y:0},{x:a-o/6,y:-o},{x:o/6,y:-o}]);return Yt(e,s),e.intersect=function(t){return ie.polygon(e,t)},r},inv_trapezoid:function(t,e){var n=jt(t,e),r=n.shapeSvg,i=n.bbox,a=i.width+e.padding,o=i.height+e.padding,s=zt(r,a,o,[{x:o/6,y:0},{x:a-o/6,y:0},{x:a+2*o/6,y:-o},{x:-2*o/6,y:-o}]);return Yt(e,s),e.intersect=function(t){return ie.polygon(e,t)},r},rect_right_inv_arrow:function(t,e){var n=jt(t,e),r=n.shapeSvg,i=n.bbox,a=i.width+e.padding,o=i.height+e.padding,s=zt(r,a,o,[{x:0,y:0},{x:a+o/2,y:0},{x:a,y:-o/2},{x:a+o/2,y:-o},{x:0,y:-o}]);return Yt(e,s),e.intersect=function(t){return ie.polygon(e,t)},r},cylinder:function(t,e){var n=jt(t,e),r=n.shapeSvg,i=n.bbox,a=i.width+e.padding,o=a/2,s=o/(2.5+a/50),u=i.height+s+e.padding,c="M 0,"+s+" a "+o+","+s+" 0,0,0 "+a+" 0 a "+o+","+s+" 0,0,0 "+-a+" 0 l 0,"+u+" a "+o+","+s+" 0,0,0 "+a+" 0 l 0,"+-u,l=r.attr("label-offset-y",s).insert("path",":first-child").attr("d",c).attr("transform","translate("+-a/2+","+-(u/2+s)+")");return Yt(e,l),e.intersect=function(t){var n=ie.rect(e,t),r=n.x-e.x;if(0!=o&&(Math.abs(r)<e.width/2||Math.abs(r)==e.width/2&&Math.abs(n.y-e.y)>e.height/2-s)){var i=s*s*(1-r*r/(o*o));0!=i&&(i=Math.sqrt(i)),i=s-i,t.y-e.y>0&&(i=-i),n.y+=i}return n},r},start:function(t,e){var n=t.insert("g").attr("class","node default").attr("id",e.id),r=n.insert("circle",":first-child");return r.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),Yt(e,r),e.intersect=function(t){return ie.circle(e,7,t)},n},end:function(t,e){var n=t.insert("g").attr("class","node default").attr("id",e.id),r=n.insert("circle",":first-child"),i=n.insert("circle",":first-child");return i.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),r.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),Yt(e,i),e.intersect=function(t){return ie.circle(e,7,t)},n},note:function(t,e){var n=jt(t,e,"node "+e.classes),r=n.shapeSvg,i=n.bbox,a=n.halfPadding;x.info("Classes = ",e.classes);var o=r.insert("rect",":first-child");return o.attr("rx",e.rx).attr("ry",e.ry).attr("x",-i.width/2-a).attr("y",-i.height/2-a).attr("width",i.width+e.padding).attr("height",i.height+e.padding),Yt(e,o),e.intersect=function(t){return ie.rect(e,t)},r},subroutine:function(t,e){var n=jt(t,e),r=n.shapeSvg,i=n.bbox,a=i.width+e.padding,o=i.height+e.padding,s=zt(r,a,o,[{x:0,y:0},{x:a,y:0},{x:a,y:-o},{x:0,y:-o},{x:0,y:0},{x:-8,y:0},{x:a+8,y:0},{x:a+8,y:-o},{x:-8,y:-o},{x:-8,y:0}]);return Yt(e,s),e.intersect=function(t){return ie.polygon(e,t)},r},fork:ae,join:ae},se={},ue=function(t){var e=se[t.id];x.trace("Transforming node",t,"translate("+(t.x-t.width/2-5)+", "+(t.y-t.height/2-5)+")");t.clusterNode?e.attr("transform","translate("+(t.x-t.width/2-8)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")")},ce={rect:function(t,e){x.trace("Creating subgraph rect for ",e.id,e);var n=t.insert("g").attr("class","cluster").attr("id",e.id),r=n.insert("rect",":first-child"),i=n.insert("g").attr("class","cluster-label"),a=i.node().appendChild(Bt(e.labelText,e.labelStyle)).getBBox(),o=0*e.padding,s=o/2;x.trace("Data ",e,JSON.stringify(e)),r.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-s).attr("y",e.y-e.height/2-s).attr("width",e.width+o).attr("height",e.height+o),i.attr("transform","translate("+(e.x-a.width/2)+", "+(e.y-e.height/2-e.padding/3+3)+")");var u=r.node().getBBox();return e.width=u.width,e.height=u.height,e.intersect=function(t){return re(e,t)},n},roundedWithTitle:function(t,e){var n=t.insert("g").attr("class",e.classes).attr("id",e.id),r=n.insert("rect",":first-child"),i=n.insert("g").attr("class","cluster-label"),a=n.append("rect"),o=i.node().appendChild(Bt(e.labelText,e.labelStyle)).getBBox(),s=0*e.padding,u=s/2;r.attr("class","outer").attr("x",e.x-e.width/2-u).attr("y",e.y-e.height/2-u).attr("width",e.width+s).attr("height",e.height+s),a.attr("class","inner").attr("x",e.x-e.width/2-u).attr("y",e.y-e.height/2-u+o.height-1).attr("width",e.width+s).attr("height",e.height+s-o.height-3),i.attr("transform","translate("+(e.x-o.width/2)+", "+(e.y-e.height/2-e.padding/3+3)+")");var c=r.node().getBBox();return e.width=c.width,e.height=c.height,e.intersect=function(t){return re(e,t)},n},noteGroup:function(t,e){var n=t.insert("g").attr("class","note-cluster").attr("id",e.id),r=n.insert("rect",":first-child"),i=0*e.padding,a=i/2;r.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-a).attr("y",e.y-e.height/2-a).attr("width",e.width+i).attr("height",e.height+i).attr("fill","none");var o=r.node().getBBox();return e.width=o.width,e.height=o.height,e.intersect=function(t){return re(e,t)},n},divider:function(t,e){var n=t.insert("g").attr("class",e.classes).attr("id",e.id),r=n.insert("rect",":first-child"),i=0*e.padding,a=i/2;r.attr("class","divider").attr("x",e.x-e.width/2-a).attr("y",e.y-e.height/2).attr("width",e.width+i).attr("height",e.height+i);var o=r.node().getBBox();return e.width=o.width,e.height=o.height,e.intersect=function(t){return re(e,t)},n}},le={},fe={},he=function(t,e){var n=t.x,r=t.y,i=Math.abs(e.x-n),a=Math.abs(e.y-r),o=t.width/2,s=t.height/2;return i>o||a>s},de=function(t,e,n){x.trace("intersection o:",e," i:",n,t);var r=t.x,i=t.y,a=Math.abs(r-n.x),o=t.width/2,s=n.x<e.x?o-a:o+a,u=Math.abs(i-n.y),c=t.height/2,l=(n.y,e.y,c-u),f=Math.abs(e.y-n.y),h=Math.abs(e.x-n.x);return Math.abs(i-e.y)*o>Math.abs(r-e.x)*c?(s=h*l/f,{x:n.x<e.x?n.x+s:n.x-s,y:n.y+l}):(s=h*(l=f*s/h)/f,{x:n.x<e.x?n.x+s:n.x+a-o,y:n.y<e.y?n.y+l:n.y-l})},pe=function t(e,n,r,i){x.info("Graph in recursive render:",P.a.json.write(n),i);var o=n.graph().rankdir;x.warn("Dir in recursive render - dir:",o);var s=e.insert("g").attr("class","root");n.nodes()?x.trace("Recursive render",n.nodes()):x.trace("No nodes found for",n),n.edges().length>0&&x.trace("Recursive edges",n.edge(n.edges()[0]));var u=s.insert("g").attr("class","clusters"),c=s.insert("g").attr("class","edgePaths"),l=s.insert("g").attr("class","edgeLabels"),f=s.insert("g").attr("class","nodes");return n.nodes().forEach((function(e){var a=n.node(e);if(void 0!==i){var s=JSON.parse(JSON.stringify(i.clusterData));x.trace("Setting data for cluster",s),n.setNode(i.id,s),n.setParent(e,i.id,s)}if(x.trace("(Insert) Node "+e+": "+JSON.stringify(n.node(e))),a&&a.clusterNode){x.trace("Cluster identified",e,a,n.node(e));var u=t(f,a.graph,r,n.node(e));Yt(a,u),function(t,e){se[e.id]=t}(u,a),x.warn("Recursive render complete",u,a)}else n.children(e).length>0?(x.trace("Cluster - the non recursive path",e,a.id,a,n),x.trace(Wt(a.id,n)),Ut[a.id]={id:Wt(a.id,n),node:a}):(x.trace("Node - the non recursive path",e,a.id,a),function(t,e,n){se[e.id]=oe[e.shape](t,e,n)}(f,n.node(e),o))})),n.edges().forEach((function(t){var e=n.edge(t.v,t.w,t.name);x.trace("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(t)),x.trace("Edge "+t.v+" -> "+t.w+": ",t," ",JSON.stringify(n.edge(t))),x.trace("Fix",Ut,"ids:",t.v,t.w,"Translateing: ",Ut[t.v],Ut[t.w]),function(t,e){var n=Bt(e.label,e.labelStyle),r=t.insert("g").attr("class","edgeLabel"),i=r.insert("g").attr("class","label");i.node().appendChild(n);var a=n.getBBox();i.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"),fe[e.id]=r,e.width=a.width,e.height=a.height}(l,e)})),n.edges().forEach((function(t){x.info("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(t))})),x.info("#############################################"),x.info("### Layout ###"),x.info("#############################################"),x.info(n),It.a.layout(n),x.trace("Graph after layout:",P.a.json.write(n)),n.nodes().forEach((function(t){var e=n.node(t);x.trace("Position "+t+": ("+e.x,","+e.y,") width: ",e.width," height: ",e.height),e&&e.clusterNode?ue(e):n.children(t).length>0?(!function(t,e){x.trace("Inserting cluster");var n=e.shape||"rect";le[e.id]=ce[n](t,e)}(u,e),Ut[e.id].node=e):ue(e)})),n.edges().forEach((function(t){var e=n.edge(t);x.info("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(e),e),function(t,e,n,r,i,o){var s=n.points,u=o.node(e.v),c=o.node(e.w);if(c.intersect&&u.intersect&&((s=s.slice(1,n.points.length-1)).unshift(u.intersect(s[0])),s.push(c.intersect(s[s.length-1]))),n.toCluster){var l;x.trace("edge",n),x.trace("to cluster",r[n.toCluster]),s=[];var f=!1;n.points.forEach((function(t){var e=r[n.toCluster].node;if(he(e,t)||f)f||s.push(t);else{x.trace("inside",n.toCluster,t,l);var i=de(e,l,t);x.trace("intersect",i),s.push(i),f=!0}l=t}))}if(n.fromCluster){x.trace("edge",n),x.trace("from cluster",r[n.toCluster]);for(var d,p=[],y=!1,g=s.length-1;g>=0;g--){var m=s[g],v=r[n.fromCluster].node;if(he(v,m)||y)x.trace("Outside point",m),y||p.unshift(m);else{x.trace("inside",n.toCluster,m);var b=de(v,d,m);p.unshift(b),y=!0}d=m}s=p}var _=s.filter((function(t){return!Number.isNaN(t.y)})),w=Object(a.line)().x((function(t){return t.x})).y((function(t){return t.y})).curve(a.curveBasis),k=t.append("path").attr("d",w(_)).attr("id",n.id).attr("class","transition"+(n.classes?" "+n.classes:"")),E="";switch(h().state.arrowMarkerAbsolute&&(E=(E=(E=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),x.info("arrowType",n.arrowType),n.arrowType){case"arrow_cross":k.attr("marker-end","url("+E+"#"+i+"-crossEnd)");break;case"double_arrow_cross":k.attr("marker-end","url("+E+"#"+i+"-crossEnd)"),k.attr("marker-start","url("+E+"#"+i+"-crossStart)");break;case"arrow_point":k.attr("marker-end","url("+E+"#"+i+"-pointEnd)");break;case"double_arrow_point":k.attr("marker-end","url("+E+"#"+i+"-pointEnd)"),k.attr("marker-start","url("+E+"#"+i+"-pointStart)");break;case"arrow_barb":k.attr("marker-end","url("+E+"#"+i+"-barbEnd)");break;case"double_arrow_barb":k.attr("marker-end","url("+E+"#"+i+"-barnEnd)"),k.attr("marker-start","url("+E+"#"+i+"-barbStart)");break;case"arrow_circle":k.attr("marker-end","url("+E+"#"+i+"-circleEnd)");break;case"double_arrow_circle":k.attr("marker-end","url("+E+"#"+i+"-circleEnd)"),k.attr("marker-start","url("+E+"#"+i+"-circleStart)")}}(c,t,e,Ut,r,n),function(t){(x.info("Moving label",t.id,t.label,fe[t.id]),t.label)&&fe[t.id].attr("transform","translate("+t.x+", "+t.y+")")}(e)})),s},ye=function(t,e,n,r,i){Rt(t,n,r,i),se={},fe={},le={},$t={},Gt={},Ut={},x.warn("Graph before:",P.a.json.write(e)),Xt(e),x.warn("Graph after:",P.a.json.write(e)),x.warn("Graph ever after:",e.graph()),pe(t,e,r)},ge={},me=function(t,e,n){var r=Object(a.select)('[id="'.concat(n,'"]'));Object.keys(t).forEach((function(n){var i=t[n],a="default";i.classes.length>0&&(a=i.classes.join(" "));var o,s=S(i.styles),u=void 0!==i.text?i.text:i.id;if(h().flowchart.htmlLabels){var c={label:u.replace(/fa[lrsb]?:fa-[\w-]+/g,(function(t){return"<i class='".concat(t.replace(":"," "),"'></i>")}))};(o=pt()(r,c).node()).parentNode.removeChild(o)}else{var l=document.createElementNS("http://www.w3.org/2000/svg","text");l.setAttribute("style",s.labelStyle.replace("color:","fill:"));for(var f=u.split(U),d=0;d<f.length;d++){var p=document.createElementNS("http://www.w3.org/2000/svg","tspan");p.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),p.setAttribute("dy","1em"),p.setAttribute("x","1"),p.textContent=f[d],l.appendChild(p)}o=l}var y=0,g="";switch(i.type){case"round":y=5,g="rect";break;case"square":g="rect";break;case"diamond":g="question";break;case"hexagon":g="hexagon";break;case"odd":g="rect_left_inv_arrow";break;case"lean_right":g="lean_right";break;case"lean_left":g="lean_left";break;case"trapezoid":g="trapezoid";break;case"inv_trapezoid":g="inv_trapezoid";break;case"odd_right":g="rect_left_inv_arrow";break;case"circle":g="circle";break;case"ellipse":g="ellipse";break;case"stadium":g="stadium";break;case"subroutine":g="subroutine";break;case"cylinder":g="cylinder";break;case"group":g="rect";break;default:g="rect"}e.setNode(i.id,{labelStyle:s.labelStyle,shape:g,labelText:u,rx:y,ry:y,class:a,style:s.style,id:i.id,width:"group"===i.type?500:void 0,type:i.type,padding:h().flowchart.padding}),x.info("setNode",{labelStyle:s.labelStyle,shape:g,labelText:u,rx:y,ry:y,class:a,style:s.style,id:i.id,width:"group"===i.type?500:void 0,type:i.type,padding:h().flowchart.padding})}))},ve=function(t,e){var n,r,i=0;if(void 0!==t.defaultStyle){var o=S(t.defaultStyle);n=o.style,r=o.labelStyle}t.forEach((function(o){i++;var s={};s.id="id"+i,"arrow_open"===o.type?s.arrowhead="none":s.arrowhead="normal",x.info(s,o),s.arrowType=o.type;var u="",c="";if(void 0!==o.style){var l=S(o.style);u=l.style,c=l.labelStyle}else switch(o.stroke){case"normal":u="fill:none",void 0!==n&&(u=n),void 0!==r&&(c=r);break;case"dotted":u="fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":u=" stroke-width: 3.5px;fill:none"}s.style=u,s.labelStyle=c,void 0!==o.interpolate?s.curve=A(o.interpolate,a.curveLinear):void 0!==t.defaultInterpolate?s.curve=A(t.defaultInterpolate,a.curveLinear):s.curve=A(ge.curve,a.curveLinear),void 0===o.text?void 0!==o.style&&(s.arrowheadStyle="fill: #333"):(s.arrowheadStyle="fill: #333",s.labelpos="c",h().flowchart.htmlLabels,s.labelType="text",s.label=o.text.replace(U,"\n"),void 0===o.style&&(s.style=s.style||"stroke: #333; stroke-width: 1.5px;fill:none"),s.labelStyle=s.labelStyle.replace("color:","fill:")),e.setEdge(o.start,o.end,s,i)}))},be=function(t){for(var e=Object.keys(t),n=0;n<e.length;n++)ge[e[n]]=t[e[n]]},xe=function(t,e){x.info("Drawing flowchart"),ut.clear();var n=lt.a.parser;n.yy=ut;try{n.parse(t)}catch(t){x.debug("Parsing failed")}var r=ut.getDirection();void 0===r&&(r="TD");var i,o=h().flowchart,s=o.nodeSpacing||50,u=o.rankSpacing||50,c=new P.a.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:r,nodesep:s,ranksep:u,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}})),l=ut.getSubGraphs();x.info("Subgraphs - ",l);for(var f=l.length-1;f>=0;f--)i=l[f],x.info("Subgraph - ",i),ut.addVertex(i.id,i.title,"group",void 0,i.classes);var d=ut.getVertices(),p=ut.getEdges();x.info(p);var y=0;for(y=l.length-1;y>=0;y--){i=l[y],Object(a.selectAll)("cluster").append("text");for(var g=0;g<i.nodes.length;g++)c.setParent(i.nodes[g],i.id)}me(d,c,e),ve(p,c);var m=Object(a.select)('[id="'.concat(e,'"]')),v=Object(a.select)("#"+e+" g");ye(v,c,["point","circle","cross"],"flowchart",e),v.selectAll("g.node").attr("title",(function(){return ut.getTooltip(this.id)}));var b=m.node().getBBox(),_=b.width+16,w=b.height+16;if(x.debug("new ViewBox 0 0 ".concat(_," ").concat(w),"translate(".concat(8-c._label.marginx,", ").concat(8-c._label.marginy,")")),o.useMaxWidth?(m.attr("width","100%"),m.attr("style","max-width: ".concat(_,"px;"))):(m.attr("height",w),m.attr("width",_)),m.attr("viewBox","0 0 ".concat(_," ").concat(w)),m.select("g").attr("transform","translate(".concat(8-c._label.marginx,", ").concat(8-b.y,")")),ut.indexNodes("subGraph"+y),!o.htmlLabels)for(var k=document.querySelectorAll('[id="'+e+'"] .edgeLabel .label'),E=0;E<k.length;E++){var A=k[E],T=A.getBBox(),S=document.createElementNS("http://www.w3.org/2000/svg","rect");S.setAttribute("rx",0),S.setAttribute("ry",0),S.setAttribute("width",T.width),S.setAttribute("height",T.height),S.setAttribute("style","fill:#e8e8e8;"),A.insertBefore(S,A.firstChild)}Object.keys(d).forEach((function(t){var n=d[t];if(n.link){var r=Object(a.select)("#"+e+' [id="'+t+'"]');if(r){var i=document.createElementNS("http://www.w3.org/2000/svg","a");i.setAttributeNS("http://www.w3.org/2000/svg","class",n.classes.join(" ")),i.setAttributeNS("http://www.w3.org/2000/svg","href",n.link),i.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener");var o=r.insert((function(){return i}),":first-child"),s=r.select(".label-container");s&&o.append((function(){return s.node()}));var u=r.select(".label");u&&o.append((function(){return u.node()}))}}}))},_e=function(t,e){var n=t.append("rect");return n.attr("x",e.x),n.attr("y",e.y),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("width",e.width),n.attr("height",e.height),n.attr("rx",e.rx),n.attr("ry",e.ry),void 0!==e.class&&n.attr("class",e.class),n},we=function(t,e){var n=e.text.replace(U," "),r=t.append("text");r.attr("x",e.x),r.attr("y",e.y),r.style("text-anchor",e.anchor),r.attr("fill",e.fill),void 0!==e.class&&r.attr("class",e.class);var i=r.append("tspan");return i.attr("x",e.x+2*e.textMargin),i.attr("fill",e.fill),i.text(n),r},ke=function(t,e){var n,r,i,a,o,s=t.append("polygon");s.attr("points",(n=e.x,r=e.y,n+","+r+" "+(n+(i=50))+","+r+" "+(n+i)+","+(r+(a=20)-(o=7))+" "+(n+i-1.2*o)+","+(r+a)+" "+n+","+(r+a))),s.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,we(t,e)},Ee=-1,Ae=function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0}},Te=function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},Se=function(){function t(t,e,n,i,a,o,s){r(e.append("text").attr("x",n+a/2).attr("y",i+o/2+5).style("text-anchor","middle").text(t),s)}function e(t,e,n,i,a,o,s,u){for(var c=u.actorFontSize,l=u.actorFontFamily,f=t.split(U),h=0;h<f.length;h++){var d=h*c-c*(f.length-1)/2,p=e.append("text").attr("x",n+a/2).attr("y",i).style("text-anchor","middle").style("font-size",c).style("font-family",l);p.append("tspan").attr("x",n+a/2).attr("dy",d).text(f[h]),p.attr("y",i+o/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),r(p,s)}}function n(t,n,i,a,o,s,u,c){var l=n.append("switch"),f=l.append("foreignObject").attr("x",i).attr("y",a).attr("width",o).attr("height",s).append("div").style("display","table").style("height","100%").style("width","100%");f.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,l,i,a,o,s,u,c),r(f,u)}function r(t,e){for(var n in e)e.hasOwnProperty(n)&&t.attr(n,e[n])}return function(r){return"fo"===r.textPlacement?n:"old"===r.textPlacement?t:e}}(),Me={drawRect:_e,drawText:we,drawLabel:ke,drawActor:function(t,e,n){var r=e.x+e.width/2,i=t.append("g");0===e.y&&(Ee++,i.append("line").attr("id","actor"+Ee).attr("x1",r).attr("y1",5).attr("x2",r).attr("y2",2e3).attr("class","actor-line").attr("stroke-width","0.5px").attr("stroke","#999"));var a=Te();a.x=e.x,a.y=e.y,a.fill="#eaeaea",a.width=e.width,a.height=e.height,a.class="actor",a.rx=3,a.ry=3,_e(i,a),Se(n)(e.description,i,a.x,a.y,a.width,a.height,{class:"actor"},n)},anchorElement:function(t){return t.append("g")},drawActivation:function(t,e,n,r,i){var a=Te(),o=e.anchored;a.x=e.startx,a.y=e.starty,a.class="activation"+i%3,a.width=e.stopx-e.startx,a.height=n-e.starty,_e(o,a)},drawLoop:function(t,e,n,r){var i=t.append("g"),a=function(t,e,n,r){return i.append("line").attr("x1",t).attr("y1",e).attr("x2",n).attr("y2",r).attr("class","loopLine")};a(e.startx,e.starty,e.stopx,e.starty),a(e.stopx,e.starty,e.stopx,e.stopy),a(e.startx,e.stopy,e.stopx,e.stopy),a(e.startx,e.starty,e.startx,e.stopy),void 0!==e.sections&&e.sections.forEach((function(t){a(e.startx,t,e.stopx,t).style("stroke-dasharray","3, 3")}));var o=Ae();o.text=n,o.x=e.startx,o.y=e.starty,o.labelMargin=15,o.class="labelText",ke(i,o),(o=Ae()).text="[ "+e.title+" ]",o.x=e.startx+(e.stopx-e.startx)/2,o.y=e.starty+1.5*r.boxMargin,o.anchor="middle",o.class="loopText",we(i,o),void 0!==e.sectionTitles&&e.sectionTitles.forEach((function(t,n){""!==t&&(o.text="[ "+t+" ]",o.y=e.sections[n]+1.5*r.boxMargin,we(i,o))}))},drawBackgroundRect:function(t,e){_e(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,class:"rect"}).lower()},insertArrowHead:function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},insertSequenceNumber:function(t){t.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},insertArrowCrossHead:function(t){var e=t.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);e.append("path").attr("fill","black").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 9,2 V 6 L16,4 Z"),e.append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 0,1 L 6,7 M 6,1 L 0,7")},getTextObj:Ae,getNoteRect:Te},Oe=n(1),Ne=n.n(Oe),Ce=void 0,De={},Le=[],Fe=[],Ie="",Pe=!1,Re=function(t,e,n){var r=De[t];r&&e===r.name&&null==n||(null==n&&(n=e),De[t]={name:e,description:n,prevActor:Ce},Ce&&De[Ce]&&(De[Ce].nextActor=t),Ce=t)},Be=function(t,e,n,r){if(x.debug("Adding message from="+t+" to="+e+" message="+n+" type="+r),r===je.ACTIVE_END){var i=function(t){var e=0,n=0;for(e=0;e<Le.length;e++)Le[e].type===je.ACTIVE_START&&Le[e].from.actor===t&&n++,Le[e].type===je.ACTIVE_END&&Le[e].from.actor===t&&n--;return n}(t.actor);if(x.debug("Adding message from=",Le,i),i<1){var a=new Error("Trying to inactivate an inactive participant ("+t.actor+")");throw a.hash={text:"->>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},a}}return Le.push({from:t,to:e,message:n,type:r}),!0},je={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23},Ye=function(t,e,n){var r={actor:t,placement:e,message:n},i=[].concat(t,t);Fe.push(r),Le.push({from:i[0],to:i[1],message:n,type:je.NOTE,placement:e})},ze=function(t){Ie=t},Ue={addActor:Re,addMessage:function(t,e,n,r){Le.push({from:t,to:e,message:n,answer:r})},addSignal:Be,enableSequenceNumbers:function(){Pe=!0},showSequenceNumbers:function(){return Pe},getMessages:function(){return Le},getActors:function(){return De},getActor:function(t){return De[t]},getActorKeys:function(){return Object.keys(De)},getTitle:function(){return Ie},clear:function(){De={},Le=[]},LINETYPE:je,ARROWTYPE:{FILLED:0,OPEN:1},PLACEMENT:{LEFTOF:0,RIGHTOF:1,OVER:2},addNote:Ye,setTitle:ze,apply:function t(e){if(e instanceof Array)e.forEach((function(e){t(e)}));else switch(e.type){case"addActor":Re(e.actor,e.actor,e.description);break;case"activeStart":case"activeEnd":Be(e.actor,void 0,void 0,e.signalType);break;case"addNote":Ye(e.actor,e.placement,e.text);break;case"addMessage":Be(e.from,e.to,e.msg,e.signalType);break;case"loopStart":Be(void 0,void 0,e.loopText,e.signalType);break;case"loopEnd":Be(void 0,void 0,void 0,e.signalType);break;case"rectStart":Be(void 0,void 0,e.color,e.signalType);break;case"rectEnd":Be(void 0,void 0,void 0,e.signalType);break;case"optStart":Be(void 0,void 0,e.optText,e.signalType);break;case"optEnd":Be(void 0,void 0,void 0,e.signalType);break;case"altStart":case"else":Be(void 0,void 0,e.altText,e.signalType);break;case"altEnd":Be(void 0,void 0,void 0,e.signalType);break;case"setTitle":ze(e.text);break;case"parStart":case"and":Be(void 0,void 0,e.parText,e.signalType);break;case"parEnd":Be(void 0,void 0,void 0,e.signalType)}}};function $e(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}Oe.parser.yy=Ue;var Ge={diagramMarginX:50,diagramMarginY:30,actorMargin:50,width:150,height:65,actorFontSize:14,actorFontFamily:'"Open-Sans", "sans-serif"',noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial',noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial',boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!1,bottomMarginAdj:1,activationWidth:10,textPlacement:"tspan",showSequenceNumbers:!1},Ve={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],activations:[],init:function(){this.sequenceItems=[],this.activations=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},updateVal:function(t,e,n,r){void 0===t[e]?t[e]=n:t[e]=r(n,t[e])},updateBounds:function(t,e,n,r){var i=this,a=0;function o(o){return function(s){a++;var u=i.sequenceItems.length-a+1;i.updateVal(s,"starty",e-u*Ge.boxMargin,Math.min),i.updateVal(s,"stopy",r+u*Ge.boxMargin,Math.max),i.updateVal(Ve.data,"startx",t-u*Ge.boxMargin,Math.min),i.updateVal(Ve.data,"stopx",n+u*Ge.boxMargin,Math.max),"activation"!==o&&(i.updateVal(s,"startx",t-u*Ge.boxMargin,Math.min),i.updateVal(s,"stopx",n+u*Ge.boxMargin,Math.max),i.updateVal(Ve.data,"starty",e-u*Ge.boxMargin,Math.min),i.updateVal(Ve.data,"stopy",r+u*Ge.boxMargin,Math.max))}}this.sequenceItems.forEach(o()),this.activations.forEach(o("activation"))},insert:function(t,e,n,r){var i=Math.min(t,n),a=Math.max(t,n),o=Math.min(e,r),s=Math.max(e,r);this.updateVal(Ve.data,"startx",i,Math.min),this.updateVal(Ve.data,"starty",o,Math.min),this.updateVal(Ve.data,"stopx",a,Math.max),this.updateVal(Ve.data,"stopy",s,Math.max),this.updateBounds(i,o,a,s)},newActivation:function(t,e){var n=Oe.parser.yy.getActors()[t.from.actor],r=qe(t.from.actor).length,i=n.x+Ge.width/2+(r-1)*Ge.activationWidth/2;this.activations.push({startx:i,starty:this.verticalPos+2,stopx:i+Ge.activationWidth,stopy:void 0,actor:t.from.actor,anchored:Me.anchorElement(e)})},endActivation:function(t){var e=this.activations.map((function(t){return t.actor})).lastIndexOf(t.from.actor);return this.activations.splice(e,1)[0]},newLoop:function(t,e){this.sequenceItems.push({startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:t,fill:e})},endLoop:function(){return this.sequenceItems.pop()},addSectionToLoop:function(t){var e=this.sequenceItems.pop();e.sections=e.sections||[],e.sectionTitles=e.sectionTitles||[],e.sections.push(Ve.getVerticalPos()),e.sectionTitles.push(t),this.sequenceItems.push(e)},bumpVerticalPos:function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},getVerticalPos:function(){return this.verticalPos},getBounds:function(){return this.data}},He=function(t,e,n,r,i){var a=Me.getNoteRect();a.x=e,a.y=n,a.width=i||Ge.width,a.class="note";var o=t.append("g"),s=Me.drawRect(o,a),u=function(t,e,n,r,i){var a=0,o=0,s={left:"start",start:"start",center:"middle",middle:"middle",right:"end",end:"end"},u=t.split(U),c=!0,l=!1,f=void 0;try{for(var h,d=u[Symbol.iterator]();!(c=(h=d.next()).done);c=!0){var p=h.value,y=Me.getTextObj(),g=s[Ge.noteAlign]||"middle";switch(g){case"start":y.x=e+Ge.noteMargin;break;case"middle":y.x=e+i/2;break;case"end":y.x=e+i-Ge.noteMargin}y.y=n+a,y.dy="1em",y.text=p,y.class="noteText";var m=Me.drawText(r,y).style("text-anchor",g).style("font-size",Ge.noteFontSize).style("font-family",Ge.noteFontFamily).attr("dominant-baseline","central").attr("alignment-baseline","central");a+=(m._groups||m)[0][0].getBBox().height,m.attr("y",n+(o+a+2*Ge.noteMargin)/2),o=a}}catch(t){l=!0,f=t}finally{try{c||null==d.return||d.return()}finally{if(l)throw f}}return a}(r.message,e,n,o,a.width);Ve.insert(e,n,e+a.width,n+2*Ge.noteMargin+u),s.attr("height",u+2*Ge.noteMargin),Ve.bumpVerticalPos(u+2*Ge.noteMargin)},We=function(t,e,n,r){for(var i=0,a=0,o=0;o<n.length;o++){var s=e[n[o]];s.width=s.width||Ze(s),s.height=Ge.height,s.margin=s.margin||Ge.actorMargin,s.x=i+a,s.y=r,Me.drawActor(t,s,Ge),Ve.insert(s.x,r,s.x+s.width,Ge.height),i+=s.width,a+=s.margin}Ve.bumpVerticalPos(Ge.height)},qe=function(t){return Ve.activations.filter((function(e){return e.actor===t}))},Xe=function(t){var e=Oe.parser.yy.getActors()[t],n=qe(t);return[n.reduce((function(t,e){return Math.min(t,e.startx)}),e.x+e.width/2),n.reduce((function(t,e){return Math.max(t,e.stopx)}),e.x+e.width/2)]},Ze=function(t){return t.description?Math.max(Ge.width,Je(t.description,Ge.actorFontSize,Ge.actorFontFamily)):Ge.width},Je=function(t,e,n){if(!t)return 0;e=e||Ge.actorFontSize;var r=["sans-serif",n=n||Ge.actorFontFamily],i=t.split(U),o=0,s=Object(a.select)("body");if(!s.remove)return 0;var u=s.append("svg"),c=!0,l=!1,f=void 0;try{for(var h,d=i[Symbol.iterator]();!(c=(h=d.next()).done);c=!0){var p=h.value,y=!0,g=!1,m=void 0;try{for(var v,b=r[Symbol.iterator]();!(y=(v=b.next()).done);y=!0){var x=v.value,_=Me.getTextObj();_.text=p;var w=Me.drawText(u,_).style("font-size",e).style("font-family",x);o=Math.max(o,(w._groups||w)[0][0].getBBox().width)}}catch(t){g=!0,m=t}finally{try{y||null==b.return||b.return()}finally{if(g)throw m}}}}catch(t){l=!0,f=t}finally{try{c||null==d.return||d.return()}finally{if(l)throw f}}return u.remove(),o+35},Qe=function(t,e){var n={};return e.forEach((function(e){if(t[e.to]&&t[e.from]){var r=t[e.to];if(e.placement==Oe.parser.yy.PLACEMENT.LEFTOF&&!r.prevActor)return;if(e.placement==Oe.parser.yy.PLACEMENT.RIGHTOF&&!r.nextActor)return;var i=void 0!==e.placement,a=!i,o=i?Ge.noteFontSize:Ge.messageFontSize,s=i?Ge.noteFontFamily:Ge.messageFontFamily,u=Je(e.message,o,s);a&&e.from==r.nextActor?n[e.to]=Math.max(n[e.to]||0,u):a&&e.from==r.prevActor||e.placement==Oe.parser.yy.PLACEMENT.RIGHTOF?n[e.from]=Math.max(n[e.from]||0,u):e.placement==Oe.parser.yy.PLACEMENT.LEFTOF?n[r.prevActor]=Math.max(n[r.prevActor]||0,u):e.placement==Oe.parser.yy.PLACEMENT.OVER&&(r.prevActor&&(n[r.prevActor]=Math.max(n[r.prevActor]||0,u/2)),r.nextActor&&(n[e.from]=Math.max(n[e.from]||0,u/2)))}})),n},Ke=function(t,e){for(var n in e){var r=t[n];if(r){var i=t[r.nextActor];if(i){r.width=Math.max(Ge.width,Je(r.description,Ge.actorFontSize,Ge.actorFontFamily)),i.width=Math.max(Ge.width,Je(i.description,Ge.actorFontSize,Ge.actorFontFamily));var a=e[n]+Ge.actorMargin-r.width/2-i.width/2;r.margin=Math.max(a,Ge.actorMargin)}}}},tn=function(t){Object.keys(t).forEach((function(e){Ge[e]=t[e]})),t.fontFamily&&(Ge.actorFontFamily=Ge.noteFontFamily=t.fontFamily)},en=function(t,e){Oe.parser.yy.clear(),Oe.parser.parse(t+"\n"),Ve.init();var n,r,i,o=Object(a.select)('[id="'.concat(e,'"]')),s=Oe.parser.yy.getActors(),u=Oe.parser.yy.getActorKeys(),c=Oe.parser.yy.getMessages(),l=Oe.parser.yy.getTitle(),f=Qe(s,c);Ke(s,f),We(o,s,u,0),Me.insertArrowHead(o),Me.insertArrowCrossHead(o),Me.insertSequenceNumber(o);var h=1;c.forEach((function(t){var e,a=Math.max(Ge.width,Je(t.message,Ge.noteFontSize,Ge.noteFontFamily));switch(t.type){case Oe.parser.yy.LINETYPE.NOTE:Ve.bumpVerticalPos(Ge.boxMargin),n=s[t.from].x,r=s[t.to].x,t.placement===Oe.parser.yy.PLACEMENT.RIGHTOF?He(o,n+(s[t.from].width+Ge.actorMargin)/2,Ve.getVerticalPos(),t,a):t.placement===Oe.parser.yy.PLACEMENT.LEFTOF?He(o,n-a+(s[t.from].width-Ge.actorMargin)/2,Ve.getVerticalPos(),t,a):t.to===t.from?He(o,n+(s[t.to].width-a)/2,Ve.getVerticalPos(),t,a):(i=Math.abs(n-r)+Ge.actorMargin,He(o,(n+r+a-i)/2,Ve.getVerticalPos(),t,i));break;case Oe.parser.yy.LINETYPE.ACTIVE_START:Ve.newActivation(t,o);break;case Oe.parser.yy.LINETYPE.ACTIVE_END:!function(t,e){var n=Ve.endActivation(t);n.starty+18>e&&(n.starty=e-6,e+=12),Me.drawActivation(o,n,e,Ge,qe(t.from.actor).length),Ve.insert(n.startx,e-10,n.stopx,e)}(t,Ve.getVerticalPos());break;case Oe.parser.yy.LINETYPE.LOOP_START:Ve.bumpVerticalPos(Ge.boxMargin),Ve.newLoop(t.message),Ve.bumpVerticalPos(Ge.boxMargin+Ge.boxTextMargin);break;case Oe.parser.yy.LINETYPE.LOOP_END:e=Ve.endLoop(),Me.drawLoop(o,e,"loop",Ge),Ve.bumpVerticalPos(Ge.boxMargin);break;case Oe.parser.yy.LINETYPE.RECT_START:Ve.bumpVerticalPos(Ge.boxMargin),Ve.newLoop(void 0,t.message),Ve.bumpVerticalPos(Ge.boxMargin);break;case Oe.parser.yy.LINETYPE.RECT_END:var u=Ve.endLoop();Me.drawBackgroundRect(o,u),Ve.bumpVerticalPos(Ge.boxMargin);break;case Oe.parser.yy.LINETYPE.OPT_START:Ve.bumpVerticalPos(Ge.boxMargin),Ve.newLoop(t.message),Ve.bumpVerticalPos(Ge.boxMargin+Ge.boxTextMargin);break;case Oe.parser.yy.LINETYPE.OPT_END:e=Ve.endLoop(),Me.drawLoop(o,e,"opt",Ge),Ve.bumpVerticalPos(Ge.boxMargin);break;case Oe.parser.yy.LINETYPE.ALT_START:Ve.bumpVerticalPos(Ge.boxMargin),Ve.newLoop(t.message),Ve.bumpVerticalPos(Ge.boxMargin+Ge.boxTextMargin);break;case Oe.parser.yy.LINETYPE.ALT_ELSE:Ve.bumpVerticalPos(Ge.boxMargin),e=Ve.addSectionToLoop(t.message),Ve.bumpVerticalPos(Ge.boxMargin);break;case Oe.parser.yy.LINETYPE.ALT_END:e=Ve.endLoop(),Me.drawLoop(o,e,"alt",Ge),Ve.bumpVerticalPos(Ge.boxMargin);break;case Oe.parser.yy.LINETYPE.PAR_START:Ve.bumpVerticalPos(Ge.boxMargin),Ve.newLoop(t.message),Ve.bumpVerticalPos(Ge.boxMargin+Ge.boxTextMargin);break;case Oe.parser.yy.LINETYPE.PAR_AND:Ve.bumpVerticalPos(Ge.boxMargin),e=Ve.addSectionToLoop(t.message),Ve.bumpVerticalPos(Ge.boxMargin);break;case Oe.parser.yy.LINETYPE.PAR_END:e=Ve.endLoop(),Me.drawLoop(o,e,"par",Ge),Ve.bumpVerticalPos(Ge.boxMargin);break;default:try{Ve.bumpVerticalPos(Ge.messageMargin);var c=Xe(t.from),l=Xe(t.to),f=c[0]<=l[0]?1:0,d=c[0]<l[0]?0:1;n=c[f],r=l[d];var p=Ve.getVerticalPos();!function(t,e,n,r,i,a){var o=t.append("g"),s=e+(n-e)/2,u=[],c=0,l=i.message.split(U),f=!0,h=!1,d=void 0;try{for(var p,y=l[Symbol.iterator]();!(f=(p=y.next()).done);f=!0){var g=p.value;u.push(o.append("text").attr("x",s).attr("y",r-7+17*c).style("font-size",Ge.messageFontSize).style("font-family",Ge.messageFontFamily).style("text-anchor","middle").attr("class","messageText").text(g.trim())),c++}}catch(t){h=!0,d=t}finally{try{f||null==y.return||y.return()}finally{if(h)throw d}}for(var m,v=17*(c-1),b=u.map((function(t){return(t._groups||t)[0][0].getBBox().width})),x=Math.max.apply(Math,$e(b)),_=0,w=u;_<w.length;_++){var k=w[_];"left"===Ge.messageAlign?k.attr("x",s-x/2).style("text-anchor","start"):"right"===Ge.messageAlign&&k.attr("x",s+x/2).style("text-anchor","end")}if(Ve.bumpVerticalPos(v),e===n){Ge.rightAngles?m=o.append("path").attr("d","M ".concat(e,",").concat(r+v," H ").concat(e+Ge.width/2," V ").concat(r+25+v," H ").concat(e)):(v+=5,m=o.append("path").attr("d","M "+e+","+(r+v)+" C "+(e+60)+","+(r-10+v)+" "+(e+60)+","+(r+30+v)+" "+e+","+(r+20+v))),Ve.bumpVerticalPos(30+v);var E=Math.max(x/2,100);Ve.insert(e-E,Ve.getVerticalPos()-10+v,n+E,Ve.getVerticalPos()+v)}else(m=o.append("line")).attr("x1",e),m.attr("y1",r+v),m.attr("x2",n),m.attr("y2",r+v),Ve.insert(e,Ve.getVerticalPos()-10+v,n,Ve.getVerticalPos()+v);i.type===Oe.parser.yy.LINETYPE.DOTTED||i.type===Oe.parser.yy.LINETYPE.DOTTED_CROSS||i.type===Oe.parser.yy.LINETYPE.DOTTED_OPEN?(m.style("stroke-dasharray","3, 3"),m.attr("class","messageLine1")):m.attr("class","messageLine0");var A="";Ge.arrowMarkerAbsolute&&(A=(A=(A=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),m.attr("stroke-width",2),m.attr("stroke","black"),m.style("fill","none"),i.type!==Oe.parser.yy.LINETYPE.SOLID&&i.type!==Oe.parser.yy.LINETYPE.DOTTED||m.attr("marker-end","url("+A+"#arrowhead)"),i.type!==Oe.parser.yy.LINETYPE.SOLID_CROSS&&i.type!==Oe.parser.yy.LINETYPE.DOTTED_CROSS||m.attr("marker-end","url("+A+"#crosshead)"),(Ue.showSequenceNumbers()||Ge.showSequenceNumbers)&&(m.attr("marker-start","url("+A+"#sequencenumber)"),o.append("text").attr("x",e).attr("y",r+4+v).attr("font-family","sans-serif").attr("font-size","12px").attr("text-anchor","middle").attr("textLength","16px").attr("class","sequenceNumber").text(a))}(o,n,r,p,t,h);var y=c.concat(l);Ve.insert(Math.min.apply(null,y),p,Math.max.apply(null,y),p)}catch(t){x.error("error while drawing message",t)}}[Oe.parser.yy.LINETYPE.SOLID_OPEN,Oe.parser.yy.LINETYPE.DOTTED_OPEN,Oe.parser.yy.LINETYPE.SOLID,Oe.parser.yy.LINETYPE.DOTTED,Oe.parser.yy.LINETYPE.SOLID_CROSS,Oe.parser.yy.LINETYPE.DOTTED_CROSS].includes(t.type)&&h++})),Ge.mirrorActors&&(Ve.bumpVerticalPos(2*Ge.boxMargin),We(o,s,u,Ve.getVerticalPos()));var d=Ve.getBounds();x.debug("For line height fix Querying: #"+e+" .actor-line"),Object(a.selectAll)("#"+e+" .actor-line").attr("y2",d.stopy);var p=d.stopy-d.starty+2*Ge.diagramMarginY;Ge.mirrorActors&&(p=p-Ge.boxMargin+Ge.bottomMarginAdj);var y=d.stopx-d.startx+2*Ge.diagramMarginX;l&&o.append("text").text(l).attr("x",(d.stopx-d.startx)/2-2*Ge.diagramMarginX).attr("y",-25),Ge.useMaxWidth?(o.attr("height","100%"),o.attr("width","100%"),o.attr("style","max-width:"+y+"px;")):(o.attr("height",p),o.attr("width",y));var g=l?40:0;o.attr("viewBox",d.startx-Ge.diagramMarginX+" -"+(Ge.diagramMarginY+g)+" "+y+" "+(p+g))},nn=n(23),rn=n.n(nn);function an(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var on,sn,un=h(),cn="",ln="",fn="",hn=[],dn="",pn=[],yn=[],gn="",mn=["active","done","crit","milestone"],vn=[],bn=!1,xn=function(t,e,n){return t.isoWeekday()>=6&&n.indexOf("weekends")>=0||(n.indexOf(t.format("dddd").toLowerCase())>=0||n.indexOf(t.format(e.trim()))>=0)},_n=function(t,e,n){if(n.length&&!t.manualEndTime){var r=p()(t.startTime,e,!0);r.add(1,"d");var i=p()(t.endTime,e,!0),a=wn(r,i,e,n);t.endTime=i.toDate(),t.renderEndTime=a}},wn=function(t,e,n,r){for(var i=!1,a=null;t<=e;)i||(a=e.toDate()),(i=xn(t,n,r))&&e.add(1,"d"),t.add(1,"d");return a},kn=function(t,e,n){n=n.trim();var r=/^after\s+([\d\w- ]+)/.exec(n.trim());if(null!==r){var i=null;if(r[1].split(" ").forEach((function(t){var e=Nn(t);void 0!==e&&(i?e.endTime>i.endTime&&(i=e):i=e)})),i)return i.endTime;var a=new Date;return a.setHours(0,0,0,0),a}var o=p()(n,e.trim(),!0);return o.isValid()?o.toDate():(x.debug("Invalid date:"+n),x.debug("With date format:"+e.trim()),new Date)},En=function(t,e){if(null!==t)switch(t[2]){case"s":e.add(t[1],"seconds");break;case"m":e.add(t[1],"minutes");break;case"h":e.add(t[1],"hours");break;case"d":e.add(t[1],"days");break;case"w":e.add(t[1],"weeks")}return e.toDate()},An=function(t,e,n,r){r=r||!1,n=n.trim();var i=p()(n,e.trim(),!0);return i.isValid()?(r&&i.add(1,"d"),i.toDate()):En(/^([\d]+)([wdhms])/.exec(n.trim()),p()(t))},Tn=0,Sn=function(t){return void 0===t?"task"+(Tn+=1):t},Mn=[],On={},Nn=function(t){var e=On[t];return Mn[e]},Cn=function(){for(var t=function(t){var e=Mn[t],n="";switch(Mn[t].raw.startTime.type){case"prevTaskEnd":var r=Nn(e.prevTaskId);e.startTime=r.endTime;break;case"getStartDate":(n=kn(0,cn,Mn[t].raw.startTime.startData))&&(Mn[t].startTime=n)}return Mn[t].startTime&&(Mn[t].endTime=An(Mn[t].startTime,cn,Mn[t].raw.endTime.data,bn),Mn[t].endTime&&(Mn[t].processed=!0,Mn[t].manualEndTime=p()(Mn[t].raw.endTime.data,"YYYY-MM-DD",!0).isValid(),_n(Mn[t],cn,hn))),Mn[t].processed},e=!0,n=0;n<Mn.length;n++)t(n),e=e&&Mn[n].processed;return e},Dn=function(t,e){t.split(",").forEach((function(t){var n=Nn(t);void 0!==n&&n.classes.push(e)}))},Ln=function(t,e){vn.push((function(){var n=document.querySelector('[id="'.concat(t,'"]'));null!==n&&n.addEventListener("click",(function(){e()}))})),vn.push((function(){var n=document.querySelector('[id="'.concat(t,'-text"]'));null!==n&&n.addEventListener("click",(function(){e()}))}))},Fn={clear:function(){pn=[],yn=[],gn="",vn=[],dn="",Tn=0,on=void 0,sn=void 0,Mn=[],cn="",ln="",fn="",hn=[],bn=!1},setDateFormat:function(t){cn=t},getDateFormat:function(){return cn},enableInclusiveEndDates:function(){bn=!0},endDatesAreInclusive:function(){return bn},setAxisFormat:function(t){ln=t},getAxisFormat:function(){return ln},setTodayMarker:function(t){fn=t},getTodayMarker:function(){return fn},setTitle:function(t){dn=t},getTitle:function(){return dn},addSection:function(t){gn=t,pn.push(t)},getSections:function(){return pn},getTasks:function(){for(var t=Cn(),e=0;!t&&e<10;)t=Cn(),e++;return yn=Mn},addTask:function(t,e){var n={section:gn,type:gn,processed:!1,manualEndTime:!1,renderEndTime:null,raw:{data:e},task:t,classes:[]},r=function(t,e){var n=(":"===e.substr(0,1)?e.substr(1,e.length):e).split(","),r={};In(n,r,mn);for(var i=0;i<n.length;i++)n[i]=n[i].trim();switch(n.length){case 1:r.id=Sn(),r.startTime={type:"prevTaskEnd",id:t},r.endTime={data:n[0]};break;case 2:r.id=Sn(),r.startTime={type:"getStartDate",startData:n[0]},r.endTime={data:n[1]};break;case 3:r.id=Sn(n[0]),r.startTime={type:"getStartDate",startData:n[1]},r.endTime={data:n[2]}}return r}(sn,e);n.raw.startTime=r.startTime,n.raw.endTime=r.endTime,n.id=r.id,n.prevTaskId=sn,n.active=r.active,n.done=r.done,n.crit=r.crit,n.milestone=r.milestone;var i=Mn.push(n);sn=n.id,On[n.id]=i-1},findTaskById:Nn,addTaskOrg:function(t,e){var n={section:gn,type:gn,description:t,task:t,classes:[]},r=function(t,e){var n=(":"===e.substr(0,1)?e.substr(1,e.length):e).split(","),r={};In(n,r,mn);for(var i=0;i<n.length;i++)n[i]=n[i].trim();var a="";switch(n.length){case 1:r.id=Sn(),r.startTime=t.endTime,a=n[0];break;case 2:r.id=Sn(),r.startTime=kn(0,cn,n[0]),a=n[1];break;case 3:r.id=Sn(n[0]),r.startTime=kn(0,cn,n[1]),a=n[2]}return a&&(r.endTime=An(r.startTime,cn,a,bn),r.manualEndTime=p()(a,"YYYY-MM-DD",!0).isValid(),_n(r,cn,hn)),r}(on,e);n.startTime=r.startTime,n.endTime=r.endTime,n.id=r.id,n.active=r.active,n.done=r.done,n.crit=r.crit,n.milestone=r.milestone,on=n,yn.push(n)},setExcludes:function(t){hn=t.toLowerCase().split(/[\s,]+/)},getExcludes:function(){return hn},setClickEvent:function(t,e,n){t.split(",").forEach((function(t){!function(t,e,n){if("loose"===un.securityLevel&&void 0!==e){var r=[];if("string"==typeof n){r=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(var i=0;i<r.length;i++){var a=r[i].trim();'"'===a.charAt(0)&&'"'===a.charAt(a.length-1)&&(a=a.substr(1,a.length-2)),r[i]=a}}0===r.length&&r.push(t),void 0!==Nn(t)&&Ln(t,(function(){var t;(t=window)[e].apply(t,an(r))}))}}(t,e,n)})),Dn(t,"clickable")},setLink:function(t,e){var n=e;"loose"!==un.securityLevel&&(n=Object(k.sanitizeUrl)(e)),t.split(",").forEach((function(t){void 0!==Nn(t)&&Ln(t,(function(){window.open(n,"_self")}))})),Dn(t,"clickable")},bindFunctions:function(t){vn.forEach((function(e){e(t)}))},durationToDate:En};function In(t,e,n){for(var r=!0;r;)r=!1,n.forEach((function(n){var i=new RegExp("^\\s*"+n+"\\s*$");t[0].match(i)&&(e[n]=!0,t.shift(1),r=!0)}))}nn.parser.yy=Fn;var Pn,Rn={titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"'},Bn=function(t){Object.keys(t).forEach((function(e){Rn[e]=t[e]}))},jn=function(t,e){nn.parser.yy.clear(),nn.parser.parse(t);var n=document.getElementById(e);void 0===(Pn=n.parentElement.offsetWidth)&&(Pn=1200),void 0!==Rn.useWidth&&(Pn=Rn.useWidth);var r=nn.parser.yy.getTasks(),i=r.length*(Rn.barHeight+Rn.barGap)+2*Rn.topPadding;n.setAttribute("height","100%"),n.setAttribute("viewBox","0 0 "+Pn+" "+i);for(var o=Object(a.select)('[id="'.concat(e,'"]')),s=Object(a.scaleTime)().domain([Object(a.min)(r,(function(t){return t.startTime})),Object(a.max)(r,(function(t){return t.endTime}))]).rangeRound([0,Pn-Rn.leftPadding-Rn.rightPadding]),u=[],c=0;c<r.length;c++)u.push(r[c].type);var l=u;function f(t){for(var e=t.length,n={};e;)n[t[--e]]=(n[t[e]]||0)+1;return n}u=function(t){for(var e={},n=[],r=0,i=t.length;r<i;++r)e.hasOwnProperty(t[r])||(e[t[r]]=!0,n.push(t[r]));return n}(u),function(t,e,n){var r=Rn.barHeight,i=r+Rn.barGap,c=Rn.topPadding,h=Rn.leftPadding;Object(a.scaleLinear)().domain([0,u.length]).range(["#00B9FA","#F95002"]).interpolate(a.interpolateHcl);(function(t,e,n,r){var i=Object(a.axisBottom)(s).tickSize(-r+e+Rn.gridLineStartPadding).tickFormat(Object(a.timeFormat)(nn.parser.yy.getAxisFormat()||Rn.axisFormat||"%Y-%m-%d"));o.append("g").attr("class","grid").attr("transform","translate("+t+", "+(r-50)+")").call(i).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em")})(h,c,0,n),function(t,e,n,r,i,a,c){o.append("g").selectAll("rect").data(t).enter().append("rect").attr("x",0).attr("y",(function(t,r){return r*e+n-2})).attr("width",(function(){return c-Rn.rightPadding/2})).attr("height",e).attr("class",(function(t){for(var e=0;e<u.length;e++)if(t.type===u[e])return"section section"+e%Rn.numberSectionStyles;return"section section0"}));var l=o.append("g").selectAll("rect").data(t).enter();l.append("rect").attr("id",(function(t){return t.id})).attr("rx",3).attr("ry",3).attr("x",(function(t){return t.milestone?s(t.startTime)+r+.5*(s(t.endTime)-s(t.startTime))-.5*i:s(t.startTime)+r})).attr("y",(function(t,r){return r*e+n})).attr("width",(function(t){return t.milestone?i:s(t.renderEndTime||t.endTime)-s(t.startTime)})).attr("height",i).attr("transform-origin",(function(t,a){return(s(t.startTime)+r+.5*(s(t.endTime)-s(t.startTime))).toString()+"px "+(a*e+n+.5*i).toString()+"px"})).attr("class",(function(t){var e="";t.classes.length>0&&(e=t.classes.join(" "));for(var n=0,r=0;r<u.length;r++)t.type===u[r]&&(n=r%Rn.numberSectionStyles);var i="";return t.active?t.crit?i+=" activeCrit":i=" active":t.done?i=t.crit?" doneCrit":" done":t.crit&&(i+=" crit"),0===i.length&&(i=" task"),t.milestone&&(i=" milestone "+i),i+=n,"task"+(i+=" "+e)})),l.append("text").attr("id",(function(t){return t.id+"-text"})).text((function(t){return t.task})).attr("font-size",Rn.fontSize).attr("x",(function(t){var e=s(t.startTime),n=s(t.renderEndTime||t.endTime);t.milestone&&(e+=.5*(s(t.endTime)-s(t.startTime))-.5*i),t.milestone&&(n=e+i);var a=this.getBBox().width;return a>n-e?n+a+1.5*Rn.leftPadding>c?e+r-5:n+r+5:(n-e)/2+e+r})).attr("y",(function(t,r){return r*e+Rn.barHeight/2+(Rn.fontSize/2-2)+n})).attr("text-height",i).attr("class",(function(t){var e=s(t.startTime),n=s(t.endTime);t.milestone&&(n=e+i);var r=this.getBBox().width,a="";t.classes.length>0&&(a=t.classes.join(" "));for(var o=0,l=0;l<u.length;l++)t.type===u[l]&&(o=l%Rn.numberSectionStyles);var f="";return t.active&&(f=t.crit?"activeCritText"+o:"activeText"+o),t.done?f=t.crit?f+" doneCritText"+o:f+" doneText"+o:t.crit&&(f=f+" critText"+o),t.milestone&&(f+=" milestoneText"),r>n-e?n+r+1.5*Rn.leftPadding>c?a+" taskTextOutsideLeft taskTextOutside"+o+" "+f:a+" taskTextOutsideRight taskTextOutside"+o+" "+f+" width-"+r:a+" taskText taskText"+o+" "+f+" width-"+r}))}(t,i,c,h,r,0,e),function(t,e){for(var n=[],r=0,i=0;i<u.length;i++)n[i]=[u[i],(a=u[i],s=l,f(s)[a]||0)];var a,s;o.append("g").selectAll("text").data(n).enter().append((function(t){var e=t[0].split(U),n=-(e.length-1)/2,r=document.createElementNS("http://www.w3.org/2000/svg","text");r.setAttribute("dy",n+"em");for(var i=0;i<e.length;i++){var a=document.createElementNS("http://www.w3.org/2000/svg","tspan");a.setAttribute("alignment-baseline","central"),a.setAttribute("x","10"),i>0&&a.setAttribute("dy","1em"),a.textContent=e[i],r.appendChild(a)}return r})).attr("x",10).attr("y",(function(i,a){if(!(a>0))return i[1]*t/2+e;for(var o=0;o<a;o++)return r+=n[a-1][1],i[1]*t/2+r*t+e})).attr("class",(function(t){for(var e=0;e<u.length;e++)if(t[0]===u[e])return"sectionTitle sectionTitle"+e%Rn.numberSectionStyles;return"sectionTitle"}))}(i,c),function(t,e,n,r){var i=Fn.getTodayMarker();if("off"===i)return;var a=o.append("g").attr("class","today"),u=new Date,c=a.append("line");c.attr("x1",s(u)+t).attr("x2",s(u)+t).attr("y1",Rn.titleTopMargin).attr("y2",r-Rn.titleTopMargin).attr("class","today"),""!==i&&c.attr("style",i.replace(/,/g,";"))}(h,0,0,n)}(r,Pn,i),void 0!==Rn.useWidth&&n.setAttribute("width",Pn),o.append("text").text(nn.parser.yy.getTitle()).attr("x",Pn/2).attr("y",Rn.titleTopMargin).attr("class","titleText")},Yn=h(),zn=[],Un={},$n=0,Gn=[],Vn=function(t){var e="",n=t;if(t.indexOf("~")>0){var r=t.split("~");n=r[0],e=r[1]}return{className:n,type:e}},Hn=function(t){var e=Vn(t);void 0===Un[e.className]&&(Un[e.className]={id:e.className,type:e.type,cssClasses:[],methods:[],members:[],annotations:[],domId:"classid-"+e.className+"-"+$n},$n++)},Wn=function(t){for(var e=Object.keys(Un),n=0;n<e.length;n++)if(Un[e[n]].id===t)return Un[e[n]].domId},qn=function(t,e){var n=Vn(t).className,r=Un[n];if("string"==typeof e){var i=e.trim();i.startsWith("<<")&&i.endsWith(">>")?r.annotations.push(i.substring(2,i.length-2)):i.indexOf(")")>0?r.methods.push(i):i&&r.members.push(i)}},Xn=function(t,e){t.split(",").forEach((function(t){var n=t;t[0].match(/\d/)&&(n="classid-"+n),void 0!==Un[n]&&Un[n].cssClasses.push(e)}))},Zn=function(t,e,n){var r=t,i=Wn(r);"loose"===Yn.securityLevel&&void 0!==e&&void 0!==Un[r]&&(n&&(Un[r].tooltip=z(n,Yn)),Gn.push((function(){var t=document.querySelector('[id="'.concat(i,'"]'));null!==t&&t.addEventListener("click",(function(){window[e](i)}),!1)})))},Jn={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3},Qn=function(t){var e=Object(a.select)(".mermaidTooltip");null===(e._groups||e)[0][0]&&(e=Object(a.select)("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),Object(a.select)(t).select("svg").selectAll("g.node").on("mouseover",(function(){var t=Object(a.select)(this);if(null!==t.attr("title")){var n=this.getBoundingClientRect();e.transition().duration(200).style("opacity",".9"),e.html(t.attr("title")).style("left",n.left+(n.right-n.left)/2+"px").style("top",n.top-14+document.body.scrollTop+"px"),t.classed("hover",!0)}})).on("mouseout",(function(){e.transition().duration(500).style("opacity",0),Object(a.select)(this).classed("hover",!1)}))};Gn.push(Qn);var Kn={addClass:Hn,bindFunctions:function(t){Gn.forEach((function(e){e(t)}))},clear:function(){zn=[],Un={},(Gn=[]).push(Qn)},getClass:function(t){return Un[t]},getClasses:function(){return Un},addAnnotation:function(t,e){var n=Vn(t).className;Un[n].annotations.push(e)},getRelations:function(){return zn},addRelation:function(t){x.debug("Adding relation: "+JSON.stringify(t)),Hn(t.id1),Hn(t.id2),t.id1=Vn(t.id1).className,t.id2=Vn(t.id2).className,zn.push(t)},addMember:qn,addMembers:function(t,e){Array.isArray(e)&&(e.reverse(),e.forEach((function(e){return qn(t,e)})))},cleanupLabel:function(t){return":"===t.substring(0,1)?t.substr(1).trim():t.trim()},lineType:{LINE:0,DOTTED_LINE:1},relationType:Jn,setClickEvent:function(t,e,n){t.split(",").forEach((function(t){Zn(t,e,n)})),Xn(t,"clickable")},setCssClass:Xn,setLink:function(t,e,n){t.split(",").forEach((function(t){var r=t;t[0].match(/\d/)&&(r="classid-"+r),void 0!==Un[r]&&(Un[r].link=F(e,Yn),n&&(Un[r].tooltip=z(n,Yn)))})),Xn(t,"clickable")},lookUpDomId:Wn},tr=n(38),er=n.n(tr),nr=0,rr=function(t){var e=t.match(/^(\+|-|~|#)?(\w+)(~\w+~|\[\])?\s+(\w+)$/),n=t.match(/^(\+|-|~|#)?(\w+)\s?\(\s*(\w+(~\w+~|\[\])?\s*(\w+)?)?\s*\)\s?([*|$])?\s?(\w+(~\w+~|\[\])?)?\s*$/);return e?ir(e):n?ar(n):or(t)},ir=function(t){return{displayText:(t[1]?t[1].trim():"")+(t[2]?t[2].trim():"")+(t[3]?ur(t[3]):"")+" "+(t[4]?t[4].trim():""),cssStyle:""}},ar=function(t){var e=t[1]?t[1].trim():"",n=t[2]?t[2].trim():"",r=t[3]?ur(t[3]):"",i=t[6]?t[6].trim():"";return{displayText:e+n+"("+r+")"+(t[7]?" : "+ur(t[7]).trim():""),cssStyle:cr(i)}},or=function(t){var e="",n="",r="",i=t.indexOf("("),a=t.indexOf(")");if(i>1&&a>i&&a<=t.length){var o=t.match(/(\+|-|~|#)?(\w+)/),s=o[1]?o[1].trim():"",u=o[2],c=t.substring(i+1,a),l=t.substring(a,a+1);n=cr(l),a<(e=s+u+"("+ur(c.trim())+")").length&&""!==(r=t.substring(a+2).trim())&&(r=" : "+ur(r))}else e=ur(t);return{displayText:e+r,cssStyle:n}},sr=function(t,e,n,r){var i=rr(e),a=t.append("tspan").attr("x",r.padding).text(i.displayText);""!==i.cssStyle&&a.attr("style",i.cssStyle),n||a.attr("dy",r.textHeight)},ur=function t(e){var n=e;return-1!=e.indexOf("~")?t(n=(n=n.replace("~","<")).replace("~",">")):n},cr=function(t){switch(t){case"*":return"font-style:italic;";case"$":return"text-decoration:underline;";default:return""}},lr=function(t,e,n){x.info("Rendering class "+e);var r="classGroup ";e.cssClasses.length>0&&(r+=e.cssClasses.join(" "));var i,a=e.id,o={id:a,label:e.id,width:0,height:0},s=t.append("g").attr("id",Wn(a)).attr("class",r);i=e.link?s.append("svg:a").attr("xlink:href",e.link).attr("target","_blank").append("text").attr("y",n.textHeight+n.padding).attr("x",0):s.append("text").attr("y",n.textHeight+n.padding).attr("x",0);var u=!0;e.annotations.forEach((function(t){var e=i.append("tspan").text("«"+t+"»");u||e.attr("dy",n.textHeight),u=!1}));var c=e.id;void 0!==e.type&&""!==e.type&&(c+="<"+e.type+">");var l=i.append("tspan").text(c).attr("class","title");u||l.attr("dy",n.textHeight);var f=i.node().getBBox().height,h=s.append("line").attr("x1",0).attr("y1",n.padding+f+n.dividerMargin/2).attr("y2",n.padding+f+n.dividerMargin/2),d=s.append("text").attr("x",n.padding).attr("y",f+n.dividerMargin+n.textHeight).attr("fill","white").attr("class","classText");u=!0,e.members.forEach((function(t){sr(d,t,u,n),u=!1}));var p=d.node().getBBox(),y=s.append("line").attr("x1",0).attr("y1",n.padding+f+n.dividerMargin+p.height).attr("y2",n.padding+f+n.dividerMargin+p.height),g=s.append("text").attr("x",n.padding).attr("y",f+2*n.dividerMargin+p.height+n.textHeight).attr("fill","white").attr("class","classText");u=!0,e.methods.forEach((function(t){sr(g,t,u,n),u=!1}));var m=s.node().getBBox(),v=s.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",m.width+2*n.padding).attr("height",m.height+n.padding+.5*n.dividerMargin).node().getBBox().width;return i.node().childNodes.forEach((function(t){t.setAttribute("x",(v-t.getBBox().width)/2)})),e.tooltip&&i.insert("title").text(e.tooltip),h.attr("x2",v),y.attr("x2",v),o.width=v,o.height=m.height+n.padding+.5*n.dividerMargin,o},fr=function(t,e,n,r){var i=function(t){switch(t){case Jn.AGGREGATION:return"aggregation";case Jn.EXTENSION:return"extension";case Jn.COMPOSITION:return"composition";case Jn.DEPENDENCY:return"dependency"}};e.points=e.points.filter((function(t){return!Number.isNaN(t.y)}));var o,s,u=e.points,c=Object(a.line)().x((function(t){return t.x})).y((function(t){return t.y})).curve(a.curveBasis),l=t.append("path").attr("d",c(u)).attr("id","edge"+nr).attr("class","relation"),f="";r.arrowMarkerAbsolute&&(f=(f=(f=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),1==n.relation.lineType&&l.attr("class","relation dashed-line"),"none"!==n.relation.type1&&l.attr("marker-start","url("+f+"#"+i(n.relation.type1)+"Start)"),"none"!==n.relation.type2&&l.attr("marker-end","url("+f+"#"+i(n.relation.type2)+"End)");var h,d,p,y,g=e.points.length,m=D(e.points);if(o=m.x,s=m.y,g%2!=0&&g>1){var v=L("none"!==n.relation.type1,e.points,e.points[0]),b=L("none"!==n.relation.type2,e.points,e.points[g-1]);x.debug("cardinality_1_point "+JSON.stringify(v)),x.debug("cardinality_2_point "+JSON.stringify(b)),h=v.x,d=v.y,p=b.x,y=b.y}if(void 0!==n.title){var _=t.append("g").attr("class","classLabel"),w=_.append("text").attr("class","label").attr("x",o).attr("y",s).attr("fill","red").attr("text-anchor","middle").text(n.title);window.label=w;var k=w.node().getBBox();_.insert("rect",":first-child").attr("class","box").attr("x",k.x-r.padding/2).attr("y",k.y-r.padding/2).attr("width",k.width+r.padding).attr("height",k.height+r.padding)}(x.info("Rendering relation "+JSON.stringify(n)),void 0!==n.relationTitle1&&"none"!==n.relationTitle1)&&t.append("g").attr("class","cardinality").append("text").attr("class","type1").attr("x",h).attr("y",d).attr("fill","black").attr("font-size","6").text(n.relationTitle1);void 0!==n.relationTitle2&&"none"!==n.relationTitle2&&t.append("g").attr("class","cardinality").append("text").attr("class","type2").attr("x",p).attr("y",y).attr("fill","black").attr("font-size","6").text(n.relationTitle2);nr++};tr.parser.yy=Kn;var hr={},dr={dividerMargin:10,padding:5,textHeight:10},pr=function(t){for(var e=Object.keys(hr),n=0;n<e.length;n++)if(hr[e[n]].label===t)return e[n]},yr=function(t){Object.keys(t).forEach((function(e){dr[e]=t[e]}))},gr=function(t,e){hr={},tr.parser.yy.clear(),tr.parser.parse(t),x.info("Rendering diagram "+t);var n,r=Object(a.select)("[id='".concat(e,"']"));(n=r).append("defs").append("marker").attr("id","extensionStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),n.append("defs").append("marker").attr("id","extensionEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z"),n.append("defs").append("marker").attr("id","compositionStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),n.append("defs").append("marker").attr("id","compositionEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),n.append("defs").append("marker").attr("id","aggregationStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),n.append("defs").append("marker").attr("id","aggregationEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),n.append("defs").append("marker").attr("id","dependencyStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),n.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z");var i=new P.a.Graph({multigraph:!0});i.setGraph({isMultiGraph:!0}),i.setDefaultEdgeLabel((function(){return{}}));for(var o=Kn.getClasses(),s=Object.keys(o),u=0;u<s.length;u++){var c=o[s[u]],l=lr(r,c,dr);hr[l.id]=l,i.setNode(l.id,l),x.info("Org height: "+l.height)}Kn.getRelations().forEach((function(t){x.info("tjoho"+pr(t.id1)+pr(t.id2)+JSON.stringify(t)),i.setEdge(pr(t.id1),pr(t.id2),{relation:t},t.title||"DEFAULT")})),It.a.layout(i),i.nodes().forEach((function(t){void 0!==t&&void 0!==i.node(t)&&(x.debug("Node "+t+": "+JSON.stringify(i.node(t))),Object(a.select)("#"+Wn(t)).attr("transform","translate("+(i.node(t).x-i.node(t).width/2)+","+(i.node(t).y-i.node(t).height/2)+" )"))})),i.edges().forEach((function(t){void 0!==t&&void 0!==i.edge(t)&&(x.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(i.edge(t))),fr(r,i.edge(t),i.edge(t).relation,dr))}));var f=r.node().getBBox(),h=f.width+40,d=f.height+40;dr.useMaxWidth?(r.attr("width","100%"),r.attr("style","max-width: ".concat(h,"px;"))):(r.attr("height",d),r.attr("width",h));var p="".concat(f.x-20," ").concat(f.y-20," ").concat(h," ").concat(d);x.debug("viewBox ".concat(p)),r.attr("viewBox",p)};function mr(t){return(mr="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)}var vr,br=function(t){return JSON.parse(JSON.stringify(t))},xr=[],_r={root:{relations:[],states:{},documents:{}}},wr=_r.root,kr=0,Er=function(t,e,n,r,i){void 0===wr.states[t]?wr.states[t]={id:t,descriptions:[],type:e,doc:n,note:i}:(wr.states[t].doc||(wr.states[t].doc=n),wr.states[t].type||(wr.states[t].type=e)),r&&(x.info("Adding state ",t,r),"string"==typeof r&&Sr(t,r.trim()),"object"===mr(r)&&r.forEach((function(e){return Sr(t,e.trim())}))),i&&(wr.states[t].note=i)},Ar=function(){wr=(_r={root:{relations:[],states:{},documents:{}}}).root},Tr=function(t,e,n){var r=t,i=e,a="default",o="default";"[*]"===t&&(r="start"+ ++kr,a="start"),"[*]"===e&&(i="end"+kr,o="end"),Er(r,a),Er(i,o),wr.relations.push({id1:r,id2:i,title:n})},Sr=function(t,e){var n=wr.states[t],r=e;":"===r[0]&&(r=r.substr(1).trim()),n.descriptions.push(r)},Mr=0,Or=[],Nr={addState:Er,clear:Ar,getState:function(t){return wr.states[t]},getStates:function(){return wr.states},getRelations:function(){return wr.relations},getClasses:function(){return Or},getDirection:function(){return"TB"},addRelation:Tr,getDividerId:function(){return"divider-id-"+ ++Mr},cleanupLabel:function(t){return":"===t.substring(0,1)?t.substr(2).trim():t.trim()},lineType:{LINE:0,DOTTED_LINE:1},relationType:{AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3},logDocuments:function(){x.info("Documents = ",_r)},getRootDoc:function(){return xr},setRootDoc:function(t){x.info("Setting root doc",t),xr=t},getRootDocV2:function(){return function t(e,n,r){if("relation"===n.stmt)t(e,n.state1,!0),t(e,n.state2,!1);else if("state"===n.stmt&&"[*]"===n.id&&(n.id=r?e.id+"_start":e.id+"_end",n.start=r),n.doc){var i=[],a=0,o=[];for(a=0;a<n.doc.length;a++)if("divider"===n.doc[a].type){var s=br(n.doc[a]);s.doc=br(o),i.push(s),o=[]}else o.push(n.doc[a]);if(i.length>0&&o.length>0){var u={stmt:"state",id:O(),type:"divider",doc:br(o)};i.push(br(u)),n.doc=i}n.doc.forEach((function(e){return t(n,e,!0)}))}}({id:"root"},{id:"root",doc:xr},!0),{id:"root",doc:xr}},extract:function(t){var e;e=t.doc?t.doc:t,x.info(e),Ar(),x.info("Extract",e),e.forEach((function(t){"state"===t.stmt&&Er(t.id,t.type,t.doc,t.description,t.note),"relation"===t.stmt&&Tr(t.state1.id,t.state2.id,t.description)}))},trimColon:function(t){return t&&":"===t[0]?t.substr(1).trim():t.trim()}},Cr=n(17),Dr=n.n(Cr),Lr={},Fr=function(t,e){Lr[t]=e},Ir=function(t,e){var n=t.append("text").attr("x",2*h().state.padding).attr("y",h().state.textHeight+1.3*h().state.padding).attr("font-size",h().state.fontSize).attr("class","state-title").text(e.descriptions[0]).node().getBBox(),r=n.height,i=t.append("text").attr("x",h().state.padding).attr("y",r+.4*h().state.padding+h().state.dividerMargin+h().state.textHeight).attr("class","state-description"),a=!0,o=!0;e.descriptions.forEach((function(t){a||(!function(t,e,n){var r=t.append("tspan").attr("x",2*h().state.padding).text(e);n||r.attr("dy",h().state.textHeight)}(i,t,o),o=!1),a=!1}));var s=t.append("line").attr("x1",h().state.padding).attr("y1",h().state.padding+r+h().state.dividerMargin/2).attr("y2",h().state.padding+r+h().state.dividerMargin/2).attr("class","descr-divider"),u=i.node().getBBox(),c=Math.max(u.width,n.width);return s.attr("x2",c+3*h().state.padding),t.insert("rect",":first-child").attr("x",h().state.padding).attr("y",h().state.padding).attr("width",c+2*h().state.padding).attr("height",u.height+r+2*h().state.padding).attr("rx",h().state.radius),t},Pr=function(t,e,n){var r,i=h().state.padding,a=2*h().state.padding,o=t.node().getBBox(),s=o.width,u=o.x,c=t.append("text").attr("x",0).attr("y",h().state.titleShift).attr("font-size",h().state.fontSize).attr("class","state-title").text(e.id),l=c.node().getBBox().width+a,f=Math.max(l,s);f===s&&(f+=a);var d=t.node().getBBox();e.doc,r=u-i,l>s&&(r=(s-f)/2+i),Math.abs(u-d.x)<i&&l>s&&(r=u-(l-s)/2);var p=1-h().state.textHeight;return t.insert("rect",":first-child").attr("x",r).attr("y",p).attr("class",n?"alt-composit":"composit").attr("width",f).attr("height",d.height+h().state.textHeight+h().state.titleShift+1).attr("rx","0"),c.attr("x",r+i),l<=s&&c.attr("x",u+(f-a)/2-l/2+i),t.insert("rect",":first-child").attr("x",r).attr("y",h().state.titleShift-h().state.textHeight-h().state.padding).attr("width",f).attr("height",3*h().state.textHeight).attr("rx",h().state.radius),t.insert("rect",":first-child").attr("x",r).attr("y",h().state.titleShift-h().state.textHeight-h().state.padding).attr("width",f).attr("height",d.height+3+2*h().state.textHeight).attr("rx",h().state.radius),t},Rr=function(t,e){e.attr("class","state-note");var n=e.append("rect").attr("x",0).attr("y",h().state.padding),r=function(t,e,n,r){var i=0,a=r.append("text");a.style("text-anchor","start"),a.attr("class","noteText");var o=t.replace(/\r\n/g,"<br/>"),s=(o=o.replace(/\n/g,"<br/>")).split(U),u=1.25*h().state.noteMargin,c=!0,l=!1,f=void 0;try{for(var d,p=s[Symbol.iterator]();!(c=(d=p.next()).done);c=!0){var y=d.value.trim();if(y.length>0){var g=a.append("tspan");if(g.text(y),0===u)u+=g.node().getBBox().height;i+=u,g.attr("x",e+h().state.noteMargin),g.attr("y",n+i+1.25*h().state.noteMargin)}}}catch(t){l=!0,f=t}finally{try{c||null==p.return||p.return()}finally{if(l)throw f}}return{textWidth:a.node().getBBox().width,textHeight:i}}(t,0,0,e.append("g")),i=r.textWidth,a=r.textHeight;return n.attr("height",a+2*h().state.noteMargin),n.attr("width",i+2*h().state.noteMargin),n},Br=function(t,e){var n=e.id,r={id:n,label:e.id,width:0,height:0},i=t.append("g").attr("id",n).attr("class","stateGroup");"start"===e.type&&function(t){t.append("circle").style("stroke","black").style("fill","black").attr("r",h().state.sizeUnit).attr("cx",h().state.padding+h().state.sizeUnit).attr("cy",h().state.padding+h().state.sizeUnit)}(i),"end"===e.type&&function(t){t.append("circle").style("stroke","black").style("fill","white").attr("r",h().state.sizeUnit+h().state.miniPadding).attr("cx",h().state.padding+h().state.sizeUnit+h().state.miniPadding).attr("cy",h().state.padding+h().state.sizeUnit+h().state.miniPadding),t.append("circle").style("stroke","black").style("fill","black").attr("r",h().state.sizeUnit).attr("cx",h().state.padding+h().state.sizeUnit+2).attr("cy",h().state.padding+h().state.sizeUnit+2)}(i),"fork"!==e.type&&"join"!==e.type||function(t,e){var n=h().state.forkWidth,r=h().state.forkHeight;if(e.parentId){var i=n;n=r,r=i}t.append("rect").style("stroke","black").style("fill","black").attr("width",n).attr("height",r).attr("x",h().state.padding).attr("y",h().state.padding)}(i,e),"note"===e.type&&Rr(e.note.text,i),"divider"===e.type&&function(t){t.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",h().state.textHeight).attr("class","divider").attr("x2",2*h().state.textHeight).attr("y1",0).attr("y2",0)}(i),"default"===e.type&&0===e.descriptions.length&&function(t,e){var n=t.append("text").attr("x",2*h().state.padding).attr("y",h().state.textHeight+2*h().state.padding).attr("font-size",h().state.fontSize).attr("class","state-title").text(e.id),r=n.node().getBBox();t.insert("rect",":first-child").attr("x",h().state.padding).attr("y",h().state.padding).attr("width",r.width+2*h().state.padding).attr("height",r.height+2*h().state.padding).attr("rx",h().state.radius)}(i,e),"default"===e.type&&e.descriptions.length>0&&Ir(i,e);var a=i.node().getBBox();return r.width=a.width+2*h().state.padding,r.height=a.height+2*h().state.padding,Fr(n,r),r},jr=0;Cr.parser.yy=Nr;var Yr={},zr=function t(e,n,r,i){var o,s=new P.a.Graph({compound:!0,multigraph:!0}),u=!0;for(o=0;o<e.length;o++)if("relation"===e[o].stmt){u=!1;break}r?s.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:u?1:vr.edgeLengthFactor,nodeSep:u?1:50,isMultiGraph:!0}):s.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:u?1:vr.edgeLengthFactor,nodeSep:u?1:50,ranker:"tight-tree",isMultiGraph:!0}),s.setDefaultEdgeLabel((function(){return{}})),Nr.extract(e);for(var c=Nr.getStates(),l=Nr.getRelations(),f=Object.keys(c),d=0;d<f.length;d++){var p=c[f[d]];r&&(p.parentId=r);var y=void 0;if(p.doc){var g=n.append("g").attr("id",p.id).attr("class","stateGroup");y=t(p.doc,g,p.id,!i);var m=(g=Pr(g,p,i)).node().getBBox();y.width=m.width,y.height=m.height+vr.padding/2,Yr[p.id]={y:vr.compositTitleSize}}else y=Br(n,p);if(p.note){var v={descriptions:[],id:p.id+"-note",note:p.note,type:"note"},b=Br(n,v);"left of"===p.note.position?(s.setNode(y.id+"-note",b),s.setNode(y.id,y)):(s.setNode(y.id,y),s.setNode(y.id+"-note",b)),s.setParent(y.id,y.id+"-group"),s.setParent(y.id+"-note",y.id+"-group")}else s.setNode(y.id,y)}x.debug("Count=",s.nodeCount(),s);var _=0;l.forEach((function(t){var e;_++,x.debug("Setting edge",t),s.setEdge(t.id1,t.id2,{relation:t,width:(e=t.title,e?e.length*vr.fontSizeFactor:1),height:vr.labelHeight*Y(t.title).length,labelpos:"c"},"id"+_)})),It.a.layout(s),x.debug("Graph after layout",s.nodes());var w=n.node();s.nodes().forEach((function(t){void 0!==t&&void 0!==s.node(t)?(x.warn("Node "+t+": "+JSON.stringify(s.node(t))),Object(a.select)("#"+w.id+" #"+t).attr("transform","translate("+(s.node(t).x-s.node(t).width/2)+","+(s.node(t).y+(Yr[t]?Yr[t].y:0)-s.node(t).height/2)+" )"),Object(a.select)("#"+w.id+" #"+t).attr("data-x-shift",s.node(t).x-s.node(t).width/2),document.querySelectorAll("#"+w.id+" #"+t+" .divider").forEach((function(t){var e=t.parentElement,n=0,r=0;e&&(e.parentElement&&(n=e.parentElement.getBBox().width),r=parseInt(e.getAttribute("data-x-shift"),10),Number.isNaN(r)&&(r=0)),t.setAttribute("x1",0-r+8),t.setAttribute("x2",n-r-8)}))):x.debug("No Node "+t+": "+JSON.stringify(s.node(t)))}));var k=w.getBBox();s.edges().forEach((function(t){void 0!==t&&void 0!==s.edge(t)&&(x.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(s.edge(t))),function(t,e,n){e.points=e.points.filter((function(t){return!Number.isNaN(t.y)}));var r=e.points,i=Object(a.line)().x((function(t){return t.x})).y((function(t){return t.y})).curve(a.curveBasis),o=t.append("path").attr("d",i(r)).attr("id","edge"+jr).attr("class","transition"),s="";if(h().state.arrowMarkerAbsolute&&(s=(s=(s=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),o.attr("marker-end","url("+s+"#"+function(t){switch(t){case Nr.relationType.AGGREGATION:return"aggregation";case Nr.relationType.EXTENSION:return"extension";case Nr.relationType.COMPOSITION:return"composition";case Nr.relationType.DEPENDENCY:return"dependency"}}(Nr.relationType.DEPENDENCY)+"End)"),void 0!==n.title){for(var u=t.append("g").attr("class","stateLabel"),c=D(e.points),l=c.x,f=c.y,d=Y(n.title),p=0,y=[],g=0,m=0,v=0;v<=d.length;v++){var b=u.append("text").attr("text-anchor","middle").text(d[v]).attr("x",l).attr("y",f+p),_=b.node().getBBox();if(g=Math.max(g,_.width),m=Math.min(m,_.x),x.info(_.x,l,f+p),0===p){var w=b.node().getBBox();p=w.height,x.info("Title height",p,f)}y.push(b)}var k=p*d.length;if(d.length>1){var E=(d.length-1)*p*.5;y.forEach((function(t,e){return t.attr("y",f+e*p-E)})),k=p*d.length}var A=u.node().getBBox();u.insert("rect",":first-child").attr("class","box").attr("x",l-g/2-h().state.padding/2).attr("y",f-k/2-h().state.padding/2-3.5).attr("width",g+h().state.padding).attr("height",k+h().state.padding),x.info(A)}jr++}(n,s.edge(t),s.edge(t).relation))})),k=w.getBBox();var E={id:r||"root",label:r||"root",width:0,height:0};return E.width=k.width+2*vr.padding,E.height=k.height+2*vr.padding,x.debug("Doc rendered",E,s),E},Ur=function(){},$r=function(t,e){vr=h().state,Cr.parser.yy.clear(),Cr.parser.parse(t),x.debug("Rendering diagram "+t);var n=Object(a.select)("[id='".concat(e,"']"));n.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z"),new P.a.Graph({multigraph:!0,compound:!0,rankdir:"RL"}).setDefaultEdgeLabel((function(){return{}}));var r=Nr.getRootDoc();zr(r,n,void 0,!1);var i=vr.padding,o=n.node().getBBox(),s=o.width+2*i,u=o.height+2*i;vr.useMaxWidth?(n.attr("width","100%"),n.attr("style","max-width: ".concat(1.75*s,"px;"))):n.attr("width",1.75*s),n.attr("viewBox","".concat(o.x-vr.padding," ").concat(o.y-vr.padding," ")+s+" "+u)},Gr={},Vr={},Hr=function(t,e,n,r){if("root"!==n.id){var i="rect";!0===n.start&&(i="start"),!1===n.start&&(i="end"),"default"!==n.type&&(i=n.type),Vr[n.id]||(Vr[n.id]={id:n.id,shape:i,description:n.id,classes:"statediagram-state"}),n.description&&(Array.isArray(Vr[n.id].description)?(Vr[n.id].shape="rectWithTitle",Vr[n.id].description.push(n.description)):Vr[n.id].description.length>0?(Vr[n.id].shape="rectWithTitle",Vr[n.id].description===n.id?Vr[n.id].description=[n.description]:Vr[n.id].description=[Vr[n.id].description,n.description]):(Vr[n.id].shape="rect",Vr[n.id].description=n.description)),!Vr[n.id].type&&n.doc&&(x.info("Setting cluser for ",n.id),Vr[n.id].type="group",Vr[n.id].shape="divider"===n.type?"divider":"roundedWithTitle",Vr[n.id].classes=Vr[n.id].classes+" "+(r?"statediagram-cluster statediagram-cluster-alt":"statediagram-cluster"));var a={labelStyle:"",shape:Vr[n.id].shape,labelText:Vr[n.id].description,classes:Vr[n.id].classes,style:"",id:n.id,type:Vr[n.id].type,padding:15};if(n.note){var o={labelStyle:"",shape:"note",labelText:n.note.text,classes:"statediagram-note",style:"",id:n.id+"----note",type:Vr[n.id].type,padding:15},s={labelStyle:"",shape:"noteGroup",labelText:n.note.text,classes:Vr[n.id].classes,style:"",id:n.id+"----parent",type:"group",padding:0};t.setNode(n.id+"----parent",s),t.setNode(o.id,o),t.setNode(n.id,a),t.setParent(n.id,n.id+"----parent"),t.setParent(o.id,n.id+"----parent");var u=n.id,c=o.id;"left of"===n.note.position&&(u=o.id,c=n.id),t.setEdge(u,c,{arrowhead:"none",arrowType:"",style:"fill:none",labelStyle:"",classes:"note-edge",arrowheadStyle:"fill: #333",labelpos:"c",labelType:"text"})}else t.setNode(n.id,a)}e&&"root"!==e.id&&(x.info("Setting node ",n.id," to be child of its parent ",e.id),t.setParent(n.id,e.id)),n.doc&&(x.info("Adding nodes children "),qr(t,n,n.doc,!r))},Wr=0,qr=function(t,e,n,r){x.trace("items",n),n.forEach((function(n){if("state"===n.stmt||"default"===n.stmt)Hr(t,e,n,r);else if("relation"===n.stmt){Hr(t,e,n.state1,r),Hr(t,e,n.state2,r);var i={id:"edge"+Wr,arrowhead:"normal",arrowType:"arrow_barb",style:"fill:none",labelStyle:"",label:n.description,arrowheadStyle:"fill: #333",labelpos:"c",labelType:"text"},a=n.state1.id,o=n.state2.id;t.setEdge(a,o,i,Wr),Wr++}}))},Xr=function(t){for(var e=Object.keys(t),n=0;n<e.length;n++)Gr[e[n]]=t[e[n]]},Zr=function(t,e){x.info("Drawing state diagram (v2)",e),Nr.clear();var n=Dr.a.parser;n.yy=Nr;try{n.parse(t)}catch(t){x.debug("Parsing failed")}var r=Nr.getDirection();void 0===r&&(r="LR");var i=h().state,o=i.nodeSpacing||50,s=i.rankSpacing||50,u=new P.a.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:"TB",nodesep:o,ranksep:s,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}}));x.info(Nr.getRootDocV2()),Nr.extract(Nr.getRootDocV2()),x.info(Nr.getRootDocV2()),Hr(u,void 0,Nr.getRootDocV2(),!0);var c=Object(a.select)('[id="'.concat(e,'"]')),l=Object(a.select)("#"+e+" g");ye(l,u,["barb"],"statediagram",e);var f=c.node().getBBox(),d=f.width+16,p=f.height+16;c.attr("width",1.75*d),c.attr("class","statediagram");var y=c.node().getBBox();i.useMaxWidth?(c.attr("width","100%"),c.attr("style","max-width: ".concat(d,"px;"))):(c.attr("height",p),c.attr("width",d));var g="".concat(y.x-8," ").concat(y.y-8," ").concat(d," ").concat(p);if(x.debug("viewBox ".concat(g)),c.attr("viewBox",g),!i.htmlLabels)for(var m=document.querySelectorAll('[id="'+e+'"] .edgeLabel .label'),v=0;v<m.length;v++){var b=m[v],_=b.getBBox(),w=document.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("rx",0),w.setAttribute("ry",0),w.setAttribute("width",_.width),w.setAttribute("height",_.height),w.setAttribute("style","fill:#e8e8e8;"),b.insertBefore(w,b.firstChild)}},Jr={},Qr=null,Kr={master:Qr},ti="master",ei="LR",ni=0;function ri(){return function(t){for(var e="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",r=n.length,i=0;i<t;i++)e+=n.charAt(Math.floor(Math.random()*r));return e}(7)}function ii(t,e){for(x.debug("Entering isfastforwardable:",t.id,e.id);t.seq<=e.seq&&t!==e&&null!=e.parent;){if(Array.isArray(e.parent))return x.debug("In merge commit:",e.parent),ii(t,Jr[e.parent[0]])||ii(t,Jr[e.parent[1]]);e=Jr[e.parent]}return x.debug(t.id,e.id),t.id===e.id}var ai={};function oi(t,e,n){var r=t.indexOf(e);-1===r?t.push(n):t.splice(r,1,n)}function si(t){var e=t.reduce((function(t,e){return t.seq>e.seq?t:e}),t[0]),n="";t.forEach((function(t){n+=t===e?"\t*":"\t|"}));var r,i,a,o=[n,e.id,e.seq];for(var s in Kr)Kr[s]===e.id&&o.push(s);if(x.debug(o.join(" ")),Array.isArray(e.parent)){var u=Jr[e.parent[0]];oi(t,e,u),t.push(Jr[e.parent[1]])}else{if(null==e.parent)return;var c=Jr[e.parent];oi(t,e,c)}r=t,i=function(t){return t.id},a=Object.create(null),si(t=r.reduce((function(t,e){var n=i(e);return a[n]||(a[n]=!0,t.push(e)),t}),[]))}var ui,ci=function(){var t=Object.keys(Jr).map((function(t){return Jr[t]}));return t.forEach((function(t){x.debug(t.id)})),t.sort((function(t,e){return e.seq-t.seq})),t},li={setDirection:function(t){ei=t},setOptions:function(t){x.debug("options str",t),t=(t=t&&t.trim())||"{}";try{ai=JSON.parse(t)}catch(t){x.error("error while parsing gitGraph options",t.message)}},getOptions:function(){return ai},commit:function(t){var e={id:ri(),message:t,seq:ni++,parent:null==Qr?null:Qr.id};Qr=e,Jr[e.id]=e,Kr[ti]=e.id,x.debug("in pushCommit "+e.id)},branch:function(t){Kr[t]=null!=Qr?Qr.id:null,x.debug("in createBranch")},merge:function(t){var e=Jr[Kr[ti]],n=Jr[Kr[t]];if(function(t,e){return t.seq>e.seq&&ii(e,t)}(e,n))x.debug("Already merged");else{if(ii(e,n))Kr[ti]=Kr[t],Qr=Jr[Kr[ti]];else{var r={id:ri(),message:"merged branch "+t+" into "+ti,seq:ni++,parent:[null==Qr?null:Qr.id,Kr[t]]};Qr=r,Jr[r.id]=r,Kr[ti]=r.id}x.debug(Kr),x.debug("in mergeBranch")}},checkout:function(t){x.debug("in checkout");var e=Kr[ti=t];Qr=Jr[e]},reset:function(t){x.debug("in reset",t);var e=t.split(":")[0],n=parseInt(t.split(":")[1]),r="HEAD"===e?Qr:Jr[Kr[e]];for(x.debug(r,n);n>0;)if(n--,!(r=Jr[r.parent])){var i="Critical error - unique parent commit not found during reset";throw x.error(i),i}Qr=r,Kr[ti]=r.id},prettyPrint:function(){x.debug(Jr),si([ci()[0]])},clear:function(){Jr={},Kr={master:Qr=null},ti="master",ni=0},getBranchesAsObjArray:function(){var t=[];for(var e in Kr)t.push({name:e,commit:Jr[Kr[e]]});return t},getBranches:function(){return Kr},getCommits:function(){return Jr},getCommitsArray:ci,getCurrentBranch:function(){return ti},getDirection:function(){return ei},getHead:function(){return Qr}},fi=n(64),hi=n.n(fi),di={},pi={nodeSpacing:150,nodeFillColor:"yellow",nodeStrokeWidth:2,nodeStrokeColor:"grey",lineStrokeWidth:4,branchOffset:50,lineColor:"grey",leftMargin:50,branchColors:["#442f74","#983351","#609732","#AA9A39"],nodeRadius:10,nodeLabel:{width:75,height:100,x:-25,y:0}},yi={};function gi(t,e,n,r){var i=A(r,a.curveBasis),o=pi.branchColors[n%pi.branchColors.length],s=Object(a.line)().x((function(t){return Math.round(t.x)})).y((function(t){return Math.round(t.y)})).curve(i);t.append("svg:path").attr("d",s(e)).style("stroke",o).style("stroke-width",pi.lineStrokeWidth).style("fill","none")}function mi(t,e){e=e||t.node().getBBox();var n=t.node().getCTM();return{left:n.e+e.x*n.a,top:n.f+e.y*n.d,width:e.width,height:e.height}}function vi(t,e,n,r,i){x.debug("svgDrawLineForCommits: ",e,n);var a=mi(t.select("#node-"+e+" circle")),o=mi(t.select("#node-"+n+" circle"));switch(r){case"LR":if(a.left-o.left>pi.nodeSpacing){var s={x:a.left-pi.nodeSpacing,y:o.top+o.height/2};gi(t,[s,{x:o.left+o.width,y:o.top+o.height/2}],i,"linear"),gi(t,[{x:a.left,y:a.top+a.height/2},{x:a.left-pi.nodeSpacing/2,y:a.top+a.height/2},{x:a.left-pi.nodeSpacing/2,y:s.y},s],i)}else gi(t,[{x:a.left,y:a.top+a.height/2},{x:a.left-pi.nodeSpacing/2,y:a.top+a.height/2},{x:a.left-pi.nodeSpacing/2,y:o.top+o.height/2},{x:o.left+o.width,y:o.top+o.height/2}],i);break;case"BT":if(o.top-a.top>pi.nodeSpacing){var u={x:o.left+o.width/2,y:a.top+a.height+pi.nodeSpacing};gi(t,[u,{x:o.left+o.width/2,y:o.top}],i,"linear"),gi(t,[{x:a.left+a.width/2,y:a.top+a.height},{x:a.left+a.width/2,y:a.top+a.height+pi.nodeSpacing/2},{x:o.left+o.width/2,y:u.y-pi.nodeSpacing/2},u],i)}else gi(t,[{x:a.left+a.width/2,y:a.top+a.height},{x:a.left+a.width/2,y:a.top+pi.nodeSpacing/2},{x:o.left+o.width/2,y:o.top-pi.nodeSpacing/2},{x:o.left+o.width/2,y:o.top}],i)}}function bi(t,e){return t.select(e).node().cloneNode(!0)}function xi(t,e,n,r){var i,a=Object.keys(di).length;if("string"==typeof e)do{if(i=di[e],x.debug("in renderCommitHistory",i.id,i.seq),t.select("#node-"+e).size()>0)return;t.append((function(){return bi(t,"#def-commit")})).attr("class","commit").attr("id",(function(){return"node-"+i.id})).attr("transform",(function(){switch(r){case"LR":return"translate("+(i.seq*pi.nodeSpacing+pi.leftMargin)+", "+ui*pi.branchOffset+")";case"BT":return"translate("+(ui*pi.branchOffset+pi.leftMargin)+", "+(a-i.seq)*pi.nodeSpacing+")"}})).attr("fill",pi.nodeFillColor).attr("stroke",pi.nodeStrokeColor).attr("stroke-width",pi.nodeStrokeWidth);var o=void 0;for(var s in n)if(n[s].commit===i){o=n[s];break}o&&(x.debug("found branch ",o.name),t.select("#node-"+i.id+" p").append("xhtml:span").attr("class","branch-label").text(o.name+", ")),t.select("#node-"+i.id+" p").append("xhtml:span").attr("class","commit-id").text(i.id),""!==i.message&&"BT"===r&&t.select("#node-"+i.id+" p").append("xhtml:span").attr("class","commit-msg").text(", "+i.message),e=i.parent}while(e&&di[e]);Array.isArray(e)&&(x.debug("found merge commmit",e),xi(t,e[0],n,r),ui++,xi(t,e[1],n,r),ui--)}function _i(t,e,n,r){for(r=r||0;e.seq>0&&!e.lineDrawn;)"string"==typeof e.parent?(vi(t,e.id,e.parent,n,r),e.lineDrawn=!0,e=di[e.parent]):Array.isArray(e.parent)&&(vi(t,e.id,e.parent[0],n,r),vi(t,e.id,e.parent[1],n,r+1),_i(t,di[e.parent[1]],n,r+1),e.lineDrawn=!0,e=di[e.parent[0]])}var wi,ki=function(t){yi=t},Ei=function(t,e,n){try{var r=hi.a.parser;r.yy=li,r.yy.clear(),x.debug("in gitgraph renderer",t+"\n","id:",e,n),r.parse(t+"\n"),pi=Object.assign(pi,yi,li.getOptions()),x.debug("effective options",pi);var i=li.getDirection();di=li.getCommits();var o=li.getBranchesAsObjArray();"BT"===i&&(pi.nodeLabel.x=o.length*pi.branchOffset,pi.nodeLabel.width="100%",pi.nodeLabel.y=-2*pi.nodeRadius);var s=Object(a.select)('[id="'.concat(e,'"]'));for(var u in function(t){t.append("defs").append("g").attr("id","def-commit").append("circle").attr("r",pi.nodeRadius).attr("cx",0).attr("cy",0),t.select("#def-commit").append("foreignObject").attr("width",pi.nodeLabel.width).attr("height",pi.nodeLabel.height).attr("x",pi.nodeLabel.x).attr("y",pi.nodeLabel.y).attr("class","node-label").attr("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility").append("p").html("")}(s),ui=1,o){var c=o[u];xi(s,c.commit.id,o,i),_i(s,c.commit,i),ui++}s.attr("height",(function(){return"BT"===i?Object.keys(di).length*pi.nodeSpacing:(o.length+1)*pi.branchOffset}))}catch(t){x.error("Error while rendering gitgraph"),x.error(t.message)}},Ai="",Ti=!1,Si={setMessage:function(t){x.debug("Setting message to: "+t),Ai=t},getMessage:function(){return Ai},setInfo:function(t){Ti=t},getInfo:function(){return Ti}},Mi=n(65),Oi=n.n(Mi),Ni={},Ci=function(t){Object.keys(t).forEach((function(e){Ni[e]=t[e]}))},Di=function(t,e,n){try{var r=Oi.a.parser;r.yy=Si,x.debug("Renering info diagram\n"+t),r.parse(t),x.debug("Parsed info diagram");var i=Object(a.select)("#"+e);i.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size","32px").style("text-anchor","middle").text("v "+n),i.attr("height",100),i.attr("width",400)}catch(t){x.error("Error while rendering info diagram"),x.error(t.message)}},Li={},Fi="",Ii={addSection:function(t,e){void 0===Li[t]&&(Li[t]=e,x.debug("Added new section :",t))},getSections:function(){return Li},cleanupValue:function(t){return":"===t.substring(0,1)?(t=t.substring(1).trim(),Number(t.trim())):Number(t.trim())},clear:function(){Li={},Fi=""},setTitle:function(t){Fi=t},getTitle:function(){return Fi}},Pi=n(66),Ri=n.n(Pi),Bi={},ji=function(t){Object.keys(t).forEach((function(e){Bi[e]=t[e]}))},Yi=function(t,e){try{var n=Ri.a.parser;n.yy=Ii,x.debug("Rendering info diagram\n"+t),n.yy.clear(),n.parse(t),x.debug("Parsed info diagram");var r=document.getElementById(e);void 0===(wi=r.parentElement.offsetWidth)&&(wi=1200),void 0!==Bi.useWidth&&(wi=Bi.useWidth);r.setAttribute("height","100%"),r.setAttribute("viewBox","0 0 "+wi+" 450");var i=wi,o=Math.min(i,450)/2-40,s=Object(a.select)("#"+e).append("svg").attr("width",i).attr("height",450).append("g").attr("transform","translate("+i/2+",225)"),u=Ii.getSections(),c=0;Object.keys(u).forEach((function(t){c+=u[t]})),x.info(u);var l=Object(a.scaleOrdinal)().domain(u).range(a.schemeSet2),f=Object(a.pie)().value((function(t){return t.value}))(Object(a.entries)(u)),h=Object(a.arc)().innerRadius(0).outerRadius(o);s.selectAll("mySlices").data(f).enter().append("path").attr("d",h).attr("fill",(function(t){return l(t.data.key)})).attr("stroke","black").style("stroke-width","2px").style("opacity",.7),s.selectAll("mySlices").data(f).enter().append("text").text((function(t){return(t.data.value/c*100).toFixed(0)+"%"})).attr("transform",(function(t){return"translate("+h.centroid(t)+")"})).style("text-anchor","middle").attr("class","slice").style("font-size",17),s.append("text").text(n.yy.getTitle()).attr("x",0).attr("y",-200).attr("class","pieTitleText");var d=s.selectAll(".legend").data(l.domain()).enter().append("g").attr("class","legend").attr("transform",(function(t,e){return"translate(216,"+(22*e-22*l.domain().length/2)+")"}));d.append("rect").attr("width",18).attr("height",18).style("fill",l).style("stroke",l),d.append("text").attr("x",22).attr("y",14).text((function(t){return t}))}catch(t){x.error("Error while rendering info diagram"),x.error(t.message)}},zi={},Ui=[],$i="",Gi={Cardinality:{ZERO_OR_ONE:"ZERO_OR_ONE",ZERO_OR_MORE:"ZERO_OR_MORE",ONE_OR_MORE:"ONE_OR_MORE",ONLY_ONE:"ONLY_ONE"},Identification:{NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},addEntity:function(t){void 0===zi[t]&&(zi[t]=t,x.debug("Added new entity :",t))},getEntities:function(){return zi},addRelationship:function(t,e,n,r){var i={entityA:t,roleA:e,entityB:n,relSpec:r};Ui.push(i),x.debug("Added new relationship :",i)},getRelationships:function(){return Ui},clear:function(){zi={},Ui=[],$i=""},setTitle:function(t){$i=t},getTitle:function(){return $i}},Vi=n(67),Hi=n.n(Vi),Wi={ONLY_ONE_START:"ONLY_ONE_START",ONLY_ONE_END:"ONLY_ONE_END",ZERO_OR_ONE_START:"ZERO_OR_ONE_START",ZERO_OR_ONE_END:"ZERO_OR_ONE_END",ONE_OR_MORE_START:"ONE_OR_MORE_START",ONE_OR_MORE_END:"ONE_OR_MORE_END",ZERO_OR_MORE_START:"ZERO_OR_MORE_START",ZERO_OR_MORE_END:"ZERO_OR_MORE_END"},qi=Wi,Xi=function(t,e){var n;t.append("defs").append("marker").attr("id",Wi.ONLY_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M9,0 L9,18 M15,0 L15,18"),t.append("defs").append("marker").attr("id",Wi.ONLY_ONE_END).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M3,0 L3,18 M9,0 L9,18"),(n=t.append("defs").append("marker").attr("id",Wi.ZERO_OR_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto")).append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),n.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M9,0 L9,18"),(n=t.append("defs").append("marker").attr("id",Wi.ZERO_OR_ONE_END).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto")).append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),n.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M21,0 L21,18"),t.append("defs").append("marker").attr("id",Wi.ONE_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),t.append("defs").append("marker").attr("id",Wi.ONE_OR_MORE_END).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18"),(n=t.append("defs").append("marker").attr("id",Wi.ZERO_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto")).append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),n.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18"),(n=t.append("defs").append("marker").attr("id",Wi.ZERO_OR_MORE_END).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto")).append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),n.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},Zi={},Ji=function(t){return(t.entityA+t.roleA+t.entityB).replace(/\s/g,"")},Qi=0,Ki=function(t){for(var e=Object.keys(t),n=0;n<e.length;n++)Zi[e[n]]=t[e[n]]},ta=function(t,e){x.info("Drawing ER diagram"),Gi.clear();var n=Hi.a.parser;n.yy=Gi;try{n.parse(t)}catch(t){x.debug("Parsing failed")}var r,i=Object(a.select)("[id='".concat(e,"']"));Xi(i,Zi),r=new P.a.Graph({multigraph:!0,directed:!0,compound:!1}).setGraph({rankdir:Zi.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel((function(){return{}}));var o,s,u,c,l=(o=i,s=Gi.getEntities(),u=r,Object.keys(s).forEach((function(t){var e=o.append("g").attr("id",t);c=void 0===c?t:c;var n="entity-"+t,r=e.append("text").attr("id",n).attr("x",0).attr("y",0).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("style","font-family: "+h().fontFamily+"; font-size: "+Zi.fontSize+"px").text(t),i=r.node().getBBox(),a=Math.max(Zi.minEntityWidth,i.width+2*Zi.entityPadding),s=Math.max(Zi.minEntityHeight,i.height+2*Zi.entityPadding);r.attr("transform","translate("+a/2+","+s/2+")");var l=e.insert("rect","#"+n).attr("fill",Zi.fill).attr("fill-opacity","100%").attr("stroke",Zi.stroke).attr("x",0).attr("y",0).attr("width",a).attr("height",s).node().getBBox();u.setNode(t,{width:l.width,height:l.height,shape:"rect",id:t})})),c),f=function(t,e){return t.forEach((function(t){e.setEdge(t.entityA,t.entityB,{relationship:t},Ji(t))})),t}(Gi.getRelationships(),r);It.a.layout(r),function(t,e){e.nodes().forEach((function(n){void 0!==n&&void 0!==e.node(n)&&t.select("#"+n).attr("transform","translate("+(e.node(n).x-e.node(n).width/2)+","+(e.node(n).y-e.node(n).height/2)+" )")}))}(i,r),f.forEach((function(t){!function(t,e,n,r){Qi++;var i=n.edge(e.entityA,e.entityB,Ji(e)),o=Object(a.line)().x((function(t){return t.x})).y((function(t){return t.y})).curve(a.curveBasis),s=t.insert("path","#"+r).attr("d",o(i.points)).attr("stroke",Zi.stroke).attr("fill","none");e.relSpec.relType===Gi.Identification.NON_IDENTIFYING&&s.attr("stroke-dasharray","8,8");var u="";switch(Zi.arrowMarkerAbsolute&&(u=(u=(u=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),e.relSpec.cardA){case Gi.Cardinality.ZERO_OR_ONE:s.attr("marker-end","url("+u+"#"+qi.ZERO_OR_ONE_END+")");break;case Gi.Cardinality.ZERO_OR_MORE:s.attr("marker-end","url("+u+"#"+qi.ZERO_OR_MORE_END+")");break;case Gi.Cardinality.ONE_OR_MORE:s.attr("marker-end","url("+u+"#"+qi.ONE_OR_MORE_END+")");break;case Gi.Cardinality.ONLY_ONE:s.attr("marker-end","url("+u+"#"+qi.ONLY_ONE_END+")")}switch(e.relSpec.cardB){case Gi.Cardinality.ZERO_OR_ONE:s.attr("marker-start","url("+u+"#"+qi.ZERO_OR_ONE_START+")");break;case Gi.Cardinality.ZERO_OR_MORE:s.attr("marker-start","url("+u+"#"+qi.ZERO_OR_MORE_START+")");break;case Gi.Cardinality.ONE_OR_MORE:s.attr("marker-start","url("+u+"#"+qi.ONE_OR_MORE_START+")");break;case Gi.Cardinality.ONLY_ONE:s.attr("marker-start","url("+u+"#"+qi.ONLY_ONE_START+")")}var c=s.node().getTotalLength(),l=s.node().getPointAtLength(.5*c),f="rel"+Qi,d=t.append("text").attr("id",f).attr("x",l.x).attr("y",l.y).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("style","font-family: "+h().fontFamily+"; font-size: "+Zi.fontSize+"px").text(e.roleA).node().getBBox();t.insert("rect","#"+f).attr("x",l.x-d.width/2).attr("y",l.y-d.height/2).attr("width",d.width).attr("height",d.height).attr("fill","white").attr("fill-opacity","85%")}(i,t,r,l)}));var d=Zi.diagramPadding,p=i.node().getBBox(),y=p.width+2*d,g=p.height+2*d;i.attr("height",g),i.attr("width","100%"),i.attr("style","max-width: ".concat(y,"px;")),i.attr("viewBox","".concat(p.x-d," ").concat(p.y-d," ").concat(y," ").concat(g))},ea=n(24),na=n.n(ea);function ra(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var ia="",aa="",oa=[],sa=[],ua=[],ca=function(){for(var t=!0,e=0;e<ua.length;e++)ua[e].processed,t=t&&ua[e].processed;return t},la={clear:function(){oa.length=0,sa.length=0,aa="",ia="",ua.length=0},setTitle:function(t){ia=t},getTitle:function(){return ia},addSection:function(t){aa=t,oa.push(t)},getSections:function(){return oa},getTasks:function(){for(var t=ca(),e=0;!t&&e<100;)t=ca(),e++;return sa.push.apply(sa,ua),sa},addTask:function(t,e){var n=e.substr(1).split(":"),r=0,i=[];1===n.length?(r=Number(n[0]),i=[]):(r=Number(n[0]),i=n[1].split(","));var a=i.map((function(t){return t.trim()})),o={section:aa,type:aa,people:a,task:t,score:r};ua.push(o)},addTaskOrg:function(t){var e={section:aa,type:aa,description:t,task:t,classes:[]};sa.push(e)},getActors:function(){return t=[],sa.forEach((function(e){e.people&&t.push.apply(t,ra(e.people))})),ra(new Set(t)).sort();var t}},fa=function(t,e){var n=t.append("rect");return n.attr("x",e.x),n.attr("y",e.y),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("width",e.width),n.attr("height",e.height),n.attr("rx",e.rx),n.attr("ry",e.ry),void 0!==e.class&&n.attr("class",e.class),n},ha=function(t,e){var n=t.append("circle");return n.attr("cx",e.cx),n.attr("cy",e.cy),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("r",e.r),void 0!==n.class&&n.attr("class",n.class),void 0!==e.title&&n.append("title").text(e.title),n},da=function(t,e){var n=e.text.replace(/<br\s*\/?>/gi," "),r=t.append("text");r.attr("x",e.x),r.attr("y",e.y),r.attr("fill",e.fill),r.style("text-anchor",e.anchor),void 0!==e.class&&r.attr("class",e.class);var i=r.append("tspan");return i.attr("x",e.x+2*e.textMargin),i.text(n),r},pa=-1,ya=function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},ga=function(){function t(t,e,n,i,a,o,s,u){r(e.append("text").attr("x",n+a/2).attr("y",i+o/2+5).style("font-color",u).style("text-anchor","middle").text(t),s)}function e(t,e,n,i,a,o,s,u,c){for(var l=u.taskFontSize,f=u.taskFontFamily,h=t.split(/<br\s*\/?>/gi),d=0;d<h.length;d++){var p=d*l-l*(h.length-1)/2,y=e.append("text").attr("x",n+a/2).attr("y",i).attr("fill",c).style("text-anchor","middle").style("font-size",l).style("font-family",f);y.append("tspan").attr("x",n+a/2).attr("dy",p).text(h[d]),y.attr("y",i+o/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),r(y,s)}}function n(t,n,i,a,o,s,u,c,l){var f=n.append("switch"),h=f.append("foreignObject").attr("x",i).attr("y",a).attr("width",o).attr("height",s).attr("position","fixed").append("div").style("display","table").style("height","100%").style("width","100%");h.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").style("color",l).text(t),e(t,f,i,a,o,s,u,c),r(h,u)}function r(t,e){for(var n in e)n in e&&t.attr(n,e[n])}return function(r){return"fo"===r.textPlacement?n:"old"===r.textPlacement?t:e}}(),ma=ha,va=function(t,e,n){var r=t.append("g"),i=ya();i.x=e.x,i.y=e.y,i.fill=e.fill,i.width=n.width,i.height=n.height,i.class="journey-section",i.rx=3,i.ry=3,fa(r,i),ga(n)(e.text,r,i.x,i.y,i.width,i.height,{class:"journey-section"},n,e.colour)},ba=da,xa=function(t,e,n){var r=e.x+n.width/2,i=t.append("g");pa++;var o,s,u;i.append("line").attr("id","task"+pa).attr("x1",r).attr("y1",e.y).attr("x2",r).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),o=i,s={cx:r,cy:300+30*(5-e.score),score:e.score},o.append("circle").attr("cx",s.cx).attr("cy",s.cy).attr("fill","#FFF8DC").attr("stroke","#999").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),(u=o.append("g")).append("circle").attr("cx",s.cx-5).attr("cy",s.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),u.append("circle").attr("cx",s.cx+5).attr("cy",s.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),s.score>3?function(t){var e=Object(a.arc)().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(7.5).outerRadius(15/2.2);t.append("path").attr("d",e).attr("transform","translate("+s.cx+","+(s.cy+2)+")")}(u):s.score<3?function(t){var e=Object(a.arc)().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(7.5).outerRadius(15/2.2);t.append("path").attr("d",e).attr("transform","translate("+s.cx+","+(s.cy+7)+")")}(u):function(t){t.append("line").attr("stroke",2).attr("x1",s.cx-5).attr("y1",s.cy+7).attr("x2",s.cx+5).attr("y2",s.cy+7).attr("class","task-line").attr("stroke-width","1px").attr("stroke","#666")}(u);var c=ya();c.x=e.x,c.y=e.y,c.fill=e.fill,c.width=n.width,c.height=n.height,c.class="task",c.rx=3,c.ry=3,fa(i,c);var l=e.x+14;e.people.forEach((function(t){var n=e.actors[t],r={cx:l,cy:e.y,r:7,fill:n,stroke:"#000",title:t};ha(i,r),l+=10})),ga(n)(e.task,i,c.x,c.y,c.width,c.height,{class:"task"},n,e.colour)},_a=function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")};ea.parser.yy=la;var wa={leftMargin:150,diagramMarginX:50,diagramMarginY:20,taskMargin:50,width:150,height:50,taskFontSize:14,taskFontFamily:'"Open-Sans", "sans-serif"',boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"]},ka={};var Ea=wa.leftMargin,Aa={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},updateVal:function(t,e,n,r){void 0===t[e]?t[e]=n:t[e]=r(n,t[e])},updateBounds:function(t,e,n,r){var i,a=this,o=0;this.sequenceItems.forEach((function(s){o++;var u=a.sequenceItems.length-o+1;a.updateVal(s,"starty",e-u*wa.boxMargin,Math.min),a.updateVal(s,"stopy",r+u*wa.boxMargin,Math.max),a.updateVal(Aa.data,"startx",t-u*wa.boxMargin,Math.min),a.updateVal(Aa.data,"stopx",n+u*wa.boxMargin,Math.max),"activation"!==i&&(a.updateVal(s,"startx",t-u*wa.boxMargin,Math.min),a.updateVal(s,"stopx",n+u*wa.boxMargin,Math.max),a.updateVal(Aa.data,"starty",e-u*wa.boxMargin,Math.min),a.updateVal(Aa.data,"stopy",r+u*wa.boxMargin,Math.max))}))},insert:function(t,e,n,r){var i=Math.min(t,n),a=Math.max(t,n),o=Math.min(e,r),s=Math.max(e,r);this.updateVal(Aa.data,"startx",i,Math.min),this.updateVal(Aa.data,"starty",o,Math.min),this.updateVal(Aa.data,"stopx",a,Math.max),this.updateVal(Aa.data,"stopy",s,Math.max),this.updateBounds(i,o,a,s)},bumpVerticalPos:function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},getVerticalPos:function(){return this.verticalPos},getBounds:function(){return this.data}},Ta=wa.sectionFills,Sa=wa.sectionColours,Ma=function(t,e,n){for(var r="",i=n+(2*wa.height+wa.diagramMarginY),a=0,o="#CCC",s="black",u=0;u<e.length;u++){var c=e[u];if(r!==c.section){o=Ta[a%Ta.length],s=Sa[a%Sa.length];var l={x:u*wa.taskMargin+u*wa.width+Ea,y:50,text:c.section,fill:o,colour:s};va(t,l,wa),r=c.section,a++}var f=c.people.reduce((function(t,e){return ka[e]&&(t[e]=ka[e]),t}),{});c.x=u*wa.taskMargin+u*wa.width+Ea,c.y=i,c.width=wa.diagramMarginX,c.height=wa.diagramMarginY,c.colour=s,c.fill=o,c.actors=f,xa(t,c,wa),Aa.insert(c.x,c.y,c.x+c.width+wa.taskMargin,450)}},Oa=function(t){Object.keys(t).forEach((function(e){wa[e]=t[e]}))},Na=function(t,e){ea.parser.yy.clear(),ea.parser.parse(t+"\n"),Aa.init();var n=Object(a.select)("#"+e);n.attr("xmlns:xlink","http://www.w3.org/1999/xlink"),_a(n);var r=ea.parser.yy.getTasks(),i=ea.parser.yy.getTitle(),o=ea.parser.yy.getActors();for(var s in ka)delete ka[s];var u=0;o.forEach((function(t){ka[t]=wa.actorColours[u%wa.actorColours.length],u++})),function(t){var e=60;Object.keys(ka).forEach((function(n){var r=ka[n];ma(t,{cx:20,cy:e,r:7,fill:r,stroke:"#000"}),ba(t,{x:40,y:e+7,fill:"#666",text:n}),e+=20}))}(n),Aa.insert(0,0,Ea,50*Object.keys(ka).length),Ma(n,r,0);var c=Aa.getBounds();i&&n.append("text").text(i).attr("x",Ea).attr("font-size","4ex").attr("font-weight","bold").attr("y",25);var l=c.stopy-c.starty+2*wa.diagramMarginY,f=Ea+c.stopx+2*wa.diagramMarginX;wa.useMaxWidth?(n.attr("height","100%"),n.attr("width","100%"),n.attr("style","max-width:"+f+"px;")):(n.attr("height",l),n.attr("width",f)),n.append("line").attr("x1",Ea).attr("y1",4*wa.height).attr("x2",f-Ea-4).attr("y2",4*wa.height).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)");var h=i?70:0;n.attr("viewBox","".concat(c.startx," -25 ").concat(f," ").concat(l+h)),n.attr("preserveAspectRatio","xMinYMin meet")};function Ca(t){return(Ca="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)}for(var Da={},La=0,Fa=["default","forest","dark","neutral"];La<Fa.length;La++){var Ia=Fa[La];Da[Ia]=n(158)("./".concat(Ia,"/index.scss"))}var Pa={theme:"default",themeCSS:void 0,maxTextSize:5e4,fontFamily:'"trebuchet ms", verdana, arial;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"linear",padding:15},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open-Sans", "sans-serif"',noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial',noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial'},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"},journey:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1},class:{},git:{},state:{dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5},er:{diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,stroke:"gray",fill:"honeydew",fontSize:12}};_(Pa.logLevel),f(Pa);var Ra={render:function(t,e,n,r){var i=e;if(e.length>Pa.maxTextSize&&(i="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa"),void 0!==r)r.innerHTML="",Object(a.select)(r).append("div").attr("id","d"+t).attr("style","font-family: "+Pa.fontFamily).append("svg").attr("id",t).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg").append("g");else{var o=document.getElementById(t);o&&o.remove();var c=document.querySelector("#d"+t);c&&(c.innerHTML=""),Object(a.select)("body").append("div").attr("id","d"+t).append("svg").attr("id",t).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg").append("g")}window.txt=i,i=function(t){var e=t;return e=(e=(e=e.replace(/style.*:\S*#.*;/g,(function(t){return t.substring(0,t.length-1)}))).replace(/classDef.*:\S*#.*;/g,(function(t){return t.substring(0,t.length-1)}))).replace(/#\w+;/g,(function(t){var e=t.substring(1,t.length-1);return/^\+?\d+$/.test(e)?"fl°°"+e+"¶ß":"fl°"+e+"¶ß"}))}(i);var l=Object(a.select)("#d"+t).node(),f=N(i),h=l.firstChild,d=h.firstChild,p=Da[Pa.theme];if(void 0===p&&(p=""),void 0!==Pa.themeCSS&&(p+="\n".concat(Pa.themeCSS)),void 0!==Pa.fontFamily&&(p+="\n:root { --mermaid-font-family: ".concat(Pa.fontFamily,"}")),void 0!==Pa.altFontFamily&&(p+="\n:root { --mermaid-alt-font-family: ".concat(Pa.altFontFamily,"}")),"flowchart"===f||"flowchart-v2"===f){var y=Dt(i);for(var g in y)p+="\n.".concat(g," > * { ").concat(y[g].styles.join(" !important; ")," !important; }"),y[g].textStyles&&(p+="\n.".concat(g," tspan { ").concat(y[g].textStyles.join(" !important; ")," !important; }"))}var m=document.createElement("style");m.innerHTML=s()(p,"#".concat(t)),h.insertBefore(m,d);var v=document.createElement("style"),b=window.getComputedStyle(h);switch(v.innerHTML="#".concat(t," {\n color: ").concat(b.color,";\n font: ").concat(b.font,";\n }"),h.insertBefore(v,d),f){case"git":Pa.flowchart.arrowMarkerAbsolute=Pa.arrowMarkerAbsolute,ki(Pa.git),Ei(i,t,!1);break;case"flowchart":Pa.flowchart.arrowMarkerAbsolute=Pa.arrowMarkerAbsolute,Ct(Pa.flowchart),Lt(i,t,!1);break;case"flowchart-v2":Pa.flowchart.arrowMarkerAbsolute=Pa.arrowMarkerAbsolute,be(Pa.flowchart),xe(i,t,!1);break;case"sequence":Pa.sequence.arrowMarkerAbsolute=Pa.arrowMarkerAbsolute,Pa.sequenceDiagram?(tn(Object.assign(Pa.sequence,Pa.sequenceDiagram)),console.error("`mermaid config.sequenceDiagram` has been renamed to `config.sequence`. Please update your mermaid config.")):tn(Pa.sequence),en(i,t);break;case"gantt":Pa.gantt.arrowMarkerAbsolute=Pa.arrowMarkerAbsolute,Bn(Pa.gantt),jn(i,t);break;case"class":Pa.class.arrowMarkerAbsolute=Pa.arrowMarkerAbsolute,yr(Pa.class),gr(i,t);break;case"state":Ur(Pa.state),$r(i,t);break;case"stateDiagram":Xr(Pa.state),Zr(i,t);break;case"info":Pa.class.arrowMarkerAbsolute=Pa.arrowMarkerAbsolute,Ci(Pa.class),Di(i,t,u.version);break;case"pie":Pa.class.arrowMarkerAbsolute=Pa.arrowMarkerAbsolute,ji(Pa.class),Yi(i,t,u.version);break;case"er":Ki(Pa.er),ta(i,t,u.version);break;case"journey":Oa(Pa.journey),Na(i,t,u.version)}Object(a.select)('[id="'.concat(t,'"]')).selectAll("foreignobject > *").attr("xmlns","http://www.w3.org/1999/xhtml");var _=Object(a.select)("#d"+t).node().innerHTML;if(Pa.arrowMarkerAbsolute&&"false"!==Pa.arrowMarkerAbsolute||(_=_.replace(/marker-end="url\(.*?#/g,'marker-end="url(#',"g")),_=function(t){var e=t;return e=(e=(e=e.replace(/fl°°/g,(function(){return"&#"}))).replace(/fl°/g,(function(){return"&"}))).replace(/¶ß/g,(function(){return";"}))}(_),void 0!==n)switch(f){case"flowchart":case"flowchart-v2":n(_,ut.bindFunctions);break;case"gantt":n(_,Fn.bindFunctions);break;case"class":n(_,Kn.bindFunctions);break;default:n(_)}else x.debug("CB = undefined!");var w=Object(a.select)("#d"+t).node();return null!==w&&"function"==typeof w.remove&&Object(a.select)("#d"+t).node().remove(),_},parse:function(t){var e,n=N(t);switch(x.debug("Type "+n),n){case"git":(e=hi.a).parser.yy=li;break;case"flowchart":case"flowchart-v2":ut.clear(),(e=lt.a).parser.yy=ut;break;case"sequence":(e=Ne.a).parser.yy=Ue;break;case"gantt":(e=rn.a).parser.yy=Fn;break;case"class":(e=er.a).parser.yy=Kn;break;case"state":case"stateDiagram":(e=Dr.a).parser.yy=Nr;break;case"info":x.debug("info info info"),(e=Oi.a).parser.yy=Si;break;case"pie":x.debug("pie"),(e=Ri.a).parser.yy=Ii;break;case"er":x.debug("er"),(e=Hi.a).parser.yy=Gi;break;case"journey":x.debug("Journey"),(e=na.a).parser.yy=la}e.parser.yy.parseError=function(t,e){throw{str:t,hash:e}},e.parse(t)},initialize:function(t){x.debug("Initializing mermaidAPI ",u.version),"object"===Ca(t)&&function(t){for(var e=Object.keys(t),n=0;n<e.length;n++)if("object"===Ca(t[e[n]])&&null!=t[e[n]])for(var r=Object.keys(t[e[n]]),i=0;i<r.length;i++)x.debug("Setting conf ",e[n],"-",r[i]),void 0===Pa[e[n]]&&(Pa[e[n]]={}),x.debug("Setting config: "+e[n]+" "+r[i]+" to "+t[e[n]][r[i]]),Pa[e[n]][r[i]]=t[e[n]][r[i]];else Pa[e[n]]=t[e[n]]}(t),f(Pa),_(Pa.logLevel)},getConfig:h},Ba=function(){ja.startOnLoad?Ra.getConfig().startOnLoad&&ja.init():void 0===ja.startOnLoad&&(x.debug("In start, no config"),Ra.getConfig().startOnLoad&&ja.init())};"undefined"!=typeof document&&
/*!
* Wait for document loaded before starting the execution
*/
-window.addEventListener("load",(function(){qi()}),!1);var Ui={startOnLoad:!0,htmlLabels:!0,mermaidAPI:Fi,parse:Fi.parse,render:Fi.render,init:function(){var t,e,n,r=Fi.getConfig();J.debug("Starting rendering diagrams"),arguments.length>=2?(
+window.addEventListener("load",(function(){Ba()}),!1);var ja={startOnLoad:!0,htmlLabels:!0,mermaidAPI:Ra,parse:Ra.parse,render:Ra.render,init:function(){var t,e,n,r=Ra.getConfig();x.debug("Starting rendering diagrams"),arguments.length>=2?(
/*! sequence config was passed as #1 */
-void 0!==arguments[0]&&(Ui.sequenceConfig=arguments[0]),t=arguments[1]):t=arguments[0],"function"==typeof arguments[arguments.length-1]?(e=arguments[arguments.length-1],J.debug("Callback function found")):void 0!==r.mermaid&&("function"==typeof r.mermaid.callback?(e=r.mermaid.callback,J.debug("Callback function found")):J.debug("No Callback function found")),t=void 0===t?document.querySelectorAll(".mermaid"):"string"==typeof t?document.querySelectorAll(t):t instanceof window.Node?[t]:t,J.debug("Start On Load before: "+Ui.startOnLoad),void 0!==Ui.startOnLoad&&(J.debug("Start On Load inner: "+Ui.startOnLoad),Fi.initialize({startOnLoad:Ui.startOnLoad})),void 0!==Ui.ganttConfig&&Fi.initialize({gantt:Ui.ganttConfig});for(var i=function(r){var i=t[r];
-/*! Check if previously processed */if(i.getAttribute("data-processed"))return"continue";i.setAttribute("data-processed",!0);var a="mermaid-".concat(Date.now());n=i.innerHTML,n=o.a.decode(n).trim().replace(/<br\s*\/?>/gi,"<br/>"),Fi.render(a,n,(function(t,n){i.innerHTML=t,void 0!==e&&e(a),n&&n(i)}),i)},a=0;a<t.length;a++)i(a)},initialize:function(t){void 0!==t.mermaid&&(void 0!==t.mermaid.startOnLoad&&(Ui.startOnLoad=t.mermaid.startOnLoad),void 0!==t.mermaid.htmlLabels&&(Ui.htmlLabels=t.mermaid.htmlLabels)),Fi.initialize(t),J.debug("Initializing mermaid ")},contentLoaded:qi};e.default=Ui},function(t,e,n){"use strict";n.r(e);var r=n(0),i=n(200),o=n(199),a=n(197),u=n(39),s=n(20),c=n(192),f=n(51),l=n(102),h=n(140),d=n(139),p=n(194),g=n(191),y=n(84),b=n(186),v=n(189),m=n(26),_=n(42),w=n(196),x=n(85),k=n(195),E=n(190),A=n(188),S=n(13),M=n(187),T=n(73),O=n(103),D=n(81),C=n(40),N=n(193),I=n(198);n.d(e,"version",(function(){return"5.15.0"})),n.d(e,"bisect",(function(){return r.b})),n.d(e,"bisectRight",(function(){return r.d})),n.d(e,"bisectLeft",(function(){return r.c})),n.d(e,"ascending",(function(){return r.a})),n.d(e,"bisector",(function(){return r.e})),n.d(e,"cross",(function(){return r.f})),n.d(e,"descending",(function(){return r.g})),n.d(e,"deviation",(function(){return r.h})),n.d(e,"extent",(function(){return r.i})),n.d(e,"histogram",(function(){return r.j})),n.d(e,"thresholdFreedmanDiaconis",(function(){return r.w})),n.d(e,"thresholdScott",(function(){return r.x})),n.d(e,"thresholdSturges",(function(){return r.y})),n.d(e,"max",(function(){return r.k})),n.d(e,"mean",(function(){return r.l})),n.d(e,"median",(function(){return r.m})),n.d(e,"merge",(function(){return r.n})),n.d(e,"min",(function(){return r.o})),n.d(e,"pairs",(function(){return r.p})),n.d(e,"permute",(function(){return r.q})),n.d(e,"quantile",(function(){return r.r})),n.d(e,"range",(function(){return r.s})),n.d(e,"scan",(function(){return r.t})),n.d(e,"shuffle",(function(){return r.u})),n.d(e,"sum",(function(){return r.v})),n.d(e,"ticks",(function(){return r.B})),n.d(e,"tickIncrement",(function(){return r.z})),n.d(e,"tickStep",(function(){return r.A})),n.d(e,"transpose",(function(){return r.C})),n.d(e,"variance",(function(){return r.D})),n.d(e,"zip",(function(){return r.E})),n.d(e,"axisTop",(function(){return i.d})),n.d(e,"axisRight",(function(){return i.c})),n.d(e,"axisBottom",(function(){return i.a})),n.d(e,"axisLeft",(function(){return i.b})),n.d(e,"brush",(function(){return o.a})),n.d(e,"brushX",(function(){return o.c})),n.d(e,"brushY",(function(){return o.d})),n.d(e,"brushSelection",(function(){return o.b})),n.d(e,"chord",(function(){return a.a})),n.d(e,"ribbon",(function(){return a.b})),n.d(e,"nest",(function(){return u.d})),n.d(e,"set",(function(){return u.e})),n.d(e,"map",(function(){return u.c})),n.d(e,"keys",(function(){return u.b})),n.d(e,"values",(function(){return u.f})),n.d(e,"entries",(function(){return u.a})),n.d(e,"color",(function(){return s.a})),n.d(e,"rgb",(function(){return s.h})),n.d(e,"hsl",(function(){return s.e})),n.d(e,"lab",(function(){return s.f})),n.d(e,"hcl",(function(){return s.d})),n.d(e,"lch",(function(){return s.g})),n.d(e,"gray",(function(){return s.c})),n.d(e,"cubehelix",(function(){return s.b})),n.d(e,"contours",(function(){return c.b})),n.d(e,"contourDensity",(function(){return c.a})),n.d(e,"dispatch",(function(){return f.a})),n.d(e,"drag",(function(){return l.a})),n.d(e,"dragDisable",(function(){return l.b})),n.d(e,"dragEnable",(function(){return l.c})),n.d(e,"dsvFormat",(function(){return h.i})),n.d(e,"csvParse",(function(){return h.g})),n.d(e,"csvParseRows",(function(){return h.h})),n.d(e,"csvFormat",(function(){return h.b})),n.d(e,"csvFormatBody",(function(){return h.c})),n.d(e,"csvFormatRows",(function(){return h.e})),n.d(e,"csvFormatRow",(function(){return h.d})),n.d(e,"csvFormatValue",(function(){return h.f})),n.d(e,"tsvParse",(function(){return h.o})),n.d(e,"tsvParseRows",(function(){return h.p})),n.d(e,"tsvFormat",(function(){return h.j})),n.d(e,"tsvFormatBody",(function(){return h.k})),n.d(e,"tsvFormatRows",(function(){return h.m})),n.d(e,"tsvFormatRow",(function(){return h.l})),n.d(e,"tsvFormatValue",(function(){return h.n})),n.d(e,"autoType",(function(){return h.a})),n.d(e,"easeLinear",(function(){return d.y})),n.d(e,"easeQuad",(function(){return d.D})),n.d(e,"easeQuadIn",(function(){return d.E})),n.d(e,"easeQuadOut",(function(){return d.G})),n.d(e,"easeQuadInOut",(function(){return d.F})),n.d(e,"easeCubic",(function(){return d.m})),n.d(e,"easeCubicIn",(function(){return d.n})),n.d(e,"easeCubicOut",(function(){return d.p})),n.d(e,"easeCubicInOut",(function(){return d.o})),n.d(e,"easePoly",(function(){return d.z})),n.d(e,"easePolyIn",(function(){return d.A})),n.d(e,"easePolyOut",(function(){return d.C})),n.d(e,"easePolyInOut",(function(){return d.B})),n.d(e,"easeSin",(function(){return d.H})),n.d(e,"easeSinIn",(function(){return d.I})),n.d(e,"easeSinOut",(function(){return d.K})),n.d(e,"easeSinInOut",(function(){return d.J})),n.d(e,"easeExp",(function(){return d.u})),n.d(e,"easeExpIn",(function(){return d.v})),n.d(e,"easeExpOut",(function(){return d.x})),n.d(e,"easeExpInOut",(function(){return d.w})),n.d(e,"easeCircle",(function(){return d.i})),n.d(e,"easeCircleIn",(function(){return d.j})),n.d(e,"easeCircleOut",(function(){return d.l})),n.d(e,"easeCircleInOut",(function(){return d.k})),n.d(e,"easeBounce",(function(){return d.e})),n.d(e,"easeBounceIn",(function(){return d.f})),n.d(e,"easeBounceOut",(function(){return d.h})),n.d(e,"easeBounceInOut",(function(){return d.g})),n.d(e,"easeBack",(function(){return d.a})),n.d(e,"easeBackIn",(function(){return d.b})),n.d(e,"easeBackOut",(function(){return d.d})),n.d(e,"easeBackInOut",(function(){return d.c})),n.d(e,"easeElastic",(function(){return d.q})),n.d(e,"easeElasticIn",(function(){return d.r})),n.d(e,"easeElasticOut",(function(){return d.t})),n.d(e,"easeElasticInOut",(function(){return d.s})),n.d(e,"blob",(function(){return p.a})),n.d(e,"buffer",(function(){return p.b})),n.d(e,"dsv",(function(){return p.d})),n.d(e,"csv",(function(){return p.c})),n.d(e,"tsv",(function(){return p.j})),n.d(e,"image",(function(){return p.f})),n.d(e,"json",(function(){return p.g})),n.d(e,"text",(function(){return p.i})),n.d(e,"xml",(function(){return p.k})),n.d(e,"html",(function(){return p.e})),n.d(e,"svg",(function(){return p.h})),n.d(e,"forceCenter",(function(){return g.a})),n.d(e,"forceCollide",(function(){return g.b})),n.d(e,"forceLink",(function(){return g.c})),n.d(e,"forceManyBody",(function(){return g.d})),n.d(e,"forceRadial",(function(){return g.e})),n.d(e,"forceSimulation",(function(){return g.f})),n.d(e,"forceX",(function(){return g.g})),n.d(e,"forceY",(function(){return g.h})),n.d(e,"formatDefaultLocale",(function(){return y.c})),n.d(e,"format",(function(){return y.b})),n.d(e,"formatPrefix",(function(){return y.e})),n.d(e,"formatLocale",(function(){return y.d})),n.d(e,"formatSpecifier",(function(){return y.f})),n.d(e,"FormatSpecifier",(function(){return y.a})),n.d(e,"precisionFixed",(function(){return y.g})),n.d(e,"precisionPrefix",(function(){return y.h})),n.d(e,"precisionRound",(function(){return y.i})),n.d(e,"geoArea",(function(){return b.c})),n.d(e,"geoBounds",(function(){return b.h})),n.d(e,"geoCentroid",(function(){return b.i})),n.d(e,"geoCircle",(function(){return b.j})),n.d(e,"geoClipAntimeridian",(function(){return b.k})),n.d(e,"geoClipCircle",(function(){return b.l})),n.d(e,"geoClipExtent",(function(){return b.m})),n.d(e,"geoClipRectangle",(function(){return b.n})),n.d(e,"geoContains",(function(){return b.u})),n.d(e,"geoDistance",(function(){return b.v})),n.d(e,"geoGraticule",(function(){return b.C})),n.d(e,"geoGraticule10",(function(){return b.D})),n.d(e,"geoInterpolate",(function(){return b.F})),n.d(e,"geoLength",(function(){return b.G})),n.d(e,"geoPath",(function(){return b.N})),n.d(e,"geoAlbers",(function(){return b.a})),n.d(e,"geoAlbersUsa",(function(){return b.b})),n.d(e,"geoAzimuthalEqualArea",(function(){return b.d})),n.d(e,"geoAzimuthalEqualAreaRaw",(function(){return b.e})),n.d(e,"geoAzimuthalEquidistant",(function(){return b.f})),n.d(e,"geoAzimuthalEquidistantRaw",(function(){return b.g})),n.d(e,"geoConicConformal",(function(){return b.o})),n.d(e,"geoConicConformalRaw",(function(){return b.p})),n.d(e,"geoConicEqualArea",(function(){return b.q})),n.d(e,"geoConicEqualAreaRaw",(function(){return b.r})),n.d(e,"geoConicEquidistant",(function(){return b.s})),n.d(e,"geoConicEquidistantRaw",(function(){return b.t})),n.d(e,"geoEqualEarth",(function(){return b.w})),n.d(e,"geoEqualEarthRaw",(function(){return b.x})),n.d(e,"geoEquirectangular",(function(){return b.y})),n.d(e,"geoEquirectangularRaw",(function(){return b.z})),n.d(e,"geoGnomonic",(function(){return b.A})),n.d(e,"geoGnomonicRaw",(function(){return b.B})),n.d(e,"geoIdentity",(function(){return b.E})),n.d(e,"geoProjection",(function(){return b.O})),n.d(e,"geoProjectionMutator",(function(){return b.P})),n.d(e,"geoMercator",(function(){return b.H})),n.d(e,"geoMercatorRaw",(function(){return b.I})),n.d(e,"geoNaturalEarth1",(function(){return b.J})),n.d(e,"geoNaturalEarth1Raw",(function(){return b.K})),n.d(e,"geoOrthographic",(function(){return b.L})),n.d(e,"geoOrthographicRaw",(function(){return b.M})),n.d(e,"geoStereographic",(function(){return b.R})),n.d(e,"geoStereographicRaw",(function(){return b.S})),n.d(e,"geoTransverseMercator",(function(){return b.V})),n.d(e,"geoTransverseMercatorRaw",(function(){return b.W})),n.d(e,"geoRotation",(function(){return b.Q})),n.d(e,"geoStream",(function(){return b.T})),n.d(e,"geoTransform",(function(){return b.U})),n.d(e,"cluster",(function(){return v.a})),n.d(e,"hierarchy",(function(){return v.b})),n.d(e,"pack",(function(){return v.c})),n.d(e,"packSiblings",(function(){return v.e})),n.d(e,"packEnclose",(function(){return v.d})),n.d(e,"partition",(function(){return v.f})),n.d(e,"stratify",(function(){return v.g})),n.d(e,"tree",(function(){return v.h})),n.d(e,"treemap",(function(){return v.i})),n.d(e,"treemapBinary",(function(){return v.j})),n.d(e,"treemapDice",(function(){return v.k})),n.d(e,"treemapSlice",(function(){return v.m})),n.d(e,"treemapSliceDice",(function(){return v.n})),n.d(e,"treemapSquarify",(function(){return v.o})),n.d(e,"treemapResquarify",(function(){return v.l})),n.d(e,"interpolate",(function(){return m.a})),n.d(e,"interpolateArray",(function(){return m.b})),n.d(e,"interpolateBasis",(function(){return m.c})),n.d(e,"interpolateBasisClosed",(function(){return m.d})),n.d(e,"interpolateDate",(function(){return m.g})),n.d(e,"interpolateDiscrete",(function(){return m.h})),n.d(e,"interpolateHue",(function(){return m.m})),n.d(e,"interpolateNumber",(function(){return m.o})),n.d(e,"interpolateNumberArray",(function(){return m.p})),n.d(e,"interpolateObject",(function(){return m.q})),n.d(e,"interpolateRound",(function(){return m.u})),n.d(e,"interpolateString",(function(){return m.v})),n.d(e,"interpolateTransformCss",(function(){return m.w})),n.d(e,"interpolateTransformSvg",(function(){return m.x})),n.d(e,"interpolateZoom",(function(){return m.y})),n.d(e,"interpolateRgb",(function(){return m.r})),n.d(e,"interpolateRgbBasis",(function(){return m.s})),n.d(e,"interpolateRgbBasisClosed",(function(){return m.t})),n.d(e,"interpolateHsl",(function(){return m.k})),n.d(e,"interpolateHslLong",(function(){return m.l})),n.d(e,"interpolateLab",(function(){return m.n})),n.d(e,"interpolateHcl",(function(){return m.i})),n.d(e,"interpolateHclLong",(function(){return m.j})),n.d(e,"interpolateCubehelix",(function(){return m.e})),n.d(e,"interpolateCubehelixLong",(function(){return m.f})),n.d(e,"piecewise",(function(){return m.z})),n.d(e,"quantize",(function(){return m.A})),n.d(e,"path",(function(){return _.a})),n.d(e,"polygonArea",(function(){return w.a})),n.d(e,"polygonCentroid",(function(){return w.b})),n.d(e,"polygonHull",(function(){return w.d})),n.d(e,"polygonContains",(function(){return w.c})),n.d(e,"polygonLength",(function(){return w.e})),n.d(e,"quadtree",(function(){return x.a})),n.d(e,"randomUniform",(function(){return k.f})),n.d(e,"randomNormal",(function(){return k.e})),n.d(e,"randomLogNormal",(function(){return k.d})),n.d(e,"randomBates",(function(){return k.a})),n.d(e,"randomIrwinHall",(function(){return k.c})),n.d(e,"randomExponential",(function(){return k.b})),n.d(e,"scaleBand",(function(){return E.a})),n.d(e,"scalePoint",(function(){return E.l})),n.d(e,"scaleIdentity",(function(){return E.g})),n.d(e,"scaleLinear",(function(){return E.i})),n.d(e,"scaleLog",(function(){return E.j})),n.d(e,"scaleSymlog",(function(){return E.w})),n.d(e,"scaleOrdinal",(function(){return E.k})),n.d(e,"scaleImplicit",(function(){return E.h})),n.d(e,"scalePow",(function(){return E.m})),n.d(e,"scaleSqrt",(function(){return E.v})),n.d(e,"scaleQuantile",(function(){return E.n})),n.d(e,"scaleQuantize",(function(){return E.o})),n.d(e,"scaleThreshold",(function(){return E.x})),n.d(e,"scaleTime",(function(){return E.y})),n.d(e,"scaleUtc",(function(){return E.z})),n.d(e,"scaleSequential",(function(){return E.p})),n.d(e,"scaleSequentialLog",(function(){return E.q})),n.d(e,"scaleSequentialPow",(function(){return E.r})),n.d(e,"scaleSequentialSqrt",(function(){return E.t})),n.d(e,"scaleSequentialSymlog",(function(){return E.u})),n.d(e,"scaleSequentialQuantile",(function(){return E.s})),n.d(e,"scaleDiverging",(function(){return E.b})),n.d(e,"scaleDivergingLog",(function(){return E.c})),n.d(e,"scaleDivergingPow",(function(){return E.d})),n.d(e,"scaleDivergingSqrt",(function(){return E.e})),n.d(e,"scaleDivergingSymlog",(function(){return E.f})),n.d(e,"tickFormat",(function(){return E.A})),n.d(e,"schemeCategory10",(function(){return A.R})),n.d(e,"schemeAccent",(function(){return A.M})),n.d(e,"schemeDark2",(function(){return A.S})),n.d(e,"schemePaired",(function(){return A.Z})),n.d(e,"schemePastel1",(function(){return A.ab})),n.d(e,"schemePastel2",(function(){return A.bb})),n.d(e,"schemeSet1",(function(){return A.ob})),n.d(e,"schemeSet2",(function(){return A.pb})),n.d(e,"schemeSet3",(function(){return A.qb})),n.d(e,"schemeTableau10",(function(){return A.sb})),n.d(e,"interpolateBrBG",(function(){return A.b})),n.d(e,"schemeBrBG",(function(){return A.O})),n.d(e,"interpolatePRGn",(function(){return A.o})),n.d(e,"schemePRGn",(function(){return A.Y})),n.d(e,"interpolatePiYG",(function(){return A.p})),n.d(e,"schemePiYG",(function(){return A.cb})),n.d(e,"interpolatePuOr",(function(){return A.t})),n.d(e,"schemePuOr",(function(){return A.fb})),n.d(e,"interpolateRdBu",(function(){return A.x})),n.d(e,"schemeRdBu",(function(){return A.ib})),n.d(e,"interpolateRdGy",(function(){return A.y})),n.d(e,"schemeRdGy",(function(){return A.jb})),n.d(e,"interpolateRdYlBu",(function(){return A.A})),n.d(e,"schemeRdYlBu",(function(){return A.lb})),n.d(e,"interpolateRdYlGn",(function(){return A.B})),n.d(e,"schemeRdYlGn",(function(){return A.mb})),n.d(e,"interpolateSpectral",(function(){return A.E})),n.d(e,"schemeSpectral",(function(){return A.rb})),n.d(e,"interpolateBuGn",(function(){return A.c})),n.d(e,"schemeBuGn",(function(){return A.P})),n.d(e,"interpolateBuPu",(function(){return A.d})),n.d(e,"schemeBuPu",(function(){return A.Q})),n.d(e,"interpolateGnBu",(function(){return A.h})),n.d(e,"schemeGnBu",(function(){return A.T})),n.d(e,"interpolateOrRd",(function(){return A.m})),n.d(e,"schemeOrRd",(function(){return A.W})),n.d(e,"interpolatePuBuGn",(function(){return A.s})),n.d(e,"schemePuBuGn",(function(){return A.eb})),n.d(e,"interpolatePuBu",(function(){return A.r})),n.d(e,"schemePuBu",(function(){return A.db})),n.d(e,"interpolatePuRd",(function(){return A.u})),n.d(e,"schemePuRd",(function(){return A.gb})),n.d(e,"interpolateRdPu",(function(){return A.z})),n.d(e,"schemeRdPu",(function(){return A.kb})),n.d(e,"interpolateYlGnBu",(function(){return A.J})),n.d(e,"schemeYlGnBu",(function(){return A.ub})),n.d(e,"interpolateYlGn",(function(){return A.I})),n.d(e,"schemeYlGn",(function(){return A.tb})),n.d(e,"interpolateYlOrBr",(function(){return A.K})),n.d(e,"schemeYlOrBr",(function(){return A.vb})),n.d(e,"interpolateYlOrRd",(function(){return A.L})),n.d(e,"schemeYlOrRd",(function(){return A.wb})),n.d(e,"interpolateBlues",(function(){return A.a})),n.d(e,"schemeBlues",(function(){return A.N})),n.d(e,"interpolateGreens",(function(){return A.i})),n.d(e,"schemeGreens",(function(){return A.U})),n.d(e,"interpolateGreys",(function(){return A.j})),n.d(e,"schemeGreys",(function(){return A.V})),n.d(e,"interpolatePurples",(function(){return A.v})),n.d(e,"schemePurples",(function(){return A.hb})),n.d(e,"interpolateReds",(function(){return A.C})),n.d(e,"schemeReds",(function(){return A.nb})),n.d(e,"interpolateOranges",(function(){return A.n})),n.d(e,"schemeOranges",(function(){return A.X})),n.d(e,"interpolateCividis",(function(){return A.e})),n.d(e,"interpolateCubehelixDefault",(function(){return A.g})),n.d(e,"interpolateRainbow",(function(){return A.w})),n.d(e,"interpolateWarm",(function(){return A.H})),n.d(e,"interpolateCool",(function(){return A.f})),n.d(e,"interpolateSinebow",(function(){return A.D})),n.d(e,"interpolateTurbo",(function(){return A.F})),n.d(e,"interpolateViridis",(function(){return A.G})),n.d(e,"interpolateMagma",(function(){return A.l})),n.d(e,"interpolateInferno",(function(){return A.k})),n.d(e,"interpolatePlasma",(function(){return A.q})),n.d(e,"create",(function(){return S.b})),n.d(e,"creator",(function(){return S.c})),n.d(e,"local",(function(){return S.f})),n.d(e,"matcher",(function(){return S.g})),n.d(e,"mouse",(function(){return S.h})),n.d(e,"namespace",(function(){return S.i})),n.d(e,"namespaces",(function(){return S.j})),n.d(e,"clientPoint",(function(){return S.a})),n.d(e,"select",(function(){return S.k})),n.d(e,"selectAll",(function(){return S.l})),n.d(e,"selection",(function(){return S.m})),n.d(e,"selector",(function(){return S.n})),n.d(e,"selectorAll",(function(){return S.o})),n.d(e,"style",(function(){return S.p})),n.d(e,"touch",(function(){return S.q})),n.d(e,"touches",(function(){return S.r})),n.d(e,"window",(function(){return S.s})),n.d(e,"event",(function(){return S.e})),n.d(e,"customEvent",(function(){return S.d})),n.d(e,"arc",(function(){return M.a})),n.d(e,"area",(function(){return M.b})),n.d(e,"line",(function(){return M.v})),n.d(e,"pie",(function(){return M.A})),n.d(e,"areaRadial",(function(){return M.c})),n.d(e,"radialArea",(function(){return M.C})),n.d(e,"lineRadial",(function(){return M.w})),n.d(e,"radialLine",(function(){return M.D})),n.d(e,"pointRadial",(function(){return M.B})),n.d(e,"linkHorizontal",(function(){return M.x})),n.d(e,"linkVertical",(function(){return M.z})),n.d(e,"linkRadial",(function(){return M.y})),n.d(e,"symbol",(function(){return M.Q})),n.d(e,"symbols",(function(){return M.Y})),n.d(e,"symbolCircle",(function(){return M.R})),n.d(e,"symbolCross",(function(){return M.S})),n.d(e,"symbolDiamond",(function(){return M.T})),n.d(e,"symbolSquare",(function(){return M.U})),n.d(e,"symbolStar",(function(){return M.V})),n.d(e,"symbolTriangle",(function(){return M.W})),n.d(e,"symbolWye",(function(){return M.X})),n.d(e,"curveBasisClosed",(function(){return M.e})),n.d(e,"curveBasisOpen",(function(){return M.f})),n.d(e,"curveBasis",(function(){return M.d})),n.d(e,"curveBundle",(function(){return M.g})),n.d(e,"curveCardinalClosed",(function(){return M.i})),n.d(e,"curveCardinalOpen",(function(){return M.j})),n.d(e,"curveCardinal",(function(){return M.h})),n.d(e,"curveCatmullRomClosed",(function(){return M.l})),n.d(e,"curveCatmullRomOpen",(function(){return M.m})),n.d(e,"curveCatmullRom",(function(){return M.k})),n.d(e,"curveLinearClosed",(function(){return M.o})),n.d(e,"curveLinear",(function(){return M.n})),n.d(e,"curveMonotoneX",(function(){return M.p})),n.d(e,"curveMonotoneY",(function(){return M.q})),n.d(e,"curveNatural",(function(){return M.r})),n.d(e,"curveStep",(function(){return M.s})),n.d(e,"curveStepAfter",(function(){return M.t})),n.d(e,"curveStepBefore",(function(){return M.u})),n.d(e,"stack",(function(){return M.E})),n.d(e,"stackOffsetExpand",(function(){return M.G})),n.d(e,"stackOffsetDiverging",(function(){return M.F})),n.d(e,"stackOffsetNone",(function(){return M.H})),n.d(e,"stackOffsetSilhouette",(function(){return M.I})),n.d(e,"stackOffsetWiggle",(function(){return M.J})),n.d(e,"stackOrderAppearance",(function(){return M.K})),n.d(e,"stackOrderAscending",(function(){return M.L})),n.d(e,"stackOrderDescending",(function(){return M.M})),n.d(e,"stackOrderInsideOut",(function(){return M.N})),n.d(e,"stackOrderNone",(function(){return M.O})),n.d(e,"stackOrderReverse",(function(){return M.P})),n.d(e,"timeInterval",(function(){return T.g})),n.d(e,"timeMillisecond",(function(){return T.h})),n.d(e,"timeMilliseconds",(function(){return T.i})),n.d(e,"utcMillisecond",(function(){return T.L})),n.d(e,"utcMilliseconds",(function(){return T.M})),n.d(e,"timeSecond",(function(){return T.r})),n.d(e,"timeSeconds",(function(){return T.s})),n.d(e,"utcSecond",(function(){return T.V})),n.d(e,"utcSeconds",(function(){return T.W})),n.d(e,"timeMinute",(function(){return T.j})),n.d(e,"timeMinutes",(function(){return T.k})),n.d(e,"timeHour",(function(){return T.e})),n.d(e,"timeHours",(function(){return T.f})),n.d(e,"timeDay",(function(){return T.a})),n.d(e,"timeDays",(function(){return T.b})),n.d(e,"timeWeek",(function(){return T.B})),n.d(e,"timeWeeks",(function(){return T.C})),n.d(e,"timeSunday",(function(){return T.t})),n.d(e,"timeSundays",(function(){return T.u})),n.d(e,"timeMonday",(function(){return T.l})),n.d(e,"timeMondays",(function(){return T.m})),n.d(e,"timeTuesday",(function(){return T.x})),n.d(e,"timeTuesdays",(function(){return T.y})),n.d(e,"timeWednesday",(function(){return T.z})),n.d(e,"timeWednesdays",(function(){return T.A})),n.d(e,"timeThursday",(function(){return T.v})),n.d(e,"timeThursdays",(function(){return T.w})),n.d(e,"timeFriday",(function(){return T.c})),n.d(e,"timeFridays",(function(){return T.d})),n.d(e,"timeSaturday",(function(){return T.p})),n.d(e,"timeSaturdays",(function(){return T.q})),n.d(e,"timeMonth",(function(){return T.n})),n.d(e,"timeMonths",(function(){return T.o})),n.d(e,"timeYear",(function(){return T.D})),n.d(e,"timeYears",(function(){return T.E})),n.d(e,"utcMinute",(function(){return T.N})),n.d(e,"utcMinutes",(function(){return T.O})),n.d(e,"utcHour",(function(){return T.J})),n.d(e,"utcHours",(function(){return T.K})),n.d(e,"utcDay",(function(){return T.F})),n.d(e,"utcDays",(function(){return T.G})),n.d(e,"utcWeek",(function(){return T.fb})),n.d(e,"utcWeeks",(function(){return T.gb})),n.d(e,"utcSunday",(function(){return T.X})),n.d(e,"utcSundays",(function(){return T.Y})),n.d(e,"utcMonday",(function(){return T.P})),n.d(e,"utcMondays",(function(){return T.Q})),n.d(e,"utcTuesday",(function(){return T.bb})),n.d(e,"utcTuesdays",(function(){return T.cb})),n.d(e,"utcWednesday",(function(){return T.db})),n.d(e,"utcWednesdays",(function(){return T.eb})),n.d(e,"utcThursday",(function(){return T.Z})),n.d(e,"utcThursdays",(function(){return T.ab})),n.d(e,"utcFriday",(function(){return T.H})),n.d(e,"utcFridays",(function(){return T.I})),n.d(e,"utcSaturday",(function(){return T.T})),n.d(e,"utcSaturdays",(function(){return T.U})),n.d(e,"utcMonth",(function(){return T.R})),n.d(e,"utcMonths",(function(){return T.S})),n.d(e,"utcYear",(function(){return T.hb})),n.d(e,"utcYears",(function(){return T.ib})),n.d(e,"timeFormatDefaultLocale",(function(){return O.d})),n.d(e,"timeFormat",(function(){return O.c})),n.d(e,"timeParse",(function(){return O.f})),n.d(e,"utcFormat",(function(){return O.g})),n.d(e,"utcParse",(function(){return O.h})),n.d(e,"timeFormatLocale",(function(){return O.e})),n.d(e,"isoFormat",(function(){return O.a})),n.d(e,"isoParse",(function(){return O.b})),n.d(e,"now",(function(){return D.b})),n.d(e,"timer",(function(){return D.d})),n.d(e,"timerFlush",(function(){return D.e})),n.d(e,"timeout",(function(){return D.c})),n.d(e,"interval",(function(){return D.a})),n.d(e,"transition",(function(){return C.c})),n.d(e,"active",(function(){return C.a})),n.d(e,"interrupt",(function(){return C.b})),n.d(e,"voronoi",(function(){return N.a})),n.d(e,"zoom",(function(){return I.a})),n.d(e,"zoomTransform",(function(){return I.c})),n.d(e,"zoomIdentity",(function(){return I.b}))}]).default}));
+void 0!==arguments[0]&&(ja.sequenceConfig=arguments[0]),t=arguments[1]):t=arguments[0],"function"==typeof arguments[arguments.length-1]?(e=arguments[arguments.length-1],x.debug("Callback function found")):void 0!==r.mermaid&&("function"==typeof r.mermaid.callback?(e=r.mermaid.callback,x.debug("Callback function found")):x.debug("No Callback function found")),t=void 0===t?document.querySelectorAll(".mermaid"):"string"==typeof t?document.querySelectorAll(t):t instanceof window.Node?[t]:t,x.debug("Start On Load before: "+ja.startOnLoad),void 0!==ja.startOnLoad&&(x.debug("Start On Load inner: "+ja.startOnLoad),Ra.initialize({startOnLoad:ja.startOnLoad})),void 0!==ja.ganttConfig&&Ra.initialize({gantt:ja.ganttConfig});for(var a=function(r){var a=t[r];
+/*! Check if previously processed */if(a.getAttribute("data-processed"))return"continue";a.setAttribute("data-processed",!0);var o="mermaid-".concat(Date.now());n=i(n=a.innerHTML).trim().replace(/<br\s*\/?>/gi,"<br/>"),Ra.render(o,n,(function(t,n){a.innerHTML=t,void 0!==e&&e(o),n&&n(a)}),a)},o=0;o<t.length;o++)a(o)},initialize:function(t){void 0!==t.mermaid&&(void 0!==t.mermaid.startOnLoad&&(ja.startOnLoad=t.mermaid.startOnLoad),void 0!==t.mermaid.htmlLabels&&(ja.htmlLabels=t.mermaid.htmlLabels)),Ra.initialize(t),x.debug("Initializing mermaid ")},contentLoaded:Ba};e.default=ja}]).default}));
//# sourceMappingURL=mermaid.min.js.map \ No newline at end of file
diff --git a/assets/lib/mermaid/themes/flowchart.scss b/assets/lib/mermaid/themes/flowchart.scss
index 9bd8d966..495826cf 100644
--- a/assets/lib/mermaid/themes/flowchart.scss
+++ b/assets/lib/mermaid/themes/flowchart.scss
@@ -36,6 +36,9 @@
.edgeLabel {
background-color: $edgeLabelBackground;
+ rect {
+ opacity: 0.5;
+ }
text-align: center;
}
diff --git a/assets/lib/mermaid/themes/state.scss b/assets/lib/mermaid/themes/state.scss
index 3f0fda55..0fb7c0f8 100644
--- a/assets/lib/mermaid/themes/state.scss
+++ b/assets/lib/mermaid/themes/state.scss
@@ -67,3 +67,66 @@ g.stateGroup line {
font-family: 'trebuchet ms', verdana, arial;
font-family: var(--mermaid-font-family);
}
+
+.node circle.state-start {
+ fill: black;
+ stroke: black;
+}
+.node circle.state-end {
+ fill: black;
+ stroke: white;
+ stroke-width: 1.5
+}
+#statediagram-barbEnd {
+ fill: $nodeBorder
+}
+
+.statediagram-cluster rect {
+ fill: $nodeBkg;
+ stroke: $nodeBorder;
+ stroke-width: 1px;
+}
+.statediagram-cluster rect.outer {
+ rx: 5px;
+ ry: 5px;
+}
+.statediagram-state .divider {
+ stroke: $nodeBorder;
+}
+
+.statediagram-state .title-state {
+ rx: 5px;
+ ry: 5px;
+}
+.statediagram-cluster.statediagram-cluster .inner {
+ fill: white;
+}
+.statediagram-cluster.statediagram-cluster-alt .inner {
+ fill: #e0e0e0;
+}
+
+.statediagram-cluster .inner {
+ rx:0;
+ ry:0;
+}
+
+.statediagram-state rect.basic {
+ rx: 5px;
+ ry: 5px;
+}
+.statediagram-state rect.divider {
+ stroke-dasharray: 10,10;
+ fill: #efefef;
+}
+
+.note-edge {
+ stroke-dasharray: 5;
+}
+
+.statediagram-note rect {
+ fill: $noteBkgColor;
+ stroke: $noteBorderColor;
+ stroke-width: 1px;
+ rx: 0;
+ ry: 0;
+}
diff --git a/assets/lib/simple-icons/icons/adobecreativecloud.svg b/assets/lib/simple-icons/icons/adobecreativecloud.svg
index a980f301..cbeebe42 100644
--- a/assets/lib/simple-icons/icons/adobecreativecloud.svg
+++ b/assets/lib/simple-icons/icons/adobecreativecloud.svg
@@ -1 +1 @@
-<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Adobe Creative Cloud icon</title><path d="M24 11.599v.803c-.008.044-.017.087-.022.13-.04.35-.067.701-.124 1.048a8.663 8.663 0 0 1-1.176 3.144 8.848 8.848 0 0 1-3.645 3.36 8.422 8.422 0 0 1-2.812.843c-.217.026-.435.049-.652.073H7.138c-.043-.008-.085-.02-.128-.024a7.092 7.092 0 0 1-2.448-.598c-1.697-.755-2.963-1.98-3.791-3.664a7.298 7.298 0 0 1-.7-2.37L0 13.742v-.78c.008-.043.02-.086.023-.13a7.286 7.286 0 0 1 .461-2.175C1.2 8.777 2.45 7.381 4.222 6.478a7.227 7.227 0 0 1 2.928-.77 7.998 7.998 0 0 1 1.503.071.188.188 0 0 0 .142-.047 8.898 8.898 0 0 1 2.458-1.81 8.493 8.493 0 0 1 2.825-.848c.234-.027.467-.05.7-.074h.72c.046.007.094.016.14.021.357.043.715.07 1.068.13a8.37 8.37 0 0 1 3.073 1.186 8.89 8.89 0 0 1 3.319 3.713 8.76 8.76 0 0 1 .83 2.862c.026.229.048.458.072.687m-13.42-5.2c.015.02.019.029.025.032.493.247.965.538 1.41.867.028.02.098.012.132-.01 1.222-.787 2.547-1.059 3.97-.802 1.395.251 2.53.96 3.397 2.092.982 1.28 1.357 2.73 1.086 4.34-.182 1.08-.608 2.05-1.33 2.861-1.32 1.48-2.973 2.092-4.918 1.833-1.197-.16-2.23-.685-3.086-1.564-1.098-1.128-2.204-2.248-3.305-3.373-.147-.15-.31-.27-.521-.297a.826.826 0 0 0-.864.48c-.142.3-.124.64.185.948 1.227 1.226 2.444 2.462 3.67 3.69.21.21.435.405.674.582.896.661 1.906 1.027 3 1.174.858.116 1.71.09 2.555-.102 1.612-.369 2.948-1.205 4-2.497a7.213 7.213 0 0 0 1.576-3.67 7.313 7.313 0 0 0-.065-2.36c-.244-1.27-.773-2.408-1.62-3.377-1.618-1.846-3.653-2.67-6.074-2.487a6.664 6.664 0 0 0-2.641.79 6.962 6.962 0 0 0-1.255.85M9.988 19.29a15.79 15.79 0 0 1-.1-.094c-.501-.482-1.006-.96-1.502-1.449a.403.403 0 0 0-.32-.137c-.502.012-1.005.014-1.5-.1-2.461-.565-3.89-3.286-2.983-5.68.715-1.889 2.696-3.038 4.649-2.684.875.159 1.644.536 2.274 1.197.77.808 1.562 1.592 2.34 2.391.176.182.38.265.625.23.316-.046.569-.2.683-.516.112-.31.058-.605-.173-.844-.816-.84-1.613-1.702-2.462-2.507-1.647-1.561-3.588-2.026-5.736-1.362-2.888.893-4.579 3.926-3.919 6.919.602 2.727 2.947 4.64 5.691 4.643h2.299c.038 0 .076-.004.134-.007"/></svg> \ No newline at end of file
+<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Adobe Creative Cloud icon</title><path d="M14.782 3.153c-.231.02-.472.04-.703.07a8.453 8.453 0 0 0-2.832.834 8.951 8.951 0 0 0-2.46 1.777c-.03.04-.09.06-.141.05a7.44 7.44 0 0 0-1.496-.07 7.424 7.424 0 0 0-2.932.763c-1.768.884-3.013 2.26-3.736 4.108a7.089 7.089 0 0 0-.462 2.139c0 .05-.01.09-.02.13v.773c.02.201.05.392.07.593.1.813.332 1.596.703 2.33.824 1.646 2.089 2.851 3.786 3.594a7.127 7.127 0 0 0 2.45.593c.032 0 .06.004.086.01h8.576c.183-.017.362-.035.547-.06a8.344 8.344 0 0 0 2.811-.834 8.836 8.836 0 0 0 3.646-3.304 8.187 8.187 0 0 0 1.184-3.093c.05-.34.08-.692.121-1.034 0-.05.01-.09.02-.13v-.794c-.02-.23-.05-.452-.05-.662a8.345 8.345 0 0 0-.834-2.812 8.952 8.952 0 0 0-3.324-3.645 8.245 8.245 0 0 0-3.072-1.175c-.362-.06-.713-.09-1.075-.13-.05 0-.09-.01-.14-.02zm.369 1.693c2.126.005 3.93.826 5.395 2.455a6.93 6.93 0 0 1 1.616 3.323c.15.764.181 1.547.07 2.32-.19 1.346-.702 2.55-1.576 3.605a7.082 7.082 0 0 1-3.997 2.45 7.297 7.297 0 0 1-2.56.1c-1.095-.14-2.099-.501-3.003-1.154a5.2 5.2 0 0 1-.672-.573c-1.226-1.205-2.44-2.42-3.666-3.625-.301-.3-.321-.632-.18-.934a.822.822 0 0 1 .863-.472c.21.02.372.141.522.292 1.105 1.114 2.2 2.209 3.304 3.324a5.263 5.263 0 0 0 3.093 1.536c1.948.261 3.605-.341 4.92-1.798.713-.793 1.145-1.747 1.326-2.811.26-1.587-.11-3.013-1.095-4.268-.873-1.115-2.018-1.808-3.404-2.059-1.416-.25-2.751.02-3.966.794-.03.02-.1.03-.131.01a9.04 9.04 0 0 0-1.406-.854s-.01-.01-.02-.03a6.603 6.603 0 0 1 1.255-.823 6.646 6.646 0 0 1 2.641-.784 8.45 8.45 0 0 1 .67-.024zM7.546 7.509c1.455-.024 2.791.525 3.982 1.63.854.802 1.637 1.636 2.46 2.47.231.23.281.522.171.833-.11.311-.362.462-.683.512a.722.722 0 0 1-.632-.23c-.784-.784-1.567-1.557-2.34-2.35-.633-.653-1.386-1.025-2.27-1.186-1.958-.351-3.936.784-4.639 2.641-.904 2.36.522 5.031 2.982 5.594.482.11.995.11 1.497.1.14-.01.22.04.32.13.483.473.995.945 1.497 1.416.03.03.07.06.1.09-.06 0-.1.01-.14.01h-2.3a5.833 5.833 0 0 1-5.693-4.568c-.653-2.942 1.034-5.925 3.926-6.798a6.33 6.33 0 0 1 1.762-.294Z"/></svg> \ No newline at end of file
diff --git a/assets/lib/simple-icons/icons/cairometro.svg b/assets/lib/simple-icons/icons/cairometro.svg
new file mode 100644
index 00000000..bc8edcb5
--- /dev/null
+++ b/assets/lib/simple-icons/icons/cairometro.svg
@@ -0,0 +1 @@
+<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Cairo Metro icon</title><path d="M12.397 4.14h.882v.881h-.882zm-1.628 0h.883v.881h-.883zm4.915 1.055v3.402h-1.386V5.195h-.84v1.763h-2.983V5.196h-.84v3.402H8.543v.84h1.911V7.82h2.983v1.617h5.44V5.195zm2.352 3.395h-1.512V6.028h1.512zM5.173 5.195v2.604h2.353v.805H5.173v.833h3.193V5.195zm2.339 1.757H5.999v-.924h1.513zm-2.64 12.177V9.726h4.175L12 12.68l2.954-2.953h4.176v9.403h-4.176v-3.442L12 18.754l-2.952-3.048v3.424zM12 0L8.485 3.515h-4.97v4.97L0 12l3.515 3.515v4.97h4.97L12 24l3.515-3.515h4.97v-4.97L24 12l-3.515-3.515v-4.97h-4.97zm0 1.708l3.014 3.015h4.263v4.263L22.292 12l-3.015 3.014v4.263h-4.263L12 22.292l-3.014-3.015H4.723v-4.263L1.708 12l3.015-3.014V4.723h4.263Z"/></svg> \ No newline at end of file
diff --git a/assets/lib/simple-icons/icons/counter-strike.svg b/assets/lib/simple-icons/icons/counter-strike.svg
new file mode 100644
index 00000000..8d755a38
--- /dev/null
+++ b/assets/lib/simple-icons/icons/counter-strike.svg
@@ -0,0 +1 @@
+<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Counter-Strike icon</title><path d="M9.103.435c.4347-.3913 1.087-.5362 1.6522-.3623.2174.0725.4058.203.6087.3333.1595.1015.3479.145.4928.261.0725.058.0145.1594.0145.2318.1884.4493.2899.9421.1305 1.4204-.1305.1594-.3624.203-.5508.2754-.029.2029.0435.3913.0725.5942-.0435.029-.0725.058-.116.087.2754-.0145.5508-.0725.8262-.1304.1014-.1015.2608-.0435.3913-.058.0145-.203.087-.3914.087-.5943.029 0 .087-.0145.1159-.029.0145.145 0 .29.0435.4349.0724.058.1884.029.2754.0434 0 .058 0 .116.0144.174 1.6813-.0145 3.377 0 5.0583 0v.2464h.1595v-.9421h.1884c0 .2609-.0145.5072 0 .7681a.1107.1107 0 0 0 .0725.029c0 .029.0144.087.0144.116.058-.058.1305-.1015.2174-.0725.0145.0435.029.087.0435.145-.058.058-.087.1304-.058.2173.4639.0145.9277 0 1.406 0 .0434-.058.1159-.087.1884-.116.029.0146.0724.0436.087.058h.6811c.029.116.029.232.0145.3334h-.6957c-.0145.0145-.058.058-.087.0725-.0724-.0435-.1304-.0725-.2029-.116h-1.2609c-.2464.0725-.5073.058-.7537.0145v.2754h-2.0726c-.087.0725-.1739.116-.2898.1305.0434.2174-.203.2753-.29.4348-.0579.087-.1448.1449-.2318.1739-.0725.4493.087.8696.203 1.29-.1305.029-.2755.0724-.406.1014-.0724.2899-.1449.5942-.2028.884-.058.261-.261.4784-.5073.5798-.174.203-.4058.4059-.6812.4204-.1015.029-.174-.0435-.2464-.1015-.3623.029-.6957-.145-1.0146-.2899-.3478-.1594-.6667-.3623-1-.5507.029.2029-.0725.3768-.145.5507.1595.0725.3769.1305.4638.3044.058.1304.116.2754.116.4348-.0145.5218-.0725 1.0435-.1015 1.5653.0145.3769-.1739.7537-.4348 1.029-.1739-.0144-.3188-.0869-.4783-.1594-.058.1305-.1884.261-.116.4204.058.1884.058.3913.145.5652.4928.5218.9131 1.1015 1.2175 1.7537.3043.6233.5362 1.2755.7826 1.9277.0435 0 .1305-.0145.174-.0145.058.1884 0 .4058.116.5798.1014.1594.0724.3478.0724.5362-.029.4348-.058.8696-.1015 1.3044-.029.3044-.1014.6088-.1449.9132.0145.2318.116.4637.1014.6956-.0144.2175-.0144.4493-.1884.6088.0145.4928-.116.9855.058 1.4638.232.3189.4928.6233.7682.8986.3043.145.6667.174.9276.4349.1014.1594.0434.3478.0145.5217a6.7323 6.7323 0 0 1-1.8697 0c-.2464-.058-.4783-.1594-.7247-.1884-.3334.0145-.7247.145-1.029-.087-.029-.3913.1159-.7681.1884-1.145.029-.1304.1594-.2174.1449-.3478-.029-.4493-.058-.9131-.087-1.3624-.058-.029-.1594-.058-.1449-.145 0-.2173-.0725-.4347-.1304-.6377-.1015-.5507-.145-1.116-.1595-1.6812-.0145-.1595.087-.2754.203-.3769.029-.2464.058-.5072.0724-.7536-.0435-.1305-.145-.232-.203-.3479-.2608.029-.6376.087-.797-.1884-.3769-.5653-.7682-1.145-1.145-1.7102-.1595-.0145-.3479 0-.4928-.1015-.1595-.174-.261-.4058-.3624-.6232-.0435.1739-.0725.3623-.174.5072-.0869.145-.2318.2464-.3333.3769-.1014.2319-.1884.4638-.2753.6957-.1015.2898-.2464.5797-.2754.8986-.0145.1594-.0435.3044-.1015.4493-.0724.116-.2029.1594-.3188.2174-.087.1884-.145.3768-.2754.5363-.087.1014-.232.1304-.2899.2608-.058.174-.145.3334-.2174.4928-.029.174.087.3624.029.5363-.1015.4348-.3189.8406-.5218 1.232-.1014.2898-.1739.5942-.3188.8696-.058.116-.203.145-.3189.1594-.1304.3189-.2754.6232-.3623.9566-.0435.3188-.0435.6522-.029.971 0 .145.087.261.145.3914.0579.174.0144.3478-.0146.5218-.5652.0724-1.145.1304-1.6957-.0435-.058-.0435-.0435-.116-.058-.174-.0435-.2608-.0725-.5362.0145-.7826.1884-.6812.3478-1.3624.5362-2.0436-.0724-.0725-.1739-.1304-.1739-.2464-.0145-.1884 0-.3913.0435-.5797.087-.319.3189-.5653.4348-.8697.0435-.1304.029-.2609.0435-.3913 0-.3044.174-.5508.3044-.8116.1304-.2174.2318-.4493.4058-.6378.116-.1014.116-.2608.2029-.3913.087-.1594.2319-.2899.2319-.4783.029-.2319-.058-.4638-.029-.6957.058-.6812.1884-1.3479.3044-2.029-.058-.0726-.145-.145-.174-.2465.0145-.0724.029-.1304.0435-.2029l-.1304-.2174c.058-.087.116-.1884.174-.2754-.058-.0435-.1305-.1014-.1885-.145.0725-.2173.0435-.5362.3043-.6376.029.0145.1015.029.1305.0434-.0435-.3768-.0435-.7681-.087-1.145-.1014-.4058-.116-.826-.0724-1.232.1449-.2173.4203-.3043.6667-.3188-.3189-.0724-.6378-.1014-.9421-.2029-.0145-.2609.029-.5218.0725-.7826.1304-.5073.0724-1.029.1449-1.5509.0725-.1449.2609-.1739.4203-.1449.1884.029.3768-.029.5653-.087 0-.0724.0145-.1594 0-.2319-.116-.5072-.087-1.029 0-1.5218.116-.6377.3768-1.261.855-1.7102.319-.3044.7827-.4494 1.2176-.4349.1449 0 .2318.145.3478.232.058-.058.116-.116.1594-.174-.0724-.2464-.1884-.5073-.1739-.7681.029-.5798.2174-1.174.6522-1.5654m4.522 4.1017c.029.029.029.029 0 0m.203.029c.0144.1015.0434.203-.0145.2899-.0725.029-.1595.029-.232.0725.203 0 .4059.0145.6088 0 .1594-.0435.1015-.2464.1015-.3624-.1015-.116-.3189-.0435-.4638 0m-.5073.6088c.145.1594.2174.4058.3478.5652.1884-.2464.3334-.5073.5508-.7247-.2609-.0145-.5218.0145-.7827-.0145-.0435.058-.0724.116-.116.174Z"/></svg> \ No newline at end of file
diff --git a/assets/lib/simple-icons/icons/embarcadero.svg b/assets/lib/simple-icons/icons/embarcadero.svg
new file mode 100644
index 00000000..7a99106b
--- /dev/null
+++ b/assets/lib/simple-icons/icons/embarcadero.svg
@@ -0,0 +1 @@
+<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Embarcadero icon</title><path d="M12 0a11.963 11.963 0 0 0-8.485 3.515A11.963 11.963 0 0 0 0 12.001c0 3.313 1.344 6.311 3.515 8.484A11.96 11.96 0 0 0 12 24a11.96 11.96 0 0 0 8.485-3.515A11.968 11.968 0 0 0 24 12.001c0-3.315-1.344-6.314-3.515-8.486A11.963 11.963 0 0 0 12 0zm.052 4.401c1.233 0 2.344.222 3.332.664.988.443 1.804 1.142 2.449 2.096.58.842.956 1.818 1.128 2.93.1.65.14 1.587.122 2.811H8.764c.058 1.421.552 2.418 1.482 2.99.565.355 1.246.533 2.042.533.844 0 1.53-.217 2.057-.65.288-.234.542-.56.762-.975h3.783c-.1.84-.558 1.694-1.374 2.56-1.269 1.378-3.045 2.067-5.33 2.067-1.886 0-3.549-.58-4.99-1.743-1.442-1.162-2.162-3.053-2.162-5.672 0-2.455.65-4.337 1.951-5.646C8.286 5.056 9.975 4.4 12.052 4.4zm.001 3.055c-.95 0-1.688.27-2.211.81-.524.54-.852 1.27-.987 2.192h6.382c-.067-.983-.396-1.73-.987-2.238-.59-.51-1.323-.764-2.197-.764Z"/></svg> \ No newline at end of file
diff --git a/assets/lib/simple-icons/icons/fastify.svg b/assets/lib/simple-icons/icons/fastify.svg
new file mode 100644
index 00000000..001dc37f
--- /dev/null
+++ b/assets/lib/simple-icons/icons/fastify.svg
@@ -0,0 +1 @@
+<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Fastify icon</title><path d="M23.245 6.49L24 4.533l-.031-.121-7.473 1.967c.797-1.153.523-2.078.523-2.078s-2.387 1.524-4.193 1.485c-1.804-.04-2.387-.52-5.155.362-2.768.882-3.551 3.59-4.351 4.173-.804.583-3.32 2.477-3.32 2.477l.006.034 2.27-.724s-.622.585-1.945 2.37l-.062-.057.002.011s1.064 1.626 2.107 1.324a2.14 2.14 0 0 0 .353-.147c.419.234.967.463 1.572.525 0 0-.41-.475-.752-1.017l.238-.154.865.318-.096-.812c.003-.003.006-.003.008-.006l.849.311-.105-.738a5.65 5.65 0 0 1 .322-.158l.885-3.345 3.662-2.497-.291.733c-.741 1.826-2.135 2.256-2.135 2.256l-.582.22c-.433.512-.614.637-.764 2.353.348-.088.682-.107.984-.028 1.564.421 2.107 2.307 1.685 2.827-.104.13-.356.354-.673.617H7.77l-.008.514-.065.051h-.645l-.009.504-.17.127c-.607.011-1.373-.518-1.373-.518 0 .481.401 1.225.401 1.225l.07-.034-.061.045s1.625 1.083 2.646.681c.91-.356 3.263-2.213 5.296-3.093l6.15-1.62.811-2.1-4.688 1.235v-1.889l5.5-1.448.811-2.1-6.31 1.662V8.367zm-11.163 4l1.459-.384.02.074-.455 1.179-1.513.398zm.503 2.526l-1.512.398.489-1.266 1.459-.385.02.074zm1.971-.424l-1.513.398.49-1.266 1.459-.385.02.073Z"/></svg> \ No newline at end of file
diff --git a/assets/lib/simple-icons/icons/husqvarna.svg b/assets/lib/simple-icons/icons/husqvarna.svg
new file mode 100644
index 00000000..5a8cb880
--- /dev/null
+++ b/assets/lib/simple-icons/icons/husqvarna.svg
@@ -0,0 +1 @@
+<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Husqvarna icon</title><path d="M12.001 14.457c2.04 0 1.997 0 1.997.645v4.054h2.775V7.927h-2.775v3.371c0 .664.042.662-1.997.662h.001c-2.04 0-1.996.002-1.996-.662v-3.37H7.23v11.228h2.775v-4.054c0-.644-.043-.645 1.996-.645M12 0c1.04 0 1.72.18 2.004.241-.143 1.307-.1 2.355 0 2.657.347 1.006 2.32 1.475 3.115 1.012.878-.523.676-2.109.676-3.155 0 0 1.294.301 2.086.594.644.238 1.593.703 1.593.703.188 1.323.01 3.281-1.316 3.945 1 .985 1.335 2.152 1.764 4.304.346 1.932.265 3.28.243 4.405-.101 1.53-.101 2.354-.468 3.743-.53 1.588-.844 2.335-1.918 3.438C17.599 24.131 14.045 24 12 23.998c-2.045.001-5.598.133-7.779-2.11-1.074-1.104-1.388-1.85-1.918-3.439-.367-1.389-.367-2.213-.469-3.743-.02-1.126-.102-2.473.245-4.405.428-2.152.763-3.319 1.763-4.304-1.326-.664-1.504-2.622-1.316-3.945 0 0 .95-.465 1.593-.703.792-.293 2.085-.594 2.085-.594 0 1.046-.201 2.632.676 3.155.797.463 2.768-.006 3.116-1.012.102-.302.142-1.35 0-2.657C10.28.181 10.959 0 12 0m-.004 21.125c2.387 0 3.149 0 4.331-.322.408-.14 1.143-.341 1.674-1.166.979-1.65.979-4.747.979-6.236 0-1.49 0-4.125-.979-5.754-.53-.846-1.255-1.078-1.674-1.188-1.208-.316-1.983-.297-4.331-.302h.002c-2.348.005-3.123-.014-4.331.302-.418.11-1.143.342-1.674 1.188-.979 1.63-.979 4.264-.979 5.754 0 1.489 0 4.586.98 6.236.53.825 1.264 1.025 1.673 1.166 1.182.323 1.944.322 4.33.322Z"/></svg> \ No newline at end of file
diff --git a/assets/lib/simple-icons/icons/insomnia.svg b/assets/lib/simple-icons/icons/insomnia.svg
new file mode 100644
index 00000000..5769d706
--- /dev/null
+++ b/assets/lib/simple-icons/icons/insomnia.svg
@@ -0,0 +1 @@
+<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Insomnia icon</title><path d="M12 0C5.417 0 0 5.417 0 12s5.417 12 12 12 12-5.417 12-12S18.583 0 12 0zm0 2.478c5.256 0 9.522 4.266 9.522 9.522S17.256 21.522 12 21.522 2.478 17.256 2.478 12c0-.885.12-1.741.347-2.554a4.76 4.76 0 0 0 3.925 2.066 4.764 4.764 0 0 0 4.762-4.762 4.758 4.758 0 0 0-2.067-3.925A9.526 9.526 0 0 1 12 2.478Z"/></svg> \ No newline at end of file
diff --git a/assets/lib/simple-icons/icons/jrgroup.svg b/assets/lib/simple-icons/icons/jrgroup.svg
new file mode 100644
index 00000000..d3f37974
--- /dev/null
+++ b/assets/lib/simple-icons/icons/jrgroup.svg
@@ -0,0 +1 @@
+<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>JR Group icon</title><path d="M19.955 13.653h1.089c2.684 0 2.684-4.123 2.684-4.123s0-4.162-2.684-4.162H9.18v8.869c0 1.556-3.112 1.478-3.112 1.478s-3.073.116-3.073-1.478v-3.423H0v4.395c0 3.19 5.68 3.384 6.107 3.423.428 0 6.107-.194 6.107-3.423V8.363h7.896c.661 0 .661 1.167.661 1.167s0 1.167-.66 1.167h-6.069l5.952 7.702H24Z"/></svg> \ No newline at end of file
diff --git a/assets/lib/simple-icons/icons/loom.svg b/assets/lib/simple-icons/icons/loom.svg
new file mode 100644
index 00000000..a8c39ea4
--- /dev/null
+++ b/assets/lib/simple-icons/icons/loom.svg
@@ -0,0 +1 @@
+<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Loom icon</title><path d="M19.4 4.64C18.02 1.82 15.15 0 12 0 8.76 0 5.98 1.89 4.64 4.6 1.82 5.98 0 8.85 0 12c0 3.24 1.89 6.02 4.6 7.36C5.98 22.18 8.85 24 12 24c3.24 0 6.02-1.89 7.36-4.61C22.18 18.02 24 15.15 24 12c0-3.24-1.89-6.02-4.6-7.36zM12 1.5c1.99 0 3.87.89 5.13 2.37-.45-.08-.91-.12-1.38-.12-3.34 0-6.21 1.99-7.52 4.86h-.01v.03C7.76 9.67 7.5 10.8 7.5 12c0 .46.04.93.12 1.38-1.47-1.26-2.37-3.14-2.37-5.13C5.25 4.53 8.28 1.5 12 1.5zM12 9c.89 0 1.71.18 2.49.48.33.81.51 1.65.51 2.52 0 .89-.18 1.72-.48 2.49-.81.33-1.65.51-2.52.51-.89 0-1.72-.18-2.49-.48C9.18 13.71 9 12.87 9 12c0-.89.18-1.73.48-2.49C10.29 9.18 11.13 9 12 9zM1.5 12c0-1.99.89-3.87 2.37-5.13-.08.45-.12.91-.12 1.38 0 3.34 1.99 6.21 4.86 7.52v.01h.03c1.03.46 2.16.72 3.36.72.47 0 .93-.04 1.38-.12-1.26 1.47-3.14 2.37-5.13 2.37-3.72 0-6.75-3.03-6.75-6.75zM12 22.5c-1.99 0-3.87-.89-5.13-2.37.45.07.91.12 1.38.12 3.34 0 6.21-1.99 7.52-4.86l.02-.03c.46-1.03.72-2.16.72-3.36 0-.47-.04-.93-.12-1.38 1.47 1.26 2.37 3.14 2.37 5.13-.01 3.72-3.04 6.75-6.76 6.75zm8.13-5.37c.08-.45.12-.92.12-1.38 0-3.35-1.99-6.21-4.86-7.52-.02-.02-.02-.02-.03-.02-1.03-.45-2.16-.71-3.36-.71-.47 0-.93.04-1.38.12 1.26-1.47 3.14-2.37 5.13-2.37 3.72 0 6.75 3.03 6.75 6.75 0 1.99-.89 3.87-2.37 5.13z"/></svg> \ No newline at end of file
diff --git a/assets/lib/simple-icons/icons/microsoftacademic.svg b/assets/lib/simple-icons/icons/microsoftacademic.svg
new file mode 100644
index 00000000..fcc1d15c
--- /dev/null
+++ b/assets/lib/simple-icons/icons/microsoftacademic.svg
@@ -0,0 +1 @@
+<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Microsoft Academic icon</title><path d="M19.056 23.992c-4.018-2.966-10.695-8.022-19-9.125l3.55-3.472c10.19 3.935 15.45 12.597 15.45 12.597zM.48 18.437l2.77-2.217C11.334 18.208 18.19 24 18.19 24 15.303 22.37 7.113 18.36.48 18.437zm2.543-8.042l9.25-8.23 1.992 1.153L9.78 8.41c4.83 3.983 10.19 8.22 9.71 15.127C14.734 16.799 9.127 11.98 3.024 10.395zm7.907-2.131L18.035 0c3.791 3.1 5.91 7.913 5.91 10.513-.309 3.322-3.558 11.35-3.858 12.236-.225-2.007 1.434-5.56-9.157-14.485z"/></svg> \ No newline at end of file
diff --git a/assets/lib/simple-icons/icons/musicbrainz.svg b/assets/lib/simple-icons/icons/musicbrainz.svg
new file mode 100644
index 00000000..1fab3358
--- /dev/null
+++ b/assets/lib/simple-icons/icons/musicbrainz.svg
@@ -0,0 +1 @@
+<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>MusicBrainz icon</title><path d="M11.582 0L1.418 5.832v12.336L11.582 24V10.01L7.1 12.668v3.664c.01.111.01.225 0 .336-.103.435-.54.804-1 1.111-.802.537-1.752.509-2.166-.111-.413-.62-.141-1.631.666-2.168.384-.28.863-.399 1.334-.332V6.619c0-.154.134-.252.226-.308L11.582 3zm.836 0v6.162c.574.03 1.14.16 1.668.387a2.225 2.225 0 0 0 1.656-.717 1.02 1.02 0 1 1 1.832-.803l.004.006a1.022 1.022 0 0 1-1.295 1.197c-.34.403-.792.698-1.297.85.34.263.641.576.891.928a1.04 1.04 0 0 1 .777.125c.768.486.568 1.657-.318 1.857-.886.2-1.574-.77-1.09-1.539.02-.03.042-.06.065-.09a3.598 3.598 0 0 0-1.436-1.166 4.142 4.142 0 0 0-1.457-.369v4.01c.855.06 1.256.493 1.555.834.227.256.356.39.578.402.323.018.568.008.806 0a5.44 5.44 0 0 1 .895.022c.94-.017 1.272-.226 1.605-.446a2.533 2.533 0 0 1 1.131-.463 1.027 1.027 0 0 1 .12-.263 1.04 1.04 0 0 1 .105-.137c.023-.025.047-.044.07-.066a4.775 4.775 0 0 1 0-2.405l-.012-.01a1.02 1.02 0 1 1 .692.272h-.057a4.288 4.288 0 0 0 0 1.877h.063a1.02 1.02 0 1 1-.545 1.883l-.047-.033a1 1 0 0 1-.352-.442 1.885 1.885 0 0 0-.814.354 3.03 3.03 0 0 1-.703.365c.757.555 1.772 1.6 2.199 2.299a1.03 1.03 0 0 1 .256-.033 1.02 1.02 0 1 1-.545 1.88l-.047-.03a1.017 1.017 0 0 1-.27-1.376.72.72 0 0 1 .051-.072c-.445-.775-2.026-2.28-2.46-2.387a4.037 4.037 0 0 0-1.31-.117c-.24.008-.513.018-.866 0-.515-.027-.783-.333-1.043-.629-.26-.296-.51-.56-1.055-.611V18.5a1.877 1.877 0 0 0 .426-.135.333.333 0 0 1 .058-.027c.56-.267 1.421-.91 2.096-2.447a1.02 1.02 0 0 1-.27-1.344 1.02 1.02 0 1 1 .915 1.54 6.273 6.273 0 0 1-1.432 2.136 1.785 1.785 0 0 1 .691.306.667.667 0 0 0 .37.168 3.31 3.31 0 0 0 .888-.222 1.02 1.02 0 0 1 1.787-.79v-.005a1.02 1.02 0 0 1-.773 1.683 1.022 1.022 0 0 1-.719-.287 3.935 3.935 0 0 1-1.168.287h-.05a1.313 1.313 0 0 1-.71-.275c-.262-.177-.51-.345-1.402-.12a2.098 2.098 0 0 1-.707.2V24l10.164-5.832V5.832zm4.154 4.904a.352.352 0 0 0-.197.639l.018.01c.163.1.378.053.484-.108v-.002a.352.352 0 0 0-.303-.539zm-4.99 1.928L7.082 9.5v2l4.5-2.668zm8.385.38a.352.352 0 0 0-.295.165v.002a.35.35 0 0 0 .096.473l.013.01a.357.357 0 0 0 .487-.108.352.352 0 0 0-.301-.541zM16.09 8.647a.352.352 0 0 0-.277.163.355.355 0 0 0 .296.54c.482 0 .463-.73-.02-.703zm3.877 2.477a.352.352 0 0 0-.295.164.35.35 0 0 0 .094.475l.015.01a.357.357 0 0 0 .485-.11.352.352 0 0 0-.3-.539zm-4.375 3.594a.352.352 0 0 0-.291.172.35.35 0 0 0-.04.265.352.352 0 1 0 .33-.437zm4.375.789a.352.352 0 0 0-.295.164v.002a.352.352 0 0 0 .094.473l.015.01a.357.357 0 0 0 .485-.108.352.352 0 0 0-.3-.54zm-2.803 2.488v.002a.347.347 0 0 0-.223.084.352.352 0 0 0 .23.62.347.347 0 0 0 .23-.085.348.348 0 0 0 .12-.24.353.353 0 0 0-.35-.38.347.347 0 0 0-.007 0Z"/></svg> \ No newline at end of file
diff --git a/assets/lib/simple-icons/icons/newrelic.svg b/assets/lib/simple-icons/icons/newrelic.svg
new file mode 100644
index 00000000..56f2d0ab
--- /dev/null
+++ b/assets/lib/simple-icons/icons/newrelic.svg
@@ -0,0 +1 @@
+<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>New Relic icon</title><path d="M11.9994 16.3548a4.354 4.354 0 1 1 4.354-4.354 4.3598 4.3598 0 0 1-4.354 4.354zm0-8.1333a3.7793 3.7793 0 1 0 3.7793 3.7792 3.7836 3.7836 0 0 0-3.7793-3.7792zm1.0289 10.9181a6.9722 6.9722 0 1 1 6.9737-6.9722 6.9808 6.9808 0 0 1-6.9737 6.9722zm0-13.3639a6.3974 6.3974 0 1 0 6.3989 6.3975 6.4046 6.4046 0 0 0-6.399-6.4032zm-2.1727 15.998c-5.3657 0-9.7571-2.9617-10.6782-7.2037C-.9521 9.3725 3.4307 3.991 9.9488 2.5727a15.0552 15.0552 0 0 1 3.193-.3463c5.3657 0 9.7571 2.9616 10.6782 7.2021.5504 2.5305-.171 5.1732-2.0319 7.445-1.8609 2.2719-4.5983 3.8684-7.7396 4.5524a15.0495 15.0495 0 0 1-3.193.3477zm2.2848-18.9682a14.479 14.479 0 0 0-3.0694.329C3.8632 4.484-.3241 9.5594.7392 14.448c.8622 3.9747 5.0295 6.7538 10.1164 6.7538a14.4833 14.4833 0 0 0 3.0708-.3334c3.0177-.6567 5.653-2.2029 7.4163-4.354 1.7631-2.1512 2.427-4.5984 1.9154-6.9593-.8636-3.9776-5.0236-6.7538-10.1163-6.7538Z"/></svg> \ No newline at end of file
diff --git a/assets/lib/simple-icons/icons/pandas.svg b/assets/lib/simple-icons/icons/pandas.svg
new file mode 100644
index 00000000..2f517342
--- /dev/null
+++ b/assets/lib/simple-icons/icons/pandas.svg
@@ -0,0 +1 @@
+<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>pandas icon</title><path d="M16.922 0h2.623v18.104h-2.623zm-4.126 12.94h2.623v2.57h-2.623zm0-7.037h2.623v5.446h-2.623zm0 11.197h2.623v5.446h-2.623zM4.456 5.896h2.622V24H4.455zm4.213 2.559h2.623v2.57H8.67zm0 4.151h2.623v5.447H8.67zm0-11.187h2.623v5.446H8.67Z"/></svg> \ No newline at end of file
diff --git a/assets/lib/simple-icons/icons/rancher.svg b/assets/lib/simple-icons/icons/rancher.svg
new file mode 100644
index 00000000..addde9c6
--- /dev/null
+++ b/assets/lib/simple-icons/icons/rancher.svg
@@ -0,0 +1 @@
+<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Rancher icon</title><path d="M22.727 9.007a.713.713 0 01-.726.855h-1.542V8.798h.468a.883.883 0 00.875-.875v-.388c0-.477.12-.875.269-.875.139 0 .328.388.407.865l.249 1.482zm-3.49-1.253c.486 0 .874.388.894.885v4.555a.883.883 0 01-.875.875h-2.357a.883.883 0 01-.875-.875v-1.79a.871.871 0 00-.348.696v1.502c0 .477.397.875.875.875h1.531v2.327a.535.535 0 01-.537.538h-2.884a.535.535 0 01-.537-.538v-2.168a.535.535 0 00-.537-.537h-7.2a.535.535 0 00-.538.537v2.168a.535.535 0 01-.537.538H2.428a.535.535 0 01-.537-.538V10.58L.588 11.603c-.06.04-.14.04-.189-.02l-.368-.438a.135.135 0 01-.01-.159l1.91-2.914a.536.536 0 01.487-.318h10.165a.54.54 0 01.527.627l-.21 1.243a.54.54 0 00.528.626h2.039a.535.535 0 00.527-.437c-.13.04-.269.06-.418.06h-1.452c-.487 0-.815-.388-.736-.866l.249-1.482c.08-.477.258-.865.407-.865.15 0 .269.398.269.875v.229c.02-.01.05-.01.08-.01h4.843zm3.65-.537c0-.388.288-.557.556-.557.269 0 .557.17.557.557 0 .378-.288.547-.557.547-.268 0-.557-.17-.557-.547zm.984 0c0-.308-.2-.438-.418-.438-.219 0-.428.13-.428.438 0 .298.21.438.428.438.219-.01.418-.14.418-.438zm-.607-.279h.199c.1 0 .199.03.199.17 0 .08-.06.129-.13.149l.13.228h-.12l-.119-.218h-.05v.218h-.109v-.547zm.199.25c.05 0 .09-.03.09-.08 0-.06-.05-.07-.09-.07h-.1v.15h.1z"/></svg> \ No newline at end of file
diff --git a/assets/lib/simple-icons/icons/runkit.svg b/assets/lib/simple-icons/icons/runkit.svg
new file mode 100644
index 00000000..577f3bdb
--- /dev/null
+++ b/assets/lib/simple-icons/icons/runkit.svg
@@ -0,0 +1 @@
+<svg role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><title>RunKit icon</title><path d="M23.97 14.8a3 3 0 0 1-1.47 3.02l-9 5.2a3 3 0 0 1-3 0l-9-5.2A3 3 0 0 1 .03 14.8l1.32-7.2a3 3 0 0 1 .98-1.82 2.96 2.96 0 0 1 .49-.35l7.55-4.37a3.01 3.01 0 0 1 3.28.02l7.53 4.35c.1.05.19.1.28.17a3 3 0 0 1 1.19 2zM14.43 4.03L6.71 5.62c-.43.08-.51.64-.14.86l5.6 3.23c.23.13.5.07.63-.19l1.58-3.6.53-1.22c.16-.35-.11-.75-.5-.67z"/></svg> \ No newline at end of file
diff --git a/assets/lib/simple-icons/icons/scopus.svg b/assets/lib/simple-icons/icons/scopus.svg
new file mode 100644
index 00000000..59369d1a
--- /dev/null
+++ b/assets/lib/simple-icons/icons/scopus.svg
@@ -0,0 +1 @@
+<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Scopus icon</title><path d="M24 19.059l-.14-1.777c-1.426.772-2.945 1.076-4.465 1.076-3.319 0-5.96-2.782-5.96-6.475 0-3.903 2.595-6.31 5.633-6.31 1.917 0 3.39.303 4.792 1.075L24 4.895c-1.286-.608-2.337-.889-4.698-.889-4.534 0-7.97 3.53-7.97 8.017 0 5.12 4.09 7.924 7.9 7.924 1.916 0 3.506-.257 4.768-.888zm-14.954-3.46c0-2.22-1.964-3.225-3.857-4.347C3.716 10.364 2.15 9.756 2.15 8.12c0-1.215.889-2.548 2.642-2.548 1.519 0 2.57.234 3.903 1.029l.117-1.847c-1.239-.514-2.127-.748-4.137-.748C1.8 4.006.047 5.876.047 8.26c0 2.384 2.103 3.413 4.02 4.581 1.426.865 2.922 1.45 2.922 2.992 0 1.496-1.333 2.571-2.922 2.571-1.566 0-2.594-.35-3.786-1.075L0 19.176c1.215.56 2.454.818 4.16.818 2.385 0 4.885-1.473 4.885-4.395z"/></svg> \ No newline at end of file
diff --git a/assets/lib/simple-icons/icons/slideshare.svg b/assets/lib/simple-icons/icons/slideshare.svg
new file mode 100644
index 00000000..d1c70375
--- /dev/null
+++ b/assets/lib/simple-icons/icons/slideshare.svg
@@ -0,0 +1 @@
+<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>SlideShare icon</title><path d="M3.222.058c-1.46 0-2.162 1.127-2.162 2.287v7.883c-.53-.502-1.096-.15-1.058.295.038.439.59 1.546 1.436 2.517.843.968 1.924 1.776 2.94 2.268a11.19 11.19 0 0 0-.491 3.598c.09 1.096.378 1.95.903 2.75.918 1.407 2.32 1.985 3.674 1.985 1.209 0 2.494-.563 2.698-2.373v-4.694c1.308.552 3.47.363 4.47-.39.19-.14.326-.207.416-.113.095.09.106.166-.113.439a5.6 5.6 0 0 1-3.103 1.965l.008 2.72a2.532 2.532 0 0 0 2.543 2.446c1.64.015 2.48-.556 3.148-1.164.632-.567 1.399-1.754 1.558-3.243a10.128 10.128 0 0 0-.454-3.926 10.358 10.358 0 0 0 2.948-2.268c.63-.691 1.417-2.007 1.417-2.517 0-.51-.556-.782-1.036-.302V2.345c0-.824-.48-2.29-2.135-2.29zm.423 1.35H20.41c.756 0 1.171.28 1.171 1.224v8.904a8.73 8.73 0 0 1-3.556 1.534c-1.606.352-2.94.087-3.666.148-.718.06-1.428.529-1.296 1.791-.491-.155-1.236-.684-1.682-1.118-.438-.428-.87-.711-1.534-.692-1.013.03-1.663.102-2.57.011a9.656 9.656 0 0 1-4.838-1.787V2.628c0-.869.378-1.22 1.206-1.22zm4.497 4.988a2.993 2.993 0 1 0 0 5.987 2.993 2.993 0 0 0 0-5.983zm7.71 0a2.993 2.993 0 1 0 0 5.987 2.993 2.993 0 0 0 0-5.983z"/></svg> \ No newline at end of file
diff --git a/assets/lib/simple-icons/icons/snyk.svg b/assets/lib/simple-icons/icons/snyk.svg
index 09b0ff5a..76920160 100644
--- a/assets/lib/simple-icons/icons/snyk.svg
+++ b/assets/lib/simple-icons/icons/snyk.svg
@@ -1 +1 @@
-<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Snyk icon</title><path d="M15.3.002C15.291 0 15.285 0 15.281.004c-.047.055-.25 1.273-.449 2.706-.204 1.47-.468 2.851-.604 3.17l-.243.566-.555-.11c-.707-.14-2.091-.14-2.787-.003-.515.102-.548.089-.795-.326-.186-.311-.356-1.157-.612-3.037C9.042 1.538 8.852.256 8.814.123c-.053-.189-.157-.088-.469.456-.625 1.092-1.756 3.65-1.998 4.52l-.219.787.487 1.296.486 1.296-.142 1.405a29.787 29.787 0 0 0-.141 2.39c0 .95.021 1.02.569 1.834l.569.847-.314 2.847c-.3 2.73-.304 2.855-.08 3.025.128.097.27.178.314.18.045.003.188-1.05.317-2.34.13-1.29.277-2.344.328-2.344.207 0 .25 2.075.074 3.516-.137 1.117-.146 1.538-.036 1.654.082.085.88.683 1.776 1.328s1.645 1.176 1.666 1.18c.021.004 1.077-.737 2.345-1.645 1.269-.908 2.321-1.66 2.34-1.672.018-.011-.11-1.32-.283-2.906l-.315-2.885.575-.859c.661-.986.672-1.08.433-3.899l-.144-1.693.48-1.276.48-1.275-.282-.939C17.306 3.873 15.524.105 15.3.002zm.358 2.252c.133 0 .78 1.414 1.205 2.629.264.757.28.912.136 1.391-.089.296-.214.539-.277.539-.267 0-1.12-2.348-1.183-3.257-.047-.676.01-1.302.12-1.302zm-7.27.093c.005 0 .01 0 .013.004.34.341.021 2.34-.598 3.74-.167.378-.362.724-.433.768-.07.043-.203-.186-.294-.51-.131-.47-.132-.702-.005-1.138.283-.967 1.155-2.854 1.316-2.864zm1.556 1.86v.359c.001.197.063.578.137.847.15.541.162.544 1.205.352a3.976 3.976 0 0 1 1.54.009c.976.177 1.093.092 1.22-.882l.09-.684H12.04zm-4.038.542l-.814.22-.814.22-.028 6.64-.029 6.642 1.257.878c.69.483 1.285.848 1.321.812.036-.035.192-1.222.347-2.636l.282-2.571-.377-.555c-.777-1.144-.802-1.29-.623-3.759l.162-2.23-.425-1.125c-.362-.96-.412-1.23-.342-1.831zm12.244 0l.078.674c.066.57.006.864-.387 1.91-.256.681-.438 1.355-.404 1.499.146.63.29 3.699.197 4.209-.057.309-.309.865-.56 1.237l-.458.676.3 2.605c.164 1.433.304 2.622.31 2.642.022.066.448-.212 1.51-.986l1.043-.76V5.188l-.814-.22zm-9.203.437c.03-.002.052.096.09.27.087.416.104.45.599 1.246l.295.476.523-.18c.287-.1.76-.218 1.048-.265.476-.076.526-.057.526.194 0 .221-.079.277-.394.277-.216 0-.727.117-1.135.26-.408.143-.755.26-.773.26-.017 0-.186-.263-.375-.586-.189-.322-.358-.586-.377-.586-.018 0-.23.308-.47.684-.314.492-.441.848-.454 1.27-.01.323-.065 1.452-.124 2.51l-.107 1.923.493.714c.27.393.505.715.521.715.312 0 .91-.398 1.302-.866.366-.439.525-.55.597-.42.131.237.176 3.206.056 3.667-.124.479.247.924.681.815.267-.067.299-.029.299.36a.954.954 0 0 1-.302.72c-.39.367-1.11.373-1.568.013-.389-.305-.67-1.163-.808-2.466-.081-.768-.161-.943-.859-1.88-.423-.57-.807-1.185-.853-1.368-.046-.184-.01-1.314.079-2.512s.127-2.235.085-2.304c-.043-.069.154-.484.438-.923.284-.44.618-1.102.743-1.474.127-.377.184-.543.224-.544zm5.562 4.778c.205.012.32.134.32.366 0 .311-.039.327-.88.364-.483.02-.878.009-.878-.027s.261-.22.58-.406c.36-.21.654-.31.858-.297zm-4.992.02c.356-.007.888.193 1.143.475.234.26.23.261-.56.261-.65 0-.822-.045-.93-.246-.099-.184-.082-.289.065-.41a.457.457 0 0 1 .282-.08zm.747 1.257c.288 0 .25.486-.05.647-.359.192-.495.17-.79-.125-.344-.344-.33-.55.032-.498.202.029.28.116.252.28-.03.172.026.226.195.191.139-.028.22-.14.198-.271-.022-.131.045-.224.163-.224zm4.299 0c.288 0 .25.486-.051.647-.358.192-.495.17-.79-.125-.344-.344-.33-.55.032-.498.202.029.28.116.252.28-.029.172.026.226.196.191.138-.028.22-.14.198-.271-.023-.131.045-.224.163-.224zm-1.27 1.696c.062.003.347.263.663.605.417.451.758.694 1.068.76.661.14.701.192.398.514-.32.341-.528.988-.528 1.644 0 .699-.37 1.806-.72 2.156-.685.685-1.885.23-1.885-.716 0-.36.038-.412.254-.343.395.125.84-.387.714-.825-.102-.356-.078-3.684.028-3.793.002-.002.005-.003.009-.002zm-1.265 6.38c.637 0 .857.154.446.312s-1.097.037-1.097-.192c0-.066.293-.12.651-.12zm-1.326.087l.413.348c.556.468 1.266.472 1.815.01.383-.322.401-.326.401-.068 0 .148-.144.363-.32.479-.784.513-2.167.236-2.264-.454z"/></svg> \ No newline at end of file
+<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Snyk icon</title><path d="M17.097 13.344c.143-.37.06-2.117-.222-4.675l-.004-.04.904-2.431v-.05c0-1.06-1.374-3.9-2.186-5.41L15.192 0l-.84 5.854-.503.829-.125-.042c-.351-.118-1.042-.316-1.728-.316-.65 0-1.294.171-1.72.315l-.125.042-.504-.827L8.807 0l-.396.737c-.812 1.51-2.186 4.35-2.186 5.411v.05l.904 2.432-.004.039c-.283 2.558-.366 4.305-.222 4.674.13.332.642 1.041 1.072 1.605l-.619 5.724.617.442.576-5.329c.012.414.064 1.277.275 2.068l-.389 3.592L12 24l4.279-3.067.375-.268-.62-5.73c.428-.561.934-1.262 1.063-1.591zM15.59 2.298c.694 1.408 1.421 3.08 1.471 3.779l-.388 1.045c-.935-1.31-1.228-3.441-1.253-3.636zm-1.124 7.8c.84 0 .212.712.138.792h-1.587c.144-.18.69-.792 1.45-.792zm-.452 1.468a.178.178 0 0 1-.175.153.292.292 0 1 0 .441-.31h.504v.024a.662.662 0 0 1-1.325 0v-.025h.511l-.008.007c.039.038.06.093.052.15zM12.39 19.29c.097.064.2.115.306.156-.168.19-.399.287-.697.287-.299 0-.53-.097-.697-.288.107-.04.21-.092.306-.156a.573.573 0 0 0 .391.114c.103 0 .255 0 .391-.113zm-2.62-7.724a.178.178 0 0 1-.174.153.292.292 0 1 0 .441-.31h.504v.024a.662.662 0 0 1-1.326 0v-.025h.511l-.008.007c.039.038.06.093.052.15zm-.374-.676c-.074-.08-.702-.792.138-.792.759 0 1.305.612 1.45.792zM6.948 6.077c.05-.699.778-2.37 1.471-3.78l.185 1.29c-.07.48-.393 2.37-1.257 3.56zM9.473 18.09c-.373-1.02-.377-2.446-.377-2.507v-.097l-.06-.076c-.551-.683-1.477-1.9-1.616-2.257l-.005-.014c-.124-.43.1-2.997.268-4.513l.008-.066-.187-.502.07-.075c.476-.497.88-1.213 1.203-2.126L9 5.223l.118.82.807 1.326.22-.094c.009-.004.934-.4 1.851-.4H12v.44h-.004c-.812 0-1.669.36-1.677.363l-.571.246-.797-1.308c-.27.62-.585 1.137-.94 1.543l.129.347-.019.169c-.24 2.156-.348 4.044-.285 4.332.086.2.523.812 1 1.437l.748-.218 1.17-1.334.184 3.458c-.011.015-.28.393-.28.609 0 .235.344.541.685.786.005-.01.007-.02.013-.03.12-.212.275-.251.346-.087.04.092.028.369.028.369l.005.002v.328c-.013.027-.302.674-1.014.674-.275 0-.948-.089-1.248-.911zm2.536 2.409c-.527 0-1.297-.257-1.374-.952.029.001.057.003.086.003.06 0 .119-.003.177-.01.235.455.665.6 1.102.6.436 0 .865-.146 1.1-.6.059.007.119.01.18.01.029 0 .057-.002.085-.003-.076.695-.835.952-1.356.952zm2.956-5.09l-.061.077v.097c0 .06-.004 1.487-.377 2.507-.3.822-.973.91-1.248.91-.71 0-1.002-.658-1.014-.686V18l.005-.004s-.012-.276.028-.368c.07-.164.226-.126.346.088.006.009.009.02.013.03.34-.246.686-.552.686-.787 0-.216-.269-.593-.28-.61l.183-3.457 1.17 1.334 1.2.35c-.23.304-.463.6-.651.834zm-8.472-1.907c-.22-.563-.022-2.916.187-4.817l-.895-2.409v-.128c0-.312.095-.734.246-1.207-1.177.253-1.808.49-1.808.49v12.996l2.67 1.914.577-5.332c-.538-.718-.868-1.226-.977-1.507zm3.853-7.346c.446-.136 1.042-.27 1.65-.27.61 0 1.21.135 1.658.27l.276-.453.184-1.288s-1.288-.068-2.103-.068c-.759 0-1.467.026-2.125.07l.184 1.286zm7.623-1.217c.151.474.247.896.247 1.21v.127l-.895 2.409c.208 1.901.406 4.253.186 4.818-.109.279-.435.782-.968 1.493l.578 5.337 2.66-1.906V5.432s-.632-.24-1.808-.493Z"/></svg> \ No newline at end of file
diff --git a/assets/lib/simple-icons/icons/sqlite.svg b/assets/lib/simple-icons/icons/sqlite.svg
new file mode 100644
index 00000000..7fde5f0b
--- /dev/null
+++ b/assets/lib/simple-icons/icons/sqlite.svg
@@ -0,0 +1 @@
+<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>SQLite icon</title><path d="M21.678.521c-1.032-.92-2.28-.55-3.513.544a8.71 8.71 0 0 0-.547.535c-2.109 2.237-4.066 6.38-4.674 9.544.237.48.422 1.093.544 1.561a13.044 13.044 0 0 1 .164.703s-.019-.071-.096-.296l-.05-.146a1.689 1.689 0 0 0-.033-.08c-.138-.32-.518-.995-.686-1.289-.143.423-.27.818-.376 1.176.484.884.778 2.4.778 2.4s-.025-.099-.147-.442c-.107-.303-.644-1.244-.772-1.464-.217.804-.304 1.346-.226 1.478.152.256.296.698.422 1.186.286 1.1.485 2.44.485 2.44l.017.224a22.41 22.41 0 0 0 .056 2.748c.095 1.146.273 2.13.5 2.657l.155-.084c-.334-1.038-.47-2.399-.41-3.967.09-2.398.642-5.29 1.661-8.304 1.723-4.55 4.113-8.201 6.3-9.945-1.993 1.8-4.692 7.63-5.5 9.788-.904 2.416-1.545 4.684-1.931 6.857.666-2.037 2.821-2.912 2.821-2.912s1.057-1.304 2.292-3.166c-.74.169-1.955.458-2.362.629-.6.251-.762.337-.762.337s1.945-1.184 3.613-1.72C21.695 7.9 24.195 2.767 21.678.521m-18.573.543A1.842 1.842 0 0 0 1.27 2.9v16.608a1.84 1.84 0 0 0 1.835 1.834h9.418a22.953 22.953 0 0 1-.052-2.707c-.006-.062-.011-.141-.016-.2a27.01 27.01 0 0 0-.473-2.378c-.121-.47-.275-.898-.369-1.057-.116-.197-.098-.31-.097-.432 0-.12.015-.245.037-.386a9.98 9.98 0 0 1 .234-1.045l.217-.028c-.017-.035-.014-.065-.031-.097l-.041-.381a32.8 32.8 0 0 1 .382-1.194l.2-.019c-.008-.016-.01-.038-.018-.053l-.043-.316c.63-3.28 2.587-7.443 4.8-9.791.066-.069.133-.128.198-.194Z"/></svg> \ No newline at end of file
diff --git a/assets/lib/simple-icons/icons/ssrn.svg b/assets/lib/simple-icons/icons/ssrn.svg
new file mode 100644
index 00000000..0061f97e
--- /dev/null
+++ b/assets/lib/simple-icons/icons/ssrn.svg
@@ -0,0 +1 @@
+<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>SSRN icon</title><path d="M3.087 7.242c-1.704 0-2.878.996-2.878 2.395 0 .627.21 1.141.611 1.56.45.465.932.723 2.058 1.108 1.173.37 1.398.483 1.64.66.417.337.658.803.658 1.301 0 1.013-.964 1.833-2.154 1.833-.723 0-1.478-.29-1.945-.756-.353-.353-.594-.755-.803-1.366-.032-.08-.065-.128-.129-.128-.08 0-.145.08-.145.192 0 .129.065.499.177.852.097.338.161.563.161.595.097.482.113.498.241.611.338.257 1.334.498 2.074.498 1.848 0 3.166-1.173 3.166-2.813 0-1.205-.787-2.073-2.41-2.604-1.624-.53-1.705-.579-2.074-.98a1.476 1.476 0 0 1-.386-1.013c0-.868.707-1.495 1.688-1.495 1.173 0 2.266.691 2.572 1.64.08.257.112.305.209.305.064 0 .128-.08.128-.193 0-.048-.016-.16-.032-.29-.177-1.092-.193-1.14-.21-1.333 0-.225-.047-.322-.16-.322a.121.121 0 0 0-.064.032c-.16.129-.177.145-.257.145a.495.495 0 0 1-.129-.032c-.852-.354-.996-.402-1.607-.402zm5.256.032c-1.222 0-2.17.498-2.604 1.302l.096.659c.017.096.016.16.016.193 0 .257-.16.45-.369.498.048.499.257.933.61 1.286.45.466.933.724 2.058 1.11 1.158.385 1.399.482 1.64.658.418.322.659.804.659 1.302 0 1.013-.964 1.833-2.154 1.833-.723 0-1.48-.29-1.945-.755a2.82 2.82 0 0 1-.386-.483c-.096.225-.209.45-.338.643.097.45.113.483.242.579.337.257 1.334.498 2.073.498 1.833 0 3.167-1.173 3.167-2.813-.032-1.173-.836-2.025-2.46-2.572-1.64-.546-1.72-.578-2.073-.98a1.477 1.477 0 0 1-.386-1.013c0-.884.707-1.495 1.688-1.495 1.173 0 2.25.691 2.572 1.64.08.257.128.305.209.305.064 0 .129-.08.129-.193 0-.048-.017-.144-.033-.289-.177-1.093-.192-1.141-.209-1.334 0-.225-.048-.322-.16-.322-.032 0-.049.016-.065.032-.16.13-.176.145-.257.145-.032 0-.064-.016-.129-.032-.835-.37-.996-.402-1.591-.402zm4.662.177c-.306 0-.643.016-.98.032-.724.048-.724.048-1.062.048h-.128a.81.81 0 0 1 .048.306c.016.128.016.193.112.723l.113.707a1.1 1.1 0 0 1 .016.193.51.51 0 0 1-.145.37v2.524c.29.417.434.9.434 1.446 0 .627-.177 1.19-.482 1.656-.08.579-.29.723-.82.884-.128.032-.16.048-.16.129 0 .096.048.128.176.128.048 0 .21-.016.338-.032.225-.032.563-.048.884-.048.627 0 1.318.016 1.479.048.177.016.321.032.402.032.112 0 .209-.048.209-.128s-.08-.129-.241-.145c-.933-.096-1.238-.434-1.206-1.35v-2.38c.016-.224.048-.257.386-.24h.723c.29 0 .37.048.515.273.048.08.08.128.08.144l1.623 2.492c.66 1.013 1.238 1.399 2.042 1.399.482 0 .932-.129.932-.258 0-.048-.048-.096-.112-.096-.691.016-1.158-.37-1.977-1.624l-1.833-2.668c1.06-.547 1.64-1.318 1.64-2.299 0-.707-.29-1.334-.804-1.72-.514-.385-1.174-.546-2.202-.546zm10.802.112c-.08 0-.177.016-.322.033-.16.032-.321.048-.595.048-.385 0-1.028-.032-1.27-.048l-.289-.016c-.128 0-.193.048-.193.128 0 .096.049.145.193.177 1.254.177 1.367.466 1.334 3.536v3.15c0 .21-.016.258-.08.242-.032 0-.08-.048-.177-.16l-6.044-6.88c-.128-.145-.209-.193-.353-.193-.048 0-.129 0-.225.016h-.113c-.032 0-.321 0-.514-.016.08.048.16.112.24.16.58.434.933 1.174.933 1.977 0 .129-.016.258-.032.37v4.18l.16.24c.145.21.258.386.37.547v-4.71c0-.225.032-.289.129-.289.064 0 .08.016.16.096l5.546 6.366c.21.241.21.241.306.241.16 0 .209-.097.209-.386v-.128c.016-.386.016-.98.016-1.817v-4.276l.016-.417c-.016-1.592.048-1.753.659-1.913.096-.016.129-.049.129-.113 0-.08-.08-.145-.193-.145zm-11.156.338c.611 0 1.27.209 1.64.547.466.385.739 1.028.739 1.64 0 1.092-.691 1.767-1.849 1.767h-.739c-.434-.016-.466-.048-.466-.466V8.721c0-.45 0-.499.08-.611.097-.129.29-.209.595-.209z"/></svg> \ No newline at end of file
diff --git a/assets/lib/simple-icons/icons/wistia.svg b/assets/lib/simple-icons/icons/wistia.svg
new file mode 100644
index 00000000..c5a7121e
--- /dev/null
+++ b/assets/lib/simple-icons/icons/wistia.svg
@@ -0,0 +1 @@
+<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Wistia icon</title><path d="M23.69 6.605c.507-3.094-1.24-3.944-1.24-3.944s.073 2.519-4.555 3.053C13.787 6.188 0 5.83 0 5.83l4.43 5.081c1.2 1.378 1.838 1.537 3.187 1.633 1.349.09 4.327.058 6.345-.096 2.206-.169 5.35-.888 7.477-2.535 1.09-.843 2.039-2.016 2.25-3.308m.284 3.205s-.556 1.105-3.33 2.853c-1.182.744-3.637 1.535-6.793 1.84-1.705.166-4.842.031-6.188.031-1.354 0-1.974.285-3.187 1.652L0 21.23s1.55.008 2.72.008c1.17 0 8.488.425 11.735-.468 10.546-2.899 9.518-10.96 9.518-10.96Z"/></svg> \ No newline at end of file
diff --git a/resources/_gen/assets/scss/lib/mermaid/mermaid.scss_43d09a0fb297c4cc88d4122515a2e889.content b/resources/_gen/assets/scss/lib/mermaid/mermaid.scss_43d09a0fb297c4cc88d4122515a2e889.content
index 5205d0a3..1123e40d 100644
--- a/resources/_gen/assets/scss/lib/mermaid/mermaid.scss_43d09a0fb297c4cc88d4122515a2e889.content
+++ b/resources/_gen/assets/scss/lib/mermaid/mermaid.scss_43d09a0fb297c4cc88d4122515a2e889.content
@@ -1,3 +1,3 @@
-.page .mermaid{width:100%;margin:3% auto;text-align:center}.page .mermaid>svg{max-width:100%}.page .mermaid .label{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);color:#333}.page .mermaid .label text{fill:#333}.page .mermaid .node rect,.page .mermaid .node circle,.page .mermaid .node ellipse,.page .mermaid .node polygon,.page .mermaid .node path{fill:#eee;stroke:#999;stroke-width:1px}.page .mermaid .node .label{text-align:center}.page .mermaid .node.clickable{cursor:pointer}.page .mermaid .arrowheadPath{fill:#333}.page .mermaid .edgePath .path{stroke:#666;stroke-width:1.5px}.page .mermaid .edgeLabel{background-color:#fff;text-align:center}.page .mermaid .cluster rect{fill:#eaf2fb;stroke:#26a;stroke-width:1px}.page .mermaid .cluster text{fill:#333}.page .mermaid div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:12px;background:#eaf2fb;border:1px solid #26a;border-radius:2px;pointer-events:none;z-index:100}.page .mermaid .actor{stroke:#999;fill:#eee}.page .mermaid text.actor{fill:#333;stroke:none}.page .mermaid .actor-line{stroke:#666}.page .mermaid .messageLine0{stroke-width:1.5;stroke-dasharray:'2 2';stroke:#333}.page .mermaid .messageLine1{stroke-width:1.5;stroke-dasharray:'2 2';stroke:#333}.page .mermaid #arrowhead{fill:#333}.page .mermaid .sequenceNumber{fill:#fff}.page .mermaid #sequencenumber{fill:#333}.page .mermaid #crosshead path{fill:#333 !important;stroke:#333 !important}.page .mermaid .messageText{fill:#333;stroke:none}.page .mermaid .labelBox{stroke:#999;fill:#eee}.page .mermaid .labelText{fill:#333;stroke:none}.page .mermaid .loopText{fill:#333;stroke:none}.page .mermaid .loopLine{stroke-width:2;stroke-dasharray:'2 2';stroke:#999}.page .mermaid .note{stroke:#770;fill:#ffa}.page .mermaid .noteText{fill:black;stroke:none;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:14px}.page .mermaid .activation0{fill:#f4f4f4;stroke:#666}.page .mermaid .activation1{fill:#f4f4f4;stroke:#666}.page .mermaid .activation2{fill:#f4f4f4;stroke:#666}.page .mermaid .mermaid-main-font{font-family:"trebuchet ms", verdana, arial;font-family:var(--mermaid-font-family)}.page .mermaid .section{stroke:none;opacity:0.2}.page .mermaid .section0{fill:#80b3e6}.page .mermaid .section2{fill:#80b3e6}.page .mermaid .section1,.page .mermaid .section3{fill:#fff;opacity:0.2}.page .mermaid .sectionTitle0{fill:#333}.page .mermaid .sectionTitle1{fill:#333}.page .mermaid .sectionTitle2{fill:#333}.page .mermaid .sectionTitle3{fill:#333}.page .mermaid .sectionTitle{text-anchor:start;font-size:11px;text-height:14px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.page .mermaid .grid .tick{stroke:#e6e6e6;opacity:0.8;shape-rendering:crispEdges}.page .mermaid .grid .tick text{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);fill:#333}.page .mermaid .grid path{stroke-width:0}.page .mermaid .today{fill:none;stroke:#d42;stroke-width:2px}.page .mermaid .task{stroke-width:2}.page .mermaid .taskText{text-anchor:middle;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.page .mermaid .taskText:not([font-size]){font-size:11px}.page .mermaid .taskTextOutsideRight{fill:#333;text-anchor:start;font-size:11px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.page .mermaid .taskTextOutsideLeft{fill:#333;text-anchor:end;font-size:11px}.page .mermaid .task.clickable{cursor:pointer}.page .mermaid .taskText.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}.page .mermaid .taskTextOutsideLeft.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}.page .mermaid .taskTextOutsideRight.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}.page .mermaid .taskText0,.page .mermaid .taskText1,.page .mermaid .taskText2,.page .mermaid .taskText3{fill:#fff}.page .mermaid .task0,.page .mermaid .task1,.page .mermaid .task2,.page .mermaid .task3{fill:#26a;stroke:#1a4d80}.page .mermaid .taskTextOutside0,.page .mermaid .taskTextOutside2{fill:#333 !important}.page .mermaid .taskTextOutside1,.page .mermaid .taskTextOutside3{fill:#333 !important}.page .mermaid .active0,.page .mermaid .active1,.page .mermaid .active2,.page .mermaid .active3{fill:#eee;stroke:#1a4d80}.page .mermaid .activeText0,.page .mermaid .activeText1,.page .mermaid .activeText2,.page .mermaid .activeText3{fill:#333}.page .mermaid .done0,.page .mermaid .done1,.page .mermaid .done2,.page .mermaid .done3{stroke:#666;fill:#bbb;stroke-width:2}.page .mermaid .doneText0,.page .mermaid .doneText1,.page .mermaid .doneText2,.page .mermaid .doneText3{fill:#333}.page .mermaid .crit0,.page .mermaid .crit1,.page .mermaid .crit2,.page .mermaid .crit3{stroke:#b1361b;fill:#d42;stroke-width:2}.page .mermaid .activeCrit0,.page .mermaid .activeCrit1,.page .mermaid .activeCrit2,.page .mermaid .activeCrit3{stroke:#b1361b;fill:#eee;stroke-width:2}.page .mermaid .doneCrit0,.page .mermaid .doneCrit1,.page .mermaid .doneCrit2,.page .mermaid .doneCrit3{stroke:#b1361b;fill:#bbb;stroke-width:2;cursor:pointer;shape-rendering:crispEdges}.page .mermaid .milestone{transform:rotate(45deg) scale(0.8, 0.8)}.page .mermaid .milestoneText{font-style:italic}.page .mermaid .doneCritText0,.page .mermaid .doneCritText1,.page .mermaid .doneCritText2,.page .mermaid .doneCritText3{fill:#333}.page .mermaid .activeCritText0,.page .mermaid .activeCritText1,.page .mermaid .activeCritText2,.page .mermaid .activeCritText3{fill:#333}.page .mermaid .titleText{text-anchor:middle;font-size:18px;fill:#333;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.page .mermaid g.classGroup text{fill:#999;stroke:none;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:10px}.page .mermaid g.classGroup text .title{font-weight:bolder}.page .mermaid g.clickable{cursor:pointer}.page .mermaid g.classGroup rect{fill:#eee;stroke:#999}.page .mermaid g.classGroup line{stroke:#999;stroke-width:1}.page .mermaid .classLabel .box{stroke:none;stroke-width:0;fill:#eee;opacity:0.5}.page .mermaid .classLabel .label{fill:#999;font-size:10px}.page .mermaid .relation{stroke:#999;stroke-width:1;fill:none}.page .mermaid .dashed-line{stroke-dasharray:3}.page .mermaid #compositionStart{fill:#999;stroke:#999;stroke-width:1}.page .mermaid #compositionEnd{fill:#999;stroke:#999;stroke-width:1}.page .mermaid #aggregationStart{fill:#eee;stroke:#999;stroke-width:1}.page .mermaid #aggregationEnd{fill:#eee;stroke:#999;stroke-width:1}.page .mermaid #dependencyStart{fill:#999;stroke:#999;stroke-width:1}.page .mermaid #dependencyEnd{fill:#999;stroke:#999;stroke-width:1}.page .mermaid #extensionStart{fill:#999;stroke:#999;stroke-width:1}.page .mermaid #extensionEnd{fill:#999;stroke:#999;stroke-width:1}.page .mermaid .commit-id,.page .mermaid .commit-msg,.page .mermaid .branch-label{fill:lightgrey;color:lightgrey;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.page .mermaid .pieTitleText{text-anchor:middle;font-size:25px;fill:#333;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.page .mermaid .slice{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.page .mermaid g.stateGroup text{fill:#999;stroke:none;font-size:10px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.page .mermaid g.stateGroup text{fill:#999;stroke:none;font-size:10px}.page .mermaid g.stateGroup .state-title{font-weight:bolder;fill:#000}.page .mermaid g.stateGroup rect{fill:#eee;stroke:#999}.page .mermaid g.stateGroup line{stroke:#999;stroke-width:1}.page .mermaid .transition{stroke:#999;stroke-width:1;fill:none}.page .mermaid .stateGroup .composit{fill:white;border-bottom:1px}.page .mermaid .stateGroup .alt-composit{fill:#e0e0e0;border-bottom:1px}.page .mermaid .state-note{stroke:#770;fill:#ffa}.page .mermaid .state-note text{fill:black;stroke:none;font-size:10px}.page .mermaid .stateLabel .box{stroke:none;stroke-width:0;fill:#eee;opacity:0.5}.page .mermaid .stateLabel text{fill:#000;font-size:10px;font-weight:bold;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.page .mermaid :root{--mermaid-font-family: '"trebuchet ms", verdana, arial';--mermaid-font-family: "Comic Sans MS", "Comic Sans", cursive}[theme=dark] .page .mermaid .label{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);color:#333}[theme=dark] .page .mermaid .label text{fill:#333}[theme=dark] .page .mermaid .node rect,[theme=dark] .page .mermaid .node circle,[theme=dark] .page .mermaid .node ellipse,[theme=dark] .page .mermaid .node polygon,[theme=dark] .page .mermaid .node path{fill:#BDD5EA;stroke:purple;stroke-width:1px}[theme=dark] .page .mermaid .node .label{text-align:center}[theme=dark] .page .mermaid .node.clickable{cursor:pointer}[theme=dark] .page .mermaid .arrowheadPath{fill:#d3d3d3}[theme=dark] .page .mermaid .edgePath .path{stroke:#d3d3d3;stroke-width:1.5px}[theme=dark] .page .mermaid .edgeLabel{background-color:#e8e8e8;text-align:center}[theme=dark] .page .mermaid .cluster rect{fill:#6D6D65;stroke:rgba(255,255,255,0.25);stroke-width:1px}[theme=dark] .page .mermaid .cluster text{fill:#F9FFFE}[theme=dark] .page .mermaid div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:12px;background:#6D6D65;border:1px solid rgba(255,255,255,0.25);border-radius:2px;pointer-events:none;z-index:100}[theme=dark] .page .mermaid .actor{stroke:#81B1DB;fill:#BDD5EA}[theme=dark] .page .mermaid text.actor{fill:#000;stroke:none}[theme=dark] .page .mermaid .actor-line{stroke:#d3d3d3}[theme=dark] .page .mermaid .messageLine0{stroke-width:1.5;stroke-dasharray:'2 2';stroke:#d3d3d3}[theme=dark] .page .mermaid .messageLine1{stroke-width:1.5;stroke-dasharray:'2 2';stroke:#d3d3d3}[theme=dark] .page .mermaid #arrowhead{fill:#d3d3d3}[theme=dark] .page .mermaid .sequenceNumber{fill:#fff}[theme=dark] .page .mermaid #sequencenumber{fill:#d3d3d3}[theme=dark] .page .mermaid #crosshead path{fill:#d3d3d3 !important;stroke:#d3d3d3 !important}[theme=dark] .page .mermaid .messageText{fill:#d3d3d3;stroke:none}[theme=dark] .page .mermaid .labelBox{stroke:#81B1DB;fill:#BDD5EA}[theme=dark] .page .mermaid .labelText{fill:#323D47;stroke:none}[theme=dark] .page .mermaid .loopText{fill:#d3d3d3;stroke:none}[theme=dark] .page .mermaid .loopLine{stroke-width:2;stroke-dasharray:'2 2';stroke:#81B1DB}[theme=dark] .page .mermaid .note{stroke:rgba(255,255,255,0.25);fill:#fff5ad}[theme=dark] .page .mermaid .noteText{fill:black;stroke:none;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:14px}[theme=dark] .page .mermaid .activation0{fill:#f4f4f4;stroke:#666}[theme=dark] .page .mermaid .activation1{fill:#f4f4f4;stroke:#666}[theme=dark] .page .mermaid .activation2{fill:#f4f4f4;stroke:#666}[theme=dark] .page .mermaid .mermaid-main-font{font-family:"trebuchet ms", verdana, arial;font-family:var(--mermaid-font-family)}[theme=dark] .page .mermaid .section{stroke:none;opacity:0.2}[theme=dark] .page .mermaid .section0{fill:rgba(255,255,255,0.3)}[theme=dark] .page .mermaid .section2{fill:#EAE8B9}[theme=dark] .page .mermaid .section1,[theme=dark] .page .mermaid .section3{fill:#fff;opacity:0.2}[theme=dark] .page .mermaid .sectionTitle0{fill:#F9FFFE}[theme=dark] .page .mermaid .sectionTitle1{fill:#F9FFFE}[theme=dark] .page .mermaid .sectionTitle2{fill:#F9FFFE}[theme=dark] .page .mermaid .sectionTitle3{fill:#F9FFFE}[theme=dark] .page .mermaid .sectionTitle{text-anchor:start;font-size:11px;text-height:14px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}[theme=dark] .page .mermaid .grid .tick{stroke:#d3d3d3;opacity:0.8;shape-rendering:crispEdges}[theme=dark] .page .mermaid .grid .tick text{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);fill:#d3d3d3}[theme=dark] .page .mermaid .grid path{stroke-width:0}[theme=dark] .page .mermaid .today{fill:none;stroke:#DB5757;stroke-width:2px}[theme=dark] .page .mermaid .task{stroke-width:2}[theme=dark] .page .mermaid .taskText{text-anchor:middle;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}[theme=dark] .page .mermaid .taskText:not([font-size]){font-size:11px}[theme=dark] .page .mermaid .taskTextOutsideRight{fill:#323D47;text-anchor:start;font-size:11px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}[theme=dark] .page .mermaid .taskTextOutsideLeft{fill:#323D47;text-anchor:end;font-size:11px}[theme=dark] .page .mermaid .task.clickable{cursor:pointer}[theme=dark] .page .mermaid .taskText.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}[theme=dark] .page .mermaid .taskTextOutsideLeft.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}[theme=dark] .page .mermaid .taskTextOutsideRight.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}[theme=dark] .page .mermaid .taskText0,[theme=dark] .page .mermaid .taskText1,[theme=dark] .page .mermaid .taskText2,[theme=dark] .page .mermaid .taskText3{fill:#323D47}[theme=dark] .page .mermaid .task0,[theme=dark] .page .mermaid .task1,[theme=dark] .page .mermaid .task2,[theme=dark] .page .mermaid .task3{fill:#BDD5EA;stroke:rgba(255,255,255,0.5)}[theme=dark] .page .mermaid .taskTextOutside0,[theme=dark] .page .mermaid .taskTextOutside2{fill:#d3d3d3 !important}[theme=dark] .page .mermaid .taskTextOutside1,[theme=dark] .page .mermaid .taskTextOutside3{fill:#d3d3d3 !important}[theme=dark] .page .mermaid .active0,[theme=dark] .page .mermaid .active1,[theme=dark] .page .mermaid .active2,[theme=dark] .page .mermaid .active3{fill:#81B1DB;stroke:rgba(255,255,255,0.5)}[theme=dark] .page .mermaid .activeText0,[theme=dark] .page .mermaid .activeText1,[theme=dark] .page .mermaid .activeText2,[theme=dark] .page .mermaid .activeText3{fill:#323D47}[theme=dark] .page .mermaid .done0,[theme=dark] .page .mermaid .done1,[theme=dark] .page .mermaid .done2,[theme=dark] .page .mermaid .done3{stroke:grey;fill:#d3d3d3;stroke-width:2}[theme=dark] .page .mermaid .doneText0,[theme=dark] .page .mermaid .doneText1,[theme=dark] .page .mermaid .doneText2,[theme=dark] .page .mermaid .doneText3{fill:#323D47}[theme=dark] .page .mermaid .crit0,[theme=dark] .page .mermaid .crit1,[theme=dark] .page .mermaid .crit2,[theme=dark] .page .mermaid .crit3{stroke:#E83737;fill:#E83737;stroke-width:2}[theme=dark] .page .mermaid .activeCrit0,[theme=dark] .page .mermaid .activeCrit1,[theme=dark] .page .mermaid .activeCrit2,[theme=dark] .page .mermaid .activeCrit3{stroke:#E83737;fill:#81B1DB;stroke-width:2}[theme=dark] .page .mermaid .doneCrit0,[theme=dark] .page .mermaid .doneCrit1,[theme=dark] .page .mermaid .doneCrit2,[theme=dark] .page .mermaid .doneCrit3{stroke:#E83737;fill:#d3d3d3;stroke-width:2;cursor:pointer;shape-rendering:crispEdges}[theme=dark] .page .mermaid .milestone{transform:rotate(45deg) scale(0.8, 0.8)}[theme=dark] .page .mermaid .milestoneText{font-style:italic}[theme=dark] .page .mermaid .doneCritText0,[theme=dark] .page .mermaid .doneCritText1,[theme=dark] .page .mermaid .doneCritText2,[theme=dark] .page .mermaid .doneCritText3{fill:#323D47}[theme=dark] .page .mermaid .activeCritText0,[theme=dark] .page .mermaid .activeCritText1,[theme=dark] .page .mermaid .activeCritText2,[theme=dark] .page .mermaid .activeCritText3{fill:#323D47}[theme=dark] .page .mermaid .titleText{text-anchor:middle;font-size:18px;fill:#d3d3d3;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}[theme=dark] .page .mermaid g.classGroup text{fill:purple;stroke:none;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:10px}[theme=dark] .page .mermaid g.classGroup text .title{font-weight:bolder}[theme=dark] .page .mermaid g.clickable{cursor:pointer}[theme=dark] .page .mermaid g.classGroup rect{fill:#BDD5EA;stroke:purple}[theme=dark] .page .mermaid g.classGroup line{stroke:purple;stroke-width:1}[theme=dark] .page .mermaid .classLabel .box{stroke:none;stroke-width:0;fill:#BDD5EA;opacity:0.5}[theme=dark] .page .mermaid .classLabel .label{fill:purple;font-size:10px}[theme=dark] .page .mermaid .relation{stroke:purple;stroke-width:1;fill:none}[theme=dark] .page .mermaid .dashed-line{stroke-dasharray:3}[theme=dark] .page .mermaid #compositionStart{fill:purple;stroke:purple;stroke-width:1}[theme=dark] .page .mermaid #compositionEnd{fill:purple;stroke:purple;stroke-width:1}[theme=dark] .page .mermaid #aggregationStart{fill:#BDD5EA;stroke:purple;stroke-width:1}[theme=dark] .page .mermaid #aggregationEnd{fill:#BDD5EA;stroke:purple;stroke-width:1}[theme=dark] .page .mermaid #dependencyStart{fill:purple;stroke:purple;stroke-width:1}[theme=dark] .page .mermaid #dependencyEnd{fill:purple;stroke:purple;stroke-width:1}[theme=dark] .page .mermaid #extensionStart{fill:purple;stroke:purple;stroke-width:1}[theme=dark] .page .mermaid #extensionEnd{fill:purple;stroke:purple;stroke-width:1}[theme=dark] .page .mermaid .commit-id,[theme=dark] .page .mermaid .commit-msg,[theme=dark] .page .mermaid .branch-label{fill:lightgrey;color:lightgrey;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}[theme=dark] .page .mermaid .pieTitleText{text-anchor:middle;font-size:25px;fill:#323D47;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}[theme=dark] .page .mermaid .slice{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}[theme=dark] .page .mermaid g.stateGroup text{fill:purple;stroke:none;font-size:10px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}[theme=dark] .page .mermaid g.stateGroup text{fill:purple;stroke:none;font-size:10px}[theme=dark] .page .mermaid g.stateGroup .state-title{font-weight:bolder;fill:#000}[theme=dark] .page .mermaid g.stateGroup rect{fill:#BDD5EA;stroke:purple}[theme=dark] .page .mermaid g.stateGroup line{stroke:purple;stroke-width:1}[theme=dark] .page .mermaid .transition{stroke:purple;stroke-width:1;fill:none}[theme=dark] .page .mermaid .stateGroup .composit{fill:white;border-bottom:1px}[theme=dark] .page .mermaid .stateGroup .alt-composit{fill:#e0e0e0;border-bottom:1px}[theme=dark] .page .mermaid .state-note{stroke:rgba(255,255,255,0.25);fill:#fff5ad}[theme=dark] .page .mermaid .state-note text{fill:black;stroke:none;font-size:10px}[theme=dark] .page .mermaid .stateLabel .box{stroke:none;stroke-width:0;fill:#BDD5EA;opacity:0.5}[theme=dark] .page .mermaid .stateLabel text{fill:#000;font-size:10px;font-weight:bold;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}[theme=dark] .page .mermaid :root{--mermaid-font-family: '"trebuchet ms", verdana, arial';--mermaid-font-family: "Comic Sans MS", "Comic Sans", cursive}.page .mermaid div.mermaidTooltip{z-index:50}
+.page .mermaid{width:100%;margin:3% auto;text-align:center}.page .mermaid>svg{max-width:100%}.page .mermaid .label{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);color:#333}.page .mermaid .label text{fill:#333}.page .mermaid .node rect,.page .mermaid .node circle,.page .mermaid .node ellipse,.page .mermaid .node polygon,.page .mermaid .node path{fill:#eee;stroke:#999;stroke-width:1px}.page .mermaid .node .label{text-align:center}.page .mermaid .node.clickable{cursor:pointer}.page .mermaid .arrowheadPath{fill:#333}.page .mermaid .edgePath .path{stroke:#666;stroke-width:1.5px}.page .mermaid .edgeLabel{background-color:#fff;text-align:center}.page .mermaid .edgeLabel rect{opacity:0.5}.page .mermaid .cluster rect{fill:#eaf2fb;stroke:#26a;stroke-width:1px}.page .mermaid .cluster text{fill:#333}.page .mermaid div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:12px;background:#eaf2fb;border:1px solid #26a;border-radius:2px;pointer-events:none;z-index:100}.page .mermaid .actor{stroke:#999;fill:#eee}.page .mermaid text.actor{fill:#333;stroke:none}.page .mermaid .actor-line{stroke:#666}.page .mermaid .messageLine0{stroke-width:1.5;stroke-dasharray:'2 2';stroke:#333}.page .mermaid .messageLine1{stroke-width:1.5;stroke-dasharray:'2 2';stroke:#333}.page .mermaid #arrowhead{fill:#333}.page .mermaid .sequenceNumber{fill:#fff}.page .mermaid #sequencenumber{fill:#333}.page .mermaid #crosshead path{fill:#333 !important;stroke:#333 !important}.page .mermaid .messageText{fill:#333;stroke:none}.page .mermaid .labelBox{stroke:#999;fill:#eee}.page .mermaid .labelText{fill:#333;stroke:none}.page .mermaid .loopText{fill:#333;stroke:none}.page .mermaid .loopLine{stroke-width:2;stroke-dasharray:'2 2';stroke:#999}.page .mermaid .note{stroke:#770;fill:#ffa}.page .mermaid .noteText{fill:black;stroke:none;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:14px}.page .mermaid .activation0{fill:#f4f4f4;stroke:#666}.page .mermaid .activation1{fill:#f4f4f4;stroke:#666}.page .mermaid .activation2{fill:#f4f4f4;stroke:#666}.page .mermaid .mermaid-main-font{font-family:"trebuchet ms", verdana, arial;font-family:var(--mermaid-font-family)}.page .mermaid .section{stroke:none;opacity:0.2}.page .mermaid .section0{fill:#80b3e6}.page .mermaid .section2{fill:#80b3e6}.page .mermaid .section1,.page .mermaid .section3{fill:#fff;opacity:0.2}.page .mermaid .sectionTitle0{fill:#333}.page .mermaid .sectionTitle1{fill:#333}.page .mermaid .sectionTitle2{fill:#333}.page .mermaid .sectionTitle3{fill:#333}.page .mermaid .sectionTitle{text-anchor:start;font-size:11px;text-height:14px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.page .mermaid .grid .tick{stroke:#e6e6e6;opacity:0.8;shape-rendering:crispEdges}.page .mermaid .grid .tick text{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);fill:#333}.page .mermaid .grid path{stroke-width:0}.page .mermaid .today{fill:none;stroke:#d42;stroke-width:2px}.page .mermaid .task{stroke-width:2}.page .mermaid .taskText{text-anchor:middle;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.page .mermaid .taskText:not([font-size]){font-size:11px}.page .mermaid .taskTextOutsideRight{fill:#333;text-anchor:start;font-size:11px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.page .mermaid .taskTextOutsideLeft{fill:#333;text-anchor:end;font-size:11px}.page .mermaid .task.clickable{cursor:pointer}.page .mermaid .taskText.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}.page .mermaid .taskTextOutsideLeft.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}.page .mermaid .taskTextOutsideRight.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}.page .mermaid .taskText0,.page .mermaid .taskText1,.page .mermaid .taskText2,.page .mermaid .taskText3{fill:#fff}.page .mermaid .task0,.page .mermaid .task1,.page .mermaid .task2,.page .mermaid .task3{fill:#26a;stroke:#1a4d80}.page .mermaid .taskTextOutside0,.page .mermaid .taskTextOutside2{fill:#333 !important}.page .mermaid .taskTextOutside1,.page .mermaid .taskTextOutside3{fill:#333 !important}.page .mermaid .active0,.page .mermaid .active1,.page .mermaid .active2,.page .mermaid .active3{fill:#eee;stroke:#1a4d80}.page .mermaid .activeText0,.page .mermaid .activeText1,.page .mermaid .activeText2,.page .mermaid .activeText3{fill:#333}.page .mermaid .done0,.page .mermaid .done1,.page .mermaid .done2,.page .mermaid .done3{stroke:#666;fill:#bbb;stroke-width:2}.page .mermaid .doneText0,.page .mermaid .doneText1,.page .mermaid .doneText2,.page .mermaid .doneText3{fill:#333}.page .mermaid .crit0,.page .mermaid .crit1,.page .mermaid .crit2,.page .mermaid .crit3{stroke:#b1361b;fill:#d42;stroke-width:2}.page .mermaid .activeCrit0,.page .mermaid .activeCrit1,.page .mermaid .activeCrit2,.page .mermaid .activeCrit3{stroke:#b1361b;fill:#eee;stroke-width:2}.page .mermaid .doneCrit0,.page .mermaid .doneCrit1,.page .mermaid .doneCrit2,.page .mermaid .doneCrit3{stroke:#b1361b;fill:#bbb;stroke-width:2;cursor:pointer;shape-rendering:crispEdges}.page .mermaid .milestone{transform:rotate(45deg) scale(0.8, 0.8)}.page .mermaid .milestoneText{font-style:italic}.page .mermaid .doneCritText0,.page .mermaid .doneCritText1,.page .mermaid .doneCritText2,.page .mermaid .doneCritText3{fill:#333}.page .mermaid .activeCritText0,.page .mermaid .activeCritText1,.page .mermaid .activeCritText2,.page .mermaid .activeCritText3{fill:#333}.page .mermaid .titleText{text-anchor:middle;font-size:18px;fill:#333;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.page .mermaid g.classGroup text{fill:#999;stroke:none;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:10px}.page .mermaid g.classGroup text .title{font-weight:bolder}.page .mermaid g.clickable{cursor:pointer}.page .mermaid g.classGroup rect{fill:#eee;stroke:#999}.page .mermaid g.classGroup line{stroke:#999;stroke-width:1}.page .mermaid .classLabel .box{stroke:none;stroke-width:0;fill:#eee;opacity:0.5}.page .mermaid .classLabel .label{fill:#999;font-size:10px}.page .mermaid .relation{stroke:#999;stroke-width:1;fill:none}.page .mermaid .dashed-line{stroke-dasharray:3}.page .mermaid #compositionStart{fill:#999;stroke:#999;stroke-width:1}.page .mermaid #compositionEnd{fill:#999;stroke:#999;stroke-width:1}.page .mermaid #aggregationStart{fill:#eee;stroke:#999;stroke-width:1}.page .mermaid #aggregationEnd{fill:#eee;stroke:#999;stroke-width:1}.page .mermaid #dependencyStart{fill:#999;stroke:#999;stroke-width:1}.page .mermaid #dependencyEnd{fill:#999;stroke:#999;stroke-width:1}.page .mermaid #extensionStart{fill:#999;stroke:#999;stroke-width:1}.page .mermaid #extensionEnd{fill:#999;stroke:#999;stroke-width:1}.page .mermaid .commit-id,.page .mermaid .commit-msg,.page .mermaid .branch-label{fill:lightgrey;color:lightgrey;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.page .mermaid .pieTitleText{text-anchor:middle;font-size:25px;fill:#333;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.page .mermaid .slice{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.page .mermaid g.stateGroup text{fill:#999;stroke:none;font-size:10px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.page .mermaid g.stateGroup text{fill:#999;stroke:none;font-size:10px}.page .mermaid g.stateGroup .state-title{font-weight:bolder;fill:#000}.page .mermaid g.stateGroup rect{fill:#eee;stroke:#999}.page .mermaid g.stateGroup line{stroke:#999;stroke-width:1}.page .mermaid .transition{stroke:#999;stroke-width:1;fill:none}.page .mermaid .stateGroup .composit{fill:white;border-bottom:1px}.page .mermaid .stateGroup .alt-composit{fill:#e0e0e0;border-bottom:1px}.page .mermaid .state-note{stroke:#770;fill:#ffa}.page .mermaid .state-note text{fill:black;stroke:none;font-size:10px}.page .mermaid .stateLabel .box{stroke:none;stroke-width:0;fill:#eee;opacity:0.5}.page .mermaid .stateLabel text{fill:#000;font-size:10px;font-weight:bold;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}.page .mermaid .node circle.state-start{fill:black;stroke:black}.page .mermaid .node circle.state-end{fill:black;stroke:white;stroke-width:1.5}.page .mermaid #statediagram-barbEnd{fill:#999}.page .mermaid .statediagram-cluster rect{fill:#eee;stroke:#999;stroke-width:1px}.page .mermaid .statediagram-cluster rect.outer{rx:5px;ry:5px}.page .mermaid .statediagram-state .divider{stroke:#999}.page .mermaid .statediagram-state .title-state{rx:5px;ry:5px}.page .mermaid .statediagram-cluster.statediagram-cluster .inner{fill:white}.page .mermaid .statediagram-cluster.statediagram-cluster-alt .inner{fill:#e0e0e0}.page .mermaid .statediagram-cluster .inner{rx:0;ry:0}.page .mermaid .statediagram-state rect.basic{rx:5px;ry:5px}.page .mermaid .statediagram-state rect.divider{stroke-dasharray:10,10;fill:#efefef}.page .mermaid .note-edge{stroke-dasharray:5}.page .mermaid .statediagram-note rect{fill:#ffa;stroke:#770;stroke-width:1px;rx:0;ry:0}.page .mermaid :root{--mermaid-font-family: '"trebuchet ms", verdana, arial';--mermaid-font-family: "Comic Sans MS", "Comic Sans", cursive}[theme=dark] .page .mermaid .label{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);color:#333}[theme=dark] .page .mermaid .label text{fill:#333}[theme=dark] .page .mermaid .node rect,[theme=dark] .page .mermaid .node circle,[theme=dark] .page .mermaid .node ellipse,[theme=dark] .page .mermaid .node polygon,[theme=dark] .page .mermaid .node path{fill:#BDD5EA;stroke:purple;stroke-width:1px}[theme=dark] .page .mermaid .node .label{text-align:center}[theme=dark] .page .mermaid .node.clickable{cursor:pointer}[theme=dark] .page .mermaid .arrowheadPath{fill:#d3d3d3}[theme=dark] .page .mermaid .edgePath .path{stroke:#d3d3d3;stroke-width:1.5px}[theme=dark] .page .mermaid .edgeLabel{background-color:#e8e8e8;text-align:center}[theme=dark] .page .mermaid .edgeLabel rect{opacity:0.5}[theme=dark] .page .mermaid .cluster rect{fill:#6D6D65;stroke:rgba(255,255,255,0.25);stroke-width:1px}[theme=dark] .page .mermaid .cluster text{fill:#F9FFFE}[theme=dark] .page .mermaid div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:12px;background:#6D6D65;border:1px solid rgba(255,255,255,0.25);border-radius:2px;pointer-events:none;z-index:100}[theme=dark] .page .mermaid .actor{stroke:#81B1DB;fill:#BDD5EA}[theme=dark] .page .mermaid text.actor{fill:#000;stroke:none}[theme=dark] .page .mermaid .actor-line{stroke:#d3d3d3}[theme=dark] .page .mermaid .messageLine0{stroke-width:1.5;stroke-dasharray:'2 2';stroke:#d3d3d3}[theme=dark] .page .mermaid .messageLine1{stroke-width:1.5;stroke-dasharray:'2 2';stroke:#d3d3d3}[theme=dark] .page .mermaid #arrowhead{fill:#d3d3d3}[theme=dark] .page .mermaid .sequenceNumber{fill:#fff}[theme=dark] .page .mermaid #sequencenumber{fill:#d3d3d3}[theme=dark] .page .mermaid #crosshead path{fill:#d3d3d3 !important;stroke:#d3d3d3 !important}[theme=dark] .page .mermaid .messageText{fill:#d3d3d3;stroke:none}[theme=dark] .page .mermaid .labelBox{stroke:#81B1DB;fill:#BDD5EA}[theme=dark] .page .mermaid .labelText{fill:#323D47;stroke:none}[theme=dark] .page .mermaid .loopText{fill:#d3d3d3;stroke:none}[theme=dark] .page .mermaid .loopLine{stroke-width:2;stroke-dasharray:'2 2';stroke:#81B1DB}[theme=dark] .page .mermaid .note{stroke:rgba(255,255,255,0.25);fill:#fff5ad}[theme=dark] .page .mermaid .noteText{fill:black;stroke:none;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:14px}[theme=dark] .page .mermaid .activation0{fill:#f4f4f4;stroke:#666}[theme=dark] .page .mermaid .activation1{fill:#f4f4f4;stroke:#666}[theme=dark] .page .mermaid .activation2{fill:#f4f4f4;stroke:#666}[theme=dark] .page .mermaid .mermaid-main-font{font-family:"trebuchet ms", verdana, arial;font-family:var(--mermaid-font-family)}[theme=dark] .page .mermaid .section{stroke:none;opacity:0.2}[theme=dark] .page .mermaid .section0{fill:rgba(255,255,255,0.3)}[theme=dark] .page .mermaid .section2{fill:#EAE8B9}[theme=dark] .page .mermaid .section1,[theme=dark] .page .mermaid .section3{fill:#fff;opacity:0.2}[theme=dark] .page .mermaid .sectionTitle0{fill:#F9FFFE}[theme=dark] .page .mermaid .sectionTitle1{fill:#F9FFFE}[theme=dark] .page .mermaid .sectionTitle2{fill:#F9FFFE}[theme=dark] .page .mermaid .sectionTitle3{fill:#F9FFFE}[theme=dark] .page .mermaid .sectionTitle{text-anchor:start;font-size:11px;text-height:14px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}[theme=dark] .page .mermaid .grid .tick{stroke:#d3d3d3;opacity:0.8;shape-rendering:crispEdges}[theme=dark] .page .mermaid .grid .tick text{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);fill:#d3d3d3}[theme=dark] .page .mermaid .grid path{stroke-width:0}[theme=dark] .page .mermaid .today{fill:none;stroke:#DB5757;stroke-width:2px}[theme=dark] .page .mermaid .task{stroke-width:2}[theme=dark] .page .mermaid .taskText{text-anchor:middle;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}[theme=dark] .page .mermaid .taskText:not([font-size]){font-size:11px}[theme=dark] .page .mermaid .taskTextOutsideRight{fill:#323D47;text-anchor:start;font-size:11px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}[theme=dark] .page .mermaid .taskTextOutsideLeft{fill:#323D47;text-anchor:end;font-size:11px}[theme=dark] .page .mermaid .task.clickable{cursor:pointer}[theme=dark] .page .mermaid .taskText.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}[theme=dark] .page .mermaid .taskTextOutsideLeft.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}[theme=dark] .page .mermaid .taskTextOutsideRight.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}[theme=dark] .page .mermaid .taskText0,[theme=dark] .page .mermaid .taskText1,[theme=dark] .page .mermaid .taskText2,[theme=dark] .page .mermaid .taskText3{fill:#323D47}[theme=dark] .page .mermaid .task0,[theme=dark] .page .mermaid .task1,[theme=dark] .page .mermaid .task2,[theme=dark] .page .mermaid .task3{fill:#BDD5EA;stroke:rgba(255,255,255,0.5)}[theme=dark] .page .mermaid .taskTextOutside0,[theme=dark] .page .mermaid .taskTextOutside2{fill:#d3d3d3 !important}[theme=dark] .page .mermaid .taskTextOutside1,[theme=dark] .page .mermaid .taskTextOutside3{fill:#d3d3d3 !important}[theme=dark] .page .mermaid .active0,[theme=dark] .page .mermaid .active1,[theme=dark] .page .mermaid .active2,[theme=dark] .page .mermaid .active3{fill:#81B1DB;stroke:rgba(255,255,255,0.5)}[theme=dark] .page .mermaid .activeText0,[theme=dark] .page .mermaid .activeText1,[theme=dark] .page .mermaid .activeText2,[theme=dark] .page .mermaid .activeText3{fill:#323D47}[theme=dark] .page .mermaid .done0,[theme=dark] .page .mermaid .done1,[theme=dark] .page .mermaid .done2,[theme=dark] .page .mermaid .done3{stroke:grey;fill:#d3d3d3;stroke-width:2}[theme=dark] .page .mermaid .doneText0,[theme=dark] .page .mermaid .doneText1,[theme=dark] .page .mermaid .doneText2,[theme=dark] .page .mermaid .doneText3{fill:#323D47}[theme=dark] .page .mermaid .crit0,[theme=dark] .page .mermaid .crit1,[theme=dark] .page .mermaid .crit2,[theme=dark] .page .mermaid .crit3{stroke:#E83737;fill:#E83737;stroke-width:2}[theme=dark] .page .mermaid .activeCrit0,[theme=dark] .page .mermaid .activeCrit1,[theme=dark] .page .mermaid .activeCrit2,[theme=dark] .page .mermaid .activeCrit3{stroke:#E83737;fill:#81B1DB;stroke-width:2}[theme=dark] .page .mermaid .doneCrit0,[theme=dark] .page .mermaid .doneCrit1,[theme=dark] .page .mermaid .doneCrit2,[theme=dark] .page .mermaid .doneCrit3{stroke:#E83737;fill:#d3d3d3;stroke-width:2;cursor:pointer;shape-rendering:crispEdges}[theme=dark] .page .mermaid .milestone{transform:rotate(45deg) scale(0.8, 0.8)}[theme=dark] .page .mermaid .milestoneText{font-style:italic}[theme=dark] .page .mermaid .doneCritText0,[theme=dark] .page .mermaid .doneCritText1,[theme=dark] .page .mermaid .doneCritText2,[theme=dark] .page .mermaid .doneCritText3{fill:#323D47}[theme=dark] .page .mermaid .activeCritText0,[theme=dark] .page .mermaid .activeCritText1,[theme=dark] .page .mermaid .activeCritText2,[theme=dark] .page .mermaid .activeCritText3{fill:#323D47}[theme=dark] .page .mermaid .titleText{text-anchor:middle;font-size:18px;fill:#d3d3d3;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}[theme=dark] .page .mermaid g.classGroup text{fill:purple;stroke:none;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:10px}[theme=dark] .page .mermaid g.classGroup text .title{font-weight:bolder}[theme=dark] .page .mermaid g.clickable{cursor:pointer}[theme=dark] .page .mermaid g.classGroup rect{fill:#BDD5EA;stroke:purple}[theme=dark] .page .mermaid g.classGroup line{stroke:purple;stroke-width:1}[theme=dark] .page .mermaid .classLabel .box{stroke:none;stroke-width:0;fill:#BDD5EA;opacity:0.5}[theme=dark] .page .mermaid .classLabel .label{fill:purple;font-size:10px}[theme=dark] .page .mermaid .relation{stroke:purple;stroke-width:1;fill:none}[theme=dark] .page .mermaid .dashed-line{stroke-dasharray:3}[theme=dark] .page .mermaid #compositionStart{fill:purple;stroke:purple;stroke-width:1}[theme=dark] .page .mermaid #compositionEnd{fill:purple;stroke:purple;stroke-width:1}[theme=dark] .page .mermaid #aggregationStart{fill:#BDD5EA;stroke:purple;stroke-width:1}[theme=dark] .page .mermaid #aggregationEnd{fill:#BDD5EA;stroke:purple;stroke-width:1}[theme=dark] .page .mermaid #dependencyStart{fill:purple;stroke:purple;stroke-width:1}[theme=dark] .page .mermaid #dependencyEnd{fill:purple;stroke:purple;stroke-width:1}[theme=dark] .page .mermaid #extensionStart{fill:purple;stroke:purple;stroke-width:1}[theme=dark] .page .mermaid #extensionEnd{fill:purple;stroke:purple;stroke-width:1}[theme=dark] .page .mermaid .commit-id,[theme=dark] .page .mermaid .commit-msg,[theme=dark] .page .mermaid .branch-label{fill:lightgrey;color:lightgrey;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}[theme=dark] .page .mermaid .pieTitleText{text-anchor:middle;font-size:25px;fill:#323D47;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}[theme=dark] .page .mermaid .slice{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}[theme=dark] .page .mermaid g.stateGroup text{fill:purple;stroke:none;font-size:10px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}[theme=dark] .page .mermaid g.stateGroup text{fill:purple;stroke:none;font-size:10px}[theme=dark] .page .mermaid g.stateGroup .state-title{font-weight:bolder;fill:#000}[theme=dark] .page .mermaid g.stateGroup rect{fill:#BDD5EA;stroke:purple}[theme=dark] .page .mermaid g.stateGroup line{stroke:purple;stroke-width:1}[theme=dark] .page .mermaid .transition{stroke:purple;stroke-width:1;fill:none}[theme=dark] .page .mermaid .stateGroup .composit{fill:white;border-bottom:1px}[theme=dark] .page .mermaid .stateGroup .alt-composit{fill:#e0e0e0;border-bottom:1px}[theme=dark] .page .mermaid .state-note{stroke:rgba(255,255,255,0.25);fill:#fff5ad}[theme=dark] .page .mermaid .state-note text{fill:black;stroke:none;font-size:10px}[theme=dark] .page .mermaid .stateLabel .box{stroke:none;stroke-width:0;fill:#BDD5EA;opacity:0.5}[theme=dark] .page .mermaid .stateLabel text{fill:#000;font-size:10px;font-weight:bold;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}[theme=dark] .page .mermaid .node circle.state-start{fill:black;stroke:black}[theme=dark] .page .mermaid .node circle.state-end{fill:black;stroke:white;stroke-width:1.5}[theme=dark] .page .mermaid #statediagram-barbEnd{fill:purple}[theme=dark] .page .mermaid .statediagram-cluster rect{fill:#BDD5EA;stroke:purple;stroke-width:1px}[theme=dark] .page .mermaid .statediagram-cluster rect.outer{rx:5px;ry:5px}[theme=dark] .page .mermaid .statediagram-state .divider{stroke:purple}[theme=dark] .page .mermaid .statediagram-state .title-state{rx:5px;ry:5px}[theme=dark] .page .mermaid .statediagram-cluster.statediagram-cluster .inner{fill:white}[theme=dark] .page .mermaid .statediagram-cluster.statediagram-cluster-alt .inner{fill:#e0e0e0}[theme=dark] .page .mermaid .statediagram-cluster .inner{rx:0;ry:0}[theme=dark] .page .mermaid .statediagram-state rect.basic{rx:5px;ry:5px}[theme=dark] .page .mermaid .statediagram-state rect.divider{stroke-dasharray:10,10;fill:#efefef}[theme=dark] .page .mermaid .note-edge{stroke-dasharray:5}[theme=dark] .page .mermaid .statediagram-note rect{fill:#fff5ad;stroke:rgba(255,255,255,0.25);stroke-width:1px;rx:0;ry:0}[theme=dark] .page .mermaid :root{--mermaid-font-family: '"trebuchet ms", verdana, arial';--mermaid-font-family: "Comic Sans MS", "Comic Sans", cursive}.page .mermaid div.mermaidTooltip{z-index:50}
/*# sourceMappingURL=mermaid.min.css.map */ \ No newline at end of file